diff --git a/includes/mailer/shifts_mailer.php b/includes/mailer/shifts_mailer.php index 37b26838..b496a007 100644 --- a/includes/mailer/shifts_mailer.php +++ b/includes/mailer/shifts_mailer.php @@ -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); } } } diff --git a/resources/lang/de_DE/default.mo b/resources/lang/de_DE/default.mo index fb93d590..be387d9c 100644 Binary files a/resources/lang/de_DE/default.mo and b/resources/lang/de_DE/default.mo differ diff --git a/resources/lang/de_DE/default.po b/resources/lang/de_DE/default.po index 091e1114..3c1e0d15 100644 --- a/resources/lang/de_DE/default.po +++ b/resources/lang/de_DE/default.po @@ -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:"