@extends('layouts.template.main') @section('content')
@if(session('success')) @endif @if(session('error')) @endif
@csrf @method('PUT') {{-- Các mức phạt tiền --}}
Các mức phạt tiền đi muộn/về sớm
@php $amountConfigs = $groupedConfigs['amount'] ?? collect(); // Sắp xếp theo thứ tự logic: từ nhỏ đến lớn $lateFine5_15 = $amountConfigs->firstWhere('key', 'late_fine_5_15_minutes'); $lateFine15_30 = $amountConfigs->firstWhere('key', 'late_fine_15_30_minutes'); $lateFine30_plus = $amountConfigs->firstWhere('key', 'late_fine_30_plus_minutes'); $forgotPunch = $amountConfigs->firstWhere('key', 'forgot_punch_fine'); @endphp {{-- Phạt đi muộn/về sớm từ 5-15 phút --}} @if($lateFine5_15)
VNĐ
Key: {{ $lateFine5_15->key }}
@endif {{-- Phạt đi muộn/về sớm từ 15-30 phút --}} @if($lateFine15_30)
VNĐ
Key: {{ $lateFine15_30->key }}
@endif {{-- Phạt đi muộn/về sớm từ 30 phút trở lên --}} @if($lateFine30_plus)
VNĐ
Key: {{ $lateFine30_plus->key }}
@endif {{-- Phạt quên chấm công --}} @if($forgotPunch)
VNĐ
Key: {{ $forgotPunch->key }}
@endif
{{-- Số lần được miễn phí --}}
Số lần được miễn phí
@php $countConfigs = $groupedConfigs['count'] ?? collect(); $freeConfigs = $countConfigs->whereIn('key', ['max_forgot_free', 'max_late_early_free', 'late_early_day_penalty_threshold']); @endphp @foreach($freeConfigs as $config)
Key: {{ $config->key }}
@endforeach
{{-- Khung giờ nghỉ trưa --}}
Khung giờ nghỉ trưa
@php $timeConfigs = $groupedConfigs['time'] ?? collect(); $lunchStart = $timeConfigs->firstWhere('key', 'lunch_start_time'); $lunchEnd = $timeConfigs->firstWhere('key', 'lunch_end_time'); @endphp {{-- Giờ bắt đầu nghỉ trưa --}} @if($lunchStart)
Key: {{ $lunchStart->key }}
@endif {{-- Giờ kết thúc nghỉ trưa --}} @if($lunchEnd)
Key: {{ $lunchEnd->key }}
@endif
{{-- Giờ làm việc tối thiểu --}}
Giờ làm việc và hệ số OT
@php $hoursConfigs = $groupedConfigs['hours'] ?? collect(); $workingHoursConfigs = $hoursConfigs->whereIn('key', ['minimum_working_hours']); @endphp @foreach($workingHoursConfigs as $config)
giờ
Key: {{ $config->key }}
@endforeach @php $hoursConfigs = $groupedConfigs['count'] ?? collect(); $workingHoursConfigs = $hoursConfigs->whereIn('key', ['ot_coefficient']); @endphp @foreach($workingHoursConfigs as $config)
X
@endforeach
{{-- Nút lưu --}}
@endsection @section('scripts') @endsection