diff --git a/CLAUDE.md b/CLAUDE.md index d0699eb..d731901 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -36,7 +36,7 @@ Claude Code는 이 저장소에서 작업을 시작하기 전에 **반드시 아 - 말레이시아 창고 재고관리 (`app/modules/malaysia/`, `malaysia_stock_db`) — 낱개(MT/MX/MZ) 입출고·조정, 세트(MY) BOM, 일일 재고조사(세트→낱개 자동 분해), 현재고 현황. 뚜껑(MD-)은 재고 집계 제외 — 단, 창고 랙에는 위치 확인용으로 배치 가능(`store.LID_ITEMS`). 상품은 `itemcode_db` 읽기 전용. 권한키 `malaysia` - 말레이시아 배송 (`app/modules/dispatch/`, `dispatch_db`) — TikTok·Shopee 출고관리. 플랫폼별 데이터 엑셀 업로드(TikTok=03_TikTok_Order_Export.xlsx, Shopee=Packing List.Doorstep Delivery.xlsx) → 1상자=1카드 출고 작업 리스트·SKU 피킹 요약·Kagayaku 전달표 자동 생성. 1상자 묶음 기준 Package ID > Tracking ID > Order ID, 같은 상자 같은 SKU 합산. 작업 상태 토글(`dispatch_logs` 기록). 받는 사람 이름/전화/주소는 상자 단위로 저장(작업 카드 표시 + 출고 엑셀 생성용 — 개인정보). 배치 다운로드 zip 에 업로드 원본 + 취합 출고 엑셀(`YYYY.MM.DD(Ddd)_tictoc|shopee.xlsx`) 포함. 엑셀은 openpyxl 파싱/생성. 권한키 `dispatch`. 상세는 `docs/DISPATCH_MODULE.md` - 카페24 상품관리 (`app/modules/cafe24/`, `cafe24_db`) — 카페24 관리자에 들어가지 않고 상품 상세페이지(description HTML) 조회·편집·즉시적용·예약적용·버전 이력. 3분할 화면(목록 | HTML 편집기 | 상품 정보 패널). 정보 패널(`routes_product_info.py`, `_side.html`)에서 상품명·판매가·공급가·소비자가, 대표이미지(업로드 → `POST /admin/products/images` → PUT `detail_image`+`image_upload_type=A`), 옵션(생성/이름·썸네일·표시방식 수정/삭제)·품목(자체코드·추가금액·진열·판매)을 수정. 카페24 OAuth/API 클라이언트는 향후 주문관리와 공유하기 위해 **공통 계층 `app/integrations/cafe24/`** 에 둔다 — 라우터에서 `httpx`/`requests` 직접 호출 금지. 토큰은 Fernet 암호화 저장(`CAFE24_TOKEN_SECRET`), 로그/화면에 토큰·시크릿 절대 미출력. 쓰기 직전 항상 카페24 현재 HTML 을 다시 읽어 `BACKUP` revision 생성(로컬 값을 현재값으로 가정 금지). **카페24 관리자 API 는 PUT 뒤 한동안 GET 에서 예전 값을 돌려준다(읽기 지연)** — 우리 캐시 문제가 아니다. 그래서 "마지막 쓰기가 권위": 상세설명은 카페24 값이 최근 revision 중 하나와 같으면 지연으로 보고 마지막 MANUAL/SCHEDULED 를 표시·지문 기준으로 쓰고(`store.resolve_description`), 스칼라(상품명·가격·이미지·진열/판매)는 PUT 응답 스냅샷(`cafe24_products.last_write_snapshot`, 마이그레이션 004)과 GET 의 `updated_date` 를 비교해 덮어씌운다(`store.overlay_recent_write`). 유예시간 `CAFE24_READ_LAG_GRACE_MIN`(기본 360분). 쓰기 후 화면은 PUT 응답으로 그리고 다시 GET 하지 않는다. 예약은 DB 저장 + 별도 worker(`app/modules/cafe24/worker.py`, compose 서비스 `dbx-cafe24-worker`)가 처리 — 웹 프로세스에서 대기하지 않는다. 권한키 `cafe24`(연결/해제는 admin 전용). 상세는 `docs/CAFE24_MODULE.md` -- 프로젝트 관리 (`app/modules/project/`, `project_db`) — 아사나식. 프로젝트/서브프로젝트(self-FK `parent_id`, CASCADE)·업무(`tasks`: 담당자·우선순위·시작/마감)·진행단계(`project_stages` 칸반, 생성시 기본 4단계 seed, 세션 기본 담당자 `default_assignee_email` — 담당자 빈 업무를 그 세션에 만들거나 옮기면 자동 배정, 마이그레이션 009)·멤버 배정(`project_members`)·활동이력(`project_activity`). 첫 화면(`/project/`)은 **내 업무 목록**(프로젝트 홈 카드 화면은 폐지). 프로젝트 화면은 달력(FullCalendar)/타임라인(vis-timeline)/보드/리스트/대시보드 뷰 토글. 좌측 사이드바는 수신함·내 업무·휴지통·프로젝트 화면 공용(`templates/project/_side.html` + 프로젝트 목록 동작 `initSideTree`, 새 프로젝트/수정 모달 `_side_modals.html`) — 프로젝트 목록(순서 변경·✎·×)은 어느 화면에서나 같다. 보드는 아사나처럼 세션이 가로로 계속 늘어나고(넘치면 가로 스크롤) 카드의 담당자·마감일을 클릭해 그 자리에서 바꾼다. 좌측 사이드바에 수신함·내 업무(접이식) 메뉴. 설명란은 주소 붙여넣기 시 자동 링크, 설명란·댓글에서 @로 멤버를 태그하면 (`task_mentions`, 마이그레이션 006) 수신함에 그 업무가 쌓인다. 진입 권한키 `project`(관리자 페이지 토글로 직원별 부여, admin 자동). 프로젝트 생성은 `project` 권한자 누구나(만든 사람이 owner), 삭제는 만든 사람만(슈퍼관리자 예외), 사용자 배정은 `is_admin` 만. 배정 멤버(또는 owner/admin)만 그 프로젝트를 조회(화면·API 모두, 비멤버 403)하고 서브프로젝트/업무/단계 CRUD — URL 의 세션·부모 업무가 그 프로젝트 것인지 서버가 검증. 실시간 반영은 `project_live_version` 카운터(마이그레이션 007, 미적용 시 MAX 폴백). 사이드바 전체 검색(`/api/search`, 제목·설명·댓글, pg_trgm) + 프로젝트/내 업무 필터 바(찾기·상태·담당자·마감·우선순위·정렬, 클라이언트 필터). 팔로워(`task_followers`, 자동 팔로우: 만든 사람·담당자·댓글·@태그) — 완료·댓글 알림은 담당자+팔로워에게만. 업무 삭제는 휴지통(`project_trash`, 마이그레이션 010) — 삭제 직전 스냅샷 3개월 보관, 관리자만 보기·복구(`/project/trash`). 마감 알림(`reminders.py` 데몬 스레드, 영업일 09시, D-1/당일/지연, `task_reminders` 로 중복 방지, `PROJECT_REMINDER_*` env) — 마이그레이션 008. 라우터 핸들러는 동기 DB 라 `def` 로 둔다(`async def` 금지). 말풍선은 전부 아사나식 공용 말풍선(`.pj-hovertip`) — 새 기능도 `title=`/`data-tip=` 만 달고 별도 툴팁 구현 금지. 멤버 배정 후보는 `project` 권한 보유 등록 사용자에서 자동 목록(`GET /project/api/assignable-users`). 업무 배정·완료 시 관리자에게 메일(`app/mail.py` stdlib smtplib, `SMTP_*`+`PROJECT_NOTIFY_EMAIL` env, 미설정 시 조용히 skip, `BackgroundTasks` 비동기). 상세는 `docs/PROJECT_MODULE.md` +- 프로젝트 관리 (`app/modules/project/`, `project_db`) — 아사나식. 프로젝트/서브프로젝트(self-FK `parent_id`, CASCADE)·작업(`tasks`: 담당자·우선순위·시작/마감)·진행단계(`project_stages` 칸반, 생성시 기본 4단계 seed, 섹션 기본 담당자 `default_assignee_email` — 담당자 빈 작업을 그 섹션에 만들거나 옮기면 자동 배정, 마이그레이션 009)·멤버 배정(`project_members`)·활동이력(`project_activity`). 첫 화면(`/project/`)은 **내 작업 목록**(프로젝트 홈 카드 화면은 폐지). 프로젝트 화면은 캘린더(FullCalendar)/타임라인(vis-timeline)/보드/목록/대시보드 뷰 토글. 좌측 사이드바는 수신함·내 작업·휴지통·프로젝트 화면 공용(`templates/project/_side.html` + 프로젝트 목록 동작 `initSideTree`, 새 프로젝트/수정 모달 `_side_modals.html`) — 프로젝트 목록(순서 변경·✎·×)은 어느 화면에서나 같다. 보드는 아사나처럼 섹션이 가로로 계속 늘어나고(넘치면 가로 스크롤) 카드의 담당자·마감일을 클릭해 그 자리에서 바꾼다. 좌측 사이드바에 수신함·내 작업(접이식) 메뉴. 설명란은 주소 붙여넣기 시 자동 링크, 설명란·댓글에서 @로 멤버를 태그하면 (`task_mentions`, 마이그레이션 006) 수신함에 그 작업이 쌓인다. 진입 권한키 `project`(관리자 페이지 토글로 직원별 부여, admin 자동). 프로젝트 생성은 `project` 권한자 누구나(만든 사람이 owner), 삭제는 만든 사람만(슈퍼관리자 예외), 사용자 배정은 `is_admin` 만. 배정 멤버(또는 owner/admin)만 그 프로젝트를 조회(화면·API 모두, 비멤버 403)하고 서브프로젝트/작업/단계 CRUD — URL 의 섹션·부모 작업이 그 프로젝트 것인지 서버가 검증. 실시간 반영은 `project_live_version` 카운터(마이그레이션 007, 미적용 시 MAX 폴백). 사이드바 전체 검색(`/api/search`, 제목·설명·댓글, pg_trgm) + 프로젝트/내 작업 필터 바(찾기·상태·담당자·마감·우선순위·정렬, 클라이언트 필터). 협업자(`task_followers`, 자동 팔로우: 만든 사람·담당자·댓글·@태그) — 완료·댓글 알림은 담당자+협업자에게만. 작업 삭제는 휴지통(`project_trash`, 마이그레이션 010) — 삭제 직전 스냅샷 3개월 보관, 관리자만 보기·복구(`/project/trash`). 마감 알림(`reminders.py` 데몬 스레드, 영업일 09시, D-1/당일/지연, `task_reminders` 로 중복 방지, `PROJECT_REMINDER_*` env) — 마이그레이션 008. 라우터 핸들러는 동기 DB 라 `def` 로 둔다(`async def` 금지). 말풍선은 전부 아사나식 공용 말풍선(`.pj-hovertip`) — 새 기능도 `title=`/`data-tip=` 만 달고 별도 툴팁 구현 금지. 멤버 배정 후보는 `project` 권한 보유 등록 사용자에서 자동 목록(`GET /project/api/assignable-users`). 작업 배정·완료 시 관리자에게 메일(`app/mail.py` stdlib smtplib, `SMTP_*`+`PROJECT_NOTIFY_EMAIL` env, 미설정 시 조용히 skip, `BackgroundTasks` 비동기). 상세는 `docs/PROJECT_MODULE.md` 상세는 `docs/PROJECT_OVERVIEW.md`. diff --git a/app/modules/project/db.py b/app/modules/project/db.py index 96eadb9..46ba23a 100644 --- a/app/modules/project/db.py +++ b/app/modules/project/db.py @@ -280,7 +280,7 @@ class ProjectStore: ) -> dict[str, Any]: nm = store.norm_str(name) if not nm: - raise ValueError("세션 이름은 필수입니다.") + raise ValueError("섹션 이름은 필수입니다.") col = store.validate_stage_color(color) dae = store.norm_str(default_assignee_email or "", lower=True) with self._pool.connection() as conn: @@ -352,13 +352,13 @@ class ProjectStore: try: sid = int(stage_id) except (TypeError, ValueError): - raise ValueError("세션 값이 올바르지 않습니다.") + raise ValueError("섹션 값이 올바르지 않습니다.") row = conn.execute( "SELECT 1 FROM project_stages WHERE id = %s AND project_id = %s", (sid, project_id), ).fetchone() if not row: - raise ValueError("이 프로젝트의 세션이 아닙니다.") + raise ValueError("이 프로젝트의 섹션이 아닙니다.") return sid def stage_in_project(self, *, stage_id: Any, project_id: int) -> int | None: @@ -609,12 +609,12 @@ class ProjectStore: "SELECT project_id FROM tasks WHERE id = %s", (parent_task_id,) ).fetchone() if not parent: - raise KeyError(f"상위 업무를 찾을 수 없습니다: {parent_task_id}") + raise KeyError(f"상위 작업을 찾을 수 없습니다: {parent_task_id}") # 권한은 URL 의 project_id 로 검사했으므로, 부모가 다른 프로젝트 # 업무면 거부한다(예전엔 부모 프로젝트로 조용히 바꿔 권한 없는 # 프로젝트에 하위 업무를 만들 수 있었다). if int(parent["project_id"]) != int(project_id): - raise ValueError("상위 업무가 이 프로젝트에 속하지 않습니다.") + raise ValueError("상위 작업이 이 프로젝트에 속하지 않습니다.") stage_id = None elif stage_id not in (None, ""): stage_id = self._check_stage_in_project(conn, stage_id, project_id) @@ -674,19 +674,19 @@ class ProjectStore: (task_id,), ).fetchone() if not sub: - raise KeyError(f"업무를 찾을 수 없습니다: {task_id}") + raise KeyError(f"작업을 찾을 수 없습니다: {task_id}") if sub["parent_task_id"] is None: - raise ValueError("하위 업무만 다른 업무로 옮길 수 있습니다.") + raise ValueError("하위 작업만 다른 작업으로 옮길 수 있습니다.") parent = conn.execute( "SELECT id, project_id, parent_task_id, title FROM tasks WHERE id = %s", (parent_task_id,), ).fetchone() if not parent: - raise KeyError(f"상위 업무를 찾을 수 없습니다: {parent_task_id}") + raise KeyError(f"상위 작업을 찾을 수 없습니다: {parent_task_id}") if parent["parent_task_id"] is not None: - raise ValueError("하위 업무 안으로는 옮길 수 없습니다.") + raise ValueError("하위 작업 안으로는 옮길 수 없습니다.") if int(parent["project_id"]) != int(sub["project_id"]): - raise ValueError("다른 프로젝트의 업무로는 옮길 수 없습니다.") + raise ValueError("다른 프로젝트의 작업으로는 옮길 수 없습니다.") if int(parent["id"]) != int(sub["parent_task_id"]): nxt = conn.execute( "SELECT COALESCE(MAX(sort_order), -1) + 1 AS n FROM tasks " @@ -959,23 +959,23 @@ class ProjectStore: payload = tr["payload"] or {} tasks = list(payload.get("tasks") or []) if not tasks: - raise ValueError("복구할 업무 데이터가 없습니다.") + raise ValueError("복구할 작업 데이터가 없습니다.") ids = [int(t["id"]) for t in tasks] clash = conn.execute( "SELECT id FROM tasks WHERE id = ANY(%s) LIMIT 1", (ids,) ).fetchone() if clash: - raise ValueError(f"이미 같은 업무(id {clash['id']})가 있어 복구할 수 없습니다.") + raise ValueError(f"이미 같은 작업(id {clash['id']})이 있어 복구할 수 없습니다.") project_ids = {int(r["id"]) for r in conn.execute("SELECT id FROM projects").fetchall()} stage_ids = {int(r["id"]) for r in conn.execute("SELECT id FROM project_stages").fetchall()} root = next((t for t in tasks if int(t["id"]) == int(tr["task_id"])), tasks[0]) if int(root["project_id"]) not in project_ids: - raise ValueError("업무가 속했던 프로젝트가 삭제되어 복구할 수 없습니다.") + raise ValueError("작업이 속했던 프로젝트가 삭제되어 복구할 수 없습니다.") parent = root.get("parent_task_id") if parent and int(parent) not in ids: ok = conn.execute("SELECT 1 FROM tasks WHERE id = %s", (int(parent),)).fetchone() if not ok: - raise ValueError("상위 업무가 없어 복구할 수 없습니다 — 상위 업무를 먼저 복구하세요.") + raise ValueError("상위 작업이 없어 복구할 수 없습니다 — 상위 작업을 먼저 복구하세요.") for t in tasks: if t.get("stage_id") is not None and int(t["stage_id"]) not in stage_ids: t["stage_id"] = None diff --git a/app/modules/project/router.py b/app/modules/project/router.py index e00b662..9022580 100644 --- a/app/modules/project/router.py +++ b/app/modules/project/router.py @@ -576,8 +576,8 @@ def my_tasks_page(request: Request) -> HTMLResponse: "user": user, "is_admin": admin, "nav_items": build_erp_nav(user, active="project"), - "page_title": "내 업무", - "page_subtitle": "내가 담당자인 업무를 한 곳에서 봅니다.", + "page_title": "내 작업", + "page_subtitle": "내가 담당자인 작업을 한 곳에서 봅니다.", "force_sidebar_collapsed": True, "nav_projects": nav_projects, "my_tasks": my_tasks, @@ -634,10 +634,10 @@ def task_permalink(request: Request, task_id: int): task = st.get_task(task_id=task_id) if task is None: - return _denied("업무를 찾을 수 없습니다. 삭제되었을 수 있습니다.", 404) + return _denied("작업을 찾을 수 없습니다. 삭제되었을 수 있습니다.", 404) if not _can_manage(request, st, user, task["project_id"]): return _denied( - "이 업무가 속한 프로젝트의 멤버만 볼 수 있습니다. " + "이 작업이 속한 프로젝트의 멤버만 볼 수 있습니다. " "프로젝트 관리자에게 멤버 배정을 요청하세요.", 403, ) @@ -1080,7 +1080,7 @@ def api_add_stage( _STAGE_ASSIGNEE_MIGRATION_MSG = ( - "세션 기본 담당자 기능이 아직 준비되지 않았습니다(DB 마이그레이션 009 필요)." + "섹션 기본 담당자 기능이 아직 준비되지 않았습니다(DB 마이그레이션 009 필요)." ) @@ -1105,7 +1105,7 @@ def _stage_of_project(st: Any, stage_id: int, project_id: int) -> dict[str, Any] 하므로, 이걸 안 보면 아무 프로젝트 멤버나 남의 세션을 고칠 수 있다.""" stage = st.get_stage(stage_id=stage_id) if stage is None or stage["project_id"] != project_id: - raise HTTPException(status_code=404, detail="세션을 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="섹션을 찾을 수 없습니다.") return stage @@ -1124,7 +1124,7 @@ def api_delete_stage( try: st.delete_stage(stage_id=stage_id) except KeyError: - raise HTTPException(status_code=404, detail="세션을 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="섹션을 찾을 수 없습니다.") return JSONResponse({"ok": True}) @@ -1219,7 +1219,7 @@ def api_create_task( ), body=( f"프로젝트: {project['name']}\n" - f"업무: {task['title']}\n" + f"작업: {task['title']}\n" f"담당자: {task.get('assignee_name') or task['assignee_email']} " f"({task['assignee_email']})\n" f"마감일: {task.get('due_date') or '-'}\n" @@ -1229,7 +1229,7 @@ def api_create_task( _inbox( st, recipients=[task["assignee_email"]], actor=user["email"], project_id=project_id, task_id=task["id"], ntype="assigned", - title=f"업무 배정: {task['title']}", + title=f"작업 배정: {task['title']}", body=f"{project['name']} · 마감 {task.get('due_date') or '-'}", ) _record_mentions( @@ -1251,7 +1251,7 @@ def api_update_task( st = _db_or_503(request) existing = st.get_task(task_id=task_id) if existing is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, existing["project_id"]) if "description" in payload: payload["description"] = store.sanitize_description_html(payload["description"]) @@ -1260,7 +1260,7 @@ def api_update_task( except ValueError as exc: raise HTTPException(status_code=400, detail=str(exc)) except KeyError: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") project_name = task.get("project_name") or "" project = st.get_project(project_id=existing["project_id"]) or {"id": existing["project_id"], "name": project_name} @@ -1275,7 +1275,7 @@ def api_update_task( ), body=( f"프로젝트: {project_name}\n" - f"업무: {task['title']}\n" + f"작업: {task['title']}\n" f"담당자: {task.get('assignee_name') or task['_newly_assigned']} " f"({task['_newly_assigned']})\n" f"마감일: {task.get('due_date') or '-'}\n" @@ -1285,7 +1285,7 @@ def api_update_task( _inbox( st, recipients=[task["_newly_assigned"]], actor=user["email"], project_id=existing["project_id"], task_id=task_id, ntype="assigned", - title=f"업무 배정: {task['title']}", + title=f"작업 배정: {task['title']}", body=f"{project_name} · 마감 {task.get('due_date') or '-'}", ) if task.get("_newly_completed"): @@ -1296,7 +1296,7 @@ def api_update_task( ), body=( f"프로젝트: {project_name}\n" - f"완료된 업무: {task['title']}\n" + f"완료된 작업: {task['title']}\n" f"담당자: {task.get('assignee_name') or task.get('assignee_email') or '-'}\n" f"완료 처리: {user['email']}\n" ), @@ -1304,7 +1304,7 @@ def api_update_task( _inbox( st, recipients=_task_recipients(st, project, task, exclude=user["email"]), actor=user["email"], project_id=existing["project_id"], task_id=task_id, - ntype="completed", title=f"업무 완료: {task['title']}", body=project_name, + ntype="completed", title=f"작업 완료: {task['title']}", body=project_name, ) if "description" in payload: _record_mentions( @@ -1321,13 +1321,13 @@ def api_delete_task(request: Request, task_id: int) -> JSONResponse: st = _db_or_503(request) existing = st.get_task(task_id=task_id) if existing is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") if not _can_delete(user, existing.get("created_by")): raise HTTPException(status_code=403, detail=_DELETE_DENIED) try: removed_task_ids, trash_id = st.delete_task(task_id=task_id, deleted_by=user["email"]) except KeyError: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") # 휴지통(010)이 있으면 첨부 폴더도 휴지통으로(복구 대비), 없으면 예전처럼 삭제. if trash_id is not None: _move_task_dirs_to_trash(request, removed_task_ids, trash_id) @@ -1344,7 +1344,7 @@ def api_get_task(request: Request, task_id: int) -> JSONResponse: st = _db_or_503(request) task = st.get_task(task_id=task_id) if task is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, task["project_id"]) # 하위 업무를 팝업으로 열면 제목 위에 상위 업무 경로를 보여준다(아사나식). if task.get("parent_task_id"): @@ -1373,7 +1373,7 @@ def api_move_subtask( st = _db_or_503(request) existing = st.get_task(task_id=task_id) if existing is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, existing["project_id"]) try: parent_id = int(payload.get("parent_task_id")) @@ -1394,7 +1394,7 @@ def api_move_subtask( def _task_for_followers(request: Request, st: Any, user: dict[str, Any], task_id: int) -> dict[str, Any]: task = st.get_task(task_id=task_id) if task is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, task["project_id"]) return task @@ -1403,7 +1403,7 @@ def _followers_response(st: Any, task_id: int) -> JSONResponse: try: return JSONResponse({"followers": st.list_followers(task_id=task_id)}) except Exception: # noqa: BLE001 - raise HTTPException(status_code=503, detail="팔로워 기능은 project_db_008 마이그레이션 후 사용할 수 있습니다.") + raise HTTPException(status_code=503, detail="협업자 기능은 project_db_008 마이그레이션 후 사용할 수 있습니다.") @router.get("/api/tasks/{task_id}/followers") @@ -1434,11 +1434,11 @@ def api_add_follower( project_id=task["project_id"], user_email=email ) if not allowed: - raise HTTPException(status_code=400, detail="이 프로젝트 멤버만 팔로워로 추가할 수 있습니다.") + raise HTTPException(status_code=400, detail="이 프로젝트 멤버만 협업자로 추가할 수 있습니다.") try: st.add_followers(task_id=task_id, emails=[email]) except Exception: # noqa: BLE001 - raise HTTPException(status_code=503, detail="팔로워 기능은 project_db_008 마이그레이션 후 사용할 수 있습니다.") + raise HTTPException(status_code=503, detail="협업자 기능은 project_db_008 마이그레이션 후 사용할 수 있습니다.") return _followers_response(st, task_id) @@ -1450,7 +1450,7 @@ def api_remove_follower(request: Request, task_id: int, email: str) -> JSONRespo try: st.remove_follower(task_id=task_id, user_email=email) except Exception: # noqa: BLE001 - raise HTTPException(status_code=503, detail="팔로워 기능은 project_db_008 마이그레이션 후 사용할 수 있습니다.") + raise HTTPException(status_code=503, detail="협업자 기능은 project_db_008 마이그레이션 후 사용할 수 있습니다.") return _followers_response(st, task_id) @@ -1524,13 +1524,13 @@ def api_add_task_link( st = _db_or_503(request) task = st.get_task(task_id=task_id) if task is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") try: target_project_id = int(payload.get("project_id")) except (TypeError, ValueError): raise HTTPException(status_code=400, detail="project_id 가 필요합니다.") if target_project_id == task["project_id"]: - raise HTTPException(status_code=400, detail="이미 이 업무의 기본 프로젝트입니다.") + raise HTTPException(status_code=400, detail="이미 이 작업의 기본 프로젝트입니다.") _require_manage(request, st, user, target_project_id) already_linked = any( link["project_id"] == target_project_id for link in st.list_task_links(task_id=task_id) @@ -1556,7 +1556,7 @@ def api_remove_task_link(request: Request, task_id: int, project_id: int) -> JSO st = _db_or_503(request) task = st.get_task(task_id=task_id) if task is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, task["project_id"]) _require_manage(request, st, user, project_id) st.remove_task_link(task_id=task_id, project_id=project_id) @@ -1580,7 +1580,7 @@ def api_list_comments(request: Request, task_id: int) -> JSONResponse: st = _db_or_503(request) task = st.get_task(task_id=task_id) if task is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, task["project_id"]) return JSONResponse({"comments": st.list_comments(task_id=task_id)}) @@ -1593,7 +1593,7 @@ def api_add_comment( st = _db_or_503(request) task = st.get_task(task_id=task_id) if task is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, task["project_id"]) try: comment = st.add_comment( @@ -1684,7 +1684,7 @@ def api_list_attachments(request: Request, task_id: int) -> JSONResponse: st = _db_or_503(request) task = st.get_task(task_id=task_id) if task is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, task["project_id"]) return JSONResponse({"attachments": st.list_attachments(task_id=task_id)}) @@ -1700,7 +1700,7 @@ def api_upload_attachment( st = _db_or_503(request) task = st.get_task(task_id=task_id) if task is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, task["project_id"]) if comment_id is not None: comment = st.get_comment(comment_id=comment_id) @@ -1735,10 +1735,10 @@ def api_download_attachment(request: Request, attachment_id: int): st = _db_or_503(request) att = st.get_attachment(attachment_id=attachment_id) if att is None: - raise HTTPException(status_code=404, detail="첨부를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="첨부 파일을 찾을 수 없습니다.") task = st.get_task(task_id=att["task_id"]) if task is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, task["project_id"]) path = _attach_dir(request, att["task_id"]) / att["stored_name"] if not path.exists(): @@ -1760,10 +1760,10 @@ def api_inline_attachment(request: Request, attachment_id: int): st = _db_or_503(request) att = st.get_attachment(attachment_id=attachment_id) if att is None: - raise HTTPException(status_code=404, detail="첨부를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="첨부 파일을 찾을 수 없습니다.") task = st.get_task(task_id=att["task_id"]) if task is None: - raise HTTPException(status_code=404, detail="업무를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="작업을 찾을 수 없습니다.") _require_manage(request, st, user, task["project_id"]) path = _attach_dir(request, att["task_id"]) / att["stored_name"] if not path.exists(): @@ -1786,7 +1786,7 @@ def api_delete_attachment(request: Request, attachment_id: int) -> JSONResponse: st = _db_or_503(request) att = st.get_attachment(attachment_id=attachment_id) if att is None: - raise HTTPException(status_code=404, detail="첨부를 찾을 수 없습니다.") + raise HTTPException(status_code=404, detail="첨부 파일을 찾을 수 없습니다.") task = st.get_task(task_id=att["task_id"]) if task is not None: _require_manage(request, st, user, task["project_id"]) @@ -1975,7 +1975,7 @@ def trash_page(request: Request) -> HTMLResponse: "my_open_total": st.count_my_open(assignee_email=user["email"]), "mention_unread": _safe_mention_unread(st, user["email"]), "page_title": "휴지통", - "page_subtitle": "삭제한 업무 — 3개월 보관, 관리자만 복구", + "page_subtitle": "삭제한 작업 — 3개월 보관, 관리자만 복구", "force_sidebar_collapsed": True, "color_palette": list(store.COLOR_PALETTE), "trash_enabled": enabled, @@ -2046,7 +2046,7 @@ def inbox_page(request: Request) -> HTMLResponse: "nav_projects": nav_projects, "my_open_total": my_open_total, "page_title": "수신함", - "page_subtitle": "나를 태그한 업무와 프로젝트 알림", + "page_subtitle": "나를 태그한 작업과 프로젝트 알림", "force_sidebar_collapsed": True, "color_palette": list(store.COLOR_PALETTE), "notifications": items, diff --git a/app/modules/project/store.py b/app/modules/project/store.py index c5cbe1b..547db5c 100644 --- a/app/modules/project/store.py +++ b/app/modules/project/store.py @@ -178,9 +178,9 @@ def validate_project_name(name: Any) -> str: def validate_task_title(title: Any) -> str: v = norm_str(title) if not v: - raise ValueError("업무 제목은 필수입니다.") + raise ValueError("작업 제목은 필수입니다.") if len(v) > 300: - raise ValueError("업무 제목이 너무 깁니다(300자 이내).") + raise ValueError("작업 제목이 너무 깁니다(300자 이내).") return v @@ -235,11 +235,11 @@ def validate_time(t: Any) -> str | None: def build_subject_assigned(*, project_name: str, task_title: str, assignee: str) -> str: - return f"[DBX 프로젝트] 업무 배정: {project_name} · {task_title} → {assignee}" + return f"[DBX 프로젝트] 작업 배정: {project_name} · {task_title} → {assignee}" def build_subject_completed(*, project_name: str, task_title: str) -> str: - return f"[DBX 프로젝트] 업무 완료: {project_name} · {task_title}" + return f"[DBX 프로젝트] 작업 완료: {project_name} · {task_title}" def build_subject_project_done(*, project_name: str) -> str: diff --git a/app/modules/project/templates/project/_member_tasks_modal.html b/app/modules/project/templates/project/_member_tasks_modal.html index 8b76623..7611134 100644 --- a/app/modules/project/templates/project/_member_tasks_modal.html +++ b/app/modules/project/templates/project/_member_tasks_modal.html @@ -2,12 +2,12 @@ project.js initMemberTasks() 가 배선. project/mytasks/inbox 공용. #}
더블클릭하면 업무 편집 창이 열립니다.
+더블클릭하면 작업 편집 창이 열립니다.