@things-factory/organization 10.1.263 → 10.1.267

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 (28) hide show
  1. package/dist-client/component/approval-line-view.d.ts +1 -0
  2. package/dist-client/component/approval-line-view.js +10 -7
  3. package/dist-client/component/approval-line-view.js.map +1 -1
  4. package/dist-client/filters-form/filter-department-object.js +1 -1
  5. package/dist-client/filters-form/filter-department-object.js.map +1 -1
  6. package/dist-client/grist-editor/grist-renderer-approval-line.js +1 -1
  7. package/dist-client/grist-editor/grist-renderer-approval-line.js.map +1 -1
  8. package/dist-client/grist-editor/grist-renderer-assignees.js +1 -1
  9. package/dist-client/grist-editor/grist-renderer-assignees.js.map +1 -1
  10. package/dist-client/grist-editor/grist-renderer-department-object.js +1 -1
  11. package/dist-client/grist-editor/grist-renderer-department-object.js.map +1 -1
  12. package/dist-client/grist-editor/grist-renderer-recipients.js +1 -1
  13. package/dist-client/grist-editor/grist-renderer-recipients.js.map +1 -1
  14. package/dist-client/pages/employee/employee-list-page.js +4 -1
  15. package/dist-client/pages/employee/employee-list-page.js.map +1 -1
  16. package/dist-client/pages/employee-profile/my-employee-profile-page.js +7 -2
  17. package/dist-client/pages/employee-profile/my-employee-profile-page.js.map +1 -1
  18. package/dist-client/tsconfig.tsbuildinfo +1 -1
  19. package/dist-server/service/employee-profile/index.d.ts +1 -1
  20. package/dist-server/service/index.d.ts +2 -2
  21. package/dist-server/tsconfig.tsbuildinfo +1 -1
  22. package/package.json +8 -8
  23. package/translations/en.json +5 -1
  24. package/translations/es.json +5 -1
  25. package/translations/ja.json +5 -1
  26. package/translations/ko.json +5 -1
  27. package/translations/ms.json +5 -1
  28. package/translations/zh.json +5 -1
@@ -5,6 +5,7 @@ export declare class ApprovalLineView extends ApprovalLineView_base {
5
5
  static styles: import("lit").CSSResult[];
6
6
  model?: ApprovalLineItem[];
7
7
  current?: number;
8
+ drafter?: string;
8
9
  updated(changes: any): void;
9
10
  render(): TemplateResult<1>;
10
11
  /**
@@ -201,7 +201,8 @@ let ApprovalLineView = class ApprovalLineView extends localize(i18next)(LitEleme
201
201
  ${this.model
202
202
  ? html ` <li approver origin>
203
203
  <span></span>
204
- <div class="who">${i18next.t('label.Myself')}</div>
204
+ <div class="who">${this.drafter || i18next.t('label.Myself')}</div>
205
+ ${this.drafter ? html `<div class="kind">${i18next.t('label.drafter')}</div>` : ''}
205
206
  </li>`
206
207
  : html ``}
207
208
  ${items.map((item, order) => this.renderItem(item, order + 1))}
@@ -224,18 +225,16 @@ let ApprovalLineView = class ApprovalLineView extends localize(i18next)(LitEleme
224
225
  */
225
226
  renderItem(item, order) {
226
227
  const { type, approver } = item;
227
- const { name } = approver || {
228
- name: [OrgMemberTargetType.Myself, OrgMemberTargetType.MySupervisor, OrgMemberTargetType.MyDepartment].includes(type)
229
- ? i18next.t(`label.${type}`)
230
- : ''
231
- };
228
+ const relative = [OrgMemberTargetType.Myself, OrgMemberTargetType.MySupervisor, OrgMemberTargetType.MyDepartment].includes(type);
229
+ /* How the step was chosen, said from the drafter's side when the reader is someone else. */
230
+ const kind = i18next.t(relative && this.drafter ? `label.drafter-${type}` : `label.${type}`);
231
+ const name = approver?.name || (relative ? kind : '');
232
232
  const reference = isReferenceStep(item);
233
233
  /*
234
234
  * The name is who this is; the kind is how they were chosen (self, supervisor, role). Choosing
235
235
  * by self makes the two the same word, and the screen printed 나 twice, stacked. When they
236
236
  * match, say it once.
237
237
  */
238
- const kind = i18next.t('label.' + type);
239
238
  const shown = name || kind;
240
239
  const note = name && name !== kind ? kind : '';
241
240
  return html `
@@ -256,6 +255,10 @@ __decorate([
256
255
  property({ type: Number }),
257
256
  __metadata("design:type", Number)
258
257
  ], ApprovalLineView.prototype, "current", void 0);
258
+ __decorate([
259
+ property({ type: String }),
260
+ __metadata("design:type", String)
261
+ ], ApprovalLineView.prototype, "drafter", void 0);
259
262
  ApprovalLineView = __decorate([
260
263
  customElement('approval-line-view')
261
264
  ], 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AAC,CAAC,EAAE;;KAE7F,CAAA;IACH,CAAC;;AAnE0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;+CAA2B;AACzB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDAAsB;AAxLtC,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CA2P5B","sourcesContent":["import { css, html, LitElement, TemplateResult } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ApprovalLineItem, isReferenceStep } from '../types/approval-line'\nimport { OrgMemberTargetType } from '../types/org-member'\n\n@customElement('approval-line-view')\nexport class ApprovalLineView extends localize(i18next)(LitElement) {\n static styles = [\n css`\n /*\n * 면을 갖지 않는다 — 담는 쪽(worklist 의 곁 패널)이 면을 준다. 회색 면을 스스로 칠하면\n * 패널 안에 회색 덩어리가 생긴다.\n */\n /*\n * 이 부품은 넓은 자리(결재선 편집기 · 선택기)와 좁은 자리(worklist 의 정보 팝업)에 함께 쓰인다.\n * 그래서 **어느 폭에서도 무너지지 않아야** 한다 — 좁다고 칸을 짜부라뜨리면 이름이 글자마다\n * 줄바꿈되고, 넓다고 늘어뜨리면 단계 사이가 멀어져 한 줄로 안 읽힌다.\n *\n * 칸마다 최소 폭을 주고, 그 폭도 안 되면 이 안에서 가로로 넘긴다. 담는 화면은 건드릴 것이 없다.\n */\n :host {\n display: block;\n padding: 10px 0;\n overflow-x: auto;\n\n --md-icon-size: 3em;\n color: var(--ui-ink, #17242c);\n }\n\n /*\n * ── 칸은 모두 같은 폭이다 (2026-09-06) ─────────────────────────────\n * approval-line-brief 와 같은 이유다. 이음선을 자기 폭의 50% 로 옆 칸 가운데까지 늘리는데,\n * 그 계산은 칸이 모두 같은 폭일 때만 맞는다. 내용 폭으로 두었더니 「나」는 28px,\n * 「QUALITY-MANAGER」는 140px 이 되어 선이 앞 칸의 가운데를 지나쳤다(실측).\n *\n * grid 로 균등하게 나눈다. 이름은 자기 칸 안에서 줄바꿈하고, 상자는 자기 글자만큼만 넓다.\n * 좁은 팝업에서 4단계도 가로로 넘치지 않는다.\n */\n ol {\n list-style: none;\n margin: 0;\n padding: 0;\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: minmax(96px, 1fr);\n align-items: start;\n min-width: 100%;\n width: max-content;\n }\n\n li {\n position: relative;\n min-width: 0;\n padding: 0 4px;\n text-align: center;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n line-height: 1.35;\n overflow-wrap: anywhere;\n }\n\n /*\n * 앞 칸과 잇는 선. 칸이 균등하므로 앞 칸의 가운데는 -50% 자리다. 상자 폭은 글자마다 다르므로\n * 넉넉히 비워 둔다 — 상자에 닿는 것보다 조금 떨어지는 편이 낫다.\n */\n /*\n * 색은 「어디까지 왔나」를 말한다. 지나온 구간은 강조색, 아직 오지 않은 구간은 흐리게.\n *\n * CSS 는 「현재보다 앞」을 고를 수 없다(형제 선택자는 뒤로만 간다). 그래서 **기본을\n * 강조색**으로 두고, 현재 뒤에 오는 것만 흐리게 되돌린다.\n */\n li:before {\n content: '';\n position: absolute;\n top: 10px;\n right: calc(50% + 14px);\n left: calc(-50% + 14px);\n height: 2px;\n background-color: var(--ui-accent, #00727e);\n }\n\n li:first-child:before {\n display: none;\n }\n\n .who {\n display: block;\n line-height: 1.35;\n }\n\n /*\n * The step marker is the step number, as in approval-line-brief.\n *\n * It used to hold how the approver was chosen — a filled pill reading 역할 (role). Two things\n * were wrong with that. The step number vanished, so the detail view carried less than the\n * summary the user opened it from: the ribbon reads 1 나 · 2 QUALITY-MANAGER, this one read\n * 나 · 역할 QUALITY-MANAGER. And the pill outweighed the name, so \"role\" was read before\n * \"QUALITY-MANAGER\" even though the name is what the user came for.\n *\n * How the approver was chosen now sits under the name, in .kind.\n */\n span {\n display: block;\n width: 20px;\n height: 20px;\n margin: 0 auto 4px;\n border-radius: 50%;\n background-color: var(--ui-line-soft, #e6eaed);\n color: var(--ui-faint, #8a959c);\n font-size: var(--ui-t-small, 11.5px);\n line-height: 20px;\n }\n\n /*\n * The submitter is where the line starts, not a step in it.\n *\n * It used to carry the number 1, which pushed every approver one place along: the popup read\n * 결재선번 1 next to a diagram lighting up step 2. The server counts the 1-based position in\n * approvalLine — submitter excluded, references included (see\n * worklist/server/controllers/activity-approval/approval-line.ts). The diagram now counts the\n * same thing.\n *\n * A filled dot with no digit: the line starts here, and there is no turn to number.\n */\n [origin] span {\n font-size: 0;\n }\n\n /* A reference has no turn to take, so it gets no number — an empty ring holds the place. */\n [reference] span {\n background-color: transparent;\n border: 2px dashed var(--ui-line, #d5dce0);\n box-sizing: border-box;\n }\n\n [approver][current] span {\n background-color: var(--ui-accent, #00727e);\n color: var(--ui-on-accent, #ffffff);\n }\n\n /* How this approver was chosen — role, self, supervisor. Secondary to who they are. */\n .kind {\n display: block;\n margin-top: 2px;\n font-size: var(--ui-t-micro, 11px);\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] {\n font-weight: bold;\n }\n\n /* 아직 오지 않은 단계 — 흐리게 둔다. 검은 상자를 얹으면 지나온 단계보다 무거워 보인다. */\n [approver][current] ~ li {\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] ~ li span {\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] ~ li:before {\n background-color: var(--ui-line, #d5dce0);\n }\n\n /* 현재가 없으면(아직 아무 단계도 아니면) 전부 흐리다 — 지나온 구간이 없다. */\n :host([no-current]) li:before {\n background-color: var(--ui-line, #d5dce0);\n }\n /*\n * 참조 — 결재와 다르게, 그리고 **더 조용하게** 그린다. 결재는 길을 막는 자리이고 참조는 알리는\n * 자리다. 같은 무게로 그리면 결재선을 짠 사람이 몇 명의 승인이 필요한지 잘못 읽는다.\n */\n li[approver][reference] {\n color: var(--ui-muted, #57676f);\n }\n\n li[approver][reference] em {\n margin-left: 4px;\n padding: 0 5px;\n border: 1px solid var(--ui-line, #d5dce0);\n border-radius: 999px;\n font-size: var(--ui-t-small, 11.5px);\n font-style: normal;\n }\n\n `\n ]\n\n @property({ type: Array }) model?: ApprovalLineItem[]\n @property({ type: Number }) current?: number = -1\n\n updated(changes) {\n /* 현재 단계를 못 받았으면 지나온 구간이 없다 — 이음선을 전부 흐리게 둔다. */\n this.toggleAttribute('no-current', !(Number(this.current) > 0))\n }\n\n render() {\n const items = this.model || []\n\n return html`\n <ol>\n ${this.model\n ? html` <li approver origin>\n <span></span>\n <div class=\"who\">${i18next.t('label.Myself')}</div>\n </li>`\n : html``}\n ${items.map((item, order) => this.renderItem(item, order + 1))}\n </ol>\n `\n }\n\n /**\n * One step of the approval line.\n *\n * A reference is drawn differently from an approval. Drawn the same it reads as \"this person has\n * to approve before it moves on\", which a reference does not do — whoever assembles the line has\n * to be able to see here what they put in.\n *\n * It carries no number either: a reference takes no turn, so there is no \"third\" for it to be.\n *\n * The number is the 1-based position in approvalLine, which is exactly what the server means by\n * `order`: submitter excluded, references included, array position as it stands (see\n * worklist/server/controllers/activity-approval/approval-line.ts). A reference holding a slot\n * without showing a digit is therefore right, not a gap.\n */\n renderItem(item: ApprovalLineItem, order: number): TemplateResult {\n const { type, approver } = item\n const { name } = approver || {\n name: [OrgMemberTargetType.Myself, OrgMemberTargetType.MySupervisor, OrgMemberTargetType.MyDepartment].includes(\n type!\n )\n ? i18next.t(`label.${type}`)\n : ''\n }\n\n const reference = isReferenceStep(item)\n\n /*\n * The name is who this is; the kind is how they were chosen (self, supervisor, role). Choosing\n * by self makes the two the same word, and the screen printed 나 twice, stacked. When they\n * match, say it once.\n */\n const kind = i18next.t('label.' + type)\n const shown = name || kind\n const note = name && name !== kind ? kind : ''\n\n return html`\n <li approver ?current=${this.current == order} ?reference=${reference}>\n <span>${reference ? '' : order}</span>\n <div class=\"who\">${shown}</div>\n ${note ? html`<div class=\"kind\">${note}</div>` : ''}\n ${reference ? html`<div><em>${i18next.t('label.participation-reference')}</em></div>` : ''}\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,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK;2BACX,KAAK;UACtB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,qBAAqB,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;UACjD,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA,YAAY,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;;KAE7F,CAAA;IACH,CAAC;;AAvE0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;+CAA2B;AACzB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDAAsB;AAOrB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDAAiB;AA/LjC,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CA+P5B","sourcesContent":["import { css, html, LitElement, TemplateResult } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ApprovalLineItem, isReferenceStep } from '../types/approval-line'\nimport { OrgMemberTargetType } from '../types/org-member'\n\n@customElement('approval-line-view')\nexport class ApprovalLineView extends localize(i18next)(LitElement) {\n static styles = [\n css`\n /*\n * 면을 갖지 않는다 — 담는 쪽(worklist 의 곁 패널)이 면을 준다. 회색 면을 스스로 칠하면\n * 패널 안에 회색 덩어리가 생긴다.\n */\n /*\n * 이 부품은 넓은 자리(결재선 편집기 · 선택기)와 좁은 자리(worklist 의 정보 팝업)에 함께 쓰인다.\n * 그래서 **어느 폭에서도 무너지지 않아야** 한다 — 좁다고 칸을 짜부라뜨리면 이름이 글자마다\n * 줄바꿈되고, 넓다고 늘어뜨리면 단계 사이가 멀어져 한 줄로 안 읽힌다.\n *\n * 칸마다 최소 폭을 주고, 그 폭도 안 되면 이 안에서 가로로 넘긴다. 담는 화면은 건드릴 것이 없다.\n */\n :host {\n display: block;\n padding: 10px 0;\n overflow-x: auto;\n\n --md-icon-size: 3em;\n color: var(--ui-ink, #17242c);\n }\n\n /*\n * ── 칸은 모두 같은 폭이다 (2026-09-06) ─────────────────────────────\n * approval-line-brief 와 같은 이유다. 이음선을 자기 폭의 50% 로 옆 칸 가운데까지 늘리는데,\n * 그 계산은 칸이 모두 같은 폭일 때만 맞는다. 내용 폭으로 두었더니 「나」는 28px,\n * 「QUALITY-MANAGER」는 140px 이 되어 선이 앞 칸의 가운데를 지나쳤다(실측).\n *\n * grid 로 균등하게 나눈다. 이름은 자기 칸 안에서 줄바꿈하고, 상자는 자기 글자만큼만 넓다.\n * 좁은 팝업에서 4단계도 가로로 넘치지 않는다.\n */\n ol {\n list-style: none;\n margin: 0;\n padding: 0;\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: minmax(96px, 1fr);\n align-items: start;\n min-width: 100%;\n width: max-content;\n }\n\n li {\n position: relative;\n min-width: 0;\n padding: 0 4px;\n text-align: center;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n line-height: 1.35;\n overflow-wrap: anywhere;\n }\n\n /*\n * 앞 칸과 잇는 선. 칸이 균등하므로 앞 칸의 가운데는 -50% 자리다. 상자 폭은 글자마다 다르므로\n * 넉넉히 비워 둔다 — 상자에 닿는 것보다 조금 떨어지는 편이 낫다.\n */\n /*\n * 색은 「어디까지 왔나」를 말한다. 지나온 구간은 강조색, 아직 오지 않은 구간은 흐리게.\n *\n * CSS 는 「현재보다 앞」을 고를 수 없다(형제 선택자는 뒤로만 간다). 그래서 **기본을\n * 강조색**으로 두고, 현재 뒤에 오는 것만 흐리게 되돌린다.\n */\n li:before {\n content: '';\n position: absolute;\n top: 10px;\n right: calc(50% + 14px);\n left: calc(-50% + 14px);\n height: 2px;\n background-color: var(--ui-accent, #00727e);\n }\n\n li:first-child:before {\n display: none;\n }\n\n .who {\n display: block;\n line-height: 1.35;\n }\n\n /*\n * The step marker is the step number, as in approval-line-brief.\n *\n * It used to hold how the approver was chosen — a filled pill reading 역할 (role). Two things\n * were wrong with that. The step number vanished, so the detail view carried less than the\n * summary the user opened it from: the ribbon reads 1 나 · 2 QUALITY-MANAGER, this one read\n * 나 · 역할 QUALITY-MANAGER. And the pill outweighed the name, so \"role\" was read before\n * \"QUALITY-MANAGER\" even though the name is what the user came for.\n *\n * How the approver was chosen now sits under the name, in .kind.\n */\n span {\n display: block;\n width: 20px;\n height: 20px;\n margin: 0 auto 4px;\n border-radius: 50%;\n background-color: var(--ui-line-soft, #e6eaed);\n color: var(--ui-faint, #8a959c);\n font-size: var(--ui-t-small, 11.5px);\n line-height: 20px;\n }\n\n /*\n * The submitter is where the line starts, not a step in it.\n *\n * It used to carry the number 1, which pushed every approver one place along: the popup read\n * 결재선번 1 next to a diagram lighting up step 2. The server counts the 1-based position in\n * approvalLine — submitter excluded, references included (see\n * worklist/server/controllers/activity-approval/approval-line.ts). The diagram now counts the\n * same thing.\n *\n * A filled dot with no digit: the line starts here, and there is no turn to number.\n */\n [origin] span {\n font-size: 0;\n }\n\n /* A reference has no turn to take, so it gets no number — an empty ring holds the place. */\n [reference] span {\n background-color: transparent;\n border: 2px dashed var(--ui-line, #d5dce0);\n box-sizing: border-box;\n }\n\n [approver][current] span {\n background-color: var(--ui-accent, #00727e);\n color: var(--ui-on-accent, #ffffff);\n }\n\n /* How this approver was chosen — role, self, supervisor. Secondary to who they are. */\n .kind {\n display: block;\n margin-top: 2px;\n font-size: var(--ui-t-micro, 11px);\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] {\n font-weight: bold;\n }\n\n /* 아직 오지 않은 단계 — 흐리게 둔다. 검은 상자를 얹으면 지나온 단계보다 무거워 보인다. */\n [approver][current] ~ li {\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] ~ li span {\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] ~ li:before {\n background-color: var(--ui-line, #d5dce0);\n }\n\n /* 현재가 없으면(아직 아무 단계도 아니면) 전부 흐리다 — 지나온 구간이 없다. */\n :host([no-current]) li:before {\n background-color: var(--ui-line, #d5dce0);\n }\n /*\n * 참조 — 결재와 다르게, 그리고 **더 조용하게** 그린다. 결재는 길을 막는 자리이고 참조는 알리는\n * 자리다. 같은 무게로 그리면 결재선을 짠 사람이 몇 명의 승인이 필요한지 잘못 읽는다.\n */\n li[approver][reference] {\n color: var(--ui-muted, #57676f);\n }\n\n li[approver][reference] em {\n margin-left: 4px;\n padding: 0 5px;\n border: 1px solid var(--ui-line, #d5dce0);\n border-radius: 999px;\n font-size: var(--ui-t-small, 11.5px);\n font-style: normal;\n }\n\n `\n ]\n\n @property({ type: Array }) model?: ApprovalLineItem[]\n @property({ type: Number }) current?: number = -1\n /*\n * Who drafted the case, when the reader may be someone else (2026-11-10). The line is declared from\n * the drafter's side - 나, 내 관리자 - and the 대표 reading 이유민's report read 「나」 as himself.\n * Given, the origin is the drafter's name and those steps say whose they are. The line editor, read\n * by the drafter, gives none and reads as before.\n */\n @property({ type: String }) drafter?: string\n\n updated(changes) {\n /* 현재 단계를 못 받았으면 지나온 구간이 없다 — 이음선을 전부 흐리게 둔다. */\n this.toggleAttribute('no-current', !(Number(this.current) > 0))\n }\n\n render() {\n const items = this.model || []\n\n return html`\n <ol>\n ${this.model\n ? html` <li approver origin>\n <span></span>\n <div class=\"who\">${this.drafter || i18next.t('label.Myself')}</div>\n ${this.drafter ? html`<div class=\"kind\">${i18next.t('label.drafter')}</div>` : ''}\n </li>`\n : html``}\n ${items.map((item, order) => this.renderItem(item, order + 1))}\n </ol>\n `\n }\n\n /**\n * One step of the approval line.\n *\n * A reference is drawn differently from an approval. Drawn the same it reads as \"this person has\n * to approve before it moves on\", which a reference does not do — whoever assembles the line has\n * to be able to see here what they put in.\n *\n * It carries no number either: a reference takes no turn, so there is no \"third\" for it to be.\n *\n * The number is the 1-based position in approvalLine, which is exactly what the server means by\n * `order`: submitter excluded, references included, array position as it stands (see\n * worklist/server/controllers/activity-approval/approval-line.ts). A reference holding a slot\n * without showing a digit is therefore right, not a gap.\n */\n renderItem(item: ApprovalLineItem, order: number): TemplateResult {\n const { type, approver } = item\n const relative = [OrgMemberTargetType.Myself, OrgMemberTargetType.MySupervisor, OrgMemberTargetType.MyDepartment].includes(type!)\n /* How the step was chosen, said from the drafter's side when the reader is someone else. */\n const kind = i18next.t(relative && this.drafter ? `label.drafter-${type}` : `label.${type}`)\n const name = approver?.name || (relative ? kind : '')\n\n const reference = isReferenceStep(item)\n\n /*\n * The name is who this is; the kind is how they were chosen (self, supervisor, role). Choosing\n * by self makes the two the same word, and the screen printed 나 twice, stacked. When they\n * match, say it once.\n */\n const shown = name || kind\n const note = name && name !== kind ? kind : ''\n\n return html`\n <li approver ?current=${this.current == order} ?reference=${reference}>\n <span>${reference ? '' : order}</span>\n <div class=\"who\">${shown}</div>\n ${note ? html`<div class=\"kind\">${note}</div>` : ''}\n ${reference ? html`<div><em>${i18next.t('label.participation-reference')}</em></div>` : ''}\n </li>\n `\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import './ox-filter-department-object.js';
2
- import { html } from 'lit-html';
2
+ import { html } from 'lit';
3
3
  export const FilterDepartmentObject = (column, value, owner) => {
4
4
  return html `
5
5
  <ox-filter-department-object name=${column?.name} .column=${column} .value=${value}></ox-filter-department-object>
@@ -1 +1 @@
1
- {"version":3,"file":"filter-department-object.js","sourceRoot":"","sources":["../../client/filters-form/filter-department-object.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,MAAM,CAAC,MAAM,sBAAsB,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IACnF,OAAO,IAAI,CAAA;wCAC2B,MAAM,EAAE,IAAI,YAAY,MAAM,WAAW,KAAK;GACnF,CAAA;AACH,CAAC,CAAA","sourcesContent":["import './ox-filter-department-object.js'\n\nimport { html } from 'lit-html'\n\nimport { FilterSelectRenderer } from '@operato/data-grist'\n\nexport const FilterDepartmentObject: FilterSelectRenderer = (column, value, owner) => {\n return html`\n <ox-filter-department-object name=${column?.name} .column=${column} .value=${value}></ox-filter-department-object>\n `\n}\n"]}
1
+ {"version":3,"file":"filter-department-object.js","sourceRoot":"","sources":["../../client/filters-form/filter-department-object.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAI1B,MAAM,CAAC,MAAM,sBAAsB,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IACnF,OAAO,IAAI,CAAA;wCAC2B,MAAM,EAAE,IAAI,YAAY,MAAM,WAAW,KAAK;GACnF,CAAA;AACH,CAAC,CAAA","sourcesContent":["import './ox-filter-department-object.js'\n\nimport { html } from 'lit'\n\nimport { FilterSelectRenderer } from '@operato/data-grist'\n\nexport const FilterDepartmentObject: FilterSelectRenderer = (column, value, owner) => {\n return html`\n <ox-filter-department-object name=${column?.name} .column=${column} .value=${value}></ox-filter-department-object>\n `\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import '@material/web/icon/icon.js';
2
- import { html } from 'lit-html';
2
+ import { html } from 'lit';
3
3
  import { i18next } from '@operato/i18n';
4
4
  import { approvalLineMark } from '../types/approval-line.js';
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"grist-renderer-approval-line.js","sourceRoot":"","sources":["../../client/grist-editor/grist-renderer-approval-line.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAG/B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAE5D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IACjG,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,GAAW,EAAE,KAAK,GAAG,KAAK,EAAE,EAAE,CAAC,IAAI,CAAA;YACrD,uBAAuB,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE;YACpD,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;OACnB,IAAI;IACP,CAAA;IAEF,QAAQ,gBAAgB,CAAC,KAAY,CAAC,EAAE,CAAC;QACvC,KAAK,MAAM;YACT,OAAO,IAAI,CAAA,EAAE,CAAA;QACf,KAAK,gBAAgB;YACnB,OAAO,IAAI,CAAC,YAAY,EAAE,wCAAwC,EAAE,IAAI,CAAC,CAAA;QAC3E,KAAK,KAAK;YACR,OAAO,IAAI,CAAC,QAAQ,EAAE,qCAAqC,CAAC,CAAA;QAC9D;YACE,OAAO,IAAI,CAAC,OAAO,EAAE,0CAA0C,CAAC,CAAA;IACpE,CAAC;AACH,CAAC,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { html } from 'lit-html'\n\nimport { FieldRenderer } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\n\nimport { approvalLineMark } from '../types/approval-line.js'\n\n/**\n * 결재선 칸 — **결재 단계를 센다. 줄의 길이가 아니다.**\n *\n * 전에는 `value.length` 로 갈랐다. 그러면 참조만 있는 줄이 사람 아이콘을 얻고, 목록을 읽는 사람은\n * 결재자가 있는 것으로 본다. 참조는 의견을 낼 뿐 판정하지 않으므로 그 업무는 올라가기만 하고\n * 아무도 못 내린다. 무엇을 그릴지는 `approvalLineMark` 한 자리가 답한다.\n *\n * 「참조만」은 빈 칸으로 두지 않는다 — 고칠 사람이 할 일이 다르다. 줄이 없으면 만들어야 하고,\n * 참조만 있으면 그 줄에 결재자를 더해야 한다.\n */\nexport const GristRendererApprovalLine: FieldRenderer = (value, column, record, rowIndex, field) => {\n const icon = (name: string, key: string, muted = false) => html`<md-icon\n style=${`--md-icon-size:1.3em${muted ? ';opacity:.55' : ''}`}\n title=${i18next.t(key)}\n >${name}</md-icon\n >`\n\n switch (approvalLineMark(value as any)) {\n case 'none':\n return html``\n case 'reference-only':\n return icon('visibility', 'text.approval-line has references only', true)\n case 'one':\n return icon('person', 'text.approval-line has one approver')\n default:\n return icon('group', 'text.approval-line has several approvers')\n }\n}\n"]}
1
+ {"version":3,"file":"grist-renderer-approval-line.js","sourceRoot":"","sources":["../../client/grist-editor/grist-renderer-approval-line.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAE5D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IACjG,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,GAAW,EAAE,KAAK,GAAG,KAAK,EAAE,EAAE,CAAC,IAAI,CAAA;YACrD,uBAAuB,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE;YACpD,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;OACnB,IAAI;IACP,CAAA;IAEF,QAAQ,gBAAgB,CAAC,KAAY,CAAC,EAAE,CAAC;QACvC,KAAK,MAAM;YACT,OAAO,IAAI,CAAA,EAAE,CAAA;QACf,KAAK,gBAAgB;YACnB,OAAO,IAAI,CAAC,YAAY,EAAE,wCAAwC,EAAE,IAAI,CAAC,CAAA;QAC3E,KAAK,KAAK;YACR,OAAO,IAAI,CAAC,QAAQ,EAAE,qCAAqC,CAAC,CAAA;QAC9D;YACE,OAAO,IAAI,CAAC,OAAO,EAAE,0CAA0C,CAAC,CAAA;IACpE,CAAC;AACH,CAAC,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { html } from 'lit'\n\nimport { FieldRenderer } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\n\nimport { approvalLineMark } from '../types/approval-line.js'\n\n/**\n * 결재선 칸 — **결재 단계를 센다. 줄의 길이가 아니다.**\n *\n * 전에는 `value.length` 로 갈랐다. 그러면 참조만 있는 줄이 사람 아이콘을 얻고, 목록을 읽는 사람은\n * 결재자가 있는 것으로 본다. 참조는 의견을 낼 뿐 판정하지 않으므로 그 업무는 올라가기만 하고\n * 아무도 못 내린다. 무엇을 그릴지는 `approvalLineMark` 한 자리가 답한다.\n *\n * 「참조만」은 빈 칸으로 두지 않는다 — 고칠 사람이 할 일이 다르다. 줄이 없으면 만들어야 하고,\n * 참조만 있으면 그 줄에 결재자를 더해야 한다.\n */\nexport const GristRendererApprovalLine: FieldRenderer = (value, column, record, rowIndex, field) => {\n const icon = (name: string, key: string, muted = false) => html`<md-icon\n style=${`--md-icon-size:1.3em${muted ? ';opacity:.55' : ''}`}\n title=${i18next.t(key)}\n >${name}</md-icon\n >`\n\n switch (approvalLineMark(value as any)) {\n case 'none':\n return html``\n case 'reference-only':\n return icon('visibility', 'text.approval-line has references only', true)\n case 'one':\n return icon('person', 'text.approval-line has one approver')\n default:\n return icon('group', 'text.approval-line has several approvers')\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import '@material/web/icon/icon.js';
2
- import { html } from 'lit-html';
2
+ import { html } from 'lit';
3
3
  export const GristRendererAssignees = (value, column, record, rowIndex, field) => {
4
4
  return !value || !(value instanceof Array) || value.length == 0
5
5
  ? html ``
@@ -1 +1 @@
1
- {"version":3,"file":"grist-renderer-assignees.js","sourceRoot":"","sources":["../../client/grist-editor/grist-renderer-assignees.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,MAAM,CAAC,MAAM,sBAAsB,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAC9F,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;QAC7D,CAAC,CAAC,IAAI,CAAA,EAAE;QACR,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC;YACnB,CAAC,CAAC,IAAI,CAAA,wDAAwD;YAC9D,CAAC,CAAC,IAAI,CAAA,uDAAuD,CAAA;AACjE,CAAC,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { html } from 'lit-html'\n\nimport { FieldRenderer } from '@operato/data-grist'\n\nexport const GristRendererAssignees: FieldRenderer = (value, column, record, rowIndex, field) => {\n return !value || !(value instanceof Array) || value.length == 0\n ? html``\n : value.length == 1\n ? html`<md-icon style=\"--md-icon-size:1.3em\">person</md-icon>`\n : html`<md-icon style=\"--md-icon-size:1.3em\">group</md-icon>`\n}\n"]}
1
+ {"version":3,"file":"grist-renderer-assignees.js","sourceRoot":"","sources":["../../client/grist-editor/grist-renderer-assignees.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAI1B,MAAM,CAAC,MAAM,sBAAsB,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAC9F,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;QAC7D,CAAC,CAAC,IAAI,CAAA,EAAE;QACR,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC;YACnB,CAAC,CAAC,IAAI,CAAA,wDAAwD;YAC9D,CAAC,CAAC,IAAI,CAAA,uDAAuD,CAAA;AACjE,CAAC,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { html } from 'lit'\n\nimport { FieldRenderer } from '@operato/data-grist'\n\nexport const GristRendererAssignees: FieldRenderer = (value, column, record, rowIndex, field) => {\n return !value || !(value instanceof Array) || value.length == 0\n ? html``\n : value.length == 1\n ? html`<md-icon style=\"--md-icon-size:1.3em\">person</md-icon>`\n : html`<md-icon style=\"--md-icon-size:1.3em\">group</md-icon>`\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { html } from 'lit-html';
1
+ import { html } from 'lit';
2
2
  import { entity360Name } from '@operato/layout';
3
3
  export const GristRendererDepartmentObject = (value, column, record, rowIndex, field) => {
4
4
  if (!value) {
@@ -1 +1 @@
1
- {"version":3,"file":"grist-renderer-department-object.js","sourceRoot":"","sources":["../../client/grist-editor/grist-renderer-department-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,MAAM,CAAC,MAAM,6BAA6B,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IACrG,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,CAAA;IACX,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,KAAK,CAAA;IAEnC,OAAO,IAAI,CAAA,SAAS,aAAa,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,WAAW,GAAG,CAAC,IAAI,EAAE,UAAU,CAAA;AAC5G,CAAC,CAAA","sourcesContent":["import { html } from 'lit-html'\n\nimport { FieldRenderer } from '@operato/data-grist'\nimport { entity360Name } from '@operato/layout'\n\nexport const GristRendererDepartmentObject: FieldRenderer = (value, column, record, rowIndex, field) => {\n if (!value) {\n return ''\n }\n\n const { name, description } = value\n\n return html`<span>${entity360Name(value, name || '')}${(description && `(${description})`) || ''}</span> `\n}\n"]}
1
+ {"version":3,"file":"grist-renderer-department-object.js","sourceRoot":"","sources":["../../client/grist-editor/grist-renderer-department-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,MAAM,CAAC,MAAM,6BAA6B,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IACrG,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,CAAA;IACX,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,KAAK,CAAA;IAEnC,OAAO,IAAI,CAAA,SAAS,aAAa,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,GAAG,CAAC,WAAW,IAAI,IAAI,WAAW,GAAG,CAAC,IAAI,EAAE,UAAU,CAAA;AAC5G,CAAC,CAAA","sourcesContent":["import { html } from 'lit'\n\nimport { FieldRenderer } from '@operato/data-grist'\nimport { entity360Name } from '@operato/layout'\n\nexport const GristRendererDepartmentObject: FieldRenderer = (value, column, record, rowIndex, field) => {\n if (!value) {\n return ''\n }\n\n const { name, description } = value\n\n return html`<span>${entity360Name(value, name || '')}${(description && `(${description})`) || ''}</span> `\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import '@material/web/icon/icon.js';
2
- import { html } from 'lit-html';
2
+ import { html } from 'lit';
3
3
  export const GristRendererRecipients = (value, column, record, rowIndex, field) => {
4
4
  return !value || !(value instanceof Array) || value.length == 0
5
5
  ? html ``
@@ -1 +1 @@
1
- {"version":3,"file":"grist-renderer-recipients.js","sourceRoot":"","sources":["../../client/grist-editor/grist-renderer-recipients.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,MAAM,CAAC,MAAM,uBAAuB,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAC/F,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;QAC7D,CAAC,CAAC,IAAI,CAAA,EAAE;QACR,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC;YACnB,CAAC,CAAC,IAAI,CAAA,wDAAwD;YAC9D,CAAC,CAAC,IAAI,CAAA,uDAAuD,CAAA;AACjE,CAAC,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { html } from 'lit-html'\n\nimport { FieldRenderer } from '@operato/data-grist'\n\nexport const GristRendererRecipients: FieldRenderer = (value, column, record, rowIndex, field) => {\n return !value || !(value instanceof Array) || value.length == 0\n ? html``\n : value.length == 1\n ? html`<md-icon style=\"--md-icon-size:1.3em\">person</md-icon>`\n : html`<md-icon style=\"--md-icon-size:1.3em\">group</md-icon>`\n}\n"]}
1
+ {"version":3,"file":"grist-renderer-recipients.js","sourceRoot":"","sources":["../../client/grist-editor/grist-renderer-recipients.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAI1B,MAAM,CAAC,MAAM,uBAAuB,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAC/F,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;QAC7D,CAAC,CAAC,IAAI,CAAA,EAAE;QACR,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC;YACnB,CAAC,CAAC,IAAI,CAAA,wDAAwD;YAC9D,CAAC,CAAC,IAAI,CAAA,uDAAuD,CAAA;AACjE,CAAC,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { html } from 'lit'\n\nimport { FieldRenderer } from '@operato/data-grist'\n\nexport const GristRendererRecipients: FieldRenderer = (value, column, record, rowIndex, field) => {\n return !value || !(value instanceof Array) || value.length == 0\n ? html``\n : value.length == 1\n ? html`<md-icon style=\"--md-icon-size:1.3em\">person</md-icon>`\n : html`<md-icon style=\"--md-icon-size:1.3em\">group</md-icon>`\n}\n"]}
@@ -74,6 +74,8 @@ let EmployeeListPage = class EmployeeListPage extends p13n(localize(i18next)(Sco
74
74
  css `
75
75
  :host {
76
76
  --ox-pfp-size: 40px;
77
+ --data-card-thumbnail-height: 56px;
78
+ --data-card-thumbnail-padding: 8px;
77
79
  --grid-record-emphasized-background-color: #8b0000;
78
80
  --grid-record-emphasized-color: #ff6b6b;
79
81
  }
@@ -400,7 +402,8 @@ let EmployeeListPage = class EmployeeListPage extends p13n(localize(i18next)(Sco
400
402
  record: {
401
403
  align: 'center',
402
404
  renderer: function (value, column, record, rowIndex, field) {
403
- return html `<ox-pfp-view .profile=${record.profile} .name=${record.name || '+'}></ox-pfp-view>`;
405
+ const thumbnail = field?.hasAttribute('thumbnail');
406
+ return html `<ox-pfp-view style=${`--ox-pfp-size: ${thumbnail ? 40 : 24}px; --ox-pfp-monogram-font-size: ${thumbnail ? 20 : 12}px; vertical-align: middle`} .profile=${record.profile} .name=${record.name || '+'}></ox-pfp-view>`;
404
407
  }
405
408
  },
406
409
  handlers: {
@@ -1 +1 @@
1
- {"version":3,"file":"employee-list-page.js","sourceRoot":"","sources":["../../../client/pages/employee/employee-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,sCAAsC,CAAA;AAC7C,OAAO,sCAAsC,CAAA;AAC7C,OAAO,qCAAqC,CAAA;AAC5C,OAAO,mDAAmD,CAAA;AAE1D,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM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,UAAU,EAAE,MAAM,CAAC,EAAE,EAAE;aACrC,CAAC,CAAA;QACJ,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;IACpB,CAAC;;AAzwB2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CAAoE;AAEpE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;IAE5C,+HAA+H;;+CAFnF;AAG3B;IAAhB,KAAK,EAAE;;oDAA2B;AAElB;IAAhB,KAAK,EAAE;;4DAAmC;AA9HhC,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CAg4B5B","sourcesContent":["import '@operato/data-grist'\nimport '@operato/data-tree'\nimport '@operato/list-state/ox-empty-note.js'\nimport '@operato/list-state/ox-page-state.js'\nimport '@things-factory/contact/dist-client'\nimport '@things-factory/ai-assistant/dist-client/index.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { OxPrompt } from '@operato/popup'\nimport { Contact } from '@operato/contact/ox-contact.js'\nimport { DataGrist, FetchOption, GristRecord } from '@operato/data-grist'\nimport { client, QueryController } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { PageView } from '@operato/shell'\nimport { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles'\nimport { isMobileDevice } from '@operato/utils'\nimport { p13n } from '@operato/p13n'\n\nimport { hasPrivilege } from '@things-factory/auth-base/dist-client'\nimport { issueDocument } from '@things-factory/pdf/dist-client'\n\nimport { Department } from '../../types/department'\nimport { EmployeeImporter } from './employee-importer'\n\n/** The column layout 사번 · 이름 lead and stay fixed on - a person's older column order gives way to it. */\nconst COLUMNS_VERSION = 'lead-2026-11-08'\n\n@customElement('employee-list-page')\nexport class EmployeeListPage extends p13n(localize(i18next)(ScopedElementsMixin(PageView))) {\n static styles = [\n /* The work surface frame for a list screen (ADR-0060 decision 8). */\n WorkSurfacePageStyles,\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host {\n --ox-pfp-size: 40px;\n --grid-record-emphasized-background-color: #8b0000;\n --grid-record-emphasized-color: #ff6b6b;\n }\n\n .header {\n grid-template-areas: 'filters';\n }\n\n /*\n * The rail is how you narrow the list to one department; the list is the content\n * (ADR-0060 decision 8, and the ruling of 2026-09-18 that folded the by-department screen\n * into this one). It folds away, because a screen looking at everyone does not need it.\n */\n [body] {\n flex: 1;\n display: flex;\n flex-direction: row;\n min-height: 0;\n }\n\n [rail] {\n display: flex;\n flex-direction: column;\n width: 240px;\n min-width: 240px;\n border-right: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));\n overflow: auto;\n }\n\n [rail][folded] {\n display: none;\n }\n\n [rail-head] {\n display: flex;\n align-items: center;\n gap: var(--spacing-small, 4px);\n padding: var(--spacing-medium, 8px) var(--spacing-medium, 8px) 0;\n font: var(--label-font, inherit);\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n }\n\n /* The word keeps its line. Sharing the row with a filler let it shrink and break in half. */\n [rail-head] > span {\n flex: 0 0 auto;\n white-space: nowrap;\n }\n\n [rail-head] button,\n /*\n * Going back to everyone. Picking a department narrows the list, and without this there is no\n * way out of that except reloading the screen.\n */\n button[all-departments] {\n width: calc(100% - 16px);\n margin: 4px 8px;\n padding: 6px 10px;\n text-align: left;\n border: 1px solid transparent;\n border-radius: var(--md-sys-shape-corner-small, 6px);\n background: transparent;\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n font: inherit;\n cursor: pointer;\n }\n\n button[all-departments][selected] {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n\n [rail-toggle] {\n display: flex;\n align-items: center;\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n padding: 2px;\n }\n\n [rail-toggle] {\n align-self: flex-start;\n margin: var(--spacing-medium, 8px) 0 0 var(--spacing-small, 4px);\n }\n\n ox-tree {\n flex: 1;\n overflow: auto;\n }\n\n ox-grist {\n flex: 1;\n min-width: 0;\n }\n\n @media screen and (max-width: 780px) {\n [rail] {\n display: none;\n }\n }\n `\n ]\n\n static get scopedElements() {\n return { 'employee-importer': EmployeeImporter }\n }\n\n @property({ type: Object }) gristConfig: any\n @property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n\n /** Whether the rail is showing. The department chosen on it is the grid's own filter (`departmentId`), kept in the address. */\n @state() private railFolded = false\n /** Whether this person issues employees' certificates. */\n @state() private issuesCertificates = false\n\n /**\n * The departments the rail draws (ADR-0190). departmentRoots answers with a list, and the tree draws from\n * the first root - a fragment spread straight onto the list is refused by the server.\n */\n private departmentsRead = new QueryController(\n this,\n gql`\n query {\n responses: departmentRoots {\n items {\n ...EmployeeDepartmentFragment\n children {\n ...EmployeeDepartmentFragment\n children {\n ...EmployeeDepartmentFragment\n children {\n ...EmployeeDepartmentFragment\n children {\n ...EmployeeDepartmentFragment\n }\n }\n }\n }\n }\n }\n }\n\n fragment EmployeeDepartmentFragment on Department {\n id\n controlNo\n name\n description\n active\n }\n `\n )\n\n /* Every root department, not just the first - the rail draws an array. */\n private get departments(): Department[] | undefined {\n return this.departmentsRead.data?.responses?.items\n }\n\n /** The department the list is narrowed to: the grid's `departmentId` filter, found in the rail's tree. */\n private get selectedDepartment(): Department | undefined {\n const id = (this.grist?.filters || []).find(filter => filter.name === 'departmentId')?.value\n if (!id) return undefined\n const find = (list: Department[] = []): Department | undefined => {\n for (const one of list) {\n if (one.id === id) return one\n const found = find((one as any).children)\n if (found) return found\n }\n return undefined\n }\n return find(this.departments)\n }\n\n get context() {\n return {\n title: i18next.t('title.employee list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist?.searchText || ''\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'organization/employee',\n actions: [\n /* The only way to start an employee inline - there is no empty row under the records. */\n { id: 'add-row', icon: 'add', title: i18next.t('button.add-row'), action: () => this.grist.addNewRecord() },\n { id: 'save', title: i18next.t('button.save'), action: this.onUpdateEmployee.bind(this), ...CommonButtonStyles.save }\n ],\n exportable: { name: i18next.t('title.employee list'), data: this.exportHandler.bind(this) },\n importable: { handler: this.importHandler.bind(this) }\n }\n }\n\n /**\n * What is done with the picked employees, on the selection bar over the list (FOOTER-BUTTON-REVIEW F06): certificates\n * of one employee - for whoever issues them (`employee-certificate`, ADR-0176 decision 5) - and deleting.\n */\n private get selectionActions() {\n return [\n ...(this.issuesCertificates\n ? [\n { id: 'employment-certificate', icon: 'workspace_premium', title: i18next.t('button.issue-employment-certificate'), single: true, action: () => this.issueCertificate('organization.employment-certificate') },\n { id: 'career-certificate', icon: 'history_edu', title: i18next.t('button.issue-career-certificate'), single: true, action: () => this.issueCertificate('organization.career-certificate') }\n ]\n : []),\n { id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: this.onDeleteEmployee.bind(this) }\n ]\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-assistant-selection-bar\n .gridOf=${() => this.grist}\n name=${i18next.t('title.employee list')}\n .assistant=${false}\n .actions=${this.selectionActions}\n ></ox-assistant-selection-bar>\n <div body class=\"page-fill\">\n ${\n this.railFolded\n ? html`<button\n rail-toggle\n title=${i18next.t('title.department list')}\n @click=${() => (this.railFolded = false)}\n >\n <md-icon>account_tree</md-icon>\n </button>`\n : html`<aside rail>\n <div rail-head>\n <span>${i18next.t('title.department list')}</span>\n <div filler style=\"flex: 1\"></div>\n <button title=${i18next.t('label.fold')} @click=${() => (this.railFolded = true)}>\n <md-icon>chevron_left</md-icon>\n </button>\n </div>\n <ox-page-state\n .loading=${this.departmentsRead.loading}\n .error=${this.departmentsRead.error ?? null}\n @retry=${() => this.departmentsRead.refetch()}\n >\n ${\n this.departments?.length\n ? html`<button\n all-departments\n ?selected=${!this.selectedDepartment}\n @click=${() => this.onSelectDepartment(undefined)}\n >\n ${i18next.t('text.all departments')}\n </button>\n <ox-tree\n .data=${this.departments}\n .selected=${this.selectedDepartment}\n @select=${(e: CustomEvent) => this.onSelectDepartment(e.detail as Department)}\n id-property=\"controlNo\"\n label-property=\"name\"\n ></ox-tree>`\n : html`<ox-empty-note\n icon=\"account_tree\"\n title=${i18next.t('text.no departments yet')}\n description=${i18next.t('text.departments are made on the department screen')}\n ></ox-empty-note>`\n }\n </ox-page-state>\n </aside>`\n }\n\n <ox-grist\n .mode=${mode}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}\n ?url-params-sensitive=${this.active}\n @query-state-change=${() => this.requestUpdate()}\n >\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-filters-form class=\"filter\" autofocus without-search></ox-filters-form>\n </div>\n </div>\n\n <ox-grist-personalizer slot=\"setting\"></ox-grist-personalizer>\n </ox-grist>\n </div>\n `\n }\n\n /**\n * 트리에서 고른 부서가 목록의 부서 조건이다 — 조건은 하나고, 그것을 고르는 자리도 하나다.\n * The condition is the grid's hidden `departmentId` filter, so the address keeps it and a change reads page 1.\n */\n private onSelectDepartment(department?: Department) {\n const grist = this.grist\n if (!grist) return\n const next = [\n ...(grist.filters || []).filter(filter => filter.name !== 'departmentId'),\n ...(department ? [{ name: 'departmentId', operator: 'eq', value: department.id }] : [])\n ]\n grist.dispatchEvent(new CustomEvent('fetch-params-change', { bubbles: true, composed: true, detail: { filters: next, from: 'page' } }))\n this.requestUpdate()\n }\n\n /** One certificate of the one employee selected. */\n private async issueCertificate(kind: string) {\n const selected = this.grist.selected\n if (selected.length !== 1 || !selected[0].id) {\n notify({ level: 'warn', message: i18next.t('text.select-one-employee') })\n return\n }\n await issueDocument({ kind, refId: selected[0].id })\n }\n\n async pageInitialized(lifecycle: any) {\n hasPrivilege({ category: 'employee-certificate', privilege: 'mutation', domainOwnerGranted: true }).then(may => {\n this.issuesCertificates = may\n this.updateContext()\n })\n this.gristConfig = {\n pagination: { pages: [50, 100, 200] },\n list: {\n thumbnail: 'profile',\n fields: ['controlNo', 'name'],\n details: ['email', 'department', 'hiredOn', 'updatedAt']\n },\n columns: [\n /* A row's state (new, changed); a new row's mark removes it until it is saved (data-grist 행 제거). */\n { type: 'gutter', gutterName: 'dirty' },\n { type: 'gutter', gutterName: 'sequence', fixed: true },\n { type: 'gutter', gutterName: 'row-selector', multiple: true, fixed: true },\n /* Only 사번 and 이름 stay in view: data-grist fixes every column before the last fixed one, so they come right after the gutters. */\n {\n type: 'string',\n name: 'controlNo',\n fixed: true,\n header: i18next.t('field.control-no'),\n record: { editable: true, mandatory: true },\n filter: 'search',\n sortable: true,\n width: 105\n },\n {\n type: 'string',\n name: 'name',\n fixed: true,\n header: i18next.t('field.name'),\n record: { editable: true, mandatory: true },\n filter: 'search',\n sortable: true,\n width: 100\n },\n {\n type: 'gutter',\n gutterName: 'button',\n header: i18next.t('field.register-account'),\n icon: record => (record.id && !record.user ? 'badge' : ''),\n iconOnly: false,\n title: record => (record.id && !record.user ? i18next.t('button.register-account') : ''),\n width: 80,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n if (!record || !record.id || record.user) {\n return\n }\n\n this.attachSystemUser(record)\n }\n }\n },\n {\n type: 'image',\n name: 'profile',\n header: i18next.t('button.edit-contact'),\n width: 80,\n record: {\n align: 'center',\n renderer: function (value, column, record, rowIndex, field) {\n return html`<ox-pfp-view .profile=${record.profile} .name=${record.name || '+'}></ox-pfp-view>`\n }\n },\n handlers: {\n click: async (columns, data, column, record, rowIndex) => {\n if (record && record.contact) {\n this.openContactPopup(record)\n } else {\n this.openContactSelector(record)\n }\n }\n }\n },\n {\n type: 'string',\n name: 'alias',\n header: i18next.t('label.alias'),\n record: { editable: true },\n filter: 'search',\n sortable: false,\n width: 110\n },\n {\n type: 'resource-object',\n name: 'user',\n header: i18next.t('field.system-user'),\n record: {\n editable: true,\n options: {\n title: i18next.t('title.lookup system-user'),\n queryName: 'users',\n basicArgs: { filters: [{ name: 'userType', operator: 'eq', value: 'user' }] },\n descriptionField: 'email',\n columns: [\n { name: 'id', hidden: true },\n { name: 'name', header: i18next.t('field.name'), filter: 'search' },\n { name: 'email', header: i18next.t('field.email'), filter: 'search' }\n ],\n list: { fields: ['name', 'email'] }\n }\n },\n sortable: false,\n filter: 'search',\n width: 100\n },\n {\n type: 'code',\n name: 'type',\n header: i18next.t('field.type', { defaultValue: 'type' }),\n width: 115,\n sortable: true,\n filter: true,\n record: { editable: true, codeName: 'EMPLOYEE_TYPE', selectDispOpt: 'name' }\n },\n {\n type: 'department-object',\n name: 'department',\n header: i18next.t('field.department'),\n record: { editable: true },\n sortable: false,\n /* The rail narrows by department; a second department field here would be the same condition twice. */\n filter: false,\n width: 130\n },\n {\n type: 'resource-object',\n name: 'supervisor',\n header: i18next.t('field.supervisor'),\n record: {\n editable: true,\n options: {\n title: i18next.t('title.employee list'),\n queryName: 'employees',\n pagination: { pages: [50, 100, 200] },\n basicArgs: { filters: [{ name: 'active', operator: 'eq', value: true }] },\n list: { fields: ['controlNo', 'name', 'alias', 'hiredOn'] },\n columns: [\n { name: 'id', hidden: true },\n {\n name: 'controlNo',\n width: 120,\n header: { renderer: () => i18next.t('field.control-no') },\n filter: 'search',\n sortable: true\n },\n {\n name: 'name',\n width: 120,\n header: { renderer: () => i18next.t('field.name') },\n filter: 'search',\n sortable: true\n },\n {\n name: 'alias',\n width: 150,\n header: { renderer: () => i18next.t('label.alias') },\n filter: 'search',\n sortable: true\n },\n {\n type: 'code',\n name: 'type',\n width: 110,\n header: { renderer: () => i18next.t('label.type', { defaultValue: 'type' }) },\n record: { editable: false, codeName: 'EMPLOYEE_TYPE', selectDispOpt: 'name' }\n },\n {\n type: 'code',\n name: 'jobPosition',\n width: 110,\n header: { renderer: () => i18next.t('label.job-position') },\n record: { editable: false, codeName: 'JOB_POSITION', selectDispOpt: 'name' }\n },\n {\n type: 'code',\n name: 'jobResponsibility',\n width: 200,\n header: { renderer: () => i18next.t('label.job-responsibility') },\n record: { editable: false, codeName: 'JOB_RESPONSIBILITY', selectDispOpt: 'name' }\n },\n { type: 'date', name: 'hiredOn', header: { renderer: () => i18next.t('field.hired-on') }, width: 120 }\n ],\n valueField: 'id',\n nameField: 'name',\n descriptionField: 'controlNo'\n }\n },\n sortable: false,\n width: 120\n },\n {\n type: 'string',\n name: 'email',\n header: i18next.t('field.email'),\n width: 200,\n record: {\n editable: false,\n renderer: function (value, column, record, rowIndex, field) {\n return record.contact ? record.contact.email : ''\n }\n },\n sortable: false\n },\n {\n type: 'string',\n name: 'phone',\n header: i18next.t('field.phone'),\n width: 130,\n record: {\n editable: false,\n renderer: function (value, column, record, rowIndex, field) {\n return record.contact ? record.contact.phone : ''\n }\n },\n sortable: false\n },\n {\n type: 'code',\n name: 'jobResponsibility',\n header: i18next.t('label.job-responsibility'),\n width: 175,\n record: { editable: true, codeName: 'JOB_RESPONSIBILITY', selectDispOpt: 'name' },\n filter: true\n },\n {\n type: 'code',\n name: 'jobPosition',\n header: i18next.t('label.job-position'),\n width: 100,\n record: { editable: true, codeName: 'JOB_POSITION', selectDispOpt: 'name' },\n filter: true\n },\n {\n type: 'date',\n name: 'hiredOn',\n header: i18next.t('field.hired-on'),\n width: 120,\n record: { editable: true },\n sortable: true\n },\n {\n type: 'date',\n name: 'retiredOn',\n header: i18next.t('label.retired-at'),\n width: 120,\n record: { editable: true }\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n width: 70,\n record: { align: 'center', editable: true },\n filter: true,\n sortable: false\n },\n {\n type: 'string',\n name: 'note',\n header: i18next.t('field.note'),\n width: 200,\n record: { editable: true },\n filter: 'search'\n },\n { type: 'resource-object', name: 'updater', header: i18next.t('field.updater'), width: 90, sortable: false },\n { type: 'datetime', name: 'updatedAt', header: i18next.t('field.updated_at'), width: 180, sortable: true },\n { type: 'resource-object', name: 'contact', hidden: true },\n /* The rail's department: a filter of the grid, not drawn in the form - the rail is where it is chosen. */\n { type: 'string', name: 'departmentId', header: i18next.t('field.department'), hidden: true, record: { editable: false }, filter: { operator: 'eq', type: 'string', hidden: true } }\n ],\n /*\n * No empty row under the records: 「행 추가」 starts one, and a paste past the last row adds rows with the same draft -\n * in the department picked on the rail, if one is.\n */\n rows: { appendable: false, pasteAppendable: true, newRecord: () => this.draft(), selectable: { multiple: true } },\n columnsVersion: COLUMNS_VERSION,\n sorters: [{ name: 'controlNo' }]\n }\n }\n\n /** A new employee starts in the department picked on the rail. */\n private draft() {\n const department = this.selectedDepartment\n return department ? { department: { id: department.id, controlNo: department.controlNo, name: department.name, description: department.description } } : {}\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n /* The rail's selection arrives as the grid's own `departmentId` filter; nothing else sets one. */\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: employees(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n controlNo\n name\n alias\n type\n jobResponsibility\n jobPosition\n active\n email\n phone\n user {\n id\n name\n }\n department {\n id\n __typename\n controlNo\n name\n description\n }\n supervisor {\n id\n name\n controlNo\n }\n note\n hiredOn\n retiredOn\n contact {\n id\n email\n phone\n address\n }\n profile {\n left\n top\n zoom\n picture\n }\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: { filters, pagination: { page, limit }, sortings }\n })\n\n const records = response.data.responses.items\n\n return { total: response.data.responses.total || 0, records }\n }\n\n async onDeleteEmployee() {\n const ids = (this.grist?.selected ?? []).map(record => record.id).filter(Boolean)\n if (!ids.length) {\n notify({ level: 'info', message: i18next.t('text.select-rows-to-delete') })\n return\n }\n if (!(await OxPrompt.confirmDelete({ count: ids.length }))) {\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteEmployees(ids: $ids)\n }\n `,\n variables: { ids }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: i18next.t('text.deleted') })\n }\n }\n\n async onUpdateEmployee() {\n const dirty = this.grist.dirtyRecords\n if (!dirty?.length) {\n notify({ level: 'info', message: i18next.t('text.nothing-to-save') })\n return\n }\n\n const patches = dirty.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [EmployeePatch!]!) {\n updateMultipleEmployee(patches: $patches) {\n name\n }\n }\n `,\n variables: { patches }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n\n async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set([\n 'id',\n 'controlNo',\n 'name',\n 'alias',\n 'type',\n 'hiredOn',\n 'retiredOn',\n 'active',\n 'note'\n ])\n\n return exportTargets.map(employee => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = employee[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) {\n const popup = openPopup(\n html`\n <employee-importer\n .employees=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></employee-importer>\n `,\n { backdrop: true, size: 'large', title: i18next.t('title.import employee') }\n )\n\n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n\n async openContactPopup(record: GristRecord) {\n if (!record.contact?.id) {\n return\n }\n\n const popup = openPopup(\n html`\n <contact-popup\n .contactId=${record.contact.id}\n @change=${() => {\n this.grist.fetch()\n }}\n @detach=${() => {\n this.detachContact(record)\n }}\n detachable\n ></contact-popup>\n `,\n { backdrop: true, size: 'large', title: i18next.t('title.contact') }\n )\n }\n\n async openContactSelector(record: GristRecord) {\n const popup = openPopup(\n html`\n <contact-selector .confirmCallback=${selected => this.attachContact(record, selected)}></contact-selector>\n `,\n { backdrop: true, size: 'large', title: i18next.t('title.contact') }\n )\n }\n\n async attachContact(record: GristRecord, contact: Contact) {\n if (record.id) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!, $contactId: String!) {\n attachContact(id: $id, contactId: $contactId) {\n id\n }\n }\n `,\n variables: { id: record.id, contactId: contact.id }\n })\n\n this.grist.fetch()\n } else if (contact?.id) {\n const picked = {\n id: contact.id,\n name: contact.name,\n email: (contact as any).email,\n phone: (contact as any).phone,\n address: (contact as any).address\n }\n /* A row started with 「행 추가」 takes the contact; otherwise the contact starts a new row. */\n if (record?.__dirty__ === '+') {\n record.contact = picked\n record.name = record.name || contact.name\n } else {\n this.grist.addNewRecord({ name: contact.name, contact: picked })\n }\n this.grist.refresh()\n await this.grist.requestUpdate()\n\n this.grist.checkDirties()\n }\n }\n\n async detachContact(record) {\n if (record.id) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!) {\n detachContact(id: $id) {\n id\n }\n }\n `,\n variables: { id: record.id }\n })\n\n this.grist.fetch()\n } else {\n record.contact = null\n this.grist.refresh()\n }\n }\n\n async attachSystemUser(record) {\n if (!record.user) {\n await client.mutate({\n mutation: gql`\n mutation ($employeeId: String!) {\n registerEmployeeAsSystemUser(employeeId: $employeeId)\n }\n `,\n variables: { employeeId: record.id }\n })\n }\n\n this.grist.fetch()\n }\n}\n"]}
1
+ {"version":3,"file":"employee-list-page.js","sourceRoot":"","sources":["../../../client/pages/employee/employee-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,C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AE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE;aAC7B,CAAC,CAAA;YAEF,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QACpB,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,OAAO,GAAG,IAAI,CAAA;YACrB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAA;QACtB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,MAAM;QAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,MAAM,CAAC,MAAM,CAAC;gBAClB,QAAQ,EAAE,GAAG,CAAA;;;;SAIZ;gBACD,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,EAAE;aACrC,CAAC,CAAA;QACJ,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;IACpB,CAAC;;AA1wB2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CAAoE;AAEpE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;IAE5C,+HAA+H;;+CAFnF;AAG3B;IAAhB,KAAK,EAAE;;oDAA2B;AAElB;IAAhB,KAAK,EAAE;;4DAAmC;AAhIhC,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CAm4B5B","sourcesContent":["import '@operato/data-grist'\nimport '@operato/data-tree'\nimport '@operato/list-state/ox-empty-note.js'\nimport '@operato/list-state/ox-page-state.js'\nimport '@things-factory/contact/dist-client'\nimport '@things-factory/ai-assistant/dist-client/index.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { OxPrompt } from '@operato/popup'\nimport { Contact } from '@operato/contact/ox-contact.js'\nimport { DataGrist, FetchOption, GristRecord } from '@operato/data-grist'\nimport { client, QueryController } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { PageView } from '@operato/shell'\nimport { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles'\nimport { isMobileDevice } from '@operato/utils'\nimport { p13n } from '@operato/p13n'\n\nimport { hasPrivilege } from '@things-factory/auth-base/dist-client'\nimport { issueDocument } from '@things-factory/pdf/dist-client'\n\nimport { Department } from '../../types/department'\nimport { EmployeeImporter } from './employee-importer'\n\n/** The column layout 사번 · 이름 lead and stay fixed on - a person's older column order gives way to it. */\nconst COLUMNS_VERSION = 'lead-2026-11-08'\n\n@customElement('employee-list-page')\nexport class EmployeeListPage extends p13n(localize(i18next)(ScopedElementsMixin(PageView))) {\n static styles = [\n /* The work surface frame for a list screen (ADR-0060 decision 8). */\n WorkSurfacePageStyles,\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host {\n --ox-pfp-size: 40px;\n --data-card-thumbnail-height: 56px;\n --data-card-thumbnail-padding: 8px;\n --grid-record-emphasized-background-color: #8b0000;\n --grid-record-emphasized-color: #ff6b6b;\n }\n\n .header {\n grid-template-areas: 'filters';\n }\n\n /*\n * The rail is how you narrow the list to one department; the list is the content\n * (ADR-0060 decision 8, and the ruling of 2026-09-18 that folded the by-department screen\n * into this one). It folds away, because a screen looking at everyone does not need it.\n */\n [body] {\n flex: 1;\n display: flex;\n flex-direction: row;\n min-height: 0;\n }\n\n [rail] {\n display: flex;\n flex-direction: column;\n width: 240px;\n min-width: 240px;\n border-right: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));\n overflow: auto;\n }\n\n [rail][folded] {\n display: none;\n }\n\n [rail-head] {\n display: flex;\n align-items: center;\n gap: var(--spacing-small, 4px);\n padding: var(--spacing-medium, 8px) var(--spacing-medium, 8px) 0;\n font: var(--label-font, inherit);\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n }\n\n /* The word keeps its line. Sharing the row with a filler let it shrink and break in half. */\n [rail-head] > span {\n flex: 0 0 auto;\n white-space: nowrap;\n }\n\n [rail-head] button,\n /*\n * Going back to everyone. Picking a department narrows the list, and without this there is no\n * way out of that except reloading the screen.\n */\n button[all-departments] {\n width: calc(100% - 16px);\n margin: 4px 8px;\n padding: 6px 10px;\n text-align: left;\n border: 1px solid transparent;\n border-radius: var(--md-sys-shape-corner-small, 6px);\n background: transparent;\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n font: inherit;\n cursor: pointer;\n }\n\n button[all-departments][selected] {\n background: var(--md-sys-color-secondary-container);\n color: var(--md-sys-color-on-secondary-container);\n }\n\n [rail-toggle] {\n display: flex;\n align-items: center;\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n padding: 2px;\n }\n\n [rail-toggle] {\n align-self: flex-start;\n margin: var(--spacing-medium, 8px) 0 0 var(--spacing-small, 4px);\n }\n\n ox-tree {\n flex: 1;\n overflow: auto;\n }\n\n ox-grist {\n flex: 1;\n min-width: 0;\n }\n\n @media screen and (max-width: 780px) {\n [rail] {\n display: none;\n }\n }\n `\n ]\n\n static get scopedElements() {\n return { 'employee-importer': EmployeeImporter }\n }\n\n @property({ type: Object }) gristConfig: any\n @property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n\n /** Whether the rail is showing. The department chosen on it is the grid's own filter (`departmentId`), kept in the address. */\n @state() private railFolded = false\n /** Whether this person issues employees' certificates. */\n @state() private issuesCertificates = false\n\n /**\n * The departments the rail draws (ADR-0190). departmentRoots answers with a list, and the tree draws from\n * the first root - a fragment spread straight onto the list is refused by the server.\n */\n private departmentsRead = new QueryController(\n this,\n gql`\n query {\n responses: departmentRoots {\n items {\n ...EmployeeDepartmentFragment\n children {\n ...EmployeeDepartmentFragment\n children {\n ...EmployeeDepartmentFragment\n children {\n ...EmployeeDepartmentFragment\n children {\n ...EmployeeDepartmentFragment\n }\n }\n }\n }\n }\n }\n }\n\n fragment EmployeeDepartmentFragment on Department {\n id\n controlNo\n name\n description\n active\n }\n `\n )\n\n /* Every root department, not just the first - the rail draws an array. */\n private get departments(): Department[] | undefined {\n return this.departmentsRead.data?.responses?.items\n }\n\n /** The department the list is narrowed to: the grid's `departmentId` filter, found in the rail's tree. */\n private get selectedDepartment(): Department | undefined {\n const id = (this.grist?.filters || []).find(filter => filter.name === 'departmentId')?.value\n if (!id) return undefined\n const find = (list: Department[] = []): Department | undefined => {\n for (const one of list) {\n if (one.id === id) return one\n const found = find((one as any).children)\n if (found) return found\n }\n return undefined\n }\n return find(this.departments)\n }\n\n get context() {\n return {\n title: i18next.t('title.employee list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist?.searchText || ''\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'organization/employee',\n actions: [\n /* The only way to start an employee inline - there is no empty row under the records. */\n { id: 'add-row', icon: 'add', title: i18next.t('button.add-row'), action: () => this.grist.addNewRecord() },\n { id: 'save', title: i18next.t('button.save'), action: this.onUpdateEmployee.bind(this), ...CommonButtonStyles.save }\n ],\n exportable: { name: i18next.t('title.employee list'), data: this.exportHandler.bind(this) },\n importable: { handler: this.importHandler.bind(this) }\n }\n }\n\n /**\n * What is done with the picked employees, on the selection bar over the list (FOOTER-BUTTON-REVIEW F06): certificates\n * of one employee - for whoever issues them (`employee-certificate`, ADR-0176 decision 5) - and deleting.\n */\n private get selectionActions() {\n return [\n ...(this.issuesCertificates\n ? [\n { id: 'employment-certificate', icon: 'workspace_premium', title: i18next.t('button.issue-employment-certificate'), single: true, action: () => this.issueCertificate('organization.employment-certificate') },\n { id: 'career-certificate', icon: 'history_edu', title: i18next.t('button.issue-career-certificate'), single: true, action: () => this.issueCertificate('organization.career-certificate') }\n ]\n : []),\n { id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: this.onDeleteEmployee.bind(this) }\n ]\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-assistant-selection-bar\n .gridOf=${() => this.grist}\n name=${i18next.t('title.employee list')}\n .assistant=${false}\n .actions=${this.selectionActions}\n ></ox-assistant-selection-bar>\n <div body class=\"page-fill\">\n ${\n this.railFolded\n ? html`<button\n rail-toggle\n title=${i18next.t('title.department list')}\n @click=${() => (this.railFolded = false)}\n >\n <md-icon>account_tree</md-icon>\n </button>`\n : html`<aside rail>\n <div rail-head>\n <span>${i18next.t('title.department list')}</span>\n <div filler style=\"flex: 1\"></div>\n <button title=${i18next.t('label.fold')} @click=${() => (this.railFolded = true)}>\n <md-icon>chevron_left</md-icon>\n </button>\n </div>\n <ox-page-state\n .loading=${this.departmentsRead.loading}\n .error=${this.departmentsRead.error ?? null}\n @retry=${() => this.departmentsRead.refetch()}\n >\n ${\n this.departments?.length\n ? html`<button\n all-departments\n ?selected=${!this.selectedDepartment}\n @click=${() => this.onSelectDepartment(undefined)}\n >\n ${i18next.t('text.all departments')}\n </button>\n <ox-tree\n .data=${this.departments}\n .selected=${this.selectedDepartment}\n @select=${(e: CustomEvent) => this.onSelectDepartment(e.detail as Department)}\n id-property=\"controlNo\"\n label-property=\"name\"\n ></ox-tree>`\n : html`<ox-empty-note\n icon=\"account_tree\"\n title=${i18next.t('text.no departments yet')}\n description=${i18next.t('text.departments are made on the department screen')}\n ></ox-empty-note>`\n }\n </ox-page-state>\n </aside>`\n }\n\n <ox-grist\n .mode=${mode}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}\n ?url-params-sensitive=${this.active}\n @query-state-change=${() => this.requestUpdate()}\n >\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-filters-form class=\"filter\" autofocus without-search></ox-filters-form>\n </div>\n </div>\n\n <ox-grist-personalizer slot=\"setting\"></ox-grist-personalizer>\n </ox-grist>\n </div>\n `\n }\n\n /**\n * 트리에서 고른 부서가 목록의 부서 조건이다 — 조건은 하나고, 그것을 고르는 자리도 하나다.\n * The condition is the grid's hidden `departmentId` filter, so the address keeps it and a change reads page 1.\n */\n private onSelectDepartment(department?: Department) {\n const grist = this.grist\n if (!grist) return\n const next = [\n ...(grist.filters || []).filter(filter => filter.name !== 'departmentId'),\n ...(department ? [{ name: 'departmentId', operator: 'eq', value: department.id }] : [])\n ]\n grist.dispatchEvent(new CustomEvent('fetch-params-change', { bubbles: true, composed: true, detail: { filters: next, from: 'page' } }))\n this.requestUpdate()\n }\n\n /** One certificate of the one employee selected. */\n private async issueCertificate(kind: string) {\n const selected = this.grist.selected\n if (selected.length !== 1 || !selected[0].id) {\n notify({ level: 'warn', message: i18next.t('text.select-one-employee') })\n return\n }\n await issueDocument({ kind, refId: selected[0].id })\n }\n\n async pageInitialized(lifecycle: any) {\n hasPrivilege({ category: 'employee-certificate', privilege: 'mutation', domainOwnerGranted: true }).then(may => {\n this.issuesCertificates = may\n this.updateContext()\n })\n this.gristConfig = {\n pagination: { pages: [50, 100, 200] },\n list: {\n thumbnail: 'profile',\n fields: ['controlNo', 'name'],\n details: ['email', 'department', 'hiredOn', 'updatedAt']\n },\n columns: [\n /* A row's state (new, changed); a new row's mark removes it until it is saved (data-grist 행 제거). */\n { type: 'gutter', gutterName: 'dirty' },\n { type: 'gutter', gutterName: 'sequence', fixed: true },\n { type: 'gutter', gutterName: 'row-selector', multiple: true, fixed: true },\n /* Only 사번 and 이름 stay in view: data-grist fixes every column before the last fixed one, so they come right after the gutters. */\n {\n type: 'string',\n name: 'controlNo',\n fixed: true,\n header: i18next.t('field.control-no'),\n record: { editable: true, mandatory: true },\n filter: 'search',\n sortable: true,\n width: 105\n },\n {\n type: 'string',\n name: 'name',\n fixed: true,\n header: i18next.t('field.name'),\n record: { editable: true, mandatory: true },\n filter: 'search',\n sortable: true,\n width: 100\n },\n {\n type: 'gutter',\n gutterName: 'button',\n header: i18next.t('field.register-account'),\n icon: record => (record.id && !record.user ? 'badge' : ''),\n iconOnly: false,\n title: record => (record.id && !record.user ? i18next.t('button.register-account') : ''),\n width: 80,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n if (!record || !record.id || record.user) {\n return\n }\n\n this.attachSystemUser(record)\n }\n }\n },\n {\n type: 'image',\n name: 'profile',\n header: i18next.t('button.edit-contact'),\n width: 80,\n record: {\n align: 'center',\n renderer: function (value, column, record, rowIndex, field) {\n const thumbnail = field?.hasAttribute('thumbnail')\n return html`<ox-pfp-view style=${`--ox-pfp-size: ${thumbnail ? 40 : 24}px; --ox-pfp-monogram-font-size: ${thumbnail ? 20 : 12}px; vertical-align: middle`} .profile=${record.profile} .name=${record.name || '+'}></ox-pfp-view>`\n }\n },\n handlers: {\n click: async (columns, data, column, record, rowIndex) => {\n if (record && record.contact) {\n this.openContactPopup(record)\n } else {\n this.openContactSelector(record)\n }\n }\n }\n },\n {\n type: 'string',\n name: 'alias',\n header: i18next.t('label.alias'),\n record: { editable: true },\n filter: 'search',\n sortable: false,\n width: 110\n },\n {\n type: 'resource-object',\n name: 'user',\n header: i18next.t('field.system-user'),\n record: {\n editable: true,\n options: {\n title: i18next.t('title.lookup system-user'),\n queryName: 'users',\n basicArgs: { filters: [{ name: 'userType', operator: 'eq', value: 'user' }] },\n descriptionField: 'email',\n columns: [\n { name: 'id', hidden: true },\n { name: 'name', header: i18next.t('field.name'), filter: 'search' },\n { name: 'email', header: i18next.t('field.email'), filter: 'search' }\n ],\n list: { fields: ['name', 'email'] }\n }\n },\n sortable: false,\n filter: 'search',\n width: 100\n },\n {\n type: 'code',\n name: 'type',\n header: i18next.t('field.type', { defaultValue: 'type' }),\n width: 115,\n sortable: true,\n filter: true,\n record: { editable: true, codeName: 'EMPLOYEE_TYPE', selectDispOpt: 'name' }\n },\n {\n type: 'department-object',\n name: 'department',\n header: i18next.t('field.department'),\n record: { editable: true },\n sortable: false,\n /* The rail narrows by department; a second department field here would be the same condition twice. */\n filter: false,\n width: 130\n },\n {\n type: 'resource-object',\n name: 'supervisor',\n header: i18next.t('field.supervisor'),\n record: {\n editable: true,\n options: {\n title: i18next.t('title.employee list'),\n queryName: 'employees',\n pagination: { pages: [50, 100, 200] },\n basicArgs: { filters: [{ name: 'active', operator: 'eq', value: true }] },\n list: { fields: ['controlNo', 'name', 'alias', 'hiredOn'] },\n columns: [\n { name: 'id', hidden: true },\n {\n name: 'controlNo',\n width: 120,\n header: { renderer: () => i18next.t('field.control-no') },\n filter: 'search',\n sortable: true\n },\n {\n name: 'name',\n width: 120,\n header: { renderer: () => i18next.t('field.name') },\n filter: 'search',\n sortable: true\n },\n {\n name: 'alias',\n width: 150,\n header: { renderer: () => i18next.t('label.alias') },\n filter: 'search',\n sortable: true\n },\n {\n type: 'code',\n name: 'type',\n width: 110,\n header: { renderer: () => i18next.t('label.type', { defaultValue: 'type' }) },\n record: { editable: false, codeName: 'EMPLOYEE_TYPE', selectDispOpt: 'name' }\n },\n {\n type: 'code',\n name: 'jobPosition',\n width: 110,\n header: { renderer: () => i18next.t('label.job-position') },\n record: { editable: false, codeName: 'JOB_POSITION', selectDispOpt: 'name' }\n },\n {\n type: 'code',\n name: 'jobResponsibility',\n width: 200,\n header: { renderer: () => i18next.t('label.job-responsibility') },\n record: { editable: false, codeName: 'JOB_RESPONSIBILITY', selectDispOpt: 'name' }\n },\n { type: 'date', name: 'hiredOn', header: { renderer: () => i18next.t('field.hired-on') }, width: 120 }\n ],\n valueField: 'id',\n nameField: 'name',\n descriptionField: 'controlNo'\n }\n },\n sortable: false,\n width: 120\n },\n {\n type: 'string',\n name: 'email',\n header: i18next.t('field.email'),\n width: 200,\n record: {\n editable: false,\n renderer: function (value, column, record, rowIndex, field) {\n return record.contact ? record.contact.email : ''\n }\n },\n sortable: false\n },\n {\n type: 'string',\n name: 'phone',\n header: i18next.t('field.phone'),\n width: 130,\n record: {\n editable: false,\n renderer: function (value, column, record, rowIndex, field) {\n return record.contact ? record.contact.phone : ''\n }\n },\n sortable: false\n },\n {\n type: 'code',\n name: 'jobResponsibility',\n header: i18next.t('label.job-responsibility'),\n width: 175,\n record: { editable: true, codeName: 'JOB_RESPONSIBILITY', selectDispOpt: 'name' },\n filter: true\n },\n {\n type: 'code',\n name: 'jobPosition',\n header: i18next.t('label.job-position'),\n width: 100,\n record: { editable: true, codeName: 'JOB_POSITION', selectDispOpt: 'name' },\n filter: true\n },\n {\n type: 'date',\n name: 'hiredOn',\n header: i18next.t('field.hired-on'),\n width: 120,\n record: { editable: true },\n sortable: true\n },\n {\n type: 'date',\n name: 'retiredOn',\n header: i18next.t('label.retired-at'),\n width: 120,\n record: { editable: true }\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n width: 70,\n record: { align: 'center', editable: true },\n filter: true,\n sortable: false\n },\n {\n type: 'string',\n name: 'note',\n header: i18next.t('field.note'),\n width: 200,\n record: { editable: true },\n filter: 'search'\n },\n { type: 'resource-object', name: 'updater', header: i18next.t('field.updater'), width: 90, sortable: false },\n { type: 'datetime', name: 'updatedAt', header: i18next.t('field.updated_at'), width: 180, sortable: true },\n { type: 'resource-object', name: 'contact', hidden: true },\n /* The rail's department: a filter of the grid, not drawn in the form - the rail is where it is chosen. */\n { type: 'string', name: 'departmentId', header: i18next.t('field.department'), hidden: true, record: { editable: false }, filter: { operator: 'eq', type: 'string', hidden: true } }\n ],\n /*\n * No empty row under the records: 「행 추가」 starts one, and a paste past the last row adds rows with the same draft -\n * in the department picked on the rail, if one is.\n */\n rows: { appendable: false, pasteAppendable: true, newRecord: () => this.draft(), selectable: { multiple: true } },\n columnsVersion: COLUMNS_VERSION,\n sorters: [{ name: 'controlNo' }]\n }\n }\n\n /** A new employee starts in the department picked on the rail. */\n private draft() {\n const department = this.selectedDepartment\n return department ? { department: { id: department.id, controlNo: department.controlNo, name: department.name, description: department.description } } : {}\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n /* The rail's selection arrives as the grid's own `departmentId` filter; nothing else sets one. */\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: employees(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n controlNo\n name\n alias\n type\n jobResponsibility\n jobPosition\n active\n email\n phone\n user {\n id\n name\n }\n department {\n id\n __typename\n controlNo\n name\n description\n }\n supervisor {\n id\n name\n controlNo\n }\n note\n hiredOn\n retiredOn\n contact {\n id\n email\n phone\n address\n }\n profile {\n left\n top\n zoom\n picture\n }\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: { filters, pagination: { page, limit }, sortings }\n })\n\n const records = response.data.responses.items\n\n return { total: response.data.responses.total || 0, records }\n }\n\n async onDeleteEmployee() {\n const ids = (this.grist?.selected ?? []).map(record => record.id).filter(Boolean)\n if (!ids.length) {\n notify({ level: 'info', message: i18next.t('text.select-rows-to-delete') })\n return\n }\n if (!(await OxPrompt.confirmDelete({ count: ids.length }))) {\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteEmployees(ids: $ids)\n }\n `,\n variables: { ids }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: i18next.t('text.deleted') })\n }\n }\n\n async onUpdateEmployee() {\n const dirty = this.grist.dirtyRecords\n if (!dirty?.length) {\n notify({ level: 'info', message: i18next.t('text.nothing-to-save') })\n return\n }\n\n const patches = dirty.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [EmployeePatch!]!) {\n updateMultipleEmployee(patches: $patches) {\n name\n }\n }\n `,\n variables: { patches }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n\n async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set([\n 'id',\n 'controlNo',\n 'name',\n 'alias',\n 'type',\n 'hiredOn',\n 'retiredOn',\n 'active',\n 'note'\n ])\n\n return exportTargets.map(employee => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = employee[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) {\n const popup = openPopup(\n html`\n <employee-importer\n .employees=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></employee-importer>\n `,\n { backdrop: true, size: 'large', title: i18next.t('title.import employee') }\n )\n\n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n\n async openContactPopup(record: GristRecord) {\n if (!record.contact?.id) {\n return\n }\n\n const popup = openPopup(\n html`\n <contact-popup\n .contactId=${record.contact.id}\n @change=${() => {\n this.grist.fetch()\n }}\n @detach=${() => {\n this.detachContact(record)\n }}\n detachable\n ></contact-popup>\n `,\n { backdrop: true, size: 'large', title: i18next.t('title.contact') }\n )\n }\n\n async openContactSelector(record: GristRecord) {\n const popup = openPopup(\n html`\n <contact-selector .confirmCallback=${selected => this.attachContact(record, selected)}></contact-selector>\n `,\n { backdrop: true, size: 'large', title: i18next.t('title.contact') }\n )\n }\n\n async attachContact(record: GristRecord, contact: Contact) {\n if (record.id) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!, $contactId: String!) {\n attachContact(id: $id, contactId: $contactId) {\n id\n }\n }\n `,\n variables: { id: record.id, contactId: contact.id }\n })\n\n this.grist.fetch()\n } else if (contact?.id) {\n const picked = {\n id: contact.id,\n name: contact.name,\n email: (contact as any).email,\n phone: (contact as any).phone,\n address: (contact as any).address\n }\n /* A row started with 「행 추가」 takes the contact; otherwise the contact starts a new row. */\n if (record?.__dirty__ === '+') {\n record.contact = picked\n record.name = record.name || contact.name\n } else {\n this.grist.addNewRecord({ name: contact.name, contact: picked })\n }\n this.grist.refresh()\n await this.grist.requestUpdate()\n\n this.grist.checkDirties()\n }\n }\n\n async detachContact(record) {\n if (record.id) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!) {\n detachContact(id: $id) {\n id\n }\n }\n `,\n variables: { id: record.id }\n })\n\n this.grist.fetch()\n } else {\n record.contact = null\n this.grist.refresh()\n }\n }\n\n async attachSystemUser(record) {\n if (!record.user) {\n await client.mutate({\n mutation: gql`\n mutation ($employeeId: String!) {\n registerEmployeeAsSystemUser(employeeId: $employeeId)\n }\n `,\n variables: { employeeId: record.id }\n })\n }\n\n this.grist.fetch()\n }\n}\n"]}
@@ -225,14 +225,19 @@ let MyEmployeeProfilePage = class MyEmployeeProfilePage extends localize(i18next
225
225
  display: inline-flex;
226
226
  align-items: center;
227
227
  gap: 2px;
228
- height: 26px;
229
- padding: 0 4px 0 10px;
228
+ min-height: 26px;
229
+ max-width: 100%;
230
+ box-sizing: border-box;
231
+ overflow-wrap: anywhere;
232
+ line-height: 1.5;
233
+ padding: 3px 4px 3px 10px;
230
234
  border-radius: 13px;
231
235
  background: var(--md-sys-color-secondary-container);
232
236
  color: var(--md-sys-color-on-secondary-container);
233
237
  font-size: var(--ui-t-body, 13px);
234
238
  }
235
239
  .chip button {
240
+ flex: 0 0 20px;
236
241
  height: 20px;
237
242
  width: 20px;
238
243
  padding: 0;