@extends('layouts.main') @section('title', 'Setting - '.$pageTitle) @section('navbarTitle', 'Setting') @section('css') @php $dashboardCssPath = public_path('assets/css/dashboard.css'); $dashboardCssVersion = file_exists($dashboardCssPath) ? filemtime($dashboardCssPath) : time(); @endphp @endsection @section('content') @php $isEdit = $mode === 'edit'; $formatTimeInput = static function (mixed $value): string { if (blank($value)) { return ''; } return substr((string) $value, 0, 5); }; $selectedPositionIds = collect(old( 'position_ids', $attendanceRule?->positions?->pluck('id')->map(fn ($id) => (string) $id)->all() ?? [] )) ->map(fn ($id) => (string) $id) ->all(); @endphp @include('layouts.breadcrumb', [ 'title' => 'Setting', 'current' => $pageTitle, 'homeRoute' => 'dashboard', ]) @include('settings.partials.nav')
@csrf @if ($isEdit) @method('PUT') @endif

{{ $pageTitle }}

Manage office attendance time, IP range, and radius.

@if ($errors->any()) @include('partials.swal-alert', [ 'type' => 'error', 'title' => 'The data is not valid.', 'message' => 'Please check the required fields again.', ]) @endif
@error('office_location_id')
{{ $message }}
@enderror
@error('attendance_type')
{{ $message }}
@enderror
Leave empty as fallback rule for this office. @error('position_ids')
{{ $message }}
@enderror @error('position_ids.*')
{{ $message }}
@enderror
@error('ip_range')
{{ $message }}
@enderror
@error('radius')
{{ $message }}
@enderror
@error('office_start_time')
{{ $message }}
@enderror
@error('office_end_time')
{{ $message }}
@enderror
is_active ?? true))>
@error('is_active')
{{ $message }}
@enderror
@endsection @section('script') @php $dashboardJsPath = public_path('assets/js/dashboard.js'); $dashboardJsVersion = file_exists($dashboardJsPath) ? filemtime($dashboardJsPath) : time(); @endphp @endsection