From b89a54feb6d4864072d543c33e4edf3ca4dfdc81 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Tue, 1 Sep 2026 17:36:05 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9E=91=EC=97=85=EB=B3=B8=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=EC=9D=98=20=EC=A2=85=EB=A5=98=20=ED=95=84=ED=84=B0?= =?UTF-8?q?=EC=97=90=20=EA=B0=9C=EB=85=90=EC=9D=84=20=EB=84=A3=EA=B3=A0=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=EC=9D=84=20=EB=A7=9E=EC=B6=98=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 필터가 종류를 손으로 나열하고 있어 개념이 통째로 빠져 있었다 — 개념 작업본은 만들 수는 있는데 걸러 볼 수가 없었다. 이름도 영문(`Case`, `Question`)이라 같은 화면 안의 배지와 어긋났고, 같은 문서가 한 화면에서 두 이름으로 보였다. `Record` 에서 뽑아 종류가 늘면 컴파일러가 빈 자리를 잡게 한다. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ --- .../studio/components/document-list.tsx | 35 ++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/features/tech-log/presentation/studio/components/document-list.tsx b/src/features/tech-log/presentation/studio/components/document-list.tsx index c233541..22c29d3 100644 --- a/src/features/tech-log/presentation/studio/components/document-list.tsx +++ b/src/features/tech-log/presentation/studio/components/document-list.tsx @@ -2,12 +2,33 @@ import { useEffect, useState, type FormEvent } from "react"; import type { ListDocumentsQuery } from "../../../application/ports/studio-gateway.ts"; import type { DocumentPage } from "../../../contracts/studio/contract.ts"; +import type { components } from "../../../contracts/studio/generated.ts"; import { managementFailureMessage } from "../../../application/ports/management-gateway-error.ts"; import { useStudio } from "../use-studio.ts"; import { GuardedStudioLink } from "./guarded-studio-link.tsx"; import { StudioPagination } from "./studio-pagination.tsx"; import { DOCUMENT_KIND_LABELS } from "../../shared/document-kind-labels.ts"; +type RecordKind = components["schemas"]["RecordKind"]; + +/* + 작업본 목록이 거를 수 있는 종류. 손으로 나열하지 않고 `Record` 에서 뽑는다 — + 종류가 늘면 컴파일러가 빈 자리를 잡는다. +*/ +const STUDIO_KIND_ORDER: Record = { + CASE: 1, + CONCEPT: 2, + REFERENCE: 3, + QUESTION: 4, + PROJECT_DECISION: 5, +}; + +const STUDIO_KINDS: ReadonlyArray = Object.freeze( + (Object.keys(STUDIO_KIND_ORDER) as RecordKind[]).sort( + (left, right) => STUDIO_KIND_ORDER[left] - STUDIO_KIND_ORDER[right], + ), +); + const publicationLabel = { NEVER_PUBLISHED: "게시 전", PUBLISHED: "게시 중", @@ -193,10 +214,16 @@ export function DocumentList() { } > - - - - + {/* + 이름은 공용 표에서 가져온다. 여기 손으로 적어 두었을 때 개념이 통째로 빠져 있었고 + — 개념 작업본은 만들 수는 있는데 걸러 볼 수가 없었다 — 이름도 영문이라 목록 안의 + 배지와 어긋났다. 같은 문서가 한 화면에서 두 이름으로 보였다. + */} + {STUDIO_KINDS.map((value) => ( + + ))}