Fix shift sign up angel button not always displayed

This commit is contained in:
Igor Scheller 2023-07-27 15:30:38 +02:00 committed by Michael Weimann
parent e407a3b780
commit 1c4c164c39
1 changed files with 3 additions and 6 deletions

View File

@ -88,12 +88,9 @@ function Shift_signup_button_render(Shift $shift, AngelType $angeltype)
->first(); ->first();
if ( if (
isset($angeltype->shift_signup_state) $angeltype->shift_signup_state?->isSignupAllowed()
&& ( || auth()->user()->isAngelTypeSupporter($angeltype)
$angeltype->shift_signup_state->isSignupAllowed() || auth()->can('admin_user_angeltypes')
|| auth()->user()->isAngelTypeSupporter($angeltype)
|| auth()->can('admin_user_angeltypes')
)
) { ) {
return button(shift_entry_create_link($shift, $angeltype), __('Sign up')); return button(shift_entry_create_link($shift, $angeltype), __('Sign up'));
} elseif (empty($user_angeltype)) { } elseif (empty($user_angeltype)) {