- 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>
40 lines
1.3 KiB
PHP
40 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Approval;
|
|
|
|
use App\Models\Tenants\ApprovalLine;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class SubmitRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
$stepTypes = implode(',', ApprovalLine::STEP_TYPES);
|
|
|
|
return [
|
|
// steps는 optional - 없으면 기존 결재선 사용
|
|
'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 [
|
|
'steps.*.type.in' => __('validation.in', ['attribute' => '단계유형']),
|
|
'steps.*.step_type.in' => __('validation.in', ['attribute' => '단계유형']),
|
|
'steps.*.user_id.exists' => __('validation.exists', ['attribute' => '결재자']),
|
|
'steps.*.approver_id.exists' => __('validation.exists', ['attribute' => '결재자']),
|
|
];
|
|
}
|
|
}
|