@extends('layouts.admin') @section('title', __('Staff')) @section('content') @php $me = auth()->user(); $roles = [3 => __('Staff (orders & stock)'), 2 => __('Admin')] + ($me->role_id == 1 ? [1 => __('Super admin')] : []); @endphp

{{ __('Staff & admins') }}

@csrf

{{ __('New account') }}

{{ __('Create account') }}
@csrf

{{ __('Give an existing account a role') }}

{{ __('Save role') }}
@foreach ($staff as $s) @endforeach
{{ __('Name') }}{{ __('Role') }}{{ __('Last sign-in') }}{{ __('Status') }}{{ __('Actions') }}
{{ trim($s->first_name.' '.$s->last_name) }}{{ $s->email }} {{ __(ucwords(str_replace('_', ' ', $s->role))) }}{{ $s->last_login_at ?: '—' }} @if ($s->id !== $me->id)
@csrf @method('PATCH')
@csrf @method('PATCH')
@csrf @method('PATCH')
@else{{ __('This is you') }}@endif
@include('partials.pagination', ['result' => $result]) @endsection