Added more error messages

main
Igor Scheller 5 years ago committed by msquare
parent 142871f852
commit 0458ce9509

@ -212,6 +212,8 @@ function shift_entry_error_message(ShiftSignupState $shift_signup_state)
error(__('This shift ended already.')); error(__('This shift ended already.'));
} elseif ($shift_signup_state->getState() == ShiftSignupState::NOT_ARRIVED) { } elseif ($shift_signup_state->getState() == ShiftSignupState::NOT_ARRIVED) {
error(__('You are not marked as arrived.')); error(__('You are not marked as arrived.'));
} elseif ($shift_signup_state->getState() == ShiftSignupState::NOT_YET) {
error(__('You are not allowed to sign up yet.'));
} elseif ($shift_signup_state->getState() == ShiftSignupState::SIGNED_UP) { } elseif ($shift_signup_state->getState() == ShiftSignupState::SIGNED_UP) {
error(__('You are signed up for this shift.')); error(__('You are signed up for this shift.'));
} }

@ -93,6 +93,7 @@ class ShiftSignupState
{ {
switch ($state) { switch ($state) {
case ShiftSignupState::NOT_ARRIVED: case ShiftSignupState::NOT_ARRIVED:
case ShiftSignupState::NOT_YET:
case ShiftSignupState::SHIFT_ENDED: case ShiftSignupState::SHIFT_ENDED:
return 100; return 100;
@ -109,6 +110,7 @@ class ShiftSignupState
case ShiftSignupState::OCCUPIED: case ShiftSignupState::OCCUPIED:
case ShiftSignupState::ADMIN: case ShiftSignupState::ADMIN:
return 60; return 60;
default: default:
return 0; return 0;
} }

@ -313,7 +313,7 @@ class ShiftCalendarRenderer
label(__('Help needed'), 'danger'), label(__('Help needed'), 'danger'),
label(__('Other angeltype needed / collides with my shifts'), 'warning'), label(__('Other angeltype needed / collides with my shifts'), 'warning'),
label(__('Shift is full'), 'success'), label(__('Shift is full'), 'success'),
label(__('Shift running/ended or user not arrived'), 'default') label(__('Shift running/ended or user not arrived/allowed'), 'default')
]); ]);
} }
} }

@ -178,6 +178,9 @@ msgstr "Die Schicht ist schon vorbei."
msgid "You are not marked as arrived." msgid "You are not marked as arrived."
msgstr "Du bist nicht als angekommen markiert." msgstr "Du bist nicht als angekommen markiert."
msgid "You are not allowed to sign up yet."
msgstr "Du darfst dich noch nicht anmelden."
#: includes/controller/shift_entries_controller.php:216 #: includes/controller/shift_entries_controller.php:216
#: includes/view/Shifts_view.php:129 #: includes/view/Shifts_view.php:129
msgid "You are signed up for this shift." msgid "You are signed up for this shift."
@ -2108,8 +2111,8 @@ msgid "Shift is full"
msgstr "Schicht ist voll" msgstr "Schicht ist voll"
#: includes/view/ShiftCalendarRenderer.php:316 #: includes/view/ShiftCalendarRenderer.php:316
msgid "Shift running/ended or user not arrived" msgid "Shift running/ended or user not arrived/allowed"
msgstr "Schicht läuft/vorbei oder du bist noch nicht angekommen" msgstr "Schicht läuft/vorbei oder du bist noch nicht angekommen/darfst dich noch nicht anmelden"
#: includes/view/ShiftCalendarShiftRenderer.php:134 #: includes/view/ShiftCalendarShiftRenderer.php:134
msgid "Add more angels" msgid "Add more angels"

Loading…
Cancel
Save