주요 기능:
- 일일 로그 CRUD (생성, 조회, 수정, 삭제, 복원, 영구삭제)
- 로그 항목(Entry) 관리 (추가, 상태변경, 삭제, 순서변경)
- 주간 타임라인 (최근 7일 진행률 표시)
- 테이블 리스트 아코디언 상세보기
- 담당자 자동완성 (일반 사용자는 슈퍼관리자 목록 제외)
- HTMX 기반 동적 테이블 로딩 및 필터링
- Soft Delete 지원
파일 추가:
- Models: AdminPmDailyLog, AdminPmDailyLogEntry
- Controllers: DailyLogController (Web, API)
- Service: DailyLogService
- Requests: StoreDailyLogRequest, UpdateDailyLogRequest
- Views: index, show, table partial, modal-form partial
라우트 추가:
- Web: /daily-logs, /daily-logs/today, /daily-logs/{id}
- API: /api/admin/daily-logs/* (CRUD + 항목관리)
52 lines
1.7 KiB
PHP
52 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\DailyLog;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateDailyLogRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'project_id' => ['nullable', 'integer', 'exists:admin_pm_projects,id'],
|
|
'summary' => ['nullable', 'string', 'max:5000'],
|
|
'entries' => ['nullable', 'array'],
|
|
'entries.*.id' => ['nullable', 'integer', 'exists:admin_pm_daily_log_entries,id'],
|
|
'entries.*.assignee_type' => ['required_with:entries', 'in:team,user'],
|
|
'entries.*.assignee_id' => ['nullable', 'integer'],
|
|
'entries.*.assignee_name' => ['required_with:entries', 'string', 'max:100'],
|
|
'entries.*.content' => ['required_with:entries', 'string', 'max:2000'],
|
|
'entries.*.status' => ['nullable', 'in:todo,in_progress,done'],
|
|
];
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
'project_id' => '프로젝트',
|
|
'summary' => '요약',
|
|
'entries' => '항목',
|
|
'entries.*.id' => '항목 ID',
|
|
'entries.*.assignee_type' => '담당자 유형',
|
|
'entries.*.assignee_id' => '담당자 ID',
|
|
'entries.*.assignee_name' => '담당자 이름',
|
|
'entries.*.content' => '업무 내용',
|
|
'entries.*.status' => '상태',
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'entries.*.assignee_name.required_with' => '담당자 이름은 필수입니다.',
|
|
'entries.*.content.required_with' => '업무 내용은 필수입니다.',
|
|
];
|
|
}
|
|
}
|