Add shift links to shift changed/assigned mails

This commit is contained in:
Igor Scheller 2021-12-25 17:08:29 +01:00 committed by msquare
parent 11c3a762b8
commit 02c69073f0
1 changed files with 4 additions and 2 deletions

View File

@ -62,7 +62,8 @@ function mail_shift_change($old_shift, $new_shift)
$message .= $new_shift['name'] . "\n";
$message .= $new_shift['title'] . "\n";
$message .= date('Y-m-d H:i', $new_shift['start']) . ' - ' . date('H:i', $new_shift['end']) . "\n";
$message .= $new_room->name . "\n";
$message .= $new_room->name . "\n\n";
$message .= url('/shifts', ['action' => 'view', 'shift_id' => $new_shift['SID']]) . "\n";
foreach ($users as $user) {
$user = (new User())->forceFill($user);
@ -121,7 +122,8 @@ function mail_shift_assign($user, $shift)
$message .= $shift['name'] . "\n";
$message .= $shift['title'] . "\n";
$message .= date('Y-m-d H:i', $shift['start']) . ' - ' . date('H:i', $shift['end']) . "\n";
$message .= $room->name . "\n";
$message .= $room->name . "\n\n";
$message .= url('/shifts', ['action' => 'view', 'shift_id' => $shift['SID']]) . "\n";
engelsystem_email_to_user($user, __('Assigned to Shift'), $message, true);
}