| {{trans('employee.name')}} | {{trans('employee.email')}} | Role | Agent | {{__('Action')}} |
|---|---|---|---|---|
| {{ $value->name }} | {{ $value->email }} | @php $n=1; @endphp @foreach($value->getRoleNames() as $role) {{$n > 1 ? ', ':null}}{{ucwords($role)}} @php $n++; @endphp @endforeach | @if($value->agent) Agent @else — @endif | @php $actions = [ ['data-replace'=>'#editEmployee','url'=>'#editEmployeeModal','ajax-url'=>url('employees/'.$value->id.'/edit'), 'name'=>'edit', 'icon'=>'pencil'], ['data-id'=>$value->id, 'data-replace'=>'#disableEmployee','url'=>'#disableEmployeeModal','ajax-url'=>url(''), 'name'=>'Disable', 'icon'=>'eye']]; @endphp @include('partials.actions', ['actions'=>$actions]) {{-- Link as Agent button (only if not already an agent) --}} @if(!$value->agent) @endif |