- 근무 설정 API (GET/PUT /settings/work) - 근무유형, 소정근로시간, 연장근로시간, 근무요일, 출퇴근시간, 휴게시간 - 출퇴근 설정 API (GET/PUT /settings/attendance) - GPS 출퇴근, 허용 반경, 본사 위치 설정 - 현장 관리 API (CRUD /sites) - 현장 등록/수정/삭제, 활성화된 현장 목록(셀렉트박스용) - GPS 좌표 기반 위치 관리 마이그레이션: work_settings, attendance_settings, sites 테이블 모델: WorkSetting, AttendanceSetting, Site (BelongsToTenant, SoftDeletes) 서비스: WorkSettingService, SiteService Swagger 문서 및 i18n 메시지 키 추가
35 lines
1.0 KiB
PHP
35 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\V1\WorkSetting;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateAttendanceSettingRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'use_gps' => ['sometimes', 'boolean'],
|
|
'allowed_radius' => ['sometimes', 'integer', 'min:10', 'max:10000'],
|
|
'hq_address' => ['nullable', 'string', 'max:255'],
|
|
'hq_latitude' => ['nullable', 'numeric', 'between:-90,90'],
|
|
'hq_longitude' => ['nullable', 'numeric', 'between:-180,180'],
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'allowed_radius.min' => __('error.attendance_setting.radius_too_small'),
|
|
'allowed_radius.max' => __('error.attendance_setting.radius_too_large'),
|
|
'hq_latitude.between' => __('error.attendance_setting.invalid_latitude'),
|
|
'hq_longitude.between' => __('error.attendance_setting.invalid_longitude'),
|
|
];
|
|
}
|
|
}
|