119 lines
6.3 KiB
PHP
Executable File
119 lines
6.3 KiB
PHP
Executable File
@extends('Templates/AdminLayout/AdminLayout')
|
|
|
|
@section('Main-content')
|
|
@if (session('success'))
|
|
<div class="alert alert-success">
|
|
{{ session('success') }}
|
|
</div>
|
|
@endif
|
|
|
|
<section class="content-header">
|
|
<div class="container-fluid">
|
|
<div class="row mb-2">
|
|
<div class="col-sm-6">
|
|
{{-- <h1>{{ __('messages.users_listUsers.top_view_part.companies') }}</h1>
|
|
--}}
|
|
<h1>Utilizadores</h1>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<ol class="breadcrumb float-sm-right">
|
|
<li class="breadcrumb-item active">
|
|
{{ __('messages.users_listUsers.top_view_part.administration') }}
|
|
</li>
|
|
<li class="breadcrumb-item active">
|
|
{{-- {{ __('messages.users_listUsers.top_view_part.companies') }} --}}
|
|
Utilizadores
|
|
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="content">
|
|
<div class="container-fluid">
|
|
<div class="card card-primary">
|
|
<div class="card-header">
|
|
<h3 class="card-title">{{ __('messages.users_listUsers.top_view_part.users_table') }}</h3>
|
|
</div>
|
|
<!-- /.card-header -->
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-hover text-nowrap" id="TableReceiveAllUsers">
|
|
<thead>
|
|
<tr>
|
|
{{-- <th>{{__('messages.portfolio.users_table.id')}}</th> --}}
|
|
<th>{{ __('messages.portfolio.users_table.name') }}</th>
|
|
<th>{{ __('messages.portfolio.users_table.email') }}</th>
|
|
<th>{{ __('messages.portfolio.users_table.user_type') }}</th>
|
|
<th>{{ __('messages.portfolio.users_table.actions.actions') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($users as $user)
|
|
<tr>
|
|
{{-- <td>{{ $user->user_id }}</td> --}}
|
|
<td>{{ $user->user_name }}</td>
|
|
<td>{{ $user->email }}</td>
|
|
<td>{{ $user->userType->type_user }}</td>
|
|
<td class="table-btn-group-al">
|
|
<div class="d-flex justify-content-center dropdown">
|
|
<button data-toggle="dropdown" aria-expanded="false"
|
|
class="actions-btn btn btn-light circle ">
|
|
<i class="fa fa-ellipsis-v"></i>
|
|
</button>
|
|
<div id="group-actions-btn-14" class="dropdown-menu dropdown-menu-light">
|
|
<a href="{{ route('users.Show', ['id' => $user->user_id]) }}"
|
|
class="dropdown-item text-primary">
|
|
<i class="fa-solid fa-eye text-primary"></i>
|
|
{{ __('messages.portfolio.users_table.actions.details') }}
|
|
</a>
|
|
@if (Auth::user()->type_users == 1)
|
|
<a href="{{ route('users.edit', ['id' => $user->user_id]) }}"
|
|
class="dropdown-item text-primary">
|
|
<i class="fa-solid fa-edit text-primary"></i>
|
|
{{ __('messages.portfolio.users_table.actions.edit') }}
|
|
</a>
|
|
|
|
<form action="{{ route('users.destroy', $user) }}" method="POST"
|
|
onsubmit="return confirm('Are you sure you want to delete this user?');"
|
|
style="display:inline;">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="dropdown-item text-danger">
|
|
<i class="fa-solid fa-trash-alt text-danger"></i>
|
|
{{ __('messages.portfolio.users_table.actions.delete') }}
|
|
</button>
|
|
</form>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- /.card-body -->
|
|
</div>
|
|
<!-- /.card -->
|
|
</div>
|
|
{{-- /.container-fluid" --}}
|
|
</section>
|
|
@endsection
|
|
|
|
@section('scriptsTemplateAdmin')
|
|
<script>
|
|
$(function() {
|
|
$("#TableReceiveAllUsers").DataTable({
|
|
"responsive": true,
|
|
"lengthChange": false,
|
|
"autoWidth": false,
|
|
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
|
|
}).buttons().container().appendTo('#TableReceiveAllUsers_wrapper .col-md-6:eq(0)');
|
|
});
|
|
</script>
|
|
@endsection
|