Deleted shift: Added message about worklog entry

This commit is contained in:
Igor Scheller 2019-09-18 04:38:49 +02:00
parent 85e4403392
commit c5dd21cbd6
3 changed files with 9 additions and 1 deletions

View File

@ -94,7 +94,12 @@ function mail_shift_delete($shift)
foreach ($users as $user) {
$user = (new User())->forceFill($user);
if ($user->settings->email_shiftinfo) {
engelsystem_email_to_user($user, __('Your Shift was deleted'), $message, true);
$userMessage = $message;
if ($shift['start'] < time() && !$user['freeloaded']) {
$userMessage .= "\n" . __('Since the deleted shift was already done, we added a worklog entry instead, to keep your work hours correct.') . "\n";
}
engelsystem_email_to_user($user, __('Your Shift was deleted'), $userMessage, true);
}
}
}

Binary file not shown.

View File

@ -674,6 +674,9 @@ msgstr "Eine deiner Schichten wurde gelöscht:"
msgid "Your Shift was deleted"
msgstr "Deine Schicht wurde gelöscht"
msgid "Since the deleted shift was already done, we added a worklog entry instead, to keep your work hours correct."
msgstr "Da die gelöschte Schicht bereits vergangen ist, haben wir einen entsprechenden Arbeitseinsatz hinzugefügt."
#: includes/mailer/shifts_mailer.php:114
msgid "You have been assigned to a Shift:"
msgstr "Du wurdest in eine Schicht eingetragen:"