@extends('layouts.admin') @section('page-title') {{__('Dashboard')}} @endsection @push('script-page') @endpush @section('breadcrumb') @endsection @php $setting = \App\Models\Utility::settings(); @endphp @section('content') @if(\Auth::user()->type != 'client' && \Auth::user()->type != 'company')
{{__('Mark Attendance')}}

{{ __('My Office Time: ' . $officeTime['startTime'] . ' to ' . $officeTime['endTime']) }}

{!! Form::select('work_mode', [ 'Work from Home' => 'Work from Home', 'Work from Office' => 'Work from Office', ], old('work_mode', $attendance->work_mode ?? 'Work from Office'), [ 'class' => 'form-control', 'required' => true, 'form' => 'clockInForm' // this stays as you had it ]) !!}
{{ Form::open(['url' => 'attendanceemployee/attendance', 'method' => 'post', 'id' => 'clockInForm']) }} @if(empty($employeeAttendance) || $employeeAttendance->clock_out != '00:00:00') @else @endif {{ Form::close() }}
@if(!empty($employeeAttendance) && $employeeAttendance->clock_out == '00:00:00') {{ Form::model($employeeAttendance, ['route' => ['attendanceemployee.update', $employeeAttendance->id], 'method' => 'PUT']) }} {{-- Add visible work_mode dropdown to match Clock In --}} {!! Form::select('work_mode', [ 'Work from Home' => 'Work from Home', 'Work from Office' => 'Work from Office', ], $employeeAttendance->work_mode ?? 'Work from Office', [ 'class' => 'form-control mb-2', 'required' => true ]) !!} {{ Form::close() }} @else @endif
{{ __('Event') }}
@if (isset($setting['google_calendar_enable']) && $setting['google_calendar_enable'] == 'on') @endif
{{__('Announcement List')}}
@forelse($announcements as $announcement) @empty @endforelse
{{__('Title')}} {{__('Start Date')}} {{__('End Date')}} {{__('Description')}}
{{ $announcement->title }} {{ \Auth::user()->dateFormat($announcement->start_date) }} {{ \Auth::user()->dateFormat($announcement->end_date) }} {{ $announcement->description }}
{{__('There is no Announcement List')}}
{{__('Meeting List')}}
@if(count($meetings) > 0)
@forelse($meetings as $meeting) @endforeach
{{__('Meeting Title')}} {{__('Meeting Date')}} {{__('Meeting Time')}}
{{ $meeting->title }} {{ \Auth::user()->dateFormat($meeting->date) }} {{ \Auth::user()->timeFormat($meeting->time) }}
@else
{{__('No meeting scheduled yet.')}}
@endif
@else
{{__("Today's Not Clock In")}}
@foreach($notClockIns as $notClockIn) @php $user = $notClockIn->user; $logo = asset(Storage::url('uploads/avatar/')); $avatar = !empty($notClockIn->user->avatar) ? $notClockIn->user->avatar : 'avatar.png'; @endphp

{{ $notClockIn->name }}

@endforeach
{{ __('Event') }}
@if(isset($setting['google_calendar_enable']) && $setting['google_calendar_enable'] == 'on') @endif

{{__('Staff')}}

{{ $countUser + $countClient }}

{{__('Job')}}

{{__('Training')}}

{{__('Announcement List')}}
@if(count($announcements) > 0) @foreach($announcements as $announcement) @endforeach
{{__('Title')}} {{__('Start Date')}} {{__('End Date')}}
{{ $announcement->title }} {{ \Auth::user()->dateFormat($announcement->start_date) }} {{ \Auth::user()->dateFormat($announcement->end_date) }}
@else
{{__('No announcement present yet.')}}
@endif
{{__('Meeting Schedule')}}
@if(count($meetings) > 0) @foreach($meetings as $meeting) @endforeach
{{__('Title')}} {{__('Date')}} {{__('Time')}}
{{ $meeting->title }} {{ \Auth::user()->dateFormat($meeting->date) }} {{ \Auth::user()->timeFormat($meeting->time) }}
@else
{{__('No meeting scheduled yet.')}}
@endif
@endif @endsection