@acorex/connectivity 21.0.0-next.31 → 21.0.0-next.33
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-connectivity-mock-acorex-connectivity-mock-G8Opk5JU.mjs → acorex-connectivity-mock-acorex-connectivity-mock-BpUUTZOi.mjs} +694 -330
- package/fesm2022/acorex-connectivity-mock-acorex-connectivity-mock-BpUUTZOi.mjs.map +1 -0
- package/fesm2022/{acorex-connectivity-mock-chat-generate-image.command-CPGQNlRz.mjs → acorex-connectivity-mock-chat-generate-image.command-BA0r4IMn.mjs} +2 -2
- package/fesm2022/{acorex-connectivity-mock-chat-generate-image.command-CPGQNlRz.mjs.map → acorex-connectivity-mock-chat-generate-image.command-BA0r4IMn.mjs.map} +1 -1
- package/fesm2022/{acorex-connectivity-mock-chat-synthesize-speech.command-BXem7bHF.mjs → acorex-connectivity-mock-chat-synthesize-speech.command-B5-8a7SC.mjs} +2 -2
- package/fesm2022/{acorex-connectivity-mock-chat-synthesize-speech.command-BXem7bHF.mjs.map → acorex-connectivity-mock-chat-synthesize-speech.command-B5-8a7SC.mjs.map} +1 -1
- package/fesm2022/{acorex-connectivity-mock-chat-transcribe-speech.command-TP4dUKlp.mjs → acorex-connectivity-mock-chat-transcribe-speech.command-BGzXvTnh.mjs} +2 -2
- package/fesm2022/{acorex-connectivity-mock-chat-transcribe-speech.command-TP4dUKlp.mjs.map → acorex-connectivity-mock-chat-transcribe-speech.command-BGzXvTnh.mjs.map} +1 -1
- package/fesm2022/acorex-connectivity-mock.mjs +1 -1
- package/package.json +2 -2
- package/types/acorex-connectivity-mock.d.ts +47 -5
- package/fesm2022/acorex-connectivity-mock-acorex-connectivity-mock-G8Opk5JU.mjs.map +0 -1
|
@@ -2,7 +2,7 @@ import { AXSafePipe } from '@acorex/core/pipes';
|
|
|
2
2
|
import * as i2$2 from '@acorex/platform/auth';
|
|
3
3
|
import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER, AXP_APPLICATION_LOADER, AXP_FEATURE_LOADER, AXP_PERMISSION_LOADER, AXP_TENANT_LOADER, AXP_PERMISSION_CHECKER, AXP_FEATURE_CHECKER, AXPLoginChallengeComponentBase, AXPLoginChallengeProvider, AXPAuthStrategy, AXPAuthModule, AXP_LOGIN_CHALLENGE_PROVIDER } from '@acorex/platform/auth';
|
|
4
4
|
import * as i1 from '@acorex/platform/core';
|
|
5
|
-
import { applyFilterArray, applySortArray, AXPDataGenerator,
|
|
5
|
+
import { applyFilterArray, applySortArray, AXPDataGenerator, resolveMultiLanguageString, createMultiLanguageString, AXPIconLogoConfig, AXPModuleManifestRegistry, AXPActivityLogProvider, AXP_ACTIVITY_LOG_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXPDataSourceDefinitionProviderService, AXPPlatformScope, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXPExpressionEvaluatorService, provideLazyProvider } from '@acorex/platform/core';
|
|
6
6
|
import { AXP_ENTITY_STORAGE_BACKEND, AXPEntityStorageService, isAXPMiddlewareAbortError, AXPEntityResolver, AXP_ENTITY_DEFINITION_CRUD_SERVICE, AXPEntityService, AXP_ENTITY_DEFINITION_LOADER, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_STORAGE_MIDDLEWARE, AXPEntityDefinitionRegistryService, AXPMiddlewareAbortError, eventDispatchMiddleware, AXPDataSeederService } from '@acorex/platform/layout/entity';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
8
|
import { InjectionToken, inject, Injectable, NgModule, Injector, Inject, signal, Component } from '@angular/core';
|
|
@@ -4183,7 +4183,7 @@ async function seedRelationDefinitions() {
|
|
|
4183
4183
|
}
|
|
4184
4184
|
//#endregion
|
|
4185
4185
|
|
|
4186
|
-
var index = /*#__PURE__*/Object.freeze({
|
|
4186
|
+
var index$1 = /*#__PURE__*/Object.freeze({
|
|
4187
4187
|
__proto__: null,
|
|
4188
4188
|
RELATION_DEFINITIONS_MOCK: RELATION_DEFINITIONS_MOCK,
|
|
4189
4189
|
seedRelationDefinitions: seedRelationDefinitions
|
|
@@ -4221,6 +4221,7 @@ async function seedModules() {
|
|
|
4221
4221
|
}
|
|
4222
4222
|
//#endregion
|
|
4223
4223
|
|
|
4224
|
+
const INTERFACE_DEFINITION_SEED_LOCALE = 'en-US';
|
|
4224
4225
|
//#region ---- Collect properties from widget ----
|
|
4225
4226
|
/**
|
|
4226
4227
|
* Collect all properties from a widget config (top-level + per-component).
|
|
@@ -4298,7 +4299,11 @@ function normalizeCategories(categories) {
|
|
|
4298
4299
|
if (!categories)
|
|
4299
4300
|
return undefined;
|
|
4300
4301
|
const arr = Array.isArray(categories) ? categories : [categories];
|
|
4301
|
-
const normalized = arr.map((c) => ({
|
|
4302
|
+
const normalized = arr.map((c) => ({
|
|
4303
|
+
name: c.name,
|
|
4304
|
+
title: resolveMultiLanguageString(c.title, INTERFACE_DEFINITION_SEED_LOCALE),
|
|
4305
|
+
order: c.order,
|
|
4306
|
+
}));
|
|
4302
4307
|
return normalized.length > 0 ? normalized : undefined;
|
|
4303
4308
|
}
|
|
4304
4309
|
/**
|
|
@@ -4310,8 +4315,10 @@ function widgetToInterfaceDefinition(config) {
|
|
|
4310
4315
|
const categories = normalizeCategories(config.categories);
|
|
4311
4316
|
return {
|
|
4312
4317
|
name: String(config.name),
|
|
4313
|
-
title: config.title,
|
|
4314
|
-
description: config.description
|
|
4318
|
+
title: resolveMultiLanguageString(config.title, INTERFACE_DEFINITION_SEED_LOCALE),
|
|
4319
|
+
description: config.description != null
|
|
4320
|
+
? resolveMultiLanguageString(config.description, INTERFACE_DEFINITION_SEED_LOCALE)
|
|
4321
|
+
: undefined,
|
|
4315
4322
|
icon: config.icon,
|
|
4316
4323
|
categories,
|
|
4317
4324
|
groups: config.groups && config.groups.length > 0 ? [...config.groups] : undefined,
|
|
@@ -5039,7 +5046,7 @@ class AXCEntityDefinitionSeederService {
|
|
|
5039
5046
|
}
|
|
5040
5047
|
async seedRelationsToFirestore(db) {
|
|
5041
5048
|
const { RELATION_DEFINITION_MAP } = await Promise.resolve().then(function () { return relations_registry; });
|
|
5042
|
-
const { RELATION_DEFINITIONS_MOCK } = await Promise.resolve().then(function () { return index; });
|
|
5049
|
+
const { RELATION_DEFINITIONS_MOCK } = await Promise.resolve().then(function () { return index$1; });
|
|
5043
5050
|
for (const [id, loader] of Object.entries(RELATION_DEFINITION_MAP)) {
|
|
5044
5051
|
try {
|
|
5045
5052
|
const module = await loader();
|
|
@@ -6766,7 +6773,7 @@ const COMMAND_REGISTRY_SEED = [
|
|
|
6766
6773
|
"definition": {
|
|
6767
6774
|
"name": "OrganizationManagement.OrgChart:Generate",
|
|
6768
6775
|
"active": true,
|
|
6769
|
-
"description": "AXMOrgChartGenerateCommand loads business units, positions, and
|
|
6776
|
+
"description": "AXMOrgChartGenerateCommand loads business units, positions, employees, and position assignments (primary active assignments), builds a tree with createBuilder(mode), persists a new Chart record with version timestamp, returns { id, version } on success.",
|
|
6770
6777
|
"inputOptionDefinitions": [
|
|
6771
6778
|
{
|
|
6772
6779
|
"name": "mode",
|
|
@@ -6777,26 +6784,6 @@ const COMMAND_REGISTRY_SEED = [
|
|
|
6777
6784
|
"options": {}
|
|
6778
6785
|
},
|
|
6779
6786
|
"description": "OrgChartMode: 'location' | 'structure' | 'reporting'; defaults to 'location'."
|
|
6780
|
-
},
|
|
6781
|
-
{
|
|
6782
|
-
"name": "includeEmployees",
|
|
6783
|
-
"title": "Include employees",
|
|
6784
|
-
"interface": {
|
|
6785
|
-
"name": "text-editor",
|
|
6786
|
-
"title": "Include employees",
|
|
6787
|
-
"options": {}
|
|
6788
|
-
},
|
|
6789
|
-
"description": "When not false, loads employees and position assignments."
|
|
6790
|
-
},
|
|
6791
|
-
{
|
|
6792
|
-
"name": "preferPrimary",
|
|
6793
|
-
"title": "Prefer primary assignment",
|
|
6794
|
-
"interface": {
|
|
6795
|
-
"name": "text-editor",
|
|
6796
|
-
"title": "Prefer primary assignment",
|
|
6797
|
-
"options": {}
|
|
6798
|
-
},
|
|
6799
|
-
"description": "When not false, filters assignments with isPrimary when preferPrimary applies in isActiveAssignment."
|
|
6800
6787
|
}
|
|
6801
6788
|
],
|
|
6802
6789
|
"outputOptionDefinitions": [
|
|
@@ -15461,7 +15448,7 @@ class AXCAiManagementMockModule {
|
|
|
15461
15448
|
provideCommandSetups([
|
|
15462
15449
|
{
|
|
15463
15450
|
key: 'AiManagement:ChatGenerateImage',
|
|
15464
|
-
command: () => import('./acorex-connectivity-mock-chat-generate-image.command-
|
|
15451
|
+
command: () => import('./acorex-connectivity-mock-chat-generate-image.command-BA0r4IMn.mjs').then((c) => c.AiManagementChatGenerateImageCommand),
|
|
15465
15452
|
},
|
|
15466
15453
|
{
|
|
15467
15454
|
key: 'AiManagement:ExtractDocumentText',
|
|
@@ -15473,11 +15460,11 @@ class AXCAiManagementMockModule {
|
|
|
15473
15460
|
},
|
|
15474
15461
|
{
|
|
15475
15462
|
key: 'AiManagement:ChatTranscribeSpeech',
|
|
15476
|
-
command: () => import('./acorex-connectivity-mock-chat-transcribe-speech.command-
|
|
15463
|
+
command: () => import('./acorex-connectivity-mock-chat-transcribe-speech.command-BGzXvTnh.mjs').then((c) => c.AiManagementChatTranscribeSpeechCommand),
|
|
15477
15464
|
},
|
|
15478
15465
|
{
|
|
15479
15466
|
key: 'AiManagement:ChatSynthesizeSpeech',
|
|
15480
|
-
command: () => import('./acorex-connectivity-mock-chat-synthesize-speech.command-
|
|
15467
|
+
command: () => import('./acorex-connectivity-mock-chat-synthesize-speech.command-B5-8a7SC.mjs').then((c) => c.AiManagementChatSynthesizeSpeechCommand),
|
|
15481
15468
|
},
|
|
15482
15469
|
]),
|
|
15483
15470
|
] }); }
|
|
@@ -15518,7 +15505,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
15518
15505
|
provideCommandSetups([
|
|
15519
15506
|
{
|
|
15520
15507
|
key: 'AiManagement:ChatGenerateImage',
|
|
15521
|
-
command: () => import('./acorex-connectivity-mock-chat-generate-image.command-
|
|
15508
|
+
command: () => import('./acorex-connectivity-mock-chat-generate-image.command-BA0r4IMn.mjs').then((c) => c.AiManagementChatGenerateImageCommand),
|
|
15522
15509
|
},
|
|
15523
15510
|
{
|
|
15524
15511
|
key: 'AiManagement:ExtractDocumentText',
|
|
@@ -15530,11 +15517,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
15530
15517
|
},
|
|
15531
15518
|
{
|
|
15532
15519
|
key: 'AiManagement:ChatTranscribeSpeech',
|
|
15533
|
-
command: () => import('./acorex-connectivity-mock-chat-transcribe-speech.command-
|
|
15520
|
+
command: () => import('./acorex-connectivity-mock-chat-transcribe-speech.command-BGzXvTnh.mjs').then((c) => c.AiManagementChatTranscribeSpeechCommand),
|
|
15534
15521
|
},
|
|
15535
15522
|
{
|
|
15536
15523
|
key: 'AiManagement:ChatSynthesizeSpeech',
|
|
15537
|
-
command: () => import('./acorex-connectivity-mock-chat-synthesize-speech.command-
|
|
15524
|
+
command: () => import('./acorex-connectivity-mock-chat-synthesize-speech.command-B5-8a7SC.mjs').then((c) => c.AiManagementChatSynthesizeSpeechCommand),
|
|
15538
15525
|
},
|
|
15539
15526
|
]),
|
|
15540
15527
|
],
|
|
@@ -41039,6 +41026,24 @@ const POSITION_ASSIGNMENTS_MOCK = (() => {
|
|
|
41039
41026
|
});
|
|
41040
41027
|
assignedEmployeeIds.add(candidate.id);
|
|
41041
41028
|
});
|
|
41029
|
+
const fatimaEmployee = EMPLOYEES_MOCK.find((e) => e.person?.fullName === 'Fatima Al-Zahra');
|
|
41030
|
+
const sydneyBranch = BUSINESS_UNITS_MOCK.find((bu) => resolveMultiLanguageString(bu.title, 'en-US') === 'Sydney Branch');
|
|
41031
|
+
const salesAssociatePosition = POSITIONS_MOCK.find((position) => resolveMultiLanguageString(position.title, 'en-US') === 'Sales Associate');
|
|
41032
|
+
if (fatimaEmployee && sydneyBranch && salesAssociatePosition) {
|
|
41033
|
+
rows.push({
|
|
41034
|
+
id: uuid$7(),
|
|
41035
|
+
employeeId: fatimaEmployee.id,
|
|
41036
|
+
employee: fatimaEmployee,
|
|
41037
|
+
positionId: salesAssociatePosition.id,
|
|
41038
|
+
position: salesAssociatePosition,
|
|
41039
|
+
businessUnitId: sydneyBranch.id,
|
|
41040
|
+
businessUnit: { id: sydneyBranch.id, title: sydneyBranch.title },
|
|
41041
|
+
startDate: new Date('2026-04-25'),
|
|
41042
|
+
endDate: null,
|
|
41043
|
+
isPrimary: false,
|
|
41044
|
+
notes: '',
|
|
41045
|
+
});
|
|
41046
|
+
}
|
|
41042
41047
|
const byEmployee = new Map();
|
|
41043
41048
|
for (const row of rows) {
|
|
41044
41049
|
const list = byEmployee.get(row.employeeId) ?? [];
|
|
@@ -47690,7 +47695,7 @@ function axmNormalizeChartTitle(value, fallback) {
|
|
|
47690
47695
|
|
|
47691
47696
|
class LocationOrgChartBuilder {
|
|
47692
47697
|
build(context) {
|
|
47693
|
-
const { root, indices, helpers,
|
|
47698
|
+
const { root, indices, helpers, orgRootConfig } = context;
|
|
47694
47699
|
for (const bu of context.data.businessUnits) {
|
|
47695
47700
|
// Enterprise-root BU is merged into the company node on structure charts; here it has no region — omit to avoid a duplicate CEO card on the root.
|
|
47696
47701
|
if (String(bu.id) === AXM_CORPORATE_BUSINESS_UNIT_ID) {
|
|
@@ -47698,13 +47703,10 @@ class LocationOrgChartBuilder {
|
|
|
47698
47703
|
}
|
|
47699
47704
|
const type = indices.buTypeById.get(bu.typeId);
|
|
47700
47705
|
const typeCode = type?.name ?? '';
|
|
47701
|
-
const buNodeType = typeCode === 'division' ? AXMOrgChartNodeType.Division :
|
|
47702
|
-
typeCode === 'department' ? AXMOrgChartNodeType.Department :
|
|
47703
|
-
AXMOrgChartNodeType.Branch;
|
|
47704
47706
|
const regionNode = helpers.ensureRegionPath(bu.geographicRegionId);
|
|
47705
47707
|
const buAssignments = indices.assignmentsByBU.get(String(bu.id)) || [];
|
|
47706
47708
|
const headPositionId = bu.headPositionId != null ? String(bu.headPositionId) : null;
|
|
47707
|
-
const children =
|
|
47709
|
+
const children = helpers.buildPositionNodes(buAssignments, headPositionId);
|
|
47708
47710
|
const subtitle = helpers.buildBusinessUnitHeadSubtitle(bu, buAssignments);
|
|
47709
47711
|
const headPos = headPositionId ? indices.positionById.get(headPositionId) : null;
|
|
47710
47712
|
const headTitleMl = headPos ? axmNormalizeChartTitle(headPos.title, AXM_ORG_CHART_NODE_LABELS.position) : undefined;
|
|
@@ -47715,17 +47717,19 @@ class LocationOrgChartBuilder {
|
|
|
47715
47717
|
const headEmp = headRep ? indices.employeeById.get(headRep.employeeId) : null;
|
|
47716
47718
|
const headName = headEmp ? helpers.getEmployeeDisplayName(headEmp) : undefined;
|
|
47717
47719
|
const headEmpId = headEmp ? String(headEmp.id) : undefined;
|
|
47718
|
-
const vacantHead = !!(
|
|
47720
|
+
const vacantHead = !!(headPositionId && !headName);
|
|
47719
47721
|
const buNode = {
|
|
47720
47722
|
id: AXPDataGenerator.uuid(),
|
|
47721
47723
|
title: bu.title,
|
|
47722
47724
|
subtitle,
|
|
47723
47725
|
description: bu.description,
|
|
47724
|
-
type:
|
|
47726
|
+
type: AXMOrgChartNodeType.BusinessUnit,
|
|
47725
47727
|
icon: typeCode === 'division' ? 'fa-sitemap' : typeCode === 'department' ? 'fa-building-user' : 'fa-network-wired',
|
|
47726
|
-
entity: { id: bu.id,
|
|
47728
|
+
entity: { id: bu.id, type: orgRootConfig.entities.businessUnit.source },
|
|
47727
47729
|
children,
|
|
47728
47730
|
metadata: {
|
|
47731
|
+
isRegional: false,
|
|
47732
|
+
businessUnitKind: typeCode,
|
|
47729
47733
|
chartTemplate: 'merged-unit',
|
|
47730
47734
|
unitHead: headTitleMl != null
|
|
47731
47735
|
? {
|
|
@@ -47753,7 +47757,7 @@ class LocationOrgChartBuilder {
|
|
|
47753
47757
|
|
|
47754
47758
|
class StructureOrgChartBuilder {
|
|
47755
47759
|
build(context) {
|
|
47756
|
-
const { root, indices, helpers,
|
|
47760
|
+
const { root, indices, helpers, orgRootConfig } = context;
|
|
47757
47761
|
// Build BU hierarchy by parent reference if exists; otherwise group by type
|
|
47758
47762
|
const childrenByParent = new Map();
|
|
47759
47763
|
for (const bu of context.data.businessUnits) {
|
|
@@ -47765,12 +47769,9 @@ class StructureOrgChartBuilder {
|
|
|
47765
47769
|
const createBuNode = (bu) => {
|
|
47766
47770
|
const type = indices.buTypeById.get(bu.typeId);
|
|
47767
47771
|
const typeCode = type?.name ?? '';
|
|
47768
|
-
const buNodeType = typeCode === 'division' ? AXMOrgChartNodeType.Division :
|
|
47769
|
-
typeCode === 'department' ? AXMOrgChartNodeType.Department :
|
|
47770
|
-
AXMOrgChartNodeType.Branch;
|
|
47771
47772
|
const buAssignments = indices.assignmentsByBU.get(String(bu.id)) || [];
|
|
47772
47773
|
const headPositionId = bu.headPositionId != null ? String(bu.headPositionId) : null;
|
|
47773
|
-
const children =
|
|
47774
|
+
const children = helpers.buildPositionNodes(buAssignments, headPositionId);
|
|
47774
47775
|
const subtitle = helpers.buildBusinessUnitHeadSubtitle(bu, buAssignments);
|
|
47775
47776
|
const headPos = headPositionId ? indices.positionById.get(headPositionId) : null;
|
|
47776
47777
|
const headTitleMl = headPos ? axmNormalizeChartTitle(headPos.title, AXM_ORG_CHART_NODE_LABELS.position) : undefined;
|
|
@@ -47781,17 +47782,19 @@ class StructureOrgChartBuilder {
|
|
|
47781
47782
|
const headEmp = headRep ? indices.employeeById.get(headRep.employeeId) : null;
|
|
47782
47783
|
const headName = headEmp ? helpers.getEmployeeDisplayName(headEmp) : undefined;
|
|
47783
47784
|
const headEmpId = headEmp ? String(headEmp.id) : undefined;
|
|
47784
|
-
const vacantHead = !!(
|
|
47785
|
+
const vacantHead = !!(headPositionId && !headName);
|
|
47785
47786
|
const node = {
|
|
47786
47787
|
id: AXPDataGenerator.uuid(),
|
|
47787
47788
|
title: bu.title,
|
|
47788
47789
|
subtitle,
|
|
47789
47790
|
description: bu.description,
|
|
47790
|
-
type:
|
|
47791
|
+
type: AXMOrgChartNodeType.BusinessUnit,
|
|
47791
47792
|
icon: typeCode === 'division' ? 'fa-sitemap' : typeCode === 'department' ? 'fa-building-user' : 'fa-network-wired',
|
|
47792
|
-
entity: { id: bu.id,
|
|
47793
|
+
entity: { id: bu.id, type: orgRootConfig.entities.businessUnit.source },
|
|
47793
47794
|
children,
|
|
47794
47795
|
metadata: {
|
|
47796
|
+
isRegional: false,
|
|
47797
|
+
businessUnitKind: typeCode,
|
|
47795
47798
|
chartTemplate: 'merged-unit',
|
|
47796
47799
|
unitHead: headTitleMl != null
|
|
47797
47800
|
? {
|
|
@@ -47876,14 +47879,13 @@ class ReportingOrgChartBuilder {
|
|
|
47876
47879
|
const employee = rep ? context.indices.employeeById.get(rep.employeeId) : null;
|
|
47877
47880
|
const employeeName = employee?.person?.fullName ?? employee?.party?.displayName ?? employee?.fullName ?? null;
|
|
47878
47881
|
const employeeRole = employee?.role?.title ?? null;
|
|
47879
|
-
const includeEmployees = context.includeEmployees;
|
|
47880
47882
|
const isManagerSeat = pos?.isManager === true;
|
|
47881
|
-
const useInlineEmployee =
|
|
47882
|
-
const useChildEmployeeNode =
|
|
47883
|
+
const useInlineEmployee = isManagerSeat;
|
|
47884
|
+
const useChildEmployeeNode = !!(employee && !isManagerSeat);
|
|
47883
47885
|
const positionChildren = childrenByManager.get(positionId) || [];
|
|
47884
47886
|
const childPositionNodes = positionChildren.map((childPosId) => createPositionNode(childPosId));
|
|
47885
47887
|
const posTitleMl = axmNormalizeChartTitle(pos?.title, AXM_ORG_CHART_NODE_LABELS.position);
|
|
47886
|
-
const chartTemplate = isManagerSeat
|
|
47888
|
+
const chartTemplate = isManagerSeat ? 'merged-manager' : 'position-ic';
|
|
47887
47889
|
const positionMetadata = {
|
|
47888
47890
|
chartTemplate,
|
|
47889
47891
|
occupant: employeeName
|
|
@@ -47893,7 +47895,7 @@ class ReportingOrgChartBuilder {
|
|
|
47893
47895
|
roleTitle: employeeRole ?? undefined,
|
|
47894
47896
|
}
|
|
47895
47897
|
: undefined,
|
|
47896
|
-
vacant:
|
|
47898
|
+
vacant: !employeeName,
|
|
47897
47899
|
stats: { directReports: positionChildren.length },
|
|
47898
47900
|
};
|
|
47899
47901
|
const employeeNodes = useChildEmployeeNode
|
|
@@ -47907,7 +47909,7 @@ class ReportingOrgChartBuilder {
|
|
|
47907
47909
|
icon: 'fa-address-card',
|
|
47908
47910
|
entity: {
|
|
47909
47911
|
id: String(employee.id),
|
|
47910
|
-
|
|
47912
|
+
type: context.hcmRootConfig.entities.employee.source,
|
|
47911
47913
|
},
|
|
47912
47914
|
metadata: {
|
|
47913
47915
|
chartTemplate: 'employee-card',
|
|
@@ -47924,41 +47926,71 @@ class ReportingOrgChartBuilder {
|
|
|
47924
47926
|
title: posTitleMl,
|
|
47925
47927
|
subtitle: useInlineEmployee
|
|
47926
47928
|
? subtitleWhenCompact
|
|
47927
|
-
:
|
|
47928
|
-
? employeeName
|
|
47929
|
-
? undefined
|
|
47930
|
-
: AXM_ORG_CHART_NODE_LABELS.vacant
|
|
47931
|
-
: subtitleWhenCompact,
|
|
47932
|
-
description: useInlineEmployee
|
|
47933
|
-
? employeeRole ?? undefined
|
|
47934
|
-
: includeEmployees || !employeeName
|
|
47929
|
+
: employeeName
|
|
47935
47930
|
? undefined
|
|
47936
|
-
:
|
|
47937
|
-
|
|
47938
|
-
: undefined,
|
|
47931
|
+
: AXM_ORG_CHART_NODE_LABELS.vacant,
|
|
47932
|
+
description: useInlineEmployee ? employeeRole ?? undefined : undefined,
|
|
47939
47933
|
type: AXMOrgChartNodeType.Position,
|
|
47940
47934
|
icon: 'fa-user-tie',
|
|
47941
|
-
entity: { id: positionId,
|
|
47935
|
+
entity: { id: positionId, type: context.orgRootConfig.entities.position.source },
|
|
47942
47936
|
metadata: positionMetadata,
|
|
47943
47937
|
children: [...employeeNodes, ...childPositionNodes],
|
|
47944
47938
|
isExpanded: true,
|
|
47945
47939
|
};
|
|
47946
47940
|
return node;
|
|
47947
47941
|
};
|
|
47948
|
-
// Top managers: positions without a manager
|
|
47949
|
-
|
|
47950
|
-
|
|
47942
|
+
// Top managers: positions without a manager. The executive seat (CEO) is already shown
|
|
47943
|
+
// on the company node (topRole), so we skip the duplicate position card. Direct reports
|
|
47944
|
+
// of the CEO are promoted to sit under the company root so the tree shape is unchanged.
|
|
47945
|
+
const rawTops = childrenByManager.get(undefined) || [];
|
|
47946
|
+
const ceoPositionId = ReportingOrgChartBuilder.findCeoPositionId(context);
|
|
47947
|
+
const reportRootsToAdd = [];
|
|
47948
|
+
const addRoot = (id) => {
|
|
47949
|
+
const s = String(id);
|
|
47950
|
+
if (!reportRootsToAdd.includes(s)) {
|
|
47951
|
+
reportRootsToAdd.push(s);
|
|
47952
|
+
}
|
|
47953
|
+
};
|
|
47954
|
+
if (ceoPositionId != null && rawTops.some((id) => String(id) === String(ceoPositionId))) {
|
|
47955
|
+
for (const id of rawTops) {
|
|
47956
|
+
if (String(id) !== String(ceoPositionId)) {
|
|
47957
|
+
addRoot(String(id));
|
|
47958
|
+
}
|
|
47959
|
+
}
|
|
47960
|
+
for (const id of childrenByManager.get(ceoPositionId) || []) {
|
|
47961
|
+
addRoot(String(id));
|
|
47962
|
+
}
|
|
47963
|
+
}
|
|
47964
|
+
else {
|
|
47965
|
+
for (const id of rawTops) {
|
|
47966
|
+
addRoot(String(id));
|
|
47967
|
+
}
|
|
47968
|
+
}
|
|
47969
|
+
for (const posId of reportRootsToAdd) {
|
|
47951
47970
|
root.children.push(createPositionNode(posId));
|
|
47952
47971
|
}
|
|
47953
47972
|
return root;
|
|
47954
47973
|
}
|
|
47974
|
+
/**
|
|
47975
|
+
* Same CEO / chief-executive detection as {@link AXMOrgChartGenerateCommand.augmentCompanyNodeWithTopRole}
|
|
47976
|
+
* so reporting roots stay aligned with the company card.
|
|
47977
|
+
*/
|
|
47978
|
+
static findCeoPositionId(context) {
|
|
47979
|
+
for (const p of context.data.positions) {
|
|
47980
|
+
const txt = resolveMultiLanguageString(axmNormalizeChartTitle(p?.title, AXM_ORG_CHART_NODE_LABELS.position), 'en-US').toLowerCase();
|
|
47981
|
+
if (txt.includes('ceo') || txt.includes('chief executive')) {
|
|
47982
|
+
return String(p.id);
|
|
47983
|
+
}
|
|
47984
|
+
}
|
|
47985
|
+
return null;
|
|
47986
|
+
}
|
|
47955
47987
|
collectAssignmentsForPosition(context, positionId) {
|
|
47956
47988
|
const result = [];
|
|
47957
47989
|
for (const [_buId, list] of context.indices.assignmentsByBU.entries()) {
|
|
47958
47990
|
for (const a of list) {
|
|
47959
47991
|
if (String(a.positionId) !== String(positionId))
|
|
47960
47992
|
continue;
|
|
47961
|
-
if (!context.helpers.isActiveAssignment(a, context.now
|
|
47993
|
+
if (!context.helpers.isActiveAssignment(a, context.now))
|
|
47962
47994
|
continue;
|
|
47963
47995
|
result.push(a);
|
|
47964
47996
|
}
|
|
@@ -47989,8 +48021,6 @@ class AXMOrgChartGenerateCommand {
|
|
|
47989
48021
|
//#region ---- Command Execution ----
|
|
47990
48022
|
async execute(input) {
|
|
47991
48023
|
try {
|
|
47992
|
-
const includeEmployees = input?.includeEmployees !== false;
|
|
47993
|
-
const preferPrimary = input?.preferPrimary !== false;
|
|
47994
48024
|
const mode = input?.mode ?? 'location';
|
|
47995
48025
|
const now = new Date();
|
|
47996
48026
|
// Build root from tenant (virtual root)
|
|
@@ -47999,7 +48029,7 @@ class AXMOrgChartGenerateCommand {
|
|
|
47999
48029
|
id: AXPDataGenerator.uuid(),
|
|
48000
48030
|
title: axmNormalizeChartTitle(tenant?.title, AXM_ORG_CHART_NODE_LABELS.demoOrganization),
|
|
48001
48031
|
type: AXMOrgChartNodeType.Company,
|
|
48002
|
-
entity: tenant ? { id: tenant.id,
|
|
48032
|
+
entity: tenant ? { id: tenant.id, type: 'tenant' } : undefined,
|
|
48003
48033
|
isExpanded: true,
|
|
48004
48034
|
icon: 'fa-building',
|
|
48005
48035
|
children: [],
|
|
@@ -48013,8 +48043,8 @@ class AXMOrgChartGenerateCommand {
|
|
|
48013
48043
|
this.storage.getAll(geographicRegionSource),
|
|
48014
48044
|
]);
|
|
48015
48045
|
const [employees, assignments] = await Promise.all([
|
|
48016
|
-
|
|
48017
|
-
|
|
48046
|
+
this.storage.getAll(RootConfig$j.entities.employee.source),
|
|
48047
|
+
this.storage.getAll(RootConfig$j.entities.positionAssignment.source),
|
|
48018
48048
|
]);
|
|
48019
48049
|
// Index for quick lookups
|
|
48020
48050
|
const businessUnitById = new Map(businessUnits.map((d) => [d.id, d]));
|
|
@@ -48024,15 +48054,13 @@ class AXMOrgChartGenerateCommand {
|
|
|
48024
48054
|
const employeeById = new Map(employees.map((e) => [e.id, e]));
|
|
48025
48055
|
// Group assignments by BusinessUnit
|
|
48026
48056
|
const assignmentsByBU = new Map();
|
|
48027
|
-
|
|
48028
|
-
|
|
48029
|
-
|
|
48030
|
-
|
|
48031
|
-
|
|
48032
|
-
|
|
48033
|
-
|
|
48034
|
-
assignmentsByBU.set(key, list);
|
|
48035
|
-
}
|
|
48057
|
+
for (const a of assignments) {
|
|
48058
|
+
if (!this.isActiveAssignment(a, now))
|
|
48059
|
+
continue;
|
|
48060
|
+
const key = String(a.businessUnitId);
|
|
48061
|
+
const list = assignmentsByBU.get(key) || [];
|
|
48062
|
+
list.push(a);
|
|
48063
|
+
assignmentsByBU.set(key, list);
|
|
48036
48064
|
}
|
|
48037
48065
|
// Choose a representative assignment per position (primary or latest)
|
|
48038
48066
|
const chooseRepresentativeAssignment = (list) => {
|
|
@@ -48060,21 +48088,22 @@ class AXMOrgChartGenerateCommand {
|
|
|
48060
48088
|
let currentNode = null;
|
|
48061
48089
|
for (const region of chain) {
|
|
48062
48090
|
const code = String(region?.type?.code ?? '').toLowerCase();
|
|
48063
|
-
const nodeType =
|
|
48064
|
-
? AXMOrgChartNodeType.Country
|
|
48065
|
-
: code === 'state'
|
|
48066
|
-
? AXMOrgChartNodeType.State
|
|
48067
|
-
: AXMOrgChartNodeType.City;
|
|
48091
|
+
const nodeType = AXMOrgChartNodeType.BusinessUnit;
|
|
48068
48092
|
let node = currentParentChildren.find((c) => c.entity?.id === region.id && c.type === nodeType);
|
|
48069
48093
|
if (!node) {
|
|
48094
|
+
const regionLevel = code === 'country' ? 'country' : code === 'state' ? 'state' : 'city';
|
|
48070
48095
|
node = {
|
|
48071
48096
|
id: AXPDataGenerator.uuid(),
|
|
48072
48097
|
title: axmNormalizeChartTitle(region.title, AXM_ORG_CHART_NODE_LABELS.region),
|
|
48073
48098
|
type: nodeType,
|
|
48074
|
-
icon:
|
|
48075
|
-
entity: { id: region.id,
|
|
48099
|
+
icon: regionLevel === 'country' ? 'fa-globe' : regionLevel === 'state' ? 'fa-map' : 'fa-city',
|
|
48100
|
+
entity: { id: region.id, type: geographicRegionSource },
|
|
48076
48101
|
isExpanded: true,
|
|
48077
48102
|
children: [],
|
|
48103
|
+
metadata: {
|
|
48104
|
+
isRegional: true,
|
|
48105
|
+
regionLevel,
|
|
48106
|
+
},
|
|
48078
48107
|
};
|
|
48079
48108
|
currentParentChildren.push(node);
|
|
48080
48109
|
}
|
|
@@ -48100,9 +48129,6 @@ class AXMOrgChartGenerateCommand {
|
|
|
48100
48129
|
const headFa = resolveMultiLanguageString(AXM_ORG_CHART_NODE_LABELS.headPrefix, 'fa-IR');
|
|
48101
48130
|
const posEn = resolveMultiLanguageString(posTitleMl, 'en-US');
|
|
48102
48131
|
const posFa = resolveMultiLanguageString(posTitleMl, 'fa-IR');
|
|
48103
|
-
if (!includeEmployees) {
|
|
48104
|
-
return { 'en-US': `${headEn}: ${posEn}`, 'fa-IR': `${headFa}: ${posFa}` };
|
|
48105
|
-
}
|
|
48106
48132
|
const headAssignments = buAssignments.filter((a) => String(a.positionId) === headPid);
|
|
48107
48133
|
const rep = chooseRepresentativeAssignment(headAssignments);
|
|
48108
48134
|
const employee = rep ? employeeById.get(rep.employeeId) : null;
|
|
@@ -48120,7 +48146,7 @@ class AXMOrgChartGenerateCommand {
|
|
|
48120
48146
|
'fa-IR': `${headFa}: ${posFa} · ${vFa}`,
|
|
48121
48147
|
};
|
|
48122
48148
|
};
|
|
48123
|
-
const managerResolutionCtx = axcBuildManagerResolutionContext(businessUnits, positions, assignments, now,
|
|
48149
|
+
const managerResolutionCtx = axcBuildManagerResolutionContext(businessUnits, positions, assignments, now, true);
|
|
48124
48150
|
const managerByEmployeeId = new Map();
|
|
48125
48151
|
for (const employee of employees) {
|
|
48126
48152
|
const mid = axcResolveManagerEmployeeId(String(employee.id), managerResolutionCtx);
|
|
@@ -48134,7 +48160,7 @@ class AXMOrgChartGenerateCommand {
|
|
|
48134
48160
|
});
|
|
48135
48161
|
}
|
|
48136
48162
|
}
|
|
48137
|
-
// Build Position nodes. Manager seats (isManager): show incumbent on the same card. Non-manager
|
|
48163
|
+
// Build Position nodes. Manager seats (isManager): show incumbent on the same card. Non-manager: child Employee node.
|
|
48138
48164
|
const buildPositionNodes = (scopeAssignments, excludePositionId) => {
|
|
48139
48165
|
const excluded = excludePositionId != null && excludePositionId !== '' ? String(excludePositionId) : null;
|
|
48140
48166
|
const byPosition = new Map();
|
|
@@ -48156,11 +48182,11 @@ class AXMOrgChartGenerateCommand {
|
|
|
48156
48182
|
const employeeRole = employee?.role?.title ?? null;
|
|
48157
48183
|
const manager = employee ? managerByEmployeeId.get(String(employee.id)) : undefined;
|
|
48158
48184
|
const isManagerSeat = pos?.isManager === true;
|
|
48159
|
-
const useInlineEmployee =
|
|
48160
|
-
const useChildEmployeeNode =
|
|
48185
|
+
const useInlineEmployee = isManagerSeat;
|
|
48186
|
+
const useChildEmployeeNode = !!(employee && !isManagerSeat);
|
|
48161
48187
|
const posTitleMl = axmNormalizeChartTitle(pos?.title, AXM_ORG_CHART_NODE_LABELS.position);
|
|
48162
48188
|
const directReportsCount = positions.filter((p) => String(p.reportsToPositionId ?? '') === String(positionId)).length;
|
|
48163
|
-
const chartTemplate = isManagerSeat
|
|
48189
|
+
const chartTemplate = isManagerSeat ? 'merged-manager' : 'position-ic';
|
|
48164
48190
|
const positionMetadata = {
|
|
48165
48191
|
chartTemplate,
|
|
48166
48192
|
occupant: employeeName
|
|
@@ -48170,7 +48196,7 @@ class AXMOrgChartGenerateCommand {
|
|
|
48170
48196
|
roleTitle: employeeRole ?? undefined,
|
|
48171
48197
|
}
|
|
48172
48198
|
: undefined,
|
|
48173
|
-
vacant:
|
|
48199
|
+
vacant: !employeeName,
|
|
48174
48200
|
stats: { directReports: directReportsCount },
|
|
48175
48201
|
};
|
|
48176
48202
|
if (manager) {
|
|
@@ -48187,7 +48213,7 @@ class AXMOrgChartGenerateCommand {
|
|
|
48187
48213
|
icon: 'fa-address-card',
|
|
48188
48214
|
entity: {
|
|
48189
48215
|
id: String(employee.id),
|
|
48190
|
-
|
|
48216
|
+
type: RootConfig$j.entities.employee.source,
|
|
48191
48217
|
},
|
|
48192
48218
|
metadata: {
|
|
48193
48219
|
chartTemplate: 'employee-card',
|
|
@@ -48204,21 +48230,13 @@ class AXMOrgChartGenerateCommand {
|
|
|
48204
48230
|
title: posTitleMl,
|
|
48205
48231
|
subtitle: useInlineEmployee
|
|
48206
48232
|
? subtitleWhenCompact
|
|
48207
|
-
:
|
|
48208
|
-
? employeeName
|
|
48209
|
-
? undefined
|
|
48210
|
-
: AXM_ORG_CHART_NODE_LABELS.vacant
|
|
48211
|
-
: subtitleWhenCompact,
|
|
48212
|
-
description: useInlineEmployee
|
|
48213
|
-
? employeeRole ?? undefined
|
|
48214
|
-
: includeEmployees || !employeeName
|
|
48233
|
+
: employeeName
|
|
48215
48234
|
? undefined
|
|
48216
|
-
:
|
|
48217
|
-
|
|
48218
|
-
: undefined,
|
|
48235
|
+
: AXM_ORG_CHART_NODE_LABELS.vacant,
|
|
48236
|
+
description: useInlineEmployee ? employeeRole ?? undefined : undefined,
|
|
48219
48237
|
type: AXMOrgChartNodeType.Position,
|
|
48220
48238
|
icon: 'fa-user-tie',
|
|
48221
|
-
entity: { id: positionId,
|
|
48239
|
+
entity: { id: positionId, type: RootConfig$k.entities.position.source },
|
|
48222
48240
|
metadata: positionMetadata,
|
|
48223
48241
|
children: employeeChildren.length ? employeeChildren : undefined,
|
|
48224
48242
|
isExpanded: true,
|
|
@@ -48226,20 +48244,18 @@ class AXMOrgChartGenerateCommand {
|
|
|
48226
48244
|
}
|
|
48227
48245
|
return nodes;
|
|
48228
48246
|
};
|
|
48247
|
+
/** Applies the same company-root card (merged-executive + CEO row + stats) in every chart mode. */
|
|
48229
48248
|
const augmentCompanyNodeWithTopRole = () => {
|
|
48230
|
-
if (mode !== 'structure') {
|
|
48231
|
-
return;
|
|
48232
|
-
}
|
|
48233
48249
|
const ceoPos = positions.find((p) => {
|
|
48234
48250
|
const txt = resolveMultiLanguageString(axmNormalizeChartTitle(p?.title, AXM_ORG_CHART_NODE_LABELS.position), 'en-US').toLowerCase();
|
|
48235
48251
|
return txt.includes('ceo') || txt.includes('chief executive');
|
|
48236
48252
|
});
|
|
48237
48253
|
let assignList = [];
|
|
48238
|
-
if (ceoPos
|
|
48254
|
+
if (ceoPos) {
|
|
48239
48255
|
for (const a of assignments) {
|
|
48240
48256
|
if (String(a.positionId) !== String(ceoPos.id))
|
|
48241
48257
|
continue;
|
|
48242
|
-
if (!this.isActiveAssignment(a, now
|
|
48258
|
+
if (!this.isActiveAssignment(a, now))
|
|
48243
48259
|
continue;
|
|
48244
48260
|
assignList.push(a);
|
|
48245
48261
|
}
|
|
@@ -48254,7 +48270,7 @@ class AXMOrgChartGenerateCommand {
|
|
|
48254
48270
|
positionId: String(ceoPos.id),
|
|
48255
48271
|
employeeName: ceoName,
|
|
48256
48272
|
employeeId: emp ? String(emp.id) : undefined,
|
|
48257
|
-
vacant:
|
|
48273
|
+
vacant: !ceoName,
|
|
48258
48274
|
}
|
|
48259
48275
|
: undefined;
|
|
48260
48276
|
root.metadata = {
|
|
@@ -48268,8 +48284,6 @@ class AXMOrgChartGenerateCommand {
|
|
|
48268
48284
|
// Build context for selected builder
|
|
48269
48285
|
const ctx = {
|
|
48270
48286
|
now,
|
|
48271
|
-
includeEmployees,
|
|
48272
|
-
preferPrimary,
|
|
48273
48287
|
orgRootConfig: RootConfig$k,
|
|
48274
48288
|
hcmRootConfig: RootConfig$j,
|
|
48275
48289
|
root,
|
|
@@ -48329,15 +48343,13 @@ class AXMOrgChartGenerateCommand {
|
|
|
48329
48343
|
}
|
|
48330
48344
|
//#endregion
|
|
48331
48345
|
//#region ---- Utility Methods ----
|
|
48332
|
-
isActiveAssignment(a, now
|
|
48346
|
+
isActiveAssignment(a, now) {
|
|
48333
48347
|
const start = a?.startDate ? new Date(a.startDate) : null;
|
|
48334
48348
|
const end = a?.endDate ? new Date(a.endDate) : null;
|
|
48335
48349
|
const isActiveDates = (!!start ? start <= now : true) && (!!end ? end > now : true);
|
|
48336
48350
|
if (!isActiveDates)
|
|
48337
48351
|
return false;
|
|
48338
|
-
|
|
48339
|
-
return a?.isPrimary === true;
|
|
48340
|
-
return true;
|
|
48352
|
+
return a?.isPrimary === true;
|
|
48341
48353
|
}
|
|
48342
48354
|
generateVersion() {
|
|
48343
48355
|
// Simple timestamp-based version for mocks
|
|
@@ -48802,10 +48814,7 @@ const AXCMockOrgChartEventListener = {
|
|
|
48802
48814
|
try {
|
|
48803
48815
|
// Execute org chart generation command via command service
|
|
48804
48816
|
const commandService = inject(AXPCommandService);
|
|
48805
|
-
const result = await commandService.execute('OrganizationManagement.OrgChart:Generate', {
|
|
48806
|
-
includeEmployees: true,
|
|
48807
|
-
preferPrimary: true
|
|
48808
|
-
});
|
|
48817
|
+
const result = await commandService.execute('OrganizationManagement.OrgChart:Generate', {});
|
|
48809
48818
|
// Log successful regeneration
|
|
48810
48819
|
// eslint-disable-next-line no-console
|
|
48811
48820
|
console.log('[Mock Org Chart Event]', {
|
|
@@ -60857,195 +60866,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
60857
60866
|
type: Injectable
|
|
60858
60867
|
}] });
|
|
60859
60868
|
|
|
60860
|
-
class AXMWorkflowDashboardChartDataSourceDefinition {
|
|
60861
|
-
constructor() {
|
|
60862
|
-
this.colorVars500 = [
|
|
60863
|
-
'--ax-sys-color-primary-500',
|
|
60864
|
-
'--ax-sys-color-secondary-500',
|
|
60865
|
-
'--ax-sys-color-success-500',
|
|
60866
|
-
'--ax-sys-color-warning-500',
|
|
60867
|
-
'--ax-sys-color-danger-500',
|
|
60868
|
-
'--ax-sys-color-accent1-500',
|
|
60869
|
-
'--ax-sys-color-accent2-500',
|
|
60870
|
-
'--ax-sys-color-accent3-500',
|
|
60871
|
-
'--ax-sys-color-neutral-500',
|
|
60872
|
-
];
|
|
60873
|
-
this.pendingApprovalByAgeItems = this.withRandomColor([
|
|
60874
|
-
{ id: '0-24h', label: '0-24h', value: 24 },
|
|
60875
|
-
{ id: '1-3d', label: '1-3d', value: 37 },
|
|
60876
|
-
{ id: '4-7d', label: '4-7d', value: 19 },
|
|
60877
|
-
{ id: '>7d', label: '>7d', value: 11 },
|
|
60878
|
-
]);
|
|
60879
|
-
this.workloadByProcessItems = this.withRandomColor([
|
|
60880
|
-
{ id: 'procurement', name: 'Procurement', value: 34 },
|
|
60881
|
-
{ id: 'onboarding', name: 'Employee Onboarding', value: 27 },
|
|
60882
|
-
{ id: 'incident', name: 'Incident Review', value: 18 },
|
|
60883
|
-
{ id: 'leave', name: 'Leave Request', value: 13 },
|
|
60884
|
-
{ id: 'access', name: 'Access Request', value: 8 },
|
|
60885
|
-
]);
|
|
60886
|
-
this.slaComplianceItems = 86;
|
|
60887
|
-
this.throughputItems = this.buildThroughputItems();
|
|
60888
|
-
this.workflowPendingApprovalByAgeDataSource = {
|
|
60889
|
-
name: 'workflow-pending-approval-by-age',
|
|
60890
|
-
title: 'Workflow Pending Approval by Age',
|
|
60891
|
-
columns: [
|
|
60892
|
-
{ name: 'id', title: 'Id', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60893
|
-
{ name: 'label', title: 'Label', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60894
|
-
{ name: 'value', title: 'Value', type: AXPWidgetsCatalog.number, datatype: 'number' },
|
|
60895
|
-
{ name: 'color', title: 'Color', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60896
|
-
],
|
|
60897
|
-
filters: [],
|
|
60898
|
-
textField: { name: 'label', title: 'Label' },
|
|
60899
|
-
valueField: { name: 'id', title: 'Id' },
|
|
60900
|
-
samples: this.pendingApprovalByAgeItems,
|
|
60901
|
-
source: () => new AXDataSource({
|
|
60902
|
-
pageSize: 20,
|
|
60903
|
-
key: 'id',
|
|
60904
|
-
load: async () => ({
|
|
60905
|
-
items: this.pendingApprovalByAgeItems,
|
|
60906
|
-
total: this.pendingApprovalByAgeItems.length,
|
|
60907
|
-
}),
|
|
60908
|
-
byKey: async (key) => this.pendingApprovalByAgeItems.find((item) => item.id === key),
|
|
60909
|
-
}),
|
|
60910
|
-
};
|
|
60911
|
-
this.workflowWorkloadByProcessDataSource = {
|
|
60912
|
-
name: 'workflow-workload-by-process',
|
|
60913
|
-
title: 'Workflow Workload by Process',
|
|
60914
|
-
columns: [
|
|
60915
|
-
{ name: 'id', title: 'Id', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60916
|
-
{ name: 'name', title: 'Name', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60917
|
-
{ name: 'value', title: 'Value', type: AXPWidgetsCatalog.number, datatype: 'number' },
|
|
60918
|
-
{ name: 'color', title: 'Color', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60919
|
-
],
|
|
60920
|
-
filters: [],
|
|
60921
|
-
textField: { name: 'name', title: 'Name' },
|
|
60922
|
-
valueField: { name: 'id', title: 'Id' },
|
|
60923
|
-
samples: this.workloadByProcessItems,
|
|
60924
|
-
source: () => new AXDataSource({
|
|
60925
|
-
pageSize: 20,
|
|
60926
|
-
key: 'id',
|
|
60927
|
-
load: async () => ({
|
|
60928
|
-
items: this.workloadByProcessItems,
|
|
60929
|
-
total: this.workloadByProcessItems.length,
|
|
60930
|
-
}),
|
|
60931
|
-
byKey: async (key) => this.workloadByProcessItems.find((item) => item.id === key),
|
|
60932
|
-
}),
|
|
60933
|
-
};
|
|
60934
|
-
this.workflowSlaComplianceDataSource = {
|
|
60935
|
-
name: 'workflow-sla-compliance',
|
|
60936
|
-
title: 'Workflow SLA Compliance',
|
|
60937
|
-
columns: [
|
|
60938
|
-
{ name: 'id', title: 'Id', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60939
|
-
{ name: 'value', title: 'Value', type: AXPWidgetsCatalog.number, datatype: 'number' },
|
|
60940
|
-
],
|
|
60941
|
-
filters: [],
|
|
60942
|
-
textField: { name: 'id', title: 'Id' },
|
|
60943
|
-
valueField: { name: 'id', title: 'Id' },
|
|
60944
|
-
samples: this.slaComplianceItems,
|
|
60945
|
-
source: () => 86,
|
|
60946
|
-
};
|
|
60947
|
-
this.workflowThroughputLast8WeeksDataSource = {
|
|
60948
|
-
name: 'workflow-throughput-last-8-weeks',
|
|
60949
|
-
title: 'Workflow Throughput Last 8 Weeks',
|
|
60950
|
-
columns: [
|
|
60951
|
-
{ name: 'id', title: 'Id', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60952
|
-
{ name: 'label', title: 'Label', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60953
|
-
{ name: 'lineColor', title: 'Line Color', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60954
|
-
{ name: 'fillColor', title: 'Fill Color', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
60955
|
-
{ name: 'data', title: 'Data Points', type: AXPWidgetsCatalog.text, datatype: 'array' },
|
|
60956
|
-
],
|
|
60957
|
-
filters: [],
|
|
60958
|
-
textField: { name: 'label', title: 'Label' },
|
|
60959
|
-
valueField: { name: 'id', title: 'Id' },
|
|
60960
|
-
samples: this.throughputItems,
|
|
60961
|
-
source: () => new AXDataSource({
|
|
60962
|
-
pageSize: 10,
|
|
60963
|
-
key: 'id',
|
|
60964
|
-
load: async () => ({
|
|
60965
|
-
items: this.throughputItems,
|
|
60966
|
-
total: this.throughputItems.length,
|
|
60967
|
-
}),
|
|
60968
|
-
byKey: async (key) => this.throughputItems.find((item) => item.id === key),
|
|
60969
|
-
}),
|
|
60970
|
-
};
|
|
60971
|
-
}
|
|
60972
|
-
pickColorVar() {
|
|
60973
|
-
return this.colorVars500[Math.floor(Math.random() * this.colorVars500.length)];
|
|
60974
|
-
}
|
|
60975
|
-
getUniqueColorVars(count) {
|
|
60976
|
-
const shuffled = [...this.colorVars500].sort(() => Math.random() - 0.5);
|
|
60977
|
-
if (count <= shuffled.length) {
|
|
60978
|
-
return shuffled.slice(0, count);
|
|
60979
|
-
}
|
|
60980
|
-
const colors = [];
|
|
60981
|
-
for (let i = 0; i < count; i++) {
|
|
60982
|
-
colors.push(shuffled[i % shuffled.length]);
|
|
60983
|
-
}
|
|
60984
|
-
return colors;
|
|
60985
|
-
}
|
|
60986
|
-
asRgbVar(colorVar) {
|
|
60987
|
-
return `rgb(var(${colorVar}))`;
|
|
60988
|
-
}
|
|
60989
|
-
asRgbVarWithAlpha(colorVar, alpha) {
|
|
60990
|
-
return `rgb(var(${colorVar}) / ${alpha})`;
|
|
60991
|
-
}
|
|
60992
|
-
withRandomColor(items) {
|
|
60993
|
-
const colorVars = this.getUniqueColorVars(items.length);
|
|
60994
|
-
return items.map((item, index) => {
|
|
60995
|
-
const colorVar = colorVars[index];
|
|
60996
|
-
return {
|
|
60997
|
-
...item,
|
|
60998
|
-
color: this.asRgbVar(colorVar),
|
|
60999
|
-
};
|
|
61000
|
-
});
|
|
61001
|
-
}
|
|
61002
|
-
buildThroughputItems() {
|
|
61003
|
-
const [createdVar, completedVar] = this.getUniqueColorVars(2);
|
|
61004
|
-
return [
|
|
61005
|
-
{
|
|
61006
|
-
id: 'created',
|
|
61007
|
-
label: 'Created',
|
|
61008
|
-
lineColor: this.asRgbVar(createdVar),
|
|
61009
|
-
fillColor: this.asRgbVarWithAlpha(createdVar, 0.12),
|
|
61010
|
-
data: [
|
|
61011
|
-
{ x: 1, y: 86 },
|
|
61012
|
-
{ x: 2, y: 79 },
|
|
61013
|
-
{ x: 3, y: 92 },
|
|
61014
|
-
{ x: 4, y: 97 },
|
|
61015
|
-
{ x: 5, y: 88 },
|
|
61016
|
-
{ x: 6, y: 101 },
|
|
61017
|
-
{ x: 7, y: 94 },
|
|
61018
|
-
{ x: 8, y: 99 },
|
|
61019
|
-
],
|
|
61020
|
-
},
|
|
61021
|
-
{
|
|
61022
|
-
id: 'completed',
|
|
61023
|
-
label: 'Completed',
|
|
61024
|
-
lineColor: this.asRgbVar(completedVar),
|
|
61025
|
-
fillColor: this.asRgbVarWithAlpha(completedVar, 0.12),
|
|
61026
|
-
data: [
|
|
61027
|
-
{ x: 1, y: 72 },
|
|
61028
|
-
{ x: 2, y: 75 },
|
|
61029
|
-
{ x: 3, y: 81 },
|
|
61030
|
-
{ x: 4, y: 85 },
|
|
61031
|
-
{ x: 5, y: 83 },
|
|
61032
|
-
{ x: 6, y: 89 },
|
|
61033
|
-
{ x: 7, y: 87 },
|
|
61034
|
-
{ x: 8, y: 90 },
|
|
61035
|
-
],
|
|
61036
|
-
},
|
|
61037
|
-
];
|
|
61038
|
-
}
|
|
61039
|
-
async items() {
|
|
61040
|
-
return [
|
|
61041
|
-
this.workflowPendingApprovalByAgeDataSource,
|
|
61042
|
-
this.workflowWorkloadByProcessDataSource,
|
|
61043
|
-
this.workflowSlaComplianceDataSource,
|
|
61044
|
-
this.workflowThroughputLast8WeeksDataSource,
|
|
61045
|
-
];
|
|
61046
|
-
}
|
|
61047
|
-
}
|
|
61048
|
-
|
|
61049
60869
|
//#endregion
|
|
61050
60870
|
//#region ---- Dexie DB ----
|
|
61051
60871
|
/**
|
|
@@ -63480,11 +63300,7 @@ class AXCWorkflowManagementMockModule {
|
|
|
63480
63300
|
useClass: AXCWorkflowCategorySeeder,
|
|
63481
63301
|
multi: true,
|
|
63482
63302
|
},
|
|
63483
|
-
{
|
|
63484
|
-
provide: AXP_DATASOURCE_DEFINITION_PROVIDER,
|
|
63485
|
-
useClass: AXMWorkflowDashboardChartDataSourceDefinition,
|
|
63486
|
-
multi: true,
|
|
63487
|
-
},
|
|
63303
|
+
provideLazyProvider(AXP_DATASOURCE_DEFINITION_PROVIDER, () => Promise.resolve().then(function () { return index; }).then((m) => m.AXMWorkflowDashboardChartDataSourceDefinition)),
|
|
63488
63304
|
// Generic workflow trigger - starts workflows by binding (entityTypes + eventTypes) only
|
|
63489
63305
|
{ provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: workflowTriggerMiddleware },
|
|
63490
63306
|
// Document-specific: starts documentReview with EDMS rules (create/update, requiresReview, in-review)
|
|
@@ -63586,11 +63402,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
63586
63402
|
useClass: AXCWorkflowCategorySeeder,
|
|
63587
63403
|
multi: true,
|
|
63588
63404
|
},
|
|
63589
|
-
{
|
|
63590
|
-
provide: AXP_DATASOURCE_DEFINITION_PROVIDER,
|
|
63591
|
-
useClass: AXMWorkflowDashboardChartDataSourceDefinition,
|
|
63592
|
-
multi: true,
|
|
63593
|
-
},
|
|
63405
|
+
provideLazyProvider(AXP_DATASOURCE_DEFINITION_PROVIDER, () => Promise.resolve().then(function () { return index; }).then((m) => m.AXMWorkflowDashboardChartDataSourceDefinition)),
|
|
63594
63406
|
// Generic workflow trigger - starts workflows by binding (entityTypes + eventTypes) only
|
|
63595
63407
|
{ provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: workflowTriggerMiddleware },
|
|
63596
63408
|
// Document-specific: starts documentReview with EDMS rules (create/update, requiresReview, in-review)
|
|
@@ -64057,6 +63869,558 @@ class AXPTaskBoardPlatformManagementTaskProvider extends AXPWorkflowTaskProvider
|
|
|
64057
63869
|
}
|
|
64058
63870
|
}
|
|
64059
63871
|
|
|
63872
|
+
class AXMWorkflowDashboardChartDataSourceDefinition {
|
|
63873
|
+
constructor() {
|
|
63874
|
+
//#region ---- Color helpers ----
|
|
63875
|
+
this.colorVars500 = [
|
|
63876
|
+
'--ax-sys-color-primary-500',
|
|
63877
|
+
'--ax-sys-color-secondary-500',
|
|
63878
|
+
'--ax-sys-color-success-500',
|
|
63879
|
+
'--ax-sys-color-warning-500',
|
|
63880
|
+
'--ax-sys-color-danger-500',
|
|
63881
|
+
'--ax-sys-color-accent1-500',
|
|
63882
|
+
'--ax-sys-color-accent2-500',
|
|
63883
|
+
'--ax-sys-color-accent3-500',
|
|
63884
|
+
'--ax-sys-color-neutral-500',
|
|
63885
|
+
];
|
|
63886
|
+
//#endregion
|
|
63887
|
+
//#region ---- Legacy / shared sample blocks ----
|
|
63888
|
+
this.pendingApprovalByAgeItems = this.withRandomColor([
|
|
63889
|
+
{ id: '0-24h', label: createMultiLanguageString('0-24h', '۰–۲۴ ساعت'), value: 24 },
|
|
63890
|
+
{ id: '1-3d', label: createMultiLanguageString('1-3d', '۱–۳ روز'), value: 37 },
|
|
63891
|
+
{ id: '4-7d', label: createMultiLanguageString('4-7d', '۴–۷ روز'), value: 19 },
|
|
63892
|
+
{ id: '>7d', label: createMultiLanguageString('>7d', 'بیش از ۷ روز'), value: 11 },
|
|
63893
|
+
]);
|
|
63894
|
+
this.workloadByProcessItems = this.withRandomColor([
|
|
63895
|
+
{ id: 'procurement', name: createMultiLanguageString('Procurement', 'تدارکات'), value: 34 },
|
|
63896
|
+
{ id: 'onboarding', name: createMultiLanguageString('Employee Onboarding', 'ورود کارکنان'), value: 27 },
|
|
63897
|
+
{ id: 'incident', name: createMultiLanguageString('Incident Review', 'بررسی حادثه'), value: 18 },
|
|
63898
|
+
{ id: 'leave', name: createMultiLanguageString('Leave Request', 'درخواست مرخصی'), value: 13 },
|
|
63899
|
+
{ id: 'access', name: createMultiLanguageString('Access Request', 'درخواست دسترسی'), value: 8 },
|
|
63900
|
+
]);
|
|
63901
|
+
this.slaComplianceItems = 86;
|
|
63902
|
+
this.throughputItems = this.buildThroughputItems();
|
|
63903
|
+
//#endregion
|
|
63904
|
+
//#region ---- New dashboard samples ----
|
|
63905
|
+
this.systemHealthSummaryItems = this.withRandomColor([
|
|
63906
|
+
{ id: 'running', label: createMultiLanguageString('Running instances', 'نمونههای در حال اجرا'), value: 48 },
|
|
63907
|
+
{ id: 'completed', label: createMultiLanguageString('Completed instances', 'نمونههای تکمیلشده'), value: 312 },
|
|
63908
|
+
{ id: 'failed', label: createMultiLanguageString('Failed instances', 'نمونههای ناموفق'), value: 7 },
|
|
63909
|
+
{ id: 'pending', label: createMultiLanguageString('Pending tasks', 'وظایف در انتظار'), value: 63 },
|
|
63910
|
+
{ id: 'overdue', label: createMultiLanguageString('Overdue tasks', 'وظایف معوقه'), value: 14 },
|
|
63911
|
+
{ id: 'sla', label: createMultiLanguageString('SLA compliance (%)', 'انطباق SLA (٪)'), value: 89 },
|
|
63912
|
+
]);
|
|
63913
|
+
this.throughputDailyItems = this.buildDailyThroughput(14);
|
|
63914
|
+
this.throughputWeeklyItems = this.buildWeeklyThroughput(12);
|
|
63915
|
+
this.slaViolationsAndDelayItems = this.withRandomColor([
|
|
63916
|
+
{
|
|
63917
|
+
id: 'violations',
|
|
63918
|
+
label: createMultiLanguageString('SLA violations (count)', 'تخلفات SLA (تعداد)'),
|
|
63919
|
+
value: 23,
|
|
63920
|
+
},
|
|
63921
|
+
{
|
|
63922
|
+
id: 'avg-delay',
|
|
63923
|
+
label: createMultiLanguageString('Avg SLA delay (hours)', 'میانگین تأخیر SLA (ساعت)'),
|
|
63924
|
+
value: 4,
|
|
63925
|
+
},
|
|
63926
|
+
{
|
|
63927
|
+
id: 'median-delay',
|
|
63928
|
+
label: createMultiLanguageString('Median SLA delay (hours)', 'میانه تأخیر SLA (ساعت)'),
|
|
63929
|
+
value: 2,
|
|
63930
|
+
},
|
|
63931
|
+
]);
|
|
63932
|
+
this.slaComplianceTrendItems = (() => {
|
|
63933
|
+
const [v] = this.getUniqueColorVars(1);
|
|
63934
|
+
const data = [];
|
|
63935
|
+
for (let w = 1; w <= 10; w++) {
|
|
63936
|
+
data.push({ x: w, y: 82 + w + (w % 3) });
|
|
63937
|
+
}
|
|
63938
|
+
return [
|
|
63939
|
+
{
|
|
63940
|
+
id: 'sla-pct',
|
|
63941
|
+
label: createMultiLanguageString('Resolved within SLA (%)', 'حلشده در SLA (٪)'),
|
|
63942
|
+
lineColor: this.asRgbVar(v),
|
|
63943
|
+
fillColor: this.asRgbVarWithAlpha(v, 0.12),
|
|
63944
|
+
data,
|
|
63945
|
+
},
|
|
63946
|
+
];
|
|
63947
|
+
})();
|
|
63948
|
+
this.pendingTasksByAgeItems = this.withRandomColor([
|
|
63949
|
+
{ id: '0-24h', label: createMultiLanguageString('0-24h', '۰–۲۴ ساعت'), value: 41 },
|
|
63950
|
+
{ id: '1-3d', label: createMultiLanguageString('1-3d', '۱–۳ روز'), value: 28 },
|
|
63951
|
+
{ id: '4-7d', label: createMultiLanguageString('4-7d', '۴–۷ روز'), value: 16 },
|
|
63952
|
+
{ id: '>7d', label: createMultiLanguageString('>7d', 'بیش از ۷ روز'), value: 9 },
|
|
63953
|
+
]);
|
|
63954
|
+
this.failedProcessesSummaryItems = this.withRandomColor([
|
|
63955
|
+
{
|
|
63956
|
+
id: 'total-failed',
|
|
63957
|
+
label: createMultiLanguageString('Total failed instances', 'کل نمونههای ناموفق'),
|
|
63958
|
+
value: 36,
|
|
63959
|
+
},
|
|
63960
|
+
{
|
|
63961
|
+
id: 'recent-failed',
|
|
63962
|
+
label: createMultiLanguageString('Failed (last 7 days)', 'ناموفق (۷ روز اخیر)'),
|
|
63963
|
+
value: 9,
|
|
63964
|
+
},
|
|
63965
|
+
]);
|
|
63966
|
+
this.failedProcessFailureTrendItems = (() => {
|
|
63967
|
+
const [v] = this.getUniqueColorVars(1);
|
|
63968
|
+
const data = [];
|
|
63969
|
+
for (let w = 1; w <= 8; w++) {
|
|
63970
|
+
data.push({ x: w, y: 4 + (w % 5) + (w % 2) });
|
|
63971
|
+
}
|
|
63972
|
+
return [
|
|
63973
|
+
{
|
|
63974
|
+
id: 'failures',
|
|
63975
|
+
label: createMultiLanguageString('Failed instances', 'نمونههای ناموفق'),
|
|
63976
|
+
lineColor: this.asRgbVar(v),
|
|
63977
|
+
fillColor: this.asRgbVarWithAlpha(v, 0.15),
|
|
63978
|
+
data,
|
|
63979
|
+
},
|
|
63980
|
+
];
|
|
63981
|
+
})();
|
|
63982
|
+
this.failedProcessesByTypeItems = this.withRandomColor([
|
|
63983
|
+
{ id: 'procurement', name: createMultiLanguageString('Procurement', 'تدارکات'), value: 11 },
|
|
63984
|
+
{ id: 'onboarding', name: createMultiLanguageString('Employee Onboarding', 'ورود کارکنان'), value: 9 },
|
|
63985
|
+
{ id: 'incident', name: createMultiLanguageString('Incident Review', 'بررسی حادثه'), value: 8 },
|
|
63986
|
+
{ id: 'leave', name: createMultiLanguageString('Leave Request', 'درخواست مرخصی'), value: 5 },
|
|
63987
|
+
{ id: 'access', name: createMultiLanguageString('Access Request', 'درخواست دسترسی'), value: 3 },
|
|
63988
|
+
]);
|
|
63989
|
+
this.stuckProcessesItems = this.withRandomColor([
|
|
63990
|
+
{
|
|
63991
|
+
id: 's1',
|
|
63992
|
+
label: createMultiLanguageString('Invoice approval · #18432', 'تأیید فاکتور · ۱۸۴۳۲'),
|
|
63993
|
+
value: 96,
|
|
63994
|
+
},
|
|
63995
|
+
{
|
|
63996
|
+
id: 's2',
|
|
63997
|
+
label: createMultiLanguageString('Contract review · #9102', 'بررسی قرارداد · ۹۱۰۲'),
|
|
63998
|
+
value: 72,
|
|
63999
|
+
},
|
|
64000
|
+
{
|
|
64001
|
+
id: 's3',
|
|
64002
|
+
label: createMultiLanguageString('Access request · #4410', 'درخواست دسترسی · ۴۴۱۰'),
|
|
64003
|
+
value: 61,
|
|
64004
|
+
},
|
|
64005
|
+
{
|
|
64006
|
+
id: 's4',
|
|
64007
|
+
label: createMultiLanguageString('Leave workflow · #2201', 'گردش کار مرخصی · ۲۲۰۱'),
|
|
64008
|
+
value: 54,
|
|
64009
|
+
},
|
|
64010
|
+
{
|
|
64011
|
+
id: 's5',
|
|
64012
|
+
label: createMultiLanguageString('Incident triage · #8831', 'اولویتبندی حادثه · ۸۸۳۱'),
|
|
64013
|
+
value: 48,
|
|
64014
|
+
},
|
|
64015
|
+
]);
|
|
64016
|
+
this.overdueTasksByProcessItems = this.withRandomColor([
|
|
64017
|
+
{ id: 'procurement', label: createMultiLanguageString('Procurement', 'تدارکات'), value: 12 },
|
|
64018
|
+
{ id: 'onboarding', label: createMultiLanguageString('Onboarding', 'ورود کارکنان'), value: 9 },
|
|
64019
|
+
{ id: 'incident', label: createMultiLanguageString('Incident', 'حادثه'), value: 7 },
|
|
64020
|
+
{ id: 'leave', label: createMultiLanguageString('Leave', 'مرخصی'), value: 5 },
|
|
64021
|
+
{ id: 'access', label: createMultiLanguageString('Access', 'دسترسی'), value: 3 },
|
|
64022
|
+
]);
|
|
64023
|
+
this.tasksNearDeadlineItems = this.withRandomColor([
|
|
64024
|
+
{
|
|
64025
|
+
id: 't1',
|
|
64026
|
+
label: createMultiLanguageString('Review PO · 45m left · P1', 'بررسی PO · ۴۵ دقیقه مانده · اولویت ۱'),
|
|
64027
|
+
value: 45,
|
|
64028
|
+
},
|
|
64029
|
+
{
|
|
64030
|
+
id: 't2',
|
|
64031
|
+
label: createMultiLanguageString('Sign-off · 1.2h left · P2', 'امضا · ۱٫۲ ساعت مانده · اولویت ۲'),
|
|
64032
|
+
value: 72,
|
|
64033
|
+
},
|
|
64034
|
+
{
|
|
64035
|
+
id: 't3',
|
|
64036
|
+
label: createMultiLanguageString('Verify ID · 2h left · P1', 'تأیید هویت · ۲ ساعت مانده · اولویت ۱'),
|
|
64037
|
+
value: 120,
|
|
64038
|
+
},
|
|
64039
|
+
{
|
|
64040
|
+
id: 't4',
|
|
64041
|
+
label: createMultiLanguageString('Manager approve · 3h left · P3', 'تأیید مدیر · ۳ ساعت مانده · اولویت ۳'),
|
|
64042
|
+
value: 180,
|
|
64043
|
+
},
|
|
64044
|
+
{
|
|
64045
|
+
id: 't5',
|
|
64046
|
+
label: createMultiLanguageString('Legal check · 5h left · P2', 'بررسی حقوقی · ۵ ساعت مانده · اولویت ۲'),
|
|
64047
|
+
value: 300,
|
|
64048
|
+
},
|
|
64049
|
+
]);
|
|
64050
|
+
this.bottleneckActivitiesItems = this.withRandomColor([
|
|
64051
|
+
{
|
|
64052
|
+
id: 'b1',
|
|
64053
|
+
label: createMultiLanguageString('Manager approval (avg wait h)', 'تأیید مدیر (میانگین انتظار - ساعت)'),
|
|
64054
|
+
value: 18,
|
|
64055
|
+
},
|
|
64056
|
+
{
|
|
64057
|
+
id: 'b2',
|
|
64058
|
+
label: createMultiLanguageString('Legal review (avg wait h)', 'بررسی حقوقی (میانگین انتظار - ساعت)'),
|
|
64059
|
+
value: 14,
|
|
64060
|
+
},
|
|
64061
|
+
{
|
|
64062
|
+
id: 'b3',
|
|
64063
|
+
label: createMultiLanguageString('Finance check (avg wait h)', 'بررسی مالی (میانگین انتظار - ساعت)'),
|
|
64064
|
+
value: 11,
|
|
64065
|
+
},
|
|
64066
|
+
{
|
|
64067
|
+
id: 'b4',
|
|
64068
|
+
label: createMultiLanguageString('HR validation (avg wait h)', 'اعتبارسنجی منابع انسانی (میانگین انتظار - ساعت)'),
|
|
64069
|
+
value: 9,
|
|
64070
|
+
},
|
|
64071
|
+
{
|
|
64072
|
+
id: 'b5',
|
|
64073
|
+
label: createMultiLanguageString('IT provisioning (avg wait h)', 'تأمین فناوری اطلاعات (میانگین انتظار - ساعت)'),
|
|
64074
|
+
value: 7,
|
|
64075
|
+
},
|
|
64076
|
+
]);
|
|
64077
|
+
this.errorsByCategoryItems = this.withRandomColor([
|
|
64078
|
+
{
|
|
64079
|
+
id: 'e-timeout',
|
|
64080
|
+
label: createMultiLanguageString('Timeout · ACT-204', 'زمانانتظار · ACT-204'),
|
|
64081
|
+
value: 28,
|
|
64082
|
+
},
|
|
64083
|
+
{
|
|
64084
|
+
id: 'e-validation',
|
|
64085
|
+
label: createMultiLanguageString('Validation · VAL-12', 'اعتبارسنجی · VAL-12'),
|
|
64086
|
+
value: 21,
|
|
64087
|
+
},
|
|
64088
|
+
{
|
|
64089
|
+
id: 'e-permission',
|
|
64090
|
+
label: createMultiLanguageString('Permission · SEC-09', 'مجوز · SEC-09'),
|
|
64091
|
+
value: 16,
|
|
64092
|
+
},
|
|
64093
|
+
{
|
|
64094
|
+
id: 'e-integration',
|
|
64095
|
+
label: createMultiLanguageString('Integration · API-503', 'یکپارچهسازی · API-503'),
|
|
64096
|
+
value: 12,
|
|
64097
|
+
},
|
|
64098
|
+
{
|
|
64099
|
+
id: 'e-unknown',
|
|
64100
|
+
label: createMultiLanguageString('Unknown · GEN-01', 'نامشخص · GEN-01'),
|
|
64101
|
+
value: 7,
|
|
64102
|
+
},
|
|
64103
|
+
]);
|
|
64104
|
+
this.workloadPerUserActiveItems = this.withRandomColor([
|
|
64105
|
+
{ id: 'u1', label: createMultiLanguageString('Alice Carter', 'Alice Carter'), value: 22 },
|
|
64106
|
+
{ id: 'u2', label: createMultiLanguageString('Ben Ortiz', 'Ben Ortiz'), value: 19 },
|
|
64107
|
+
{ id: 'u3', label: createMultiLanguageString('Chloe Nguyen', 'Chloe Nguyen'), value: 16 },
|
|
64108
|
+
{ id: 'u4', label: createMultiLanguageString('Diego Silva', 'Diego Silva'), value: 14 },
|
|
64109
|
+
{ id: 'u5', label: createMultiLanguageString('Elena Rossi', 'Elena Rossi'), value: 11 },
|
|
64110
|
+
{ id: 'u6', label: createMultiLanguageString('Frank Müller', 'Frank Müller'), value: 9 },
|
|
64111
|
+
]);
|
|
64112
|
+
this.workloadPerUserOverdueItems = this.withRandomColor([
|
|
64113
|
+
{ id: 'u1', label: createMultiLanguageString('Alice Carter', 'Alice Carter'), value: 4 },
|
|
64114
|
+
{ id: 'u2', label: createMultiLanguageString('Ben Ortiz', 'Ben Ortiz'), value: 3 },
|
|
64115
|
+
{ id: 'u3', label: createMultiLanguageString('Chloe Nguyen', 'Chloe Nguyen'), value: 2 },
|
|
64116
|
+
{ id: 'u4', label: createMultiLanguageString('Diego Silva', 'Diego Silva'), value: 2 },
|
|
64117
|
+
{ id: 'u5', label: createMultiLanguageString('Elena Rossi', 'Elena Rossi'), value: 1 },
|
|
64118
|
+
{ id: 'u6', label: createMultiLanguageString('Frank Müller', 'Frank Müller'), value: 0 },
|
|
64119
|
+
]);
|
|
64120
|
+
this.workloadPerUserAvgAgeHoursItems = this.withRandomColor([
|
|
64121
|
+
{ id: 'u1', label: createMultiLanguageString('Alice Carter', 'Alice Carter'), value: 38 },
|
|
64122
|
+
{ id: 'u2', label: createMultiLanguageString('Ben Ortiz', 'Ben Ortiz'), value: 52 },
|
|
64123
|
+
{ id: 'u3', label: createMultiLanguageString('Chloe Nguyen', 'Chloe Nguyen'), value: 29 },
|
|
64124
|
+
{ id: 'u4', label: createMultiLanguageString('Diego Silva', 'Diego Silva'), value: 44 },
|
|
64125
|
+
{ id: 'u5', label: createMultiLanguageString('Elena Rossi', 'Elena Rossi'), value: 21 },
|
|
64126
|
+
{ id: 'u6', label: createMultiLanguageString('Frank Müller', 'Frank Müller'), value: 33 },
|
|
64127
|
+
]);
|
|
64128
|
+
this.workloadOverloadedUsersItems = this.withRandomColor([
|
|
64129
|
+
{ id: 'u1', label: createMultiLanguageString('Alice Carter', 'Alice Carter'), value: 22 },
|
|
64130
|
+
{ id: 'u2', label: createMultiLanguageString('Ben Ortiz', 'Ben Ortiz'), value: 19 },
|
|
64131
|
+
]);
|
|
64132
|
+
this.slaRiskPredictionItems = this.withRandomColor([
|
|
64133
|
+
{
|
|
64134
|
+
id: 'r1',
|
|
64135
|
+
label: createMultiLanguageString('Onboarding · #1209 · breach risk', 'ورود کارکنان · ۱۲۰۹ · ریسک نقض'),
|
|
64136
|
+
value: 92,
|
|
64137
|
+
},
|
|
64138
|
+
{
|
|
64139
|
+
id: 'r2',
|
|
64140
|
+
label: createMultiLanguageString('Procurement · #8841 · breach risk', 'تدارکات · ۸۸۴۱ · ریسک نقض'),
|
|
64141
|
+
value: 87,
|
|
64142
|
+
},
|
|
64143
|
+
{
|
|
64144
|
+
id: 'r3',
|
|
64145
|
+
label: createMultiLanguageString('Incident · #3310 · breach risk', 'حادثه · ۳۳۱۰ · ریسک نقض'),
|
|
64146
|
+
value: 79,
|
|
64147
|
+
},
|
|
64148
|
+
{
|
|
64149
|
+
id: 'r4',
|
|
64150
|
+
label: createMultiLanguageString('Leave · #2204 · breach risk', 'مرخصی · ۲۲۰۴ · ریسک نقض'),
|
|
64151
|
+
value: 71,
|
|
64152
|
+
},
|
|
64153
|
+
{
|
|
64154
|
+
id: 'r5',
|
|
64155
|
+
label: createMultiLanguageString('Access · #1102 · breach risk', 'دسترسی · ۱۱۰۲ · ریسک نقض'),
|
|
64156
|
+
value: 64,
|
|
64157
|
+
},
|
|
64158
|
+
]);
|
|
64159
|
+
//#endregion
|
|
64160
|
+
//#region ---- Registered definitions ----
|
|
64161
|
+
this.workflowPendingApprovalByAgeDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.pendingApproval, 'Workflow Pending Approval by Age', this.pendingApprovalByAgeItems);
|
|
64162
|
+
this.workflowWorkloadByProcessDataSource = this.donutChartDefinition(RootConfig$A.dataSources.dashboardChart.workloadByProcess, 'Workflow Workload by Process', this.workloadByProcessItems);
|
|
64163
|
+
this.workflowSlaComplianceDataSource = {
|
|
64164
|
+
name: RootConfig$A.dataSources.dashboardChart.slaCompliance,
|
|
64165
|
+
title: 'Workflow SLA Compliance',
|
|
64166
|
+
columns: [
|
|
64167
|
+
{ name: 'id', title: 'Id', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64168
|
+
{ name: 'value', title: 'Value', type: AXPWidgetsCatalog.number, datatype: 'number' },
|
|
64169
|
+
],
|
|
64170
|
+
filters: [],
|
|
64171
|
+
textField: { name: 'id', title: 'Id' },
|
|
64172
|
+
valueField: { name: 'id', title: 'Id' },
|
|
64173
|
+
samples: this.slaComplianceItems,
|
|
64174
|
+
source: () => this.slaComplianceItems,
|
|
64175
|
+
};
|
|
64176
|
+
this.workflowThroughputLast8WeeksDataSource = this.lineChartDefinition(RootConfig$A.dataSources.dashboardChart.throughputLast8Weeks, 'Workflow Throughput Last 8 Weeks', this.throughputItems);
|
|
64177
|
+
this.workflowSystemHealthSummaryDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.systemHealthSummary, 'Workflow System Health Summary', this.systemHealthSummaryItems);
|
|
64178
|
+
this.workflowThroughputDailyDataSource = this.lineChartDefinition(RootConfig$A.dataSources.dashboardChart.throughputDaily, 'Workflow Created vs Completed (Daily)', this.throughputDailyItems);
|
|
64179
|
+
this.workflowThroughputWeeklyDataSource = this.lineChartDefinition(RootConfig$A.dataSources.dashboardChart.throughputWeekly, 'Workflow Created vs Completed (Weekly)', this.throughputWeeklyItems);
|
|
64180
|
+
this.workflowSlaViolationsAndDelayDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.slaViolationsAndDelay, 'Workflow SLA Violations and Delay', this.slaViolationsAndDelayItems);
|
|
64181
|
+
this.workflowSlaComplianceTrendDataSource = this.lineChartDefinition(RootConfig$A.dataSources.dashboardChart.slaComplianceTrend, 'Workflow SLA Compliance Trend', this.slaComplianceTrendItems);
|
|
64182
|
+
this.workflowPendingTasksByAgeDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.pendingTasksByAge, 'Workflow Pending Tasks by Age', this.pendingTasksByAgeItems);
|
|
64183
|
+
this.workflowFailedProcessesSummaryDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.failedProcessesSummary, 'Workflow Failed Processes Summary', this.failedProcessesSummaryItems);
|
|
64184
|
+
this.workflowFailedProcessFailureTrendDataSource = this.lineChartDefinition(RootConfig$A.dataSources.dashboardChart.failedProcessFailureTrend, 'Workflow Failed Instances Trend', this.failedProcessFailureTrendItems);
|
|
64185
|
+
this.workflowFailedProcessesByTypeDataSource = this.donutChartDefinition(RootConfig$A.dataSources.dashboardChart.failedProcessesByType, 'Workflow Failed Processes by Type', this.failedProcessesByTypeItems);
|
|
64186
|
+
this.workflowStuckProcessesDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.stuckProcesses, 'Workflow Stuck Processes', this.stuckProcessesItems);
|
|
64187
|
+
this.workflowOverdueTasksByProcessDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.overdueTasksByProcess, 'Workflow Overdue Tasks by Process', this.overdueTasksByProcessItems);
|
|
64188
|
+
this.workflowTasksNearDeadlineDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.tasksNearDeadline, 'Workflow Tasks Near Deadline', this.tasksNearDeadlineItems);
|
|
64189
|
+
this.workflowBottleneckActivitiesDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.bottleneckActivities, 'Workflow Bottleneck Activities', this.bottleneckActivitiesItems);
|
|
64190
|
+
this.workflowErrorsByCategoryDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.errorsByCategory, 'Workflow Errors by Category', this.errorsByCategoryItems);
|
|
64191
|
+
this.workflowWorkloadPerUserActiveDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.workloadPerUserActive, 'Workflow Active Tasks per User', this.workloadPerUserActiveItems);
|
|
64192
|
+
this.workflowWorkloadPerUserOverdueDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.workloadPerUserOverdue, 'Workflow Overdue Tasks per User', this.workloadPerUserOverdueItems);
|
|
64193
|
+
this.workflowWorkloadPerUserAvgAgeHoursDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.workloadPerUserAvgAgeHours, 'Workflow Average Task Age per User', this.workloadPerUserAvgAgeHoursItems);
|
|
64194
|
+
this.workflowWorkloadOverloadedUsersDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.workloadOverloadedUsers, 'Workflow Overloaded Users', this.workloadOverloadedUsersItems);
|
|
64195
|
+
this.workflowSlaRiskPredictionDataSource = this.barChartDefinition(RootConfig$A.dataSources.dashboardChart.slaRiskPrediction, 'Workflow SLA Risk Prediction', this.slaRiskPredictionItems);
|
|
64196
|
+
}
|
|
64197
|
+
getUniqueColorVars(count) {
|
|
64198
|
+
const shuffled = [...this.colorVars500].sort(() => Math.random() - 0.5);
|
|
64199
|
+
if (count <= shuffled.length) {
|
|
64200
|
+
return shuffled.slice(0, count);
|
|
64201
|
+
}
|
|
64202
|
+
const colors = [];
|
|
64203
|
+
for (let i = 0; i < count; i++) {
|
|
64204
|
+
colors.push(shuffled[i % shuffled.length]);
|
|
64205
|
+
}
|
|
64206
|
+
return colors;
|
|
64207
|
+
}
|
|
64208
|
+
asRgbVar(colorVar) {
|
|
64209
|
+
return `rgb(var(${colorVar}))`;
|
|
64210
|
+
}
|
|
64211
|
+
asRgbVarWithAlpha(colorVar, alpha) {
|
|
64212
|
+
return `rgb(var(${colorVar}) / ${alpha})`;
|
|
64213
|
+
}
|
|
64214
|
+
withRandomColor(items) {
|
|
64215
|
+
const colorVars = this.getUniqueColorVars(items.length);
|
|
64216
|
+
return items.map((item, index) => {
|
|
64217
|
+
const colorVar = colorVars[index];
|
|
64218
|
+
return {
|
|
64219
|
+
...item,
|
|
64220
|
+
color: this.asRgbVar(colorVar),
|
|
64221
|
+
};
|
|
64222
|
+
});
|
|
64223
|
+
}
|
|
64224
|
+
buildThroughputItems() {
|
|
64225
|
+
const [createdVar, completedVar] = this.getUniqueColorVars(2);
|
|
64226
|
+
return [
|
|
64227
|
+
{
|
|
64228
|
+
id: 'created',
|
|
64229
|
+
label: createMultiLanguageString('Created', 'ایجادشده'),
|
|
64230
|
+
lineColor: this.asRgbVar(createdVar),
|
|
64231
|
+
fillColor: this.asRgbVarWithAlpha(createdVar, 0.12),
|
|
64232
|
+
data: [
|
|
64233
|
+
{ x: 1, y: 86 },
|
|
64234
|
+
{ x: 2, y: 79 },
|
|
64235
|
+
{ x: 3, y: 92 },
|
|
64236
|
+
{ x: 4, y: 97 },
|
|
64237
|
+
{ x: 5, y: 88 },
|
|
64238
|
+
{ x: 6, y: 101 },
|
|
64239
|
+
{ x: 7, y: 94 },
|
|
64240
|
+
{ x: 8, y: 99 },
|
|
64241
|
+
],
|
|
64242
|
+
},
|
|
64243
|
+
{
|
|
64244
|
+
id: 'completed',
|
|
64245
|
+
label: createMultiLanguageString('Completed', 'تکمیلشده'),
|
|
64246
|
+
lineColor: this.asRgbVar(completedVar),
|
|
64247
|
+
fillColor: this.asRgbVarWithAlpha(completedVar, 0.12),
|
|
64248
|
+
data: [
|
|
64249
|
+
{ x: 1, y: 72 },
|
|
64250
|
+
{ x: 2, y: 75 },
|
|
64251
|
+
{ x: 3, y: 81 },
|
|
64252
|
+
{ x: 4, y: 85 },
|
|
64253
|
+
{ x: 5, y: 83 },
|
|
64254
|
+
{ x: 6, y: 89 },
|
|
64255
|
+
{ x: 7, y: 87 },
|
|
64256
|
+
{ x: 8, y: 90 },
|
|
64257
|
+
],
|
|
64258
|
+
},
|
|
64259
|
+
];
|
|
64260
|
+
}
|
|
64261
|
+
buildDailyThroughput(dayCount) {
|
|
64262
|
+
const [createdVar, completedVar] = this.getUniqueColorVars(2);
|
|
64263
|
+
const created = [];
|
|
64264
|
+
const completed = [];
|
|
64265
|
+
for (let d = 1; d <= dayCount; d++) {
|
|
64266
|
+
created.push({ x: d, y: 18 + Math.round(8 * Math.sin(d / 2) + (d % 5) * 2) });
|
|
64267
|
+
completed.push({ x: d, y: 15 + Math.round(7 * Math.cos(d / 3) + (d % 4) * 2) });
|
|
64268
|
+
}
|
|
64269
|
+
return [
|
|
64270
|
+
{
|
|
64271
|
+
id: 'created',
|
|
64272
|
+
label: createMultiLanguageString('Created', 'ایجادشده'),
|
|
64273
|
+
lineColor: this.asRgbVar(createdVar),
|
|
64274
|
+
fillColor: this.asRgbVarWithAlpha(createdVar, 0.12),
|
|
64275
|
+
data: created,
|
|
64276
|
+
},
|
|
64277
|
+
{
|
|
64278
|
+
id: 'completed',
|
|
64279
|
+
label: createMultiLanguageString('Completed', 'تکمیلشده'),
|
|
64280
|
+
lineColor: this.asRgbVar(completedVar),
|
|
64281
|
+
fillColor: this.asRgbVarWithAlpha(completedVar, 0.12),
|
|
64282
|
+
data: completed,
|
|
64283
|
+
},
|
|
64284
|
+
];
|
|
64285
|
+
}
|
|
64286
|
+
buildWeeklyThroughput(weekCount) {
|
|
64287
|
+
const [createdVar, completedVar] = this.getUniqueColorVars(2);
|
|
64288
|
+
const created = [];
|
|
64289
|
+
const completed = [];
|
|
64290
|
+
for (let w = 1; w <= weekCount; w++) {
|
|
64291
|
+
created.push({ x: w, y: 110 + w * 3 + (w % 3) * 7 });
|
|
64292
|
+
completed.push({ x: w, y: 98 + w * 3 + (w % 4) * 5 });
|
|
64293
|
+
}
|
|
64294
|
+
return [
|
|
64295
|
+
{
|
|
64296
|
+
id: 'created',
|
|
64297
|
+
label: createMultiLanguageString('Created', 'ایجادشده'),
|
|
64298
|
+
lineColor: this.asRgbVar(createdVar),
|
|
64299
|
+
fillColor: this.asRgbVarWithAlpha(createdVar, 0.12),
|
|
64300
|
+
data: created,
|
|
64301
|
+
},
|
|
64302
|
+
{
|
|
64303
|
+
id: 'completed',
|
|
64304
|
+
label: createMultiLanguageString('Completed', 'تکمیلشده'),
|
|
64305
|
+
lineColor: this.asRgbVar(completedVar),
|
|
64306
|
+
fillColor: this.asRgbVarWithAlpha(completedVar, 0.12),
|
|
64307
|
+
data: completed,
|
|
64308
|
+
},
|
|
64309
|
+
];
|
|
64310
|
+
}
|
|
64311
|
+
//#endregion
|
|
64312
|
+
//#region ---- Definition factories ----
|
|
64313
|
+
barChartDefinition(name, title, items) {
|
|
64314
|
+
return {
|
|
64315
|
+
name,
|
|
64316
|
+
title,
|
|
64317
|
+
columns: [
|
|
64318
|
+
{ name: 'id', title: 'Id', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64319
|
+
{ name: 'label', title: 'Label', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64320
|
+
{ name: 'value', title: 'Value', type: AXPWidgetsCatalog.number, datatype: 'number' },
|
|
64321
|
+
{ name: 'color', title: 'Color', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64322
|
+
],
|
|
64323
|
+
filters: [],
|
|
64324
|
+
textField: { name: 'label', title: 'Label' },
|
|
64325
|
+
valueField: { name: 'id', title: 'Id' },
|
|
64326
|
+
samples: items,
|
|
64327
|
+
source: () => new AXDataSource({
|
|
64328
|
+
pageSize: 50,
|
|
64329
|
+
key: 'id',
|
|
64330
|
+
load: async () => ({
|
|
64331
|
+
items,
|
|
64332
|
+
total: items.length,
|
|
64333
|
+
}),
|
|
64334
|
+
byKey: async (key) => items.find((item) => item.id === key),
|
|
64335
|
+
}),
|
|
64336
|
+
};
|
|
64337
|
+
}
|
|
64338
|
+
donutChartDefinition(name, title, items) {
|
|
64339
|
+
return {
|
|
64340
|
+
name,
|
|
64341
|
+
title,
|
|
64342
|
+
columns: [
|
|
64343
|
+
{ name: 'id', title: 'Id', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64344
|
+
{ name: 'name', title: 'Name', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64345
|
+
{ name: 'value', title: 'Value', type: AXPWidgetsCatalog.number, datatype: 'number' },
|
|
64346
|
+
{ name: 'color', title: 'Color', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64347
|
+
],
|
|
64348
|
+
filters: [],
|
|
64349
|
+
textField: { name: 'name', title: 'Name' },
|
|
64350
|
+
valueField: { name: 'id', title: 'Id' },
|
|
64351
|
+
samples: items,
|
|
64352
|
+
source: () => new AXDataSource({
|
|
64353
|
+
pageSize: 50,
|
|
64354
|
+
key: 'id',
|
|
64355
|
+
load: async () => ({
|
|
64356
|
+
items,
|
|
64357
|
+
total: items.length,
|
|
64358
|
+
}),
|
|
64359
|
+
byKey: async (key) => items.find((item) => item.id === key),
|
|
64360
|
+
}),
|
|
64361
|
+
};
|
|
64362
|
+
}
|
|
64363
|
+
lineChartDefinition(name, title, series) {
|
|
64364
|
+
return {
|
|
64365
|
+
name,
|
|
64366
|
+
title,
|
|
64367
|
+
columns: [
|
|
64368
|
+
{ name: 'id', title: 'Id', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64369
|
+
{ name: 'label', title: 'Label', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64370
|
+
{ name: 'lineColor', title: 'Line Color', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64371
|
+
{ name: 'fillColor', title: 'Fill Color', type: AXPWidgetsCatalog.text, datatype: 'string' },
|
|
64372
|
+
{ name: 'data', title: 'Data Points', type: AXPWidgetsCatalog.text, datatype: 'array' },
|
|
64373
|
+
],
|
|
64374
|
+
filters: [],
|
|
64375
|
+
textField: { name: 'label', title: 'Label' },
|
|
64376
|
+
valueField: { name: 'id', title: 'Id' },
|
|
64377
|
+
samples: series,
|
|
64378
|
+
source: () => new AXDataSource({
|
|
64379
|
+
pageSize: 20,
|
|
64380
|
+
key: 'id',
|
|
64381
|
+
load: async () => ({
|
|
64382
|
+
items: series,
|
|
64383
|
+
total: series.length,
|
|
64384
|
+
}),
|
|
64385
|
+
byKey: async (key) => series.find((item) => item.id === key),
|
|
64386
|
+
}),
|
|
64387
|
+
};
|
|
64388
|
+
}
|
|
64389
|
+
//#endregion
|
|
64390
|
+
async items() {
|
|
64391
|
+
return [
|
|
64392
|
+
this.workflowPendingApprovalByAgeDataSource,
|
|
64393
|
+
this.workflowWorkloadByProcessDataSource,
|
|
64394
|
+
this.workflowSlaComplianceDataSource,
|
|
64395
|
+
this.workflowThroughputLast8WeeksDataSource,
|
|
64396
|
+
this.workflowSystemHealthSummaryDataSource,
|
|
64397
|
+
this.workflowThroughputDailyDataSource,
|
|
64398
|
+
this.workflowThroughputWeeklyDataSource,
|
|
64399
|
+
this.workflowSlaViolationsAndDelayDataSource,
|
|
64400
|
+
this.workflowSlaComplianceTrendDataSource,
|
|
64401
|
+
this.workflowPendingTasksByAgeDataSource,
|
|
64402
|
+
this.workflowFailedProcessesSummaryDataSource,
|
|
64403
|
+
this.workflowFailedProcessFailureTrendDataSource,
|
|
64404
|
+
this.workflowFailedProcessesByTypeDataSource,
|
|
64405
|
+
this.workflowStuckProcessesDataSource,
|
|
64406
|
+
this.workflowOverdueTasksByProcessDataSource,
|
|
64407
|
+
this.workflowTasksNearDeadlineDataSource,
|
|
64408
|
+
this.workflowBottleneckActivitiesDataSource,
|
|
64409
|
+
this.workflowErrorsByCategoryDataSource,
|
|
64410
|
+
this.workflowWorkloadPerUserActiveDataSource,
|
|
64411
|
+
this.workflowWorkloadPerUserOverdueDataSource,
|
|
64412
|
+
this.workflowWorkloadPerUserAvgAgeHoursDataSource,
|
|
64413
|
+
this.workflowWorkloadOverloadedUsersDataSource,
|
|
64414
|
+
this.workflowSlaRiskPredictionDataSource,
|
|
64415
|
+
];
|
|
64416
|
+
}
|
|
64417
|
+
}
|
|
64418
|
+
|
|
64419
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
64420
|
+
__proto__: null,
|
|
64421
|
+
AXMWorkflowDashboardChartDataSourceDefinition: AXMWorkflowDashboardChartDataSourceDefinition
|
|
64422
|
+
});
|
|
64423
|
+
|
|
64060
64424
|
//#region ---- Module Export ----
|
|
64061
64425
|
//#endregion
|
|
64062
64426
|
|
|
@@ -65506,4 +65870,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
65506
65870
|
*/
|
|
65507
65871
|
|
|
65508
65872
|
export { AXCIdentifierManagementMockModule as $, AXCAiChatRouterService as A, AXCConversationDataSeeder as B, AXCConversationMockConversationApi as C, AXCConversationMockMessageApi as D, AXCConversationMockModule as E, AXCConversationMockRealtimeApi as F, AXCConversationMockUserApi as G, AXCCustomerManagementMockModule as H, AXCDashboardManagementMockModule as I, AXCDataManagementMockModule as J, AXCDexieEntityStorageService as K, AXCDocumentManagementMockModule as L, AXCEditionDataSeeder as M, AXCEntityDefinitionSeederService as N, AXCEntityDefinitionsModule as O, AXCEntityStorageInsertCommand as P, AXCEntityStorageModule as Q, AXCEntityStorageQueryQuery as R, AXCFileStorageServiceDexie as S, AXCFileStorageServiceFirestore as T, AXCFinancialCoreMockModule as U, AXCFirestoreEntityStorageService as V, AXCFormTemplateManagementMockModule as W, AXCGoogleStrategyMock as X, AXCHealthCoreMockModule as Y, AXCHelpDeskMockModule as Z, AXCHumanCapitalManagementMockModule as _, resolveDelegatedAssistOptionString as a, AXMMeetingSessionDataSeeder as a$, AXCImageCaptchaChallengeProviderMock as a0, AXCLearningManagementMockModule as a1, AXCLocaleManagementMockModule as a2, AXCLocationManagementMockModule as a3, AXCLockService as a4, AXCMeasurementCoreMockModule as a5, AXCMeetingManagementMockModule as a6, AXCMetaDataDefinitionDataSeeder as a7, AXCMetadataCategorySeeder as a8, AXCMiddlewaresModule as a9, AXCWorkflowDefinitionDataSeeder as aA, AXCWorkflowEngine as aB, AXCWorkflowExecutionDB as aC, AXCWorkflowExecutionStoreDexie as aD, AXCWorkflowExecutionStoreFirestore as aE, AXCWorkflowManagementMockModule as aF, AXC_ENTITY_STORAGE_BACKEND_TYPE as aG, AXC_FIRESTORE_CONFIG as aH, AXC_FIRESTORE_DB as aI, AXC_WORKFLOW_EXECUTION_STORE as aJ, AXMAiDemisDefaultAssistId as aK, AXMAiModelStableIds as aL, AXMAiPlatformDefaultAssistId as aM, AXMAutomationDataSeeder as aN, AXMBusinessUnitDataSeeder as aO, AXMCalendarEventTypeSeeder as aP, AXMDashboardChartDataSourceDefinition as aQ, AXMEmployeeDataSeeder as aR, AXMEmploymentTypeDataSeeder as aS, AXMFormDataSourcesProvider as aT, AXMJobDefinitionDataSeeder as aU, AXMJobLevelDataSeeder as aV, AXMLeaveRequestDataSeeder as aW, AXMMeetingDataSeeder as aX, AXMMeetingFilesDataSeeder as aY, AXMMeetingParticipantDataSeeder as aZ, AXMMeetingRoleTypeDataSeeder as a_, AXCMockCaptchaChallengeComponent as aa, AXCMockEntityLogListener as ab, AXCMockModule as ac, AXCMockShowMetaDataFormPopupCommand as ad, AXCNotificationManagementMockModule as ae, AXCOrderManagementMockModule as af, AXCOrganizationManagementMockModule as ag, AXCPersonCoreMockModule as ah, AXCPlatformManagementMockModule as ai, AXCProcurementManagementMockModule as aj, AXCProductCatalogMockModule as ak, AXCProjectManagementMockModule as al, AXCQueryRegistryDataSeeder as am, AXCReportManagementMockModule as an, AXCSecurityManagementMockModule as ao, AXCStoredEntityDefinitionLoader as ap, AXCSubscriptionManagementMockModule as aq, AXCSupplierManagementMockModule as ar, AXCTaskManagementMockModule as as, AXCTenantManagementMockModule as at, AXCTenantSeeder as au, AXCTokensDataSeeder as av, AXCUserPassStrategyMock as aw, AXCVersionDB as ax, AXCVersioningService as ay, AXCWorkflowCategorySeeder as az, ACTIVITY_CATEGORIES as b, MLC as b$, AXMMeetingTypeDataSeeder as b0, AXMMeetingTypeFileTemplateDataSeeder as b1, AXMPositionAssignmentDataSeeder as b2, AXMPositionDataSeeder as b3, AXMQuestionBankItemCategoryDataSeeder as b4, AXMQuestionBankItemDataSeeder as b5, AXMQuestionnaireCalculationDataSeeder as b6, AXMQuestionnaireCategoryDataSeeder as b7, AXMQuestionnaireDataSeeder as b8, AXMResponsibilityDataSeeder as b9, CHAT_LAST_MESSAGE_IDS as bA, COSTMANAGER_ENTERPRISE as bB, COSTMANAGER_PROFESSIONAL as bC, COSTMANAGER_STANDARD as bD, CP as bE, CRM_ENTERPRISE as bF, DASHBOARDS as bG, EDITIONS as bH, EMPLOYEES_MOCK as bI, EMPLOYMENT_TYPES_MOCK as bJ, ENTITY_DEFINITION_MAP as bK, ENTITY_REGISTRY as bL, FINANCE_BASIC as bM, FINANCE_ENTERPRISE as bN, FINANCE_PRO as bO, G as bP, HR_ENTERPRISE as bQ, HW as bR, JOB_DEFINITIONS_CATEGORY_MOCK as bS, JOB_DEFINITIONS_MOCK as bT, JOB_DEFINITION_CATEGORY_KEY_TO_ID as bU, JOB_LEVELS_MOCK as bV, LASER_PLUMBING_TENANT_ID as bW, LEAVE_REQUESTS_MOCK as bX, METADATA_CATEGORY_IDS as bY, METADATA_GENERAL_CATEGORY_REFS as bZ, METADATA_SYSTEM_CATEGORY_REFS as b_, AXMTagDataSeeder as ba, AXMTeamDataSeeder as bb, AXMTeamMemberDataSeeder as bc, AXMTeamMemberRoleDataSeeder as bd, AXMWorkflowDashboardChartDataSourceDefinition as be, AXM_AI_REGISTRY_COMMAND_NAME as bf, AXM_AI_REGISTRY_QUERY_NAME as bg, AXM_CORPORATE_BUSINESS_UNIT_ID as bh, AXPDashboardDataSeeder as bi, AXPIdentifierDB as bj, AXPMessageDataSeeder as bk, AXPMockChecksumProvider as bl, AXPMockClockProvider as bm, AXPMockIdentifierService as bn, AXPMockLookupProvider as bo, AXPMockPolicyProvider as bp, AXPMockSequenceProvider as bq, AXPRoomDataSeeder as br, AXPSecurityManagementRoleDataSeeder as bs, AXPSecurityManagementUserDataSeeder as bt, AXPTaskBoardPlatformManagementTaskProvider as bu, AXPTaskBoardProjectManagementTaskProvider as bv, AXVChangeType as bw, BCC as bx, BOC as by, BUSINESS_UNITS_MOCK as bz, ACTIVITY_DEFINITIONS as c, calendarMock as c$, OHR as c0, ORDERING_BASIC as c1, ORDERING_ENTERPRISE as c2, ORDERING_STANDARD as c3, OWNERSHIP_FILTER_BYPASS as c4, PLATFORM_CONSOLE as c5, PLATFORM_TENANT_ID as c6, PM as c7, POSITIONS_CATEGORY_MOCK as c8, POSITIONS_MOCK as c9, TEAM_MEMBER_ROLES_MOCK as cA, TIMEPLICITY_TENANT_ID as cB, TLA as cC, TOKENS as cD, TPC as cE, VISIBILITY_FILTER_BYPASS as cF, WORKFLOW_CATEGORIES as cG, WS as cH, activityCategoryMocks as cI, activityDefinitionEntityMock as cJ, applyEntityDefinitionFirestoreSnapshot as cK, automationCommandMiddleware as cL, automationMock as cM, avatarInterface as cN, axVersionDB as cO, axWorkflowExecutionDB as cP, axcPatchEmployeeActivePrimaryPositionRefsFromRows as cQ, axcPatchEmployeeManagerRefsFromRows as cR, axcResolveCommandRegistrySeedId as cS, axcResolveQueryRegistrySeedId as cT, bankCategory as cU, buildEntityStorageQuickSearchFilter as cV, bypassAllFilters as cW, bypassOwnershipFilter as cX, bypassVisibilityFilter as cY, calendarEventMock as cZ, calendarEventTypeMockData as c_, POSITION_ASSIGNMENTS_MOCK as ca, QCP as cb, QGEN as cc, QHW as cd, QOHR as ce, QPM as cf, QTLE as cg, QUESTIONNAIRE_CATEGORY_MOCK as ch, QUESTION_BANK_ITEM_CATEGORY_MOCK as ci, QWS as cj, RESPONSIBILITIES_CATEGORY_MOCK as ck, RESPONSIBILITIES_MOCK as cl, RESPONSIBILITY_CATEGORY_KEY_TO_ID as cm, SAFETYMINDER_BASIC as cn, SAFETYMINDER_ENTERPRISE as co, SAFETYMINDER_PROFESSIONAL as cp, SHOP_BASIC as cq, SHOP_ENTERPRISE as cr, SHOP_PRO as cs, TAGS_MOCK as ct, TASKS as cu, TASK_STATUSES as cv, TASK_TEMPLATES as cw, TASK_TYPES as cx, TEAMS_MOCK as cy, TEAM_MEMBERS_MOCK as cz, AI_ASSIST_MOCK as d, personLegalIds as d$, chatMessageMock as d0, chatMock as d1, checkboxInterface as d2, childCountMiddleware as d3, clearEntityDefinitionFirestoreCollections as d4, collectQuickSearchFieldPathsFromEntityDefinition as d5, colorInterface as d6, computeDiff as d7, contactInterface as d8, createAndSaveDashboardForUser as d9, meetingFilesMock as dA, meetingIds as dB, meetingMock as dC, meetingParticipantMock as dD, meetingRoleTypeMock as dE, meetingSessionMock as dF, meetingTimeSlotMock as dG, meetingTypeFileTemplateMock as dH, meetingTypeMock as dI, mergeDetailRelationMiddleware as dJ, mergeQuickSearchIntoRequest as dK, metadataCategoryMocks as dL, mockQuestionBankItemByName as dM, mockRoleDefinitions as dN, mockUsers as dO, multipleChoiceInterface as dP, multipleSelectInterface as dQ, normalizeAnyFileArrayForView as dR, normalizeSnapshotFileFieldsForView as dS, numberInterface as dT, parseEntityStorageInsertData as dU, parseEntityStorageQueryRequest as dV, participantIds as dW, participantMock as dX, passwordInterface as dY, personIdentifierTypeMock as dZ, personIds as d_, createDashboardForUser as da, createFileCastMiddleware as db, createWidgetLayoutConfig as dc, dateInterface as dd, dateTimeInterface as de, descriptionInterface as df, documentFolderSyncMiddleware as dg, emailInterface as dh, entityDefDb as di, entityValidationMiddleware as dj, fileUploaderInterface as dk, findEmployeeById as dl, folderStorageMiddleware as dm, generateUserDashboard as dn, groupOrderItemCalculatorMiddleware as dp, historyMiddleware as dq, identifierCommitMiddleware as dr, imageInterface as ds, inspectionOkXNaInterface as dt, loadMockPropertyDefinitions as du, lockGuardMiddleware as dv, longTextAnswerInterface as dw, lookupInterface as dx, lookupResolverMiddleware as dy, mapInterface as dz, AI_MODEL_MOCK as e, personMock as e0, personNaturalIds as e1, phoneInterface as e2, primaryMiddleware as e3, provideMockPropertySetups as e4, qrcodeInterface as e5, questionBankItemMock as e6, questionnaireCalculationMock as e7, questionnaireMock as e8, ratingInterface as e9, richTextInterface as ea, scaleInterface as eb, selectInterface as ec, selectionListInterface as ed, sexAtBirthInterface as ee, signatureInterface as ef, signatureLoaderMiddleware as eg, statusDefaultMiddleware as eh, tagInterface as ei, tenantMocks as ej, textAreaInterface as ek, textInterface as el, timeDurationInterface as em, titleInterface as en, toUiRows as eo, toggleInterface as ep, tokenCategoryIds as eq, tokenCategoryMocks as er, urlInterface as es, versionInterface as et, visibilityFilterMiddleware as eu, workflowDefinitionEntityMock as ev, workflowDefinitionIds as ew, workflowDefinitionMock as ex, yesNoInterface as ey, APPLICATIONS as f, AXCActivityCategorySeeder as g, AXCActivityDefinitionSeeder as h, AXCAiAssistSeeder as i, AXCAiManagementMockModule as j, AXCAiModelSeeder as k, AXCAppTermDataSeeder as l, AXCAppVersionDataSeeder as m, AXCApplicationDataSeeder as n, AXCApplicationManagementMockModule as o, AXCAssessmentManagementMockModule as p, AXCAssetManagementMockModule as q, resolveDelegatedAssistOptionModel as r, AXCAuthMockModule as s, AXCCalendarDataSeeder as t, AXCCalendarEventDataSeeder as u, AXCCalendarManagementMockModule as v, AXCCommandRegistryDataSeeder as w, AXCCommonMockModule as x, AXCContactCoreMockModule as y, AXCContentManagementMockModule as z };
|
|
65509
|
-
//# sourceMappingURL=acorex-connectivity-mock-acorex-connectivity-mock-
|
|
65873
|
+
//# sourceMappingURL=acorex-connectivity-mock-acorex-connectivity-mock-BpUUTZOi.mjs.map
|