@things-factory/worklist 10.1.123 → 10.1.134

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.
@@ -17,12 +17,12 @@ export declare class ActivityThreadTimeline extends LitElement {
17
17
  * 보일 항목 없음 화면이 「타임라인의 상신 사유를 보고 판단하세요」로 여기를 가리킨다
18
18
  */
19
19
  open?: boolean;
20
- render(): import("lit-html").TemplateResult<1> | typeof nothing;
20
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
21
21
  /** 접혔을 때 보이는 한 줄 — 마지막 기록의 「무엇을 · 누가 · 언제」. */
22
22
  lastLine(item: any): string;
23
23
  renderActivityThreadHistory(activityThreadHistory: ActivityThreadHistory): import("lit-html").TemplateResult<1>;
24
24
  renderActivityApproval(activityApproval: ActivityApproval): import("lit-html").TemplateResult<1>;
25
25
  /** 적힌 말이 없으면 상자를 그리지 않는다 — 빈 회색 상자는 내용이 있는 줄과 구별되지 않는다. */
26
- renderSaid(said?: string): import("lit-html").TemplateResult<1> | typeof nothing;
26
+ renderSaid(said?: string): typeof nothing | import("lit-html").TemplateResult<1>;
27
27
  renderOutput(output: any): string;
28
28
  }
@@ -17,7 +17,18 @@ export declare class ActivityDetailPage extends ActivityDetailPage_base {
17
17
  frame: string;
18
18
  title: string;
19
19
  heading: boolean;
20
+ menu: string;
20
21
  help: string;
22
+ actions: {
23
+ title: string;
24
+ action: () => Promise<void>;
25
+ }[] | {
26
+ title: string;
27
+ action: () => Promise<void>;
28
+ emphasis: {
29
+ raised: boolean;
30
+ };
31
+ }[];
21
32
  };
22
33
  /**
23
34
  * 이름이 주소로 온다. 같은 라우트 안에서 이름만 바뀌어도 이 콜백이 다시 오므로, **이름이 실제로
@@ -45,9 +56,20 @@ export declare class ActivityDetailPage extends ActivityDetailPage_base {
45
56
  private fetch;
46
57
  render(): import("lit-html").TemplateResult<1>;
47
58
  private renderDetail;
48
- /** 이 업무가 무엇인가. `guide` 가 그 자리이고, 없으면 설명이다. */
49
- private renderGuide;
59
+ /** 알아 둘 것 — 첫 줄(무엇인가)을 뺀 안내문. 없으면 구획을 세우지 않는다. */
60
+ private renderNotes;
61
+ /**
62
+ * 이 업무를 쓸지 말지 — 화면 전체의 결정이라 하단 동작 줄에 둔다(page-standard §8).
63
+ * 아직 만들어지지 않은 업무는 쓸 수 없으므로 단추가 없다.
64
+ */
65
+ private useActions;
66
+ /** 이름 옆의 상태 한 마디. */
50
67
  private renderUse;
68
+ /**
69
+ * 누가 승인하나 — 결재·배정 현황에서 이름을 누르고 온 사람이 보러 온 것. 그래서 맨 위다.
70
+ *
71
+ * 단계와 이름만 적는다.
72
+ */
51
73
  private renderApprovalLine;
52
74
  /**
53
75
  * 다른 꾸러미가 건 구획.
@@ -9,11 +9,10 @@ import { client } from '@operato/graphql';
9
9
  import { i18next, localize } from '@operato/i18n';
10
10
  import { openPopup, entity360Name } from '@operato/layout';
11
11
  import { navigate, PageView } from '@operato/shell';
12
- import { DocumentPageStyles, ScrollbarStyles } from '@operato/styles';
12
+ import { ButtonStyles, DocumentPageStyles, ScrollbarStyles } from '@operato/styles';
13
13
  import { ranMutation } from '../../components/say-outcome.js';
14
14
  import { activityPanels, panelSection } from './activity-panels.js';
15
15
  import { detailActions } from './activity-detail-actions.js';
16
- import { canonicalStage } from './activity-stage.js';
17
16
  import { guideLines } from './activity-guide.js';
18
17
  /**
19
18
  * 업무 하나 — **그 업무에 관한 일을 여기서 끝낸다.**
@@ -93,115 +92,110 @@ let ActivityDetailPage = class ActivityDetailPage extends localize(i18next)(Page
93
92
  static { this.styles = [
94
93
  ScrollbarStyles,
95
94
  DocumentPageStyles,
95
+ ButtonStyles,
96
96
  css `
97
- :host {
98
- display: flex;
99
- flex-direction: column;
100
- overflow: auto;
97
+ /*
98
+ * ── On the document frame (ADR-0117) ─────────────────────────────────────
99
+ * The screen imported the frame but drew outside its .page and styled its own section heads (small
100
+ * capitals) and buttons (pills). None of the frame's gutter, sections or text ground reached it, and
101
+ * long guide lines ran off the right edge. The parts are now page sections, the buttons sit in their
102
+ * section heads, and the name line (drawn here, see context) takes the title bar's size.
103
+ */
104
+
105
+ /*
106
+ * A section or panel the screen hides must stay hidden: .page-section sets display, which beat the
107
+ * browser's own [hidden] rule and left the empty "more settings" head standing alone.
108
+ */
109
+ [hidden] {
110
+ display: none;
101
111
  }
102
112
 
103
- /* 돌아갈 자리. 제목 위에 둔다 — 읽기 전에 보인다. */
104
- a[back] {
113
+ /* Back to the catalog: above everything, read before the rest. */
114
+ a.back {
105
115
  display: inline-flex;
106
116
  align-items: center;
107
117
  gap: 2px;
108
118
  align-self: flex-start;
109
- margin-bottom: var(--spacing-small);
110
- color: var(--md-sys-color-on-surface-variant);
111
- font-size: var(--ui-t-body, 13px);
112
- text-decoration: none;
113
- cursor: pointer;
114
- }
115
-
116
- a[back]:hover {
117
- color: var(--md-sys-color-on-surface);
118
- text-decoration: underline;
119
119
  }
120
120
 
121
- a[back] md-icon {
121
+ a.back md-icon {
122
122
  --md-icon-size: 16px;
123
123
  }
124
124
 
125
- .head {
126
- display: flex;
127
- align-items: center;
128
- flex-wrap: wrap;
129
- gap: var(--spacing-small);
130
- }
131
-
125
+ /*
126
+ * ── Say what the screen is for, then the one thing people come here to do ──
127
+ * The screen read as a list of parts (a stage badge, an in-use badge, "this activity is", "use here",
128
+ * "approval line", "approval 2 steps") and left the reader to work out what to do. Now: the name, one
129
+ * sentence on what the activity is and what this screen decides, then who approves, with each step's
130
+ * role and what that role is, then whether this site uses it, then the notes.
131
+ */
132
132
  .head .name {
133
- font: var(--ui-t-title-font, bold 18px var(--theme-font));
134
- color: var(--md-sys-color-on-surface);
133
+ margin: 0;
134
+ font-size: var(--ui-t-page, 18px);
135
+ font-weight: 700;
136
+ text-wrap: balance;
135
137
  }
136
138
 
137
- .stage,
138
- .use {
139
- padding: 1px 8px;
140
- border-radius: var(--md-sys-shape-corner-full);
141
- font-size: var(--ui-t-small, 12px);
142
- background-color: var(--md-sys-color-surface-container-high);
143
- color: var(--md-sys-color-on-surface-variant);
144
- }
145
139
 
146
- .use:not([idle]) {
147
- background-color: var(--md-sys-color-secondary-container);
148
- color: var(--md-sys-color-on-secondary-container);
140
+ .lead {
141
+ margin: var(--spacing-small, 4px) 0 0;
149
142
  }
150
143
 
151
- section {
152
- margin-top: var(--spacing-large, 16px);
144
+ .use {
145
+ margin-left: var(--spacing-small, 4px);
146
+ color: var(--ui-muted);
147
+ font-size: var(--ui-t-small, 11.5px);
148
+ font-weight: 400;
153
149
  }
154
150
 
155
- section > h3 {
156
- margin: 0 0 var(--spacing-small) 0;
157
- font-size: var(--ui-t-small, 12px);
158
- color: var(--md-sys-color-on-surface-variant);
159
- text-transform: uppercase;
151
+ /* Why something cannot be done, or what the current state is: sentences, not badges. */
152
+ .why {
153
+ margin: 0;
160
154
  }
161
155
 
162
- .guide p {
163
- margin: 0 0 4px 0;
164
- line-height: 1.5;
156
+ .why {
157
+ color: var(--ui-muted);
165
158
  }
166
159
 
167
- /* 못 하는 까닭 · 비어 있다는 사실. 둘 다 **문장으로** 남는다. */
168
- .why {
169
- margin: 4px 0 0 0;
170
- color: var(--md-sys-color-on-surface-variant);
171
- font-size: var(--ui-t-body, 13px);
160
+ /* One approval step per row: the step and the name. */
161
+ ol.steps {
162
+ display: grid;
163
+ grid-template-columns: max-content minmax(0, 1fr);
164
+ column-gap: var(--spacing-large, 12px);
165
+ margin: 0 0 var(--spacing-medium, 8px);
166
+ padding: 0;
167
+ list-style: none;
172
168
  }
173
169
 
174
- .steps {
175
- display: flex;
176
- flex-wrap: wrap;
177
- gap: 4px;
178
- margin-bottom: var(--spacing-small);
170
+ ol.steps li {
171
+ grid-column: 1 / -1;
172
+ display: grid;
173
+ grid-template-columns: subgrid;
174
+ align-items: baseline;
175
+ padding: var(--spacing-medium, 8px) 0;
176
+ border-top: 1px solid var(--md-sys-color-outline-variant);
179
177
  }
180
178
 
181
- .steps span {
182
- padding: 2px 8px;
183
- border: 1px solid var(--md-sys-color-outline-variant);
184
- border-radius: var(--md-sys-shape-corner-full);
185
- font-size: var(--ui-t-small, 12px);
179
+ ol.steps li:first-child {
180
+ border-top: none;
186
181
  }
187
182
 
188
- button {
189
- font: inherit;
190
- color: var(--md-sys-color-on-surface);
191
- background-color: var(--md-sys-color-surface-container);
192
- border: 1px solid var(--md-sys-color-outline-variant);
193
- border-radius: var(--md-sys-shape-corner-full);
194
- padding: 6px 14px;
195
- cursor: pointer;
183
+ .step {
184
+ color: var(--ui-muted);
185
+ font-size: var(--ui-t-small, 11.5px);
186
+ font-variant-numeric: tabular-nums;
196
187
  }
197
188
 
198
- button:hover:not(:disabled) {
199
- background-color: var(--md-sys-color-surface-container-high);
189
+ .who {
190
+ font-weight: 600;
200
191
  }
201
192
 
202
- button:disabled {
203
- opacity: 0.4;
204
- cursor: default;
193
+ ul.notes {
194
+ margin: 0;
195
+ padding-left: var(--spacing-huge, 24px);
196
+ display: flex;
197
+ flex-direction: column;
198
+ gap: var(--spacing-small, 4px);
205
199
  }
206
200
  `
207
201
  ]; }
@@ -220,7 +214,10 @@ let ActivityDetailPage = class ActivityDetailPage extends localize(i18next)(Page
220
214
  * `heading: false` 가 그리는 자리마다 켜고 끄라고 둔 문이다.
221
215
  */
222
216
  heading: false,
223
- help: 'worklist/activity-catalog-page'
217
+ /* The menu has no row for one activity; it lights the catalog, where the back link goes. */
218
+ menu: 'activity-catalog',
219
+ help: 'worklist/activity-catalog-page',
220
+ actions: this.useActions()
224
221
  };
225
222
  }
226
223
  /**
@@ -293,15 +290,19 @@ let ActivityDetailPage = class ActivityDetailPage extends localize(i18next)(Page
293
290
  this.updateContext();
294
291
  }
295
292
  render() {
296
- return html `
297
- <a back @click=${() => navigate('activity-catalog')}>
293
+ return html `<div class="page">
294
+ <a
295
+ class="back page-nav-link"
296
+ href="activity-catalog"
297
+ @click=${(e) => (e.preventDefault(), navigate('activity-catalog'))}
298
+ >
298
299
  <md-icon>chevron_left</md-icon>${i18next.t('button.back-to-activity-catalog')}
299
300
  </a>
300
301
 
301
302
  <ox-page-state .loading=${!this.loaded} .error=${this.loadError} @retry=${() => this.fetch()}
302
303
  >${this.loaded && !this.loadError ? this.renderDetail() : ''}</ox-page-state
303
304
  >
304
- `;
305
+ </div>`;
305
306
  }
306
307
  renderDetail() {
307
308
  if (!this.entry) {
@@ -309,73 +310,91 @@ let ActivityDetailPage = class ActivityDetailPage extends localize(i18next)(Page
309
310
  return html `<div class="why">${i18next.t('text.activity-not-found', { name: this.name })}</div>`;
310
311
  }
311
312
  const actions = detailActions(this.entry);
312
- const stage = canonicalStage(this.entry.readiness?.stage);
313
+ const lines = guideLines(this.entry, (key, options) => i18next.t(key, options)).filter(Boolean);
314
+ /* The first guide line says what the activity is; with no guide, the description does. */
315
+ const [what, ...notes] = lines.length ? lines : [this.entry.description].filter(Boolean);
313
316
  return html `
314
317
  <div class="head">
315
- <span class="name">${this.shownName(this.entry)}</span>
316
- ${stage ? html `<span class="stage">${i18next.t('label.readiness-' + stage)}</span>` : ''}
317
- ${actions.registered
318
- ? html `<span class="use" ?idle=${!actions.inUse}
319
- >${actions.inUse
320
- ? i18next.t('text.activity-in-use-here')
321
- : i18next.t('text.activity-not-in-use-here')}</span
322
- >`
323
- : ''}
318
+ <h2 class="name">${this.shownName(this.entry)} ${this.renderUse(actions)}</h2>
319
+ ${what ? html `<p class="lead">${what}</p>` : ''}
324
320
  </div>
325
321
 
326
- ${this.renderGuide()} ${this.renderUse(actions)} ${this.renderApprovalLine(actions)} ${this.renderPanels()}
322
+ ${this.renderApprovalLine(actions)} ${this.renderNotes(notes)} ${this.renderPanels()}
327
323
  `;
328
324
  }
329
- /** 이 업무가 무엇인가. `guide` 가 그 자리이고, 없으면 설명이다. */
330
- renderGuide() {
331
- const shown = guideLines(this.entry, (key, options) => i18next.t(key, options)).filter(Boolean);
332
- if (!shown.length && !this.entry.description)
325
+ /** 알아 둘 것 — 첫 줄(무엇인가)을 뺀 안내문. 없으면 구획을 세우지 않는다. */
326
+ renderNotes(notes) {
327
+ if (!notes.length)
333
328
  return html ``;
334
329
  return html `
335
- <section class="guide">
336
- <h3>${i18next.t('label.activity-what-is-it')}</h3>
337
- ${shown.length
338
- ? shown.map(line => html `<p>${line}</p>`)
339
- : html `<p>${this.entry.description}</p>`}
330
+ <section class="page-section">
331
+ <div class="page-section-header"><h3>${i18next.t('label.activity-what-is-it')}</h3></div>
332
+ <ul class="notes page-prose">
333
+ ${notes.map(line => html `<li>${line}</li>`)}
334
+ </ul>
340
335
  </section>
341
336
  `;
342
337
  }
343
- renderUse(actions) {
338
+ /**
339
+ * 이 업무를 쓸지 말지 — 화면 전체의 결정이라 하단 동작 줄에 둔다(page-standard §8).
340
+ * 아직 만들어지지 않은 업무는 쓸 수 없으므로 단추가 없다.
341
+ */
342
+ useActions() {
343
+ if (!this.entry)
344
+ return [];
345
+ const actions = detailActions(this.entry);
344
346
  if (!actions.registered)
345
- return html ``;
346
- return html `
347
- <section>
348
- <h3>${i18next.t('label.activity-use-here')}</h3>
349
- ${actions.canInstall
350
- ? html `<button @click=${() => this.setUse(true)}>${i18next.t('button.activity-install')}</button>`
351
- : html `<button @click=${() => this.setUse(false)}>${i18next.t('button.activity-uninstall')}</button>`}
352
- </section>
353
- `;
347
+ return [];
348
+ return actions.inUse
349
+ ? [{ title: i18next.t('button.activity-stop-using'), action: () => this.setUse(false) }]
350
+ : [{ title: i18next.t('button.activity-start-using'), action: () => this.setUse(true), emphasis: { raised: true } }];
354
351
  }
352
+ /** 이름 옆의 상태 한 마디. */
353
+ renderUse(actions) {
354
+ if (!actions.registered) {
355
+ return html `<span class="use">${i18next.t('text.activity-line-not-built')}</span>`;
356
+ }
357
+ return html `<span class="use"
358
+ >${actions.inUse ? i18next.t('text.activity-in-use-here') : i18next.t('text.activity-not-in-use-here')}</span
359
+ >`;
360
+ }
361
+ /**
362
+ * 누가 승인하나 — 결재·배정 현황에서 이름을 누르고 온 사람이 보러 온 것. 그래서 맨 위다.
363
+ *
364
+ * 단계와 이름만 적는다.
365
+ */
355
366
  renderApprovalLine(actions) {
356
367
  const line = this.activity?.approvalLine || [];
357
368
  const steps = approvalSteps(line);
358
369
  return html `
359
- <section>
360
- <h3>${i18next.t('label.activity-approval-line')}</h3>
370
+ <section class="page-section">
371
+ <div class="page-section-header">
372
+ <h3>${i18next.t('label.activity-approval-line')}</h3>
373
+ <div class="page-section-actions">
374
+ <button
375
+ ?raised=${!!actions.canSetApprovalLine && !steps}
376
+ ?disabled=${!actions.canSetApprovalLine}
377
+ @click=${() => this.openApprovalLine(line)}
378
+ >
379
+ ${i18next.t('button.activity-set-approval-line')}
380
+ </button>
381
+ </div>
382
+ </div>
361
383
 
362
384
  ${steps
363
- ? html `<div class="steps">
364
- ${line.map((one) => html `<span>${entity360Name(one.approver, one.approver?.name || one.value || '')}</span>`)}
365
- </div>`
385
+ ? html `<ol class="steps">
386
+ ${line.map((one, at) => html `<li>
387
+ <span class="step">${i18next.t('text.activity-step', { n: at + 1 })}</span>
388
+ <span class="who">${entity360Name(one.approver, one.approver?.name || one.value || '')}</span>
389
+ </li>`)}
390
+ </ol>`
366
391
  : ''}
367
392
 
368
- <button ?disabled=${!actions.canSetApprovalLine} @click=${() => this.openApprovalLine(line)}>
369
- ${i18next.t('button.activity-set-approval-line')}
370
- </button>
371
-
372
- <p class="why">
373
- ${actions.approvalLineBlock
374
- ? i18next.t('text.activity-line-' + actions.approvalLineBlock)
393
+ ${actions.approvalLineBlock
394
+ ? html `<p class="why">${i18next.t('text.activity-line-' + actions.approvalLineBlock)}</p>`
375
395
  : steps
376
- ? i18next.t('text.activity-line-steps', { steps })
377
- : i18next.t('text.activity-line-none')}
378
- </p>
396
+ ? ''
397
+ : html `<p class="why">${i18next.t('text.activity-line-none')}</p>`}
379
398
  </section>
380
399
  `;
381
400
  }
@@ -391,8 +410,8 @@ let ActivityDetailPage = class ActivityDetailPage extends localize(i18next)(Page
391
410
  const shape = panelSection(panels.map(one => one.name), this.emptyPanels);
392
411
  if (shape.kind === 'none-registered') {
393
412
  return html `
394
- <section>
395
- <h3>${i18next.t('label.activity-panels')}</h3>
413
+ <section class="page-section">
414
+ <div class="page-section-header"><h3>${i18next.t('label.activity-panels')}</h3></div>
396
415
  <p class="why">${i18next.t('text.activity-no-panels')}</p>
397
416
  </section>
398
417
  `;
@@ -403,8 +422,8 @@ let ActivityDetailPage = class ActivityDetailPage extends localize(i18next)(Page
403
422
  */
404
423
  const hidden = shape.kind === 'all-empty' ? panels.map(one => one.name) : shape.hidden;
405
424
  return html `
406
- <section ?hidden=${shape.kind === 'all-empty'}>
407
- <h3>${i18next.t('label.activity-panels')}</h3>
425
+ <section class="page-section" ?hidden=${shape.kind === 'all-empty'}>
426
+ <div class="page-section-header"><h3>${i18next.t('label.activity-panels')}</h3></div>
408
427
  ${panels.map(panel => html `<div
409
428
  ?hidden=${hidden.includes(panel.name)}
410
429
  @activity-panel-content=${(event) => this.panelReported(panel.name, event)}
@@ -1 +1 @@
1
- {"version":3,"file":"activity-detail-page.js","sourceRoot":"","sources":["../../../client/pages/activity-catalog/activity-detail-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,sCAAsC,CAAA;AAC7C,OAAO,8BAA8B,CAAA;AAErC,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;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAErE,OAAO,E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OAAM;QAEvB,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;IAED;;;OAGG;IACK,gBAAgB,CAAC,IAAW;QAClC,MAAM,KAAK,GAAG,SAAS,CACrB,IAAI,CAAA;iBACO,IAAI;2BACM,CAAC,KAAoB,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,IAAI,EAAE,CAAC;2CAC5C,EACrC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,4BAA4B,CAAC,EAAE,CAClF,CAAA;QAED,OAAO,KAAK,CAAA;IACd,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,KAAY;QACzC,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,CACrC,MAAM,CAAC,MAAM,CAAC;YACZ,QAAQ,EAAE,GAAG,CAAA;;;;;;SAMZ;YACD,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE;SACrF,CAAC,CACH,CAAA;QAED,IAAI,CAAC,OAAO,CAAC,EAAE;YAAE,OAAM;QAEvB,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;;AAvTgB;IAAhB,KAAK,EAAE;;gDAAkB;AACT;IAAhB,KAAK,EAAE;;iDAA0B;AACjB;IAAhB,KAAK,EAAE;;oDAA6B;AACpB;IAAhB,KAAK,EAAE;;kDAAuB;AAEd;IAAhB,KAAK,EAAE;;uDAAkD;AAEzC;IAAhB,KAAK,EAAE;;qDAAkC;AA5H/B,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CA6a9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/list-state/ox-page-state.js'\nimport '@things-factory/organization'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { openPopup, entity360Name } from '@operato/layout'\nimport { navigate, PageView } from '@operato/shell'\nimport { DocumentPageStyles, ScrollbarStyles } from '@operato/styles'\n\nimport { ranMutation } from '../../components/say-outcome.js'\nimport { activityPanels, panelSection } from './activity-panels.js'\nimport { detailActions } from './activity-detail-actions.js'\nimport { canonicalStage } from './activity-stage.js'\nimport { guideLines } from './activity-guide.js'\n\n/**\n * 업무 하나 — **그 업무에 관한 일을 여기서 끝낸다.**\n *\n * ── 왜 이 화면이 생겼나 (2026-09-23) ───────────────────────────────────────\n * 결재선 하나를 세워서 문이 서는지 보려면 화면을 셋 열어야 했고, 역할에 사람이 없으면 넷에서\n * 다섯이었다 [확인함]. 카탈로그는 카드에 「결재선 없음」이라고 적어 놓고 **어디로 가야 하는지는\n * 말하지 않았다** — 그 파일 전체에 `navigate()` 도 `<a href>` 도 없었다. 사람은 메뉴로 돌아가\n * 이름으로 찾아야 했다.\n *\n * 그래서 카탈로그는 고르는 자리로 두고, 고른 뒤의 일은 이 화면 안에서 끝낸다.\n *\n * ── 돌아갈 길을 화면이 갖는다 ─────────────────────────────────────────────\n * 탭 줄에 카탈로그가 남아 있으니 됐다고 볼 수 없다. 탭 줄은 **없을 수 있다** — 페이지가\n * `mdibar: false` 를 적으면 셸이 걷고(`apptool-ui/client/layout/mdibar-visibility.ts`), 무엇보다\n * **주소를 받아서 바로 여는 사람에게는 이전 화면이 아예 없다.** 「이 업무 결재선 좀 봐 주세요」로\n * 링크를 받은 사람이 그 경우다. 그래서 머리에 돌아갈 자리를 직접 둔다.\n *\n * ── 못 하는 일은 까닭을 말한다 ────────────────────────────────────────────\n * 눌리지 않는 단추만 남기지 않는다. 무엇을 할 수 있는지와 못 하면 왜인지는\n * `activity-detail-actions.ts` 가 값으로 답하고, 이 화면은 그 값을 문장으로 바꾼다. 원인을 여기서\n * 지어내지 않는다.\n */\nconst DETAIL = gql`\n query ($name: String!) {\n responses: installableActivities {\n items {\n name\n label\n labelTKey\n description\n guide\n guideTKeys\n approvalSteps\n activity {\n id\n }\n readiness {\n stage\n }\n }\n }\n activityByName(name: $name) {\n id\n name\n description\n approvalLine {\n type\n value\n participation\n approver {\n id\n name\n description\n controlNo\n }\n }\n }\n }\n`\n\n/** 결재선에서 **서명하는 단계만** 센다. 참조는 알기만 하고 막지 않는다. */\nfunction approvalSteps(line?: any[]): number {\n return (line || []).filter(one => String(one?.participation || '') !== 'reference').length\n}\n\n@customElement('activity-detail-page')\nexport class ActivityDetailPage extends localize(i18next)(PageView) {\n static styles = [\n ScrollbarStyles,\n DocumentPageStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n overflow: auto;\n }\n\n /* 돌아갈 자리. 제목 위에 둔다 — 읽기 전에 보인다. */\n a[back] {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n align-self: flex-start;\n margin-bottom: var(--spacing-small);\n color: var(--md-sys-color-on-surface-variant);\n font-size: var(--ui-t-body, 13px);\n text-decoration: none;\n cursor: pointer;\n }\n\n a[back]:hover {\n color: var(--md-sys-color-on-surface);\n text-decoration: underline;\n }\n\n a[back] md-icon {\n --md-icon-size: 16px;\n }\n\n .head {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--spacing-small);\n }\n\n .head .name {\n font: var(--ui-t-title-font, bold 18px var(--theme-font));\n color: var(--md-sys-color-on-surface);\n }\n\n .stage,\n .use {\n padding: 1px 8px;\n border-radius: var(--md-sys-shape-corner-full);\n font-size: var(--ui-t-small, 12px);\n background-color: var(--md-sys-color-surface-container-high);\n color: var(--md-sys-color-on-surface-variant);\n }\n\n .use:not([idle]) {\n background-color: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n\n section {\n margin-top: var(--spacing-large, 16px);\n }\n\n section > h3 {\n margin: 0 0 var(--spacing-small) 0;\n font-size: var(--ui-t-small, 12px);\n color: var(--md-sys-color-on-surface-variant);\n text-transform: uppercase;\n }\n\n .guide p {\n margin: 0 0 4px 0;\n line-height: 1.5;\n }\n\n /* 못 하는 까닭 · 비어 있다는 사실. 둘 다 **문장으로** 남는다. */\n .why {\n margin: 4px 0 0 0;\n color: var(--md-sys-color-on-surface-variant);\n font-size: var(--ui-t-body, 13px);\n }\n\n .steps {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n margin-bottom: var(--spacing-small);\n }\n\n .steps span {\n padding: 2px 8px;\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: var(--md-sys-shape-corner-full);\n font-size: var(--ui-t-small, 12px);\n }\n\n button {\n font: inherit;\n color: var(--md-sys-color-on-surface);\n background-color: var(--md-sys-color-surface-container);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: var(--md-sys-shape-corner-full);\n padding: 6px 14px;\n cursor: pointer;\n }\n\n button:hover:not(:disabled) {\n background-color: var(--md-sys-color-surface-container-high);\n }\n\n button:disabled {\n opacity: 0.4;\n cursor: default;\n }\n `\n ]\n\n @state() private name = ''\n @state() private entry: any = null\n @state() private activity: any = null\n @state() private loaded = false\n /** 구획이 「이 업무에는 보일 것 없음」을 알렸나. 이름으로 센다. */\n @state() private emptyPanels: Record<string, boolean> = {}\n /** 왜 못 읽었나 — ox-page-state 가 그것을 말하고 다시 시도를 준다. */\n @state() private loadError: unknown = null\n\n get context() {\n return {\n frame: 'document',\n title: this.entry ? this.shownName(this.entry) : i18next.t('title.activity-detail'),\n /*\n * 이름은 **이 화면이 그린다.** 제목 줄은 끈다.\n *\n * 이름 옆에 단계 띠와 「사용 중」이 함께 서야 한다 — 그 셋이 한 줄에 있어야 이 업무를 지금\n * 믿고 쓸 수 있는지가 한눈에 읽힌다. 제목 줄은 그것들을 못 받는다.\n *\n * 끄지 않으면 같은 이름이 화면에 두 번 뜬다(실측 2026-09-24: 제목 줄 「부적합 처분 승인」,\n * 바로 아래 또 「부적합 처분 승인」). `title` 은 그대로 두므로 **탭 이름은 살아 있다** —\n * `heading: false` 가 그리는 자리마다 켜고 끄라고 둔 문이다.\n */\n heading: false,\n help: 'worklist/activity-catalog-page'\n }\n }\n\n /**\n * 이름이 주소로 온다. 같은 라우트 안에서 이름만 바뀌어도 이 콜백이 다시 오므로, **이름이 실제로\n * 바뀌었을 때만** 다시 읽는다.\n */\n async pageUpdated(changes: any, lifecycle: any) {\n this.readName(lifecycle)\n }\n\n /**\n * 처음 그린 뒤에도 한 번 읽는다 — **첫 방문이 통째로 비는 것을 봤다.**\n *\n * [확인함 2026-09-24 :4000] 카드에서 처음 들어가면 주소는 맞고(`?name=…`) `lifecycle.params.name`\n * 도 들어 있는데 화면에 돌아갈 링크만 남았다. 같은 자리로 두 번째 들어가면 멀쩡했고, 그 상태에서\n * 콜백을 손으로 한 번 부르면 바로 채워졌다.\n *\n * 이 화면은 주소로 처음 닿을 때 **모듈이 그때 실려 온다**(route.ts 의 동적 import). 셸은 화면을\n * 처음 세울 때 이 콜백을 다음 animationFrame 으로 미루는데(page-view 가 「엘리먼트가 아직 안\n * 만들어졌을 수 있다」고 적어 둔 그 갈래), 그 사이에 요소가 아직 이 클래스로 올라오지 않았으면\n * **아무 일도 안 하는 기반 클래스의 콜백**이 불린다. 그 뒤로는 생애주기가 더 안 바뀌므로 이름을\n * 받을 기회가 다시 오지 않는다.\n *\n * 그래서 이름을 받는 자리를 둘로 둔다. 둘 다 같은 판단을 지나므로 두 번 읽지 않는다.\n */\n firstUpdated() {\n this.readName()\n }\n\n private readName(lifecycle?: any) {\n const name = String((lifecycle ?? this.lifecycle)?.params?.name || '')\n\n if (name && name !== this.name) {\n this.name = name\n /* 구획이 알린 것은 그 업무의 것이다. 다른 업무로 옮기면 다시 듣는다. */\n this.emptyPanels = {}\n this.fetch()\n }\n }\n\n private shownName(one: any): string {\n if (!one?.label) return String(one?.name ?? '')\n return one.labelTKey ? String(i18next.t(one.labelTKey, { defaultValue: one.label })) : String(one.label)\n }\n\n private async fetch() {\n this.loaded = false\n this.loadError = null\n /*\n * The tab and the document title come from `context`, and the shell reads it when the route\n * changes - before this answer arrives. Nothing read it again, so the tab kept the previous\n * activity's name while the page showed the next one [확인함 2026-09-24 :4000: 「교대 편성 변경\n * 승인」 on the tab over 「계획 정비 연기 승인」]. Drop the old entry so the wait says the generic\n * name, and hand the context over again once the answer is in.\n */\n this.entry = null\n this.updateContext()\n\n try {\n const response = await client.query({ query: DETAIL, variables: { name: this.name }, fetchPolicy: 'no-cache' })\n\n /*\n * 목록에 필터가 없어서 전부 받아 하나를 고른다. 업무는 설치된 모듈이 선언하는 것이라 수가\n * 닫혀 있다 [확인함 2026-09-23: 마흔 안쪽]. 그 전제가 깨지면 서버에 이름으로 찾는 갈래를\n * 두는 것이 맞다 — 여기서 자르지 않는다.\n */\n const items = response?.data?.responses?.items || []\n\n this.entry = items.find((one: any) => one.name === this.name) || null\n this.activity = response?.data?.activityByName || null\n this.loaded = true\n } catch (thrown) {\n this.loadError = thrown\n this.loaded = true\n }\n\n this.updateContext()\n }\n\n render() {\n return html`\n <a back @click=${() => navigate('activity-catalog')}>\n <md-icon>chevron_left</md-icon>${i18next.t('button.back-to-activity-catalog')}\n </a>\n\n <ox-page-state .loading=${!this.loaded} .error=${this.loadError} @retry=${() => this.fetch()}\n >${this.loaded && !this.loadError ? this.renderDetail() : ''}</ox-page-state\n >\n `\n }\n\n private renderDetail() {\n if (!this.entry) {\n /* 없는 이름으로 들어온 주소. 빈 화면으로 두지 않는다 — 무엇을 못 찾았는지 이름을 댄다. */\n return html`<div class=\"why\">${i18next.t('text.activity-not-found', { name: this.name })}</div>`\n }\n\n const actions = detailActions(this.entry)\n const stage = canonicalStage(this.entry.readiness?.stage)\n\n return html`\n <div class=\"head\">\n <span class=\"name\">${this.shownName(this.entry)}</span>\n ${stage ? html`<span class=\"stage\">${i18next.t('label.readiness-' + stage)}</span>` : ''}\n ${actions.registered\n ? html`<span class=\"use\" ?idle=${!actions.inUse}\n >${actions.inUse\n ? i18next.t('text.activity-in-use-here')\n : i18next.t('text.activity-not-in-use-here')}</span\n >`\n : ''}\n </div>\n\n ${this.renderGuide()} ${this.renderUse(actions)} ${this.renderApprovalLine(actions)} ${this.renderPanels()}\n `\n }\n\n /** 이 업무가 무엇인가. `guide` 가 그 자리이고, 없으면 설명이다. */\n private renderGuide() {\n const shown = guideLines(this.entry, (key, options) => i18next.t(key, options)).filter(Boolean)\n\n if (!shown.length && !this.entry.description) return html``\n\n return html`\n <section class=\"guide\">\n <h3>${i18next.t('label.activity-what-is-it')}</h3>\n ${shown.length\n ? shown.map(line => html`<p>${line}</p>`)\n : html`<p>${this.entry.description}</p>`}\n </section>\n `\n }\n\n private renderUse(actions: ReturnType<typeof detailActions>) {\n if (!actions.registered) return html``\n\n return html`\n <section>\n <h3>${i18next.t('label.activity-use-here')}</h3>\n ${actions.canInstall\n ? html`<button @click=${() => this.setUse(true)}>${i18next.t('button.activity-install')}</button>`\n : html`<button @click=${() => this.setUse(false)}>${i18next.t('button.activity-uninstall')}</button>`}\n </section>\n `\n }\n\n private renderApprovalLine(actions: ReturnType<typeof detailActions>) {\n const line = this.activity?.approvalLine || []\n const steps = approvalSteps(line)\n\n return html`\n <section>\n <h3>${i18next.t('label.activity-approval-line')}</h3>\n\n ${steps\n ? html`<div class=\"steps\">\n ${line.map((one: any) => html`<span>${entity360Name(one.approver, one.approver?.name || one.value || '')}</span>`)}\n </div>`\n : ''}\n\n <button ?disabled=${!actions.canSetApprovalLine} @click=${() => this.openApprovalLine(line)}>\n ${i18next.t('button.activity-set-approval-line')}\n </button>\n\n <p class=\"why\">\n ${actions.approvalLineBlock\n ? i18next.t('text.activity-line-' + actions.approvalLineBlock)\n : steps\n ? i18next.t('text.activity-line-steps', { steps })\n : i18next.t('text.activity-line-none')}\n </p>\n </section>\n `\n }\n\n /**\n * 다른 꾸러미가 건 구획.\n *\n * **하나도 안 걸렸으면 그 사실을 말한다.** 빈자리로 두면 「이 앱에는 그 구획이 없다」와\n * 「정할 것이 없다」가 같은 화면이 된다.\n */\n private renderPanels() {\n const context = { activityName: this.entry.name, activityId: this.activity?.id }\n const panels = activityPanels(context)\n const shape = panelSection(\n panels.map(one => one.name),\n this.emptyPanels\n )\n\n if (shape.kind === 'none-registered') {\n return html`\n <section>\n <h3>${i18next.t('label.activity-panels')}</h3>\n <p class=\"why\">${i18next.t('text.activity-no-panels')}</p>\n </section>\n `\n }\n\n /*\n * 비었다고 알린 구획도 **그리기는 계속한다** — 숨길 뿐이다. 지우면 그 구획이 다시 읽고\n * 「있다」고 알릴 자리가 없어진다.\n */\n const hidden = shape.kind === 'all-empty' ? panels.map(one => one.name) : shape.hidden\n\n return html`\n <section ?hidden=${shape.kind === 'all-empty'}>\n <h3>${i18next.t('label.activity-panels')}</h3>\n ${panels.map(\n panel =>\n html`<div\n ?hidden=${hidden.includes(panel.name)}\n @activity-panel-content=${(event: CustomEvent) => this.panelReported(panel.name, event)}\n >\n ${panel.render(context)}\n </div>`\n )}\n </section>\n `\n }\n\n private panelReported(name: string, event: CustomEvent) {\n event.stopPropagation()\n this.emptyPanels = { ...this.emptyPanels, [name]: event.detail?.empty === true }\n }\n\n private async setUse(on: boolean) {\n const outcome = await ranMutation(() =>\n client.mutate({\n mutation: on\n ? gql`\n mutation ($name: String!) {\n activateInstallableActivity(name: $name) {\n name\n }\n }\n `\n : gql`\n mutation ($name: String!) {\n deactivateInstallableActivity(name: $name) {\n name\n }\n }\n `,\n variables: { name: this.entry.name }\n })\n )\n\n if (!outcome.ok) return\n\n this.fetch()\n }\n\n /**\n * 결재선 편집기는 **organization 것을 그대로 부른다.** 이 화면이 자기 편집기를 따로 지으면 같은\n * 결재선이 두 화면에서 다르게 편집된다.\n */\n private openApprovalLine(line: any[]) {\n const popup = openPopup(\n html`<approval-line-items-editor-popup\n .value=${line}\n .confirmCallback=${(after?: any[] | null) => this.saveApprovalLine(after || [])}\n ></approval-line-items-editor-popup>`,\n { backdrop: true, size: 'large', title: i18next.t('title.approval-line editor') }\n )\n\n return popup\n }\n\n private async saveApprovalLine(after: any[]) {\n const outcome = await ranMutation(() =>\n client.mutate({\n mutation: gql`\n mutation ($patches: [ActivityPatch!]!) {\n updateMultipleActivity(patches: $patches) {\n name\n }\n }\n `,\n variables: { patches: [{ id: this.activity.id, approvalLine: after, cuFlag: 'M' }] }\n })\n )\n\n if (!outcome.ok) return\n\n this.fetch()\n }\n}\n"]}
1
+ {"version":3,"file":"activity-detail-page.js","sourceRoot":"","sources":["../../../client/pages/activity-catalog/activity-detail-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,sCAAsC,CAAA;AAC7C,OAAO,8BAA8B,CAAA;AAErC,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;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEnF,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;C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H/B,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CAoc9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/list-state/ox-page-state.js'\nimport '@things-factory/organization'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { openPopup, entity360Name } from '@operato/layout'\nimport { navigate, PageView } from '@operato/shell'\nimport { ButtonStyles, DocumentPageStyles, ScrollbarStyles } from '@operato/styles'\n\nimport { ranMutation } from '../../components/say-outcome.js'\nimport { activityPanels, panelSection } from './activity-panels.js'\nimport { detailActions } from './activity-detail-actions.js'\nimport { canonicalStage } from './activity-stage.js'\nimport { guideLines } from './activity-guide.js'\n\n/**\n * 업무 하나 — **그 업무에 관한 일을 여기서 끝낸다.**\n *\n * ── 왜 이 화면이 생겼나 (2026-09-23) ───────────────────────────────────────\n * 결재선 하나를 세워서 문이 서는지 보려면 화면을 셋 열어야 했고, 역할에 사람이 없으면 넷에서\n * 다섯이었다 [확인함]. 카탈로그는 카드에 「결재선 없음」이라고 적어 놓고 **어디로 가야 하는지는\n * 말하지 않았다** — 그 파일 전체에 `navigate()` 도 `<a href>` 도 없었다. 사람은 메뉴로 돌아가\n * 이름으로 찾아야 했다.\n *\n * 그래서 카탈로그는 고르는 자리로 두고, 고른 뒤의 일은 이 화면 안에서 끝낸다.\n *\n * ── 돌아갈 길을 화면이 갖는다 ─────────────────────────────────────────────\n * 탭 줄에 카탈로그가 남아 있으니 됐다고 볼 수 없다. 탭 줄은 **없을 수 있다** — 페이지가\n * `mdibar: false` 를 적으면 셸이 걷고(`apptool-ui/client/layout/mdibar-visibility.ts`), 무엇보다\n * **주소를 받아서 바로 여는 사람에게는 이전 화면이 아예 없다.** 「이 업무 결재선 좀 봐 주세요」로\n * 링크를 받은 사람이 그 경우다. 그래서 머리에 돌아갈 자리를 직접 둔다.\n *\n * ── 못 하는 일은 까닭을 말한다 ────────────────────────────────────────────\n * 눌리지 않는 단추만 남기지 않는다. 무엇을 할 수 있는지와 못 하면 왜인지는\n * `activity-detail-actions.ts` 가 값으로 답하고, 이 화면은 그 값을 문장으로 바꾼다. 원인을 여기서\n * 지어내지 않는다.\n */\nconst DETAIL = gql`\n query ($name: String!) {\n responses: installableActivities {\n items {\n name\n label\n labelTKey\n description\n guide\n guideTKeys\n approvalSteps\n activity {\n id\n }\n readiness {\n stage\n }\n }\n }\n activityByName(name: $name) {\n id\n name\n description\n approvalLine {\n type\n value\n participation\n approver {\n id\n name\n description\n controlNo\n }\n }\n }\n }\n`\n\n/** 결재선에서 **서명하는 단계만** 센다. 참조는 알기만 하고 막지 않는다. */\nfunction approvalSteps(line?: any[]): number {\n return (line || []).filter(one => String(one?.participation || '') !== 'reference').length\n}\n\n@customElement('activity-detail-page')\nexport class ActivityDetailPage extends localize(i18next)(PageView) {\n static styles = [\n ScrollbarStyles,\n DocumentPageStyles,\n ButtonStyles,\n css`\n /*\n * ── On the document frame (ADR-0117) ─────────────────────────────────────\n * The screen imported the frame but drew outside its .page and styled its own section heads (small\n * capitals) and buttons (pills). None of the frame's gutter, sections or text ground reached it, and\n * long guide lines ran off the right edge. The parts are now page sections, the buttons sit in their\n * section heads, and the name line (drawn here, see context) takes the title bar's size.\n */\n\n /*\n * A section or panel the screen hides must stay hidden: .page-section sets display, which beat the\n * browser's own [hidden] rule and left the empty \"more settings\" head standing alone.\n */\n [hidden] {\n display: none;\n }\n\n /* Back to the catalog: above everything, read before the rest. */\n a.back {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n align-self: flex-start;\n }\n\n a.back md-icon {\n --md-icon-size: 16px;\n }\n\n /*\n * ── Say what the screen is for, then the one thing people come here to do ──\n * The screen read as a list of parts (a stage badge, an in-use badge, \"this activity is\", \"use here\",\n * \"approval line\", \"approval 2 steps\") and left the reader to work out what to do. Now: the name, one\n * sentence on what the activity is and what this screen decides, then who approves, with each step's\n * role and what that role is, then whether this site uses it, then the notes.\n */\n .head .name {\n margin: 0;\n font-size: var(--ui-t-page, 18px);\n font-weight: 700;\n text-wrap: balance;\n }\n\n\n .lead {\n margin: var(--spacing-small, 4px) 0 0;\n }\n\n .use {\n margin-left: var(--spacing-small, 4px);\n color: var(--ui-muted);\n font-size: var(--ui-t-small, 11.5px);\n font-weight: 400;\n }\n\n /* Why something cannot be done, or what the current state is: sentences, not badges. */\n .why {\n margin: 0;\n }\n\n .why {\n color: var(--ui-muted);\n }\n\n /* One approval step per row: the step and the name. */\n ol.steps {\n display: grid;\n grid-template-columns: max-content minmax(0, 1fr);\n column-gap: var(--spacing-large, 12px);\n margin: 0 0 var(--spacing-medium, 8px);\n padding: 0;\n list-style: none;\n }\n\n ol.steps li {\n grid-column: 1 / -1;\n display: grid;\n grid-template-columns: subgrid;\n align-items: baseline;\n padding: var(--spacing-medium, 8px) 0;\n border-top: 1px solid var(--md-sys-color-outline-variant);\n }\n\n ol.steps li:first-child {\n border-top: none;\n }\n\n .step {\n color: var(--ui-muted);\n font-size: var(--ui-t-small, 11.5px);\n font-variant-numeric: tabular-nums;\n }\n\n .who {\n font-weight: 600;\n }\n\n ul.notes {\n margin: 0;\n padding-left: var(--spacing-huge, 24px);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-small, 4px);\n }\n `\n ]\n\n @state() private name = ''\n @state() private entry: any = null\n @state() private activity: any = null\n @state() private loaded = false\n /** 구획이 「이 업무에는 보일 것 없음」을 알렸나. 이름으로 센다. */\n @state() private emptyPanels: Record<string, boolean> = {}\n /** 왜 못 읽었나 — ox-page-state 가 그것을 말하고 다시 시도를 준다. */\n @state() private loadError: unknown = null\n\n get context() {\n return {\n frame: 'document',\n title: this.entry ? this.shownName(this.entry) : i18next.t('title.activity-detail'),\n /*\n * 이름은 **이 화면이 그린다.** 제목 줄은 끈다.\n *\n * 이름 옆에 단계 띠와 「사용 중」이 함께 서야 한다 — 그 셋이 한 줄에 있어야 이 업무를 지금\n * 믿고 쓸 수 있는지가 한눈에 읽힌다. 제목 줄은 그것들을 못 받는다.\n *\n * 끄지 않으면 같은 이름이 화면에 두 번 뜬다(실측 2026-09-24: 제목 줄 「부적합 처분 승인」,\n * 바로 아래 또 「부적합 처분 승인」). `title` 은 그대로 두므로 **탭 이름은 살아 있다** —\n * `heading: false` 가 그리는 자리마다 켜고 끄라고 둔 문이다.\n */\n heading: false,\n /* The menu has no row for one activity; it lights the catalog, where the back link goes. */\n menu: 'activity-catalog',\n help: 'worklist/activity-catalog-page',\n actions: this.useActions()\n }\n }\n\n /**\n * 이름이 주소로 온다. 같은 라우트 안에서 이름만 바뀌어도 이 콜백이 다시 오므로, **이름이 실제로\n * 바뀌었을 때만** 다시 읽는다.\n */\n async pageUpdated(changes: any, lifecycle: any) {\n this.readName(lifecycle)\n }\n\n /**\n * 처음 그린 뒤에도 한 번 읽는다 — **첫 방문이 통째로 비는 것을 봤다.**\n *\n * [확인함 2026-09-24 :4000] 카드에서 처음 들어가면 주소는 맞고(`?name=…`) `lifecycle.params.name`\n * 도 들어 있는데 화면에 돌아갈 링크만 남았다. 같은 자리로 두 번째 들어가면 멀쩡했고, 그 상태에서\n * 콜백을 손으로 한 번 부르면 바로 채워졌다.\n *\n * 이 화면은 주소로 처음 닿을 때 **모듈이 그때 실려 온다**(route.ts 의 동적 import). 셸은 화면을\n * 처음 세울 때 이 콜백을 다음 animationFrame 으로 미루는데(page-view 가 「엘리먼트가 아직 안\n * 만들어졌을 수 있다」고 적어 둔 그 갈래), 그 사이에 요소가 아직 이 클래스로 올라오지 않았으면\n * **아무 일도 안 하는 기반 클래스의 콜백**이 불린다. 그 뒤로는 생애주기가 더 안 바뀌므로 이름을\n * 받을 기회가 다시 오지 않는다.\n *\n * 그래서 이름을 받는 자리를 둘로 둔다. 둘 다 같은 판단을 지나므로 두 번 읽지 않는다.\n */\n firstUpdated() {\n this.readName()\n }\n\n private readName(lifecycle?: any) {\n const name = String((lifecycle ?? this.lifecycle)?.params?.name || '')\n\n if (name && name !== this.name) {\n this.name = name\n /* 구획이 알린 것은 그 업무의 것이다. 다른 업무로 옮기면 다시 듣는다. */\n this.emptyPanels = {}\n this.fetch()\n }\n }\n\n private shownName(one: any): string {\n if (!one?.label) return String(one?.name ?? '')\n return one.labelTKey ? String(i18next.t(one.labelTKey, { defaultValue: one.label })) : String(one.label)\n }\n\n private async fetch() {\n this.loaded = false\n this.loadError = null\n /*\n * The tab and the document title come from `context`, and the shell reads it when the route\n * changes - before this answer arrives. Nothing read it again, so the tab kept the previous\n * activity's name while the page showed the next one [확인함 2026-09-24 :4000: 「교대 편성 변경\n * 승인」 on the tab over 「계획 정비 연기 승인」]. Drop the old entry so the wait says the generic\n * name, and hand the context over again once the answer is in.\n */\n this.entry = null\n this.updateContext()\n\n try {\n const response = await client.query({ query: DETAIL, variables: { name: this.name }, fetchPolicy: 'no-cache' })\n\n /*\n * 목록에 필터가 없어서 전부 받아 하나를 고른다. 업무는 설치된 모듈이 선언하는 것이라 수가\n * 닫혀 있다 [확인함 2026-09-23: 마흔 안쪽]. 그 전제가 깨지면 서버에 이름으로 찾는 갈래를\n * 두는 것이 맞다 — 여기서 자르지 않는다.\n */\n const items = response?.data?.responses?.items || []\n\n this.entry = items.find((one: any) => one.name === this.name) || null\n this.activity = response?.data?.activityByName || null\n this.loaded = true\n } catch (thrown) {\n this.loadError = thrown\n this.loaded = true\n }\n\n this.updateContext()\n }\n\n render() {\n return html`<div class=\"page\">\n <a\n class=\"back page-nav-link\"\n href=\"activity-catalog\"\n @click=${(e: Event) => (e.preventDefault(), navigate('activity-catalog'))}\n >\n <md-icon>chevron_left</md-icon>${i18next.t('button.back-to-activity-catalog')}\n </a>\n\n <ox-page-state .loading=${!this.loaded} .error=${this.loadError} @retry=${() => this.fetch()}\n >${this.loaded && !this.loadError ? this.renderDetail() : ''}</ox-page-state\n >\n </div>`\n }\n\n private renderDetail() {\n if (!this.entry) {\n /* 없는 이름으로 들어온 주소. 빈 화면으로 두지 않는다 — 무엇을 못 찾았는지 이름을 댄다. */\n return html`<div class=\"why\">${i18next.t('text.activity-not-found', { name: this.name })}</div>`\n }\n\n const actions = detailActions(this.entry)\n const lines = guideLines(this.entry, (key, options) => i18next.t(key, options)).filter(Boolean)\n /* The first guide line says what the activity is; with no guide, the description does. */\n const [what, ...notes] = lines.length ? lines : [this.entry.description].filter(Boolean)\n\n return html`\n <div class=\"head\">\n <h2 class=\"name\">${this.shownName(this.entry)} ${this.renderUse(actions)}</h2>\n ${what ? html`<p class=\"lead\">${what}</p>` : ''}\n </div>\n\n ${this.renderApprovalLine(actions)} ${this.renderNotes(notes)} ${this.renderPanels()}\n `\n }\n\n /** 알아 둘 것 — 첫 줄(무엇인가)을 뺀 안내문. 없으면 구획을 세우지 않는다. */\n private renderNotes(notes: string[]) {\n if (!notes.length) return html``\n\n return html`\n <section class=\"page-section\">\n <div class=\"page-section-header\"><h3>${i18next.t('label.activity-what-is-it')}</h3></div>\n <ul class=\"notes page-prose\">\n ${notes.map(line => html`<li>${line}</li>`)}\n </ul>\n </section>\n `\n }\n\n /**\n * 이 업무를 쓸지 말지 — 화면 전체의 결정이라 하단 동작 줄에 둔다(page-standard §8).\n * 아직 만들어지지 않은 업무는 쓸 수 없으므로 단추가 없다.\n */\n private useActions() {\n if (!this.entry) return []\n const actions = detailActions(this.entry)\n if (!actions.registered) return []\n\n return actions.inUse\n ? [{ title: i18next.t('button.activity-stop-using'), action: () => this.setUse(false) }]\n : [{ title: i18next.t('button.activity-start-using'), action: () => this.setUse(true), emphasis: { raised: true } }]\n }\n\n /** 이름 옆의 상태 한 마디. */\n private renderUse(actions: ReturnType<typeof detailActions>) {\n if (!actions.registered) {\n return html`<span class=\"use\">${i18next.t('text.activity-line-not-built')}</span>`\n }\n\n return html`<span class=\"use\"\n >${actions.inUse ? i18next.t('text.activity-in-use-here') : i18next.t('text.activity-not-in-use-here')}</span\n >`\n }\n\n /**\n * 누가 승인하나 — 결재·배정 현황에서 이름을 누르고 온 사람이 보러 온 것. 그래서 맨 위다.\n *\n * 단계와 이름만 적는다.\n */\n private renderApprovalLine(actions: ReturnType<typeof detailActions>) {\n const line = this.activity?.approvalLine || []\n const steps = approvalSteps(line)\n\n return html`\n <section class=\"page-section\">\n <div class=\"page-section-header\">\n <h3>${i18next.t('label.activity-approval-line')}</h3>\n <div class=\"page-section-actions\">\n <button\n ?raised=${!!actions.canSetApprovalLine && !steps}\n ?disabled=${!actions.canSetApprovalLine}\n @click=${() => this.openApprovalLine(line)}\n >\n ${i18next.t('button.activity-set-approval-line')}\n </button>\n </div>\n </div>\n\n ${steps\n ? html`<ol class=\"steps\">\n ${line.map(\n (one: any, at: number) =>\n html`<li>\n <span class=\"step\">${i18next.t('text.activity-step', { n: at + 1 })}</span>\n <span class=\"who\">${entity360Name(one.approver, one.approver?.name || one.value || '')}</span>\n </li>`\n )}\n </ol>`\n : ''}\n\n ${actions.approvalLineBlock\n ? html`<p class=\"why\">${i18next.t('text.activity-line-' + actions.approvalLineBlock)}</p>`\n : steps\n ? ''\n : html`<p class=\"why\">${i18next.t('text.activity-line-none')}</p>`}\n </section>\n `\n }\n\n /**\n * 다른 꾸러미가 건 구획.\n *\n * **하나도 안 걸렸으면 그 사실을 말한다.** 빈자리로 두면 「이 앱에는 그 구획이 없다」와\n * 「정할 것이 없다」가 같은 화면이 된다.\n */\n private renderPanels() {\n const context = { activityName: this.entry.name, activityId: this.activity?.id }\n const panels = activityPanels(context)\n const shape = panelSection(\n panels.map(one => one.name),\n this.emptyPanels\n )\n\n if (shape.kind === 'none-registered') {\n return html`\n <section class=\"page-section\">\n <div class=\"page-section-header\"><h3>${i18next.t('label.activity-panels')}</h3></div>\n <p class=\"why\">${i18next.t('text.activity-no-panels')}</p>\n </section>\n `\n }\n\n /*\n * 비었다고 알린 구획도 **그리기는 계속한다** — 숨길 뿐이다. 지우면 그 구획이 다시 읽고\n * 「있다」고 알릴 자리가 없어진다.\n */\n const hidden = shape.kind === 'all-empty' ? panels.map(one => one.name) : shape.hidden\n\n return html`\n <section class=\"page-section\" ?hidden=${shape.kind === 'all-empty'}>\n <div class=\"page-section-header\"><h3>${i18next.t('label.activity-panels')}</h3></div>\n ${panels.map(\n panel =>\n html`<div\n ?hidden=${hidden.includes(panel.name)}\n @activity-panel-content=${(event: CustomEvent) => this.panelReported(panel.name, event)}\n >\n ${panel.render(context)}\n </div>`\n )}\n </section>\n `\n }\n\n private panelReported(name: string, event: CustomEvent) {\n event.stopPropagation()\n this.emptyPanels = { ...this.emptyPanels, [name]: event.detail?.empty === true }\n }\n\n private async setUse(on: boolean) {\n const outcome = await ranMutation(() =>\n client.mutate({\n mutation: on\n ? gql`\n mutation ($name: String!) {\n activateInstallableActivity(name: $name) {\n name\n }\n }\n `\n : gql`\n mutation ($name: String!) {\n deactivateInstallableActivity(name: $name) {\n name\n }\n }\n `,\n variables: { name: this.entry.name }\n })\n )\n\n if (!outcome.ok) return\n\n this.fetch()\n }\n\n /**\n * 결재선 편집기는 **organization 것을 그대로 부른다.** 이 화면이 자기 편집기를 따로 지으면 같은\n * 결재선이 두 화면에서 다르게 편집된다.\n */\n private openApprovalLine(line: any[]) {\n const popup = openPopup(\n html`<approval-line-items-editor-popup\n .value=${line}\n .confirmCallback=${(after?: any[] | null) => this.saveApprovalLine(after || [])}\n ></approval-line-items-editor-popup>`,\n { backdrop: true, size: 'large', title: i18next.t('title.approval-line editor') }\n )\n\n return popup\n }\n\n private async saveApprovalLine(after: any[]) {\n const outcome = await ranMutation(() =>\n client.mutate({\n mutation: gql`\n mutation ($patches: [ActivityPatch!]!) {\n updateMultipleActivity(patches: $patches) {\n name\n }\n }\n `,\n variables: { patches: [{ id: this.activity.id, approvalLine: after, cuFlag: 'M' }] }\n })\n )\n\n if (!outcome.ok) return\n\n this.fetch()\n }\n}\n"]}
@@ -26,6 +26,6 @@ declare const ActivityThreadView_base: (new (...args: any[]) => LitElement) & ty
26
26
  export declare class ActivityThreadView extends ActivityThreadView_base {
27
27
  static styles: import("lit").CSSResult[];
28
28
  activityThread?: ActivityThread;
29
- render(): import("lit-html").TemplateResult<1> | typeof nothing;
29
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
30
30
  }
31
31
  export {};
@@ -1,4 +1,4 @@
1
- import '@material/web/button/text-button.js';
1
+ import '@operato/list-state/ox-page-state.js';
2
2
  import { PageView } from '@operato/shell';
3
3
  declare const WorkDoorsPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
4
4
  export declare class WorkDoorsPage extends WorkDoorsPage_base {
@@ -8,9 +8,10 @@ export declare class WorkDoorsPage extends WorkDoorsPage_base {
8
8
  private todo;
9
9
  private seatsStanding;
10
10
  private seatsOffered;
11
- private readFailure;
11
+ private loadError;
12
12
  get context(): {
13
13
  title: string;
14
+ description: string;
14
15
  };
15
16
  pageInitialized(): Promise<void>;
16
17
  pageUpdated(changes: any, lifecycle: any): Promise<void>;
@@ -32,6 +33,7 @@ export declare class WorkDoorsPage extends WorkDoorsPage_base {
32
33
  */
33
34
  private renderNext;
34
35
  render(): import("lit-html").TemplateResult<1>;
36
+ private renderDoors;
35
37
  private renderDoor;
36
38
  }
37
39
  export {};