Skip to content

Commit

Permalink
Merge pull request #456 from code4romania/427-ngo-admin-staff-poate-l…
Browse files Browse the repository at this point in the history
…ua-rol-de-manager-de-caz-checkbox-still-displayed-in-view-mode

Eliminate can be case manager option from view user page
  • Loading branch information
gheorghelupu17 authored Dec 27, 2024
2 parents aebc3d4 + 48442f9 commit 0f7f465
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public function infolist(Infolist $infolist): Infolist
$fields[] = SectionHeader::make('case_permissions_group')
->state(__('user.labels.case_permissions'));
foreach (CasePermission::cases() as $option) {
if ($option === CasePermission::CAN_BE_CASE_MANAGER) {
continue;
}
$fields[] = TextEntry::make($option->value)
->label($option->getLabel())
->state($record->permissions?->case_permissions->contains($option) ?
Expand Down

0 comments on commit 0f7f465

Please sign in to comment.