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:
2026-10-07 12:04:09 +09:00
parent 15e84ba5bc
commit c9d5e6e017
18 changed files with 427 additions and 13 deletions
+23
View File
@@ -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)
@@ -1,7 +1,7 @@
{% extends "project/_meeting_content_base.html" if meeting_embedded else "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261007b" />
<link rel="stylesheet" href="/static/project.css?v=20261007c" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -162,6 +162,10 @@
{% if edit %}<button type="button" class="pj-meet-attend-add" id="pj-meet-attend-add"><span class="material-symbols-outlined">person_add</span>참석자</button>
{% elif not attendee_list %}<span class="pj-muted">—</span>{% endif %}
</div>
{# 회의록 보드 — 그 주차의 빈 Google 슬라이드를 독립 창으로(없으면 공유 드라이브에 만든다, project.js initMeetBoard) #}
<button type="button" class="pj-btn pj-btn-sm pj-meet-board-btn" id="pj-meet-board"
title="이 주차의 Google 슬라이드 보드를 새 창으로 엽니다(처음이면 공유 드라이브에 빈 슬라이드를 만듭니다)">
<span class="material-symbols-outlined">co_present</span>회의록 보드</button>
</div>
{# ── 구역별 줄 — 왼쪽: 이번주 / 오른쪽: 전주 리뷰(지난 회의록 같은 줄) ── #}
@@ -263,5 +267,5 @@
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
<script src="/static/project-meeting-cells.js?v=20261007a" defer></script>
<script src="/static/project.js?v=20261007c" defer></script>
<script src="/static/project.js?v=20261007d" defer></script>
{% endblock %}
@@ -207,5 +207,5 @@
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
<script src="/static/project.js?v=20261007c" defer></script>
<script src="/static/project.js?v=20261007d" defer></script>
{% endblock %}
@@ -614,6 +614,7 @@
<li>줄별 <b>정량 목표</b>에 각 항목의 이번 주차 목표를 적습니다. 금액(원 단위)뿐 아니라 <code>20개</code>처럼 글도 됩니다. 전체 매출 목표는 연간 목표 표의 주차별 목표에서 정합니다.</li>
<li>각 항목의 <b>주요 업무</b>에 실행할 일과 일정을 적습니다.</li>
<li><span class="pjh-ui">참석자</span>를 눌러 프로젝트 관리 권한이 있는 등록 직원 중 선택합니다. 찾기·전원 선택·모두 해제를 사용할 수 있으며, 칩의 <span class="pjh-ui">×</span>로 참석자를 뺍니다.</li>
<li>참석자 오른쪽 <span class="pjh-ui">회의록 보드</span>를 누르면 그 주차의 Google 슬라이드가 새 창으로 열립니다. 처음 누르면 회의록 보드 공유 드라이브에 빈 슬라이드(제목 틀 없음)를 <b>"10월 2주차 (10/5~10/11)"</b> 같은 이름으로 만들고, 다음부터는 같은 파일을 엽니다. 직원 누구나 열 수 있으며, 슬라이드 편집 권한은 공유 드라이브 권한을 따릅니다. 창이 안 뜨면 브라우저의 팝업 허용을 확인하세요.</li>
<li>위쪽 오른쪽 <b>결정 사항 · 메모</b>에 회의 결론과 다음주까지 확인할 일을 적습니다.</li>
</ol>
<p>금액은 <code>1,200,000</code>·<code>120만</code>·<code>1.5억</code>·<code>3천만</code>·<code>1억2천만</code>처럼 입력할 수 있습니다. <kbd>Enter</kbd> 또는 칸을 떠날 때 원 단위로 저장되고, 빈칸은 값을 지웁니다. 숫자로 읽히지 않는 값(예: <code>20개</code>)은 적은 글 그대로 저장됩니다. 글·메모는 입력을 약 0.8초 멈추거나 칸을 떠날 때, 참석자는 바꾸는 즉시 저장됩니다.</p>
@@ -104,5 +104,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261007c" defer></script>
<script src="/static/project.js?v=20261007d" defer></script>
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20261007c" defer></script>
<script src="/static/project.js?v=20261007d" defer></script>
{% endblock %}
@@ -492,5 +492,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20261007c" defer></script>
<script src="/static/project.js?v=20261007d" defer></script>
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261007c" defer></script>
<script src="/static/project.js?v=20261007d" defer></script>
{% endblock %}