@things-factory/organization 10.1.303 → 10.1.314
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.
- package/dist-client/pages/approval-line/approval-line-list-page.js +1 -0
- package/dist-client/pages/approval-line/common-approval-line-templates-page.d.ts +3 -10
- package/dist-client/pages/approval-line/common-approval-line-templates-page.js +9 -6
- package/dist-client/pages/approval-line/my-approval-line-templates-page.d.ts +3 -10
- package/dist-client/pages/approval-line/my-approval-line-templates-page.js +9 -6
- package/dist-client/pages/department/department-list-page.d.ts +1 -0
- package/dist-client/pages/department/department-list-page.js +13 -6
- package/dist-client/pages/employee/employee-list-page.js +9 -7
- package/dist-client/pages/employee-profile/employee-profile-list-page.d.ts +6 -13
- package/dist-client/pages/employee-profile/employee-profile-list-page.js +20 -6
- package/dist-server/service/approval-line/approval-line-query.js +3 -3
- package/dist-server/service/department/department-query.js +3 -3
- package/dist-server/service/employee/employee-query.js +3 -3
- package/package.json +10 -10
|
@@ -499,6 +499,7 @@ let ApprovalLineListPage = class ApprovalLineListPage extends localize(i18next)(
|
|
|
499
499
|
async delete() {
|
|
500
500
|
const ids = (this.grist.selected || []).map((record) => record.id).filter(Boolean);
|
|
501
501
|
if (!ids.length) {
|
|
502
|
+
notify({ level: 'info', message: i18next.t('text.select-rows-to-delete') });
|
|
502
503
|
return;
|
|
503
504
|
}
|
|
504
505
|
if (!await OxPrompt.confirmDelete({ count: this.grist?.selected?.length })) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@operato/data-grist';
|
|
2
2
|
import '../../component/approval-line-items-editor-popup';
|
|
3
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
3
4
|
import { PageView } from '@operato/shell';
|
|
4
5
|
import { FetchOption } from '@operato/data-grist';
|
|
5
6
|
declare const CommonApprovalLineTemplatesPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
|
|
@@ -15,19 +16,11 @@ export declare class CommonApprovalLineTemplatesPage extends CommonApprovalLineT
|
|
|
15
16
|
value: string;
|
|
16
17
|
};
|
|
17
18
|
help: string;
|
|
18
|
-
actions:
|
|
19
|
+
actions: {
|
|
19
20
|
icon: string;
|
|
20
21
|
title: string;
|
|
21
22
|
action: () => Promise<void>;
|
|
22
|
-
|
|
23
|
-
} | {
|
|
24
|
-
icon: string;
|
|
25
|
-
title: string;
|
|
26
|
-
action: () => Promise<void>;
|
|
27
|
-
emphasis: {
|
|
28
|
-
danger: boolean;
|
|
29
|
-
};
|
|
30
|
-
})[];
|
|
23
|
+
}[];
|
|
31
24
|
};
|
|
32
25
|
render(): import("lit-html").TemplateResult<1>;
|
|
33
26
|
pageInitialized(lifecycle: any): Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import '@operato/data-grist';
|
|
3
3
|
import '../../component/approval-line-items-editor-popup';
|
|
4
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
4
5
|
import { OxPrompt } from '@operato/popup';
|
|
5
6
|
import { CommonHeaderStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles';
|
|
6
7
|
import { PageView } from '@operato/shell';
|
|
@@ -42,12 +43,6 @@ let CommonApprovalLineTemplatesPage = class CommonApprovalLineTemplatesPage exte
|
|
|
42
43
|
{ icon: 'save',
|
|
43
44
|
title: i18next.t('button.save'),
|
|
44
45
|
action: this.updateApprovalLines.bind(this)
|
|
45
|
-
},
|
|
46
|
-
{ icon: 'delete',
|
|
47
|
-
title: i18next.t('button.delete'),
|
|
48
|
-
action: this.deleteApprovalLines.bind(this),
|
|
49
|
-
emphasis: { danger: true
|
|
50
|
-
}
|
|
51
46
|
}
|
|
52
47
|
] };
|
|
53
48
|
}
|
|
@@ -55,6 +50,14 @@ let CommonApprovalLineTemplatesPage = class CommonApprovalLineTemplatesPage exte
|
|
|
55
50
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
|
|
56
51
|
return html `
|
|
57
52
|
<ox-grist class="page-fill" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
53
|
+
<!-- What is done to the picked rows: over the column heads while rows are picked (ADR-0225). -->
|
|
54
|
+
<ox-assistant-selection-bar
|
|
55
|
+
slot="selection"
|
|
56
|
+
.gridOf=${() => this.grist}
|
|
57
|
+
name=${i18next.t('title.common-approval-line template list')}
|
|
58
|
+
.assistant=${false}
|
|
59
|
+
.actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this.deleteApprovalLines() }]}
|
|
60
|
+
></ox-assistant-selection-bar>
|
|
58
61
|
</ox-grist>
|
|
59
62
|
`;
|
|
60
63
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@operato/data-grist';
|
|
2
2
|
import '../../component/approval-line-items-editor-popup';
|
|
3
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
3
4
|
import { PageView } from '@operato/shell';
|
|
4
5
|
import { FetchOption } from '@operato/data-grist';
|
|
5
6
|
declare const MyApprovalLineTemplatesPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
|
|
@@ -15,19 +16,11 @@ export declare class MyApprovalLineTemplatesPage extends MyApprovalLineTemplates
|
|
|
15
16
|
value: string;
|
|
16
17
|
};
|
|
17
18
|
help: string;
|
|
18
|
-
actions:
|
|
19
|
+
actions: {
|
|
19
20
|
icon: string;
|
|
20
21
|
title: string;
|
|
21
22
|
action: () => Promise<void>;
|
|
22
|
-
|
|
23
|
-
} | {
|
|
24
|
-
icon: string;
|
|
25
|
-
title: string;
|
|
26
|
-
action: () => Promise<void>;
|
|
27
|
-
emphasis: {
|
|
28
|
-
danger: boolean;
|
|
29
|
-
};
|
|
30
|
-
})[];
|
|
23
|
+
}[];
|
|
31
24
|
};
|
|
32
25
|
render(): import("lit-html").TemplateResult<1>;
|
|
33
26
|
pageInitialized(lifecycle: any): Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import '@operato/data-grist';
|
|
3
3
|
import '../../component/approval-line-items-editor-popup';
|
|
4
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
4
5
|
import { OxPrompt } from '@operato/popup';
|
|
5
6
|
import { CommonHeaderStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles';
|
|
6
7
|
import { PageView } from '@operato/shell';
|
|
@@ -42,12 +43,6 @@ let MyApprovalLineTemplatesPage = class MyApprovalLineTemplatesPage extends loca
|
|
|
42
43
|
{ icon: 'save',
|
|
43
44
|
title: i18next.t('button.save'),
|
|
44
45
|
action: this.updateApprovalLines.bind(this)
|
|
45
|
-
},
|
|
46
|
-
{ icon: 'delete',
|
|
47
|
-
title: i18next.t('button.delete'),
|
|
48
|
-
action: this.deleteApprovalLines.bind(this),
|
|
49
|
-
emphasis: { danger: true
|
|
50
|
-
}
|
|
51
46
|
}
|
|
52
47
|
] };
|
|
53
48
|
}
|
|
@@ -55,6 +50,14 @@ let MyApprovalLineTemplatesPage = class MyApprovalLineTemplatesPage extends loca
|
|
|
55
50
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
|
|
56
51
|
return html `
|
|
57
52
|
<ox-grist class="page-fill" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
53
|
+
<!-- What is done to the picked rows: over the column heads while rows are picked (ADR-0225). -->
|
|
54
|
+
<ox-assistant-selection-bar
|
|
55
|
+
slot="selection"
|
|
56
|
+
.gridOf=${() => this.grist}
|
|
57
|
+
name=${i18next.t('title.my-approval-line template list')}
|
|
58
|
+
.assistant=${false}
|
|
59
|
+
.actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this.deleteApprovalLines() }]}
|
|
60
|
+
></ox-assistant-selection-bar>
|
|
58
61
|
</ox-grist>
|
|
59
62
|
`;
|
|
60
63
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@operato/data-tree';
|
|
2
2
|
import '@operato/data-grist/ox-record-creator.js';
|
|
3
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
3
4
|
import { PageView } from '@operato/shell';
|
|
4
5
|
import { FetchOption } from '@operato/data-grist';
|
|
5
6
|
import { DepartmentImporter } from './department-importer';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import '@operato/data-tree';
|
|
3
3
|
import '@operato/data-grist/ox-record-creator.js';
|
|
4
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
4
5
|
import { CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles';
|
|
5
6
|
import { PageView } from '@operato/shell';
|
|
6
7
|
import { css, html } from 'lit';
|
|
@@ -83,7 +84,6 @@ let DepartmentListPage = class DepartmentListPage extends localize(i18next)(Scop
|
|
|
83
84
|
// title: i18next.t('button.add-sibling-dept'),
|
|
84
85
|
// action: () => this.grist.addSiblingNodes()
|
|
85
86
|
// },
|
|
86
|
-
{ id: 'delete', title: i18next.t('button.delete'), action: this.delete.bind(this), ...CommonButtonStyles.delete },
|
|
87
87
|
{ id: 'save', title: i18next.t('button.save'), action: this.save.bind(this), ...CommonButtonStyles.save }
|
|
88
88
|
].filter(Boolean)
|
|
89
89
|
};
|
|
@@ -92,6 +92,14 @@ let DepartmentListPage = class DepartmentListPage extends localize(i18next)(Scop
|
|
|
92
92
|
const mode = isMobileDevice() ? 'CARD' : 'GRID';
|
|
93
93
|
return html `
|
|
94
94
|
<ox-grist class="page-fill" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${this.active}>
|
|
95
|
+
<!-- What is done to the picked rows: over the column heads while rows are picked (ADR-0225). -->
|
|
96
|
+
<ox-assistant-selection-bar
|
|
97
|
+
slot="selection"
|
|
98
|
+
.gridOf=${() => this.grist}
|
|
99
|
+
name=${i18next.t('title.department list')}
|
|
100
|
+
.assistant=${false}
|
|
101
|
+
.actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this.delete() }]}
|
|
102
|
+
></ox-assistant-selection-bar>
|
|
95
103
|
<div slot="headroom" class="header">
|
|
96
104
|
<div class="filters">
|
|
97
105
|
<ox-filters-form class="filter" autofocus without-search></ox-filters-form>
|
|
@@ -144,10 +152,8 @@ let DepartmentListPage = class DepartmentListPage extends localize(i18next)(Scop
|
|
|
144
152
|
}
|
|
145
153
|
async pageInitialized(lifecycle) {
|
|
146
154
|
this.gristConfig = { pagination: { pages: [50, 100, 200] },
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
details: ['email', 'manager', 'updatedAt']
|
|
150
|
-
},
|
|
155
|
+
/* On a phone: the department's picture - its `picture` column is the card-only avatar, shown for a department with no picture too (renderEmpty) - its code and name, then who manages it, where it sits and whether it is in use, each with its name. */
|
|
156
|
+
list: { thumbnail: 'picture', fields: ['controlNo', 'name'], details: ['manager', 'parent', 'active'], labeled: true },
|
|
151
157
|
columns: [
|
|
152
158
|
{ type: 'gutter',
|
|
153
159
|
gutterName: 'dirty',
|
|
@@ -264,7 +270,8 @@ let DepartmentListPage = class DepartmentListPage extends localize(i18next)(Scop
|
|
|
264
270
|
},
|
|
265
271
|
{ type: 'image',
|
|
266
272
|
name: 'picture',
|
|
267
|
-
record: {
|
|
273
|
+
record: { renderEmpty: true,
|
|
274
|
+
renderer: function (value, column, record, rowIndex, field) {
|
|
268
275
|
return html `<ox-pfp-view
|
|
269
276
|
style="height:90%; width: unset; aspect-ratio: 1 / 1;"
|
|
270
277
|
.profile=${record.picture}
|
|
@@ -245,12 +245,6 @@ let EmployeeListPage = class EmployeeListPage extends p13n(localize(i18next)(Sco
|
|
|
245
245
|
render() {
|
|
246
246
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
|
|
247
247
|
return html `
|
|
248
|
-
<ox-assistant-selection-bar
|
|
249
|
-
.gridOf=${() => this.grist}
|
|
250
|
-
name=${i18next.t('title.employee list')}
|
|
251
|
-
.assistant=${false}
|
|
252
|
-
.actions=${this.selectionActions}
|
|
253
|
-
></ox-assistant-selection-bar>
|
|
254
248
|
<div body class="page-fill">
|
|
255
249
|
${this.railFolded
|
|
256
250
|
? html `<button
|
|
@@ -304,6 +298,13 @@ let EmployeeListPage = class EmployeeListPage extends p13n(localize(i18next)(Sco
|
|
|
304
298
|
?url-params-sensitive=${this.active}
|
|
305
299
|
@query-state-change=${() => this.requestUpdate()}
|
|
306
300
|
>
|
|
301
|
+
<ox-assistant-selection-bar
|
|
302
|
+
slot="selection"
|
|
303
|
+
.gridOf=${() => this.grist}
|
|
304
|
+
name=${i18next.t('title.employee list')}
|
|
305
|
+
.assistant=${false}
|
|
306
|
+
.actions=${this.selectionActions}
|
|
307
|
+
></ox-assistant-selection-bar>
|
|
307
308
|
<div slot="headroom" class="header">
|
|
308
309
|
<div class="filters">
|
|
309
310
|
<ox-filters-form class="filter" autofocus without-search></ox-filters-form>
|
|
@@ -748,8 +749,9 @@ let EmployeeListPage = class EmployeeListPage extends p13n(localize(i18next)(Sco
|
|
|
748
749
|
this.grist.fetch();
|
|
749
750
|
}
|
|
750
751
|
}
|
|
752
|
+
/* The list's own export is the rows it shows; the picked rows go out by the selection bar's 「선택 내보내기」 (ADR-0225). */
|
|
751
753
|
async exportHandler() {
|
|
752
|
-
const exportTargets = this.grist.
|
|
754
|
+
const exportTargets = this.grist.dirtyData.records;
|
|
753
755
|
const targetFieldSet = new Set([
|
|
754
756
|
'id',
|
|
755
757
|
'controlNo',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@operato/data-grist/ox-grist.js';
|
|
2
2
|
import '@operato/input/ox-select.js';
|
|
3
3
|
import '@operato/popup/ox-popup-list.js';
|
|
4
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
4
5
|
import { FetchOption } from '@operato/data-grist';
|
|
5
6
|
import { PageView } from '@operato/shell';
|
|
6
7
|
import { type Language } from './employee-profile-files';
|
|
@@ -23,20 +24,12 @@ export declare class EmployeeProfileListPage extends EmployeeProfileListPage_bas
|
|
|
23
24
|
handler: (search: string) => void;
|
|
24
25
|
value: string;
|
|
25
26
|
};
|
|
26
|
-
actions: ({
|
|
27
|
-
title: string;
|
|
28
|
-
icon: string;
|
|
29
|
-
action: () => void;
|
|
30
|
-
emphasis?: undefined;
|
|
31
|
-
} | {
|
|
32
|
-
title: string;
|
|
33
|
-
icon: string;
|
|
34
|
-
emphasis: {
|
|
35
|
-
raised: boolean;
|
|
36
|
-
};
|
|
37
|
-
action: () => Promise<void>;
|
|
38
|
-
})[];
|
|
39
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* What is done to the picked employees - on the selection bar over the column heads, shown while rows are picked
|
|
30
|
+
* (ADR-0225). A page built on this list adds its own (Office: the profile request).
|
|
31
|
+
*/
|
|
32
|
+
protected selectionActions(): any[];
|
|
40
33
|
render(): import("lit-html").TemplateResult<1>;
|
|
41
34
|
pageInitialized(): Promise<void>;
|
|
42
35
|
/** Every active employee at once - a company's people, not a ledger - narrowed here by the search words. */
|
|
@@ -2,6 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import '@operato/data-grist/ox-grist.js';
|
|
3
3
|
import '@operato/input/ox-select.js';
|
|
4
4
|
import '@operato/popup/ox-popup-list.js';
|
|
5
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
5
6
|
import gql from 'graphql-tag';
|
|
6
7
|
import { css, html } from 'lit';
|
|
7
8
|
import { customElement, query, state } from 'lit/decorators.js';
|
|
@@ -61,14 +62,20 @@ let EmployeeProfileListPage = class EmployeeProfileListPage extends localize(i18
|
|
|
61
62
|
this.grist.searchText = search;
|
|
62
63
|
},
|
|
63
64
|
value: this.grist?.searchText || ''
|
|
64
|
-
}
|
|
65
|
-
actions: [
|
|
66
|
-
{ title: i18next.t('button.employee-profile-preview'), icon: 'preview', action: () => this.preview() },
|
|
67
|
-
{ title: i18next.t('button.employee-profile-download-pdf'), icon: 'picture_as_pdf', action: () => this.download('PDF') },
|
|
68
|
-
{ title: i18next.t('button.employee-profile-download'), icon: 'download', emphasis: { raised: true }, action: () => this.download('XLSX') }
|
|
69
|
-
]
|
|
65
|
+
}
|
|
70
66
|
};
|
|
71
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* What is done to the picked employees - on the selection bar over the column heads, shown while rows are picked
|
|
70
|
+
* (ADR-0225). A page built on this list adds its own (Office: the profile request).
|
|
71
|
+
*/
|
|
72
|
+
selectionActions() {
|
|
73
|
+
return [
|
|
74
|
+
{ id: 'preview', title: i18next.t('button.employee-profile-preview'), icon: 'preview', action: () => this.preview() },
|
|
75
|
+
{ id: 'download-pdf', title: i18next.t('button.employee-profile-download-pdf'), icon: 'picture_as_pdf', action: () => this.download('PDF') },
|
|
76
|
+
{ id: 'download', title: i18next.t('button.employee-profile-download'), icon: 'download', action: () => this.download('XLSX') }
|
|
77
|
+
];
|
|
78
|
+
}
|
|
72
79
|
render() {
|
|
73
80
|
const shown = this.languages.find(one => one.code === this.language)?.display ?? this.language;
|
|
74
81
|
return html `<ox-grist
|
|
@@ -78,6 +85,13 @@ let EmployeeProfileListPage = class EmployeeProfileListPage extends localize(i18
|
|
|
78
85
|
.config=${this.gristConfig}
|
|
79
86
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
80
87
|
>
|
|
88
|
+
<ox-assistant-selection-bar
|
|
89
|
+
slot="selection"
|
|
90
|
+
.assistant=${false}
|
|
91
|
+
.gridOf=${() => this.grist}
|
|
92
|
+
name=${i18next.t('title.employee-profile-list')}
|
|
93
|
+
.actions=${this.selectionActions()}
|
|
94
|
+
></ox-assistant-selection-bar>
|
|
81
95
|
${this.languages.length > 1
|
|
82
96
|
? html `<div slot="headroom" class="header">
|
|
83
97
|
<div class="filters">
|
|
@@ -155,13 +155,13 @@ let ApprovalLineQuery = class ApprovalLineQuery {
|
|
|
155
155
|
return await getOwnerValue(approvalLine, context);
|
|
156
156
|
}
|
|
157
157
|
async domain(approvalLine) {
|
|
158
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: approvalLine.domainId });
|
|
158
|
+
return approvalLine.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: approvalLine.domainId }) : null;
|
|
159
159
|
}
|
|
160
160
|
async updater(approvalLine) {
|
|
161
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: approvalLine.updaterId });
|
|
161
|
+
return approvalLine.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: approvalLine.updaterId }) : null;
|
|
162
162
|
}
|
|
163
163
|
async creator(approvalLine) {
|
|
164
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: approvalLine.creatorId });
|
|
164
|
+
return approvalLine.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: approvalLine.creatorId }) : null;
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
167
|
exports.ApprovalLineQuery = ApprovalLineQuery;
|
|
@@ -91,13 +91,13 @@ let DepartmentQuery = class DepartmentQuery {
|
|
|
91
91
|
return attachment?.fullpath;
|
|
92
92
|
}
|
|
93
93
|
async domain(department) {
|
|
94
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: department.domainId });
|
|
94
|
+
return department.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: department.domainId }) : null;
|
|
95
95
|
}
|
|
96
96
|
async updater(department) {
|
|
97
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: department.updaterId });
|
|
97
|
+
return department.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: department.updaterId }) : null;
|
|
98
98
|
}
|
|
99
99
|
async creator(department) {
|
|
100
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: department.creatorId });
|
|
100
|
+
return department.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: department.creatorId }) : null;
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
exports.DepartmentQuery = DepartmentQuery;
|
|
@@ -149,13 +149,13 @@ let EmployeeQuery = class EmployeeQuery {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
async domain(employee) {
|
|
152
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: employee.domainId });
|
|
152
|
+
return employee.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: employee.domainId }) : null;
|
|
153
153
|
}
|
|
154
154
|
async updater(employee) {
|
|
155
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: employee.updaterId });
|
|
155
|
+
return employee.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: employee.updaterId }) : null;
|
|
156
156
|
}
|
|
157
157
|
async creator(employee) {
|
|
158
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: employee.creatorId });
|
|
158
|
+
return employee.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: employee.creatorId }) : null;
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
161
|
exports.EmployeeQuery = EmployeeQuery;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/organization",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.314",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"files": [
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
"@operato/p13n": "^10.0.0",
|
|
55
55
|
"@operato/popup": "^10.15.0",
|
|
56
56
|
"@operato/shell": "^10.29.69",
|
|
57
|
-
"@things-factory/ai-assistant": "^10.1.
|
|
58
|
-
"@things-factory/auth-base": "^10.1.
|
|
59
|
-
"@things-factory/biz-base": "^10.1.
|
|
60
|
-
"@things-factory/code-ui": "^10.1.
|
|
61
|
-
"@things-factory/contact": "^10.1.
|
|
62
|
-
"@things-factory/pdf": "^10.1.
|
|
63
|
-
"@things-factory/shell": "^10.1.
|
|
57
|
+
"@things-factory/ai-assistant": "^10.1.314",
|
|
58
|
+
"@things-factory/auth-base": "^10.1.314",
|
|
59
|
+
"@things-factory/biz-base": "^10.1.314",
|
|
60
|
+
"@things-factory/code-ui": "^10.1.314",
|
|
61
|
+
"@things-factory/contact": "^10.1.314",
|
|
62
|
+
"@things-factory/pdf": "^10.1.314",
|
|
63
|
+
"@things-factory/shell": "^10.1.304",
|
|
64
64
|
"exceljs": "4.2.0"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "8d74df0a0618131ff17309638a6aa0affbd4c77d",
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@things-factory/conventions": "^10.1.
|
|
68
|
+
"@things-factory/conventions": "^10.1.304"
|
|
69
69
|
}
|
|
70
70
|
}
|