@acorex-platform/extension-conversation-org-chart-client 0.0.21
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/fesm2022/acorex-platform-extension-conversation-org-chart-client-org-chart-chat-node-contribution.provider-CsISM9GT.mjs +258 -0
- package/fesm2022/acorex-platform-extension-conversation-org-chart-client-org-chart-chat-node-contribution.provider-CsISM9GT.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-conversation-org-chart-client.mjs +29 -0
- package/fesm2022/acorex-platform-extension-conversation-org-chart-client.mjs.map +1 -0
- package/package.json +24 -0
- package/types/acorex-platform-extension-conversation-org-chart-client.d.ts +9 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { AXDialogService } from '@acorex/components/dialog';
|
|
2
|
+
import { AXConversationService } from '@acorex/components/conversation';
|
|
3
|
+
import { AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';
|
|
4
|
+
import { AXM_ORG_CHART_COMMUNICATION_SUBMENU_ICON, AXM_ORG_CHART_COMMUNICATION_SUBMENU_TITLE_I18N_KEY, AXM_ORG_CHART_COMMUNICATION_SUBMENU_GROUP_ID, axmResolveOrgChartFlyoutEmployeeId, AXM_ORG_CHART_EMPLOYEE_SUBMENU_ICON, AXM_ORG_CHART_EMPLOYEE_SUBMENU_TITLE_I18N_KEY, AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID } from '@acorex-platform/module-organization-management-client';
|
|
5
|
+
import { AXPSessionService } from '@acorex-platform/framework-client/auth';
|
|
6
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { inject, LOCALE_ID, Injectable } from '@angular/core';
|
|
9
|
+
import { Router } from '@angular/router';
|
|
10
|
+
|
|
11
|
+
//#region ---- Imports ----
|
|
12
|
+
//#endregion
|
|
13
|
+
/** Human Capital employee entity key for `AXPEntityService` (must match seeded entity id). */
|
|
14
|
+
const HCM_EMPLOYEE_ENTITY_KEY = 'HumanCapitalManagement.Employee';
|
|
15
|
+
const i18nKey = (suffix) => `@conversation:chat.org-chart.${suffix}`;
|
|
16
|
+
//#region ---- Provider ----
|
|
17
|
+
/**
|
|
18
|
+
* Adds org chart context menu entries: **group** chat on business unit nodes (Communication flyout); **private**
|
|
19
|
+
* chat with the assigned person on company root, BU, position, or employee nodes under the **Employee**
|
|
20
|
+
* flyout (with HR actions from core). Private chat is omitted when the seat is vacant.
|
|
21
|
+
*/
|
|
22
|
+
class AXMOrgChartChatNodeContributionProvider {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.conversationService = inject(AXConversationService);
|
|
25
|
+
this.entityService = inject(AXPEntityService);
|
|
26
|
+
this.sessionService = inject(AXPSessionService);
|
|
27
|
+
this.router = inject(Router);
|
|
28
|
+
this.dialogService = inject(AXDialogService);
|
|
29
|
+
this.translation = inject(AXTranslationService);
|
|
30
|
+
this.localeId = inject(LOCALE_ID);
|
|
31
|
+
}
|
|
32
|
+
async getMenuActions(context) {
|
|
33
|
+
const actions = [];
|
|
34
|
+
if (context.nodeKind === 'business-unit') {
|
|
35
|
+
const buId = this.resolveBusinessUnitId(context);
|
|
36
|
+
actions.push({
|
|
37
|
+
id: 'conversation.org-chart.group-chat-bu',
|
|
38
|
+
title: i18nKey('group-chat-bu'),
|
|
39
|
+
icon: 'fa-light fa-users',
|
|
40
|
+
order: 105,
|
|
41
|
+
// `after`/`both` drives the grouped parent row trailing separator when this is the only Communication action
|
|
42
|
+
// (flattened top-level row). With group email loaded, both members keep inner + bucket separators consistent.
|
|
43
|
+
break: 'both',
|
|
44
|
+
disabled: !buId,
|
|
45
|
+
submenuGroupId: AXM_ORG_CHART_COMMUNICATION_SUBMENU_GROUP_ID,
|
|
46
|
+
submenuGroupTitle: AXM_ORG_CHART_COMMUNICATION_SUBMENU_TITLE_I18N_KEY,
|
|
47
|
+
submenuGroupIcon: AXM_ORG_CHART_COMMUNICATION_SUBMENU_ICON,
|
|
48
|
+
execute: async (ctx) => {
|
|
49
|
+
await this.startBusinessUnitGroupChat(ctx);
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const flyoutEmployeeId = axmResolveOrgChartFlyoutEmployeeId(context);
|
|
54
|
+
if (flyoutEmployeeId) {
|
|
55
|
+
const menuId = this.resolvePrivateChatActionId(context);
|
|
56
|
+
const privateChatDisabled = await this.isPrivateChatDisabled(flyoutEmployeeId);
|
|
57
|
+
actions.push({
|
|
58
|
+
id: menuId,
|
|
59
|
+
title: i18nKey('private-chat'),
|
|
60
|
+
icon: 'fa-light fa-message',
|
|
61
|
+
order: 41,
|
|
62
|
+
disabled: privateChatDisabled,
|
|
63
|
+
submenuGroupId: AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID,
|
|
64
|
+
submenuGroupTitle: AXM_ORG_CHART_EMPLOYEE_SUBMENU_TITLE_I18N_KEY,
|
|
65
|
+
submenuGroupIcon: AXM_ORG_CHART_EMPLOYEE_SUBMENU_ICON,
|
|
66
|
+
execute: async (ctx) => {
|
|
67
|
+
const eid = axmResolveOrgChartFlyoutEmployeeId(ctx);
|
|
68
|
+
if (!eid) {
|
|
69
|
+
await this.showError('load-employee');
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
await this.startPrivateChatWithEmployee(eid, this.resolvePrivateChatDisplayTitle(ctx));
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return actions;
|
|
77
|
+
}
|
|
78
|
+
resolvePrivateChatActionId(context) {
|
|
79
|
+
switch (context.nodeKind) {
|
|
80
|
+
case 'company-root':
|
|
81
|
+
return 'conversation.org-chart.private-chat-top-executive';
|
|
82
|
+
case 'business-unit':
|
|
83
|
+
return 'conversation.org-chart.private-chat-bu-head';
|
|
84
|
+
case 'employee':
|
|
85
|
+
return 'conversation.org-chart.private-chat';
|
|
86
|
+
case 'position':
|
|
87
|
+
return 'conversation.org-chart.private-chat-position-occupant';
|
|
88
|
+
default:
|
|
89
|
+
return 'conversation.org-chart.private-chat';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
resolvePrivateChatDisplayTitle(context) {
|
|
93
|
+
switch (context.nodeKind) {
|
|
94
|
+
case 'company-root':
|
|
95
|
+
return this.resolveTopExecutiveChatTitle(context);
|
|
96
|
+
case 'business-unit':
|
|
97
|
+
return this.resolveHeadEmployeeChatTitle(context);
|
|
98
|
+
case 'position':
|
|
99
|
+
return this.resolvePositionOccupantChatTitle(context);
|
|
100
|
+
default:
|
|
101
|
+
return this.resolveNodeTitle(context);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
resolveBusinessUnitId(context) {
|
|
105
|
+
const raw = context.node.entity?.id ??
|
|
106
|
+
context.node.metadata?.['businessUnitId'] ??
|
|
107
|
+
context.node.metadata?.['unitId'];
|
|
108
|
+
if (raw == null || String(raw).trim().length === 0) {
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
return String(raw).trim();
|
|
112
|
+
}
|
|
113
|
+
resolvePositionOccupantChatTitle(context) {
|
|
114
|
+
const occ = context.node.metadata?.['occupant'];
|
|
115
|
+
const dn = occ?.['displayName'];
|
|
116
|
+
if (typeof dn === 'string' && dn.trim().length > 0) {
|
|
117
|
+
return dn.trim();
|
|
118
|
+
}
|
|
119
|
+
return this.resolveNodeTitle(context);
|
|
120
|
+
}
|
|
121
|
+
resolveTopExecutiveChatTitle(context) {
|
|
122
|
+
const topRole = context.node.metadata?.['topRole'];
|
|
123
|
+
const rawName = topRole?.['employeeName'];
|
|
124
|
+
if (typeof rawName === 'string' && rawName.trim().length > 0) {
|
|
125
|
+
return rawName.trim();
|
|
126
|
+
}
|
|
127
|
+
return this.resolveNodeTitle(context);
|
|
128
|
+
}
|
|
129
|
+
async isPrivateChatDisabled(employeeId) {
|
|
130
|
+
const userId = await this.resolveUserIdForEmployee(employeeId);
|
|
131
|
+
if (!userId) {
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
const currentUserId = this.sessionService.user?.id;
|
|
135
|
+
return currentUserId != null && userId === currentUserId;
|
|
136
|
+
}
|
|
137
|
+
async resolveUserIdForEmployee(employeeId) {
|
|
138
|
+
const row = await this.entityService.withEntity(HCM_EMPLOYEE_ENTITY_KEY).data().byKey(employeeId);
|
|
139
|
+
const userId = row?.userId;
|
|
140
|
+
return userId != null && String(userId).trim().length > 0 ? String(userId) : undefined;
|
|
141
|
+
}
|
|
142
|
+
resolveNodeTitle(context) {
|
|
143
|
+
const raw = context.node.title;
|
|
144
|
+
if (typeof raw === 'string') {
|
|
145
|
+
return raw.trim() || this.translation.translateSync(i18nKey('fallback-unit'));
|
|
146
|
+
}
|
|
147
|
+
return resolveMultiLanguageString(raw, this.localeId).trim() || this.translation.translateSync(i18nKey('fallback-unit'));
|
|
148
|
+
}
|
|
149
|
+
applicationRouteSegment() {
|
|
150
|
+
return this.sessionService.application?.name?.trim() || 'platform';
|
|
151
|
+
}
|
|
152
|
+
async showError(key) {
|
|
153
|
+
const title = await this.translation.translateAsync(i18nKey('error-title'));
|
|
154
|
+
const message = await this.translation.translateAsync(i18nKey(`errors.${key}`));
|
|
155
|
+
await this.dialogService.alert(title, message, 'danger');
|
|
156
|
+
}
|
|
157
|
+
resolveHeadEmployeeChatTitle(context) {
|
|
158
|
+
const unitHead = context.node.metadata?.['unitHead'];
|
|
159
|
+
const rawName = unitHead?.['employeeName'];
|
|
160
|
+
if (typeof rawName === 'string' && rawName.trim().length > 0) {
|
|
161
|
+
return rawName.trim();
|
|
162
|
+
}
|
|
163
|
+
return this.resolveNodeTitle(context);
|
|
164
|
+
}
|
|
165
|
+
async startPrivateChatWithEmployee(employeeId, title) {
|
|
166
|
+
let userId;
|
|
167
|
+
try {
|
|
168
|
+
userId = await this.resolveUserIdForEmployee(employeeId);
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
await this.showError('load-employee');
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (!userId) {
|
|
175
|
+
await this.showError('no-user');
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const currentUserId = this.sessionService.user?.id;
|
|
179
|
+
if (currentUserId != null && userId === currentUserId) {
|
|
180
|
+
await this.showError('self-chat');
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
try {
|
|
184
|
+
const conversation = await this.conversationService.createConversation([userId], 'private', { title });
|
|
185
|
+
await this.router.navigate([this.applicationRouteSegment(), 'chat', conversation.id]);
|
|
186
|
+
}
|
|
187
|
+
catch {
|
|
188
|
+
await this.showError('create-room');
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
async startBusinessUnitGroupChat(context) {
|
|
192
|
+
const buId = this.resolveBusinessUnitId(context);
|
|
193
|
+
if (!buId) {
|
|
194
|
+
await this.showError('no-business-unit');
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const memberUserIds = await this.loadDistinctUserIdsForBusinessUnit(buId);
|
|
198
|
+
const currentUserId = this.sessionService.user?.id;
|
|
199
|
+
const others = memberUserIds.filter((id) => currentUserId == null || id !== currentUserId);
|
|
200
|
+
if (others.length === 0) {
|
|
201
|
+
await this.showError('no-members');
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const unitTitle = this.resolveNodeTitle(context);
|
|
205
|
+
const title = this.translation.translateSync(i18nKey('group-room-title'), {
|
|
206
|
+
params: { unit: unitTitle },
|
|
207
|
+
});
|
|
208
|
+
try {
|
|
209
|
+
const conversation = await this.conversationService.createConversation(others, 'group', { title });
|
|
210
|
+
await this.router.navigate([this.applicationRouteSegment(), 'chat', conversation.id]);
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
await this.showError('create-room');
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Loads employees whose primary BU matches {@link businessUnitId} and returns distinct `userId` values.
|
|
218
|
+
*/
|
|
219
|
+
async loadDistinctUserIdsForBusinessUnit(businessUnitId) {
|
|
220
|
+
const filter = {
|
|
221
|
+
logic: 'and',
|
|
222
|
+
filters: [
|
|
223
|
+
{
|
|
224
|
+
field: 'activePrimaryBusinessUnitId',
|
|
225
|
+
value: businessUnitId,
|
|
226
|
+
operator: { type: 'equal' },
|
|
227
|
+
},
|
|
228
|
+
],
|
|
229
|
+
};
|
|
230
|
+
const { items } = await this.entityService.withEntity(HCM_EMPLOYEE_ENTITY_KEY).data().query({
|
|
231
|
+
skip: 0,
|
|
232
|
+
take: 500,
|
|
233
|
+
filter,
|
|
234
|
+
});
|
|
235
|
+
const userIds = new Set();
|
|
236
|
+
for (const row of items) {
|
|
237
|
+
if (row.userId != null && String(row.userId).trim().length > 0) {
|
|
238
|
+
userIds.add(String(row.userId));
|
|
239
|
+
continue;
|
|
240
|
+
}
|
|
241
|
+
if (row.id != null && String(row.id).trim().length > 0) {
|
|
242
|
+
const uid = await this.resolveUserIdForEmployee(String(row.id));
|
|
243
|
+
if (uid) {
|
|
244
|
+
userIds.add(uid);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return [...userIds];
|
|
249
|
+
}
|
|
250
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMOrgChartChatNodeContributionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
251
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMOrgChartChatNodeContributionProvider }); }
|
|
252
|
+
}
|
|
253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMOrgChartChatNodeContributionProvider, decorators: [{
|
|
254
|
+
type: Injectable
|
|
255
|
+
}] });
|
|
256
|
+
|
|
257
|
+
export { AXMOrgChartChatNodeContributionProvider };
|
|
258
|
+
//# sourceMappingURL=acorex-platform-extension-conversation-org-chart-client-org-chart-chat-node-contribution.provider-CsISM9GT.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-extension-conversation-org-chart-client-org-chart-chat-node-contribution.provider-CsISM9GT.mjs","sources":["../../../../libs/extensions/conversation/org-chart/client/src/lib/org-chart-chat-node-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXConversationService } from '@acorex/components/conversation';\nimport { resolveMultiLanguageString, AXTranslationService } from '@acorex/core/translation';\nimport {\n AXM_ORG_CHART_COMMUNICATION_SUBMENU_GROUP_ID,\n AXM_ORG_CHART_COMMUNICATION_SUBMENU_ICON,\n AXM_ORG_CHART_COMMUNICATION_SUBMENU_TITLE_I18N_KEY,\n AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID,\n AXM_ORG_CHART_EMPLOYEE_SUBMENU_ICON,\n AXM_ORG_CHART_EMPLOYEE_SUBMENU_TITLE_I18N_KEY,\n axmResolveOrgChartFlyoutEmployeeId,\n type AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n type AXMOrgChartNodeMenuAction,\n} from '@acorex-platform/module-organization-management-client';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { inject, Injectable, LOCALE_ID } from '@angular/core';\nimport { Router } from '@angular/router';\n\n//#endregion\n\n/** Human Capital employee entity key for `AXPEntityService` (must match seeded entity id). */\nconst HCM_EMPLOYEE_ENTITY_KEY = 'HumanCapitalManagement.Employee';\n\nconst i18nKey = (suffix: string): string => `@conversation:chat.org-chart.${suffix}`;\n\n//#region ---- Provider ----\n\n/**\n * Adds org chart context menu entries: **group** chat on business unit nodes (Communication flyout); **private**\n * chat with the assigned person on company root, BU, position, or employee nodes under the **Employee**\n * flyout (with HR actions from core). Private chat is omitted when the seat is vacant.\n */\n@Injectable()\nexport class AXMOrgChartChatNodeContributionProvider implements AXMOrgChartNodeContributionProvider {\n private readonly conversationService = inject(AXConversationService);\n private readonly entityService = inject(AXPEntityService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly router = inject(Router);\n private readonly dialogService = inject(AXDialogService);\n private readonly translation = inject(AXTranslationService);\n private readonly localeId = inject(LOCALE_ID);\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n const actions: AXMOrgChartNodeMenuAction[] = [];\n\n if (context.nodeKind === 'business-unit') {\n const buId = this.resolveBusinessUnitId(context);\n actions.push({\n id: 'conversation.org-chart.group-chat-bu',\n title: i18nKey('group-chat-bu'),\n icon: 'fa-light fa-users',\n order: 105,\n // `after`/`both` drives the grouped parent row trailing separator when this is the only Communication action\n // (flattened top-level row). With group email loaded, both members keep inner + bucket separators consistent.\n break: 'both',\n disabled: !buId,\n submenuGroupId: AXM_ORG_CHART_COMMUNICATION_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_COMMUNICATION_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_COMMUNICATION_SUBMENU_ICON,\n execute: async (ctx: AXMOrgChartNodeContributionContext) => {\n await this.startBusinessUnitGroupChat(ctx);\n },\n });\n }\n\n const flyoutEmployeeId = axmResolveOrgChartFlyoutEmployeeId(context);\n if (flyoutEmployeeId) {\n const menuId = this.resolvePrivateChatActionId(context);\n const privateChatDisabled = await this.isPrivateChatDisabled(flyoutEmployeeId);\n actions.push({\n id: menuId,\n title: i18nKey('private-chat'),\n icon: 'fa-light fa-message',\n order: 41,\n disabled: privateChatDisabled,\n submenuGroupId: AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_EMPLOYEE_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_EMPLOYEE_SUBMENU_ICON,\n execute: async (ctx: AXMOrgChartNodeContributionContext) => {\n const eid = axmResolveOrgChartFlyoutEmployeeId(ctx);\n if (!eid) {\n await this.showError('load-employee');\n return;\n }\n await this.startPrivateChatWithEmployee(eid, this.resolvePrivateChatDisplayTitle(ctx));\n },\n });\n }\n\n return actions;\n }\n\n private resolvePrivateChatActionId(context: AXMOrgChartNodeContributionContext): string {\n switch (context.nodeKind) {\n case 'company-root':\n return 'conversation.org-chart.private-chat-top-executive';\n case 'business-unit':\n return 'conversation.org-chart.private-chat-bu-head';\n case 'employee':\n return 'conversation.org-chart.private-chat';\n case 'position':\n return 'conversation.org-chart.private-chat-position-occupant';\n default:\n return 'conversation.org-chart.private-chat';\n }\n }\n\n private resolvePrivateChatDisplayTitle(context: AXMOrgChartNodeContributionContext): string {\n switch (context.nodeKind) {\n case 'company-root':\n return this.resolveTopExecutiveChatTitle(context);\n case 'business-unit':\n return this.resolveHeadEmployeeChatTitle(context);\n case 'position':\n return this.resolvePositionOccupantChatTitle(context);\n default:\n return this.resolveNodeTitle(context);\n }\n }\n\n private resolveBusinessUnitId(context: AXMOrgChartNodeContributionContext): string | undefined {\n const raw =\n context.node.entity?.id ??\n (context.node.metadata?.['businessUnitId'] as string | undefined) ??\n (context.node.metadata?.['unitId'] as string | undefined);\n if (raw == null || String(raw).trim().length === 0) {\n return undefined;\n }\n return String(raw).trim();\n }\n\n private resolvePositionOccupantChatTitle(context: AXMOrgChartNodeContributionContext): string {\n const occ = context.node.metadata?.['occupant'] as Record<string, unknown> | undefined;\n const dn = occ?.['displayName'];\n if (typeof dn === 'string' && dn.trim().length > 0) {\n return dn.trim();\n }\n return this.resolveNodeTitle(context);\n }\n\n private resolveTopExecutiveChatTitle(context: AXMOrgChartNodeContributionContext): string {\n const topRole = context.node.metadata?.['topRole'] as Record<string, unknown> | undefined;\n const rawName = topRole?.['employeeName'];\n if (typeof rawName === 'string' && rawName.trim().length > 0) {\n return rawName.trim();\n }\n return this.resolveNodeTitle(context);\n }\n\n private async isPrivateChatDisabled(employeeId: string): Promise<boolean> {\n const userId = await this.resolveUserIdForEmployee(employeeId);\n if (!userId) {\n return true;\n }\n const currentUserId = this.sessionService.user?.id;\n return currentUserId != null && userId === currentUserId;\n }\n\n private async resolveUserIdForEmployee(employeeId: string): Promise<string | undefined> {\n const row = await this.entityService.withEntity(HCM_EMPLOYEE_ENTITY_KEY).data().byKey(employeeId);\n const userId = (row as { userId?: string } | null)?.userId;\n return userId != null && String(userId).trim().length > 0 ? String(userId) : undefined;\n }\n\n private resolveNodeTitle(context: AXMOrgChartNodeContributionContext): string {\n const raw = context.node.title;\n if (typeof raw === 'string') {\n return raw.trim() || this.translation.translateSync(i18nKey('fallback-unit'));\n }\n return resolveMultiLanguageString(raw, this.localeId).trim() || this.translation.translateSync(i18nKey('fallback-unit'));\n }\n\n private applicationRouteSegment(): string {\n return this.sessionService.application?.name?.trim() || 'platform';\n }\n\n private async showError(key: string): Promise<void> {\n const title = await this.translation.translateAsync(i18nKey('error-title'));\n const message = await this.translation.translateAsync(i18nKey(`errors.${key}`));\n await this.dialogService.alert(title, message, 'danger');\n }\n\n private resolveHeadEmployeeChatTitle(context: AXMOrgChartNodeContributionContext): string {\n const unitHead = context.node.metadata?.['unitHead'] as Record<string, unknown> | undefined;\n const rawName = unitHead?.['employeeName'];\n if (typeof rawName === 'string' && rawName.trim().length > 0) {\n return rawName.trim();\n }\n return this.resolveNodeTitle(context);\n }\n\n private async startPrivateChatWithEmployee(employeeId: string, title: string): Promise<void> {\n let userId: string | undefined;\n try {\n userId = await this.resolveUserIdForEmployee(employeeId);\n } catch {\n await this.showError('load-employee');\n return;\n }\n if (!userId) {\n await this.showError('no-user');\n return;\n }\n const currentUserId = this.sessionService.user?.id;\n if (currentUserId != null && userId === currentUserId) {\n await this.showError('self-chat');\n return;\n }\n try {\n const conversation = await this.conversationService.createConversation([userId], 'private', { title });\n await this.router.navigate([this.applicationRouteSegment(), 'chat', conversation.id]);\n } catch {\n await this.showError('create-room');\n }\n }\n\n private async startBusinessUnitGroupChat(context: AXMOrgChartNodeContributionContext): Promise<void> {\n const buId = this.resolveBusinessUnitId(context);\n if (!buId) {\n await this.showError('no-business-unit');\n return;\n }\n const memberUserIds = await this.loadDistinctUserIdsForBusinessUnit(buId);\n const currentUserId = this.sessionService.user?.id;\n const others = memberUserIds.filter((id) => currentUserId == null || id !== currentUserId);\n if (others.length === 0) {\n await this.showError('no-members');\n return;\n }\n const unitTitle = this.resolveNodeTitle(context);\n const title = this.translation.translateSync(i18nKey('group-room-title'), {\n params: { unit: unitTitle },\n });\n try {\n const conversation = await this.conversationService.createConversation(others, 'group', { title });\n await this.router.navigate([this.applicationRouteSegment(), 'chat', conversation.id]);\n } catch {\n await this.showError('create-room');\n }\n }\n\n /**\n * Loads employees whose primary BU matches {@link businessUnitId} and returns distinct `userId` values.\n */\n private async loadDistinctUserIdsForBusinessUnit(businessUnitId: string): Promise<string[]> {\n const filter = {\n logic: 'and' as const,\n filters: [\n {\n field: 'activePrimaryBusinessUnitId',\n value: businessUnitId,\n operator: { type: 'equal' as const },\n },\n ],\n };\n const { items } = await this.entityService.withEntity(HCM_EMPLOYEE_ENTITY_KEY).data().query({\n skip: 0,\n take: 500,\n filter,\n });\n const userIds = new Set<string>();\n for (const row of items as Array<{ id?: string; userId?: string }>) {\n if (row.userId != null && String(row.userId).trim().length > 0) {\n userIds.add(String(row.userId));\n continue;\n }\n if (row.id != null && String(row.id).trim().length > 0) {\n const uid = await this.resolveUserIdForEmployee(String(row.id));\n if (uid) {\n userIds.add(uid);\n }\n }\n }\n return [...userIds];\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AAsBA;AAEA;AACA,MAAM,uBAAuB,GAAG,iCAAiC;AAEjE,MAAM,OAAO,GAAG,CAAC,MAAc,KAAa,CAAA,6BAAA,EAAgC,MAAM,CAAA,CAAE;AAEpF;AAEA;;;;AAIG;MAEU,uCAAuC,CAAA;AADpD,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,qBA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YAClE,IAAI,GAAG,CAAC,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC9D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBAC/B;YACF;YACA,IAAI,GAAG,CAAC,EAAE,IAAI,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;AACtD,gBAAA,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAC/D,IAAI,GAAG,EAAE;AACP,oBAAA,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;gBAClB;YACF;QACF;AACA,QAAA,OAAO,CAAC,GAAG,OAAO,CAAC;IACrB;8GAjPW,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAvC,uCAAuC,EAAA,CAAA,CAAA;;2FAAvC,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD;;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AXM_ORG_CHART_NODE_CONTRIBUTOR } from '@acorex-platform/module-organization-management-client';
|
|
2
|
+
import { provideLazyProvider } from '@acorex-platform/framework-client/core';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { NgModule } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
//#region ---- Imports ----
|
|
7
|
+
//#endregion
|
|
8
|
+
class AXEConversationOrgChartExtensionModule {
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEConversationOrgChartExtensionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXEConversationOrgChartExtensionModule }); }
|
|
11
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEConversationOrgChartExtensionModule, providers: [
|
|
12
|
+
provideLazyProvider(AXM_ORG_CHART_NODE_CONTRIBUTOR, () => import('./acorex-platform-extension-conversation-org-chart-client-org-chart-chat-node-contribution.provider-CsISM9GT.mjs').then((m) => m.AXMOrgChartChatNodeContributionProvider)),
|
|
13
|
+
] }); }
|
|
14
|
+
}
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEConversationOrgChartExtensionModule, decorators: [{
|
|
16
|
+
type: NgModule,
|
|
17
|
+
args: [{
|
|
18
|
+
providers: [
|
|
19
|
+
provideLazyProvider(AXM_ORG_CHART_NODE_CONTRIBUTOR, () => import('./acorex-platform-extension-conversation-org-chart-client-org-chart-chat-node-contribution.provider-CsISM9GT.mjs').then((m) => m.AXMOrgChartChatNodeContributionProvider)),
|
|
20
|
+
],
|
|
21
|
+
}]
|
|
22
|
+
}] });
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Generated bundle index. Do not edit.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
export { AXEConversationOrgChartExtensionModule };
|
|
29
|
+
//# sourceMappingURL=acorex-platform-extension-conversation-org-chart-client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-extension-conversation-org-chart-client.mjs","sources":["../../../../libs/extensions/conversation/org-chart/client/src/lib/conversation-org-chart-extension.module.ts","../../../../libs/extensions/conversation/org-chart/client/src/acorex-platform-extension-conversation-org-chart-client.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXM_ORG_CHART_NODE_CONTRIBUTOR } from '@acorex-platform/module-organization-management-client';\nimport { provideLazyProvider } from '@acorex-platform/framework-client/core';\nimport { NgModule } from '@angular/core';\n\n//#endregion\n\n@NgModule({\n providers: [\n provideLazyProvider(AXM_ORG_CHART_NODE_CONTRIBUTOR, () =>\n import('./org-chart-chat-node-contribution.provider').then((m) => m.AXMOrgChartChatNodeContributionProvider),\n ),\n ],\n})\nexport class AXEConversationOrgChartExtensionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AAMA;MASa,sCAAsC,CAAA;8GAAtC,sCAAsC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAtC,sCAAsC,EAAA,CAAA,CAAA;AAAtC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sCAAsC,EAAA,SAAA,EANtC;YACT,mBAAmB,CAAC,8BAA8B,EAAE,MAClD,OAAO,kHAA6C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,uCAAuC,CAAC,CAC7G;AACF,SAAA,EAAA,CAAA,CAAA;;2FAEU,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBAPlD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;wBACT,mBAAmB,CAAC,8BAA8B,EAAE,MAClD,OAAO,kHAA6C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,uCAAuC,CAAC,CAC7G;AACF,qBAAA;AACF,iBAAA;;;ACdD;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acorex-platform/extension-conversation-org-chart-client",
|
|
3
|
+
"version": "0.0.21",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^21.0.0",
|
|
7
|
+
"@angular/core": "^21.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"module": "fesm2022/acorex-platform-extension-conversation-org-chart-client.mjs",
|
|
13
|
+
"typings": "types/acorex-platform-extension-conversation-org-chart-client.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/acorex-platform-extension-conversation-org-chart-client.d.ts",
|
|
20
|
+
"default": "./fesm2022/acorex-platform-extension-conversation-org-chart-client.mjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"type": "module"
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare class AXEConversationOrgChartExtensionModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXEConversationOrgChartExtensionModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXEConversationOrgChartExtensionModule, never, never, never>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXEConversationOrgChartExtensionModule>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { AXEConversationOrgChartExtensionModule };
|