dstpabuaran.com/app/Http/Requests/Admin/HR/AttendanceRequest.php
Yoga Pangestu 67e5a6271f Add tests for CheckAttendancePenaltiesJob to validate attendance penalties logic
- Implement tests to ensure job skips execution on weekends, when penalties are zero, or when no payroll period exists.
- Validate late penalty creation for late check-ins and ensure no penalties for on-time or early check-ins.
- Test absent penalties for employees without attendance records.
- Ensure no duplicate penalties are created and that payroll recalculations are accurate after penalties are applied.
- Handle multiple employees and edge cases, including employees without associated users.
- Verify that the job can be dispatched to the queue and has the correct retry configuration.
2026-07-31 11:13:46 +07:00

33 lines
625 B
PHP

<?php
namespace App\Http\Requests\Admin\HR;
use Illuminate\Foundation\Http\FormRequest;
use Override;
class AttendanceRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'photo' => ['required'],
'latitude' => ['required', 'numeric'],
'longitude' => ['required', 'numeric'],
];
}
public function attributes(): array
{
return [
'photo' => 'foto',
'latitude' => 'lintang',
'longitude' => 'bujur',
];
}
}