Skip to content

Commit

Permalink
Staff placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
alexPopaCode4 committed Dec 24, 2024
1 parent 91a0c27 commit 71437e9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/Filament/Organizations/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,21 +171,22 @@ public static function getSchema(): array

Placeholder::make('obs')
->hiddenLabel()
->visible(fn (Get $get) => $get('role_id'))
->content(function (Get $get) {

foreach ($get('role_id') as $roleID) {
$role = self::getRole($roleID);
if ($role->case_permissions->contains(CasePermission::HAS_ACCESS_TO_ALL_CASES))
{
if ($role->case_permissions->contains(CasePermission::HAS_ACCESS_TO_ALL_CASES)) {
return new HtmlString(__('user.placeholders.user_role_with_permissions_for_all_cases'));
}
}

return new HtmlString(__('user.placeholders.user_role_without_permissions_for_all_cases'));
})
->columnSpanFull(),

Group::make()
->relationship('permissions')
->columnSpanFull()
->schema([
CheckboxList::make('case_permissions')
->label(__('user.labels.case_permissions'))
Expand Down

0 comments on commit 71437e9

Please sign in to comment.