- Introduced routes for managing admin settings including system, homepage, social media, marketplace, and HR settings. - Created a comprehensive test suite for the AdminSettingsController to ensure proper functionality and validation of settings updates. - Implemented tests for authentication, data integrity, and realistic user scenarios to validate the settings management process.
34 lines
900 B
PHP
34 lines
900 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\Settings;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateHRRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'scheduled_check_in_time' => ['required', 'string', 'max:5'],
|
|
'scheduled_check_out_time' => ['required', 'string', 'max:5'],
|
|
'late_penalty_amount' => ['required', 'integer', 'min:0'],
|
|
'absent_penalty_amount' => ['required', 'integer', 'min:0'],
|
|
];
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
'scheduled_check_in_time' => 'jam masuk kerja',
|
|
'scheduled_check_out_time' => 'jam pulang kerja',
|
|
'late_penalty_amount' => 'denda keterlambatan',
|
|
'absent_penalty_amount' => 'denda bolos',
|
|
];
|
|
}
|
|
}
|