@things-factory/worklist 10.1.256 → 10.1.257
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/activity-state-counts.d.ts +3 -3
- package/dist-client/activity-state-counts.js +6 -5
- package/dist-client/activity-state-counts.js.map +1 -1
- package/dist-client/chip-counts.d.ts +1 -1
- package/dist-client/chip-counts.js +1 -1
- package/dist-client/chip-counts.js.map +1 -1
- package/dist-client/chip-filters.d.ts +3 -2
- package/dist-client/chip-filters.js +5 -3
- package/dist-client/chip-filters.js.map +1 -1
- package/dist-client/components/activity-/bowner-view.js +26 -40
- package/dist-client/components/activity-/bowner-view.js.map +1 -1
- package/dist-client/components/activity-instance-preview.js +37 -49
- package/dist-client/components/activity-instance-preview.js.map +1 -1
- package/dist-client/components/activity-intro-view.js +26 -40
- package/dist-client/components/activity-intro-view.js.map +1 -1
- package/dist-client/components/activity-reporter-view.js +26 -40
- package/dist-client/components/activity-reporter-view.js.map +1 -1
- package/dist-client/components/activity-starter-form.d.ts +2 -3
- package/dist-client/components/activity-starter-form.js +52 -64
- package/dist-client/components/activity-starter-form.js.map +1 -1
- package/dist-client/components/mutation-outcome.d.ts +6 -0
- package/dist-client/components/mutation-outcome.js +9 -0
- package/dist-client/components/mutation-outcome.js.map +1 -1
- package/dist-client/components/say-outcome.d.ts +3 -0
- package/dist-client/components/say-outcome.js +3 -0
- package/dist-client/components/say-outcome.js.map +1 -1
- package/dist-client/entity360/person-open-work-section.d.ts +2 -3
- package/dist-client/entity360/person-open-work-section.js +17 -31
- package/dist-client/entity360/person-open-work-section.js.map +1 -1
- package/dist-client/pages/activity/activity-list-page.d.ts +4 -2
- package/dist-client/pages/activity/activity-list-page.js +6 -11
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-page.d.ts +13 -7
- package/dist-client/pages/activity/activity-page.js +111 -167
- package/dist-client/pages/activity/activity-page.js.map +1 -1
- package/dist-client/pages/activity-approval/activity-approval-page.d.ts +14 -8
- package/dist-client/pages/activity-approval/activity-approval-page.js +107 -123
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/pages/activity-catalog/activity-catalog-page.d.ts +10 -9
- package/dist-client/pages/activity-catalog/activity-catalog-page.js +38 -70
- package/dist-client/pages/activity-catalog/activity-catalog-page.js.map +1 -1
- package/dist-client/pages/activity-catalog/activity-detail-page.d.ts +6 -6
- package/dist-client/pages/activity-catalog/activity-detail-page.js +30 -57
- package/dist-client/pages/activity-catalog/activity-detail-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-list-page.js +2 -2
- package/dist-client/pages/activity-instance/activity-instance-list-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-search-page.d.ts +6 -3
- package/dist-client/pages/activity-instance/activity-instance-search-page.js +27 -29
- package/dist-client/pages/activity-instance/activity-instance-search-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-start-page.d.ts +15 -8
- package/dist-client/pages/activity-instance/activity-instance-start-page.js +130 -239
- package/dist-client/pages/activity-instance/activity-instance-start-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-view.d.ts +2 -2
- package/dist-client/pages/activity-instance/activity-instance-view.js +109 -118
- package/dist-client/pages/activity-instance/activity-instance-view.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.d.ts +15 -6
- package/dist-client/pages/activity-thread/activity-thread-page.js +128 -131
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-view-page.d.ts +6 -6
- package/dist-client/pages/activity-thread/activity-thread-view-page.js +28 -53
- package/dist-client/pages/activity-thread/activity-thread-view-page.js.map +1 -1
- package/dist-client/pages/todo/approval-done-list-page.d.ts +3 -3
- package/dist-client/pages/todo/approval-done-list-page.js +5 -14
- package/dist-client/pages/todo/approval-done-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-pending-list-page.d.ts +19 -9
- package/dist-client/pages/todo/approval-pending-list-page.js +46 -59
- package/dist-client/pages/todo/approval-pending-list-page.js.map +1 -1
- package/dist-client/pages/todo/draft-list-page.d.ts +8 -2
- package/dist-client/pages/todo/draft-list-page.js +24 -23
- package/dist-client/pages/todo/draft-list-page.js.map +1 -1
- package/dist-client/pages/todo/pickable-list-page.d.ts +3 -3
- package/dist-client/pages/todo/pickable-list-page.js +5 -14
- package/dist-client/pages/todo/pickable-list-page.js.map +1 -1
- package/dist-client/pages/todo/todo-list-page.d.ts +11 -5
- package/dist-client/pages/todo/todo-list-page.js +33 -36
- package/dist-client/pages/todo/todo-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-approval-page.js","sourceRoot":"","sources":["../../../client/pages/activity-approval/activity-approval-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,sCAAsC,CAAA;AAC7C,OAAO,wDAAwD,CAAA;AAC/D,OAAO,mCAAmC,CAAA;AAC1C,OAAO,6CAA6C,CAAA;AACpD,OAAO,8CAA8C,CAAA;AAErD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAkB,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAA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C,CAAC,CAAC,iCAAiC,CAAC,EAAE,EAAE,CAAC,CACjG,CAAA;QACH,CAAC;IACH,CAAC;;AAxpBQ;IAAR,KAAK,EAAE;;8DAAsB;AAOb;IAAhB,KAAK,EAAE;;oDAAuB;AAWtB;IAAR,KAAK,EAAE;;oDAAe;AAEd;IAAR,KAAK,EAAE;;uDAA0B;AAIzB;IAAR,KAAK,EAAE;;4DAAoB;AACnB;IAAR,KAAK,EAAE;;mDAAW;AAEA;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAgB,mBAAmB;IAErD;;;;;;;;;;;;OAYG;;0DAdkD;AAsb3B;IAAzB,KAAK,CAAC,iBAAiB,CAAC;;2DAAmB;AA5nBjC,oBAAoB;IADhC,aAAa,CAAC,wBAAwB,CAAC;GAC3B,oBAAoB,CAo0BhC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/list-state/ox-page-state.js'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@operato/board/ox-board-viewer.js'\nimport '../../components/activity-approval-ribon.js'\nimport '../../components/activity-thread-timeline.js'\n\nimport gql from 'graphql-tag'\nimport { TemplateResult, css, html, nothing, unsafeCSS } from 'lit'\nimport { DirectiveResult } from 'lit-html/directive.js'\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { client } from '@operato/graphql'\nimport { OxPrompt } from '@operato/popup'\nimport { i18next, localize } from '@operato/i18n'\nimport { ranMutation } from '../../components/say-outcome.js'\nimport { approvalGate } from './approval-gate.js'\nimport { PageView } from '@operato/shell'\nimport { DocumentPageStyles, ScrollbarStyles } from '@operato/styles'\nimport { provider } from '@operato/board/board-provider.js'\nimport { isReferenceStep } from '@things-factory/organization/dist-client'\n\nimport { ActivityFieldsStyles, inputSpecOf, outputSpecOf, renderGiven } from '../../components/activity-fields.js'\nimport { DecisionContentStyles, DecisionKeysFields, renderDecision } from '../../components/decision-content.js'\nimport { decisionSlots, slotOfRole } from '../../components/decision-slots.js'\n\nconst ActivityApprovalFetchResult = `\\\n{ id\n judgment\n comment\n approver { id\n name\n }\n round\n order\n createdAt\n terminatedAt\n activityThread { state\n dueAt\n assignedAt\n assignee { id\n name\n }\n updatedAt\n terminatedAt\n output\n activityApprovals { round\n order\n approver { id name\n }\n judgment\n participation\n comment\n createdAt\n updatedAt\n terminatedAt\n }\n activityThreadHistories { transaction\n reason\n updater { id name\n }\n updatedAt\n state\n output\n }\n activityInstance { id\n name\n description\n state\n activity { id\n label\n labelTKey\n ${DecisionKeysFields}\n model { name\n description\n active\n tag\n inout\n type\n unit\n options\n quantifier\n spec\n hidden\n }\n }\n approvalLine { type\n value\n participation\n notifyAfter\n approver { id\n name\n description\n controlNo\n }\n }\n thumbnail\n input\n output\n viewType\n viewSource\n dueAt\n createdAt\n } \n }\n}`\n\nexport const ActivityThreadStatus = {\n Unassigned: 'unassigned',\n Assigned: 'assigned',\n Started: 'started',\n Delegated: 'delegated',\n Ended: 'ended',\n Aborted: 'aborted'\n}\n\n/** 타임라인이 옆에 서는 폭 — 읽는 단 1080 + 사이 24 + 최소 패널 360 + page 좌우 40. */\nconst BESIDE = '(min-width: 1504px)'\n\n@customElement('activity-approval-page')\nexport class ActivityApprovalPage extends localize(i18next)(PageView) {\n static styles = [\n /* The frame owns the page shell and the reading column (ADR-0060 decision 8). */\n DocumentPageStyles,\n ScrollbarStyles,\n ActivityFieldsStyles,\n DecisionContentStyles,\n css`\n :host {\n color: var(--ui-ink, #17242c);\n font-size: var(--ui-t-body, 13px);\n }\n\n /*\n * 넓을 때만 타임라인이 옆에 선다 — **읽는 단은 줄이지 않는다.**\n *\n * 결재자가 판단에 쓰는 것(결정 · 사유 · 의견)이 왼쪽이고, 참고하는 것(타임라인)이 오른쪽이다.\n * 처음 낸 안은 읽는 단 1080 안에서 둘로 쪼개는 것이었는데, 그러면 결정 카드가 1014 에서\n * 520 으로 줄어든다 — 주된 것을 좁혀 참고용 자리를 만드는 꼴이라 물렀다.\n *\n * 그래서 **읽는 단을 넘는 여분이 한 판만큼 있을 때만** 편다:\n *\n * 1080(읽는 단) + 24(사이) + 360(최소 패널) + 40(page 좌우 여백) = 1504\n *\n * 그 아래에서는 한 단이고 차례가 그대로다 — 결재선 · 결정 · 타임라인 · 의견. 좁은 화면이\n * 기본이고 넓은 화면이 덤이다.\n */\n @media ${unsafeCSS(BESIDE)} {\n .page {\n max-width: none;\n display: grid;\n grid-template-columns: var(--ui-measure, 1080px) minmax(360px, 1fr);\n column-gap: 24px;\n align-items: start;\n }\n\n /*\n * 두 패널의 자리는 문서 차례가 아니라 격자가 정한다. 문서 차례는 좁은 화면 그대로 두어야\n * 하고(결재선 · 결정 · 타임라인 · 의견), 넓은 화면에서만 타임라인이 오른쪽으로 빠진다.\n */\n .main {\n grid-column: 1;\n min-width: 0;\n }\n\n /* 옆에 선 타임라인은 읽는 동안 따라온다 — 결정과 맞대어 보는 값이다. */\n .aside {\n grid-column: 2;\n grid-row: 1 / span 3;\n position: sticky;\n top: 0;\n }\n }\n\n .comment-actions {\n display: flex;\n justify-content: flex-end;\n }\n\n .comment-actions button {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: var(--form-action-height, 32px);\n padding: 0 12px;\n border: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));\n border-radius: var(--ui-r-small, 6px);\n background: transparent;\n color: var(--ui-ink, var(--md-sys-color-on-surface));\n font: inherit;\n font-size: var(--ui-t-body, 13px);\n cursor: pointer;\n }\n\n .comment-actions md-icon {\n font-size: 16px;\n --md-icon-size: 16px;\n }\n\n /* 카드가 담아 주므로 안에 들어오는 화면은 자기 면과 여백을 갖지 않는다. */\n /*\n * 줄어들지 않는다 — 줄어들면 본문이 잘린다.\n *\n * flex 항목인데 크기를 안 정해 두면 기본이 flex: 0 1 auto 다. **1 이 줄어든다는 뜻이다** —\n * 세로가 모자라면 브라우저가 이 칸부터 줄이는데, 여기엔 카드 모서리를 따라 자르려고\n * overflow: hidden 이 걸려 있어서 줄어든 만큼이 **스크롤도 없이 사라진다.**\n *\n * 완료 조회에서 실측했다(1400x620): 칸이 242px 로 줄고 내용은 362px 이라 「업무 내용」 절이\n * 대부분 잘렸고, 잘린 자리 바로 아래에서 타임라인이 시작하니 타임라인이 본문을 덮은 것처럼\n * 보였다. 세로가 넉넉하면 줄일 일이 없어 안 드러난다.\n *\n * 안에 오는 것은 문서다. 높이를 정해 주어야 하는 것은 board 뿐이고 board 는 이 칸을 거치지\n * 않는다(activityContent 참조). 문서는 제 높이로 서고, 모자라면 페이지 전체가 스크롤한다 —\n * :host 의 overflow: auto 가 그 자리다.\n */\n section[hosted] {\n flex: none;\n padding: 0;\n overflow: hidden;\n }\n\n ox-board-viewer {\n width: 100%;\n height: 100%;\n }\n\n activity-thread-timeline {\n margin: var(--spacing-large, 16px);\n }\n\n /*\n * 의견 칸 — 이 화면에서 **결재자가 유일하게 적는 자리**다.\n *\n * 화면 아래에 붙어 있어(sticky) 목록을 내려 읽는 동안에도 보인다. 그 자리를 지키되 모양은\n * 다른 절과 같은 카드로 둔다. 전에는 회색 면(surface-variant)에 다른 테두리라 이 화면에서\n * 혼자 다른 부품처럼 보였다.\n */\n /*\n * 의견 — 이 화면에서 **결재자가 유일하게 적는 자리**다.\n *\n * 화면 아래에 붙어 있어(sticky) 내용을 내려 읽는 동안에도 보인다. 그 자리를 지키되 모양은\n * 다른 절과 같은 카드로 둔다. 전에는 회색 면(surface-variant)에 다른 테두리라 이 화면에서\n * 혼자 다른 부품처럼 보였다.\n */\n div[comment] {\n position: sticky;\n bottom: 0;\n padding-bottom: var(--spacing-large, 16px);\n background: var(--ui-bg, #f0f2f4);\n }\n\n /*\n * 이 화면에서 **사용자가 유일하게 손대는 자리**라는 것을 모양으로 말한다.\n *\n * 나머지 절은 전부 읽는 것이고, 판단은 아래 툴바의 단추가 받는다. 그런데 의견 칸이 읽는\n * 절들과 똑같은 카드라 「내 차례가 어디인지」가 화면에 없었다. 왼쪽에 강조색 띠를 둔다 —\n * sticky 라 툴바 바로 위에 붙으므로 띠와 단추가 한 덩어리로 읽힌다.\n */\n div[comment] section {\n border-left: 3px solid var(--ui-accent, #00727e);\n }\n\n div[comment] textarea {\n display: block;\n box-sizing: border-box;\n width: 100%;\n height: 76px;\n padding: 10px 12px;\n background: var(--ui-panel, #ffffff);\n border: 1px solid var(--ui-line, #d5dce0);\n border-radius: var(--ui-r-small, 6px);\n color: var(--ui-ink, #17242c);\n font: inherit;\n font-size: var(--ui-t-body, 13px);\n resize: none;\n outline: none;\n }\n\n div[comment] textarea:focus {\n border-color: var(--ui-accent, #00727e);\n }\n\n div[comment] .hint {\n margin: 7px 0 0;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-faint, #8a959c);\n word-break: keep-all;\n }\n `\n ]\n\n @state() activityApproval: any\n /**\n * 타임라인이 옆에 설 만큼 넓은가.\n *\n * 폭은 CSS 가 정하지만 타임라인을 펴는 것은 속성이라 CSS 로 안 된다. 같은 값을 두 곳에 적지\n * 않도록 물음은 하나이고(`BESIDE`), 그 물음을 CSS 와 여기가 함께 쓴다.\n */\n @state() private beside = false\n\n /**\n * 조회를 마쳤나 — **「아직 안 읽었다」와 「없다」는 다르다.**\n *\n * 전에는 값이 없으면 곧바로 「업무활동 정보가 없습니다」를 그렸다. 그런데 이 화면은 열리자마자\n * 조회를 시작하므로, 응답이 오기 전까지 **없다고 단언하는 화면**이 보인다. 목록에서 줄을 눌러\n * 들어온 사람은 방금 본 건이 없다는 말을 먼저 읽는다.\n *\n * 조회가 끝난 뒤에만 그 말을 한다. 그 전에는 아무 말도 하지 않는다.\n */\n @state() loaded = false\n /** Why the approval could not be read - ox-page-state says it, with retry (ADR-0060 decision 8). */\n @state() loadError: unknown = null\n private lastId?: string\n private approvalRead = 0\n\n @state() activityThread: any\n @state() board: any\n\n @query('textarea') commentInput!: HTMLTextAreaElement\n\n /**\n * Is the reader seated here as a reference — someone who comments and does not decide?\n *\n * The rule comes from organization's client types, the same function its own approval-line editor\n * and list use, so the two wire spellings of the enum are handled in one place. The approval line\n * answers rather than ActivityApproval.participation, matching what the server refuses on\n * (isReferenceOrder in approval-line.ts): the line decides who comes next, so letting the row\n * decide who may judge would leave two authorities with nothing to settle a disagreement.\n *\n * The value comes back false while the query is still out. That is the same answer as for an\n * approver, so the buttons show for a moment on a reference's screen — pressing one is refused by\n * the server, which is why the server closed first.\n */\n get isReference(): boolean {\n const approvalLine = this.activityThread?.activityInstance?.approvalLine\n const order = Number(this.activityApproval?.order ?? 0)\n\n return isReferenceStep(approvalLine?.[order - 1])\n }\n\n get context() {\n const judgment = this.activityApproval?.judgment\n\n return {\n /*\n * 이 화면이 어떤 틀인가 — 동작 줄이 이것을 읽고 자기 오른쪽 끝을 내용에 맞춘다\n * (ADR-0060 결정 9 보탬). 안 적으면 창 폭이고, 그것은 작업면의 모양이다.\n */\n frame: 'document',\n title: this.lifecycle?.params?.['title'] || i18next.t('title.activity approval'),\n help: 'worklist/activity-approval',\n /*\n * 이 화면은 메뉴에 없다 — 「내 결재함」에서 줄을 눌러 들어온다. 그래서 왼쪽 메뉴가 가리킬\n * 항목이 없고, 표시가 사라져 들어온 사람이 자기가 어디에 있는지 잃는다.\n *\n * 어느 목록에서 열리는지는 이 화면이 안다. 그것을 적어 둔다.\n */\n menu: 'approval-pending-list',\n /*\n * A reference is offered neither approve nor reject.\n *\n * ActivityApprovalJudgment has carried Closed for this seat from the start — \"the case ended\"\n * rather than a judgment — so a reference row was never meant to end in approved or rejected.\n * The buttons were offered anyway, and the server accepted them until 2026-09-09.\n *\n * What stays is the note, because a comment is the whole point of the seat, and close. The\n * hint under the textarea says which seat this is; buttons that simply vanish leave the\n * reader looking for them.\n */\n actions: judgment\n ? []\n : this.isReference\n ? []\n : /*\n * ── 결정 단추의 순서와 무게 (ADR-0060 결정 9 보탬) ─────────────\n * 전에는 반려가 첫 자리였고, 승인 · 반려 · 저장이 모두 같은 모양이었다. 되돌리기 어려운\n * 것이 앞에 서고 무엇이 주된 흐름인지 화면이 말하지 않았다.\n *\n * 승인이 주 동작이다 — 채운 단추 하나. 반려는 대등한 선택이지만 예외 경로라 테두리\n * 단추로 그 옆에 둔다.\n *\n * 「저장」은 이름이 뜻을 말하지 않았다. 이 단추가 저장하는 것은 **의견 하나**이고\n * (saveActivityApproval 은 id 와 comment 만 보낸다), 판단은 미뤄 둔다. 그리고 그 결과는\n * 목록에서 「메모 있음」 표식으로 나타난다(activity-cells 의 approvalMarks).\n * 메모 저장은 아래 의견 상자 옆에 두고, 이 줄에는 승인·반려만 둔다.\n */\n [\n {\n title: i18next.t('button.approve'),\n action: this.approveActivityApproval.bind(this),\n icon: 'approval',\n emphasis: { raised: true, outlined: false, dense: false, danger: false }\n },\n\n {\n title: i18next.t('button.reject'),\n action: this.rejectActivityApproval.bind(this),\n icon: 'assignment_return',\n emphasis: { raised: false, outlined: true, dense: false, danger: false }\n },\n\n ]\n // activityApproval: this.activityApproval\n }\n }\n\n private media?: MediaQueryList\n private onBeside = () => (this.beside = !!this.media?.matches)\n\n connectedCallback() {\n super.connectedCallback()\n this.media = window.matchMedia(BESIDE)\n this.onBeside()\n this.media.addEventListener('change', this.onBeside)\n }\n\n disconnectedCallback() {\n this.media?.removeEventListener('change', this.onBeside)\n super.disconnectedCallback()\n }\n\n render() {\n /* Reading and failing both drew nothing at all, so a failure looked like an empty screen. */\n return html`<div class=\"page\">\n <ox-page-state\n .loading=${!this.loaded && !this.loadError}\n .error=${this.loadError}\n @retry=${() => this.lastId && this.fetchActivityApproval(this.lastId)}\n >${\n this.activityThread\n ? this.renderApproval()\n : this.loaded\n ? html`<div empty>\n <span class=\"title\">${i18next.t('text.no activity thread info')}</span>\n <span class=\"why\">${i18next.t('text.no-activity-thread-why')}</span>\n </div>`\n : nothing\n }</ox-page-state\n >\n </div>`\n }\n\n private renderApproval() {\n const { terminatedAt } = this.activityApproval\n const editable = !terminatedAt\n\n return html`\n <div class=\"main\">\n <activity-approval-ribon .activityApproval=${this.activityApproval}></activity-approval-ribon>\n ${this.activityContent()}\n </div>\n <!--\n 보일 항목이 하나도 없으면 타임라인을 편다 — 그때는 화면이 「아래 타임라인의 상신 사유와\n 이력을 보고 판단하세요」로 여기를 가리키므로, 접혀 있으면 그 안내가 거짓말이 된다.\n\n 옆에 설 자리가 있을 때도 편다. 접힌 줄을 눌러 펴는 동작이, 그 줄이 이미 보이는 자리에\n 있으면 하는 일이 없다.\n -->\n <activity-thread-timeline\n class=\"aside\"\n .activityThread=${this.activityThread}\n ?open=${!this.hasFields() || this.beside}\n short-form\n ></activity-thread-timeline>\n ${\n editable\n ? html`\n <div comment class=\"main\">\n <section>\n <h2>${i18next.t('field.wl-comment')}</h2>\n <textarea\n placeholder=${String(\n i18next.t(\n this.isReference\n ? 'text.write-your-comment-as-reference'\n : 'text.explain the reason for approval/rejection'\n )\n )}\n .value=${this.activityApproval?.comment}\n @input=${(e: Event) => {\n this.activityApproval.comment = (e.target as HTMLTextAreaElement).value\n }}\n @change=${(e: Event) => {\n this.activityApproval.comment = (e.target as HTMLTextAreaElement).value\n }}\n ></textarea>\n <!--\n 반려는 의견이 필수다(rejectActivityApproval). 전에는 그 규칙을 **누른 뒤에** 토스트로\n 알렸다. 되돌릴 수 없는 것과 뜻이 다른 동작은 하기 전에 말한다.\n\n A reference reads a different line: this one names the seat, because the approve\n and reject buttons are absent for them and a reader whose buttons are missing\n goes looking for them.\n -->\n <p class=\"hint\">\n ${i18next.t(this.isReference ? 'text.reference-comment-hint' : 'text.approval-comment-hint')}\n </p>\n\n <!--\n 의견을 저장하는 단추는 의견 상자 옆이다(ADR-0060 결정 9 보탬). 동작 줄에는\n 결정만 둔다 — 전에는 승인 · 반려와 같은 줄에 같은 무게로 서서 셋 다 결정처럼\n 읽혔고, 좁은 화면에서는 넘침 메뉴로 밀려 반려가 숨을 수 있었다.\n -->\n <div class=\"comment-actions\">\n <button @click=${this.saveActivityApproval.bind(this)}>\n <md-icon>edit_note</md-icon>${i18next.t('button.save-note')}\n </button>\n </div>\n </section>\n </div>\n `\n : nothing\n }\n `\n }\n\n /** 화면에 낼 항목이 하나라도 있나. 타임라인을 펴 둘지 정하는 자리가 쓴다. */\n hasFields(): boolean {\n const model = this.activityThread?.activityInstance?.activity?.model\n\n return inputSpecOf(model).length > 0 || outputSpecOf(model).length > 0\n }\n\n activityContent() {\n switch (this.activityThread?.activityInstance?.viewType) {\n case 'template':\n return this.hostedContent(this.templateContent())\n case 'generated':\n return this.generatedContent()\n /* board 는 전체 화면을 쓰는 캔버스라 카드에 담지 않는다(hostedContent 머리말). */\n case 'board':\n return this.boardContent()\n case 'custom-element': {\n /*\n * The wrapper is for the element, not for the notice.\n *\n * hostedContent puts the content in a card so every ui type sits at the same place with the\n * same frame. The not-loaded notice is already a card — wrapping it drew a card inside a\n * card, two borders deep, and its margins landed unevenly: 16 above and none below, inside\n * a box that had its own padding. The generated branch returns the same notice unwrapped\n * and looks right.\n */\n const { viewSource: tagName } = this.activityThread?.activityInstance || {}\n\n /*\n * Naming no element is not the same as naming one that is missing.\n *\n * A template that stops providing a screen clears the field — installActivity does not\n * blank what a template leaves undefined, so clearing is written as null. That left\n * viewType saying custom-element with nothing named, and this branch answered \"the\n * screen could not be loaded\": a failure, for an activity that simply has no screen of its\n * own. Those read as different things to whoever is approving, and the second one is not\n * true.\n *\n * With nothing named, the generated screen is what this activity has — and it draws a\n * decision when the activity declares one, which the two plant forms that hit this do.\n */\n if (!tagName) {\n return this.generatedContent()\n }\n\n const element = this.customElementContent()\n\n return element ? this.hostedContent(element) : this.screenNotLoaded()\n }\n case 'page':\n case 'external':\n return html``\n default:\n return this.generatedContent()\n }\n }\n\n /**\n * 화면 종류가 달라도 **같은 자리에 같은 모양으로 놓인다.**\n *\n * worklist 는 네 가지로 내용을 그린다(generated · custom-element · template · board). 그중\n * generated 만 절 카드 안에 있었고 나머지 셋은 면 위에 맨몸으로 놓였다. 그래서 같은 결재 화면이\n * 액티비티에 따라 카드였다가 아니었다가 했다 — 아래의 타임라인 · 의견은 늘 카드라 위계도 어긋났다.\n *\n * board 는 뺀다. 전체 폭 · 전체 높이를 쓰는 캔버스라 카드 안에 넣으면 여백이 두 겹이 되고 크기가\n * 어긋난다.\n *\n * 카드는 여백을 두지 않는다(padding: 0). 안에 들어오는 것이 자기 조판을 갖고 있고, 두 겹으로\n * 주면 안쪽 내용이 카드 가운데로 밀린다.\n */\n hostedContent(content: unknown) {\n return html`<section hosted>${content}</section>`\n }\n\n templateContent() {\n if (!this.activityApproval) {\n return html``\n }\n\n const { viewSource: template } = this.activityThread?.activityInstance\n return unsafeHTML(template)\n }\n\n /**\n * 결재자가 보는 내용 — **전부 읽기 전용이다.**\n *\n * 전에는 「Output」 절을 편집기로 그리고 변경을 activityApproval.output 에 적었다. 그런데\n * approveActivityApproval / rejectActivityApproval 은 id 와 comment 만 보낸다 — 그 값은 어디에도\n * 가지 않는다. 결재자가 적을 수 있는 것은 의견 하나이고, 그것은 화면 아래 칸이 받는다.\n */\n /** The decision the activity declared, or nothing - drawn by `renderDecision`, the one drawing both screens use. */\n decisionContent() {\n const { activityInstance } = this.activityThread || {}\n const decision = renderDecision(activityInstance?.activity?.decisionKeys, activityInstance?.input)\n\n return decision === nothing ? nothing : keyed(this.activityApproval.id, decision)\n }\n\n generatedContent(): DirectiveResult {\n if (!this.activityApproval) {\n return html``\n }\n\n const { output, activityInstance } = this.activityThread || {}\n const { input } = activityInstance || {}\n\n /*\n * The declaration goes first. It answers \"what happens if I approve\", which is the question this\n * screen exists for; the model answers \"what are the values\", which is the fallback.\n */\n const decision = this.decisionContent()\n\n if (decision !== nothing) {\n return decision as DirectiveResult\n }\n\n const model = activityInstance?.activity?.model\n const inputSpec = inputSpecOf(model)\n const outputSpec = outputSpecOf(model)\n\n /*\n * **결재 화면에서 내용이 비어 있는 것은 경고다.**\n *\n * 업무 상세라면 「적을 것이 없다」로 끝난다. 여기서는 다르다 — 무엇을 승인하는지 모르는 채로\n * 승인 · 반려 버튼이 그대로 눌린다. 그 사실을 화면이 말하고, 대신 무엇을 보고 판단할지 알려\n * 준다(타임라인의 상신 사유).\n */\n if (!inputSpec.length && !outputSpec.length) {\n return keyed(\n this.activityApproval.id,\n html`<section empty>\n <span class=\"title\">${i18next.t('text.no-approval-content')}</span>\n <span class=\"why\">${i18next.t('text.no-approval-content-why')}</span>\n </section>`\n )\n }\n\n return keyed(\n this.activityApproval.id,\n html`\n ${\n inputSpec.length\n ? html`\n <section readonly>\n <h2>${i18next.t('label.activity-input')}</h2>\n ${renderGiven(inputSpec, input)}\n </section>\n `\n : ''\n }\n ${\n outputSpec.length\n ? html`\n <section readonly>\n <h2>${i18next.t('field.artifact')}</h2>\n ${renderGiven(outputSpec, output)}\n </section>\n `\n : ''\n }\n `\n )\n }\n\n boardContent(): DirectiveResult {\n if (!this.activityApproval) {\n return html``\n }\n\n const { output, activityInstance } = this.activityThread\n const { viewSource: boardId, input } = activityInstance || {}\n\n if (!this.board || this.board.id !== boardId) {\n this.board = { id: boardId }\n }\n\n return keyed(\n this.activityApproval.id,\n html`\n <ox-board-viewer\n style=\"background-color: white;\"\n .board=${this.board}\n .provider=${provider}\n .values=${{ ...input, ...output }}\n hide-fullscreen\n hide-navigation\n ></ox-board-viewer>\n `\n )\n }\n\n /**\n * The element the activity names, or a plain statement that it could not be loaded.\n *\n * document.createElement answers something for any name, so an activity pointing at an element\n * nobody registered used to produce an empty card. The approver got a screen with nothing on it\n * and the approve button still worked — plant shipped two such forms in one day and found them by\n * reading the file list, not by opening the screen.\n *\n * The reader is told what to judge by instead. Same shape as the empty generated screen: what is\n * missing, and where to look — the submission reason and the history in the timeline below.\n *\n * ── Waiting for a late definition ─────────────────────────────────────────\n * An element can be registered after this page renders, and answering \"not loaded\" forever in\n * that case would be a screen inventing a defect. whenDefined resolves whenever it arrives and\n * the page redraws; a name nobody ever registers simply never resolves, and the statement stands.\n */\n customElementContent() {\n if (!this.activityApproval) {\n return html``\n }\n\n const { output, activityInstance } = this.activityThread\n const { viewSource: tagName, input } = activityInstance || {}\n\n if (!customElements.get(tagName)) {\n customElements.whenDefined(tagName).then(() => this.requestUpdate())\n\n /* The caller draws the notice — unwrapped, because the notice is its own card. */\n return undefined\n }\n\n const element = document.createElement(tagName)\n element.id = 'custom-content'\n element.activityId = activityInstance.activity.id\n element.input = input\n element.output = output\n element.activityApproval = this.activityApproval\n\n return element\n }\n\n /** The activity names a screen and nothing registered it. Says what to judge by instead. */\n private screenNotLoaded() {\n return html`<section empty>\n <span class=\"title\">${i18next.t('text.approval-view-not-loaded')}</span>\n <span class=\"why\">${i18next.t('text.no-approval-content-why')}</span>\n </section>`\n }\n\n @query('ox-board-viewer') oxBoardViewer: any\n\n getOutputFromBoard() {\n const outputSpec = outputSpecOf(this.activityThread?.activityInstance?.activity?.model)\n const data = this.oxBoardViewer.getSceneValues()\n\n return outputSpec.reduce((output, spec) => {\n output[spec.name] = data[spec.name]\n return output\n }, {})\n }\n\n /**\n * 화면이 열리면 **의견 칸에 캐럿을 둔다.**\n *\n * 결재자가 이 화면에서 적는 것은 의견 하나다. 나머지는 전부 읽는 것이고, 판단은 아래 버튼이\n * 받는다. 그러면 열자마자 커서가 있어야 하는 자리는 하나뿐이다.\n *\n * 조건 둘을 지킨다.\n *\n * 활성 탭일 때만 MDI 라 뒤에 있는 탭이 응답을 받으면 앞 탭의 입력을 빼앗는다\n * 한 건에 한 번 갱신마다 focus 를 부르면 사용자가 옮긴 커서를 계속 되돌린다\n *\n * preventScroll 을 준다 — 화면을 아래로 끌어내리면 정작 무엇을 승인하는지가 위로 사라진다.\n */\n private focusedFor?: string\n\n private focusComment() {\n const id = this.activityApproval?.id\n\n if (!id || !this.active || this.activityApproval?.terminatedAt || this.focusedFor === id) {\n return\n }\n\n this.commentInput?.focus({ preventScroll: true })\n this.focusedFor = id\n }\n\n updated(changes) {\n if (changes.has('activityApproval')) {\n this.updateContext()\n this.focusComment()\n }\n }\n\n async pageUpdated(changes, lifecycle, changedBefore) {\n if (this.active && lifecycle.resourceId) {\n // Entity 360 changes only the query address. Do not reload the same approval and erase its unsaved opinion.\n if (this.lastId === lifecycle.resourceId && !('active' in changes)) return\n this.fetchActivityApproval(lifecycle.resourceId)\n }\n }\n\n async fetchActivityApproval(id) {\n const read = ++this.approvalRead\n if (this.lastId !== id) {\n this.activityApproval = undefined\n this.activityThread = undefined\n this.loaded = false\n }\n this.lastId = id\n this.loadError = null\n\n let response: any\n try {\n response = await client.query({\n query: gql`\n query activityApproval($id: String!) { activityApproval(id: $id) ${ActivityApprovalFetchResult}\n }\n `,\n variables: { id }\n })\n } catch (error) {\n if (read !== this.approvalRead) return\n this.loadError = error\n return\n }\n\n if (read !== this.approvalRead) return\n if (response.errors?.length || !response.data?.activityApproval) {\n this.loadError = response.errors?.length\n ? response.errors\n : new Error(i18next.t('error.activity-approval not found', { activityApproval: id }))\n return\n }\n\n this.activityApproval = response.data.activityApproval\n this.loaded = true\n this.activityThread = this.activityApproval.activityThread\n\n this.updateContext()\n }\n\n /*\n * The approval declared that it cannot be undone: ask once, as a destructive confirmation, before\n * sending it. Reversible and undeclared approvals go straight through, as before.\n */\n async confirmIfIrreversible(): Promise<boolean> {\n const { activityInstance } = this.activityThread || {}\n const slots = decisionSlots(activityInstance?.activity?.decisionKeys, activityInstance?.input)\n const gate = approvalGate(slotOfRole(slots, 'reversibility'))\n\n if (!gate.ask) {\n return true\n }\n\n return await OxPrompt.open({\n type: 'warning',\n title: i18next.t('text.approval-is-irreversible'),\n text: gate.caveat,\n /* From the declaration, not a literal: this screen does not decide what is irreversible. */\n confirmButton: { text: i18next.t('button.approve'), destructive: gate.ask },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n }\n\n async rejectActivityApproval() {\n var { id, comment } = this.activityApproval\n\n if (!comment) {\n document.dispatchEvent(new CustomEvent('notify', { detail: { message: i18next.t('text.enter a comment') } }))\n this.commentInput.focus()\n return\n }\n\n const outcome = await ranMutation(() =>\n client.mutate({\n mutation: gql`\n mutation ($id: String!, $comment: String!) { rejectActivityApproval(id: $id, comment: $comment) ${ActivityApprovalFetchResult}\n }\n `,\n variables: { id, comment }\n })\n )\n\n if (outcome.ok) {\n this.activityApproval = outcome.data.rejectActivityApproval\n this.activityThread = this.activityApproval.activityThread\n\n this.updateContext()\n\n document.dispatchEvent(\n new CustomEvent('notify', { detail: { message: i18next.t('text.task_is_rejected_successfully') } })\n )\n }\n }\n\n async approveActivityApproval() {\n var { id, comment } = this.activityApproval\n\n if (!(await this.confirmIfIrreversible())) {\n return\n }\n\n const outcome = await ranMutation(() =>\n client.mutate({\n mutation: gql`\n mutation ($id: String!, $comment: String) { approveActivityApproval(id: $id, comment: $comment) ${ActivityApprovalFetchResult}\n }\n `,\n variables: { id, comment }\n })\n )\n\n if (outcome.ok) {\n this.activityApproval = outcome.data.approveActivityApproval\n this.activityThread = this.activityApproval.activityThread\n\n this.updateContext()\n\n document.dispatchEvent(\n new CustomEvent('notify', { detail: { message: i18next.t('text.task_is_approved_successfully') } })\n )\n }\n }\n\n async saveActivityApproval() {\n var { id, comment } = this.activityApproval\n\n const outcome = await ranMutation(() =>\n client.mutate({\n mutation: gql`\n mutation ($id: String!, $comment: String) { saveActivityApproval(id: $id, comment: $comment) ${ActivityApprovalFetchResult}\n }\n `,\n variables: { id, comment }\n })\n )\n\n if (outcome.ok) {\n this.activityApproval = outcome.data.saveActivityApproval\n this.activityThread = this.activityApproval.activityThread\n\n this.updateContext()\n\n document.dispatchEvent(\n new CustomEvent('notify', { detail: { message: i18next.t('text.task_is_saved_successfully') } })\n )\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"activity-approval-page.js","sourceRoot":"","sources":["../../../client/pages/activity-approval/activity-approval-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,sCAAsC,CAAA;AAC7C,OAAO,wDAAwD,CAAA;AAC/D,OAAO,mCAAmC,CAAA;AAC1C,OAAO,6CAA6C,CAAA;AACpD,OAAO,8CAA8C,CAAA;AAErD,OAAO,GAAG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AC,oBAAoB;QACxB,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAA;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;QAE3C,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;QAE3E,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;YAC5C,OAAM;QACR,CAAC;QAED,QAAQ,CAAC,aAAa,CACpB,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,iCAAiC,CAAC,EAAE,EAAE,CAAC,CACjG,CAAA;IACH,CAAC;;AAlqBgB;IAAhB,KAAK,EAAE;;wDAAwB;AAyEf;IAAhB,KAAK,EAAE;;oDAAuB;AAyBtB;IAAR,KAAK,EAAE;;mDAAW;AAIA;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAgB,mBAAmB;IAErD;;;;;;;;;;;;OAYG;;0DAdkD;AAub3B;IAAzB,KAAK,CAAC,iBAAiB,CAAC;;2DAAmB;AAzsBjC,oBAAoB;IADhC,aAAa,CAAC,wBAAwB,CAAC;GAC3B,oBAAoB,CA+0BhC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/list-state/ox-page-state.js'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@operato/board/ox-board-viewer.js'\nimport '../../components/activity-approval-ribon.js'\nimport '../../components/activity-thread-timeline.js'\n\nimport gql from 'graphql-tag'\nimport { TemplateResult, css, html, nothing, unsafeCSS } from 'lit'\nimport { DirectiveResult } from 'lit-html/directive.js'\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { MutationController, QueryController } from '@operato/graphql'\nimport { OxPrompt } from '@operato/popup'\nimport { i18next, localize } from '@operato/i18n'\nimport { mutationOutcome } from '../../components/mutation-outcome.js'\nimport { sayFailure } from '../../components/say-outcome.js'\nimport { approvalGate } from './approval-gate.js'\nimport { PageView, DraftController } from '@operato/shell'\nimport { DocumentPageStyles, ScrollbarStyles } from '@operato/styles'\nimport { provider } from '@operato/board/board-provider.js'\nimport { isReferenceStep } from '@things-factory/organization/dist-client'\n\nimport { ActivityFieldsStyles, inputSpecOf, outputSpecOf, renderGiven } from '../../components/activity-fields.js'\nimport { DecisionContentStyles, DecisionKeysFields, renderDecision } from '../../components/decision-content.js'\nimport { decisionSlots, slotOfRole } from '../../components/decision-slots.js'\n\nconst ActivityApprovalFetchResult = `\\\n{ id\n judgment\n comment\n approver { id\n name\n }\n round\n order\n createdAt\n terminatedAt\n activityThread { state\n dueAt\n assignedAt\n assignee { id\n name\n }\n updatedAt\n terminatedAt\n output\n activityApprovals { round\n order\n approver { id name\n }\n judgment\n participation\n comment\n createdAt\n updatedAt\n terminatedAt\n }\n activityThreadHistories { transaction\n reason\n updater { id name\n }\n updatedAt\n state\n output\n }\n activityInstance { id\n name\n description\n state\n activity { id\n label\n labelTKey\n ${DecisionKeysFields}\n model { name\n description\n active\n tag\n inout\n type\n unit\n options\n quantifier\n spec\n hidden\n }\n }\n approvalLine { type\n value\n participation\n notifyAfter\n approver { id\n name\n description\n controlNo\n }\n }\n thumbnail\n input\n output\n viewType\n viewSource\n dueAt\n createdAt\n } \n }\n}`\n\nexport const ActivityThreadStatus = {\n Unassigned: 'unassigned',\n Assigned: 'assigned',\n Started: 'started',\n Delegated: 'delegated',\n Ended: 'ended',\n Aborted: 'aborted'\n}\n\n/** 타임라인이 옆에 서는 폭 — 읽는 단 1080 + 사이 24 + 최소 패널 360 + page 좌우 40. */\nconst BESIDE = '(min-width: 1504px)'\n\n@customElement('activity-approval-page')\nexport class ActivityApprovalPage extends localize(i18next)(PageView) {\n static styles = [\n /* The frame owns the page shell and the reading column (ADR-0060 decision 8). */\n DocumentPageStyles,\n ScrollbarStyles,\n ActivityFieldsStyles,\n DecisionContentStyles,\n css`\n :host {\n color: var(--ui-ink, #17242c);\n font-size: var(--ui-t-body, 13px);\n }\n\n /*\n * 넓을 때만 타임라인이 옆에 선다 — **읽는 단은 줄이지 않는다.**\n *\n * 결재자가 판단에 쓰는 것(결정 · 사유 · 의견)이 왼쪽이고, 참고하는 것(타임라인)이 오른쪽이다.\n * 처음 낸 안은 읽는 단 1080 안에서 둘로 쪼개는 것이었는데, 그러면 결정 카드가 1014 에서\n * 520 으로 줄어든다 — 주된 것을 좁혀 참고용 자리를 만드는 꼴이라 물렀다.\n *\n * 그래서 **읽는 단을 넘는 여분이 한 판만큼 있을 때만** 편다:\n *\n * 1080(읽는 단) + 24(사이) + 360(최소 패널) + 40(page 좌우 여백) = 1504\n *\n * 그 아래에서는 한 단이고 차례가 그대로다 — 결재선 · 결정 · 타임라인 · 의견. 좁은 화면이\n * 기본이고 넓은 화면이 덤이다.\n */\n @media ${unsafeCSS(BESIDE)} {\n .page {\n max-width: none;\n display: grid;\n grid-template-columns: var(--ui-measure, 1080px) minmax(360px, 1fr);\n column-gap: 24px;\n align-items: start;\n }\n\n /*\n * 두 패널의 자리는 문서 차례가 아니라 격자가 정한다. 문서 차례는 좁은 화면 그대로 두어야\n * 하고(결재선 · 결정 · 타임라인 · 의견), 넓은 화면에서만 타임라인이 오른쪽으로 빠진다.\n */\n .main {\n grid-column: 1;\n min-width: 0;\n }\n\n /* 옆에 선 타임라인은 읽는 동안 따라온다 — 결정과 맞대어 보는 값이다. */\n .aside {\n grid-column: 2;\n grid-row: 1 / span 3;\n position: sticky;\n top: 0;\n }\n }\n\n .comment-actions {\n display: flex;\n justify-content: flex-end;\n }\n\n .comment-actions button {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: var(--form-action-height, 32px);\n padding: 0 12px;\n border: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));\n border-radius: var(--ui-r-small, 6px);\n background: transparent;\n color: var(--ui-ink, var(--md-sys-color-on-surface));\n font: inherit;\n font-size: var(--ui-t-body, 13px);\n cursor: pointer;\n }\n\n .comment-actions md-icon {\n font-size: 16px;\n --md-icon-size: 16px;\n }\n\n /* 카드가 담아 주므로 안에 들어오는 화면은 자기 면과 여백을 갖지 않는다. */\n /*\n * 줄어들지 않는다 — 줄어들면 본문이 잘린다.\n *\n * flex 항목인데 크기를 안 정해 두면 기본이 flex: 0 1 auto 다. **1 이 줄어든다는 뜻이다** —\n * 세로가 모자라면 브라우저가 이 칸부터 줄이는데, 여기엔 카드 모서리를 따라 자르려고\n * overflow: hidden 이 걸려 있어서 줄어든 만큼이 **스크롤도 없이 사라진다.**\n *\n * 완료 조회에서 실측했다(1400x620): 칸이 242px 로 줄고 내용은 362px 이라 「업무 내용」 절이\n * 대부분 잘렸고, 잘린 자리 바로 아래에서 타임라인이 시작하니 타임라인이 본문을 덮은 것처럼\n * 보였다. 세로가 넉넉하면 줄일 일이 없어 안 드러난다.\n *\n * 안에 오는 것은 문서다. 높이를 정해 주어야 하는 것은 board 뿐이고 board 는 이 칸을 거치지\n * 않는다(activityContent 참조). 문서는 제 높이로 서고, 모자라면 페이지 전체가 스크롤한다 —\n * :host 의 overflow: auto 가 그 자리다.\n */\n section[hosted] {\n flex: none;\n padding: 0;\n overflow: hidden;\n }\n\n ox-board-viewer {\n width: 100%;\n height: 100%;\n }\n\n activity-thread-timeline {\n margin: var(--spacing-large, 16px);\n }\n\n /*\n * 의견 칸 — 이 화면에서 **결재자가 유일하게 적는 자리**다.\n *\n * 화면 아래에 붙어 있어(sticky) 목록을 내려 읽는 동안에도 보인다. 그 자리를 지키되 모양은\n * 다른 절과 같은 카드로 둔다. 전에는 회색 면(surface-variant)에 다른 테두리라 이 화면에서\n * 혼자 다른 부품처럼 보였다.\n */\n /*\n * 의견 — 이 화면에서 **결재자가 유일하게 적는 자리**다.\n *\n * 화면 아래에 붙어 있어(sticky) 내용을 내려 읽는 동안에도 보인다. 그 자리를 지키되 모양은\n * 다른 절과 같은 카드로 둔다. 전에는 회색 면(surface-variant)에 다른 테두리라 이 화면에서\n * 혼자 다른 부품처럼 보였다.\n */\n div[comment] {\n position: sticky;\n bottom: 0;\n padding-bottom: var(--spacing-large, 16px);\n background: var(--ui-bg, #f0f2f4);\n }\n\n /*\n * 이 화면에서 **사용자가 유일하게 손대는 자리**라는 것을 모양으로 말한다.\n *\n * 나머지 절은 전부 읽는 것이고, 판단은 아래 툴바의 단추가 받는다. 그런데 의견 칸이 읽는\n * 절들과 똑같은 카드라 「내 차례가 어디인지」가 화면에 없었다. 왼쪽에 강조색 띠를 둔다 —\n * sticky 라 툴바 바로 위에 붙으므로 띠와 단추가 한 덩어리로 읽힌다.\n */\n div[comment] section {\n border-left: 3px solid var(--ui-accent, #00727e);\n }\n\n div[comment] textarea {\n display: block;\n box-sizing: border-box;\n width: 100%;\n height: 76px;\n padding: 10px 12px;\n background: var(--ui-panel, #ffffff);\n border: 1px solid var(--ui-line, #d5dce0);\n border-radius: var(--ui-r-small, 6px);\n color: var(--ui-ink, #17242c);\n font: inherit;\n font-size: var(--ui-t-body, 13px);\n resize: none;\n outline: none;\n }\n\n div[comment] textarea:focus {\n border-color: var(--ui-accent, #00727e);\n }\n\n div[comment] .hint {\n margin: 7px 0 0;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-faint, #8a959c);\n word-break: keep-all;\n }\n `\n ]\n\n /** The approval the address names. */\n @state() private approvalId = ''\n\n /* The approval shown, read for the id the address names (ADR-0190). */\n private approval = new QueryController(\n this,\n gql`\n query activityApproval($id: String!) {\n activityApproval(id: $id) ${ActivityApprovalFetchResult}\n }\n `,\n { variables: () => (this.approvalId ? { id: this.approvalId } : undefined) }\n )\n\n /* The opinion written here over the approval read; another approval drops it (ADR-0190 decision 2). */\n private draft = new DraftController<{ comment: string }>(this, {\n read: () => this.activityApproval,\n key: () => this.approvalId\n })\n\n /*\n * The changes made here: each reads what it changed again once done. This screen says its own failure\n * (sayFailure), so the GraphQL link stays quiet about it (ADR-0190).\n */\n private reject = new MutationController(\n this,\n gql`\n mutation ($id: String!, $comment: String!) {\n rejectActivityApproval(id: $id, comment: $comment) {\n id\n }\n }\n `,\n { refetch: () => [this.approval], showsError: true }\n )\n\n private approve = new MutationController(\n this,\n gql`\n mutation ($id: String!, $comment: String) {\n approveActivityApproval(id: $id, comment: $comment) {\n id\n }\n }\n `,\n { refetch: () => [this.approval], showsError: true }\n )\n\n private save = new MutationController(\n this,\n gql`\n mutation ($id: String!, $comment: String) {\n saveActivityApproval(id: $id, comment: $comment) {\n id\n }\n }\n `,\n { refetch: () => [this.approval], showsError: true }\n )\n\n get activityApproval(): any {\n return this.approval.data?.activityApproval\n }\n\n get activityThread(): any {\n return this.activityApproval?.activityThread\n }\n\n /**\n * 타임라인이 옆에 설 만큼 넓은가.\n *\n * 폭은 CSS 가 정하지만 타임라인을 펴는 것은 속성이라 CSS 로 안 된다. 같은 값을 두 곳에 적지\n * 않도록 물음은 하나이고(`BESIDE`), 그 물음을 CSS 와 여기가 함께 쓴다.\n */\n @state() private beside = false\n\n /**\n * 조회를 마쳤나 — **「아직 안 읽었다」와 「없다」는 다르다.**\n *\n * 전에는 값이 없으면 곧바로 「업무활동 정보가 없습니다」를 그렸다. 그런데 이 화면은 열리자마자\n * 조회를 시작하므로, 응답이 오기 전까지 **없다고 단언하는 화면**이 보인다. 목록에서 줄을 눌러\n * 들어온 사람은 방금 본 건이 없다는 말을 먼저 읽는다.\n *\n * 조회가 끝난 뒤에만 그 말을 한다. 그 전에는 아무 말도 하지 않는다.\n */\n get loaded(): boolean {\n return this.approval.data !== undefined\n }\n\n /** Why the approval could not be read - ox-page-state says it, with retry (ADR-0060 decision 8). */\n get loadError(): unknown {\n return (\n this.approval.error ??\n (this.loaded && !this.activityApproval\n ? new Error(i18next.t('error.activity-approval not found', { activityApproval: this.approvalId }))\n : null)\n )\n }\n\n @state() board: any\n /** The custom element and the approval read it was made for: another answer makes it again. */\n private custom?: { for: any; element: any }\n\n @query('textarea') commentInput!: HTMLTextAreaElement\n\n /**\n * Is the reader seated here as a reference — someone who comments and does not decide?\n *\n * The rule comes from organization's client types, the same function its own approval-line editor\n * and list use, so the two wire spellings of the enum are handled in one place. The approval line\n * answers rather than ActivityApproval.participation, matching what the server refuses on\n * (isReferenceOrder in approval-line.ts): the line decides who comes next, so letting the row\n * decide who may judge would leave two authorities with nothing to settle a disagreement.\n *\n * The value comes back false while the query is still out. That is the same answer as for an\n * approver, so the buttons show for a moment on a reference's screen — pressing one is refused by\n * the server, which is why the server closed first.\n */\n get isReference(): boolean {\n const approvalLine = this.activityThread?.activityInstance?.approvalLine\n const order = Number(this.activityApproval?.order ?? 0)\n\n return isReferenceStep(approvalLine?.[order - 1])\n }\n\n get context() {\n const judgment = this.activityApproval?.judgment\n\n return {\n /*\n * 이 화면이 어떤 틀인가 — 동작 줄이 이것을 읽고 자기 오른쪽 끝을 내용에 맞춘다\n * (ADR-0060 결정 9 보탬). 안 적으면 창 폭이고, 그것은 작업면의 모양이다.\n */\n frame: 'document',\n title: this.lifecycle?.params?.['title'] || i18next.t('title.activity approval'),\n help: 'worklist/activity-approval',\n /*\n * 이 화면은 메뉴에 없다 — 「내 결재함」에서 줄을 눌러 들어온다. 그래서 왼쪽 메뉴가 가리킬\n * 항목이 없고, 표시가 사라져 들어온 사람이 자기가 어디에 있는지 잃는다.\n *\n * 어느 목록에서 열리는지는 이 화면이 안다. 그것을 적어 둔다.\n */\n menu: 'approval-pending-list',\n /*\n * A reference is offered neither approve nor reject.\n *\n * ActivityApprovalJudgment has carried Closed for this seat from the start — \"the case ended\"\n * rather than a judgment — so a reference row was never meant to end in approved or rejected.\n * The buttons were offered anyway, and the server accepted them until 2026-09-09.\n *\n * What stays is the note, because a comment is the whole point of the seat, and close. The\n * hint under the textarea says which seat this is; buttons that simply vanish leave the\n * reader looking for them.\n */\n actions: judgment\n ? []\n : this.isReference\n ? []\n : /*\n * ── 결정 단추의 순서와 무게 (ADR-0060 결정 9 보탬) ─────────────\n * 전에는 반려가 첫 자리였고, 승인 · 반려 · 저장이 모두 같은 모양이었다. 되돌리기 어려운\n * 것이 앞에 서고 무엇이 주된 흐름인지 화면이 말하지 않았다.\n *\n * 승인이 주 동작이다 — 채운 단추 하나. 반려는 대등한 선택이지만 예외 경로라 테두리\n * 단추로 그 옆에 둔다.\n *\n * 「저장」은 이름이 뜻을 말하지 않았다. 이 단추가 저장하는 것은 **의견 하나**이고\n * (saveActivityApproval 은 id 와 comment 만 보낸다), 판단은 미뤄 둔다. 그리고 그 결과는\n * 목록에서 「메모 있음」 표식으로 나타난다(activity-cells 의 approvalMarks).\n * 메모 저장은 아래 의견 상자 옆에 두고, 이 줄에는 승인·반려만 둔다.\n */\n [\n {\n title: i18next.t('button.approve'),\n action: this.approveActivityApproval.bind(this),\n icon: 'approval',\n emphasis: { raised: true, outlined: false, dense: false, danger: false }\n },\n\n {\n title: i18next.t('button.reject'),\n action: this.rejectActivityApproval.bind(this),\n icon: 'assignment_return',\n emphasis: { raised: false, outlined: true, dense: false, danger: false }\n },\n\n ]\n // activityApproval: this.activityApproval\n }\n }\n\n private media?: MediaQueryList\n private onBeside = () => (this.beside = !!this.media?.matches)\n\n connectedCallback() {\n super.connectedCallback()\n this.media = window.matchMedia(BESIDE)\n this.onBeside()\n this.media.addEventListener('change', this.onBeside)\n }\n\n disconnectedCallback() {\n this.media?.removeEventListener('change', this.onBeside)\n super.disconnectedCallback()\n }\n\n render() {\n /* Reading and failing both drew nothing at all, so a failure looked like an empty screen. */\n return html`<div class=\"page\">\n <ox-page-state\n .loading=${!this.loaded && !this.loadError}\n .error=${this.loadError}\n @retry=${() => this.approval.refetch()}\n >${\n this.activityThread\n ? this.renderApproval()\n : this.loaded\n ? html`<div empty>\n <span class=\"title\">${i18next.t('text.no activity thread info')}</span>\n <span class=\"why\">${i18next.t('text.no-activity-thread-why')}</span>\n </div>`\n : nothing\n }</ox-page-state\n >\n </div>`\n }\n\n private renderApproval() {\n const { terminatedAt } = this.activityApproval\n const editable = !terminatedAt\n\n return html`\n <div class=\"main\">\n <activity-approval-ribon .activityApproval=${this.activityApproval}></activity-approval-ribon>\n ${this.activityContent()}\n </div>\n <!--\n 보일 항목이 하나도 없으면 타임라인을 편다 — 그때는 화면이 「아래 타임라인의 상신 사유와\n 이력을 보고 판단하세요」로 여기를 가리키므로, 접혀 있으면 그 안내가 거짓말이 된다.\n\n 옆에 설 자리가 있을 때도 편다. 접힌 줄을 눌러 펴는 동작이, 그 줄이 이미 보이는 자리에\n 있으면 하는 일이 없다.\n -->\n <activity-thread-timeline\n class=\"aside\"\n .activityThread=${this.activityThread}\n ?open=${!this.hasFields() || this.beside}\n short-form\n ></activity-thread-timeline>\n ${\n editable\n ? html`\n <div comment class=\"main\">\n <section>\n <h2>${i18next.t('field.wl-comment')}</h2>\n <textarea\n placeholder=${String(\n i18next.t(\n this.isReference\n ? 'text.write-your-comment-as-reference'\n : 'text.explain the reason for approval/rejection'\n )\n )}\n .value=${this.draft.value('comment') ?? ''}\n @input=${(e: Event) => this.draft.set('comment', (e.target as HTMLTextAreaElement).value)}\n ></textarea>\n <!--\n 반려는 의견이 필수다(rejectActivityApproval). 전에는 그 규칙을 **누른 뒤에** 토스트로\n 알렸다. 되돌릴 수 없는 것과 뜻이 다른 동작은 하기 전에 말한다.\n\n A reference reads a different line: this one names the seat, because the approve\n and reject buttons are absent for them and a reader whose buttons are missing\n goes looking for them.\n -->\n <p class=\"hint\">\n ${i18next.t(this.isReference ? 'text.reference-comment-hint' : 'text.approval-comment-hint')}\n </p>\n\n <!--\n 의견을 저장하는 단추는 의견 상자 옆이다(ADR-0060 결정 9 보탬). 동작 줄에는\n 결정만 둔다 — 전에는 승인 · 반려와 같은 줄에 같은 무게로 서서 셋 다 결정처럼\n 읽혔고, 좁은 화면에서는 넘침 메뉴로 밀려 반려가 숨을 수 있었다.\n -->\n <div class=\"comment-actions\">\n <button @click=${this.saveActivityApproval.bind(this)}>\n <md-icon>edit_note</md-icon>${i18next.t('button.save-note')}\n </button>\n </div>\n </section>\n </div>\n `\n : nothing\n }\n `\n }\n\n /** 화면에 낼 항목이 하나라도 있나. 타임라인을 펴 둘지 정하는 자리가 쓴다. */\n hasFields(): boolean {\n const model = this.activityThread?.activityInstance?.activity?.model\n\n return inputSpecOf(model).length > 0 || outputSpecOf(model).length > 0\n }\n\n activityContent() {\n switch (this.activityThread?.activityInstance?.viewType) {\n case 'template':\n return this.hostedContent(this.templateContent())\n case 'generated':\n return this.generatedContent()\n /* board 는 전체 화면을 쓰는 캔버스라 카드에 담지 않는다(hostedContent 머리말). */\n case 'board':\n return this.boardContent()\n case 'custom-element': {\n /*\n * The wrapper is for the element, not for the notice.\n *\n * hostedContent puts the content in a card so every ui type sits at the same place with the\n * same frame. The not-loaded notice is already a card — wrapping it drew a card inside a\n * card, two borders deep, and its margins landed unevenly: 16 above and none below, inside\n * a box that had its own padding. The generated branch returns the same notice unwrapped\n * and looks right.\n */\n const { viewSource: tagName } = this.activityThread?.activityInstance || {}\n\n /*\n * Naming no element is not the same as naming one that is missing.\n *\n * A template that stops providing a screen clears the field — installActivity does not\n * blank what a template leaves undefined, so clearing is written as null. That left\n * viewType saying custom-element with nothing named, and this branch answered \"the\n * screen could not be loaded\": a failure, for an activity that simply has no screen of its\n * own. Those read as different things to whoever is approving, and the second one is not\n * true.\n *\n * With nothing named, the generated screen is what this activity has — and it draws a\n * decision when the activity declares one, which the two plant forms that hit this do.\n */\n if (!tagName) {\n return this.generatedContent()\n }\n\n const element = this.customElementContent()\n\n return element ? this.hostedContent(element) : this.screenNotLoaded()\n }\n case 'page':\n case 'external':\n return html``\n default:\n return this.generatedContent()\n }\n }\n\n /**\n * 화면 종류가 달라도 **같은 자리에 같은 모양으로 놓인다.**\n *\n * worklist 는 네 가지로 내용을 그린다(generated · custom-element · template · board). 그중\n * generated 만 절 카드 안에 있었고 나머지 셋은 면 위에 맨몸으로 놓였다. 그래서 같은 결재 화면이\n * 액티비티에 따라 카드였다가 아니었다가 했다 — 아래의 타임라인 · 의견은 늘 카드라 위계도 어긋났다.\n *\n * board 는 뺀다. 전체 폭 · 전체 높이를 쓰는 캔버스라 카드 안에 넣으면 여백이 두 겹이 되고 크기가\n * 어긋난다.\n *\n * 카드는 여백을 두지 않는다(padding: 0). 안에 들어오는 것이 자기 조판을 갖고 있고, 두 겹으로\n * 주면 안쪽 내용이 카드 가운데로 밀린다.\n */\n hostedContent(content: unknown) {\n return html`<section hosted>${content}</section>`\n }\n\n templateContent() {\n if (!this.activityApproval) {\n return html``\n }\n\n const { viewSource: template } = this.activityThread?.activityInstance\n return unsafeHTML(template)\n }\n\n /**\n * 결재자가 보는 내용 — **전부 읽기 전용이다.**\n *\n * 전에는 「Output」 절을 편집기로 그리고 변경을 activityApproval.output 에 적었다. 그런데\n * approveActivityApproval / rejectActivityApproval 은 id 와 comment 만 보낸다 — 그 값은 어디에도\n * 가지 않는다. 결재자가 적을 수 있는 것은 의견 하나이고, 그것은 화면 아래 칸이 받는다.\n */\n /** The decision the activity declared, or nothing - drawn by `renderDecision`, the one drawing both screens use. */\n decisionContent() {\n const { activityInstance } = this.activityThread || {}\n const decision = renderDecision(activityInstance?.activity?.decisionKeys, activityInstance?.input)\n\n return decision === nothing ? nothing : keyed(this.activityApproval.id, decision)\n }\n\n generatedContent(): DirectiveResult {\n if (!this.activityApproval) {\n return html``\n }\n\n const { output, activityInstance } = this.activityThread || {}\n const { input } = activityInstance || {}\n\n /*\n * The declaration goes first. It answers \"what happens if I approve\", which is the question this\n * screen exists for; the model answers \"what are the values\", which is the fallback.\n */\n const decision = this.decisionContent()\n\n if (decision !== nothing) {\n return decision as DirectiveResult\n }\n\n const model = activityInstance?.activity?.model\n const inputSpec = inputSpecOf(model)\n const outputSpec = outputSpecOf(model)\n\n /*\n * **결재 화면에서 내용이 비어 있는 것은 경고다.**\n *\n * 업무 상세라면 「적을 것이 없다」로 끝난다. 여기서는 다르다 — 무엇을 승인하는지 모르는 채로\n * 승인 · 반려 버튼이 그대로 눌린다. 그 사실을 화면이 말하고, 대신 무엇을 보고 판단할지 알려\n * 준다(타임라인의 상신 사유).\n */\n if (!inputSpec.length && !outputSpec.length) {\n return keyed(\n this.activityApproval.id,\n html`<section empty>\n <span class=\"title\">${i18next.t('text.no-approval-content')}</span>\n <span class=\"why\">${i18next.t('text.no-approval-content-why')}</span>\n </section>`\n )\n }\n\n return keyed(\n this.activityApproval.id,\n html`\n ${\n inputSpec.length\n ? html`\n <section readonly>\n <h2>${i18next.t('label.activity-input')}</h2>\n ${renderGiven(inputSpec, input)}\n </section>\n `\n : ''\n }\n ${\n outputSpec.length\n ? html`\n <section readonly>\n <h2>${i18next.t('field.artifact')}</h2>\n ${renderGiven(outputSpec, output)}\n </section>\n `\n : ''\n }\n `\n )\n }\n\n boardContent(): DirectiveResult {\n if (!this.activityApproval) {\n return html``\n }\n\n const { output, activityInstance } = this.activityThread\n const { viewSource: boardId, input } = activityInstance || {}\n\n if (!this.board || this.board.id !== boardId) {\n this.board = { id: boardId }\n }\n\n return keyed(\n this.activityApproval.id,\n html`\n <ox-board-viewer\n style=\"background-color: white;\"\n .board=${this.board}\n .provider=${provider}\n .values=${{ ...input, ...output }}\n hide-fullscreen\n hide-navigation\n ></ox-board-viewer>\n `\n )\n }\n\n /**\n * The element the activity names, or a plain statement that it could not be loaded.\n *\n * document.createElement answers something for any name, so an activity pointing at an element\n * nobody registered used to produce an empty card. The approver got a screen with nothing on it\n * and the approve button still worked — plant shipped two such forms in one day and found them by\n * reading the file list, not by opening the screen.\n *\n * The reader is told what to judge by instead. Same shape as the empty generated screen: what is\n * missing, and where to look — the submission reason and the history in the timeline below.\n *\n * ── Waiting for a late definition ─────────────────────────────────────────\n * An element can be registered after this page renders, and answering \"not loaded\" forever in\n * that case would be a screen inventing a defect. whenDefined resolves whenever it arrives and\n * the page redraws; a name nobody ever registers simply never resolves, and the statement stands.\n */\n customElementContent() {\n if (!this.activityApproval) {\n return html``\n }\n\n const { output, activityInstance } = this.activityThread\n const { viewSource: tagName, input } = activityInstance || {}\n\n if (!customElements.get(tagName)) {\n customElements.whenDefined(tagName).then(() => this.requestUpdate())\n\n /* The caller draws the notice — unwrapped, because the notice is its own card. */\n return undefined\n }\n\n /* Made once per answer: the opinion typed below redraws the page, and the element shows the same approval. */\n if (this.custom && this.custom.for === this.activityApproval) {\n return this.custom.element\n }\n\n const element = document.createElement(tagName)\n element.id = 'custom-content'\n element.activityId = activityInstance.activity.id\n element.input = input\n element.output = output\n element.activityApproval = this.activityApproval\n\n this.custom = { for: this.activityApproval, element }\n return element\n }\n\n /** The activity names a screen and nothing registered it. Says what to judge by instead. */\n private screenNotLoaded() {\n return html`<section empty>\n <span class=\"title\">${i18next.t('text.approval-view-not-loaded')}</span>\n <span class=\"why\">${i18next.t('text.no-approval-content-why')}</span>\n </section>`\n }\n\n @query('ox-board-viewer') oxBoardViewer: any\n\n getOutputFromBoard() {\n const outputSpec = outputSpecOf(this.activityThread?.activityInstance?.activity?.model)\n const data = this.oxBoardViewer.getSceneValues()\n\n return outputSpec.reduce((output, spec) => {\n output[spec.name] = data[spec.name]\n return output\n }, {})\n }\n\n /**\n * 화면이 열리면 **의견 칸에 캐럿을 둔다.**\n *\n * 결재자가 이 화면에서 적는 것은 의견 하나다. 나머지는 전부 읽는 것이고, 판단은 아래 버튼이\n * 받는다. 그러면 열자마자 커서가 있어야 하는 자리는 하나뿐이다.\n *\n * 조건 둘을 지킨다.\n *\n * 활성 탭일 때만 MDI 라 뒤에 있는 탭이 응답을 받으면 앞 탭의 입력을 빼앗는다\n * 한 건에 한 번 갱신마다 focus 를 부르면 사용자가 옮긴 커서를 계속 되돌린다\n *\n * preventScroll 을 준다 — 화면을 아래로 끌어내리면 정작 무엇을 승인하는지가 위로 사라진다.\n */\n private focusedFor?: string\n\n private focusComment() {\n const id = this.activityApproval?.id\n\n if (!id || !this.active || this.activityApproval?.terminatedAt || this.focusedFor === id) {\n return\n }\n\n this.commentInput?.focus({ preventScroll: true })\n this.focusedFor = id\n }\n\n updated() {\n this.focusComment()\n }\n\n async pageUpdated(changes, lifecycle, changedBefore) {\n if (this.active && lifecycle.resourceId) {\n /* Entity 360 changes only the query address: the same approval is not read again, and its unsaved opinion stays. */\n /* Coming back to the tab, PageView reads the declared approval again; the opinion typed stays (the draft). */\n if (this.approvalId !== lifecycle.resourceId) this.approvalId = lifecycle.resourceId\n }\n }\n\n /*\n * The approval declared that it cannot be undone: ask once, as a destructive confirmation, before\n * sending it. Reversible and undeclared approvals go straight through, as before.\n */\n async confirmIfIrreversible(): Promise<boolean> {\n const { activityInstance } = this.activityThread || {}\n const slots = decisionSlots(activityInstance?.activity?.decisionKeys, activityInstance?.input)\n const gate = approvalGate(slotOfRole(slots, 'reversibility'))\n\n if (!gate.ask) {\n return true\n }\n\n return await OxPrompt.open({\n type: 'warning',\n title: i18next.t('text.approval-is-irreversible'),\n text: gate.caveat,\n /* From the declaration, not a literal: this screen does not decide what is irreversible. */\n confirmButton: { text: i18next.t('button.approve'), destructive: gate.ask },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n }\n\n /*\n * Each decision sends the opinion written now and reads the approval again once it went through; its answer is not\n * kept (ADR-0190 decision 2). The opinion sent is cleared then, and a failure keeps it.\n */\n async rejectActivityApproval() {\n const { id } = this.activityApproval\n const comment = this.draft.value('comment')\n\n if (!comment) {\n document.dispatchEvent(new CustomEvent('notify', { detail: { message: i18next.t('text.enter a comment') } }))\n this.commentInput.focus()\n return\n }\n\n const rejected = await this.draft.submit(() => this.reject.run({ id, comment }))\n\n if (!rejected) {\n sayFailure(mutationOutcome(this.reject.error))\n return\n }\n\n document.dispatchEvent(\n new CustomEvent('notify', { detail: { message: i18next.t('text.task_is_rejected_successfully') } })\n )\n }\n\n async approveActivityApproval() {\n const { id } = this.activityApproval\n const comment = this.draft.value('comment')\n\n if (!(await this.confirmIfIrreversible())) {\n return\n }\n\n const approved = await this.draft.submit(() => this.approve.run({ id, comment }))\n\n if (!approved) {\n sayFailure(mutationOutcome(this.approve.error))\n return\n }\n\n document.dispatchEvent(\n new CustomEvent('notify', { detail: { message: i18next.t('text.task_is_approved_successfully') } })\n )\n }\n\n async saveActivityApproval() {\n const { id } = this.activityApproval\n const comment = this.draft.value('comment')\n\n const saved = await this.draft.submit(() => this.save.run({ id, comment }))\n\n if (!saved) {\n sayFailure(mutationOutcome(this.save.error))\n return\n }\n\n document.dispatchEvent(\n new CustomEvent('notify', { detail: { message: i18next.t('text.task_is_saved_successfully') } })\n )\n }\n}\n"]}
|
|
@@ -4,19 +4,20 @@ import { PageView } from '@operato/shell';
|
|
|
4
4
|
declare const ActivityCatalogPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
|
|
5
5
|
export declare class ActivityCatalogPage extends ActivityCatalogPage_base {
|
|
6
6
|
static styles: import("lit").CSSResult[];
|
|
7
|
-
private
|
|
8
|
-
private counts;
|
|
9
|
-
private todo;
|
|
10
|
-
private seatsStanding;
|
|
11
|
-
private seatsOffered;
|
|
12
|
-
private loadError;
|
|
7
|
+
private catalog;
|
|
13
8
|
get context(): {
|
|
14
9
|
title: string;
|
|
15
10
|
frame: string;
|
|
16
11
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
private
|
|
12
|
+
private get loadError();
|
|
13
|
+
private worded?;
|
|
14
|
+
private get doors();
|
|
15
|
+
private wordDoors;
|
|
16
|
+
private get read();
|
|
17
|
+
private get todo();
|
|
18
|
+
private get counts();
|
|
19
|
+
private get seatsStanding();
|
|
20
|
+
private get seatsOffered();
|
|
20
21
|
/** 결재선은 각 업무에서 지정하고, 역할이 부족할 때만 별도로 안내한다. */
|
|
21
22
|
private renderNext;
|
|
22
23
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { __decorate
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
2
|
import '@operato/list-state/ox-page-state.js';
|
|
3
3
|
import '@things-factory/organization/dist-client/component/approval-line-brief.js';
|
|
4
4
|
import gql from 'graphql-tag';
|
|
5
5
|
import { css, html } from 'lit';
|
|
6
|
-
import { customElement
|
|
7
|
-
import {
|
|
6
|
+
import { customElement } from 'lit/decorators.js';
|
|
7
|
+
import { QueryController } from '@operato/graphql';
|
|
8
8
|
import { i18next, localize } from '@operato/i18n';
|
|
9
9
|
import { PageView } from '@operato/shell';
|
|
10
10
|
import { DocumentPageStyles } from '@operato/styles';
|
|
@@ -94,11 +94,8 @@ const ORDER = { missing: 0, off: 1, on: 2, 'not-used': 3 };
|
|
|
94
94
|
let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(PageView) {
|
|
95
95
|
constructor() {
|
|
96
96
|
super(...arguments);
|
|
97
|
-
|
|
98
|
-
this.
|
|
99
|
-
this.seatsStanding = 0;
|
|
100
|
-
this.seatsOffered = 0;
|
|
101
|
-
this.loadError = null;
|
|
97
|
+
/* The doors and their counts (ADR-0190). */
|
|
98
|
+
this.catalog = new QueryController(this, CATALOG);
|
|
102
99
|
}
|
|
103
100
|
static { this.styles = [
|
|
104
101
|
DocumentPageStyles,
|
|
@@ -236,35 +233,25 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
|
|
|
236
233
|
frame: 'document'
|
|
237
234
|
};
|
|
238
235
|
}
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
/*
|
|
237
|
+
* 못 읽은 것을 빈 목록으로 그리지 않는다. 「업무가 하나도 없습니다」와 「못 읽었습니다」는 사람이 할
|
|
238
|
+
* 일이 다르다. ox-page-state 가 서버의 문장과 다시 읽기를 그린다(ADR-0060 결정 8).
|
|
239
|
+
*/
|
|
240
|
+
get loadError() {
|
|
241
|
+
return this.catalog.error ?? null;
|
|
241
242
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
get doors() {
|
|
244
|
+
const data = this.catalog.data;
|
|
245
|
+
if (!data || this.catalog.error)
|
|
246
|
+
return undefined;
|
|
247
|
+
if (this.worded?.data !== data)
|
|
248
|
+
this.worded = { data, doors: this.wordDoors(data) };
|
|
249
|
+
return this.worded.doors;
|
|
246
250
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
let response;
|
|
250
|
-
try {
|
|
251
|
-
response = await client.query({ query: CATALOG, fetchPolicy: 'no-cache' });
|
|
252
|
-
}
|
|
253
|
-
catch (error) {
|
|
254
|
-
this.loadError = error;
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
/*
|
|
258
|
-
* 못 읽은 것을 빈 목록으로 그리지 않는다. 「업무가 하나도 없습니다」와 「못 읽었습니다」는 사람이 할
|
|
259
|
-
* 일이 다르다. ox-page-state 가 서버의 문장과 다시 읽기를 그린다(ADR-0060 결정 8).
|
|
260
|
-
*/
|
|
261
|
-
if (response.errors?.length) {
|
|
262
|
-
this.loadError = response.errors[0];
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
const guides = new Map((response.data?.installableActivities?.items ?? []).map((one) => [one.name, one]));
|
|
251
|
+
wordDoors(data) {
|
|
252
|
+
const guides = new Map((data.installableActivities?.items ?? []).map((one) => [one.name, one]));
|
|
266
253
|
/* 전선의 철자를 여기서 **한 번** 옮긴다(§`door-words`). */
|
|
267
|
-
|
|
254
|
+
return (data.workDoors?.doors ?? []).map((one) => ({
|
|
268
255
|
...one,
|
|
269
256
|
standing: standingWord(one.standing) ?? one.standing,
|
|
270
257
|
kind: kindWord(one.kind) ?? one.kind,
|
|
@@ -273,17 +260,22 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
|
|
|
273
260
|
whenNoLineBecause: whenNoLineBecauseWord(one.whenNoLineBecause),
|
|
274
261
|
about: guideLines(guides.get(one.name), (key, options) => i18next.t(key, options))[0]
|
|
275
262
|
}));
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
this.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
263
|
+
}
|
|
264
|
+
get read() {
|
|
265
|
+
return this.catalog.data?.workDoors ?? {};
|
|
266
|
+
}
|
|
267
|
+
get todo() {
|
|
268
|
+
return this.read.todo ?? 0;
|
|
269
|
+
}
|
|
270
|
+
get counts() {
|
|
271
|
+
const read = this.read;
|
|
272
|
+
return { on: read.on ?? 0, off: read.off ?? 0, missing: read.missing ?? 0, notUsed: read.notUsed ?? 0, todo: this.todo };
|
|
273
|
+
}
|
|
274
|
+
get seatsStanding() {
|
|
275
|
+
return this.read.seatsStanding ?? 0;
|
|
276
|
+
}
|
|
277
|
+
get seatsOffered() {
|
|
278
|
+
return this.read.seatsOffered ?? 0;
|
|
287
279
|
}
|
|
288
280
|
/** 결재선은 각 업무에서 지정하고, 역할이 부족할 때만 별도로 안내한다. */
|
|
289
281
|
renderNext() {
|
|
@@ -307,7 +299,7 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
|
|
|
307
299
|
}
|
|
308
300
|
render() {
|
|
309
301
|
return html `<div class="page">
|
|
310
|
-
<ox-page-state .loading=${!this.doors && !this.loadError} .error=${this.loadError} @retry=${() => this.
|
|
302
|
+
<ox-page-state .loading=${!this.doors && !this.loadError} .error=${this.loadError} @retry=${() => this.catalog.refetch()}
|
|
311
303
|
>${this.doors && !this.loadError ? this.renderDoors() : ''}</ox-page-state
|
|
312
304
|
>
|
|
313
305
|
</div>`;
|
|
@@ -389,30 +381,6 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
|
|
|
389
381
|
`;
|
|
390
382
|
}
|
|
391
383
|
};
|
|
392
|
-
__decorate([
|
|
393
|
-
state(),
|
|
394
|
-
__metadata("design:type", Array)
|
|
395
|
-
], ActivityCatalogPage.prototype, "doors", void 0);
|
|
396
|
-
__decorate([
|
|
397
|
-
state(),
|
|
398
|
-
__metadata("design:type", Object)
|
|
399
|
-
], ActivityCatalogPage.prototype, "counts", void 0);
|
|
400
|
-
__decorate([
|
|
401
|
-
state(),
|
|
402
|
-
__metadata("design:type", Object)
|
|
403
|
-
], ActivityCatalogPage.prototype, "todo", void 0);
|
|
404
|
-
__decorate([
|
|
405
|
-
state(),
|
|
406
|
-
__metadata("design:type", Object)
|
|
407
|
-
], ActivityCatalogPage.prototype, "seatsStanding", void 0);
|
|
408
|
-
__decorate([
|
|
409
|
-
state(),
|
|
410
|
-
__metadata("design:type", Object)
|
|
411
|
-
], ActivityCatalogPage.prototype, "seatsOffered", void 0);
|
|
412
|
-
__decorate([
|
|
413
|
-
state(),
|
|
414
|
-
__metadata("design:type", Object)
|
|
415
|
-
], ActivityCatalogPage.prototype, "loadError", void 0);
|
|
416
384
|
ActivityCatalogPage = __decorate([
|
|
417
385
|
customElement('activity-catalog-page')
|
|
418
386
|
], ActivityCatalogPage);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-catalog-page.js","sourceRoot":"","sources":["../../../client/pages/activity-catalog/activity-catalog-page.ts"],"names":[],"mappings":";AAAA,OAAO,sCAAsC,CAAA;AAC7C,OAAO,2EAA2E,CAAA;AAElF,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAA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,OAAO,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;gBACzD,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;kBACzD;YACJ,CAAC,CAAC,EACN;;;KAGL,CAAA;IACH,CAAC;;AAzLgB;IAAhB,KAAK,EAAE;;kDAAuB;AACd;IAAhB,KAAK,EAAE;;mDAAgF;AACvE;IAAhB,KAAK,EAAE;;iDAAiB;AACR;IAAhB,KAAK,EAAE;;0DAA0B;AACjB;IAAhB,KAAK,EAAE;;yDAAyB;AAChB;IAAhB,KAAK,EAAE;;sDAAkC;AAzI/B,mBAAmB;IAD/B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,mBAAmB,CA8T/B","sourcesContent":["import '@operato/list-state/ox-page-state.js'\nimport '@things-factory/organization/dist-client/component/approval-line-brief.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { PageView } from '@operato/shell'\nimport { DocumentPageStyles } from '@operato/styles'\nimport { isApprovalStep } from '@things-factory/organization/dist-client'\n\nimport { guideLines } from './activity-guide.js'\nimport { detailAddress, opensDetail } from '../work-door/door-links.js'\nimport {\n DoorCounts,\n DoorFacts,\n doorLabel,\n doorsSummary,\n followsNote,\n lineNote,\n whenNoLineTag\n} from '../work-door/door-sentence.js'\nimport { kindWord, reasonWord, standingWord, whenNoLineBecauseWord, whenNoLineWord } from '../work-door/door-words.js'\n\n/**\n * 업무 카탈로그 — **이 사업장의 업무가 무엇을 하고, 누가 결재하나.**\n *\n * ═══════════════════════════════════════════════════════════════════════════\n * ── 두 화면을 하나로 (2026-10-18, 사용자 판단) ──────────────────────────────\n * 「결재·배정 양식 현황」과 「업무 양식 목록」이 같은 업무를 두 번 늘어놓았다. 앞은 결재선이 섰나를,\n * 뒤는 업무가 무엇인가를 말했고, 뒤에는 만드는 쪽이 읽는 값(모델 수 · 판단 키 · 시험 실행)이 섞여\n * 있었다. 틀은 앞 화면 것을 쓰고, 뒤에서는 업무 설명 한 줄만 가져왔다.\n *\n * ── 왜 이 화면이 있나 ──────────────────────────────────────────────────────\n * 양식은 제품이 세우고 **결재선은 그 사업장이 채운다.** 비어 있는 것은 결함이 아니라 선택인데, 그\n * 선택이 어디에도 안 보였다. 실측(2026-09-11): 미라텍에 양식 11개가 다 서 있고 11개 전부 결재자가\n * 없었다 — 실적 정정도 폐기도 승인 없이 반영되는데 화면에는 결재가 있는 것처럼 보였다.\n *\n * ── 결재선은 그려서 보인다 ─────────────────────────────────────────────────\n * 「…은 결재자 2명을 지납니다」는 몇 명인지만 말하고 누구인지는 안 말했다. 줄마다 결재선을 단계와\n * 이름으로 그린다 — 업무함 띠가 쓰는 organization 의 approval-line-brief 를 그대로 쓴다. 서버는 그\n * 업무가 실제로 거치는 결재선을 보낸다(다른 업무의 결재선을 따르면 그 업무의 것).\n *\n * ── 빈 결재선의 결과는 업무마다 선언돼 있다 ────────────────────────────────\n * `run` 업무는 상신하는 사람이 자기 건을 승인한 것이 되고, `refuse` 업무는 상신 자체가 거절된다\n * (ADR-0077). 결재선 밑 한 줄이 그것을 말한다.\n *\n * ── 할 일이 있는 것부터 ────────────────────────────────────────────────────\n * 정할 것이 남은 것을 위로 올린다. 같은 무리 안에서는 선언 순서를 지킨다.\n * ═══════════════════════════════════════════════════════════════════════════\n */\n\n/*\n * A step is asked for every field it carries, though this screen only draws it - organization's\n * approval-line-step-fields test holds every selection to the editor's set.\n */\nconst CATALOG = gql`\n {\n workDoors {\n todo\n on\n off\n missing\n notUsed\n seatsStanding\n seatsOffered\n doors {\n name\n labelKey\n kind\n standing\n reason\n approvers\n from\n whenNoLine\n whenNoLineBecause\n followsLabelKey\n assigneeRoles\n notUsedBecause\n approvalLine {\n type\n value\n participation\n notifyAfter\n approver {\n id\n name\n description\n controlNo\n }\n }\n }\n }\n installableActivities {\n items {\n name\n guide\n guideTKeys\n }\n }\n }\n`\n\ntype Door = DoorFacts & {\n kind: 'approval' | 'assignment'\n standing: 'on' | 'off' | 'missing' | 'not-used'\n from?: string\n approvalLine?: any[] | null\n /** What the activity is for - the first line of its declared guide, in the reader's language. */\n about?: string\n}\n\nconst ORDER: Record<Door['standing'], number> = { missing: 0, off: 1, on: 2, 'not-used': 3 }\n\n@customElement('activity-catalog-page')\nexport class ActivityCatalogPage extends localize(i18next)(PageView) {\n static styles = [\n DocumentPageStyles,\n css`\n /*\n * One activity, one row: what it is on the left, what it does and who approves on the right.\n * The rows share one grid (subgrid), so every right column starts at the same x.\n */\n .doors {\n display: grid;\n grid-template-columns: max-content minmax(0, 1fr);\n column-gap: var(--spacing-huge, 24px);\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .door {\n grid-column: 1 / -1;\n display: grid;\n grid-template-columns: subgrid;\n row-gap: var(--spacing-small, 4px);\n padding: var(--spacing-large, 12px) 0;\n border-top: 1px solid var(--md-sys-color-outline-variant);\n }\n\n .door:first-child {\n border-top: none;\n }\n\n @media (max-width: 600px) {\n .doors {\n grid-template-columns: minmax(0, 1fr);\n }\n }\n\n .what {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n gap: var(--spacing-small, 4px) var(--spacing-medium, 8px);\n }\n\n .name {\n font-weight: 600;\n }\n\n /* Kind in words: an empty approval line and an empty assignment line do opposite things. */\n .kind {\n color: var(--ui-muted);\n font-size: var(--ui-t-small, 11.5px);\n }\n\n /* The state says it in words as well as colour: colour alone says nothing to someone who cannot see it. */\n .mark {\n padding: 0 var(--spacing-small, 4px);\n border: 1px solid currentColor;\n border-radius: var(--md-sys-shape-corner-small, 4px);\n font-size: var(--ui-t-micro, 11px);\n font-weight: 600;\n line-height: 1.6;\n white-space: nowrap;\n }\n\n .mark.on {\n color: var(--md-sys-color-primary);\n }\n\n .mark.off {\n color: var(--md-sys-color-tertiary);\n }\n\n .mark.missing {\n color: var(--md-sys-color-error);\n }\n\n /* Not a task, so quieter. Not removed: that it was turned off has to be readable. */\n .mark.not-used {\n color: var(--md-sys-color-outline);\n }\n\n .door.not-used .what,\n .door.not-used .says {\n opacity: 0.7;\n }\n\n .says {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-small, 4px);\n min-width: 0;\n }\n\n .line {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-small, 4px) var(--spacing-large, 12px);\n }\n\n /*\n * The brief spreads its seats over the width it is given; a two-step line across a wide column\n * reads as three islands. Each seat gets about the width of a name.\n */\n approval-line-brief {\n flex: 0 1 auto;\n width: calc(var(--seats) * 88px);\n max-width: 100%;\n font-size: var(--ui-t-small, 11.5px);\n }\n\n .when,\n .from {\n color: var(--ui-muted);\n font-size: var(--ui-t-small, 11.5px);\n }\n\n .state {\n margin: 0 0 var(--spacing-medium, 8px);\n font-weight: 600;\n }\n\n ol.next {\n margin: 0;\n padding-left: var(--spacing-huge, 24px);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-medium, 8px);\n }\n `\n ]\n\n @state() private doors?: Door[]\n @state() private counts: DoorCounts = { on: 0, off: 0, missing: 0, notUsed: 0, todo: 0 }\n @state() private todo = 0\n @state() private seatsStanding = 0\n @state() private seatsOffered = 0\n @state() private loadError: unknown = null\n\n get context() {\n return {\n title: i18next.t('title.activity catalog'),\n frame: 'document'\n }\n }\n\n async pageInitialized() {\n await this.load()\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (lifecycle.active && !this.doors) {\n await this.load()\n }\n }\n\n private async load() {\n this.loadError = null\n\n let response: any\n try {\n response = await client.query({ query: CATALOG, fetchPolicy: 'no-cache' })\n } catch (error) {\n this.loadError = error\n return\n }\n\n /*\n * 못 읽은 것을 빈 목록으로 그리지 않는다. 「업무가 하나도 없습니다」와 「못 읽었습니다」는 사람이 할\n * 일이 다르다. ox-page-state 가 서버의 문장과 다시 읽기를 그린다(ADR-0060 결정 8).\n */\n if (response.errors?.length) {\n this.loadError = response.errors[0]\n return\n }\n\n const guides = new Map<string, any>(\n (response.data?.installableActivities?.items ?? []).map((one: any) => [one.name, one])\n )\n\n /* 전선의 철자를 여기서 **한 번** 옮긴다(§`door-words`). */\n this.doors = (response.data?.workDoors?.doors ?? []).map((one: any) => ({\n ...one,\n standing: standingWord(one.standing) ?? one.standing,\n kind: kindWord(one.kind) ?? one.kind,\n reason: reasonWord(one.reason) ?? one.reason,\n whenNoLine: whenNoLineWord(one.whenNoLine),\n whenNoLineBecause: whenNoLineBecauseWord(one.whenNoLineBecause),\n about: guideLines(guides.get(one.name), (key, options) => i18next.t(key, options))[0]\n }))\n\n const read = response.data?.workDoors ?? {}\n\n this.todo = read.todo ?? 0\n this.counts = {\n on: read.on ?? 0,\n off: read.off ?? 0,\n missing: read.missing ?? 0,\n notUsed: read.notUsed ?? 0,\n todo: this.todo\n }\n this.seatsStanding = read.seatsStanding ?? 0\n this.seatsOffered = read.seatsOffered ?? 0\n }\n\n /** 결재선은 각 업무에서 지정하고, 역할이 부족할 때만 별도로 안내한다. */\n private renderNext() {\n if (!this.todo || this.seatsStanding >= this.seatsOffered) {\n return ''\n }\n\n return html`\n <section class=\"page-section\">\n <div class=\"page-section-header\"><h3>${i18next.t('title.work-doors-next')}</h3></div>\n <ol class=\"next\">\n <li>\n ${i18next.t('text.work-doors-next-seats', {\n standing: this.seatsStanding,\n offered: this.seatsOffered\n })}\n <a class=\"page-nav-link\" href=\"roles\">${i18next.t('field.roles')}</a>\n </li>\n </ol>\n </section>\n `\n }\n\n render() {\n return html`<div class=\"page\">\n <ox-page-state .loading=${!this.doors && !this.loadError} .error=${this.loadError} @retry=${() => this.load()}\n >${this.doors && !this.loadError ? this.renderDoors() : ''}</ox-page-state\n >\n </div>`\n }\n\n private renderDoors() {\n const sorted = [...this.doors!].sort((a, b) => ORDER[a.standing] - ORDER[b.standing])\n\n return html`\n <section class=\"page-section\">\n <p class=\"state\">${doorsSummary(i18next.t, this.counts)}</p>\n <ul class=\"doors\">\n ${sorted.map(door => this.renderDoor(door))}\n </ul>\n </section>\n\n ${this.renderNext()}\n `\n }\n\n /**\n * Where 「결재선 지정」 goes: this activity's detail, or - when it follows another activity's line - that\n * activity's, since the line is set there. None for a form borrowed from another site.\n */\n private lineEditAddress(door: Door): string {\n if (door.kind !== 'approval' || (door.standing !== 'on' && door.standing !== 'off')) {\n return ''\n }\n\n const owner = door.followsLabelKey ? this.doors!.find(one => one.labelKey === door.followsLabelKey) : door\n\n return owner && opensDetail(owner) && opensDetail(door) ? detailAddress(owner.name) : ''\n }\n\n private renderDoor(door: Door) {\n const label = doorLabel(i18next.t, door)\n const steps = (door.approvalLine || []).filter(isApprovalStep).length\n const drawsLine = door.kind === 'approval' && steps > 0\n const note = lineNote(i18next.t, door, drawsLine)\n const follows = followsNote(i18next.t, door)\n const when = whenNoLineTag(i18next.t, door)\n const edit = this.lineEditAddress(door)\n\n return html`\n <li class=\"door ${door.standing}\">\n <div class=\"what\">\n ${opensDetail(door)\n ? html`<a class=\"name\" href=${detailAddress(door.name)}>${label}</a>`\n : html`<span class=\"name\">${label}</span>`}\n <span class=\"kind\">${i18next.t(`text.door-kind-${door.kind}`)}</span>\n <span class=\"mark ${door.standing}\">${i18next.t(`text.door-standing-${door.standing}`)}</span>\n </div>\n <div class=\"says\">\n ${door.about ? html`<span class=\"about\">${door.about}</span>` : ''}\n ${drawsLine || note || edit\n ? html`<div class=\"line\">\n ${drawsLine\n ? html`<approval-line-brief\n plan\n style=\"--seats: ${(door.approvalLine || []).length + 1}\"\n .model=${door.approvalLine}\n ></approval-line-brief>`\n : ''}\n ${note ? html`<span>${note}</span>` : ''}\n ${edit\n ? html`<a class=\"page-nav-link\" href=${edit}>${i18next.t('button.activity-set-approval-line')}</a>`\n : ''}\n </div>`\n : ''}\n ${follows ? html`<span class=\"when\">${follows}</span>` : ''}\n ${when ? html`<span class=\"when\">${when}</span>` : ''}\n ${\n /*\n * 남의 양식을 쓰는 것은 정상이지만, 안 말하면 「정한 적 없는데」가 된다. 차 있으면 어디서\n * 정했는지, 비어 있으면 여기서는 못 고친다는 것을 말한다.\n */\n door.from\n ? html`<span class=\"from\"\n >${door.standing === 'on'\n ? i18next.t('text.door-filled-from', { name: door.from })\n : i18next.t('text.door-form-from', { name: door.from })}</span\n >`\n : ''\n }\n </div>\n </li>\n `\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"activity-catalog-page.js","sourceRoot":"","sources":["../../../client/pages/activity-catalog/activity-catalog-page.ts"],"names":[],"mappings":";AAAA,OAAO,sCAAsC,CAAA;AAC7C,OAAO,2EAA2E,CAAA;AAElF,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAA;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,EAGL,SAAS,EACT,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,aAAa,EACd,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEtH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;GAGG;AACH,MAAM,OAAO,GAAG,GAA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IAAI,CAAA,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;kBACtC,IAAI;gBACJ,CAAC,CAAC,IAAI,CAAA,iCAAiC,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,mCAAmC,CAAC,MAAM;gBACnG,CAAC,CAAC,EAAE;qBACD;YACT,CAAC,CAAC,EAAE;YACJ,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA,sBAAsB,OAAO,SAAS,CAAC,CAAC,CAAC,EAAE;YACzD,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,sBAAsB,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;YACnD;QACA;;;WAGG;QACH,IAAI,CAAC,IAAI;YACP,CAAC,CAAC,IAAI,CAAA;qBACC,IAAI,CAAC,QAAQ,KAAK,IAAI;gBACvB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;gBACzD,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;kBACzD;YACJ,CAAC,CAAC,EACN;;;KAGL,CAAA;IACH,CAAC;;AApTU,mBAAmB;IAD/B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,mBAAmB,CAqT/B","sourcesContent":["import '@operato/list-state/ox-page-state.js'\nimport '@things-factory/organization/dist-client/component/approval-line-brief.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { QueryController } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { PageView } from '@operato/shell'\nimport { DocumentPageStyles } from '@operato/styles'\nimport { isApprovalStep } from '@things-factory/organization/dist-client'\n\nimport { guideLines } from './activity-guide.js'\nimport { detailAddress, opensDetail } from '../work-door/door-links.js'\nimport {\n DoorCounts,\n DoorFacts,\n doorLabel,\n doorsSummary,\n followsNote,\n lineNote,\n whenNoLineTag\n} from '../work-door/door-sentence.js'\nimport { kindWord, reasonWord, standingWord, whenNoLineBecauseWord, whenNoLineWord } from '../work-door/door-words.js'\n\n/**\n * 업무 카탈로그 — **이 사업장의 업무가 무엇을 하고, 누가 결재하나.**\n *\n * ═══════════════════════════════════════════════════════════════════════════\n * ── 두 화면을 하나로 (2026-10-18, 사용자 판단) ──────────────────────────────\n * 「결재·배정 양식 현황」과 「업무 양식 목록」이 같은 업무를 두 번 늘어놓았다. 앞은 결재선이 섰나를,\n * 뒤는 업무가 무엇인가를 말했고, 뒤에는 만드는 쪽이 읽는 값(모델 수 · 판단 키 · 시험 실행)이 섞여\n * 있었다. 틀은 앞 화면 것을 쓰고, 뒤에서는 업무 설명 한 줄만 가져왔다.\n *\n * ── 왜 이 화면이 있나 ──────────────────────────────────────────────────────\n * 양식은 제품이 세우고 **결재선은 그 사업장이 채운다.** 비어 있는 것은 결함이 아니라 선택인데, 그\n * 선택이 어디에도 안 보였다. 실측(2026-09-11): 미라텍에 양식 11개가 다 서 있고 11개 전부 결재자가\n * 없었다 — 실적 정정도 폐기도 승인 없이 반영되는데 화면에는 결재가 있는 것처럼 보였다.\n *\n * ── 결재선은 그려서 보인다 ─────────────────────────────────────────────────\n * 「…은 결재자 2명을 지납니다」는 몇 명인지만 말하고 누구인지는 안 말했다. 줄마다 결재선을 단계와\n * 이름으로 그린다 — 업무함 띠가 쓰는 organization 의 approval-line-brief 를 그대로 쓴다. 서버는 그\n * 업무가 실제로 거치는 결재선을 보낸다(다른 업무의 결재선을 따르면 그 업무의 것).\n *\n * ── 빈 결재선의 결과는 업무마다 선언돼 있다 ────────────────────────────────\n * `run` 업무는 상신하는 사람이 자기 건을 승인한 것이 되고, `refuse` 업무는 상신 자체가 거절된다\n * (ADR-0077). 결재선 밑 한 줄이 그것을 말한다.\n *\n * ── 할 일이 있는 것부터 ────────────────────────────────────────────────────\n * 정할 것이 남은 것을 위로 올린다. 같은 무리 안에서는 선언 순서를 지킨다.\n * ═══════════════════════════════════════════════════════════════════════════\n */\n\n/*\n * A step is asked for every field it carries, though this screen only draws it - organization's\n * approval-line-step-fields test holds every selection to the editor's set.\n */\nconst CATALOG = gql`\n {\n workDoors {\n todo\n on\n off\n missing\n notUsed\n seatsStanding\n seatsOffered\n doors {\n name\n labelKey\n kind\n standing\n reason\n approvers\n from\n whenNoLine\n whenNoLineBecause\n followsLabelKey\n assigneeRoles\n notUsedBecause\n approvalLine {\n type\n value\n participation\n notifyAfter\n approver {\n id\n name\n description\n controlNo\n }\n }\n }\n }\n installableActivities {\n items {\n name\n guide\n guideTKeys\n }\n }\n }\n`\n\ntype Door = DoorFacts & {\n kind: 'approval' | 'assignment'\n standing: 'on' | 'off' | 'missing' | 'not-used'\n from?: string\n approvalLine?: any[] | null\n /** What the activity is for - the first line of its declared guide, in the reader's language. */\n about?: string\n}\n\nconst ORDER: Record<Door['standing'], number> = { missing: 0, off: 1, on: 2, 'not-used': 3 }\n\n@customElement('activity-catalog-page')\nexport class ActivityCatalogPage extends localize(i18next)(PageView) {\n static styles = [\n DocumentPageStyles,\n css`\n /*\n * One activity, one row: what it is on the left, what it does and who approves on the right.\n * The rows share one grid (subgrid), so every right column starts at the same x.\n */\n .doors {\n display: grid;\n grid-template-columns: max-content minmax(0, 1fr);\n column-gap: var(--spacing-huge, 24px);\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .door {\n grid-column: 1 / -1;\n display: grid;\n grid-template-columns: subgrid;\n row-gap: var(--spacing-small, 4px);\n padding: var(--spacing-large, 12px) 0;\n border-top: 1px solid var(--md-sys-color-outline-variant);\n }\n\n .door:first-child {\n border-top: none;\n }\n\n @media (max-width: 600px) {\n .doors {\n grid-template-columns: minmax(0, 1fr);\n }\n }\n\n .what {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n gap: var(--spacing-small, 4px) var(--spacing-medium, 8px);\n }\n\n .name {\n font-weight: 600;\n }\n\n /* Kind in words: an empty approval line and an empty assignment line do opposite things. */\n .kind {\n color: var(--ui-muted);\n font-size: var(--ui-t-small, 11.5px);\n }\n\n /* The state says it in words as well as colour: colour alone says nothing to someone who cannot see it. */\n .mark {\n padding: 0 var(--spacing-small, 4px);\n border: 1px solid currentColor;\n border-radius: var(--md-sys-shape-corner-small, 4px);\n font-size: var(--ui-t-micro, 11px);\n font-weight: 600;\n line-height: 1.6;\n white-space: nowrap;\n }\n\n .mark.on {\n color: var(--md-sys-color-primary);\n }\n\n .mark.off {\n color: var(--md-sys-color-tertiary);\n }\n\n .mark.missing {\n color: var(--md-sys-color-error);\n }\n\n /* Not a task, so quieter. Not removed: that it was turned off has to be readable. */\n .mark.not-used {\n color: var(--md-sys-color-outline);\n }\n\n .door.not-used .what,\n .door.not-used .says {\n opacity: 0.7;\n }\n\n .says {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-small, 4px);\n min-width: 0;\n }\n\n .line {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-small, 4px) var(--spacing-large, 12px);\n }\n\n /*\n * The brief spreads its seats over the width it is given; a two-step line across a wide column\n * reads as three islands. Each seat gets about the width of a name.\n */\n approval-line-brief {\n flex: 0 1 auto;\n width: calc(var(--seats) * 88px);\n max-width: 100%;\n font-size: var(--ui-t-small, 11.5px);\n }\n\n .when,\n .from {\n color: var(--ui-muted);\n font-size: var(--ui-t-small, 11.5px);\n }\n\n .state {\n margin: 0 0 var(--spacing-medium, 8px);\n font-weight: 600;\n }\n\n ol.next {\n margin: 0;\n padding-left: var(--spacing-huge, 24px);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-medium, 8px);\n }\n `\n ]\n\n /* The doors and their counts (ADR-0190). */\n private catalog = new QueryController(this, CATALOG)\n\n get context() {\n return {\n title: i18next.t('title.activity catalog'),\n frame: 'document'\n }\n }\n\n /*\n * 못 읽은 것을 빈 목록으로 그리지 않는다. 「업무가 하나도 없습니다」와 「못 읽었습니다」는 사람이 할\n * 일이 다르다. ox-page-state 가 서버의 문장과 다시 읽기를 그린다(ADR-0060 결정 8).\n */\n private get loadError(): unknown {\n return this.catalog.error ?? null\n }\n\n /* The doors drawn from one answer, worded once per answer. */\n private worded?: { data: any; doors: Door[] }\n\n private get doors(): Door[] | undefined {\n const data = this.catalog.data\n if (!data || this.catalog.error) return undefined\n if (this.worded?.data !== data) this.worded = { data, doors: this.wordDoors(data) }\n return this.worded!.doors\n }\n\n private wordDoors(data: any): Door[] {\n const guides = new Map<string, any>((data.installableActivities?.items ?? []).map((one: any) => [one.name, one]))\n\n /* 전선의 철자를 여기서 **한 번** 옮긴다(§`door-words`). */\n return (data.workDoors?.doors ?? []).map((one: any) => ({\n ...one,\n standing: standingWord(one.standing) ?? one.standing,\n kind: kindWord(one.kind) ?? one.kind,\n reason: reasonWord(one.reason) ?? one.reason,\n whenNoLine: whenNoLineWord(one.whenNoLine),\n whenNoLineBecause: whenNoLineBecauseWord(one.whenNoLineBecause),\n about: guideLines(guides.get(one.name), (key, options) => i18next.t(key, options))[0]\n }))\n }\n\n private get read(): any {\n return this.catalog.data?.workDoors ?? {}\n }\n\n private get todo(): number {\n return this.read.todo ?? 0\n }\n\n private get counts(): DoorCounts {\n const read = this.read\n return { on: read.on ?? 0, off: read.off ?? 0, missing: read.missing ?? 0, notUsed: read.notUsed ?? 0, todo: this.todo }\n }\n\n private get seatsStanding(): number {\n return this.read.seatsStanding ?? 0\n }\n\n private get seatsOffered(): number {\n return this.read.seatsOffered ?? 0\n }\n\n /** 결재선은 각 업무에서 지정하고, 역할이 부족할 때만 별도로 안내한다. */\n private renderNext() {\n if (!this.todo || this.seatsStanding >= this.seatsOffered) {\n return ''\n }\n\n return html`\n <section class=\"page-section\">\n <div class=\"page-section-header\"><h3>${i18next.t('title.work-doors-next')}</h3></div>\n <ol class=\"next\">\n <li>\n ${i18next.t('text.work-doors-next-seats', {\n standing: this.seatsStanding,\n offered: this.seatsOffered\n })}\n <a class=\"page-nav-link\" href=\"roles\">${i18next.t('field.roles')}</a>\n </li>\n </ol>\n </section>\n `\n }\n\n render() {\n return html`<div class=\"page\">\n <ox-page-state .loading=${!this.doors && !this.loadError} .error=${this.loadError} @retry=${() => this.catalog.refetch()}\n >${this.doors && !this.loadError ? this.renderDoors() : ''}</ox-page-state\n >\n </div>`\n }\n\n private renderDoors() {\n const sorted = [...this.doors!].sort((a, b) => ORDER[a.standing] - ORDER[b.standing])\n\n return html`\n <section class=\"page-section\">\n <p class=\"state\">${doorsSummary(i18next.t, this.counts)}</p>\n <ul class=\"doors\">\n ${sorted.map(door => this.renderDoor(door))}\n </ul>\n </section>\n\n ${this.renderNext()}\n `\n }\n\n /**\n * Where 「결재선 지정」 goes: this activity's detail, or - when it follows another activity's line - that\n * activity's, since the line is set there. None for a form borrowed from another site.\n */\n private lineEditAddress(door: Door): string {\n if (door.kind !== 'approval' || (door.standing !== 'on' && door.standing !== 'off')) {\n return ''\n }\n\n const owner = door.followsLabelKey ? this.doors!.find(one => one.labelKey === door.followsLabelKey) : door\n\n return owner && opensDetail(owner) && opensDetail(door) ? detailAddress(owner.name) : ''\n }\n\n private renderDoor(door: Door) {\n const label = doorLabel(i18next.t, door)\n const steps = (door.approvalLine || []).filter(isApprovalStep).length\n const drawsLine = door.kind === 'approval' && steps > 0\n const note = lineNote(i18next.t, door, drawsLine)\n const follows = followsNote(i18next.t, door)\n const when = whenNoLineTag(i18next.t, door)\n const edit = this.lineEditAddress(door)\n\n return html`\n <li class=\"door ${door.standing}\">\n <div class=\"what\">\n ${opensDetail(door)\n ? html`<a class=\"name\" href=${detailAddress(door.name)}>${label}</a>`\n : html`<span class=\"name\">${label}</span>`}\n <span class=\"kind\">${i18next.t(`text.door-kind-${door.kind}`)}</span>\n <span class=\"mark ${door.standing}\">${i18next.t(`text.door-standing-${door.standing}`)}</span>\n </div>\n <div class=\"says\">\n ${door.about ? html`<span class=\"about\">${door.about}</span>` : ''}\n ${drawsLine || note || edit\n ? html`<div class=\"line\">\n ${drawsLine\n ? html`<approval-line-brief\n plan\n style=\"--seats: ${(door.approvalLine || []).length + 1}\"\n .model=${door.approvalLine}\n ></approval-line-brief>`\n : ''}\n ${note ? html`<span>${note}</span>` : ''}\n ${edit\n ? html`<a class=\"page-nav-link\" href=${edit}>${i18next.t('button.activity-set-approval-line')}</a>`\n : ''}\n </div>`\n : ''}\n ${follows ? html`<span class=\"when\">${follows}</span>` : ''}\n ${when ? html`<span class=\"when\">${when}</span>` : ''}\n ${\n /*\n * 남의 양식을 쓰는 것은 정상이지만, 안 말하면 「정한 적 없는데」가 된다. 차 있으면 어디서\n * 정했는지, 비어 있으면 여기서는 못 고친다는 것을 말한다.\n */\n door.from\n ? html`<span class=\"from\"\n >${door.standing === 'on'\n ? i18next.t('text.door-filled-from', { name: door.from })\n : i18next.t('text.door-form-from', { name: door.from })}</span\n >`\n : ''\n }\n </div>\n </li>\n `\n }\n}\n"]}
|
|
@@ -6,13 +6,14 @@ declare const ActivityDetailPage_base: (new (...args: any[]) => import("lit").Li
|
|
|
6
6
|
export declare class ActivityDetailPage extends ActivityDetailPage_base {
|
|
7
7
|
static styles: import("lit").CSSResult[];
|
|
8
8
|
private name;
|
|
9
|
-
private entry;
|
|
10
|
-
private activity;
|
|
11
|
-
private loaded;
|
|
12
9
|
/** 구획이 「이 업무에는 보일 것 없음」을 알렸나. 이름으로 센다. */
|
|
13
10
|
private emptyPanels;
|
|
11
|
+
private detail;
|
|
12
|
+
private get entry();
|
|
13
|
+
private get activity();
|
|
14
|
+
private get loaded();
|
|
14
15
|
/** 왜 못 읽었나 — ox-page-state 가 그것을 말하고 다시 시도를 준다. */
|
|
15
|
-
private loadError;
|
|
16
|
+
private get loadError();
|
|
16
17
|
get context(): {
|
|
17
18
|
frame: string;
|
|
18
19
|
title: string;
|
|
@@ -32,7 +33,7 @@ export declare class ActivityDetailPage extends ActivityDetailPage_base {
|
|
|
32
33
|
};
|
|
33
34
|
/**
|
|
34
35
|
* 이름이 주소로 온다. 같은 라우트 안에서 이름만 바뀌어도 이 콜백이 다시 오므로, **이름이 실제로
|
|
35
|
-
* 바뀌었을 때만**
|
|
36
|
+
* 바뀌었을 때만** 이름을 옮긴다. 읽기는 그 이름을 따른다.
|
|
36
37
|
*/
|
|
37
38
|
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
38
39
|
/**
|
|
@@ -53,7 +54,6 @@ export declare class ActivityDetailPage extends ActivityDetailPage_base {
|
|
|
53
54
|
firstUpdated(): void;
|
|
54
55
|
private readName;
|
|
55
56
|
private shownName;
|
|
56
|
-
private fetch;
|
|
57
57
|
render(): import("lit-html").TemplateResult<1>;
|
|
58
58
|
private renderDetail;
|
|
59
59
|
/** 알아 둘 것 — 첫 줄(무엇인가)을 뺀 안내문. 없으면 구획을 세우지 않는다. */
|