@things-factory/organization 10.1.223 → 10.1.227

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist-client/pages/employee-profile/employee-profile-files.d.ts +23 -0
  2. package/dist-client/pages/employee-profile/employee-profile-files.js +50 -0
  3. package/dist-client/pages/employee-profile/employee-profile-files.js.map +1 -0
  4. package/dist-client/pages/employee-profile/employee-profile-form.d.ts +63 -0
  5. package/dist-client/pages/employee-profile/employee-profile-form.js +132 -0
  6. package/dist-client/pages/employee-profile/employee-profile-form.js.map +1 -0
  7. package/dist-client/pages/employee-profile/employee-profile-list-page.d.ts +52 -0
  8. package/dist-client/pages/employee-profile/employee-profile-list-page.js +206 -0
  9. package/dist-client/pages/employee-profile/employee-profile-list-page.js.map +1 -0
  10. package/dist-client/pages/employee-profile/employee-profile-preview.d.ts +28 -0
  11. package/dist-client/pages/employee-profile/employee-profile-preview.js +179 -0
  12. package/dist-client/pages/employee-profile/employee-profile-preview.js.map +1 -0
  13. package/dist-client/pages/employee-profile/my-employee-profile-page.d.ts +56 -0
  14. package/dist-client/pages/employee-profile/my-employee-profile-page.js +656 -0
  15. package/dist-client/pages/employee-profile/my-employee-profile-page.js.map +1 -0
  16. package/dist-client/route.d.ts +1 -1
  17. package/dist-client/route.js +7 -0
  18. package/dist-client/route.js.map +1 -1
  19. package/dist-client/tsconfig.tsbuildinfo +1 -1
  20. package/dist-server/ai-entry/employee-profile-entry.d.ts +10 -0
  21. package/dist-server/ai-entry/employee-profile-entry.js +88 -0
  22. package/dist-server/ai-entry/employee-profile-entry.js.map +1 -0
  23. package/dist-server/ai-entry/entry-target-shape.d.ts +11 -1
  24. package/dist-server/ai-entry/entry-target-shape.js.map +1 -1
  25. package/dist-server/ai-entry/organization-entry-targets.d.ts +8 -0
  26. package/dist-server/ai-entry/organization-entry-targets.js +26 -1
  27. package/dist-server/ai-entry/organization-entry-targets.js.map +1 -1
  28. package/dist-server/role-tasks.js +4 -1
  29. package/dist-server/role-tasks.js.map +1 -1
  30. package/dist-server/service/employee-profile/employee-profile-document.d.ts +122 -0
  31. package/dist-server/service/employee-profile/employee-profile-document.js +439 -0
  32. package/dist-server/service/employee-profile/employee-profile-document.js.map +1 -0
  33. package/dist-server/service/employee-profile/employee-profile-mutation.d.ts +6 -0
  34. package/dist-server/service/employee-profile/employee-profile-mutation.js +74 -0
  35. package/dist-server/service/employee-profile/employee-profile-mutation.js.map +1 -0
  36. package/dist-server/service/employee-profile/employee-profile-query.d.ts +14 -0
  37. package/dist-server/service/employee-profile/employee-profile-query.js +137 -0
  38. package/dist-server/service/employee-profile/employee-profile-query.js.map +1 -0
  39. package/dist-server/service/employee-profile/employee-profile-rows.d.ts +29 -0
  40. package/dist-server/service/employee-profile/employee-profile-rows.js +122 -0
  41. package/dist-server/service/employee-profile/employee-profile-rows.js.map +1 -0
  42. package/dist-server/service/employee-profile/employee-profile-rules.d.ts +61 -0
  43. package/dist-server/service/employee-profile/employee-profile-rules.js +104 -0
  44. package/dist-server/service/employee-profile/employee-profile-rules.js.map +1 -0
  45. package/dist-server/service/employee-profile/employee-profile-type.d.ts +35 -0
  46. package/dist-server/service/employee-profile/employee-profile-type.js +110 -0
  47. package/dist-server/service/employee-profile/employee-profile-type.js.map +1 -0
  48. package/dist-server/service/employee-profile/employee-profile.d.ts +24 -0
  49. package/dist-server/service/employee-profile/employee-profile.js +112 -0
  50. package/dist-server/service/employee-profile/employee-profile.js.map +1 -0
  51. package/dist-server/service/employee-profile/index.d.ts +5 -0
  52. package/dist-server/service/employee-profile/index.js +9 -0
  53. package/dist-server/service/employee-profile/index.js.map +1 -0
  54. package/dist-server/service/index.d.ts +3 -2
  55. package/dist-server/service/index.js +6 -2
  56. package/dist-server/service/index.js.map +1 -1
  57. package/dist-server/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +8 -6
  59. package/tests/employee-profile-db.test.ts +247 -0
  60. package/tests/employee-profile-document.test.ts +219 -0
  61. package/tests/employee-profile-entry.test.ts +72 -0
  62. package/tests/employee-profile-rules.test.ts +103 -0
  63. package/things-factory.config.js +3 -0
  64. package/translations/en.json +78 -1
  65. package/translations/es.json +78 -1
  66. package/translations/ja.json +78 -1
  67. package/translations/ko.json +78 -1
  68. package/translations/ms.json +78 -1
  69. package/translations/zh.json +78 -1
@@ -0,0 +1,179 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
3
+ import '@operato/input/ox-select.js';
4
+ import '@operato/popup/ox-popup-list.js';
5
+ import { css, html, LitElement, nothing } from 'lit';
6
+ import { customElement, property, state } from 'lit/decorators.js';
7
+ import { i18next, localize } from '@operato/i18n';
8
+ import { notify, openPopup } from '@operato/layout';
9
+ import { ButtonStyles, ScrollbarStyles } from '@operato/styles';
10
+ import { profileFile, saveProfileFile, textOf } from './employee-profile-files';
11
+ /**
12
+ * The profiles as they will be handed in, before they are (ADR-0169 decision 9): the server's pages of A4 in a frame,
13
+ * the language of the document's own words to change, and the two downloads in the same language. Opened from the list
14
+ * for the people chosen and from one's own page for oneself.
15
+ */
16
+ let EmployeeProfilePreview = class EmployeeProfilePreview extends localize(i18next)(LitElement) {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.languages = [];
20
+ this.language = '';
21
+ this.page = '';
22
+ this.busy = false;
23
+ }
24
+ static { this.styles = [
25
+ ButtonStyles,
26
+ ScrollbarStyles,
27
+ css `
28
+ :host {
29
+ display: flex;
30
+ flex-direction: column;
31
+ height: 100%;
32
+ min-height: 0;
33
+ background: var(--ui-bg, var(--md-sys-color-surface));
34
+ }
35
+ .bar {
36
+ display: flex;
37
+ flex-wrap: wrap;
38
+ align-items: center;
39
+ gap: var(--spacing-medium, 8px);
40
+ padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);
41
+ border-bottom: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));
42
+ font-size: var(--ui-t-small, 11.5px);
43
+ color: var(--ui-muted, var(--md-sys-color-on-surface-variant));
44
+ }
45
+ .bar .spacer {
46
+ flex: 1;
47
+ }
48
+ ox-select {
49
+ min-width: 140px;
50
+ }
51
+ /* The frame grows to its pages and this box scrolls them - with the house scrollbar, not the frame's own. */
52
+ .frame {
53
+ position: relative;
54
+ flex: 1;
55
+ min-height: 0;
56
+ overflow: auto;
57
+ background: #e9edf1;
58
+ }
59
+ iframe {
60
+ display: block;
61
+ width: 100%;
62
+ border: 0;
63
+ overflow: hidden;
64
+ }
65
+ .loading {
66
+ position: absolute;
67
+ inset: 0;
68
+ display: grid;
69
+ place-items: center;
70
+ background: rgba(233, 237, 241, 0.6);
71
+ font-size: var(--ui-t-body, 13px);
72
+ }
73
+ `
74
+ ]; }
75
+ firstUpdated() {
76
+ this.show();
77
+ }
78
+ async show() {
79
+ this.busy = true;
80
+ try {
81
+ this.page = textOf(await profileFile(this.subject, 'HTML', this.language));
82
+ }
83
+ catch (error) {
84
+ notify({ level: 'error', message: error?.message ?? String(error) });
85
+ }
86
+ finally {
87
+ this.busy = false;
88
+ }
89
+ }
90
+ async download(format) {
91
+ this.busy = true;
92
+ try {
93
+ saveProfileFile(await profileFile(this.subject, format, this.language));
94
+ }
95
+ catch (error) {
96
+ notify({ level: 'error', message: error?.message ?? String(error) });
97
+ }
98
+ finally {
99
+ this.busy = false;
100
+ }
101
+ }
102
+ /** As tall as its pages - read from its document, which is ours (same origin, no script). */
103
+ fit(frame) {
104
+ const height = frame.contentDocument?.documentElement?.scrollHeight;
105
+ if (height)
106
+ frame.style.height = `${height}px`;
107
+ }
108
+ render() {
109
+ const shown = this.languages.find(one => one.code === this.language)?.display ?? this.language;
110
+ return html `
111
+ <div class="bar">
112
+ ${this.languages.length > 1
113
+ ? html `<span>${i18next.t('label.employee-profile-document-language')}</span>
114
+ <ox-select
115
+ .value=${this.language}
116
+ aria-label=${i18next.t('label.employee-profile-document-language')}
117
+ @change=${(e) => {
118
+ const next = String(e.detail || this.language);
119
+ if (next === this.language)
120
+ return;
121
+ this.language = next;
122
+ this.show();
123
+ }}
124
+ >
125
+ <span slot="label">${shown}</span>
126
+ <ox-popup-list align-left nowrap with-search>${this.languages.map(one => html `<div option value=${one.code}>${one.display}</div>`)}</ox-popup-list>
127
+ </ox-select>`
128
+ : nothing}
129
+ <span class="spacer"></span>
130
+ <button ?disabled=${this.busy} @click=${() => this.download('PDF')}><md-icon>picture_as_pdf</md-icon>${i18next.t('button.employee-profile-download-pdf')}</button>
131
+ <button raised ?disabled=${this.busy} @click=${() => this.download('XLSX')}><md-icon>download</md-icon>${i18next.t('button.employee-profile-download')}</button>
132
+ </div>
133
+ <div class="frame">
134
+ <!-- No script runs in the frame; an empty sandbox also kept the page from drawing in the app's browser. -->
135
+ <iframe
136
+ title=${i18next.t('title.employee-profile-preview')}
137
+ sandbox="allow-same-origin"
138
+ scrolling="no"
139
+ .srcdoc=${this.page}
140
+ @load=${(e) => this.fit(e.target)}
141
+ ></iframe>
142
+ ${this.busy ? html `<div class="loading">${i18next.t('text.loading')}</div>` : nothing}
143
+ </div>
144
+ `;
145
+ }
146
+ };
147
+ __decorate([
148
+ property({ attribute: false }),
149
+ __metadata("design:type", Object)
150
+ ], EmployeeProfilePreview.prototype, "subject", void 0);
151
+ __decorate([
152
+ property({ attribute: false }),
153
+ __metadata("design:type", Array)
154
+ ], EmployeeProfilePreview.prototype, "languages", void 0);
155
+ __decorate([
156
+ property(),
157
+ __metadata("design:type", Object)
158
+ ], EmployeeProfilePreview.prototype, "language", void 0);
159
+ __decorate([
160
+ state(),
161
+ __metadata("design:type", Object)
162
+ ], EmployeeProfilePreview.prototype, "page", void 0);
163
+ __decorate([
164
+ state(),
165
+ __metadata("design:type", Object)
166
+ ], EmployeeProfilePreview.prototype, "busy", void 0);
167
+ EmployeeProfilePreview = __decorate([
168
+ customElement('employee-profile-preview')
169
+ ], EmployeeProfilePreview);
170
+ export { EmployeeProfilePreview };
171
+ /** Open the preview of `subject`'s profiles in `language`. */
172
+ export function openProfilePreview(subject, languages, language) {
173
+ return openPopup(html `<employee-profile-preview .subject=${subject} .languages=${languages} .language=${language}></employee-profile-preview>`, {
174
+ backdrop: true,
175
+ size: 'large',
176
+ title: i18next.t('title.employee-profile-preview')
177
+ });
178
+ }
179
+ //# sourceMappingURL=employee-profile-preview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"employee-profile-preview.js","sourceRoot":"","sources":["../../../client/pages/employee-profile/employee-profile-preview.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,6BAA6B,CAAA;AACpC,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAE/D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAA0D,MAAM,0BAA0B,CAAA;AAEvI;;;;GAIG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAAlE;;QAsD2B,cAAS,GAAe,EAAE,CAAA;QAC9C,aAAQ,GAAG,EAAE,CAAA;QAER,SAAI,GAAG,EAAE,CAAA;QACT,SAAI,GAAG,KAAK,CAAA;IAuE/B,CAAC;aAhIQ,WAAM,GAAG;QACd,YAAY;QACZ,eAAe;QACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8CF;KACF,AAlDY,CAkDZ;IASD,YAAY;QACV,IAAI,CAAC,IAAI,EAAE,CAAA;IACb,CAAC;IAEO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AAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,wBAAwB,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO;;KAExF,CAAA;IACH,CAAC;;AA3E+B;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;uDAAyB;AACxB;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;;yDAA2B;AAC9C;IAAX,QAAQ,EAAE;;wDAAc;AAER;IAAhB,KAAK,EAAE;;oDAAkB;AACT;IAAhB,KAAK,EAAE;;oDAAqB;AA1DlB,sBAAsB;IADlC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,sBAAsB,CAiIlC;;AAED,8DAA8D;AAC9D,MAAM,UAAU,kBAAkB,CAAC,OAAuB,EAAE,SAAqB,EAAE,QAAgB;IACjG,OAAO,SAAS,CAAC,IAAI,CAAA,sCAAsC,OAAO,eAAe,SAAS,cAAc,QAAQ,8BAA8B,EAAE;QAC9I,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,gCAAgC,CAAC;KACnD,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-select.js'\nimport '@operato/popup/ox-popup-list.js'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { ButtonStyles, ScrollbarStyles } from '@operato/styles'\n\nimport { profileFile, saveProfileFile, textOf, type Language, type ProfileFormat, type ProfileSubject } from './employee-profile-files'\n\n/**\n * The profiles as they will be handed in, before they are (ADR-0169 decision 9): the server's pages of A4 in a frame,\n * the language of the document's own words to change, and the two downloads in the same language. Opened from the list\n * for the people chosen and from one's own page for oneself.\n */\n@customElement('employee-profile-preview')\nexport class EmployeeProfilePreview extends localize(i18next)(LitElement) {\n static styles = [\n ButtonStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n background: var(--ui-bg, var(--md-sys-color-surface));\n }\n .bar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-medium, 8px);\n padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);\n border-bottom: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n }\n .bar .spacer {\n flex: 1;\n }\n ox-select {\n min-width: 140px;\n }\n /* The frame grows to its pages and this box scrolls them - with the house scrollbar, not the frame's own. */\n .frame {\n position: relative;\n flex: 1;\n min-height: 0;\n overflow: auto;\n background: #e9edf1;\n }\n iframe {\n display: block;\n width: 100%;\n border: 0;\n overflow: hidden;\n }\n .loading {\n position: absolute;\n inset: 0;\n display: grid;\n place-items: center;\n background: rgba(233, 237, 241, 0.6);\n font-size: var(--ui-t-body, 13px);\n }\n `\n ]\n\n @property({ attribute: false }) subject!: ProfileSubject\n @property({ attribute: false }) languages: Language[] = []\n @property() language = ''\n\n @state() private page = ''\n @state() private busy = false\n\n firstUpdated() {\n this.show()\n }\n\n private async show() {\n this.busy = true\n try {\n this.page = textOf(await profileFile(this.subject, 'HTML', this.language))\n } catch (error: any) {\n notify({ level: 'error', message: error?.message ?? String(error) })\n } finally {\n this.busy = false\n }\n }\n\n private async download(format: ProfileFormat) {\n this.busy = true\n try {\n saveProfileFile(await profileFile(this.subject, format, this.language))\n } catch (error: any) {\n notify({ level: 'error', message: error?.message ?? String(error) })\n } finally {\n this.busy = false\n }\n }\n\n /** As tall as its pages - read from its document, which is ours (same origin, no script). */\n private fit(frame: HTMLIFrameElement) {\n const height = frame.contentDocument?.documentElement?.scrollHeight\n if (height) frame.style.height = `${height}px`\n }\n\n render() {\n const shown = this.languages.find(one => one.code === this.language)?.display ?? this.language\n return html`\n <div class=\"bar\">\n ${this.languages.length > 1\n ? html`<span>${i18next.t('label.employee-profile-document-language')}</span>\n <ox-select\n .value=${this.language}\n aria-label=${i18next.t('label.employee-profile-document-language')}\n @change=${(e: CustomEvent) => {\n const next = String(e.detail || this.language)\n if (next === this.language) return\n this.language = next\n this.show()\n }}\n >\n <span slot=\"label\">${shown}</span>\n <ox-popup-list align-left nowrap with-search>${this.languages.map(one => html`<div option value=${one.code}>${one.display}</div>`)}</ox-popup-list>\n </ox-select>`\n : nothing}\n <span class=\"spacer\"></span>\n <button ?disabled=${this.busy} @click=${() => this.download('PDF')}><md-icon>picture_as_pdf</md-icon>${i18next.t('button.employee-profile-download-pdf')}</button>\n <button raised ?disabled=${this.busy} @click=${() => this.download('XLSX')}><md-icon>download</md-icon>${i18next.t('button.employee-profile-download')}</button>\n </div>\n <div class=\"frame\">\n <!-- No script runs in the frame; an empty sandbox also kept the page from drawing in the app's browser. -->\n <iframe\n title=${i18next.t('title.employee-profile-preview')}\n sandbox=\"allow-same-origin\"\n scrolling=\"no\"\n .srcdoc=${this.page}\n @load=${(e: Event) => this.fit(e.target as HTMLIFrameElement)}\n ></iframe>\n ${this.busy ? html`<div class=\"loading\">${i18next.t('text.loading')}</div>` : nothing}\n </div>\n `\n }\n}\n\n/** Open the preview of `subject`'s profiles in `language`. */\nexport function openProfilePreview(subject: ProfileSubject, languages: Language[], language: string) {\n return openPopup(html`<employee-profile-preview .subject=${subject} .languages=${languages} .language=${language}></employee-profile-preview>`, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.employee-profile-preview')\n })\n}\n"]}
@@ -0,0 +1,56 @@
1
+ import '@material/web/icon/icon.js';
2
+ import '@operato/list-state/ox-empty-note.js';
3
+ import '@operato/list-state/ox-page-state.js';
4
+ import { PageView } from '@operato/shell';
5
+ import { type ProfileForm } from './employee-profile-form';
6
+ declare const MyEmployeeProfilePage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
7
+ /**
8
+ * 내 프로필 — the employee writes their own career profile: a summary, skills, and the rows of education,
9
+ * certificates, past jobs and projects; sales attaches it to quotations (ADR-0169 decisions 2 · 5). Saved whole.
10
+ *
11
+ * The page is built to be filled in: who it is about and how complete it is stand at the top, each missing essential a
12
+ * click away; each row is a card whose headline reads like the document's line; a section with nothing yet says what
13
+ * it is for; and the document itself is one click away (PDF), as sales will hand it in. An account not linked to an
14
+ * employee record has no profile to write, and is told so before anything is typed.
15
+ */
16
+ export declare class MyEmployeeProfilePage extends MyEmployeeProfilePage_base {
17
+ static styles: import("lit").CSSResult[];
18
+ form: ProfileForm;
19
+ /** Who the profile is about - the employee record's basics. */
20
+ me: any;
21
+ /** Whether the account is linked to an employee record - unknown until read. */
22
+ linked: boolean | null;
23
+ loading: boolean;
24
+ error: unknown;
25
+ busy: boolean;
26
+ updatedAt: string | null;
27
+ /** The form as last read or saved - what is written differs from it until saved. */
28
+ private saved;
29
+ private get dirty();
30
+ get context(): {
31
+ title: string;
32
+ frame: string;
33
+ actions: {
34
+ title: string;
35
+ icon: string;
36
+ emphasis: {
37
+ raised: boolean;
38
+ };
39
+ action: () => Promise<boolean>;
40
+ }[];
41
+ };
42
+ pageUpdated(changes: any): Promise<void>;
43
+ private load;
44
+ private hold;
45
+ private save;
46
+ /** The document as sales will hand it in - what is written is saved first, so the preview shows it. */
47
+ private preview;
48
+ private goTo;
49
+ render(): import("lit-html").TemplateResult<1>;
50
+ private renderHero;
51
+ private renderSummary;
52
+ private renderSkills;
53
+ private renderSection;
54
+ private renderEntry;
55
+ }
56
+ export {};