@extends('layouts.backend') @section('title', '| User Management') {{-- Jira : WT:184 --}} @section('css') @endsection @section('content')
@if ($message = Session::get('success'))
{{ $message }}
@endif @if ($message = Session::get('error'))
{{ $message }}
@endif

User Management

{{-- Check if the current user has the 'users-create' permission --}} @can(['users-create']) Create New User @endcan
@foreach($roles as $tab)
@if($tab->id == env('DEFAULT_USER_ROLE')) @else @endif @canany(['users-view', 'users-edit']) @endcanany @php $iterationCount = 0; @endphp @foreach ($data as $key => $user) @if($user->hasRole($tab->id)) @if($tab->id == env('DEFAULT_USER_ROLE')) @else @php $iterationCount++; @endphp @endif @endif @endforeach
Customer ID Name Email Phone numberS.No Name Email Phone numberAction
{{ $user->customer_id ?? '' }}{{ $iterationCount }}{{ $user->name }} {{ $user->email }} @if(!empty($user->phone)) +{{ $user->phone }} @endif @can('users-view') View @endcan {{-- @can('users-edit') Edit @endcan --}} @if($user->roles->contains('name', 'Super Admin')) @if(auth()->user()->roles->contains('name', 'Super Admin') && auth()->id() === $user->id) Edit @endif @else @can('users-edit') Edit @endcan @endif
@endforeach
@endsection {{-- Jira : WT:184 --}} @section('js') @endsection