@extends('layouts.admin') @section('title', 'Edit role') @section('content') All roles Permission matrix Assign to staff @if(session('status'))
{{ session('status') }}
@endif @if(session('warning'))
{{ session('warning') }}
@endif @if($sodWarning)
Separation of duties: this role currently has both finance.refund and finance.approve.
@endif @if($errors->any())
{{ $errors->first() }}
@endif
@csrf @method('PUT')

Role details

@if($isLocked) Protected @endif
@if($role->users->isNotEmpty())

Staff with this role

    @foreach($role->users->take(8) as $user)
  • {{ $user->name }} ยท {{ $user->email }}
  • @endforeach @if($role->users->count() > 8)
  • +{{ $role->users->count() - 8 }} more
  • @endif
@endif
@include('admin.roles._permissions', [ 'permissions' => $permissions, 'presets' => $presets, 'selectedIds' => $role->permissions->pluck('id')->all(), ])
Cancel
@unless($isLocked)
@csrf @method('DELETE')

Delete role

Removes the role permanently. Staff currently assigned cannot remain on a deleted role.

@endunless
@endsection