From 0458ce95097f97a3469db48bd6f655c8dd3d4674 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 4 Jun 2019 19:26:50 +0200 Subject: [PATCH] Added more error messages --- .../controller/shift_entries_controller.php | 2 ++ includes/model/ShiftSignupState.php | 2 ++ includes/view/ShiftCalendarRenderer.php | 2 +- includes/view/ShiftCalendarShiftRenderer.php | 2 +- .../lang/de_DE.UTF-8/LC_MESSAGES/default.mo | Bin 45132 -> 45461 bytes .../lang/de_DE.UTF-8/LC_MESSAGES/default.po | 7 +++++-- 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/includes/controller/shift_entries_controller.php b/includes/controller/shift_entries_controller.php index 3c6c3a7c..5547c183 100644 --- a/includes/controller/shift_entries_controller.php +++ b/includes/controller/shift_entries_controller.php @@ -212,6 +212,8 @@ function shift_entry_error_message(ShiftSignupState $shift_signup_state) error(__('This shift ended already.')); } elseif ($shift_signup_state->getState() == ShiftSignupState::NOT_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) { error(__('You are signed up for this shift.')); } diff --git a/includes/model/ShiftSignupState.php b/includes/model/ShiftSignupState.php index a2618cf1..70ae5059 100644 --- a/includes/model/ShiftSignupState.php +++ b/includes/model/ShiftSignupState.php @@ -93,6 +93,7 @@ class ShiftSignupState { switch ($state) { case ShiftSignupState::NOT_ARRIVED: + case ShiftSignupState::NOT_YET: case ShiftSignupState::SHIFT_ENDED: return 100; @@ -109,6 +110,7 @@ class ShiftSignupState case ShiftSignupState::OCCUPIED: case ShiftSignupState::ADMIN: return 60; + default: return 0; } diff --git a/includes/view/ShiftCalendarRenderer.php b/includes/view/ShiftCalendarRenderer.php index dfc55d54..23fc0051 100644 --- a/includes/view/ShiftCalendarRenderer.php +++ b/includes/view/ShiftCalendarRenderer.php @@ -313,7 +313,7 @@ class ShiftCalendarRenderer label(__('Help needed'), 'danger'), label(__('Other angeltype needed / collides with my shifts'), 'warning'), label(__('Shift is full'), 'success'), - label(__('Shift running/ended or user not arrived'), 'default') + label(__('Shift running/ended or user not arrived/allowed'), 'default') ]); } } diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php index ac206ad0..89f66275 100644 --- a/includes/view/ShiftCalendarShiftRenderer.php +++ b/includes/view/ShiftCalendarShiftRenderer.php @@ -205,7 +205,7 @@ class ShiftCalendarShiftRenderer break; case ShiftSignupState::NOT_YET: - $entry_list[] = $inner_text . '(' . _('not yet') . ')'; + $entry_list[] = $inner_text . ' (' . _('not yet') . ')'; break; case ShiftSignupState::ANGELTYPE: diff --git a/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mo b/resources/lang/de_DE.UTF-8/LC_MESSAGES/default.mo index 0eb381de38b3fcdab046e67bc4e5fd18f3836c9e..f5635121cdc28e0a4c6b9768f00e6bb9964aefb8 100644 GIT binary patch delta 11036 zcmaLcd7O^b|Htv`w#?dK#*8s$#@xf~`;4(KW2|3m2ob7b24k6F4B6_Y5=x&>ezu)hl-~H(FJm*~JI?LyrbKN(6T~=ZK&lNmp zgDTCp_~cfwtO$$=vMg6c%Swq+sbytkSXOP!L=|5KlB<*~+*s7Ar_=!Z5Y;S%FP^dkSe@jj}<3R%uTg3z118yUBifI*mo z!I*=p-_zvtF@*dCe1!h3*(8D}Sd4+V9yQb5SQ&psHGBm%z#Hg`_puUIu1DwShl)Tl z>iI5M6H71*UqMZD1uCLjFq!_X6D0JYE8CfAUDSg~7>TVh3iD7MPesk(6|9BJQ1y49 z26zG$u`*PL7m-j~_b>=6)z{1|D-=B{h#{d6HpD8JgIeRR=!5-Dc>yXyrPu*q!WwuK z)!{`{sIQ?0`WLEWp9W5OFskDiR6m&wi2oE4Eh$ilcbkfPQ3E=GiohAvK<=XkP^qCa z^BSlbW@0S1LOnMWReuy}2`69;^k6c+ff~pc4T--RI6{GD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