- shared/actions.ts: /boards/ → /system-boards/ 엔드포인트 변경 - EventList, InquiryList, NoticeList: 날짜 범위 초기값 빈 문자열로 변경 (전체 조회) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
43 lines
1.3 KiB
PHP
43 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Approval;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
$stepTypes = implode(',', \App\Models\Tenants\ApprovalLine::STEP_TYPES);
|
|
|
|
return [
|
|
// form_id 또는 form_code
|
|
'form_id' => 'nullable|integer|exists:approval_forms,id',
|
|
'form_code' => 'nullable|string|exists:approval_forms,code',
|
|
'title' => 'nullable|string|max:200',
|
|
'content' => 'nullable|array',
|
|
'attachments' => 'nullable|array',
|
|
'attachments.*' => 'integer|exists:files,id',
|
|
// 결재선 수정 지원
|
|
'steps' => 'nullable|array',
|
|
'steps.*.type' => "nullable|string|in:{$stepTypes}",
|
|
'steps.*.step_type' => "nullable|string|in:{$stepTypes}",
|
|
'steps.*.user_id' => 'nullable|integer|exists:users,id',
|
|
'steps.*.approver_id' => 'nullable|integer|exists:users,id',
|
|
'steps.*.step_order' => 'nullable|integer|min:1',
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'form_id.exists' => __('validation.exists', ['attribute' => '결재양식']),
|
|
];
|
|
}
|
|
}
|