@things-factory/worklist 10.1.27 → 10.1.29

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.
Files changed (69) hide show
  1. package/approval-walk/harness.mjs +255 -0
  2. package/dist-client/pages/activity/activity-list-page.js +6 -11
  3. package/dist-client/pages/activity/activity-list-page.js.map +1 -1
  4. package/dist-client/pages/activity/activity-page.d.ts +6 -0
  5. package/dist-client/pages/activity/activity-page.js +173 -142
  6. package/dist-client/pages/activity/activity-page.js.map +1 -1
  7. package/dist-client/pages/activity/starter-list-page.js +6 -11
  8. package/dist-client/pages/activity/starter-list-page.js.map +1 -1
  9. package/dist-client/pages/activity-approval/activity-approval-list-page.js +6 -11
  10. package/dist-client/pages/activity-approval/activity-approval-list-page.js.map +1 -1
  11. package/dist-client/pages/activity-approval/activity-approval-page.d.ts +21 -4
  12. package/dist-client/pages/activity-approval/activity-approval-page.js +256 -173
  13. package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
  14. package/dist-client/pages/activity-catalog/activity-catalog-page.d.ts +6 -0
  15. package/dist-client/pages/activity-catalog/activity-catalog-page.js +43 -32
  16. package/dist-client/pages/activity-catalog/activity-catalog-page.js.map +1 -1
  17. package/dist-client/pages/activity-instance/activity-instance-list-page.js +79 -105
  18. package/dist-client/pages/activity-instance/activity-instance-list-page.js.map +1 -1
  19. package/dist-client/pages/activity-instance/activity-instance-search-page.js +3 -6
  20. package/dist-client/pages/activity-instance/activity-instance-search-page.js.map +1 -1
  21. package/dist-client/pages/activity-instance/activity-instance-start-page.d.ts +6 -0
  22. package/dist-client/pages/activity-instance/activity-instance-start-page.js +220 -161
  23. package/dist-client/pages/activity-instance/activity-instance-start-page.js.map +1 -1
  24. package/dist-client/pages/activity-stats/activity-stats-list-page.js +6 -11
  25. package/dist-client/pages/activity-stats/activity-stats-list-page.js.map +1 -1
  26. package/dist-client/pages/activity-store/activity-store-page.js +4 -11
  27. package/dist-client/pages/activity-store/activity-store-page.js.map +1 -1
  28. package/dist-client/pages/activity-supervisor/reporter-list-page.js +6 -11
  29. package/dist-client/pages/activity-supervisor/reporter-list-page.js.map +1 -1
  30. package/dist-client/pages/activity-template/activity-template-list-page.js +6 -11
  31. package/dist-client/pages/activity-template/activity-template-list-page.js.map +1 -1
  32. package/dist-client/pages/activity-thread/activity-thread-list-page.js +6 -11
  33. package/dist-client/pages/activity-thread/activity-thread-list-page.js.map +1 -1
  34. package/dist-client/pages/activity-thread/activity-thread-page.d.ts +7 -2
  35. package/dist-client/pages/activity-thread/activity-thread-page.js +101 -82
  36. package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
  37. package/dist-client/pages/activity-thread/activity-thread-view-page.d.ts +7 -2
  38. package/dist-client/pages/activity-thread/activity-thread-view-page.js +58 -23
  39. package/dist-client/pages/activity-thread/activity-thread-view-page.js.map +1 -1
  40. package/dist-client/pages/installable-activity/installable-activity-list-page.js +6 -11
  41. package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
  42. package/dist-client/pages/todo/approval-done-list-page.js +6 -11
  43. package/dist-client/pages/todo/approval-done-list-page.js.map +1 -1
  44. package/dist-client/pages/todo/approval-pending-list-page.js +4 -12
  45. package/dist-client/pages/todo/approval-pending-list-page.js.map +1 -1
  46. package/dist-client/pages/todo/done-list-calendar-page.js +4 -5
  47. package/dist-client/pages/todo/done-list-calendar-page.js.map +1 -1
  48. package/dist-client/pages/todo/done-list-page.js +6 -11
  49. package/dist-client/pages/todo/done-list-page.js.map +1 -1
  50. package/dist-client/pages/todo/draft-list-page.js +6 -11
  51. package/dist-client/pages/todo/draft-list-page.js.map +1 -1
  52. package/dist-client/pages/todo/pickable-list-page.js +6 -11
  53. package/dist-client/pages/todo/pickable-list-page.js.map +1 -1
  54. package/dist-client/pages/todo/todo-list-page.js +4 -11
  55. package/dist-client/pages/todo/todo-list-page.js.map +1 -1
  56. package/dist-client/tsconfig.tsbuildinfo +1 -1
  57. package/dist-server/service/activity/decision-key-declaration.d.ts +11 -2
  58. package/dist-server/service/activity/decision-key-declaration.js +22 -1
  59. package/dist-server/service/activity/decision-key-declaration.js.map +1 -1
  60. package/dist-server/service/installable-activity/installable-activity-query.d.ts +11 -0
  61. package/dist-server/service/installable-activity/installable-activity-query.js +31 -0
  62. package/dist-server/service/installable-activity/installable-activity-query.js.map +1 -1
  63. package/dist-server/tsconfig.tsbuildinfo +1 -1
  64. package/package.json +10 -11
  65. package/translations/en.json +27 -14
  66. package/translations/ja.json +27 -14
  67. package/translations/ko.json +27 -14
  68. package/translations/ms.json +27 -14
  69. package/translations/zh.json +27 -14
@@ -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,wDAAwD,CAAA;AAC/D,OAAO,mCAAmC,CAAA;AAC1C,OAAO,6CAA6C,CAAA;AACpD,OAAO,8CAA8C,CAAA;AAErD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAA;AAExD,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,iCAAiC,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAA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ynamic-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 { css, html, nothing, TemplateResult } 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 { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { provider } from '@operato/board/board-provider.js'\nimport { isReferenceStep } from '@things-factory/organization/dist-client'\n\nimport {\n ActivityFieldsStyles,\n declaredLabel,\n fieldValue,\n inputSpecOf,\n outputSpecOf,\n renderGiven\n} from '../../components/activity-fields.js'\nimport {\n DecisionSlot,\n decisionSlots,\n reversibilityIsMalformed,\n reversibilityOf,\n slotOfRole,\n slotsOfRole\n} 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 { name\n }\n judgment\n comment\n createdAt\n updatedAt\n terminatedAt\n }\n activityThreadHistories { transaction\n reason\n updater { 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 decisionKeys { role\n inputPath\n tKey\n unit\n }\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 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 = { Unassigned: 'unassigned',\n Assigned: 'assigned',\n Started: 'started',\n Delegated: 'delegated',\n Ended: 'ended',\n Aborted: 'aborted'\n}\n\n@customElement('activity-approval-page')\nexport class ActivityApprovalPage extends localize(i18next)(PageView) { static styles = [\n ScrollbarStyles,\n ActivityFieldsStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n position: relative;\n\n width: 100%;\n overflow: auto;\n background: var(--ui-bg, #f0f2f4);\n color: var(--ui-ink, #17242c);\n font-size: var(--ui-t-body, 13px);\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 * The decision, drawn from the activity's declaration.\n *\n * The order is the declaration's and the weight descends with it: what is being asked reads\n * first at title size, then what it is about, then the words a person wrote, then what changes\n * on approval, and last why it came up at all.\n */\n section[decision] .headline {\n font-size: var(--ui-t-headline, 19px);\n font-weight: 600;\n line-height: 1.35;\n color: var(--ui-ink, #17242c);\n word-break: keep-all;\n }\n\n section[decision] .subject {\n margin-top: 3px;\n font-family: var(--ui-mono, ui-monospace, Menlo, monospace);\n font-size: var(--ui-t-body, 13px);\n color: var(--ui-muted, #57676f);\n }\n\n section[decision] .block {\n margin-top: 14px;\n }\n\n section[decision] .block > .label {\n margin-bottom: 4px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n }\n\n /* What a person wrote is set apart, because it is the only part nobody computed. */\n section[decision] .said {\n padding: 9px 11px;\n border-left: 3px solid var(--ui-line, #d5dce0);\n background: var(--ui-line-soft, #f2f5f7);\n color: var(--ui-ink, #17242c);\n word-break: break-word;\n }\n\n section[decision] .none {\n color: var(--ui-faint, #8a959c);\n }\n\n section[decision] .consequence {\n margin-top: 8px;\n padding: 9px 11px;\n border: 1px solid var(--ui-line, #d5dce0);\n border-radius: var(--ui-r-small, 6px);\n }\n\n section[decision] .consequence > .label {\n margin-bottom: 3px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n }\n\n /*\n * Whether approving can be undone reads as the frame around the decision, not as one of its\n * consequences. Among them it carries the same weight as \"four orders get pushed back\", and\n * on an approval that moves equipment it is the heaviest line on the screen.\n */\n section[decision] .reversibility {\n display: flex;\n align-items: center;\n gap: 6px;\n\n margin-top: 12px;\n padding: 8px 11px;\n border-radius: var(--ui-r-small, 6px);\n\n background: var(--ui-line-soft, #f2f5f7);\n color: var(--ui-muted, #57676f);\n font-size: var(--ui-t-small, 11.5px);\n }\n\n section[decision] .reversibility[irreversible] {\n background: var(--md-sys-color-error-container, #ffdad6);\n color: var(--md-sys-color-on-error-container, #410002);\n font-weight: 600;\n }\n\n section[decision] .reversibility md-icon {\n font-size: 1.15em;\n }\n\n /*\n * What the decision was made from. Set flatter than the consequences — it is the record the\n * approver checks, not something the approval brings about.\n */\n section[decision] .evidence {\n margin-top: 8px;\n padding: 7px 0 7px 11px;\n border-left: 2px solid var(--ui-line, #d5dce0);\n }\n\n section[decision] .evidence > .label {\n margin-bottom: 2px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n }\n\n /*\n * What is true right now sits apart from what the approval would change. Sharing the box the\n * consequences use would say the approval causes these readings.\n */\n section[decision] .current-state {\n margin-top: 14px;\n padding: 9px 11px;\n border: 1px dashed var(--ui-line, #d5dce0);\n border-radius: var(--ui-r-small, 6px);\n }\n\n section[decision] .current-state > .label {\n margin-bottom: 3px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n }\n\n `\n ]\n\n @state() activityApproval: any\n /**\n * 조회를 마쳤나 — **「아직 안 읽었다」와 「없다」는 다르다.**\n *\n * 전에는 값이 없으면 곧바로 「업무활동 정보가 없습니다」를 그렸다. 그런데 이 화면은 열리자마자\n * 조회를 시작하므로, 응답이 오기 전까지 **없다고 단언하는 화면**이 보인다. 목록에서 줄을 눌러\n * 들어온 사람은 방금 본 건이 없다는 말을 먼저 읽는다.\n *\n * 조회가 끝난 뒤에만 그 말을 한다. 그 전에는 아무 말도 하지 않는다.\n */\n @state() loaded = false\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() { const judgment = this.activityApproval?.judgment\n\n return { 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 { title: i18next.t('button.close'),\n action: () => { history.back()\n },\n ...CommonButtonStyles.back\n }\n ]\n : this.isReference\n ? [\n {\n title: i18next.t('button.save-note'),\n action: this.saveActivityApproval.bind(this),\n icon: 'edit_note',\n emphasis: { raised: true, outlined: false, dense: false, danger: false }\n },\n {\n title: i18next.t('button.close'),\n action: () => {\n history.back()\n },\n ...CommonButtonStyles.back,\n icon: 'close'\n }\n ]\n : /*\n * ── 세 단추의 순서와 무게 (2026-09-06) ──────────────────────────\n * 전에는 반려가 첫 자리였고, 승인 · 반려 · 저장이 모두 같은 모양이었다. 되돌리기 어려운\n * 것이 앞에 서고 무엇이 주된 흐름인지 화면이 말하지 않았다.\n *\n * 승인이 주 동작이다 — 채운 단추 하나. 반려는 대등한 선택이지만 예외 경로라 테두리\n * 단추로 그 옆에 둔다.\n *\n * 「저장」은 이름이 뜻을 말하지 않았다. 이 단추가 저장하는 것은 **의견 하나**이고\n * (saveActivityApproval 은 id 와 comment 만 보낸다), 판단은 미뤄 둔다. 그리고 그 결과는\n * 목록에서 「메모 있음」 표식으로 나타난다(activity-cells 의 approvalMarks). 목록이\n * 부르는 이름과 같은 낱말로 맞춘다.\n */\n [\n { title: i18next.t('button.approve'),\n action: this.approveActivityApproval.bind(this),\n icon: 'approval',\n emphasis: { raised: true,\n outlined: false,\n dense: false,\n 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,\n outlined: true,\n dense: false,\n danger: false\n }\n },\n\n { title: i18next.t('button.save-note'),\n action: this.saveActivityApproval.bind(this),\n icon: 'edit_note',\n emphasis: { raised: false,\n outlined: true,\n dense: false,\n danger: false\n }\n },\n { title: i18next.t('button.close'),\n action: () => { history.back()\n },\n ...CommonButtonStyles.back,\n icon: 'close'\n }\n ]\n // activityApproval: this.activityApproval\n }\n }\n\n render() { if (!this.activityThread) {\n return 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 }\n\n const { terminatedAt } = this.activityApproval\n const editable = !terminatedAt\n\n return html`\n <activity-approval-ribon .activityApproval=${this.activityApproval}></activity-approval-ribon>\n ${this.activityContent()}\n <!--\n 보일 항목이 하나도 없으면 타임라인을 편다 — 그때는 화면이 「아래 타임라인의 상신 사유와\n 이력을 보고 판단하세요」로 여기를 가리키므로, 접혀 있으면 그 안내가 거짓말이 된다.\n -->\n <activity-thread-timeline\n .activityThread=${this.activityThread}\n ?open=${!this.hasFields()}\n short-form\n ></activity-thread-timeline>\n ${editable\n ? html`\n <div comment>\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 @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 </section>\n </div>\n `\n : nothing}\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() { switch (this.activityThread?.activityInstance?.viewType) { 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() { if (!this.activityApproval) { 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 /**\n * The decision the activity declared, or nothing when it declared none.\n *\n * Returning nothing is how generatedContent knows to fall back to the model. An activity with no\n * decisionKeys draws exactly what it drew before.\n *\n * A slot whose path led nowhere is skipped rather than drawn empty. Older instances of an activity\n * predate a field the declaration names and an empty\n * bar on the screen would read as \"there is no reason\" when the truth is that this record has no\n * such value. What cannot be shown is left out; what is shown is only what the payload actually\n * carries.\n *\n * `reason` is the exception. Missing and blank mean the same thing to whoever is reading — nobody\n * wrote one — so both draw the grey line rather than disappearing. A reason that silently vanishes\n * would let an approver assume it was never asked for.\n */\n decisionContent() {\n const { activityInstance } = this.activityThread || {}\n const slots = decisionSlots(activityInstance?.activity?.decisionKeys, activityInstance?.input)\n\n if (!slots.length) {\n return nothing\n }\n\n const headline = slotOfRole(slots, 'headline')\n const subject = slotOfRole(slots, 'subject')\n const reason = slotOfRole(slots, 'reason')\n const consequences = slotsOfRole(slots, 'consequence').filter(slot => slot.found)\n const evidence = slotsOfRole(slots, 'evidence').filter(slot => slot.found)\n const currentState = slotOfRole(slots, 'currentState')\n const reversibility = slotOfRole(slots, 'reversibility')\n\n const drawable =\n [headline, subject, currentState].some(slot => slot?.found) ||\n !!reason ||\n consequences.length ||\n evidence.length ||\n reversibilityOf(reversibility) !== undefined\n\n /*\n * Every declared slot missed this payload. Saying so is not this screen's job — falling back to\n * the model at least shows the values that are there, and the reader is no worse off than before\n * the declaration existed.\n */\n if (!drawable) {\n return nothing\n }\n\n return keyed(\n this.activityApproval.id,\n html`\n <section decision>\n ${headline?.found ? html`<div class=\"headline\">${this.slotText(headline)}</div>` : ''}\n ${subject?.found ? html`<div class=\"subject\">${this.slotText(subject)}</div>` : ''}\n ${reason\n ? html`\n <div class=\"block\">\n <div class=\"label\">${i18next.t('field.reason')}</div>\n <div class=\"said ${this.hasWords(reason) ? '' : 'none'}\">\n ${this.hasWords(reason) ? this.slotText(reason) : i18next.t('text.no-reason-given')}\n </div>\n </div>\n `\n : ''}\n ${this.renderReversibility(reversibility)}\n ${evidence.length\n ? html`\n <div class=\"block\">\n <div class=\"label\">${i18next.t('label.what-it-was-judged-from')}</div>\n ${evidence.map(\n slot => html`\n <div class=\"evidence\">\n ${declaredLabel(slot) ? html`<div class=\"label\">${declaredLabel(slot)}</div>` : ''}\n <div>${this.slotText(slot)}</div>\n </div>\n `\n )}\n </div>\n `\n : ''}\n ${currentState?.found\n ? html`\n <div class=\"current-state\">\n <div class=\"label\">${declaredLabel(currentState) || i18next.t('label.current-state')}</div>\n <div>${this.slotText(currentState)}</div>\n </div>\n `\n : ''}\n ${consequences.length\n ? html`\n <div class=\"block\">\n <div class=\"label\">${i18next.t('label.what-changes')}</div>\n ${consequences.map(\n slot => html`\n <div class=\"consequence\">\n ${declaredLabel(slot) ? html`<div class=\"label\">${declaredLabel(slot)}</div>` : ''}\n <div>${this.slotText(slot)}</div>\n </div>\n `\n )}\n </div>\n `\n : ''}\n </section>\n `\n )\n }\n\n /**\n * Whether approving can be undone, drawn as the frame around the decision.\n *\n * Only an explicit true or false draws. Anything else — the path led nowhere, or the value is not\n * a boolean — draws nothing, because saying \"this can be undone\" on a screen that does not know is\n * the one mistake this line must never make.\n *\n * This is not rejectionIsFinal. That one says whether **rejecting** ends the case for good; this\n * says whether **approving** can be taken back. The twin actuation carries both, which is exactly\n * why they must not share a sentence.\n */\n private renderReversibility(slot?: DecisionSlot) {\n const said = reversibilityOf(slot)\n\n if (!said) {\n if (reversibilityIsMalformed(slot)) {\n /*\n * Declared, and the value is there, but not the shape this role takes — a bare sentence\n * where { reversible, caveat } belongs. Nothing is drawn, because this side cannot tell\n * which way it goes; the log is so a developer does not have to find it by hand, which is\n * how it was found the first time.\n */\n console.error(\n `[worklist] reversibility at \"${slot?.inputPath}\" is not { reversible, caveat } — nothing drawn`\n )\n }\n\n return ''\n }\n\n /*\n * The module's own sentence when it wrote one. 「버린 자재는 돌아오지 않습니다」 says why, which\n * the plain wording cannot; the boolean beside it is what decides how heavily this is drawn.\n */\n return html`\n <div class=\"reversibility\" ?irreversible=${!said.reversible}>\n <md-icon>${said.reversible ? 'undo' : 'lock'}</md-icon>\n <span\n >${said.caveat ||\n i18next.t(said.reversible ? 'text.approval-is-reversible' : 'text.approval-is-irreversible')}</span\n >\n </div>\n `\n }\n\n /**\n * One slot's value as something to read.\n *\n * A scalar prints with its unit when one was declared. Anything shaped — an object, a list — goes\n * through fieldValue, the same laying-out the model sections use, so a payload reads the same way\n * wherever it appears and a four-level object does not become one long line.\n *\n * ── The sentence is built here, not frozen when the request was raised ──\n * Eighteen doors write a Korean sentence at issue and the issue snapshots it, so it stands in the\n * language of whoever raised it and an approver reading another language never catches up. Where\n * a door declares `valueTKey`, the sentence is made at reading time instead, out of the values\n * the request did freeze.\n *\n * **A door that has not moved yet draws exactly what it drew before.** That is what lets plant\n * move them one at a time instead of eighteen at once, and it covers a door that moved into a\n * locale nobody has written yet: an empty `defaultValue` means a missing key falls through to the\n * frozen sentence rather than printing `approval.…` on the card.\n */\n private slotText(slot: DecisionSlot): unknown {\n const said = this.sentenceOf(slot)\n\n if (said) {\n return said\n }\n\n const scalar = slot.value !== null && slot.value !== undefined && typeof slot.value !== 'object'\n\n if (scalar && slot.unit) {\n return `${slot.value} ${slot.unit}`\n }\n\n return scalar ? String(slot.value) : fieldValue(slot.value)\n }\n\n /** The sentence this slot declares, when it declares one and the locale has it. */\n private sentenceOf(slot: DecisionSlot): string {\n if (!slot.valueTKey) {\n return ''\n }\n\n return String(i18next.t(slot.valueTKey, { ...(slot.params || {}), defaultValue: '' }) || '')\n }\n\n /** Did a person actually write something here. Whitespace is not words. */\n private hasWords(slot: DecisionSlot): boolean {\n return typeof slot.value === 'string' ? slot.value.trim().length > 0 : slot.found && slot.value != null\n }\n\n generatedContent(): DirectiveResult { if (!this.activityApproval) { 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 ${inputSpec.length\n ? html`\n <section readonly>\n <h2>${i18next.t('label.activity-input')}</h2>\n ${renderGiven(inputSpec, input)}\n </section>\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 boardContent(): DirectiveResult { if (!this.activityApproval) { 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) { this.board = { id: boardId\n }\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() { if (!this.activityApproval) { 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() { const outputSpec = outputSpecOf(this.activityThread?.activityInstance?.activity?.model)\n const data = this.oxBoardViewer.getSceneValues()\n\n return outputSpec.reduce((output, spec) => { 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) { if (changes.has('activityApproval')) { this.updateContext()\n this.focusComment()\n }\n }\n\n async pageUpdated(changes, lifecycle, changedBefore) { if (this.active && lifecycle.resourceId) { this.fetchActivityApproval(lifecycle.resourceId)\n }\n }\n\n async fetchActivityApproval(id) { const response = await client.query({ query: gql`\n query activityApproval($id: String!) { activityApproval(id: $id) ${ActivityApprovalFetchResult}\n }\n `,\n variables: { id\n }\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() { var { id, comment } = this.activityApproval\n\n if (!comment) { document.dispatchEvent(\n new CustomEvent('notify', { detail: { message: i18next.t('text.enter a comment')\n }\n })\n )\n this.commentInput.focus()\n return\n }\n\n const outcome = await ranMutation(() => client.mutate({ mutation: gql`\n mutation ($id: String!, $comment: String!) { rejectActivityApproval(id: $id, comment: $comment) ${ActivityApprovalFetchResult}\n }\n `,\n variables: { id,\n comment\n }\n }))\n\n if (outcome.ok) { 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 }\n\n async approveActivityApproval() { var { id, comment } = this.activityApproval\n\n if (!(await this.confirmIfIrreversible())) {\n return\n }\n\n const outcome = await ranMutation(() => client.mutate({ mutation: gql`\n mutation ($id: String!, $comment: String) { approveActivityApproval(id: $id, comment: $comment) ${ActivityApprovalFetchResult}\n }\n `,\n variables: { id,\n comment\n }\n }))\n\n if (outcome.ok) { 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 }\n\n async saveActivityApproval() { var { id, comment } = this.activityApproval\n\n const outcome = await ranMutation(() => client.mutate({ mutation: gql`\n mutation ($id: String!, $comment: String) { saveActivityApproval(id: $id, comment: $comment) ${ActivityApprovalFetchResult}\n }\n `,\n variables: { id,\n comment\n }\n }))\n\n if (outcome.ok) { 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 }\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,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,iCAAiC,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gB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AAa,EAAE,CAAA;YAEpB,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;QACH,CAAC;IACH,CAAC;;AAl1BQ;IAAR,KAAK,EAAE;;8DAAsB;AAOb;IAAhB,KAAK,EAAE;;oDAAuB;AAWtB;IAAR,KAAK,EAAE;;oDAAe;AAEd;IAAR,KAAK,EAAE;;uDAA0B;AAGzB;IAAR,KAAK,EAAE;;4DAAoB;AACnB;IAAR,KAAK,EAAE;;mDAAW;AAEA;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAgB,mBAAmB;IAErD;;;;;;;;;;;;OAYG;;0DAdkD;AA2nB3B;IAAzB,KAAK,CAAC,iBAAiB,CAAC;;2DAAmB;AAv7BjC,oBAAoB;IADhC,aAAa,CAAC,wBAAwB,CAAC;GAC3B,oBAAoB,CAqnChC","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 {\n ActivityFieldsStyles,\n declaredLabel,\n fieldValue,\n inputSpecOf,\n outputSpecOf,\n renderGiven\n} from '../../components/activity-fields.js'\nimport {\n DecisionSlot,\n decisionSlots,\n reversibilityIsMalformed,\n reversibilityOf,\n slotOfRole,\n slotsOfRole\n} 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 { name\n }\n judgment\n comment\n createdAt\n updatedAt\n terminatedAt\n }\n activityThreadHistories { transaction\n reason\n updater { 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 decisionKeys { role\n inputPath\n tKey\n unit\n }\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 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 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 * The decision, drawn from the activity's declaration.\n *\n * The order is the declaration's and the weight descends with it: what is being asked reads\n * first at title size, then what it is about, then the words a person wrote, then what changes\n * on approval, and last why it came up at all.\n */\n section[decision] .headline {\n font-size: var(--ui-t-headline, 19px);\n font-weight: 600;\n line-height: 1.35;\n color: var(--ui-ink, #17242c);\n word-break: keep-all;\n }\n\n section[decision] .subject {\n margin-top: 3px;\n font-family: var(--ui-mono, ui-monospace, Menlo, monospace);\n font-size: var(--ui-t-body, 13px);\n color: var(--ui-muted, #57676f);\n }\n\n section[decision] .block {\n margin-top: 14px;\n }\n\n section[decision] .block > .label {\n margin-bottom: 4px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n }\n\n /* What a person wrote is set apart, because it is the only part nobody computed. */\n section[decision] .said {\n padding: 9px 11px;\n border-left: 3px solid var(--ui-line, #d5dce0);\n background: var(--ui-line-soft, #f2f5f7);\n color: var(--ui-ink, #17242c);\n word-break: break-word;\n }\n\n section[decision] .none {\n color: var(--ui-faint, #8a959c);\n }\n\n section[decision] .consequence {\n margin-top: 8px;\n padding: 9px 11px;\n border: 1px solid var(--ui-line, #d5dce0);\n border-radius: var(--ui-r-small, 6px);\n }\n\n section[decision] .consequence > .label {\n margin-bottom: 3px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n }\n\n /*\n * Whether approving can be undone reads as the frame around the decision, not as one of its\n * consequences. Among them it carries the same weight as \"four orders get pushed back\", and\n * on an approval that moves equipment it is the heaviest line on the screen.\n */\n section[decision] .reversibility {\n display: flex;\n align-items: center;\n gap: 6px;\n\n margin-top: 12px;\n padding: 8px 11px;\n border-radius: var(--ui-r-small, 6px);\n\n background: var(--ui-line-soft, #f2f5f7);\n color: var(--ui-muted, #57676f);\n font-size: var(--ui-t-small, 11.5px);\n }\n\n section[decision] .reversibility[irreversible] {\n background: var(--md-sys-color-error-container, #ffdad6);\n color: var(--md-sys-color-on-error-container, #410002);\n font-weight: 600;\n }\n\n section[decision] .reversibility md-icon {\n font-size: 1.15em;\n }\n\n /*\n * What the decision was made from. Set flatter than the consequences — it is the record the\n * approver checks, not something the approval brings about.\n */\n section[decision] .evidence {\n margin-top: 8px;\n padding: 7px 0 7px 11px;\n border-left: 2px solid var(--ui-line, #d5dce0);\n }\n\n section[decision] .evidence > .label {\n margin-bottom: 2px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n }\n\n /*\n * What is true right now sits apart from what the approval would change. Sharing the box the\n * consequences use would say the approval causes these readings.\n */\n section[decision] .current-state {\n margin-top: 14px;\n padding: 9px 11px;\n border: 1px dashed var(--ui-line, #d5dce0);\n border-radius: var(--ui-r-small, 6px);\n }\n\n section[decision] .current-state > .label {\n margin-bottom: 3px;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\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\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 * ── 세 단추의 순서와 무게 (2026-09-06) ──────────────────────────\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 @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 /**\n * The decision the activity declared, or nothing when it declared none.\n *\n * Returning nothing is how generatedContent knows to fall back to the model. An activity with no\n * decisionKeys draws exactly what it drew before.\n *\n * A slot whose path led nowhere is skipped rather than drawn empty. Older instances of an activity\n * predate a field the declaration names and an empty\n * bar on the screen would read as \"there is no reason\" when the truth is that this record has no\n * such value. What cannot be shown is left out; what is shown is only what the payload actually\n * carries.\n *\n * `reason` is the exception. Missing and blank mean the same thing to whoever is reading — nobody\n * wrote one — so both draw the grey line rather than disappearing. A reason that silently vanishes\n * would let an approver assume it was never asked for.\n */\n decisionContent() {\n const { activityInstance } = this.activityThread || {}\n const slots = decisionSlots(activityInstance?.activity?.decisionKeys, activityInstance?.input)\n\n if (!slots.length) {\n return nothing\n }\n\n const headline = slotOfRole(slots, 'headline')\n const subject = slotOfRole(slots, 'subject')\n const reason = slotOfRole(slots, 'reason')\n const consequences = slotsOfRole(slots, 'consequence').filter(slot => slot.found)\n const evidence = slotsOfRole(slots, 'evidence').filter(slot => slot.found)\n const currentState = slotOfRole(slots, 'currentState')\n const reversibility = slotOfRole(slots, 'reversibility')\n\n const drawable =\n [headline, subject, currentState].some(slot => slot?.found) ||\n !!reason ||\n consequences.length ||\n evidence.length ||\n reversibilityOf(reversibility) !== undefined\n\n /*\n * Every declared slot missed this payload. Saying so is not this screen's job — falling back to\n * the model at least shows the values that are there, and the reader is no worse off than before\n * the declaration existed.\n */\n if (!drawable) {\n return nothing\n }\n\n return keyed(\n this.activityApproval.id,\n html`\n <section decision>\n ${headline?.found ? html`<div class=\"headline\">${this.slotText(headline)}</div>` : ''}\n ${subject?.found ? html`<div class=\"subject\">${this.slotText(subject)}</div>` : ''}\n ${\n reason\n ? html`\n <div class=\"block\">\n <div class=\"label\">${i18next.t('field.reason')}</div>\n <div class=\"said ${this.hasWords(reason) ? '' : 'none'}\">\n ${this.hasWords(reason) ? this.slotText(reason) : i18next.t('text.no-reason-given')}\n </div>\n </div>\n `\n : ''\n }\n ${this.renderReversibility(reversibility)}\n ${\n evidence.length\n ? html`\n <div class=\"block\">\n <div class=\"label\">${i18next.t('label.what-it-was-judged-from')}</div>\n ${evidence.map(\n slot => html`\n <div class=\"evidence\">\n ${declaredLabel(slot) ? html`<div class=\"label\">${declaredLabel(slot)}</div>` : ''}\n <div>${this.slotText(slot)}</div>\n </div>\n `\n )}\n </div>\n `\n : ''\n }\n ${\n currentState?.found\n ? html`\n <div class=\"current-state\">\n <div class=\"label\">${declaredLabel(currentState) || i18next.t('label.current-state')}</div>\n <div>${this.slotText(currentState)}</div>\n </div>\n `\n : ''\n }\n ${\n consequences.length\n ? html`\n <div class=\"block\">\n <div class=\"label\">${i18next.t('label.what-changes')}</div>\n ${consequences.map(\n slot => html`\n <div class=\"consequence\">\n ${declaredLabel(slot) ? html`<div class=\"label\">${declaredLabel(slot)}</div>` : ''}\n <div>${this.slotText(slot)}</div>\n </div>\n `\n )}\n </div>\n `\n : ''\n }\n </section>\n `\n )\n }\n\n /**\n * Whether approving can be undone, drawn as the frame around the decision.\n *\n * Only an explicit true or false draws. Anything else — the path led nowhere, or the value is not\n * a boolean — draws nothing, because saying \"this can be undone\" on a screen that does not know is\n * the one mistake this line must never make.\n *\n * This is not rejectionIsFinal. That one says whether **rejecting** ends the case for good; this\n * says whether **approving** can be taken back. The twin actuation carries both, which is exactly\n * why they must not share a sentence.\n */\n private renderReversibility(slot?: DecisionSlot) {\n const said = reversibilityOf(slot)\n\n if (!said) {\n if (reversibilityIsMalformed(slot)) {\n /*\n * Declared, and the value is there, but not the shape this role takes — a bare sentence\n * where { reversible, caveat } belongs. Nothing is drawn, because this side cannot tell\n * which way it goes; the log is so a developer does not have to find it by hand, which is\n * how it was found the first time.\n */\n console.error(`[worklist] reversibility at \"${slot?.inputPath}\" is not { reversible, caveat } — nothing drawn`)\n }\n\n return ''\n }\n\n /*\n * The module's own sentence when it wrote one. 「버린 자재는 돌아오지 않습니다」 says why, which\n * the plain wording cannot; the boolean beside it is what decides how heavily this is drawn.\n */\n return html`\n <div class=\"reversibility\" ?irreversible=${!said.reversible}>\n <md-icon>${said.reversible ? 'undo' : 'lock'}</md-icon>\n <span\n >${\n said.caveat || i18next.t(said.reversible ? 'text.approval-is-reversible' : 'text.approval-is-irreversible')\n }</span\n >\n </div>\n `\n }\n\n /**\n * One slot's value as something to read.\n *\n * A scalar prints with its unit when one was declared. Anything shaped — an object, a list — goes\n * through fieldValue, the same laying-out the model sections use, so a payload reads the same way\n * wherever it appears and a four-level object does not become one long line.\n *\n * ── The sentence is built here, not frozen when the request was raised ──\n * Eighteen doors write a Korean sentence at issue and the issue snapshots it, so it stands in the\n * language of whoever raised it and an approver reading another language never catches up. Where\n * a door declares `valueTKey`, the sentence is made at reading time instead, out of the values\n * the request did freeze.\n *\n * **A door that has not moved yet draws exactly what it drew before.** That is what lets plant\n * move them one at a time instead of eighteen at once, and it covers a door that moved into a\n * locale nobody has written yet: an empty `defaultValue` means a missing key falls through to the\n * frozen sentence rather than printing `approval.…` on the card.\n */\n private slotText(slot: DecisionSlot): unknown {\n const said = this.sentenceOf(slot)\n\n if (said) {\n return said\n }\n\n const scalar = slot.value !== null && slot.value !== undefined && typeof slot.value !== 'object'\n\n if (scalar && slot.unit) {\n return `${slot.value} ${slot.unit}`\n }\n\n return scalar ? String(slot.value) : fieldValue(slot.value)\n }\n\n /** The sentence this slot declares, when it declares one and the locale has it. */\n private sentenceOf(slot: DecisionSlot): string {\n if (!slot.valueTKey) {\n return ''\n }\n\n return String(i18next.t(slot.valueTKey, { ...(slot.params || {}), defaultValue: '' }) || '')\n }\n\n /** Did a person actually write something here. Whitespace is not words. */\n private hasWords(slot: DecisionSlot): boolean {\n return typeof slot.value === 'string' ? slot.value.trim().length > 0 : slot.found && slot.value != null\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 this.fetchActivityApproval(lifecycle.resourceId)\n }\n }\n\n async fetchActivityApproval(id) {\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 this.loadError = error\n return\n }\n\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"]}
@@ -10,6 +10,7 @@ export declare class ActivityCatalogPage extends ActivityCatalogPage_base {
10
10
  /** Why the catalog could not be read - ox-page-state says it, with retry (ADR-0060 decision 8). */
11
11
  loadError: unknown;
12
12
  get context(): {
13
+ frame: string;
13
14
  title: string;
14
15
  help: string;
15
16
  };
@@ -27,6 +28,11 @@ export declare class ActivityCatalogPage extends ActivityCatalogPage_base {
27
28
  *
28
29
  * 없으면 **한 줄로** 없다고 말한다. 없는 것을 여러 줄로 늘리지 않는다.
29
30
  */
31
+ /**
32
+ * Reads declared sentences in the reader's language, falling back to the sentence as declared
33
+ * when there is no key or no translation for it. Lines and keys pair by position, as guide does.
34
+ */
35
+ private readSentences;
30
36
  private renderGuide;
31
37
  /**
32
38
  * 이 공장이 이 단계를 쓰나 — **결재선에 결재자가 있나.**
@@ -7,7 +7,7 @@ import { customElement, state } from 'lit/decorators.js';
7
7
  import { client } from '@operato/graphql';
8
8
  import { i18next, localize } from '@operato/i18n';
9
9
  import { PageView } from '@operato/shell';
10
- import { ScrollbarStyles } from '@operato/styles';
10
+ import { DocumentPageStyles, ScrollbarStyles } from '@operato/styles';
11
11
  /**
12
12
  * 업무 카탈로그 — **업무함에 올라오는 일이 무슨 일인지 읽는 자리.**
13
13
  *
@@ -32,6 +32,8 @@ const CatalogFetch = gql `
32
32
  name
33
33
  label
34
34
  labelTKey
35
+ readinessNotesTKey
36
+ readinessGapTKeys
35
37
  description
36
38
  guide
37
39
  guideTKeys
@@ -127,6 +129,8 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
127
129
  this.loadError = null;
128
130
  }
129
131
  static { this.styles = [
132
+ /* The frame owns the page shell and the reading column (ADR-0060 decision 8). */
133
+ DocumentPageStyles,
130
134
  ScrollbarStyles,
131
135
  css `
132
136
  /*
@@ -134,14 +138,6 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
134
138
  * 글자가 배경에 묻혔다.
135
139
  */
136
140
  :host {
137
- display: flex;
138
- flex-direction: column;
139
-
140
- width: 100%;
141
- overflow: auto;
142
- padding: var(--spacing-large, 12px);
143
-
144
- background-color: var(--md-sys-color-background);
145
141
  color: var(--md-sys-color-on-background);
146
142
  font-size: var(--ui-t-body, 13px);
147
143
  }
@@ -357,18 +353,22 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
357
353
  ]; }
358
354
  get context() {
359
355
  return {
356
+ /*
357
+ * 이 화면이 어떤 틀인가 — 동작 줄이 이것을 읽고 자기 오른쪽 끝을 내용에 맞춘다
358
+ * (ADR-0060 결정 9 보탬). 안 적으면 창 폭이고, 그것은 작업면의 모양이다.
359
+ */
360
+ frame: 'document',
360
361
  title: i18next.t('title.activity catalog'),
361
362
  help: 'worklist/activity-catalog-page'
362
363
  };
363
364
  }
364
365
  render() {
365
366
  /* Loading showed a blank page; a failure had its own box. Both are the shared page state now. */
366
- return html `<ox-page-state
367
- .loading=${!this.loaded}
368
- .error=${this.loadError}
369
- @retry=${() => this.retry()}
370
- >${this.loaded && !this.loadError ? this.renderCatalog() : ''}</ox-page-state
371
- >`;
367
+ return html `<div class="page">
368
+ <ox-page-state .loading=${!this.loaded} .error=${this.loadError} @retry=${() => this.retry()}
369
+ >${this.loaded && !this.loadError ? this.renderCatalog() : ''}</ox-page-state
370
+ >
371
+ </div>`;
372
372
  }
373
373
  retry() {
374
374
  this.failed = false;
@@ -418,13 +418,11 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
418
418
  안 만든 것이면, 접힌 절 안에 든 단계는 하나씩 펼쳐야 아는 값이 된다. 그러면 목록이 다
419
419
  같아 보인다.
420
420
  -->
421
- ${stage
422
- ? html `<span class="stage" data-stage=${stage}>${i18next.t('label.readiness-' + stage)}</span>`
423
- : ''}
421
+ ${stage ? html `<span class="stage" data-stage=${stage}>${i18next.t('label.readiness-' + stage)}</span>` : ''}
424
422
  ${registered
425
423
  ? html `<span class="use" ?idle=${!inUse}
426
- >${inUse ? i18next.t('text.activity-in-use-here') : i18next.t('text.activity-not-in-use-here')}</span
427
- >`
424
+ >${inUse ? i18next.t('text.activity-in-use-here') : i18next.t('text.activity-not-in-use-here')}</span
425
+ >`
428
426
  : ''}
429
427
  </div>
430
428
 
@@ -441,6 +439,13 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
441
439
  *
442
440
  * 없으면 **한 줄로** 없다고 말한다. 없는 것을 여러 줄로 늘리지 않는다.
443
441
  */
442
+ /**
443
+ * Reads declared sentences in the reader's language, falling back to the sentence as declared
444
+ * when there is no key or no translation for it. Lines and keys pair by position, as guide does.
445
+ */
446
+ readSentences(lines, keys) {
447
+ return (lines || []).map((line, n) => (keys?.[n] ? String(i18next.t(keys[n], { defaultValue: line })) : line));
448
+ }
444
449
  renderGuide(one) {
445
450
  const keys = one.guideTKeys || [];
446
451
  const lines = (one.guide || []).map((line, n) => keys[n] ? String(i18next.t(keys[n], { defaultValue: line })) : line);
@@ -494,25 +499,33 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
494
499
  return '';
495
500
  }
496
501
  return html `<details>
497
- <summary>${i18next.t('label.activity-build-info')}${stage ? ` · ${i18next.t('label.readiness-' + stage)}` : ''}</summary>
502
+ <summary>
503
+ ${i18next.t('label.activity-build-info')}${stage ? ` · ${i18next.t('label.readiness-' + stage)}` : ''}
504
+ </summary>
498
505
  <dl>
499
- ${built ? html `<dt>${i18next.t('field.what-is-built')}</dt>
500
- <dd>${built}</dd>` : ''}
506
+ ${built
507
+ ? html `<dt>${i18next.t('field.what-is-built')}</dt>
508
+ <dd>${built}</dd>`
509
+ : ''}
501
510
  ${readiness.gaps?.length
502
511
  ? html `<dt>${i18next.t('field.readiness-gaps')}</dt>
503
- <dd>${readiness.gaps.join(' · ')}</dd>`
512
+ <dd>${this.readSentences(readiness.gaps, one.readinessGapTKeys).join(' · ')}</dd>`
504
513
  : ''}
505
514
  ${readiness.tests?.length
506
515
  ? html `<dt>${i18next.t('field.covering-tests')}</dt>
507
- <dd>${readiness.tests.map((test) => html `<div><code>${test}</code></div>`)}</dd>`
516
+ <dd>${readiness.tests.map((test) => html `<div><code>${test}</code></div>`)}</dd>`
508
517
  : ''}
509
518
  ${hasRun
510
519
  ? html `<dt>${i18next.t('field.last-test-run')}</dt>
511
- <dd>${this.renderRun(run)}</dd>`
520
+ <dd>${this.renderRun(run)}</dd>`
512
521
  : ''}
513
522
  ${readiness.notes
514
523
  ? html `<dt>${i18next.t('field.readiness-notes')}</dt>
515
- <dd>${readiness.notes}</dd>`
524
+ <dd>
525
+ ${one.readinessNotesTKey
526
+ ? i18next.t(one.readinessNotesTKey, { defaultValue: readiness.notes })
527
+ : readiness.notes}
528
+ </dd>`
516
529
  : ''}
517
530
  </dl>
518
531
  </details>`;
@@ -564,9 +577,8 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
564
577
  hour12: false
565
578
  })
566
579
  : '';
567
- return html `${typeof run.passed == 'number' ? run.passed : '—'} / ${run.total}${when
568
- ? html ` · ${when}`
569
- : ''}${run.command ? html `<div><code>${run.command}</code></div>` : ''}`;
580
+ return html `${typeof run.passed == 'number' ? run.passed : '—'} /
581
+ ${run.total}${when ? html ` · ${when}` : ''}${run.command ? html `<div><code>${run.command}</code></div>` : ''}`;
570
582
  }
571
583
  async pageUpdated(changes, lifecycle) {
572
584
  if (this.active) {
@@ -606,8 +618,7 @@ let ActivityCatalogPage = class ActivityCatalogPage extends localize(i18next)(Pa
606
618
  }
607
619
  this.failed = false;
608
620
  this.loadError = null;
609
- this.items = [...items].sort((a, b) => stageRank(a.readiness?.stage) - stageRank(b.readiness?.stage) ||
610
- shownName(a).localeCompare(shownName(b)));
621
+ this.items = [...items].sort((a, b) => stageRank(a.readiness?.stage) - stageRank(b.readiness?.stage) || shownName(a).localeCompare(shownName(b)));
611
622
  this.loaded = true;
612
623
  }
613
624
  };