fix: 일일 로그 날짜 수정 버그 픽스

- UpdateDailyLogRequest에 log_date 검증 규칙 추가
- DailyLogService.updateDailyLog에 log_date 필드 추가
- 일일 로그 수정 모달에 formatDateForInput 함수 추가
  (ISO 형식을 YYYY-MM-DD 형식으로 변환)
This commit is contained in:
2025-12-02 13:03:48 +09:00
parent 8db5cb22d5
commit afccada30b
4 changed files with 13 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ public function authorize(): bool
public function rules(): array
{
return [
'log_date' => ['sometimes', 'date', 'date_format:Y-m-d'],
'project_id' => ['nullable', 'integer', 'exists:admin_pm_projects,id'],
'summary' => ['nullable', 'string', 'max:5000'],
'entries' => ['nullable', 'array'],
@@ -29,6 +30,7 @@ public function rules(): array
public function attributes(): array
{
return [
'log_date' => '로그 날짜',
'project_id' => '프로젝트',
'summary' => '요약',
'entries' => '항목',

View File

@@ -130,6 +130,7 @@ public function updateDailyLog(int $id, array $data): AdminPmDailyLog
$log = AdminPmDailyLog::findOrFail($id);
$log->update([
'log_date' => $data['log_date'] ?? $log->log_date,
'project_id' => $data['project_id'] ?? $log->project_id,
'summary' => $data['summary'] ?? $log->summary,
'updated_by' => auth()->id(),