feat(프로젝트): 매일 하는 업무 — 날짜 팝업 [매일]·반복 아이콘·시각별 알림

- 마이그레이션 033 tasks.repeat_daily — [매일]이면 마감일·시각 비움, 마감일을 고르면 꺼짐(미적용이면 버튼 숨김·PUT 503)
- 마감 칸(카드·목록·내 업무·세부 업무·업무 창)에 반복 아이콘 + "매일"
- reminders.run_daily_alerts: 영업일, Project 옵션 daily_alert_times 중 지난 가장 늦은 시각마다 담당자(없으면 협업자)에게 type=daily 알림(task_reminders 로 중복 방지, 데몬 1분 주기)
- 큰 알림 팝업·PC 알림 프로그램에서 매일 업무 줄은 노란 배경
- Project 옵션 "알림" 분류: 알림 시각 여러 개 추가·삭제(최대 12)
- 도움말·모듈 CLAUDE.md·DEPLOYMENT(033) 갱신, 테스트 추가

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 14:35:59 +09:00
parent 3045bc6f99
commit 7f94e5efe7
26 changed files with 451 additions and 75 deletions
+26
View File
@@ -1653,6 +1653,32 @@ def test_reorder_keeps_linked_card_position():
assert ST.get_task(task_id=lk["id"])["sort_order"] == lk["sort_order"]
def test_repeat_daily_task_and_alerts():
"""매일 하는 업무(2026-11-11, 마이그레이션 033) — [매일]이면 마감일을 비우고, 마감일을 고르면 꺼짐.
알림 데몬은 미완료 매일 업무의 담당자에게 시각마다 한 번(type=daily, 큰 팝업)."""
from datetime import date as _d
from app.modules.project import reminders
a = _project("P-daily", ADMIN, (ALICE,))
sa = _stage(a["id"], by=ADMIN)
t = ST.create_task(project_id=a["id"], title="매일 청소", stage_id=sa["id"], assignee_email=ALICE,
due_date="2026-12-01", created_by=ALICE)
r = req("PUT", f"/project/api/tasks/{t['id']}", ALICE, json={"due_date": None, "repeat_daily": True})
assert r.status_code == 200, r.text
got = r.json()["task"]
assert got["repeat_daily"] is True and got["due_date"] is None, got
assert req("PUT", f"/project/api/tasks/{t['id']}", ALICE, json={"repeat_daily": "yes"}).status_code == 400
assert t["id"] in [x["id"] for x in ST.list_open_daily_tasks()]
today = _d(2026, 11, 11)
assert reminders.run_daily_alerts(ST, today=today, slot="09:00") >= 1
assert reminders.run_daily_alerts(ST, today=today, slot="09:00") == 0 # 같은 시각은 한 번
alerts = req("GET", "/project/api/notifications/alerts?after=0", ALICE).json()["alerts"]
assert any(n["type"] == "daily" and n["task_id"] == t["id"] for n in alerts), alerts
# 마감일을 고르면 매일 반복은 꺼진다(repeat_daily 를 안 보내도)
got = req("PUT", f"/project/api/tasks/{t['id']}", ALICE, json={"due_date": "2026-12-05"}).json()["task"]
assert got["repeat_daily"] is False and got["due_date"] == "2026-12-05", got
assert t["id"] not in [x["id"] for x in ST.list_open_daily_tasks()]
def test_move_stage_to_other_project():
"""섹션째 다른 프로젝트로(2026-10-26) — 섹션 + 업무 + 세부 업무(모든 단계), 섹션은 맨 끝, 연결 정리, 권한."""
a = _project("P-smA", ADMIN, (ALICE, BOB))