@extends('layouts.app') @section('content')

Attendance & Leave Settings

{{ $company->name }} - Configure clock in rules, working hours, and leave policies

Back to HR Settings
@if(session('success')) @endif
@csrf @method('PUT')
Clock In/Out Rules
@error('standard_work_start_time')
{{ $message }}
@enderror
@error('standard_work_end_time')
{{ $message }}
@enderror
@error('lunch_break_start')
{{ $message }}
@enderror
@error('lunch_break_end')
{{ $message }}
@enderror
minutes @error('late_tolerance_minutes')
{{ $message }}
@enderror
Grace period before marking as late
minutes @error('early_departure_tolerance_minutes')
{{ $message }}
@enderror
Grace period for early departure
require_photo_clock_in ? 'checked' : '' }}>
Employees must take a photo when clocking in
require_location_clock_in ? 'checked' : '' }}>
GPS location verification for clock in
meters @error('location_radius_meters')
{{ $message }}
@enderror
Allowed radius from office location
@php $locations = $settings->allowed_clock_in_locations ?? []; @endphp @if(empty($locations))
No office locations configured. Add at least one office location to enable geofencing.
@endif @foreach($locations as $index => $location)
@endforeach
Employees can only clock in when they are within the specified radius of these locations. Use the "Current Location" button to automatically fill coordinates. @if(config('app.debug'))
Debug Info: Locations in DB: {{ count($settings->allowed_clock_in_locations ?? []) }}, Require Location: {{ $settings->require_location_clock_in ? 'Yes' : 'No' }}
Raw Data: {{ json_encode($settings->allowed_clock_in_locations) }}
@endif
Working Hours Configuration
hours @error('daily_working_hours')
{{ $message }}
@enderror
hours @error('weekly_working_hours')
{{ $message }}
@enderror
@error('weekend_days')
{{ $message }}
@enderror
@php $workingDays = $settings->working_days ?? ['monday', 'tuesday', 'wednesday', 'thursday', 'friday']; $days = ['monday' => 'Monday', 'tuesday' => 'Tuesday', 'wednesday' => 'Wednesday', 'thursday' => 'Thursday', 'friday' => 'Friday', 'saturday' => 'Saturday', 'sunday' => 'Sunday']; @endphp @foreach($days as $value => $label)
@endforeach
flexible_working_hours ? 'checked' : '' }}>
Overtime Settings
auto_calculate_overtime ? 'checked' : '' }}>
require_overtime_approval ? 'checked' : '' }}>
hours @error('overtime_threshold_daily')
{{ $message }}
@enderror
Overtime applies after this many hours
hours @error('max_overtime_hours_monthly')
{{ $message }}
@enderror
Malaysian Employment Act: Maximum 104 hours/month
Leave Entitlements & Policies
days @error('annual_leave_entitlement')
{{ $message }}
@enderror
days @error('sick_leave_entitlement')
{{ $message }}
@enderror
days @error('maternity_leave_entitlement')
{{ $message }}
@enderror
days @error('paternity_leave_entitlement')
{{ $message }}
@enderror
@error('leave_year_start')
{{ $message }}
@enderror
days @error('max_carry_forward_days')
{{ $message }}
@enderror
days @error('medical_cert_required_after_days')
{{ $message }}
@enderror
allow_negative_leave_balance ? 'checked' : '' }}>
carry_forward_unused_leave ? 'checked' : '' }}>
allow_half_day_leave ? 'checked' : '' }}>
allow_hourly_leave ? 'checked' : '' }}>
require_medical_certificate_sick_leave ? 'checked' : '' }}>
auto_update_malaysian_holidays ? 'checked' : '' }}>
Leave Approval Workflow
days @error('min_advance_notice_days')
{{ $message }}
@enderror
Minimum advance notice required
days @error('max_advance_application_days')
{{ $message }}
@enderror
How far in advance can leave be applied
days @error('approval_timeout_days')
{{ $message }}
@enderror
Auto-approve if no response
require_manager_approval ? 'checked' : '' }}>
require_hr_approval ? 'checked' : '' }}>
notify_team_on_leave_approval ? 'checked' : '' }}>
Cancel
Current Configuration
Working Hours
{{ $settings->daily_working_hours }}h/day
Weekly Hours
{{ $settings->weekly_working_hours }}h/week
Annual Leave
{{ $settings->annual_leave_entitlement }} days
Sick Leave
{{ $settings->sick_leave_entitlement }} days
Work Schedule:
{{ $settings->standard_work_start_time?->format('H:i') }} - {{ $settings->standard_work_end_time?->format('H:i') }}
Malaysian Employment Act 1955
Working Hours:
  • Maximum 8 hours per day
  • Maximum 48 hours per week
  • 6 working days per week maximum
  • Overtime minimum 1.5x rate
Leave Entitlements:
  • Annual: 8-16 days (based on service)
  • Sick: 14-18 days per year
  • Maternity: 60 days (mandatory)
  • Paternity: 7 days (recent amendment)
Overtime Limits:
  • Maximum 104 hours per month
  • Director General approval needed for more
  • Public holidays: Double time
  • Rest days: 1.5x minimum
Quick Setup Templates
@push('scripts') @endpush @endsection