@things-factory/worklist 10.1.202 → 10.1.203

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 (119) hide show
  1. package/dist-client/pages/activity/activity-list-page.d.ts +3 -0
  2. package/dist-client/pages/activity/activity-list-page.js +25 -13
  3. package/dist-client/pages/activity/activity-list-page.js.map +1 -1
  4. package/dist-client/pages/activity/activity-partial-view.js +1 -1
  5. package/dist-client/pages/activity/activity-partial-view.js.map +1 -1
  6. package/dist-client/pages/activity/assignee-roles-cell.d.ts +32 -0
  7. package/dist-client/pages/activity/assignee-roles-cell.js +26 -0
  8. package/dist-client/pages/activity/assignee-roles-cell.js.map +1 -0
  9. package/dist-client/pages/activity-catalog/activity-catalog-page.js +1 -1
  10. package/dist-client/pages/activity-catalog/activity-catalog-page.js.map +1 -1
  11. package/dist-client/pages/work-door/door-sentence.d.ts +1 -1
  12. package/dist-client/pages/work-door/door-sentence.js +2 -2
  13. package/dist-client/pages/work-door/door-sentence.js.map +1 -1
  14. package/dist-client/tsconfig.tsbuildinfo +1 -1
  15. package/dist-client/types/activity-instance-type.d.ts +2 -2
  16. package/dist-client/types/activity-instance-type.js.map +1 -1
  17. package/dist-client/types/activity-instance.d.ts +1 -1
  18. package/dist-client/types/activity-instance.js.map +1 -1
  19. package/dist-client/types/activity.d.ts +1 -1
  20. package/dist-client/types/activity.js.map +1 -1
  21. package/dist-server/controllers/activity-approval/resolve-judgeable-seats.d.ts +2 -2
  22. package/dist-server/controllers/activity-approval/resolve-judgeable-seats.js +2 -2
  23. package/dist-server/controllers/activity-approval/resolve-judgeable-seats.js.map +1 -1
  24. package/dist-server/controllers/activity-instance/abort.js +1 -1
  25. package/dist-server/controllers/activity-instance/abort.js.map +1 -1
  26. package/dist-server/controllers/activity-instance/assign.d.ts +2 -1
  27. package/dist-server/controllers/activity-instance/assign.js +104 -2
  28. package/dist-server/controllers/activity-instance/assign.js.map +1 -1
  29. package/dist-server/controllers/activity-instance/assignee-input.d.ts +25 -0
  30. package/dist-server/controllers/activity-instance/assignee-input.js +28 -0
  31. package/dist-server/controllers/activity-instance/assignee-input.js.map +1 -0
  32. package/dist-server/controllers/activity-instance/draft.js +7 -2
  33. package/dist-server/controllers/activity-instance/draft.js.map +1 -1
  34. package/dist-server/controllers/activity-instance/end.js +1 -1
  35. package/dist-server/controllers/activity-instance/end.js.map +1 -1
  36. package/dist-server/controllers/activity-instance/entitlement.d.ts +1 -1
  37. package/dist-server/controllers/activity-instance/entitlement.js +7 -5
  38. package/dist-server/controllers/activity-instance/entitlement.js.map +1 -1
  39. package/dist-server/controllers/activity-instance/issue.js +28 -7
  40. package/dist-server/controllers/activity-instance/issue.js.map +1 -1
  41. package/dist-server/controllers/activity-instance/pick.js +22 -3
  42. package/dist-server/controllers/activity-instance/pick.js.map +1 -1
  43. package/dist-server/controllers/activity-read/assert-may-read.js +2 -1
  44. package/dist-server/controllers/activity-read/assert-may-read.js.map +1 -1
  45. package/dist-server/controllers/activity-read/participates.d.ts +2 -2
  46. package/dist-server/controllers/activity-read/participates.js +2 -2
  47. package/dist-server/controllers/activity-read/participates.js.map +1 -1
  48. package/dist-server/controllers/activity-thread/check-authority.js +22 -4
  49. package/dist-server/controllers/activity-thread/check-authority.js.map +1 -1
  50. package/dist-server/controllers/common.js +17 -12
  51. package/dist-server/controllers/common.js.map +1 -1
  52. package/dist-server/service/activity/activity-history.d.ts +1 -2
  53. package/dist-server/service/activity/activity-history.js +4 -8
  54. package/dist-server/service/activity/activity-history.js.map +1 -1
  55. package/dist-server/service/activity/activity-mutation.js +39 -8
  56. package/dist-server/service/activity/activity-mutation.js.map +1 -1
  57. package/dist-server/service/activity/activity-query.d.ts +1 -1
  58. package/dist-server/service/activity/activity-query.js +9 -9
  59. package/dist-server/service/activity/activity-query.js.map +1 -1
  60. package/dist-server/service/activity/activity-type.d.ts +2 -2
  61. package/dist-server/service/activity/activity-type.js +12 -6
  62. package/dist-server/service/activity/activity-type.js.map +1 -1
  63. package/dist-server/service/activity/activity.d.ts +2 -2
  64. package/dist-server/service/activity/activity.js +15 -7
  65. package/dist-server/service/activity/activity.js.map +1 -1
  66. package/dist-server/service/activity/event-subscriber.js.map +1 -1
  67. package/dist-server/service/activity-instance/activity-instance-history.d.ts +1 -2
  68. package/dist-server/service/activity-instance/activity-instance-history.js +4 -8
  69. package/dist-server/service/activity-instance/activity-instance-history.js.map +1 -1
  70. package/dist-server/service/activity-instance/activity-instance-mutation.d.ts +1 -1
  71. package/dist-server/service/activity-instance/activity-instance-mutation.js +10 -5
  72. package/dist-server/service/activity-instance/activity-instance-mutation.js.map +1 -1
  73. package/dist-server/service/activity-instance/activity-instance-query.d.ts +1 -2
  74. package/dist-server/service/activity-instance/activity-instance-query.js +16 -25
  75. package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -1
  76. package/dist-server/service/activity-instance/activity-instance-type.d.ts +2 -2
  77. package/dist-server/service/activity-instance/activity-instance-type.js +12 -6
  78. package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -1
  79. package/dist-server/service/activity-instance/activity-instance.d.ts +2 -2
  80. package/dist-server/service/activity-instance/activity-instance.js +15 -7
  81. package/dist-server/service/activity-instance/activity-instance.js.map +1 -1
  82. package/dist-server/service/activity-instance/assignee-pool.d.ts +59 -0
  83. package/dist-server/service/activity-instance/assignee-pool.js +99 -0
  84. package/dist-server/service/activity-instance/assignee-pool.js.map +1 -0
  85. package/dist-server/service/activity-instance/event-subscriber.d.ts +9 -1
  86. package/dist-server/service/activity-instance/event-subscriber.js +20 -4
  87. package/dist-server/service/activity-instance/event-subscriber.js.map +1 -1
  88. package/dist-server/service/activity-summary/activity-summary-query.js +3 -3
  89. package/dist-server/service/activity-summary/activity-summary-query.js.map +1 -1
  90. package/dist-server/service/activity-thread/my-open-threads.d.ts +1 -1
  91. package/dist-server/service/activity-thread/my-open-threads.js +4 -3
  92. package/dist-server/service/activity-thread/my-open-threads.js.map +1 -1
  93. package/dist-server/service/subscription/subscription-filters.d.ts +3 -2
  94. package/dist-server/service/subscription/subscription-filters.js +6 -3
  95. package/dist-server/service/subscription/subscription-filters.js.map +1 -1
  96. package/dist-server/service/work-door/work-door-service.js +9 -6
  97. package/dist-server/service/work-door/work-door-service.js.map +1 -1
  98. package/dist-server/service/work-door/work-door-type.d.ts +1 -1
  99. package/dist-server/service/work-door/work-door-type.js +4 -4
  100. package/dist-server/service/work-door/work-door-type.js.map +1 -1
  101. package/dist-server/service/work-door/work-door.d.ts +3 -3
  102. package/dist-server/service/work-door/work-door.js +2 -2
  103. package/dist-server/service/work-door/work-door.js.map +1 -1
  104. package/dist-server/tsconfig.tsbuildinfo +1 -1
  105. package/package.json +9 -9
  106. package/tests/assign-role-pool.test.ts +508 -0
  107. package/tests/assignee-pool-history.test.ts +81 -0
  108. package/tests/may-read-case.test.ts +3 -2
  109. package/tests/org-member-domain.test.ts +10 -4
  110. package/tests/pick-race.pg.test.ts +2 -2
  111. package/tests/published-shape.test.ts +2 -2
  112. package/tests/role-pool-race.pg.test.ts +182 -0
  113. package/tests/work-door.test.ts +3 -3
  114. package/translations/en.json +5 -0
  115. package/translations/es.json +5 -0
  116. package/translations/ja.json +5 -0
  117. package/translations/ko.json +5 -0
  118. package/translations/ms.json +5 -0
  119. package/translations/zh.json +5 -0
@@ -2,6 +2,7 @@ import '@operato/data-grist';
2
2
  import './activity-model-item-list.js';
3
3
  import { DataGrist, FetchOption } from '@operato/data-grist';
4
4
  import { PageView } from '@operato/shell';
5
+ import { RoleOption } from './assignee-roles-cell.js';
5
6
  export declare const ActivityStatus: {
6
7
  display: string;
7
8
  value: string;
@@ -13,6 +14,7 @@ export declare class ActivityListPage extends ActivityListPage_base {
13
14
  mode: 'CARD' | 'GRID';
14
15
  grist: DataGrist;
15
16
  filters: string[];
17
+ private roleOptions;
16
18
  get context(): {
17
19
  title: string;
18
20
  search: {
@@ -41,6 +43,7 @@ export declare class ActivityListPage extends ActivityListPage_base {
41
43
  total: any;
42
44
  records: any;
43
45
  }>;
46
+ readRoleOptions(): Promise<RoleOption[]>;
44
47
  updateActivity(): Promise<void>;
45
48
  startActivitySchedule(record: any): Promise<void>;
46
49
  stopActivitySchedule(record: any): Promise<void>;
@@ -14,6 +14,7 @@ import { CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles, WorkSurfacePag
14
14
  import { adjustFilters, isMobileDevice } from '@operato/utils';
15
15
  import { ActivityStartingTypes, ActivityTypes, ActivityUITypes } from '../../types/types.js';
16
16
  import { priorityCell } from '../../activity-cells.js';
17
+ import { poolNames, poolPatch, withPoolIds } from './assignee-roles-cell.js';
17
18
  export const ActivityStatus = [
18
19
  { display: '', value: '' },
19
20
  { display: i18next.t('label.activity-state-draft'), value: 'draft' },
@@ -25,6 +26,8 @@ let ActivityListPage = class ActivityListPage extends localize(i18next)(PageView
25
26
  super(...arguments);
26
27
  this.mode = isMobileDevice() ? 'CARD' : 'GRID';
27
28
  this.filters = ['released'];
29
+ /* This domain's roles, for the pool column - read once when the page opens. */
30
+ this.roleOptions = [];
28
31
  }
29
32
  static { this.styles = [
30
33
  /* The work surface frame for a list screen (ADR-0060 decision 8). */
@@ -90,6 +93,7 @@ let ActivityListPage = class ActivityListPage extends localize(i18next)(PageView
90
93
  `;
91
94
  }
92
95
  async pageInitialized(lifecycle) {
96
+ this.roleOptions = await this.readRoleOptions();
93
97
  this.gristConfig = { list: { thumbnail: 'thumbnail',
94
98
  fields: ['name', 'description'],
95
99
  details: ['updatedAt']
@@ -253,17 +257,15 @@ let ActivityListPage = class ActivityListPage extends localize(i18next)(PageView
253
257
  filter: 'search',
254
258
  width: 85
255
259
  },
256
- { type: 'resource-object',
257
- name: 'assigneeRole',
260
+ { type: 'multiple-select',
261
+ name: 'assigneeRoleIds',
258
262
  header: i18next.t('field.assignee-role'),
259
263
  record: { editable: true,
260
- options: { title: i18next.t('title.lookup role'),
261
- queryName: 'roles'
262
- }
264
+ /* Anyone holding any one of them may pick up a case (ADR-0091 decision 9). */
265
+ options: () => this.roleOptions,
266
+ renderer: (value) => poolNames(value, this.roleOptions)
263
267
  },
264
- filter: 'search',
265
- width: 85
266
- },
268
+ width: 120 },
267
269
  { type: 'resource-object',
268
270
  name: 'supervisoryRole',
269
271
  header: i18next.t('field.supervisory-role'),
@@ -387,8 +389,7 @@ let ActivityListPage = class ActivityListPage extends localize(i18next)(PageView
387
389
  sorters: [
388
390
  { name: 'name'
389
391
  }
390
- ]
391
- };
392
+ ] };
392
393
  }
393
394
  async fetchHandler({ page, limit, sortings = [], filters = [] }) {
394
395
  const status = ['draft', 'released', 'deprecated'].filter(state => this.filters?.includes(state));
@@ -422,7 +423,7 @@ let ActivityListPage = class ActivityListPage extends localize(i18next)(PageView
422
423
  issuerRole { id
423
424
  name
424
425
  }
425
- assigneeRole { id
426
+ assigneeRoles { id
426
427
  name
427
428
  }
428
429
  supervisoryRole { id
@@ -473,9 +474,20 @@ let ActivityListPage = class ActivityListPage extends localize(i18next)(PageView
473
474
  }
474
475
  });
475
476
  return { total: response.data.responses.total || 0,
476
- records: response.data.responses.items || []
477
+ records: (response.data.responses.items || []).map(withPoolIds)
477
478
  };
478
479
  }
480
+ async readRoleOptions() {
481
+ const response = await client.query({ query: gql `
482
+ query { roles(filters: [], pagination: { page: 1, limit: 1000 }, sortings: [{ name: "name" }]) { items { id
483
+ name
484
+ }
485
+ }
486
+ }
487
+ `
488
+ });
489
+ return (response.data?.roles?.items || []).map((role) => ({ display: role.name, value: role.id }));
490
+ }
479
491
  async updateActivity() {
480
492
  let patches = this.grist?.dirtyRecords;
481
493
  if (patches && patches.length) {
@@ -486,7 +498,7 @@ let ActivityListPage = class ActivityListPage extends localize(i18next)(PageView
486
498
  patchField[key] = dirtyFields[key].after;
487
499
  }
488
500
  patchField.cuFlag = patch.__dirty__;
489
- return patchField;
501
+ return poolPatch(patchField);
490
502
  });
491
503
  const outcome = await ranMutation(() => client.mutate({ mutation: gql `
492
504
  mutation ($patches: [ActivityPatch!]!) { updateMultipleActivity(patches: $patches) { name
@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AU,CAAC;8BAAS,SAAS;+CAAA;AAE3B;IAAR,KAAK,EAAE;;iDAAiC;AArB9B,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CAihB5B","sourcesContent":["import '@operato/data-grist'\nimport './activity-model-item-list.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { DataGrist, FetchOption, getEditor, getRenderer } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ranMutation } from '../../components/say-outcome.js'\nimport { notify, openPopup } from '@operato/layout'\nimport { PageView } from '@operato/shell'\nimport { CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles'\nimport { adjustFilters, isMobileDevice } from '@operato/utils'\n\nimport { ActivityStartingTypes, ActivityTypes, ActivityUITypes } from '../../types/types.js'\n\nimport { priorityCell } from '../../activity-cells.js'\n\nexport const ActivityStatus = [\n { display: '', value: '' },\n { display: i18next.t('label.activity-state-draft'), value: 'draft' },\n { display: i18next.t('label.activity-state-released'), value: 'released' },\n { display: i18next.t('label.activity-state-deprecated'), value: 'deprecated' }\n]\n\n@customElement('activity-list-page')\nexport class ActivityListPage extends localize(i18next)(PageView) { static styles = [\n /* The work surface frame for a list screen (ADR-0060 decision 8). */\n WorkSurfacePageStyles,\n ScrollbarStyles,\n CommonHeaderStyles,\n css`\n :host {\n --grid-record-emphasized-background-color: #8b0000;\n --grid-record-emphasized-color: #ff6b6b;\n }\n\n .header { grid-template-areas: 'filters actions';\n }\n `\n ]\n\n @property({ type: Object }) gristConfig?: any\n @property({ type: String }) mode: 'CARD' | 'GRID' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') grist!: DataGrist\n\n @state() filters: string[] = ['released']\n\n get context() { return { title: i18next.t('title.activity list'),\n search: { handler: (search: string) => { this.grist.searchText = search\n },\n value: this.grist?.searchText || ''\n },\n filter: { handler: () => { this.grist.toggleHeadroom()\n }\n },\n help: 'worklist/activity',\n actions: [\n { title: i18next.t('button.save'),\n action: this.updateActivity.bind(this),\n ...CommonButtonStyles.save\n }\n ]\n }\n }\n\n render() { const mode = this.mode\n\n return html`\n <ox-grist class=\"page-fill\" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-input-select-buttons\n .value=${this.filters}\n .options=${[\n { display: i18next.t('label.filter-draft'),\n value: 'draft'\n },\n { display: i18next.t('label.filter-released'),\n value: 'released'\n },\n { display: i18next.t('label.filter-deprecated'),\n value: 'deprecated'\n }\n ]}\n @change=${(e: CustomEvent) => { this.filters = (e.currentTarget as any)?.value\n this.grist.fetch()\n }}\n ></ox-input-select-buttons>\n </div>\n\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle) { this.gristConfig = { list: { thumbnail: 'thumbnail',\n fields: ['name', 'description'],\n details: ['updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n { type: 'gutter',\n gutterName: 'button',\n icon: record => (!record ? 'calendar_add_on' : !record.id || !record.scheduleId ? '' : 'event_available'),\n title: i18next.t('button.schedule-task'),\n handlers: { click: (columns, data, column, record, rowIndex) => { if (!record || !record.id || (!record.scheduleId && !record.schedule)) { return\n }\n if (record.scheduleId) { this.stopActivitySchedule(record)\n } else { this.startActivitySchedule(record)\n }\n }\n }\n },\n { type: 'gutter',\n gutterName: 'button',\n icon: record => (!record ? 'reorder' : record.id ? 'reorder' : ''),\n iconOnly: false,\n title: record => (!record ? i18next.t('button.detail') : record.id ? i18next.t('button.detail') : ''),\n width: 72,\n handlers: { click: (columns, data, column, record, rowIndex) => { if (!record.id) return\n const popup = openPopup(\n html` <activity-model-item-list .activity=${record}></activity-model-item-list> `,\n { backdrop: true,\n help: 'worklist/activity/activity-model-item-list',\n size: 'large',\n title: i18next.t('title.activity model item list')\n }\n )\n popup.onclosed = () => { this.grist?.fetch()\n }\n }\n }\n },\n { type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: { editable: true\n },\n filter: 'search',\n sortable: true,\n width: 175\n },\n { type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: { editable: true\n },\n filter: 'search',\n width: 225\n },\n { type: 'approval-line',\n name: 'approvalLine',\n header: i18next.t('field.approval-line'),\n record: { editable: true,\n align: 'center'\n },\n width: 60\n },\n { type: 'select',\n name: 'state',\n header: i18next.t('field.status'),\n record: { editable: true,\n options: ActivityStatus\n },\n filter: true,\n width: 75\n },\n { type: 'select',\n name: 'activityType',\n label: true,\n header: i18next.t('field.activity-type'),\n record: { editable: true,\n options: ActivityTypes\n },\n sortable: true,\n width: 75\n },\n { type: 'select',\n name: 'startingType',\n label: true,\n header: i18next.t('field.starting-type'),\n record: { editable: true,\n options: ActivityStartingTypes\n },\n sortable: true,\n width: 75\n },\n { type: 'select',\n name: 'multiple',\n header: i18next.t('field.multiple'),\n record: { editable: true,\n options: [\n { display: '', value: '' },\n { display: 'Single', value: 'single' },\n { display: 'Parallel', value: 'parallel' },\n { display: 'Sequential', value: 'sequential' }\n ]\n },\n width: 90\n },\n { type: 'activity-search-keys',\n name: 'searchKeys',\n label: true,\n header: i18next.t('field.search-keys'),\n record: { editable: true\n },\n width: 60\n },\n { type: 'number',\n name: 'priority',\n header: i18next.t('field.priority'),\n record: {\n editable: false,\n align: 'center',\n renderer: priorityCell()\n },\n width: 75\n },\n { type: 'crontab',\n name: 'schedule',\n label: true,\n header: i18next.t('field.schedule'),\n record: { editable: true,\n options: { objectified: true\n }\n },\n width: 80\n },\n { type: 'timezone',\n name: 'timezone',\n header: i18next.t('field.timezone'),\n record: { editable: true\n },\n width: 120\n },\n { type: 'image',\n name: 'thumbnail',\n header: i18next.t('field.thumbnail'),\n record: { editable: true },\n width: 120\n },\n { type: 'resource-object',\n name: 'issuerRole',\n header: i18next.t('field.issuer-role'),\n record: { editable: true,\n options: { title: i18next.t('title.lookup role'),\n queryName: 'roles'\n }\n },\n filter: 'search',\n width: 85\n },\n { type: 'resource-object',\n name: 'assigneeRole',\n header: i18next.t('field.assignee-role'),\n record: { editable: true,\n options: { title: i18next.t('title.lookup role'),\n queryName: 'roles'\n }\n },\n filter: 'search',\n width: 85\n },\n { type: 'resource-object',\n name: 'supervisoryRole',\n header: i18next.t('field.supervisory-role'),\n record: { editable: true,\n options: { title: i18next.t('title.lookup role'),\n queryName: 'roles'\n }\n },\n filter: 'search',\n width: 85\n },\n { type: 'assignees',\n name: 'assignees',\n header: i18next.t('field.assignees'),\n record: { editable: true\n },\n width: 80\n },\n { type: 'select',\n name: 'uiType',\n label: true,\n header: i18next.t('field.ui-type'),\n record: { editable: true,\n options: ActivityUITypes\n },\n width: 80\n },\n { type: 'string',\n name: 'uiSource',\n header: i18next.t('field.ui-source'),\n record: { editable: true,\n editor: function (value, column, record, rowIndex, field) { var type = record.uiType !== 'board' ? 'script' : 'board'\n return getEditor(type)(value, column, record, rowIndex, field)\n },\n renderer: function (value, column, record, rowIndex, field) { var type = record.uiType !== 'board' ? 'script' : 'board'\n return getRenderer(type)(value, column, record, rowIndex, field)\n }\n },\n width: 140\n },\n { type: 'select',\n name: 'viewType',\n label: true,\n header: i18next.t('field.view-type'),\n record: { editable: true,\n options: ActivityUITypes\n },\n width: 80\n },\n { type: 'string',\n name: 'viewSource',\n header: i18next.t('field.view-source'),\n record: { editable: true,\n editor: function (value, column, record, rowIndex, field) { var type = record.viewType !== 'board' ? 'script' : 'board'\n return getEditor(type)(value, column, record, rowIndex, field)\n },\n renderer: function (value, column, record, rowIndex, field) { var type = record.viewType !== 'board' ? 'script' : 'board'\n return getRenderer(type)(value, column, record, rowIndex, field)\n }\n },\n width: 140\n },\n { type: 'select',\n name: 'reportType',\n label: true,\n header: i18next.t('field.report-type'),\n record: { editable: true,\n options: ActivityUITypes\n },\n width: 80\n },\n { type: 'string',\n name: 'reportSource',\n header: i18next.t('field.report-source'),\n record: { editable: true,\n editor: function (value, column, record, rowIndex, field) { var type = record.reportType !== 'board' ? 'script' : 'board'\n return getEditor(type)(value, column, record, rowIndex, field)\n },\n renderer: function (value, column, record, rowIndex, field) { var type = record.reportType !== 'board' ? 'script' : 'board'\n return getRenderer(type)(value, column, record, rowIndex, field)\n }\n },\n width: 140\n },\n { type: 'duration',\n name: 'standardTime',\n header: i18next.t('field.standard-time'),\n record: { editable: true\n },\n sortable: true,\n width: 105\n },\n { type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: { editable: false\n },\n sortable: true,\n width: 85\n },\n { type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: { editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: { selectable: { multiple: true\n },\n handlers: { click: 'select-row-toggle'\n }\n },\n sorters: [\n { name: 'name'\n }\n ]\n }\n }\n\n async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) { const status = ['draft', 'released', 'deprecated'].filter(state => this.filters?.includes(state))\n\n if (status.length > 0) { filters = adjustFilters(filters, [{ name: 'state', operator: 'in', value: status }])\n }\n\n const response = await client.query({ query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) { responses: activities(filters: $filters, pagination: $pagination, sortings: $sortings) { items { id\n name\n description\n activityType\n searchKeys { name\n description\n inputKey\n tKey\n }\n state\n model { name\n description\n active\n tag\n inout\n type\n unit\n options\n quantifier\n spec\n }\n thumbnail\n priority\n issuerRole { id\n name\n }\n assigneeRole { id\n name\n }\n supervisoryRole { id\n name\n }\n assignees { type\n value\n assignee { id\n name\n description\n controlNo\n }\n }\n approvalLine { type\n value\n participation\n notifyAfter\n approver { id\n name\n description\n controlNo\n }\n }\n uiType\n uiSource\n viewType\n viewSource\n reportType\n reportSource\n startingType\n multiple\n schedule\n timezone\n scheduleId\n standardTime\n updater { id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: { filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return { total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async updateActivity() { let patches = this.grist?.dirtyRecords\n if (patches && patches.length) { patches = patches.map(patch => { let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) { patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const outcome = await ranMutation(() => client.mutate({ mutation: gql`\n mutation ($patches: [ActivityPatch!]!) { updateMultipleActivity(patches: $patches) { name\n }\n }\n `,\n variables: { patches\n },\n context: { hasUpload: true\n }\n }))\n\n if (outcome.ok) { this.grist?.fetch()\n }\n }\n }\n\n async startActivitySchedule(record) {\n /*\n * This read response.data.startActivitySchedule.scheduleId straight off the answer. A refused\n * mutation resolves with null data under errorPolicy: 'all', so the failure did not go quiet —\n * it threw a TypeError on the null, and the message below never ran either way.\n *\n * Its sibling stopActivitySchedule already reported both outcomes; this one did not.\n */\n const outcome = await ranMutation(() => client.mutate({\n mutation: gql`\n mutation ($activityId: String!) {\n startActivitySchedule(activityId: $activityId) {\n scheduleId\n }\n }\n `,\n variables: {\n activityId: record.id\n }\n }))\n\n if (!outcome.ok) {\n this.grist.fetch()\n return\n }\n\n record.scheduleId = outcome.data.startActivitySchedule?.scheduleId\n\n notify({ level: 'info',\n message: `success to start activity schedule : ${record.name}`\n })\n\n this.grist.fetch()\n }\n\n async stopActivitySchedule(record) { var response = await client.mutate({ mutation: gql`\n mutation ($activityId: String!) { stopActivitySchedule(activityId: $activityId) { scheduleId\n }\n }\n `,\n variables: { activityId: record.id\n }\n })\n\n if (!response.errors) { notify({ level: 'info',\n message: `success to stop activity schedule : ${record.name}`\n })\n } else { notify({ level: 'error',\n message: `${response.errors.map(error => error.message).join('\\n')}`\n })\n }\n\n this.grist.fetch()\n }\n}\n"]}
1
+ {"version":3,"file":"activity-list-page.js","sourceRoot":"","sources":["../../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AAC,MAAM,EAAE,CAAC;YAAO,MAAM,CAAC,EAAU,KAAK,EAAE,MAAM;gBACxD,OAAO,EAAE,uCAAuC,MAAM,CAAC,IAAI,EAAE;aACnE,CAAC,CAAA;QACF,CAAC;aAAM,CAAC;YAAO,MAAM,CAAC,EAAU,KAAK,EAAE,OAAO;gBACvC,OAAO,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;aAC1E,CAAC,CAAA;QACF,CAAC;QAEE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;IACrB,CAAC;;AA9gB4B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CAA2D;AAEnE;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;+CAAA;AAE3B;IAAR,KAAK,EAAE;;iDAAiC;AArB9B,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CA+hB5B","sourcesContent":["import '@operato/data-grist'\nimport './activity-model-item-list.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { DataGrist, FetchOption, getEditor, getRenderer } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ranMutation } from '../../components/say-outcome.js'\nimport { notify, openPopup } from '@operato/layout'\nimport { PageView } from '@operato/shell'\nimport { CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles'\nimport { adjustFilters, isMobileDevice } from '@operato/utils'\n\nimport { ActivityStartingTypes, ActivityTypes, ActivityUITypes } from '../../types/types.js'\n\nimport { priorityCell } from '../../activity-cells.js'\nimport { RoleOption, poolNames, poolPatch, withPoolIds } from './assignee-roles-cell.js'\n\nexport const ActivityStatus = [\n { display: '', value: '' },\n { display: i18next.t('label.activity-state-draft'), value: 'draft' },\n { display: i18next.t('label.activity-state-released'), value: 'released' },\n { display: i18next.t('label.activity-state-deprecated'), value: 'deprecated' }\n]\n\n@customElement('activity-list-page')\nexport class ActivityListPage extends localize(i18next)(PageView) { static styles = [\n /* The work surface frame for a list screen (ADR-0060 decision 8). */\n WorkSurfacePageStyles,\n ScrollbarStyles,\n CommonHeaderStyles,\n css`\n :host {\n --grid-record-emphasized-background-color: #8b0000;\n --grid-record-emphasized-color: #ff6b6b;\n }\n\n .header { grid-template-areas: 'filters actions';\n }\n `\n ]\n\n @property({ type: Object }) gristConfig?: any\n @property({ type: String }) mode: 'CARD' | 'GRID' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') grist!: DataGrist\n\n @state() filters: string[] = ['released']\n /* This domain's roles, for the pool column - read once when the page opens. */\n private roleOptions: RoleOption[] = []\n\n get context() { return { title: i18next.t('title.activity list'),\n search: { handler: (search: string) => { this.grist.searchText = search\n },\n value: this.grist?.searchText || ''\n },\n filter: { handler: () => { this.grist.toggleHeadroom()\n }\n },\n help: 'worklist/activity',\n actions: [\n { title: i18next.t('button.save'),\n action: this.updateActivity.bind(this),\n ...CommonButtonStyles.save\n }\n ]\n }\n }\n\n render() { const mode = this.mode\n\n return html`\n <ox-grist class=\"page-fill\" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-input-select-buttons\n .value=${this.filters}\n .options=${[\n { display: i18next.t('label.filter-draft'),\n value: 'draft'\n },\n { display: i18next.t('label.filter-released'),\n value: 'released'\n },\n { display: i18next.t('label.filter-deprecated'),\n value: 'deprecated'\n }\n ]}\n @change=${(e: CustomEvent) => { this.filters = (e.currentTarget as any)?.value\n this.grist.fetch()\n }}\n ></ox-input-select-buttons>\n </div>\n\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle) { this.roleOptions = await this.readRoleOptions()\n this.gristConfig = { list: { thumbnail: 'thumbnail',\n fields: ['name', 'description'],\n details: ['updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n { type: 'gutter',\n gutterName: 'button',\n icon: record => (!record ? 'calendar_add_on' : !record.id || !record.scheduleId ? '' : 'event_available'),\n title: i18next.t('button.schedule-task'),\n handlers: { click: (columns, data, column, record, rowIndex) => { if (!record || !record.id || (!record.scheduleId && !record.schedule)) { return\n }\n if (record.scheduleId) { this.stopActivitySchedule(record)\n } else { this.startActivitySchedule(record)\n }\n }\n }\n },\n { type: 'gutter',\n gutterName: 'button',\n icon: record => (!record ? 'reorder' : record.id ? 'reorder' : ''),\n iconOnly: false,\n title: record => (!record ? i18next.t('button.detail') : record.id ? i18next.t('button.detail') : ''),\n width: 72,\n handlers: { click: (columns, data, column, record, rowIndex) => { if (!record.id) return\n const popup = openPopup(\n html` <activity-model-item-list .activity=${record}></activity-model-item-list> `,\n { backdrop: true,\n help: 'worklist/activity/activity-model-item-list',\n size: 'large',\n title: i18next.t('title.activity model item list')\n }\n )\n popup.onclosed = () => { this.grist?.fetch()\n }\n }\n }\n },\n { type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: { editable: true\n },\n filter: 'search',\n sortable: true,\n width: 175\n },\n { type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: { editable: true\n },\n filter: 'search',\n width: 225\n },\n { type: 'approval-line',\n name: 'approvalLine',\n header: i18next.t('field.approval-line'),\n record: { editable: true,\n align: 'center'\n },\n width: 60\n },\n { type: 'select',\n name: 'state',\n header: i18next.t('field.status'),\n record: { editable: true,\n options: ActivityStatus\n },\n filter: true,\n width: 75\n },\n { type: 'select',\n name: 'activityType',\n label: true,\n header: i18next.t('field.activity-type'),\n record: { editable: true,\n options: ActivityTypes\n },\n sortable: true,\n width: 75\n },\n { type: 'select',\n name: 'startingType',\n label: true,\n header: i18next.t('field.starting-type'),\n record: { editable: true,\n options: ActivityStartingTypes\n },\n sortable: true,\n width: 75\n },\n { type: 'select',\n name: 'multiple',\n header: i18next.t('field.multiple'),\n record: { editable: true,\n options: [\n { display: '', value: '' },\n { display: 'Single', value: 'single' },\n { display: 'Parallel', value: 'parallel' },\n { display: 'Sequential', value: 'sequential' }\n ]\n },\n width: 90\n },\n { type: 'activity-search-keys',\n name: 'searchKeys',\n label: true,\n header: i18next.t('field.search-keys'),\n record: { editable: true\n },\n width: 60\n },\n { type: 'number',\n name: 'priority',\n header: i18next.t('field.priority'),\n record: {\n editable: false,\n align: 'center',\n renderer: priorityCell()\n },\n width: 75\n },\n { type: 'crontab',\n name: 'schedule',\n label: true,\n header: i18next.t('field.schedule'),\n record: { editable: true,\n options: { objectified: true\n }\n },\n width: 80\n },\n { type: 'timezone',\n name: 'timezone',\n header: i18next.t('field.timezone'),\n record: { editable: true\n },\n width: 120\n },\n { type: 'image',\n name: 'thumbnail',\n header: i18next.t('field.thumbnail'),\n record: { editable: true },\n width: 120\n },\n { type: 'resource-object',\n name: 'issuerRole',\n header: i18next.t('field.issuer-role'),\n record: { editable: true,\n options: { title: i18next.t('title.lookup role'),\n queryName: 'roles'\n }\n },\n filter: 'search',\n width: 85\n },\n { type: 'multiple-select',\n name: 'assigneeRoleIds',\n header: i18next.t('field.assignee-role'),\n record: { editable: true,\n /* Anyone holding any one of them may pick up a case (ADR-0091 decision 9). */\n options: () => this.roleOptions,\n renderer: (value: string[]) => poolNames(value, this.roleOptions)\n },\n width: 120\n },\n { type: 'resource-object',\n name: 'supervisoryRole',\n header: i18next.t('field.supervisory-role'),\n record: { editable: true,\n options: { title: i18next.t('title.lookup role'),\n queryName: 'roles'\n }\n },\n filter: 'search',\n width: 85\n },\n { type: 'assignees',\n name: 'assignees',\n header: i18next.t('field.assignees'),\n record: { editable: true\n },\n width: 80\n },\n { type: 'select',\n name: 'uiType',\n label: true,\n header: i18next.t('field.ui-type'),\n record: { editable: true,\n options: ActivityUITypes\n },\n width: 80\n },\n { type: 'string',\n name: 'uiSource',\n header: i18next.t('field.ui-source'),\n record: { editable: true,\n editor: function (value, column, record, rowIndex, field) { var type = record.uiType !== 'board' ? 'script' : 'board'\n return getEditor(type)(value, column, record, rowIndex, field)\n },\n renderer: function (value, column, record, rowIndex, field) { var type = record.uiType !== 'board' ? 'script' : 'board'\n return getRenderer(type)(value, column, record, rowIndex, field)\n }\n },\n width: 140\n },\n { type: 'select',\n name: 'viewType',\n label: true,\n header: i18next.t('field.view-type'),\n record: { editable: true,\n options: ActivityUITypes\n },\n width: 80\n },\n { type: 'string',\n name: 'viewSource',\n header: i18next.t('field.view-source'),\n record: { editable: true,\n editor: function (value, column, record, rowIndex, field) { var type = record.viewType !== 'board' ? 'script' : 'board'\n return getEditor(type)(value, column, record, rowIndex, field)\n },\n renderer: function (value, column, record, rowIndex, field) { var type = record.viewType !== 'board' ? 'script' : 'board'\n return getRenderer(type)(value, column, record, rowIndex, field)\n }\n },\n width: 140\n },\n { type: 'select',\n name: 'reportType',\n label: true,\n header: i18next.t('field.report-type'),\n record: { editable: true,\n options: ActivityUITypes\n },\n width: 80\n },\n { type: 'string',\n name: 'reportSource',\n header: i18next.t('field.report-source'),\n record: { editable: true,\n editor: function (value, column, record, rowIndex, field) { var type = record.reportType !== 'board' ? 'script' : 'board'\n return getEditor(type)(value, column, record, rowIndex, field)\n },\n renderer: function (value, column, record, rowIndex, field) { var type = record.reportType !== 'board' ? 'script' : 'board'\n return getRenderer(type)(value, column, record, rowIndex, field)\n }\n },\n width: 140\n },\n { type: 'duration',\n name: 'standardTime',\n header: i18next.t('field.standard-time'),\n record: { editable: true\n },\n sortable: true,\n width: 105\n },\n { type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: { editable: false\n },\n sortable: true,\n width: 85\n },\n { type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: { editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: { selectable: { multiple: true\n },\n handlers: { click: 'select-row-toggle'\n }\n },\n sorters: [\n { name: 'name'\n }\n ]\n }\n }\n\n async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) { const status = ['draft', 'released', 'deprecated'].filter(state => this.filters?.includes(state))\n\n if (status.length > 0) { filters = adjustFilters(filters, [{ name: 'state', operator: 'in', value: status }])\n }\n\n const response = await client.query({ query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) { responses: activities(filters: $filters, pagination: $pagination, sortings: $sortings) { items { id\n name\n description\n activityType\n searchKeys { name\n description\n inputKey\n tKey\n }\n state\n model { name\n description\n active\n tag\n inout\n type\n unit\n options\n quantifier\n spec\n }\n thumbnail\n priority\n issuerRole { id\n name\n }\n assigneeRoles { id\n name\n }\n supervisoryRole { id\n name\n }\n assignees { type\n value\n assignee { id\n name\n description\n controlNo\n }\n }\n approvalLine { type\n value\n participation\n notifyAfter\n approver { id\n name\n description\n controlNo\n }\n }\n uiType\n uiSource\n viewType\n viewSource\n reportType\n reportSource\n startingType\n multiple\n schedule\n timezone\n scheduleId\n standardTime\n updater { id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: { filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return { total: response.data.responses.total || 0,\n records: (response.data.responses.items || []).map(withPoolIds)\n }\n }\n\n async readRoleOptions(): Promise<RoleOption[]> { const response = await client.query({ query: gql`\n query { roles(filters: [], pagination: { page: 1, limit: 1000 }, sortings: [{ name: \"name\" }]) { items { id\n name\n }\n }\n }\n `\n })\n\n return (response.data?.roles?.items || []).map((role: { id: string; name: string }) => ({ display: role.name, value: role.id }))\n }\n\n async updateActivity() { let patches = this.grist?.dirtyRecords\n if (patches && patches.length) { patches = patches.map(patch => { let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) { patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return poolPatch(patchField)\n })\n\n const outcome = await ranMutation(() => client.mutate({ mutation: gql`\n mutation ($patches: [ActivityPatch!]!) { updateMultipleActivity(patches: $patches) { name\n }\n }\n `,\n variables: { patches\n },\n context: { hasUpload: true\n }\n }))\n\n if (outcome.ok) { this.grist?.fetch()\n }\n }\n }\n\n async startActivitySchedule(record) {\n /*\n * This read response.data.startActivitySchedule.scheduleId straight off the answer. A refused\n * mutation resolves with null data under errorPolicy: 'all', so the failure did not go quiet —\n * it threw a TypeError on the null, and the message below never ran either way.\n *\n * Its sibling stopActivitySchedule already reported both outcomes; this one did not.\n */\n const outcome = await ranMutation(() => client.mutate({\n mutation: gql`\n mutation ($activityId: String!) {\n startActivitySchedule(activityId: $activityId) {\n scheduleId\n }\n }\n `,\n variables: {\n activityId: record.id\n }\n }))\n\n if (!outcome.ok) {\n this.grist.fetch()\n return\n }\n\n record.scheduleId = outcome.data.startActivitySchedule?.scheduleId\n\n notify({ level: 'info',\n message: `success to start activity schedule : ${record.name}`\n })\n\n this.grist.fetch()\n }\n\n async stopActivitySchedule(record) { var response = await client.mutate({ mutation: gql`\n mutation ($activityId: String!) { stopActivitySchedule(activityId: $activityId) { scheduleId\n }\n }\n `,\n variables: { activityId: record.id\n }\n })\n\n if (!response.errors) { notify({ level: 'info',\n message: `success to stop activity schedule : ${record.name}`\n })\n } else { notify({ level: 'error',\n message: `${response.errors.map(error => error.message).join('\\n')}`\n })\n }\n\n this.grist.fetch()\n }\n}\n"]}
@@ -27,7 +27,7 @@ let ActivityView = class ActivityView extends localize(i18next)(LitElement) {
27
27
  if (!this.activity) {
28
28
  return html `<div>no activity info.</div>`;
29
29
  }
30
- const { id, name, description, activityType, state, searchKeys, model, priority, startingType, schedule, timzeone, standardTime, issuerRole, assigneeRole, supervisoryRole, assignees, approvalLine, uiType, uiSource, viewType, viewSource, reportType, reportSource } = this.activity;
30
+ const { id, name, description, activityType, state, searchKeys, model, priority, startingType, schedule, timzeone, standardTime, issuerRole, assigneeRoles, supervisoryRole, assignees, approvalLine, uiType, uiSource, viewType, viewSource, reportType, reportSource } = this.activity;
31
31
  return html `
32
32
  <div>name: ${name}</div>
33
33
  <div>description: ${description}</div>
@@ -1 +1 @@
1
- {"version":3,"file":"activity-partial-view.js","sourceRoot":"","sources":["../../../client/pages/activity/activity-partial-view.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAgB,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAK3C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;aACtD,WAAM,GAAG;QACd,eAAe;QACf,GAAG,CAAA;;;;;;;;;;;;;;KAcF;KACF,AAjBY,CAiBZ;IAID,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,OAAO,IAAI,CAAA,8BAA8B,CAAA;QAC3C,CAAC;QAED,MAAM,EACJ,EAAE,EACF,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,KAAK,EACL,UAAU,EACV,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,eAAe,EACf,SAAS,EACT,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,YAAY,EACb,GAAG,IAAI,CAAC,QAAQ,CAAA;QAEjB,OAAO,IAAI,CAAA;mBACI,IAAI;0BACG,WAAW;2BACV,YAAY;oBACnB,KAAK;QACjB,IAAI,CAAC,gBAAgB,CAAC,UAAW,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,KAAM,CAAC;uBAC/C,QAAQ;2BACJ,YAAY;KAClC,CAAA;IACH,CAAC;IAED,gBAAgB,CAAC,UAAmC;QAClD,OAAO,IAAI,CAAA,EAAE,CAAA;IACf,CAAC;IAED,WAAW,CAAC,KAA0B;QACpC,OAAO,IAAI,CAAA,EAAE,CAAA;IACf,CAAC;;AAlD2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8BAAY,QAAQ;8CAAA;AApBpC,YAAY;IADxB,aAAa,CAAC,uBAAuB,CAAC;GAC1B,YAAY,CAuExB","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { Activity } from '../../types/activity.js'\nimport { ActivitySearchKeyItem } from '../../types/activity-search-key-item-type.js'\nimport { ActivityModelItem } from '../../types/activity-model-type.js'\n\n@customElement('activity-partial-view')\nexport class ActivityView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n div[content] {\n flex: 1;\n\n display: flex;\n overflow: auto;\n }\n `\n ]\n\n @property({ type: Object }) activity?: Activity\n\n render() {\n if (!this.activity) {\n return html`<div>no activity info.</div>`\n }\n\n const {\n id,\n name,\n description,\n activityType,\n state,\n searchKeys,\n model,\n priority,\n startingType,\n schedule,\n timzeone,\n standardTime,\n issuerRole,\n assigneeRole,\n supervisoryRole,\n assignees,\n approvalLine,\n uiType,\n uiSource,\n viewType,\n viewSource,\n reportType,\n reportSource\n } = this.activity\n\n return html`\n <div>name: ${name}</div>\n <div>description: ${description}</div>\n <div>activityType: ${activityType}</div>\n <div>state: ${state}</div>\n ${this.renderSearchKeys(searchKeys!)} ${this.renderModel(model!)}\n <div>priority: ${priority}</div>\n <div>startingType: ${startingType}</div>\n `\n }\n\n renderSearchKeys(searchKeys: ActivitySearchKeyItem[]) {\n return html``\n }\n\n renderModel(model: ActivityModelItem[]) {\n return html``\n }\n}\n"]}
1
+ {"version":3,"file":"activity-partial-view.js","sourceRoot":"","sources":["../../../client/pages/activity/activity-partial-view.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAgB,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAK3C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;aACtD,WAAM,GAAG;QACd,eAAe;QACf,GAAG,CAAA;;;;;;;;;;;;;;KAcF;KACF,AAjBY,CAiBZ;IAID,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,OAAO,IAAI,CAAA,8BAA8B,CAAA;QAC3C,CAAC;QAED,MAAM,EACJ,EAAE,EACF,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,KAAK,EACL,UAAU,EACV,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,aAAa,EACb,eAAe,EACf,SAAS,EACT,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,YAAY,EACb,GAAG,IAAI,CAAC,QAAQ,CAAA;QAEjB,OAAO,IAAI,CAAA;mBACI,IAAI;0BACG,WAAW;2BACV,YAAY;oBACnB,KAAK;QACjB,IAAI,CAAC,gBAAgB,CAAC,UAAW,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,KAAM,CAAC;uBAC/C,QAAQ;2BACJ,YAAY;KAClC,CAAA;IACH,CAAC;IAED,gBAAgB,CAAC,UAAmC;QAClD,OAAO,IAAI,CAAA,EAAE,CAAA;IACf,CAAC;IAED,WAAW,CAAC,KAA0B;QACpC,OAAO,IAAI,CAAA,EAAE,CAAA;IACf,CAAC;;AAlD2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8BAAY,QAAQ;8CAAA;AApBpC,YAAY;IADxB,aAAa,CAAC,uBAAuB,CAAC;GAC1B,YAAY,CAuExB","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { Activity } from '../../types/activity.js'\nimport { ActivitySearchKeyItem } from '../../types/activity-search-key-item-type.js'\nimport { ActivityModelItem } from '../../types/activity-model-type.js'\n\n@customElement('activity-partial-view')\nexport class ActivityView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n div[content] {\n flex: 1;\n\n display: flex;\n overflow: auto;\n }\n `\n ]\n\n @property({ type: Object }) activity?: Activity\n\n render() {\n if (!this.activity) {\n return html`<div>no activity info.</div>`\n }\n\n const {\n id,\n name,\n description,\n activityType,\n state,\n searchKeys,\n model,\n priority,\n startingType,\n schedule,\n timzeone,\n standardTime,\n issuerRole,\n assigneeRoles,\n supervisoryRole,\n assignees,\n approvalLine,\n uiType,\n uiSource,\n viewType,\n viewSource,\n reportType,\n reportSource\n } = this.activity\n\n return html`\n <div>name: ${name}</div>\n <div>description: ${description}</div>\n <div>activityType: ${activityType}</div>\n <div>state: ${state}</div>\n ${this.renderSearchKeys(searchKeys!)} ${this.renderModel(model!)}\n <div>priority: ${priority}</div>\n <div>startingType: ${startingType}</div>\n `\n }\n\n renderSearchKeys(searchKeys: ActivitySearchKeyItem[]) {\n return html``\n }\n\n renderModel(model: ActivityModelItem[]) {\n return html``\n }\n}\n"]}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The activity list's pool column - the roles whose holders may pick up a case (ADR-0091 decision 9).
3
+ *
4
+ * The server keeps the pool as a list of roles (`assigneeRoles`); the grid edits a list of ids with the
5
+ * multiple-select editor, whose options are this domain's roles. These three turn one into the other and
6
+ * draw it - kept out of the page so they can be tested on their own.
7
+ */
8
+ export type RoleOption = {
9
+ display: string;
10
+ value: string;
11
+ };
12
+ /** A fetched activity, with the ids the grid edits beside the roles the server sent. */
13
+ export declare function withPoolIds<T extends {
14
+ assigneeRoles?: {
15
+ id: string;
16
+ }[] | null;
17
+ }>(item: T): T & {
18
+ assigneeRoleIds: string[];
19
+ };
20
+ /**
21
+ * A grid patch as the server takes it: the edited ids become `assigneeRoles`. An untouched column is left
22
+ * out, so the server leaves the pool as it is; an emptied one clears it.
23
+ */
24
+ export declare function poolPatch<T extends {
25
+ assigneeRoleIds?: string[] | null;
26
+ }>(patch: T): Omit<T, 'assigneeRoleIds'> & {
27
+ assigneeRoles?: {
28
+ id: string;
29
+ }[];
30
+ };
31
+ /** The names to draw, in the pool's order. An id with no option left (a role removed since) shows as the id. */
32
+ export declare function poolNames(ids: readonly string[] | null | undefined, options: readonly RoleOption[]): string;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The activity list's pool column - the roles whose holders may pick up a case (ADR-0091 decision 9).
3
+ *
4
+ * The server keeps the pool as a list of roles (`assigneeRoles`); the grid edits a list of ids with the
5
+ * multiple-select editor, whose options are this domain's roles. These three turn one into the other and
6
+ * draw it - kept out of the page so they can be tested on their own.
7
+ */
8
+ /** A fetched activity, with the ids the grid edits beside the roles the server sent. */
9
+ export function withPoolIds(item) {
10
+ return { ...item, assigneeRoleIds: (item.assigneeRoles || []).map(role => role.id) };
11
+ }
12
+ /**
13
+ * A grid patch as the server takes it: the edited ids become `assigneeRoles`. An untouched column is left
14
+ * out, so the server leaves the pool as it is; an emptied one clears it.
15
+ */
16
+ export function poolPatch(patch) {
17
+ if (!('assigneeRoleIds' in patch))
18
+ return patch;
19
+ const { assigneeRoleIds, ...rest } = patch;
20
+ return { ...rest, assigneeRoles: (assigneeRoleIds || []).map(id => ({ id })) };
21
+ }
22
+ /** The names to draw, in the pool's order. An id with no option left (a role removed since) shows as the id. */
23
+ export function poolNames(ids, options) {
24
+ return (ids || []).map(id => options.find(option => option.value === id)?.display || id).join(', ');
25
+ }
26
+ //# sourceMappingURL=assignee-roles-cell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assignee-roles-cell.js","sourceRoot":"","sources":["../../../client/pages/activity/assignee-roles-cell.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,wFAAwF;AACxF,MAAM,UAAU,WAAW,CAAwD,IAAO;IACxF,OAAO,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAA;AACtF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAkD,KAAQ;IACjF,IAAI,CAAC,CAAC,iBAAiB,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IAE/C,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAA;IAC1C,OAAO,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAA;AAChF,CAAC;AAED,gHAAgH;AAChH,MAAM,UAAU,SAAS,CAAC,GAAyC,EAAE,OAA8B;IACjG,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE,CAAC,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACrG,CAAC","sourcesContent":["/**\n * The activity list's pool column - the roles whose holders may pick up a case (ADR-0091 decision 9).\n *\n * The server keeps the pool as a list of roles (`assigneeRoles`); the grid edits a list of ids with the\n * multiple-select editor, whose options are this domain's roles. These three turn one into the other and\n * draw it - kept out of the page so they can be tested on their own.\n */\n\nexport type RoleOption = { display: string; value: string }\n\n/** A fetched activity, with the ids the grid edits beside the roles the server sent. */\nexport function withPoolIds<T extends { assigneeRoles?: { id: string }[] | null }>(item: T): T & { assigneeRoleIds: string[] } {\n return { ...item, assigneeRoleIds: (item.assigneeRoles || []).map(role => role.id) }\n}\n\n/**\n * A grid patch as the server takes it: the edited ids become `assigneeRoles`. An untouched column is left\n * out, so the server leaves the pool as it is; an emptied one clears it.\n */\nexport function poolPatch<T extends { assigneeRoleIds?: string[] | null }>(patch: T): Omit<T, 'assigneeRoleIds'> & { assigneeRoles?: { id: string }[] } {\n if (!('assigneeRoleIds' in patch)) return patch\n\n const { assigneeRoleIds, ...rest } = patch\n return { ...rest, assigneeRoles: (assigneeRoleIds || []).map(id => ({ id })) }\n}\n\n/** The names to draw, in the pool's order. An id with no option left (a role removed since) shows as the id. */\nexport function poolNames(ids: readonly string[] | null | undefined, options: readonly RoleOption[]): string {\n return (ids || []).map(id => options.find(option => option.value === id)?.display || id).join(', ')\n}\n"]}
@@ -65,7 +65,7 @@ const CATALOG = gql `
65
65
  whenNoLine
66
66
  whenNoLineBecause
67
67
  followsLabelKey
68
- assigneeRole
68
+ assigneeRoles
69
69
  notUsedBecause
70
70
  approvalLine {
71
71
  type
@@ -1 +1 @@
1
- {"version":3,"file":"activity-catalog-page.js","sourceRoot":"","sources":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AAC,CAAC,IAAI,CAAA,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;kBACtC,IAAI;gBACJ,CAAC,CAAC,IAAI,CAAA,iCAAiC,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,mCAAmC,CAAC,MAAM;gBACnG,CAAC,CAAC,EAAE;qBACD;YACT,CAAC,CAAC,EAAE;YACJ,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA,sBAAsB,OAAO,SAAS,CAAC,CAAC,CAAC,EAAE;YACzD,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,sBAAsB,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;YACnD;QACA;;;WAGG;QACH,IAAI,CAAC,IAAI;YACP,CAAC,CAAC,IAAI,CAAA;qBACC,IAAI,CAAC,QAAQ,KAAK,IAAI;gBACvB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;gBACzD,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;kBACzD;YACJ,CAAC,CAAC,EACN;;;KAGL,CAAA;IACH,CAAC;;AAzLgB;IAAhB,KAAK,EAAE;;kDAAuB;AACd;IAAhB,KAAK,EAAE;;mDAAgF;AACvE;IAAhB,KAAK,EAAE;;iDAAiB;AACR;IAAhB,KAAK,EAAE;;0DAA0B;AACjB;IAAhB,KAAK,EAAE;;yDAAyB;AAChB;IAAhB,KAAK,EAAE;;sDAAkC;AAzI/B,mBAAmB;IAD/B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,mBAAmB,CA8T/B","sourcesContent":["import '@operato/list-state/ox-page-state.js'\nimport '@things-factory/organization/dist-client/component/approval-line-brief.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { PageView } from '@operato/shell'\nimport { DocumentPageStyles } from '@operato/styles'\nimport { isApprovalStep } from '@things-factory/organization/dist-client'\n\nimport { guideLines } from './activity-guide.js'\nimport { detailAddress, opensDetail } from '../work-door/door-links.js'\nimport {\n DoorCounts,\n DoorFacts,\n doorLabel,\n doorsSummary,\n followsNote,\n lineNote,\n whenNoLineTag\n} from '../work-door/door-sentence.js'\nimport { kindWord, reasonWord, standingWord, whenNoLineBecauseWord, whenNoLineWord } from '../work-door/door-words.js'\n\n/**\n * 업무 카탈로그 — **이 사업장의 업무가 무엇을 하고, 누가 결재하나.**\n *\n * ═══════════════════════════════════════════════════════════════════════════\n * ── 두 화면을 하나로 (2026-10-18, 사용자 판단) ──────────────────────────────\n * 「결재·배정 양식 현황」과 「업무 양식 목록」이 같은 업무를 두 번 늘어놓았다. 앞은 결재선이 섰나를,\n * 뒤는 업무가 무엇인가를 말했고, 뒤에는 만드는 쪽이 읽는 값(모델 수 · 판단 키 · 시험 실행)이 섞여\n * 있었다. 틀은 앞 화면 것을 쓰고, 뒤에서는 업무 설명 한 줄만 가져왔다.\n *\n * ── 왜 이 화면이 있나 ──────────────────────────────────────────────────────\n * 양식은 제품이 세우고 **결재선은 그 사업장이 채운다.** 비어 있는 것은 결함이 아니라 선택인데, 그\n * 선택이 어디에도 안 보였다. 실측(2026-09-11): 미라텍에 양식 11개가 다 서 있고 11개 전부 결재자가\n * 없었다 — 실적 정정도 폐기도 승인 없이 반영되는데 화면에는 결재가 있는 것처럼 보였다.\n *\n * ── 결재선은 그려서 보인다 ─────────────────────────────────────────────────\n * 「…은 결재자 2명을 지납니다」는 몇 명인지만 말하고 누구인지는 안 말했다. 줄마다 결재선을 단계와\n * 이름으로 그린다 — 업무함 띠가 쓰는 organization 의 approval-line-brief 를 그대로 쓴다. 서버는 그\n * 업무가 실제로 거치는 결재선을 보낸다(다른 업무의 결재선을 따르면 그 업무의 것).\n *\n * ── 빈 결재선의 결과는 업무마다 선언돼 있다 ────────────────────────────────\n * `run` 업무는 상신하는 사람이 자기 건을 승인한 것이 되고, `refuse` 업무는 상신 자체가 거절된다\n * (ADR-0077). 결재선 밑 한 줄이 그것을 말한다.\n *\n * ── 할 일이 있는 것부터 ────────────────────────────────────────────────────\n * 정할 것이 남은 것을 위로 올린다. 같은 무리 안에서는 선언 순서를 지킨다.\n * ═══════════════════════════════════════════════════════════════════════════\n */\n\n/*\n * A step is asked for every field it carries, though this screen only draws it - organization's\n * approval-line-step-fields test holds every selection to the editor's set.\n */\nconst CATALOG = gql`\n {\n workDoors {\n todo\n on\n off\n missing\n notUsed\n seatsStanding\n seatsOffered\n doors {\n name\n labelKey\n kind\n standing\n reason\n approvers\n from\n whenNoLine\n whenNoLineBecause\n followsLabelKey\n assigneeRole\n notUsedBecause\n approvalLine {\n type\n value\n participation\n notifyAfter\n approver {\n id\n name\n description\n controlNo\n }\n }\n }\n }\n installableActivities {\n items {\n name\n guide\n guideTKeys\n }\n }\n }\n`\n\ntype Door = DoorFacts & {\n kind: 'approval' | 'assignment'\n standing: 'on' | 'off' | 'missing' | 'not-used'\n from?: string\n approvalLine?: any[] | null\n /** What the activity is for - the first line of its declared guide, in the reader's language. */\n about?: string\n}\n\nconst ORDER: Record<Door['standing'], number> = { missing: 0, off: 1, on: 2, 'not-used': 3 }\n\n@customElement('activity-catalog-page')\nexport class ActivityCatalogPage extends localize(i18next)(PageView) {\n static styles = [\n DocumentPageStyles,\n css`\n /*\n * One activity, one row: what it is on the left, what it does and who approves on the right.\n * The rows share one grid (subgrid), so every right column starts at the same x.\n */\n .doors {\n display: grid;\n grid-template-columns: max-content minmax(0, 1fr);\n column-gap: var(--spacing-huge, 24px);\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .door {\n grid-column: 1 / -1;\n display: grid;\n grid-template-columns: subgrid;\n row-gap: var(--spacing-small, 4px);\n padding: var(--spacing-large, 12px) 0;\n border-top: 1px solid var(--md-sys-color-outline-variant);\n }\n\n .door:first-child {\n border-top: none;\n }\n\n @media (max-width: 600px) {\n .doors {\n grid-template-columns: minmax(0, 1fr);\n }\n }\n\n .what {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n gap: var(--spacing-small, 4px) var(--spacing-medium, 8px);\n }\n\n .name {\n font-weight: 600;\n }\n\n /* Kind in words: an empty approval line and an empty assignment line do opposite things. */\n .kind {\n color: var(--ui-muted);\n font-size: var(--ui-t-small, 11.5px);\n }\n\n /* The state says it in words as well as colour: colour alone says nothing to someone who cannot see it. */\n .mark {\n padding: 0 var(--spacing-small, 4px);\n border: 1px solid currentColor;\n border-radius: var(--md-sys-shape-corner-small, 4px);\n font-size: var(--ui-t-micro, 11px);\n font-weight: 600;\n line-height: 1.6;\n white-space: nowrap;\n }\n\n .mark.on {\n color: var(--md-sys-color-primary);\n }\n\n .mark.off {\n color: var(--md-sys-color-tertiary);\n }\n\n .mark.missing {\n color: var(--md-sys-color-error);\n }\n\n /* Not a task, so quieter. Not removed: that it was turned off has to be readable. */\n .mark.not-used {\n color: var(--md-sys-color-outline);\n }\n\n .door.not-used .what,\n .door.not-used .says {\n opacity: 0.7;\n }\n\n .says {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-small, 4px);\n min-width: 0;\n }\n\n .line {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-small, 4px) var(--spacing-large, 12px);\n }\n\n /*\n * The brief spreads its seats over the width it is given; a two-step line across a wide column\n * reads as three islands. Each seat gets about the width of a name.\n */\n approval-line-brief {\n flex: 0 1 auto;\n width: calc(var(--seats) * 88px);\n max-width: 100%;\n font-size: var(--ui-t-small, 11.5px);\n }\n\n .when,\n .from {\n color: var(--ui-muted);\n font-size: var(--ui-t-small, 11.5px);\n }\n\n .state {\n margin: 0 0 var(--spacing-medium, 8px);\n font-weight: 600;\n }\n\n ol.next {\n margin: 0;\n padding-left: var(--spacing-huge, 24px);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-medium, 8px);\n }\n `\n ]\n\n @state() private doors?: Door[]\n @state() private counts: DoorCounts = { on: 0, off: 0, missing: 0, notUsed: 0, todo: 0 }\n @state() private todo = 0\n @state() private seatsStanding = 0\n @state() private seatsOffered = 0\n @state() private loadError: unknown = null\n\n get context() {\n return {\n title: i18next.t('title.activity catalog'),\n frame: 'document'\n }\n }\n\n async pageInitialized() {\n await this.load()\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (lifecycle.active && !this.doors) {\n await this.load()\n }\n }\n\n private async load() {\n this.loadError = null\n\n let response: any\n try {\n response = await client.query({ query: CATALOG, fetchPolicy: 'no-cache' })\n } catch (error) {\n this.loadError = error\n return\n }\n\n /*\n * 못 읽은 것을 빈 목록으로 그리지 않는다. 「업무가 하나도 없습니다」와 「못 읽었습니다」는 사람이 할\n * 일이 다르다. ox-page-state 가 서버의 문장과 다시 읽기를 그린다(ADR-0060 결정 8).\n */\n if (response.errors?.length) {\n this.loadError = response.errors[0]\n return\n }\n\n const guides = new Map<string, any>(\n (response.data?.installableActivities?.items ?? []).map((one: any) => [one.name, one])\n )\n\n /* 전선의 철자를 여기서 **한 번** 옮긴다(§`door-words`). */\n this.doors = (response.data?.workDoors?.doors ?? []).map((one: any) => ({\n ...one,\n standing: standingWord(one.standing) ?? one.standing,\n kind: kindWord(one.kind) ?? one.kind,\n reason: reasonWord(one.reason) ?? one.reason,\n whenNoLine: whenNoLineWord(one.whenNoLine),\n whenNoLineBecause: whenNoLineBecauseWord(one.whenNoLineBecause),\n about: guideLines(guides.get(one.name), (key, options) => i18next.t(key, options))[0]\n }))\n\n const read = response.data?.workDoors ?? {}\n\n this.todo = read.todo ?? 0\n this.counts = {\n on: read.on ?? 0,\n off: read.off ?? 0,\n missing: read.missing ?? 0,\n notUsed: read.notUsed ?? 0,\n todo: this.todo\n }\n this.seatsStanding = read.seatsStanding ?? 0\n this.seatsOffered = read.seatsOffered ?? 0\n }\n\n /** 결재선은 각 업무에서 지정하고, 역할이 부족할 때만 별도로 안내한다. */\n private renderNext() {\n if (!this.todo || this.seatsStanding >= this.seatsOffered) {\n return ''\n }\n\n return html`\n <section class=\"page-section\">\n <div class=\"page-section-header\"><h3>${i18next.t('title.work-doors-next')}</h3></div>\n <ol class=\"next\">\n <li>\n ${i18next.t('text.work-doors-next-seats', {\n standing: this.seatsStanding,\n offered: this.seatsOffered\n })}\n <a class=\"page-nav-link\" href=\"roles\">${i18next.t('field.roles')}</a>\n </li>\n </ol>\n </section>\n `\n }\n\n render() {\n return html`<div class=\"page\">\n <ox-page-state .loading=${!this.doors && !this.loadError} .error=${this.loadError} @retry=${() => this.load()}\n >${this.doors && !this.loadError ? this.renderDoors() : ''}</ox-page-state\n >\n </div>`\n }\n\n private renderDoors() {\n const sorted = [...this.doors!].sort((a, b) => ORDER[a.standing] - ORDER[b.standing])\n\n return html`\n <section class=\"page-section\">\n <p class=\"state\">${doorsSummary(i18next.t, this.counts)}</p>\n <ul class=\"doors\">\n ${sorted.map(door => this.renderDoor(door))}\n </ul>\n </section>\n\n ${this.renderNext()}\n `\n }\n\n /**\n * Where 「결재선 지정」 goes: this activity's detail, or - when it follows another activity's line - that\n * activity's, since the line is set there. None for a form borrowed from another site.\n */\n private lineEditAddress(door: Door): string {\n if (door.kind !== 'approval' || (door.standing !== 'on' && door.standing !== 'off')) {\n return ''\n }\n\n const owner = door.followsLabelKey ? this.doors!.find(one => one.labelKey === door.followsLabelKey) : door\n\n return owner && opensDetail(owner) && opensDetail(door) ? detailAddress(owner.name) : ''\n }\n\n private renderDoor(door: Door) {\n const label = doorLabel(i18next.t, door)\n const steps = (door.approvalLine || []).filter(isApprovalStep).length\n const drawsLine = door.kind === 'approval' && steps > 0\n const note = lineNote(i18next.t, door, drawsLine)\n const follows = followsNote(i18next.t, door)\n const when = whenNoLineTag(i18next.t, door)\n const edit = this.lineEditAddress(door)\n\n return html`\n <li class=\"door ${door.standing}\">\n <div class=\"what\">\n ${opensDetail(door)\n ? html`<a class=\"name\" href=${detailAddress(door.name)}>${label}</a>`\n : html`<span class=\"name\">${label}</span>`}\n <span class=\"kind\">${i18next.t(`text.door-kind-${door.kind}`)}</span>\n <span class=\"mark ${door.standing}\">${i18next.t(`text.door-standing-${door.standing}`)}</span>\n </div>\n <div class=\"says\">\n ${door.about ? html`<span class=\"about\">${door.about}</span>` : ''}\n ${drawsLine || note || edit\n ? html`<div class=\"line\">\n ${drawsLine\n ? html`<approval-line-brief\n plan\n style=\"--seats: ${(door.approvalLine || []).length + 1}\"\n .model=${door.approvalLine}\n ></approval-line-brief>`\n : ''}\n ${note ? html`<span>${note}</span>` : ''}\n ${edit\n ? html`<a class=\"page-nav-link\" href=${edit}>${i18next.t('button.activity-set-approval-line')}</a>`\n : ''}\n </div>`\n : ''}\n ${follows ? html`<span class=\"when\">${follows}</span>` : ''}\n ${when ? html`<span class=\"when\">${when}</span>` : ''}\n ${\n /*\n * 남의 양식을 쓰는 것은 정상이지만, 안 말하면 「정한 적 없는데」가 된다. 차 있으면 어디서\n * 정했는지, 비어 있으면 여기서는 못 고친다는 것을 말한다.\n */\n door.from\n ? html`<span class=\"from\"\n >${door.standing === 'on'\n ? i18next.t('text.door-filled-from', { name: door.from })\n : i18next.t('text.door-form-from', { name: door.from })}</span\n >`\n : ''\n }\n </div>\n </li>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"activity-catalog-page.js","sourceRoot":"","sources":["../../../client/pages/activity-catalog/activity-catalog-page.ts"],"names":[],"mappings":";AAAA,OAAO,sCAAsC,CAAA;AAC7C,OAAO,2EAA2E,CAAA;AAElF,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAA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AAE;YACnD;QACA;;;WAGG;QACH,IAAI,CAAC,IAAI;YACP,CAAC,CAAC,IAAI,CAAA;qBACC,IAAI,CAAC,QAAQ,KAAK,IAAI;gBACvB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;gBACzD,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;kBACzD;YACJ,CAAC,CAAC,EACN;;;KAGL,CAAA;IACH,CAAC;;AAzLgB;IAAhB,KAAK,EAAE;;kDAAuB;AACd;IAAhB,KAAK,EAAE;;mDAAgF;AACvE;IAAhB,KAAK,EAAE;;iDAAiB;AACR;IAAhB,KAAK,EAAE;;0DAA0B;AACjB;IAAhB,KAAK,EAAE;;yDAAyB;AAChB;IAAhB,KAAK,EAAE;;sDAAkC;AAzI/B,mBAAmB;IAD/B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,mBAAmB,CA8T/B","sourcesContent":["import '@operato/list-state/ox-page-state.js'\nimport '@things-factory/organization/dist-client/component/approval-line-brief.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { PageView } from '@operato/shell'\nimport { DocumentPageStyles } from '@operato/styles'\nimport { isApprovalStep } from '@things-factory/organization/dist-client'\n\nimport { guideLines } from './activity-guide.js'\nimport { detailAddress, opensDetail } from '../work-door/door-links.js'\nimport {\n DoorCounts,\n DoorFacts,\n doorLabel,\n doorsSummary,\n followsNote,\n lineNote,\n whenNoLineTag\n} from '../work-door/door-sentence.js'\nimport { kindWord, reasonWord, standingWord, whenNoLineBecauseWord, whenNoLineWord } from '../work-door/door-words.js'\n\n/**\n * 업무 카탈로그 — **이 사업장의 업무가 무엇을 하고, 누가 결재하나.**\n *\n * ═══════════════════════════════════════════════════════════════════════════\n * ── 두 화면을 하나로 (2026-10-18, 사용자 판단) ──────────────────────────────\n * 「결재·배정 양식 현황」과 「업무 양식 목록」이 같은 업무를 두 번 늘어놓았다. 앞은 결재선이 섰나를,\n * 뒤는 업무가 무엇인가를 말했고, 뒤에는 만드는 쪽이 읽는 값(모델 수 · 판단 키 · 시험 실행)이 섞여\n * 있었다. 틀은 앞 화면 것을 쓰고, 뒤에서는 업무 설명 한 줄만 가져왔다.\n *\n * ── 왜 이 화면이 있나 ──────────────────────────────────────────────────────\n * 양식은 제품이 세우고 **결재선은 그 사업장이 채운다.** 비어 있는 것은 결함이 아니라 선택인데, 그\n * 선택이 어디에도 안 보였다. 실측(2026-09-11): 미라텍에 양식 11개가 다 서 있고 11개 전부 결재자가\n * 없었다 — 실적 정정도 폐기도 승인 없이 반영되는데 화면에는 결재가 있는 것처럼 보였다.\n *\n * ── 결재선은 그려서 보인다 ─────────────────────────────────────────────────\n * 「…은 결재자 2명을 지납니다」는 몇 명인지만 말하고 누구인지는 안 말했다. 줄마다 결재선을 단계와\n * 이름으로 그린다 — 업무함 띠가 쓰는 organization 의 approval-line-brief 를 그대로 쓴다. 서버는 그\n * 업무가 실제로 거치는 결재선을 보낸다(다른 업무의 결재선을 따르면 그 업무의 것).\n *\n * ── 빈 결재선의 결과는 업무마다 선언돼 있다 ────────────────────────────────\n * `run` 업무는 상신하는 사람이 자기 건을 승인한 것이 되고, `refuse` 업무는 상신 자체가 거절된다\n * (ADR-0077). 결재선 밑 한 줄이 그것을 말한다.\n *\n * ── 할 일이 있는 것부터 ────────────────────────────────────────────────────\n * 정할 것이 남은 것을 위로 올린다. 같은 무리 안에서는 선언 순서를 지킨다.\n * ═══════════════════════════════════════════════════════════════════════════\n */\n\n/*\n * A step is asked for every field it carries, though this screen only draws it - organization's\n * approval-line-step-fields test holds every selection to the editor's set.\n */\nconst CATALOG = gql`\n {\n workDoors {\n todo\n on\n off\n missing\n notUsed\n seatsStanding\n seatsOffered\n doors {\n name\n labelKey\n kind\n standing\n reason\n approvers\n from\n whenNoLine\n whenNoLineBecause\n followsLabelKey\n assigneeRoles\n notUsedBecause\n approvalLine {\n type\n value\n participation\n notifyAfter\n approver {\n id\n name\n description\n controlNo\n }\n }\n }\n }\n installableActivities {\n items {\n name\n guide\n guideTKeys\n }\n }\n }\n`\n\ntype Door = DoorFacts & {\n kind: 'approval' | 'assignment'\n standing: 'on' | 'off' | 'missing' | 'not-used'\n from?: string\n approvalLine?: any[] | null\n /** What the activity is for - the first line of its declared guide, in the reader's language. */\n about?: string\n}\n\nconst ORDER: Record<Door['standing'], number> = { missing: 0, off: 1, on: 2, 'not-used': 3 }\n\n@customElement('activity-catalog-page')\nexport class ActivityCatalogPage extends localize(i18next)(PageView) {\n static styles = [\n DocumentPageStyles,\n css`\n /*\n * One activity, one row: what it is on the left, what it does and who approves on the right.\n * The rows share one grid (subgrid), so every right column starts at the same x.\n */\n .doors {\n display: grid;\n grid-template-columns: max-content minmax(0, 1fr);\n column-gap: var(--spacing-huge, 24px);\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n .door {\n grid-column: 1 / -1;\n display: grid;\n grid-template-columns: subgrid;\n row-gap: var(--spacing-small, 4px);\n padding: var(--spacing-large, 12px) 0;\n border-top: 1px solid var(--md-sys-color-outline-variant);\n }\n\n .door:first-child {\n border-top: none;\n }\n\n @media (max-width: 600px) {\n .doors {\n grid-template-columns: minmax(0, 1fr);\n }\n }\n\n .what {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n gap: var(--spacing-small, 4px) var(--spacing-medium, 8px);\n }\n\n .name {\n font-weight: 600;\n }\n\n /* Kind in words: an empty approval line and an empty assignment line do opposite things. */\n .kind {\n color: var(--ui-muted);\n font-size: var(--ui-t-small, 11.5px);\n }\n\n /* The state says it in words as well as colour: colour alone says nothing to someone who cannot see it. */\n .mark {\n padding: 0 var(--spacing-small, 4px);\n border: 1px solid currentColor;\n border-radius: var(--md-sys-shape-corner-small, 4px);\n font-size: var(--ui-t-micro, 11px);\n font-weight: 600;\n line-height: 1.6;\n white-space: nowrap;\n }\n\n .mark.on {\n color: var(--md-sys-color-primary);\n }\n\n .mark.off {\n color: var(--md-sys-color-tertiary);\n }\n\n .mark.missing {\n color: var(--md-sys-color-error);\n }\n\n /* Not a task, so quieter. Not removed: that it was turned off has to be readable. */\n .mark.not-used {\n color: var(--md-sys-color-outline);\n }\n\n .door.not-used .what,\n .door.not-used .says {\n opacity: 0.7;\n }\n\n .says {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-small, 4px);\n min-width: 0;\n }\n\n .line {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-small, 4px) var(--spacing-large, 12px);\n }\n\n /*\n * The brief spreads its seats over the width it is given; a two-step line across a wide column\n * reads as three islands. Each seat gets about the width of a name.\n */\n approval-line-brief {\n flex: 0 1 auto;\n width: calc(var(--seats) * 88px);\n max-width: 100%;\n font-size: var(--ui-t-small, 11.5px);\n }\n\n .when,\n .from {\n color: var(--ui-muted);\n font-size: var(--ui-t-small, 11.5px);\n }\n\n .state {\n margin: 0 0 var(--spacing-medium, 8px);\n font-weight: 600;\n }\n\n ol.next {\n margin: 0;\n padding-left: var(--spacing-huge, 24px);\n display: flex;\n flex-direction: column;\n gap: var(--spacing-medium, 8px);\n }\n `\n ]\n\n @state() private doors?: Door[]\n @state() private counts: DoorCounts = { on: 0, off: 0, missing: 0, notUsed: 0, todo: 0 }\n @state() private todo = 0\n @state() private seatsStanding = 0\n @state() private seatsOffered = 0\n @state() private loadError: unknown = null\n\n get context() {\n return {\n title: i18next.t('title.activity catalog'),\n frame: 'document'\n }\n }\n\n async pageInitialized() {\n await this.load()\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (lifecycle.active && !this.doors) {\n await this.load()\n }\n }\n\n private async load() {\n this.loadError = null\n\n let response: any\n try {\n response = await client.query({ query: CATALOG, fetchPolicy: 'no-cache' })\n } catch (error) {\n this.loadError = error\n return\n }\n\n /*\n * 못 읽은 것을 빈 목록으로 그리지 않는다. 「업무가 하나도 없습니다」와 「못 읽었습니다」는 사람이 할\n * 일이 다르다. ox-page-state 가 서버의 문장과 다시 읽기를 그린다(ADR-0060 결정 8).\n */\n if (response.errors?.length) {\n this.loadError = response.errors[0]\n return\n }\n\n const guides = new Map<string, any>(\n (response.data?.installableActivities?.items ?? []).map((one: any) => [one.name, one])\n )\n\n /* 전선의 철자를 여기서 **한 번** 옮긴다(§`door-words`). */\n this.doors = (response.data?.workDoors?.doors ?? []).map((one: any) => ({\n ...one,\n standing: standingWord(one.standing) ?? one.standing,\n kind: kindWord(one.kind) ?? one.kind,\n reason: reasonWord(one.reason) ?? one.reason,\n whenNoLine: whenNoLineWord(one.whenNoLine),\n whenNoLineBecause: whenNoLineBecauseWord(one.whenNoLineBecause),\n about: guideLines(guides.get(one.name), (key, options) => i18next.t(key, options))[0]\n }))\n\n const read = response.data?.workDoors ?? {}\n\n this.todo = read.todo ?? 0\n this.counts = {\n on: read.on ?? 0,\n off: read.off ?? 0,\n missing: read.missing ?? 0,\n notUsed: read.notUsed ?? 0,\n todo: this.todo\n }\n this.seatsStanding = read.seatsStanding ?? 0\n this.seatsOffered = read.seatsOffered ?? 0\n }\n\n /** 결재선은 각 업무에서 지정하고, 역할이 부족할 때만 별도로 안내한다. */\n private renderNext() {\n if (!this.todo || this.seatsStanding >= this.seatsOffered) {\n return ''\n }\n\n return html`\n <section class=\"page-section\">\n <div class=\"page-section-header\"><h3>${i18next.t('title.work-doors-next')}</h3></div>\n <ol class=\"next\">\n <li>\n ${i18next.t('text.work-doors-next-seats', {\n standing: this.seatsStanding,\n offered: this.seatsOffered\n })}\n <a class=\"page-nav-link\" href=\"roles\">${i18next.t('field.roles')}</a>\n </li>\n </ol>\n </section>\n `\n }\n\n render() {\n return html`<div class=\"page\">\n <ox-page-state .loading=${!this.doors && !this.loadError} .error=${this.loadError} @retry=${() => this.load()}\n >${this.doors && !this.loadError ? this.renderDoors() : ''}</ox-page-state\n >\n </div>`\n }\n\n private renderDoors() {\n const sorted = [...this.doors!].sort((a, b) => ORDER[a.standing] - ORDER[b.standing])\n\n return html`\n <section class=\"page-section\">\n <p class=\"state\">${doorsSummary(i18next.t, this.counts)}</p>\n <ul class=\"doors\">\n ${sorted.map(door => this.renderDoor(door))}\n </ul>\n </section>\n\n ${this.renderNext()}\n `\n }\n\n /**\n * Where 「결재선 지정」 goes: this activity's detail, or - when it follows another activity's line - that\n * activity's, since the line is set there. None for a form borrowed from another site.\n */\n private lineEditAddress(door: Door): string {\n if (door.kind !== 'approval' || (door.standing !== 'on' && door.standing !== 'off')) {\n return ''\n }\n\n const owner = door.followsLabelKey ? this.doors!.find(one => one.labelKey === door.followsLabelKey) : door\n\n return owner && opensDetail(owner) && opensDetail(door) ? detailAddress(owner.name) : ''\n }\n\n private renderDoor(door: Door) {\n const label = doorLabel(i18next.t, door)\n const steps = (door.approvalLine || []).filter(isApprovalStep).length\n const drawsLine = door.kind === 'approval' && steps > 0\n const note = lineNote(i18next.t, door, drawsLine)\n const follows = followsNote(i18next.t, door)\n const when = whenNoLineTag(i18next.t, door)\n const edit = this.lineEditAddress(door)\n\n return html`\n <li class=\"door ${door.standing}\">\n <div class=\"what\">\n ${opensDetail(door)\n ? html`<a class=\"name\" href=${detailAddress(door.name)}>${label}</a>`\n : html`<span class=\"name\">${label}</span>`}\n <span class=\"kind\">${i18next.t(`text.door-kind-${door.kind}`)}</span>\n <span class=\"mark ${door.standing}\">${i18next.t(`text.door-standing-${door.standing}`)}</span>\n </div>\n <div class=\"says\">\n ${door.about ? html`<span class=\"about\">${door.about}</span>` : ''}\n ${drawsLine || note || edit\n ? html`<div class=\"line\">\n ${drawsLine\n ? html`<approval-line-brief\n plan\n style=\"--seats: ${(door.approvalLine || []).length + 1}\"\n .model=${door.approvalLine}\n ></approval-line-brief>`\n : ''}\n ${note ? html`<span>${note}</span>` : ''}\n ${edit\n ? html`<a class=\"page-nav-link\" href=${edit}>${i18next.t('button.activity-set-approval-line')}</a>`\n : ''}\n </div>`\n : ''}\n ${follows ? html`<span class=\"when\">${follows}</span>` : ''}\n ${when ? html`<span class=\"when\">${when}</span>` : ''}\n ${\n /*\n * 남의 양식을 쓰는 것은 정상이지만, 안 말하면 「정한 적 없는데」가 된다. 차 있으면 어디서\n * 정했는지, 비어 있으면 여기서는 못 고친다는 것을 말한다.\n */\n door.from\n ? html`<span class=\"from\"\n >${door.standing === 'on'\n ? i18next.t('text.door-filled-from', { name: door.from })\n : i18next.t('text.door-form-from', { name: door.from })}</span\n >`\n : ''\n }\n </div>\n </li>\n `\n }\n}\n"]}
@@ -32,7 +32,7 @@ export type DoorFacts = {
32
32
  whenNoLine?: string;
33
33
  whenNoLineBecause?: string;
34
34
  followsLabelKey?: string;
35
- assigneeRole?: string;
35
+ assigneeRoles?: string[];
36
36
  notUsedBecause?: string;
37
37
  };
38
38
  export type DoorCounts = {
@@ -51,8 +51,8 @@ export function lineNote(t, door, drawsLine) {
51
51
  return String(t('text.activity-catalog-missing'));
52
52
  }
53
53
  if (door.kind === 'assignment') {
54
- return door.assigneeRole
55
- ? String(t('text.activity-catalog-assignee', { ...RAW, role: door.assigneeRole }))
54
+ return door.assigneeRoles?.length
55
+ ? String(t('text.activity-catalog-assignee', { ...RAW, role: door.assigneeRoles.join(', ') }))
56
56
  : String(t('text.activity-catalog-no-assignee'));
57
57
  }
58
58
  if (door.reason === 'role-empty' || door.reason === 'person-absent') {
@@ -1 +1 @@
1
- {"version":3,"file":"door-sentence.js","sourceRoot":"","sources":["../../../client/pages/work-door/door-sentence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAqBH;;;GAGG;AACH,MAAM,GAAG,GAAG,EAAE,aAAa,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,CAAA;AAErD;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,CAAI,EAAE,IAAwC;IACtE,OAAO,MAAM,CAAC,CAAC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,GAAG,MAAM,CAAC,OAAO,CAAA;IAEtE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,MAAM,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC,CAAA;IACxD,CAAC;IAED,MAAM,KAAK,GAAuB;QAChC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;QACjB,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC;QACnB,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC;QAC3B,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC;KAC7B,CAAA;IAED,OAAO;QACL,MAAM,CAAC,CAAC,CAAC,qCAAqC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAClE,GAAG,KAAK;aACL,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC;aAC5B,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,oCAAoC,EAAE,EAAE,GAAG,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC,sBAAsB,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;KACjJ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACf,CAAC","sourcesContent":["/**\n * What a row of the activity catalog says, **composed here from facts and translations.**\n *\n * ═══════════════════════════════════════════════════════════════════════════\n * ── Why the screen writes them ────────────────────────────────────────────\n * The server used to send each row's sentence and the summary already written, in Korean. An English,\n * Japanese, Chinese or Malay reader got Korean, and the screen had no way to draw a row differently\n * without reading the sentence back apart. The server now sends facts (`WorkDoorType`) and every\n * phrase is a translation key here.\n *\n * ── The line is drawn, not described ──────────────────────────────────────\n * A filled line used to read 「…은 결재자 2명을 지납니다」. The row now draws the line itself (organization's\n * approval-line-brief, steps and names), so the words here are only for what a drawing cannot say: there\n * is no line, nobody holds the role, the form follows another one, it never installed.\n *\n * ── The empty line is the door's declaration ──────────────────────────────\n * What an empty approval line does is declared per door (ADR-0077 decision 1). `run` lets the raiser\n * approve their own; `refuse` refuses the raise; `as-established` turns on how the row stood. A door\n * with no declaration says nothing about the consequence rather than guessing one.\n *\n * Pure: `t` is passed in, so a test can load the real translation files and read the phrases.\n * ═══════════════════════════════════════════════════════════════════════════\n */\n\n/** The row as this screen holds it, after `door-words` has moved the wire spellings. */\nexport type DoorFacts = {\n name: string\n labelKey: string\n kind: string\n standing: string\n reason: string\n approvers: number\n whenNoLine?: string\n whenNoLineBecause?: string\n followsLabelKey?: string\n assigneeRole?: string\n notUsedBecause?: string\n}\n\nexport type DoorCounts = { on: number; off: number; missing: number; notUsed: number; todo: number }\n\ntype T = (key: string, options?: Record<string, unknown>) => string\n\n/*\n * Values reach the phrase through lit, which escapes them. i18next escaping on top would print\n * `&amp;` in a role name.\n */\nconst RAW = { interpolation: { escapeValue: false } }\n\n/**\n * A door's name. A label key without a translation falls back to the form name - a name a person can\n * search for - rather than printing the key.\n */\nexport function doorLabel(t: T, door: { labelKey: string; name: string }): string {\n return String(t(door.labelKey, { defaultValue: door.name }))\n}\n\n/** Why an approval door will not run on an empty line, as a short phrase. Empty when not declared. */\nexport function whyItRefuses(t: T, door: Pick<DoorFacts, 'whenNoLineBecause'>): string {\n return door.whenNoLineBecause ? String(t(`text.door-refuses-because-${door.whenNoLineBecause}`)) : ''\n}\n\n/**\n * What the line slot says, beside or instead of the drawn line.\n *\n * `drawsLine` is whether the row draws approval steps - the page counts them with organization's rule,\n * which this pure file does not load. A not-used row shows what the plant wrote, as written.\n */\nexport function lineNote(t: T, door: DoorFacts, drawsLine: boolean): string {\n if (door.standing === 'not-used') {\n return door.notUsedBecause ?? ''\n }\n\n if (door.standing === 'missing') {\n return String(t('text.activity-catalog-missing'))\n }\n\n if (door.kind === 'assignment') {\n return door.assigneeRole\n ? String(t('text.activity-catalog-assignee', { ...RAW, role: door.assigneeRole }))\n : String(t('text.activity-catalog-no-assignee'))\n }\n\n if (door.reason === 'role-empty' || door.reason === 'person-absent') {\n return String(t(`text.activity-catalog-${door.reason}`))\n }\n\n return drawsLine ? '' : String(t('text.activity-catalog-no-line'))\n}\n\n/** The door whose line this one uses, by name - the line is set there. */\nexport function followsNote(t: T, door: DoorFacts): string {\n if (!door.followsLabelKey || door.standing === 'not-used' || door.standing === 'missing') {\n return ''\n }\n\n return String(t('text.activity-catalog-follows', { ...RAW, label: doorLabel(t, { labelKey: door.followsLabelKey, name: '' }) }))\n}\n\n/**\n * What the door does when its line is empty (ADR-0077 decision 3), as one quiet line under the line.\n * Only approval doors that stand go through a line at all.\n */\nexport function whenNoLineTag(t: T, door: DoorFacts): string {\n if (door.kind !== 'approval' || !door.whenNoLine) {\n return ''\n }\n\n if (door.standing !== 'on' && door.standing !== 'off') {\n return ''\n }\n\n const why = whyItRefuses(t, door)\n const tag = String(t(`text.door-when-no-line-${door.whenNoLine}`))\n\n return door.whenNoLine === 'refuse' && why ? `${tag} (${why})` : tag\n}\n\n/**\n * The whole catalog in one line, counts only: how many, and how many stand each way. The words are the\n * row marks' own, so the line and the rows read alike. A count of zero is left out.\n */\nexport function doorsSummary(t: T, counts: DoorCounts): string {\n const total = counts.on + counts.off + counts.missing + counts.notUsed\n\n if (!total) {\n return String(t('text.activity-catalog-summary-none'))\n }\n\n const parts: [string, number][] = [\n ['on', counts.on],\n ['off', counts.off],\n ['missing', counts.missing],\n ['not-used', counts.notUsed]\n ]\n\n return [\n String(t('text.activity-catalog-summary-total', { count: total })),\n ...parts\n .filter(([, count]) => count)\n .map(([standing, count]) => String(t('text.activity-catalog-summary-part', { ...RAW, standing: t(`text.door-standing-${standing}`), count })))\n ].join(' · ')\n}\n"]}
1
+ {"version":3,"file":"door-sentence.js","sourceRoot":"","sources":["../../../client/pages/work-door/door-sentence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAqBH;;;GAGG;AACH,MAAM,GAAG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AAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAA;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,CAAI,EAAE,MAAkB;IACnD,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAA;IAEtE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,MAAM,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC,CAAA;IACxD,CAAC;IAED,MAAM,KAAK,GAAuB;QAChC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC;QACjB,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC;QACnB,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC;QAC3B,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC;KAC7B,CAAA;IAED,OAAO;QACL,MAAM,CAAC,CAAC,CAAC,qCAAqC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAClE,GAAG,KAAK;aACL,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC;aAC5B,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,oCAAoC,EAAE,EAAE,GAAG,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC,sBAAsB,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;KACjJ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACf,CAAC","sourcesContent":["/**\n * What a row of the activity catalog says, **composed here from facts and translations.**\n *\n * ═══════════════════════════════════════════════════════════════════════════\n * ── Why the screen writes them ────────────────────────────────────────────\n * The server used to send each row's sentence and the summary already written, in Korean. An English,\n * Japanese, Chinese or Malay reader got Korean, and the screen had no way to draw a row differently\n * without reading the sentence back apart. The server now sends facts (`WorkDoorType`) and every\n * phrase is a translation key here.\n *\n * ── The line is drawn, not described ──────────────────────────────────────\n * A filled line used to read 「…은 결재자 2명을 지납니다」. The row now draws the line itself (organization's\n * approval-line-brief, steps and names), so the words here are only for what a drawing cannot say: there\n * is no line, nobody holds the role, the form follows another one, it never installed.\n *\n * ── The empty line is the door's declaration ──────────────────────────────\n * What an empty approval line does is declared per door (ADR-0077 decision 1). `run` lets the raiser\n * approve their own; `refuse` refuses the raise; `as-established` turns on how the row stood. A door\n * with no declaration says nothing about the consequence rather than guessing one.\n *\n * Pure: `t` is passed in, so a test can load the real translation files and read the phrases.\n * ═══════════════════════════════════════════════════════════════════════════\n */\n\n/** The row as this screen holds it, after `door-words` has moved the wire spellings. */\nexport type DoorFacts = {\n name: string\n labelKey: string\n kind: string\n standing: string\n reason: string\n approvers: number\n whenNoLine?: string\n whenNoLineBecause?: string\n followsLabelKey?: string\n assigneeRoles?: string[]\n notUsedBecause?: string\n}\n\nexport type DoorCounts = { on: number; off: number; missing: number; notUsed: number; todo: number }\n\ntype T = (key: string, options?: Record<string, unknown>) => string\n\n/*\n * Values reach the phrase through lit, which escapes them. i18next escaping on top would print\n * `&amp;` in a role name.\n */\nconst RAW = { interpolation: { escapeValue: false } }\n\n/**\n * A door's name. A label key without a translation falls back to the form name - a name a person can\n * search for - rather than printing the key.\n */\nexport function doorLabel(t: T, door: { labelKey: string; name: string }): string {\n return String(t(door.labelKey, { defaultValue: door.name }))\n}\n\n/** Why an approval door will not run on an empty line, as a short phrase. Empty when not declared. */\nexport function whyItRefuses(t: T, door: Pick<DoorFacts, 'whenNoLineBecause'>): string {\n return door.whenNoLineBecause ? String(t(`text.door-refuses-because-${door.whenNoLineBecause}`)) : ''\n}\n\n/**\n * What the line slot says, beside or instead of the drawn line.\n *\n * `drawsLine` is whether the row draws approval steps - the page counts them with organization's rule,\n * which this pure file does not load. A not-used row shows what the plant wrote, as written.\n */\nexport function lineNote(t: T, door: DoorFacts, drawsLine: boolean): string {\n if (door.standing === 'not-used') {\n return door.notUsedBecause ?? ''\n }\n\n if (door.standing === 'missing') {\n return String(t('text.activity-catalog-missing'))\n }\n\n if (door.kind === 'assignment') {\n return door.assigneeRoles?.length\n ? String(t('text.activity-catalog-assignee', { ...RAW, role: door.assigneeRoles.join(', ') }))\n : String(t('text.activity-catalog-no-assignee'))\n }\n\n if (door.reason === 'role-empty' || door.reason === 'person-absent') {\n return String(t(`text.activity-catalog-${door.reason}`))\n }\n\n return drawsLine ? '' : String(t('text.activity-catalog-no-line'))\n}\n\n/** The door whose line this one uses, by name - the line is set there. */\nexport function followsNote(t: T, door: DoorFacts): string {\n if (!door.followsLabelKey || door.standing === 'not-used' || door.standing === 'missing') {\n return ''\n }\n\n return String(t('text.activity-catalog-follows', { ...RAW, label: doorLabel(t, { labelKey: door.followsLabelKey, name: '' }) }))\n}\n\n/**\n * What the door does when its line is empty (ADR-0077 decision 3), as one quiet line under the line.\n * Only approval doors that stand go through a line at all.\n */\nexport function whenNoLineTag(t: T, door: DoorFacts): string {\n if (door.kind !== 'approval' || !door.whenNoLine) {\n return ''\n }\n\n if (door.standing !== 'on' && door.standing !== 'off') {\n return ''\n }\n\n const why = whyItRefuses(t, door)\n const tag = String(t(`text.door-when-no-line-${door.whenNoLine}`))\n\n return door.whenNoLine === 'refuse' && why ? `${tag} (${why})` : tag\n}\n\n/**\n * The whole catalog in one line, counts only: how many, and how many stand each way. The words are the\n * row marks' own, so the line and the rows read alike. A count of zero is left out.\n */\nexport function doorsSummary(t: T, counts: DoorCounts): string {\n const total = counts.on + counts.off + counts.missing + counts.notUsed\n\n if (!total) {\n return String(t('text.activity-catalog-summary-none'))\n }\n\n const parts: [string, number][] = [\n ['on', counts.on],\n ['off', counts.off],\n ['missing', counts.missing],\n ['not-used', counts.notUsed]\n ]\n\n return [\n String(t('text.activity-catalog-summary-total', { count: total })),\n ...parts\n .filter(([, count]) => count)\n .map(([standing, count]) => String(t('text.activity-catalog-summary-part', { ...RAW, standing: t(`text.door-standing-${standing}`), count })))\n ].join(' · ')\n}\n"]}