feat(project): meeting board button opens a blank Google Slides deck
A "회의록 보드" button next to attendees opens the week's Google Slides deck in its own window. The deck is found (Drive appProperties) or created in the shared drive MEETING_BOARD_FOLDER_ID as one BLANK slide, named like "10월 2주차 (10/5~10/11)". Needs a token with Drive and Slides scopes; the authorize script now requests them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3268,6 +3268,29 @@ def api_update_meeting(request: Request, week_start: str, payload: dict[str, Any
|
||||
return JSONResponse(out)
|
||||
|
||||
|
||||
def meeting_board_title(ws: date) -> str:
|
||||
"""회의록 보드 파일 이름 — 그 주차의 월 + 주차 + 기간. 예: 10월 2주차 (10/5~10/11)."""
|
||||
a, b = store.week_period(ws)
|
||||
return f"{a.month}월 {store.week_number(a)}주차 ({a.month}/{a.day}~{b.month}/{b.day})"
|
||||
|
||||
|
||||
@router.post("/api/goals/meetings/{week_start}/board")
|
||||
def api_open_meeting_board(request: Request, week_start: str) -> JSONResponse:
|
||||
"""회의록 보드 — 그 주차의 빈 Google 슬라이드(공유 드라이브 MEETING_BOARD_FOLDER_ID)를 찾거나 만들어 주소를 돌려준다.
|
||||
회의록을 볼 수 있는 사람 누구나(빈 슬라이드 하나라 관리자 전용으로 막지 않음). 같은 주차는 늘 같은 파일."""
|
||||
from app.integrations.google_slides import GoogleSlidesError, board_folder_id, get_client # noqa: WPS433
|
||||
|
||||
_require_user(request)
|
||||
ws = _goal_call(store.validate_period_start, week_start)
|
||||
title = meeting_board_title(ws)
|
||||
try:
|
||||
board = get_client().open_week_board(folder_id=board_folder_id(), week_key=ws.isoformat(), title=title)
|
||||
except GoogleSlidesError as exc:
|
||||
logger.warning("meeting board unavailable: %s", exc) # 사유 문구만(비밀값 없음)
|
||||
raise HTTPException(status_code=503, detail=str(exc))
|
||||
return JSONResponse({"ok": True, "url": board["url"], "created": board["created"], "title": title})
|
||||
|
||||
|
||||
@router.delete("/api/goals/meetings/{week_start}")
|
||||
def api_delete_meeting(request: Request, week_start: str) -> JSONResponse:
|
||||
_require_admin(request)
|
||||
|
||||
Reference in New Issue
Block a user