- Implemented employee columns for data table with sorting and action buttons. - Created employee creation form with validation and default password information. - Developed employee editing form pre-filled with existing data. - Added employee listing page with delete and reset password functionalities. - Introduced leave request management with columns for status and actions. - Created leave request form for adding and editing requests with date pickers. - Implemented confirmation dialogs for delete, approve, and reject actions.
30 lines
610 B
PHP
30 lines
610 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\HR;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class LeaveRequestRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'start_date' => ['required', 'date', 'after_or_equal:today'],
|
|
'end_date' => ['required', 'date', 'after_or_equal:start_date'],
|
|
];
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
'start_date' => 'tanggal mulai',
|
|
'end_date' => 'tanggal selesai',
|
|
];
|
|
}
|
|
}
|