@php use App\Models\Utility; @endphp @extends('layouts.admin') @section('page-title') {{ __('Manage Bulk Attendance') }} @endsection @push('script-page') @endpush @section('breadcrumb') @endsection @section('content')
{{ Form::open(['route' => ['attendanceemployee.bulkattendance'], 'method' => 'get', 'id' => 'bulkattendance_filter']) }}
{{ Form::label('date', __('Date'), ['class' => 'form-label']) }} {{ Form::date('date', isset($_GET['date']) ? $_GET['date'] : '', ['class' => 'form-control', 'placeholder' => __('Select Date')]) }}
{{ Form::label('branch', __('Branch'), ['class' => 'form-label']) }} {{ Form::select('branch', $branch, isset($_GET['branch']) ? $_GET['branch'] : '', ['class' => 'form-control select', 'required']) }}
{{ Form::label('department', __('Department'), ['class' => 'form-label']) }} {{ Form::select('department', $department, isset($_GET['department']) ? $_GET['department'] : '', ['class' => 'form-control select', 'required']) }}
{{ Form::close() }}
{{ Form::open(['route' => ['attendanceemployee.bulkattendances'], 'method' => 'post']) }}
@foreach ($employees as $employee) @php $attendance = $employee->present_status( $employee->id, isset($_GET['date']) ? $_GET['date'] : date('Y-m-d'), ); @endphp @endforeach
{{ __('Employee Id') }} {{ __('Employee') }} {{ __('Branch') }} {{ __('Department') }}
@php $settings = Utility::settings(); $prefix = isset($settings['employee_prefix']) ? ltrim($settings['employee_prefix'], '#') : 'EMP'; // Get last 5 digits from employee_id (only numbers) $cleanId = preg_replace('/\D/', '', $employee->employee_id); $last5 = str_pad(substr($cleanId, -5), 5, '0', STR_PAD_LEFT); $formattedId = $prefix . $last5; @endphp {{ $formattedId }} {{ $employee->name }} {{ !empty($employee->branch) ? $employee->branch->name : '' }} {{ !empty($employee->department) ? $employee->department->name : '' }}
status == 'Present' ? 'checked' : '' }}>
{{ Form::submit(__('Update'), ['class' => 'btn btn-primary']) }}
{{ Form::close() }}
@endsection