feat(project): 업무 시간 지정(종일 기본) + 타임라인 시간 반영
- tasks 에 start_time/due_time TIME 컬럼 추가(마이그레이션 003). NULL=종일
- 업무 모달에 '시간 지정' 체크박스 → 체크 시 시작/마감 시간 입력란 표시.
미체크면 종일로 저장(시간 null)
- store.validate_time(HH:MM), db create/update + TIME 직렬화('HH:MM')
- 타임라인: 시간 있으면 date+time 으로 정확히 배치, 없으면 종일
DB: scripts/sql/project_db_003_task_times.sql 서버서 적용 필요.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -108,6 +108,22 @@ def validate_date(d: Any) -> str | None:
|
||||
return v[:10]
|
||||
|
||||
|
||||
def validate_time(t: Any) -> str | None:
|
||||
"""'HH:MM' 형식만 통과(초는 버림). 빈값/None 은 None(=종일)."""
|
||||
v = norm_str(t)
|
||||
if not v:
|
||||
return None
|
||||
parts = v.split(":")
|
||||
try:
|
||||
hh = int(parts[0])
|
||||
mm = int(parts[1]) if len(parts) > 1 else 0
|
||||
except (ValueError, IndexError):
|
||||
raise ValueError(f"시간 형식이 올바르지 않습니다: {t}")
|
||||
if not (0 <= hh <= 23 and 0 <= mm <= 59):
|
||||
raise ValueError(f"시간 범위가 올바르지 않습니다: {t}")
|
||||
return f"{hh:02d}:{mm:02d}"
|
||||
|
||||
|
||||
def build_subject_assigned(*, project_name: str, task_title: str, assignee: str) -> str:
|
||||
return f"[DBX 프로젝트] 업무 배정: {project_name} · {task_title} → {assignee}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user