@if (isset($is_edit) && $is_edit)
Work Schedule Updated
Your work schedule has been updated. Please review the changes below:
@else
Work Schedule Notification
This is to inform you about your work schedule assignment. Please review the details below:
@endif
@if (isset($is_edit) && $is_edit && isset($changes) && !empty($changes))
Changes Made:
@foreach ($changes as $field => $change)
@php
$fieldName = ucfirst(str_replace('_', ' ', $field));
if ($field === 'start_time') {
$fieldName = 'Start Time';
} elseif ($field === 'end_time') {
$fieldName = 'End Time';
} elseif ($field === 'break_minutes') {
$fieldName = 'Break Time';
} elseif ($field === 'color_code') {
$fieldName = 'Color Code';
} elseif ($field === 'working_hours') {
$fieldName = 'Working Hours';
}
@endphp
{{ $fieldName }}:
@if ($field === 'start_time' || $field === 'end_time')
{{ date('h:i A', strtotime($change['old'])) }} →
{{ date('h:i A', strtotime($change['new'])) }}
@elseif($field === 'working_hours')
{{ round($change['old'] / 60, 2) }} hours → {{ round($change['new'] / 60, 2) }} hours
@else
{{ $change['old'] }} → {{ $change['new'] }}
@endif
@endforeach
@endif
@if (isset($roster_template_name) && !empty($roster_template_name))
{{ $roster_template_name }}
@else
Your Work Schedule
@endif
@if (isset($schedule_date) && !empty($schedule_date))
{{ $schedule_date }}
@if (isset($day_name) && !empty($day_name))
({{ $day_name }})
@endif
@endif
@if ((isset($start_time) && !empty($start_time)) || (isset($end_time) && !empty($end_time)))
Time:
@if (isset($start_time) && !empty($start_time))
{{ $start_time }}
@endif
@if (isset($start_time) && !empty($start_time) && (isset($end_time) && !empty($end_time)))
-
@endif
@if (isset($end_time) && !empty($end_time))
{{ $end_time }}
@endif
@endif
@if (isset($break_minutes) && !empty($break_minutes) && $break_minutes > 0)
☕ Break Time: {{ $break_minutes }} minutes
@endif
@if (isset($working_hours) && !empty($working_hours) && $working_hours > 0)
Working Hours: {{ $working_hours }} hours
@endif
@if (isset($site_name) && !empty($site_name))
@endif
@if (isset($assigned_by) && !empty($assigned_by))
Assigned by: {{ $assigned_by }}
@endif
@if (isset($shift_notes) && !empty($shift_notes))
Shift Notes:
{{ $shift_notes }}
@endif
@if (isset($note) && !empty($note))
Important Note:
{{ $note }}
@endif
@if (isset($is_edit) && $is_edit)
If you have any questions about the changes made to your schedule, please contact your
supervisor or the HR department.
@else
If you have any questions or concerns about your schedule, please contact your supervisor or the
HR department.
@endif
Thank you,
{{ $companyName }} Team