Files
sam-api/app/Http/Requests/Approval/UpdateRequest.php
kent 3e74999e89 fix: 고객센터 시스템 게시판 API 엔드포인트 및 날짜 필터 수정
- 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>
2025-12-28 02:49:46 +09:00

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' => '결재양식']),
];
}
}