@acorex/connectivity 21.0.0-next.57 → 21.0.0-next.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. package/fesm2022/{acorex-connectivity-mock-acorex-connectivity-mock-DBwcu-v0.mjs → acorex-connectivity-mock-acorex-connectivity-mock-SjZSega-.mjs} +967 -501
  2. package/fesm2022/acorex-connectivity-mock-acorex-connectivity-mock-SjZSega-.mjs.map +1 -0
  3. package/fesm2022/{acorex-connectivity-mock-assign-to-manager.activity-DtDwfWx9.mjs → acorex-connectivity-mock-assign-to-manager.activity-BF9U-Hd6.mjs} +2 -2
  4. package/fesm2022/{acorex-connectivity-mock-assign-to-manager.activity-DtDwfWx9.mjs.map → acorex-connectivity-mock-assign-to-manager.activity-BF9U-Hd6.mjs.map} +1 -1
  5. package/fesm2022/{acorex-connectivity-mock-chat-generate-image.command-DnennBRd.mjs → acorex-connectivity-mock-chat-generate-image.command-DhNpfDnJ.mjs} +2 -2
  6. package/fesm2022/{acorex-connectivity-mock-chat-generate-image.command-DnennBRd.mjs.map → acorex-connectivity-mock-chat-generate-image.command-DhNpfDnJ.mjs.map} +1 -1
  7. package/fesm2022/{acorex-connectivity-mock-chat-synthesize-speech.command-B9NWKlAu.mjs → acorex-connectivity-mock-chat-synthesize-speech.command-Bz-zOFK0.mjs} +2 -2
  8. package/fesm2022/{acorex-connectivity-mock-chat-synthesize-speech.command-B9NWKlAu.mjs.map → acorex-connectivity-mock-chat-synthesize-speech.command-Bz-zOFK0.mjs.map} +1 -1
  9. package/fesm2022/{acorex-connectivity-mock-chat-transcribe-speech.command-Dmp8i9Vc.mjs → acorex-connectivity-mock-chat-transcribe-speech.command-frk47mU7.mjs} +2 -2
  10. package/fesm2022/{acorex-connectivity-mock-chat-transcribe-speech.command-Dmp8i9Vc.mjs.map → acorex-connectivity-mock-chat-transcribe-speech.command-frk47mU7.mjs.map} +1 -1
  11. package/fesm2022/{acorex-connectivity-mock-entity-create.activity-Ca19tIj4.mjs → acorex-connectivity-mock-entity-create.activity-CdoUzUvF.mjs} +10 -3
  12. package/fesm2022/acorex-connectivity-mock-entity-create.activity-CdoUzUvF.mjs.map +1 -0
  13. package/fesm2022/{acorex-connectivity-mock-user-roles-for-list-column.query-DSr7jDGu.mjs → acorex-connectivity-mock-user-roles-for-list-column.query-CAhDQnWv.mjs} +2 -2
  14. package/fesm2022/{acorex-connectivity-mock-user-roles-for-list-column.query-DSr7jDGu.mjs.map → acorex-connectivity-mock-user-roles-for-list-column.query-CAhDQnWv.mjs.map} +1 -1
  15. package/fesm2022/acorex-connectivity-mock.mjs +1 -1
  16. package/package.json +2 -2
  17. package/types/acorex-connectivity-mock.d.ts +51 -14
  18. package/fesm2022/acorex-connectivity-mock-acorex-connectivity-mock-DBwcu-v0.mjs.map +0 -1
  19. package/fesm2022/acorex-connectivity-mock-entity-create.activity-Ca19tIj4.mjs.map +0 -1
@@ -3,7 +3,7 @@ import * as i2$2 from '@acorex/platform/auth';
3
3
  import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER, AXPPermissionDefinitionService, 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
5
  import { AXPDataGenerator, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXPIconLogoConfig, AXPModuleManifestRegistry, AXPActivityLogProvider, AXP_ACTIVITY_LOG_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXPDataSourceDefinitionProviderService, AXPPlatformScope, AXPExpressionEvaluatorService, provideLazyProvider } from '@acorex/platform/core';
6
- import { runEntityQuery, filterSortEntityRows, computeEntityAggregates, AXP_ENTITY_STORAGE_BACKEND, AXPEntityStorageService, isAXPMiddlewareAbortError, AXPEntityResolver, collectEntityQuickSearchFieldPaths, AXP_ENTITY_DEFINITION_CRUD_SERVICE, AXPEntityService, AXP_ENTITY_DEFINITION_LOADER, axpCreateEntityAiToolInputDefaults, AXPMiddlewareAbortError, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_STORAGE_MIDDLEWARE, AXPEntityDefinitionRegistryService, eventDispatchMiddleware, AXPDataSeederService } from '@acorex/platform/layout/entity';
6
+ import { runEntityQuery, filterSortEntityRows, computeEntityAggregates, AXP_ENTITY_STORAGE_BACKEND, AXPEntityStorageService, isAXPMiddlewareAbortError, AXPEntityResolver, collectEntityQuickSearchFieldPaths, AXP_ENTITY_DEFINITION_CRUD_SERVICE, AXPEntityService, AXP_ENTITY_DEFINITION_LOADER, axpCreateEntityAiToolInputDefaults, AXPMiddlewareAbortError, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_STORAGE_MIDDLEWARE, AXPEntityDefinitionRegistryService, eventDispatchMiddleware, buildAXPRecordWorkflowInfo, AXPDataSeederService } from '@acorex/platform/layout/entity';
7
7
  import * as i0 from '@angular/core';
8
8
  import { InjectionToken, inject, Injectable, NgModule, isDevMode, Injector, Inject, signal, Component } from '@angular/core';
9
9
  import { AXP_MENU_PROVIDER, AXPFileStorageService, AXPSettingsService, AXPSystemStatusType, AXPAppVersionService, AXPFileStorageStatus, AXVChangeType as AXVChangeType$1, AXP_SEARCH_PROVIDER, AXPLockService, AXPVersioningService, AXPSystemStatuses, AXPStatusDefinitionProviderService } from '@acorex/platform/common';
@@ -28,10 +28,10 @@ import { AXPHumanCapitalManagementFeatureKeys, AXMPermissionsKeys as AXMPermissi
28
28
  import { RootConfig as RootConfig$5 } from '@acorex/modules/locale-management';
29
29
  import { AXMPermissionsKeys as AXMPermissionsKeys$1, AXMSubscriptionManagementSubscriptionEntityService, AXMSubscriptionManagementSubscriptionPlanItemEntityService, RootConfig as RootConfig$x } from '@acorex/modules/subscription-management';
30
30
  import { AXPSecurityManagementPermissionKeys, AXMUserAccessState, resolveAXMUserEffectiveState, RootConfig as RootConfig$6, AXMPolicyService } from '@acorex/modules/security-management';
31
- import { AXMTenantManagementPermissionsKeys, AXMTenantService, AXMTenantManagementTenantUserEntityService, RootConfig as RootConfig$A } from '@acorex/modules/tenant-management';
31
+ import { AXMTenantManagementPermissionsKeys, AXMTenantService, AXMTenantManagementTenantUserEntityService, RootConfig as RootConfig$y } from '@acorex/modules/tenant-management';
32
32
  import { AXMPermissionsKeys as AXMPermissionsKeys$5, RootConfig as RootConfig$e, AXMDocumentTypeServiceImpl, AXPDocumentManagementService } from '@acorex/modules/document-management';
33
33
  import { AXMSettingsManagementPermissionKeys } from '@acorex/modules/settings-management';
34
- import { AXMPermissionsKeys as AXMPermissionsKeys$3, RootConfig as RootConfig$z, AXPWorkflowTaskProvider, matchesTaskBoardAssigneeFilter } from '@acorex/modules/task-management';
34
+ import { AXMPermissionsKeys as AXMPermissionsKeys$3, RootConfig as RootConfig$A, AXPWorkflowTaskProvider, matchesTaskBoardAssigneeFilter } from '@acorex/modules/task-management';
35
35
  import { AXMPermissionsKeys as AXMPermissionsKeys$4, AXMChatConversationApi, AXMChatMessageApi, axmAssistFollowUpItemsFromUnknown, axmAssistUserFacingPayloadLine, axmBuildAssistTranscriptLinePayload, AXM_ASSIST_TRANSCRIPT_LINE_PAYLOAD_TYPE, AXMChatRealtimeApi, AXMChatUserApi, axmIsAssistPeerParticipant, RootConfig as RootConfig$a } from '@acorex/modules/conversation';
36
36
  import { RootConfig as RootConfig$7 } from '@acorex/modules/business-core';
37
37
  import { RootConfig as RootConfig$8 } from '@acorex/modules/calendar-management';
@@ -78,7 +78,7 @@ import { RootConfig as RootConfig$v } from '@acorex/modules/project-management';
78
78
  import { RootConfig as RootConfig$w } from '@acorex/modules/reservation-management';
79
79
  import { AXMSessionStatusTypes, AXMDeviceSessionsServiceImpl, AXMDeviceSessionsService, AXM_AUTH_CONFIG_TOKEN } from '@acorex/modules/auth';
80
80
  import * as i1$3 from '@acorex/components/dialog';
81
- import { RootConfig as RootConfig$y } from '@acorex/modules/supplier-management';
81
+ import { RootConfig as RootConfig$z } from '@acorex/modules/supplier-management';
82
82
  import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
83
83
  import { Router } from '@angular/router';
84
84
  import { AXPWorkflowManager, AXPWorkflowDefinitionService, AXPActivityDefinitionService, AXP_WORKFLOW_PROVIDER, WorkflowExpressionScopeService, AXPWorkflowEngineError, AXP_WORKFLOW_ERROR_CODES, AXP_WORKFLOW_ENGINE } from '@acorex/platform/workflow';
@@ -4869,6 +4869,7 @@ function createDefaultContactEmergencyMenuDefinition() {
4869
4869
  icon: 'fa-light fa-siren',
4870
4870
  priority: 20,
4871
4871
  entityListRef: { module: 'ContactCore', entity: 'EmergencyService' },
4872
+ policyFeatures: ['ContactCore'],
4872
4873
  policyPermissions: ['ContactCore:Permission:EmergencyService.Management'],
4873
4874
  categoryIds: ['ContactCore'],
4874
4875
  categories: [{ id: 'ContactCore', title: 'Contact Core' }],
@@ -4914,6 +4915,17 @@ async function ensureDefaultMenuDefinitionsSeeded(crud) {
4914
4915
  const existing = await crud.getMenu(id);
4915
4916
  if (!existing) {
4916
4917
  await crud.createMenu(id, factory());
4918
+ continue;
4919
+ }
4920
+ if (id === DEFAULT_CONTACT_EMERGENCY_MENU_ID) {
4921
+ const expected = factory();
4922
+ const hasFeaturePolicy = existing.policyFeatures?.includes('ContactCore');
4923
+ if (!hasFeaturePolicy) {
4924
+ await crud.updateMenu(id, {
4925
+ ...existing,
4926
+ policyFeatures: expected.policyFeatures,
4927
+ });
4928
+ }
4917
4929
  }
4918
4930
  }
4919
4931
  }
@@ -14545,7 +14557,7 @@ const AI_ASSIST_MOCK = [
14545
14557
  {
14546
14558
  id: AXMAiDemisAssistId,
14547
14559
  name: 'demis-payment-guide',
14548
- title: M$19('Magfa Assistant', 'دستیار هوشمند مرکز کسترش فناوری اطلاعات'),
14560
+ title: M$19('Magfa Assistant', 'دستیار هوشمند مرکز گسترش فناوری اطلاعات'),
14549
14561
  metadata: {
14550
14562
  agent_uuid: AXMAiDemisAssistAgentUuid,
14551
14563
  },
@@ -21445,7 +21457,7 @@ class AXCAiManagementMockModule {
21445
21457
  provideCommandSetups([
21446
21458
  {
21447
21459
  key: 'AiManagement:ChatGenerateImage',
21448
- command: () => import('./acorex-connectivity-mock-chat-generate-image.command-DnennBRd.mjs').then((c) => c.AiManagementChatGenerateImageCommand),
21460
+ command: () => import('./acorex-connectivity-mock-chat-generate-image.command-DhNpfDnJ.mjs').then((c) => c.AiManagementChatGenerateImageCommand),
21449
21461
  },
21450
21462
  {
21451
21463
  key: 'AiManagement:ExtractDocumentText',
@@ -21457,11 +21469,11 @@ class AXCAiManagementMockModule {
21457
21469
  },
21458
21470
  {
21459
21471
  key: 'AiManagement:ChatTranscribeSpeech',
21460
- command: () => import('./acorex-connectivity-mock-chat-transcribe-speech.command-Dmp8i9Vc.mjs').then((c) => c.AiManagementChatTranscribeSpeechCommand),
21472
+ command: () => import('./acorex-connectivity-mock-chat-transcribe-speech.command-frk47mU7.mjs').then((c) => c.AiManagementChatTranscribeSpeechCommand),
21461
21473
  },
21462
21474
  {
21463
21475
  key: 'AiManagement:ChatSynthesizeSpeech',
21464
- command: () => import('./acorex-connectivity-mock-chat-synthesize-speech.command-B9NWKlAu.mjs').then((c) => c.AiManagementChatSynthesizeSpeechCommand),
21476
+ command: () => import('./acorex-connectivity-mock-chat-synthesize-speech.command-Bz-zOFK0.mjs').then((c) => c.AiManagementChatSynthesizeSpeechCommand),
21465
21477
  },
21466
21478
  ]),
21467
21479
  ] }); }
@@ -21514,7 +21526,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
21514
21526
  provideCommandSetups([
21515
21527
  {
21516
21528
  key: 'AiManagement:ChatGenerateImage',
21517
- command: () => import('./acorex-connectivity-mock-chat-generate-image.command-DnennBRd.mjs').then((c) => c.AiManagementChatGenerateImageCommand),
21529
+ command: () => import('./acorex-connectivity-mock-chat-generate-image.command-DhNpfDnJ.mjs').then((c) => c.AiManagementChatGenerateImageCommand),
21518
21530
  },
21519
21531
  {
21520
21532
  key: 'AiManagement:ExtractDocumentText',
@@ -21526,11 +21538,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
21526
21538
  },
21527
21539
  {
21528
21540
  key: 'AiManagement:ChatTranscribeSpeech',
21529
- command: () => import('./acorex-connectivity-mock-chat-transcribe-speech.command-Dmp8i9Vc.mjs').then((c) => c.AiManagementChatTranscribeSpeechCommand),
21541
+ command: () => import('./acorex-connectivity-mock-chat-transcribe-speech.command-frk47mU7.mjs').then((c) => c.AiManagementChatTranscribeSpeechCommand),
21530
21542
  },
21531
21543
  {
21532
21544
  key: 'AiManagement:ChatSynthesizeSpeech',
21533
- command: () => import('./acorex-connectivity-mock-chat-synthesize-speech.command-B9NWKlAu.mjs').then((c) => c.AiManagementChatSynthesizeSpeechCommand),
21545
+ command: () => import('./acorex-connectivity-mock-chat-synthesize-speech.command-Bz-zOFK0.mjs').then((c) => c.AiManagementChatSynthesizeSpeechCommand),
21534
21546
  },
21535
21547
  ]),
21536
21548
  ],
@@ -21785,6 +21797,7 @@ const APPLICATION_TREE = [
21785
21797
  'TenantManagement',
21786
21798
  'SubscriptionManagement',
21787
21799
  'AiManagement',
21800
+ 'PlatformDevTools',
21788
21801
  'Common',
21789
21802
  AXPCommonFeatureKeys.GlobalSearch,
21790
21803
  ],
@@ -22120,7 +22133,25 @@ class AXCEditionDataSeeder {
22120
22133
  this.storageService = inject(AXPEntityStorageService);
22121
22134
  }
22122
22135
  async seed() {
22123
- await this.storageService.initial(`${RootConfig$2.module.name}.${RootConfig$2.entities.edition.name}`, EDITIONS);
22136
+ const entityName = `${RootConfig$2.module.name}.${RootConfig$2.entities.edition.name}`;
22137
+ await this.storageService.initial(entityName, EDITIONS);
22138
+ await this.syncPlatformConsoleEditionModules(entityName);
22139
+ }
22140
+ /** Keeps Platform Console edition modules aligned when featureKeys change in mock data. */
22141
+ async syncPlatformConsoleEditionModules(editionsEntityName) {
22142
+ const storedEditions = await this.storageService.getAll(editionsEntityName);
22143
+ const stored = storedEditions.find((edition) => edition.id === PLATFORM_CONSOLE.id);
22144
+ if (!stored?.id || !PLATFORM_CONSOLE.modulesAndFeatures) {
22145
+ return;
22146
+ }
22147
+ const storedModules = [...(stored.modulesAndFeatures?.modules ?? [])].sort().join(',');
22148
+ const expectedModules = [...(PLATFORM_CONSOLE.modulesAndFeatures.modules ?? [])].sort().join(',');
22149
+ if (storedModules === expectedModules) {
22150
+ return;
22151
+ }
22152
+ await this.storageService.updateOne(editionsEntityName, stored.id, {
22153
+ modulesAndFeatures: PLATFORM_CONSOLE.modulesAndFeatures,
22154
+ });
22124
22155
  }
22125
22156
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCEditionDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
22126
22157
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCEditionDataSeeder }); }
@@ -30179,7 +30210,7 @@ if (locationMock.length >= 15) {
30179
30210
  }
30180
30211
  }
30181
30212
 
30182
- const uuid$o = AXPDataGenerator.uuid;
30213
+ const uuid$n = AXPDataGenerator.uuid;
30183
30214
  /**
30184
30215
  * Identifier rule `asset-system-type-code`: `ASYS-{seq:2}`. Seed uses a high sequence band (90+)
30185
30216
  * so `identifier.peek("asset-system-type-code")` on a fresh store (starts at ASYS-01) does not
@@ -30232,7 +30263,7 @@ const assetSystemTypeMock = [
30232
30263
  metaDataList: { groups: [] },
30233
30264
  },
30234
30265
  {
30235
- id: uuid$o(),
30266
+ id: uuid$n(),
30236
30267
  code: 'ASYS-94',
30237
30268
  title: ml$1('Power Distribution Subsystem Type', 'نوع زیرسیستم توزیع برق'),
30238
30269
  description: ml$1('Subsystem classification for electrical distribution and backup power.', 'طبقه‌بندی زیرسیستم برای توزیع برق و برق پشتیبان.'),
@@ -30246,7 +30277,7 @@ const assetSystemTypeMock = [
30246
30277
  },
30247
30278
  ];
30248
30279
 
30249
- const uuid$n = AXPDataGenerator.uuid;
30280
+ const uuid$m = AXPDataGenerator.uuid;
30250
30281
  const getLocationByCode$1 = (code) => locationMock.find((location) => location.code === code);
30251
30282
  const getAssetSystemTypeById = (id) => assetSystemTypeMock.find((item) => item.id === id);
30252
30283
  const toLocalized$1 = (enUS, faIR) => ({
@@ -30313,7 +30344,7 @@ const assetSystemMock = assetSystemEntries.map((entry) => {
30313
30344
  throw new Error(`Missing location for code: ${entry.locationCode}`);
30314
30345
  }
30315
30346
  return {
30316
- id: uuid$n(),
30347
+ id: uuid$m(),
30317
30348
  code: entry.code,
30318
30349
  title: toLocalized$1(entry.title, entry.titleFa),
30319
30350
  assetSystemTypeId: entry.assetSystemTypeId,
@@ -32634,10 +32665,10 @@ const POSITIONS_MOCK = (() => {
32634
32665
  })();
32635
32666
 
32636
32667
  const M$_ = createMultiLanguageString;
32637
- const uuid$m = AXPDataGenerator.uuid;
32668
+ const uuid$l = AXPDataGenerator.uuid;
32638
32669
  const BUSINESS_UNIT_TYPES_MOCK = [
32639
32670
  {
32640
- id: uuid$m(),
32671
+ id: uuid$l(),
32641
32672
  title: M$_('Division', 'بخش'),
32642
32673
  name: 'division',
32643
32674
  isLocationBased: true,
@@ -32646,7 +32677,7 @@ const BUSINESS_UNIT_TYPES_MOCK = [
32646
32677
  icon: 'fa-sitemap',
32647
32678
  },
32648
32679
  {
32649
- id: uuid$m(),
32680
+ id: uuid$l(),
32650
32681
  title: M$_('Department', 'دپارتمان'),
32651
32682
  name: 'department',
32652
32683
  isLocationBased: false,
@@ -32655,7 +32686,7 @@ const BUSINESS_UNIT_TYPES_MOCK = [
32655
32686
  icon: 'fa-building-user',
32656
32687
  },
32657
32688
  {
32658
- id: uuid$m(),
32689
+ id: uuid$l(),
32659
32690
  title: M$_('Branch', 'شعبه'),
32660
32691
  name: 'branch',
32661
32692
  isLocationBased: true,
@@ -32670,7 +32701,7 @@ const BUSINESS_UNIT_TYPES_MOCK = [
32670
32701
  * Aligns with SAP/Oracle-style “corporate / headquarters” org unit — not nullable on assignments.
32671
32702
  */
32672
32703
  const AXM_CORPORATE_BUSINESS_UNIT_ID = 'a1b2c3d4-e5f6-4789-a012-34567890abcd';
32673
- const uuid$l = AXPDataGenerator.uuid;
32704
+ const uuid$k = AXPDataGenerator.uuid;
32674
32705
  function pickHeadPositionId(bu) {
32675
32706
  const ids = bu.positionIds ?? [];
32676
32707
  if (!ids.length)
@@ -32733,7 +32764,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32733
32764
  items.push(corporateHeadquarters);
32734
32765
  // Divisions under corporate root
32735
32766
  const divisionOps = {
32736
- id: uuid$l(),
32767
+ id: uuid$k(),
32737
32768
  code: 'BU-DIV-OPS',
32738
32769
  title: createMultiLanguageString('Operations Division', 'بخش عملیات'),
32739
32770
  description: createMultiLanguageString('Core operations across plants', 'عملیات اصلی در کارخانه‌ها'),
@@ -32753,7 +32784,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32753
32784
  ]),
32754
32785
  };
32755
32786
  const divisionSales = {
32756
- id: uuid$l(),
32787
+ id: uuid$k(),
32757
32788
  code: 'BU-DIV-SALES',
32758
32789
  title: createMultiLanguageString('Sales Division', 'بخش فروش'),
32759
32790
  description: createMultiLanguageString('Global sales organization', 'سازمان فروش جهانی'),
@@ -32766,7 +32797,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32766
32797
  ...positionsByTitles(['Sales Associate', 'Account Executive', 'Sales Manager', 'VP of Sales']),
32767
32798
  };
32768
32799
  const divisionEngineering = {
32769
- id: uuid$l(),
32800
+ id: uuid$k(),
32770
32801
  code: 'BU-DIV-ENG',
32771
32802
  title: createMultiLanguageString('Engineering Division', 'بخش مهندسی'),
32772
32803
  description: createMultiLanguageString('Product and platform engineering', 'مهندسی محصول و پلتفرم'),
@@ -32781,7 +32812,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32781
32812
  items.push(divisionOps, divisionSales, divisionEngineering);
32782
32813
  // Departments under Operations
32783
32814
  const depHSE = {
32784
- id: uuid$l(),
32815
+ id: uuid$k(),
32785
32816
  code: 'BU-DEPT-HSE',
32786
32817
  title: createMultiLanguageString('Health, Safety & Environment', 'بهداشت، ایمنی و محیط زیست'),
32787
32818
  description: createMultiLanguageString('WHS/OHS', 'بهداشت و ایمنی شغلی'),
@@ -32792,7 +32823,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32792
32823
  ...positionsByTitles(['HSE Officer', 'Safety Officer', 'Environmental Specialist', 'HSE Manager']),
32793
32824
  };
32794
32825
  const depQuality = {
32795
- id: uuid$l(),
32826
+ id: uuid$k(),
32796
32827
  code: 'BU-DEPT-QA',
32797
32828
  title: createMultiLanguageString('Quality Assurance', 'تضمین کیفیت'),
32798
32829
  description: createMultiLanguageString('QA and compliance', 'کنترل کیفیت و انطباق'),
@@ -32810,7 +32841,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32810
32841
  ]),
32811
32842
  };
32812
32843
  const depMaintenance = {
32813
- id: uuid$l(),
32844
+ id: uuid$k(),
32814
32845
  code: 'BU-DEPT-MNT',
32815
32846
  title: createMultiLanguageString('Maintenance', 'نگهداری و تعمیرات'),
32816
32847
  description: createMultiLanguageString('Asset reliability and maintenance', 'قابلیت اطمینان دارایی و نگهداری'),
@@ -32823,7 +32854,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32823
32854
  items.push(depHSE, depQuality, depMaintenance);
32824
32855
  // Departments under Engineering
32825
32856
  const depPlatform = {
32826
- id: uuid$l(),
32857
+ id: uuid$k(),
32827
32858
  code: 'BU-DEPT-PLAT',
32828
32859
  title: createMultiLanguageString('Platform Engineering', 'مهندسی پلتفرم'),
32829
32860
  description: createMultiLanguageString('Core platform teams', 'تیم‌های اصلی پلتفرم'),
@@ -32834,7 +32865,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32834
32865
  ...positionsByTitles(['DevOps Engineer', 'Senior DevOps Engineer', 'Engineering Team Lead', 'Director of DevOps']),
32835
32866
  };
32836
32867
  const depProduct = {
32837
- id: uuid$l(),
32868
+ id: uuid$k(),
32838
32869
  code: 'BU-DEPT-PROD',
32839
32870
  title: createMultiLanguageString('Product Engineering', 'مهندسی محصول'),
32840
32871
  description: createMultiLanguageString('Product squads', 'اسکوادهای محصول'),
@@ -32847,7 +32878,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32847
32878
  items.push(depPlatform, depProduct);
32848
32879
  // Branches (location-based) under cities
32849
32880
  const branchLA = {
32850
- id: uuid$l(),
32881
+ id: uuid$k(),
32851
32882
  code: 'BU-BR-LA',
32852
32883
  title: createMultiLanguageString('Los Angeles Branch', 'شعبه لس‌آنجلس'),
32853
32884
  description: createMultiLanguageString('US West Region', 'منطقه غرب آمریکا'),
@@ -32859,7 +32890,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32859
32890
  geographicRegion: LA,
32860
32891
  };
32861
32892
  const branchSF = {
32862
- id: uuid$l(),
32893
+ id: uuid$k(),
32863
32894
  code: 'BU-BR-SF',
32864
32895
  title: createMultiLanguageString('San Francisco Branch', 'شعبه سان‌فرانسیسکو'),
32865
32896
  description: createMultiLanguageString('Bay Area', 'منطقه خلیج'),
@@ -32871,7 +32902,7 @@ const BUSINESS_UNITS_MOCK = (() => {
32871
32902
  geographicRegion: SF,
32872
32903
  };
32873
32904
  const branchSydney = {
32874
- id: uuid$l(),
32905
+ id: uuid$k(),
32875
32906
  code: 'BU-BR-SYD',
32876
32907
  title: createMultiLanguageString('Sydney Branch', 'شعبه سیدنی'),
32877
32908
  description: createMultiLanguageString('ANZ Region', 'منطقه استرالیا و نیوزیلند'),
@@ -33084,25 +33115,45 @@ const personTitleMocks = [
33084
33115
 
33085
33116
  //#region ---- Tenant ID Constants ----
33086
33117
  /**
33087
- * Tenant ID constants for use across mock data.
33088
- * These are generated once and exported to ensure consistency.
33118
+ * Stable tenant primary keys for mock data (not generated per process) so IndexedDB seeds,
33119
+ * tenant-user links, and subscriptions stay aligned across reloads and user switches.
33089
33120
  */
33090
- const PLATFORM_TENANT_ID = AXPDataGenerator.uuid();
33091
- const TIMEPLICITY_TENANT_ID = AXPDataGenerator.uuid();
33092
- const LASER_PLUMBING_TENANT_ID = AXPDataGenerator.uuid();
33121
+ const PLATFORM_TENANT_ID = 'f0000002-0000-4000-a000-000000000001';
33122
+ const TIMEPLICITY_TENANT_ID = 'f0000002-0000-4000-a000-000000000002';
33123
+ const LASER_PLUMBING_TENANT_ID = 'f0000002-0000-4000-a000-000000000003';
33093
33124
  /** MAGFA — Iran commerce tenant for conversation / AI / reports demo. */
33094
- const MAGFA_TENANT_ID = AXPDataGenerator.uuid();
33125
+ const MAGFA_TENANT_ID = 'f0000002-0000-4000-a000-000000000004';
33095
33126
  /** @deprecated Use {@link MAGFA_TENANT_ID}. */
33096
33127
  const COLLABORATION_TENANT_ID = MAGFA_TENANT_ID;
33097
33128
  //#endregion
33098
33129
 
33130
+ //#region ---- Role ID Constants ----
33131
+ /**
33132
+ * Stable role primary keys for mock data (not generated per process) so IndexedDB seeds,
33133
+ * tenant-user links, and user roleIds stay aligned across reloads.
33134
+ */
33135
+ const MOCK_ROLE_IDS = {
33136
+ root: 'f0000004-0000-4000-a000-000000000001',
33137
+ platformApplicationAdministrator: 'f0000004-0000-4000-a000-000000000002',
33138
+ admin: 'f0000004-0000-4000-a000-000000000003',
33139
+ manager: 'f0000004-0000-4000-a000-000000000004',
33140
+ user: 'f0000004-0000-4000-a000-000000000005',
33141
+ support: 'f0000004-0000-4000-a000-000000000006',
33142
+ hr: 'f0000004-0000-4000-a000-000000000007',
33143
+ finance: 'f0000004-0000-4000-a000-000000000008',
33144
+ dev: 'f0000004-0000-4000-a000-000000000009',
33145
+ accountHolder: 'f0000004-0000-4000-a000-00000000000a',
33146
+ tenantAdministrator: 'f0000004-0000-4000-a000-00000000000b',
33147
+ conversationOnly: 'f0000004-0000-4000-a000-00000000000c',
33148
+ };
33149
+ //#endregion
33150
+
33099
33151
  //#region ---- Imports ----
33100
33152
  //#endregion
33101
33153
  //#region ---- Mock Data ----
33102
- const uuid$k = AXPDataGenerator.uuid;
33103
33154
  const mockRoleDefinitions = [
33104
33155
  {
33105
- id: uuid$k(),
33156
+ id: MOCK_ROLE_IDS.root,
33106
33157
  name: 'root',
33107
33158
  title: 'Super Administrator',
33108
33159
  description: 'Full system access with all administrative privileges',
@@ -33157,7 +33208,7 @@ const mockRoleDefinitions = [
33157
33208
  },
33158
33209
  },
33159
33210
  {
33160
- id: uuid$k(),
33211
+ id: MOCK_ROLE_IDS.platformApplicationAdministrator,
33161
33212
  name: 'platform-application-administrator',
33162
33213
  title: 'Platform Application Administrator',
33163
33214
  description: 'Full platform application access with all administrative privileges',
@@ -33177,7 +33228,7 @@ const mockRoleDefinitions = [
33177
33228
  },
33178
33229
  },
33179
33230
  {
33180
- id: uuid$k(),
33231
+ id: MOCK_ROLE_IDS.admin,
33181
33232
  name: 'admin',
33182
33233
  title: 'Administrator',
33183
33234
  description: 'Full system access with all administrative privileges',
@@ -33198,7 +33249,7 @@ const mockRoleDefinitions = [
33198
33249
  },
33199
33250
  },
33200
33251
  {
33201
- id: uuid$k(),
33252
+ id: MOCK_ROLE_IDS.manager,
33202
33253
  name: 'manager',
33203
33254
  title: 'Manager',
33204
33255
  description: 'Manages users and has access to most system features',
@@ -33216,7 +33267,7 @@ const mockRoleDefinitions = [
33216
33267
  },
33217
33268
  },
33218
33269
  {
33219
- id: uuid$k(),
33270
+ id: MOCK_ROLE_IDS.user,
33220
33271
  name: 'user',
33221
33272
  title: 'Regular User',
33222
33273
  description: 'Standard user with basic system access',
@@ -33236,7 +33287,7 @@ const mockRoleDefinitions = [
33236
33287
  },
33237
33288
  },
33238
33289
  {
33239
- id: uuid$k(),
33290
+ id: MOCK_ROLE_IDS.support,
33240
33291
  name: 'support',
33241
33292
  title: 'Support Staff',
33242
33293
  description: 'Customer support and ticket management access',
@@ -33254,7 +33305,7 @@ const mockRoleDefinitions = [
33254
33305
  },
33255
33306
  },
33256
33307
  {
33257
- id: uuid$k(),
33308
+ id: MOCK_ROLE_IDS.hr,
33258
33309
  name: 'hr',
33259
33310
  title: 'Human Resources',
33260
33311
  description: 'Access to HR-related features and user management',
@@ -33272,7 +33323,7 @@ const mockRoleDefinitions = [
33272
33323
  },
33273
33324
  },
33274
33325
  {
33275
- id: uuid$k(),
33326
+ id: MOCK_ROLE_IDS.finance,
33276
33327
  name: 'finance',
33277
33328
  title: 'Finance',
33278
33329
  description: 'Access to financial reports and invoicing features',
@@ -33290,7 +33341,7 @@ const mockRoleDefinitions = [
33290
33341
  },
33291
33342
  },
33292
33343
  {
33293
- id: uuid$k(),
33344
+ id: MOCK_ROLE_IDS.dev,
33294
33345
  name: 'dev',
33295
33346
  title: 'Developer',
33296
33347
  description: 'Technical access to development and debugging features',
@@ -33312,7 +33363,7 @@ const mockRoleDefinitions = [
33312
33363
  },
33313
33364
  },
33314
33365
  {
33315
- id: uuid$k(),
33366
+ id: MOCK_ROLE_IDS.accountHolder,
33316
33367
  name: 'account-holder',
33317
33368
  title: 'Account Holder',
33318
33369
  description: 'Primary account owner with full tenant management privileges',
@@ -33332,7 +33383,7 @@ const mockRoleDefinitions = [
33332
33383
  },
33333
33384
  },
33334
33385
  {
33335
- id: uuid$k(),
33386
+ id: MOCK_ROLE_IDS.tenantAdministrator,
33336
33387
  name: 'tenant-administrator',
33337
33388
  title: 'Tenant Administrator',
33338
33389
  description: 'Tenant-level administrator with full CRUD access to users and roles',
@@ -33380,7 +33431,7 @@ const mockRoleDefinitions = [
33380
33431
  },
33381
33432
  },
33382
33433
  {
33383
- id: 'a0000001-0000-4000-a000-000000000099',
33434
+ id: MOCK_ROLE_IDS.conversationOnly,
33384
33435
  name: 'conversation-only',
33385
33436
  title: 'Conversation Only',
33386
33437
  description: 'Conversation access only for MAGFA commerce',
@@ -35222,8 +35273,8 @@ const visibilityFilterMiddleware = {
35222
35273
  if (bypassVisibility && bypassOwnership) {
35223
35274
  return;
35224
35275
  }
35225
- // Filter function to check visibility (async to allow tenant loading)
35226
- const isVisible = async (record) => {
35276
+ // Filter function to check visibility
35277
+ const isVisible = (record) => {
35227
35278
  // Check stateInfo visibility flags (unless bypassed)
35228
35279
  if (!bypassVisibility && record?.stateInfo) {
35229
35280
  const { isHidden } = record.stateInfo;
@@ -35234,36 +35285,15 @@ const visibilityFilterMiddleware = {
35234
35285
  // Check ownershipInfo for tenant and application filtering (unless bypassed)
35235
35286
  if (!bypassOwnership && record?.ownershipInfo) {
35236
35287
  const { tenantId, applicationId } = record.ownershipInfo;
35237
- // Filter by tenant: check both session tenant and user's ownership tenant
35238
- // Show record if:
35239
- // - Record has no tenantId (global record)
35240
- // - Session tenant matches record tenant
35241
- // - User's ownership tenant matches record tenant (fallback if session tenant not set or different)
35242
- // - Neither session nor user tenant is set (show all)
35243
- // - Current user is a platform user (root/root2/super-root) and record is from platform tenant
35288
+ // Filter by tenant: session tenant is authoritative when set; otherwise fall back to the
35289
+ // signed-in user's ownership tenant (e.g. before tenant chooser completes).
35244
35290
  if (tenantId) {
35245
- const sessionTenantMatches = currentTenantId && tenantId === currentTenantId;
35246
- const userTenantMatches = currentUserTenantId && tenantId === currentUserTenantId;
35247
- const noTenantSet = !currentTenantId && !currentUserTenantId;
35248
- // Check if current user is a platform user (root/root2)
35249
- const isPlatformUser = session.user?.name === 'root' || session.user?.name === 'root2' || session.user?.name === 'super-root';
35250
- // If user is platform user, try to load tenant to check if it's platform tenant by name
35251
- let isPlatformTenant = false;
35252
- if (isPlatformUser && tenantId) {
35253
- try {
35254
- const tenantEntityName = 'TenantManagement.Tenant';
35255
- const tenant = await backend.getOne(tenantEntityName, tenantId);
35256
- if (tenant && (tenant.name === 'acorex-tenant' || tenant.name === 'platform-tenant')) {
35257
- isPlatformTenant = true;
35258
- }
35259
- }
35260
- catch (error) {
35261
- // If we can't load tenant, continue without platform tenant check
35291
+ if (currentTenantId) {
35292
+ if (tenantId !== currentTenantId) {
35293
+ return false;
35262
35294
  }
35263
35295
  }
35264
- // Filter out if tenant is set and doesn't match either session or user tenant
35265
- // Exception: platform users can see platform tenant records
35266
- if (!sessionTenantMatches && !userTenantMatches && !noTenantSet && !isPlatformTenant) {
35296
+ else if (currentUserTenantId && tenantId !== currentUserTenantId) {
35267
35297
  return false;
35268
35298
  }
35269
35299
  }
@@ -35297,8 +35327,7 @@ const visibilityFilterMiddleware = {
35297
35327
  take: Number.MAX_SAFE_INTEGER, // Get all records
35298
35328
  });
35299
35329
  // Filter all records with visibility filter
35300
- const visibilityResults = await Promise.all(allFilteredRecordsResult.items.map((record) => isVisible(record)));
35301
- const filteredAllRecords = allFilteredRecordsResult.items.filter((_, index) => visibilityResults[index]);
35330
+ const filteredAllRecords = allFilteredRecordsResult.items.filter((record) => isVisible(record));
35302
35331
  // Update total count based on filtered records
35303
35332
  const filteredTotal = filteredAllRecords.length;
35304
35333
  // Re-apply pagination to filtered records
@@ -35312,8 +35341,7 @@ const visibilityFilterMiddleware = {
35312
35341
  // For getAll operation, result is a plain array
35313
35342
  if (Array.isArray(ctx.result)) {
35314
35343
  // Filter all records
35315
- const visibilityResults = await Promise.all(ctx.result.map((record) => isVisible(record)));
35316
- ctx.result = ctx.result.filter((_, index) => visibilityResults[index]);
35344
+ ctx.result = ctx.result.filter((record) => isVisible(record));
35317
35345
  }
35318
35346
  }
35319
35347
  },
@@ -35644,7 +35672,7 @@ class MockTenantLoader {
35644
35672
  ],
35645
35673
  };
35646
35674
  // Get all active tenants
35647
- const tenantsResult = await tenantService.query({ skip: 0, take: 1000, filter: tenantFilter });
35675
+ const tenantsResult = await tenantService.query(bypassAllFilters({ skip: 0, take: 1000, filter: tenantFilter }));
35648
35676
  // Get active subscriptions for tenants
35649
35677
  const subscriptionFilter = {
35650
35678
  logic: 'and',
@@ -35661,7 +35689,7 @@ class MockTenantLoader {
35661
35689
  },
35662
35690
  ],
35663
35691
  };
35664
- const subscriptionsResult = await subscriptionService.query({ skip: 0, take: 1000, filter: subscriptionFilter });
35692
+ const subscriptionsResult = await subscriptionService.query(bypassAllFilters({ skip: 0, take: 1000, filter: subscriptionFilter }));
35665
35693
  // If user is in context, also filter by TenantUser membership
35666
35694
  if (context.user?.id) {
35667
35695
  const tenantUserFilter = {
@@ -35679,7 +35707,7 @@ class MockTenantLoader {
35679
35707
  },
35680
35708
  ],
35681
35709
  };
35682
- const tenantUsersResult = await tenantUserService.query({ skip: 0, take: 1000, filter: tenantUserFilter });
35710
+ const tenantUsersResult = await tenantUserService.query(bypassAllFilters({ skip: 0, take: 1000, filter: tenantUserFilter }));
35683
35711
  // Get unique tenant IDs that have active subscriptions
35684
35712
  const tenantIdsWithSubscriptions = new Set(subscriptionsResult.items.map((sub) => sub.subscriberId).filter((id) => !!id));
35685
35713
  // Get unique tenant IDs where user is a member
@@ -50243,6 +50271,161 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
50243
50271
  type: Injectable
50244
50272
  }] });
50245
50273
 
50274
+ function generateLeaveType() {
50275
+ const uuid = AXPDataGenerator.uuid;
50276
+ const M = createMultiLanguageString;
50277
+ return [
50278
+ {
50279
+ id: uuid(),
50280
+ title: M('Annual Leave', 'مرخصی سالانه'),
50281
+ description: M('Paid time off for vacation, rest, or personal activities', 'مرخصی استحقاقی برای استراحت یا امور شخصی'),
50282
+ color: '#3b82f6',
50283
+ },
50284
+ {
50285
+ id: uuid(),
50286
+ title: M("Sick & Carer's Leave", 'مرخصی استعلاجی و مراقبت'),
50287
+ description: M('Time off for personal illness or to care for sick family members', 'غیبت به دلیل بیماری یا مراقبت از بیمار خانواده'),
50288
+ color: '#ef4444',
50289
+ },
50290
+ {
50291
+ id: uuid(),
50292
+ title: M('Rostered Day off', 'روز تعطیل برنامه‌ریزی‌شده'),
50293
+ description: M('Scheduled day off as part of the regular work roster', 'روز تعطیل طبق برنامه نوبت کاری'),
50294
+ color: '#8b5cf6',
50295
+ },
50296
+ {
50297
+ id: uuid(),
50298
+ title: M('Training', 'آموزش'),
50299
+ description: M('Time allocated for professional development, courses, or skill enhancement', 'زمان توسعه حرفه‌ای و دوره‌ها'),
50300
+ color: '#06b6d4',
50301
+ },
50302
+ {
50303
+ id: uuid(),
50304
+ title: M('Compassionate & Bereavement Leave', 'مرخصی انسانی و سوگ'),
50305
+ description: M('Time off granted for family emergencies or the death of a loved one', 'مرخصی برای فوت نزدیکان یا شرایط اضطراری خانوادگی'),
50306
+ color: '#6366f1',
50307
+ },
50308
+ {
50309
+ id: uuid(),
50310
+ title: M('Time Off In Lieu', 'مرخصی جبرانی'),
50311
+ description: M('Compensatory time off earned for working additional hours beyond normal schedule', 'جبران ساعت اضافه‌کاری'),
50312
+ color: '#10b981',
50313
+ },
50314
+ {
50315
+ id: uuid(),
50316
+ title: M('Community Service Leave', 'مرخصی خدمت اجتماعی'),
50317
+ description: M('Paid leave for volunteer work or community service activities', 'مرخصی برای داوطلبی و خدمات اجتماعی'),
50318
+ color: '#059669',
50319
+ },
50320
+ {
50321
+ id: uuid(),
50322
+ title: M('Family & Domestic Violence Leave', 'مرخصی خشونت خانگی'),
50323
+ description: M('Paid leave for employees experiencing family or domestic violence situations', 'مرخصی حمایتی برای کارکنان در معرض خشونت خانگی'),
50324
+ color: '#ec4899',
50325
+ },
50326
+ {
50327
+ id: uuid(),
50328
+ title: M('Long Service Leave', 'مرخصی سنوات'),
50329
+ description: M('Extended paid leave granted after many years of continuous service', 'مرخصی طولانی پس از سال‌ها خدمت'),
50330
+ color: '#f59e0b',
50331
+ },
50332
+ {
50333
+ id: uuid(),
50334
+ title: M('Maternity & Paternal Leave', 'مرخصی زایمان و پدری'),
50335
+ description: M('Time off for new parents to care for and bond with their newborn child', 'مرخصی والدین برای مراقبت از نوزاد'),
50336
+ color: '#f472b6',
50337
+ },
50338
+ {
50339
+ id: uuid(),
50340
+ title: M("Public Holiday's", 'تعطیلات رسمی'),
50341
+ description: M('Recognized public holidays and national observances', 'تعطیلات رسمی و مناسبت‌های ملی'),
50342
+ color: '#eab308',
50343
+ },
50344
+ {
50345
+ id: uuid(),
50346
+ title: M('Unpaid Leave', 'مرخصی بدون حقوق'),
50347
+ description: M('Leave without pay for personal reasons or extended time off', 'بدون حقوق به دلایل شخصی'),
50348
+ color: '#6b7280',
50349
+ },
50350
+ {
50351
+ id: uuid(),
50352
+ title: M("Work's Compensation Leave", 'مرخصی بیمه کار'),
50353
+ description: M('Leave due to work-related injury or illness covered by workers compensation', 'مرخصی ناشی از آسیب یا بیماری شغلی'),
50354
+ color: '#dc2626',
50355
+ },
50356
+ ];
50357
+ }
50358
+ const LEAVE_TYPES_MOCK = generateLeaveType();
50359
+
50360
+ class AXMLeaveTypeDataSeeder {
50361
+ constructor() {
50362
+ this.storageService = inject(AXPEntityStorageService);
50363
+ }
50364
+ async seed() {
50365
+ await this.storageService.initial(RootConfig$j.entities.leaveType.source, LEAVE_TYPES_MOCK);
50366
+ }
50367
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
50368
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveTypeDataSeeder }); }
50369
+ }
50370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveTypeDataSeeder, decorators: [{
50371
+ type: Injectable
50372
+ }] });
50373
+
50374
+ const uuid$9 = AXPDataGenerator.uuid;
50375
+ const LEAVE_REQUEST_STATUS_DEFINITIONS = [
50376
+ AXPSystemStatuses.Pending,
50377
+ AXPSystemStatuses.Approved,
50378
+ AXPSystemStatuses.Rejected,
50379
+ AXPSystemStatuses.Cancelled,
50380
+ ];
50381
+ function buildLeaveRequests() {
50382
+ const results = [];
50383
+ EMPLOYEES_MOCK.forEach((employee) => {
50384
+ // Generate 2 leave requests per employee
50385
+ const count = Math.floor(Math.random() * 2);
50386
+ for (let i = 0; i < count; i++) {
50387
+ const leaveType = LEAVE_TYPES_MOCK[Math.floor(Math.random() * LEAVE_TYPES_MOCK.length)];
50388
+ const duration = Math.floor(Math.random() * 5) + 1; // 1-5 days
50389
+ // Spread start/end across past, today, and future (inclusive) relative to "now"
50390
+ const startDayOffset = Math.floor(Math.random() * 211) - 120; // -120 .. +90 days
50391
+ const start = new Date();
50392
+ start.setDate(start.getDate() + startDayOffset);
50393
+ const end = new Date(start);
50394
+ end.setDate(start.getDate() + duration);
50395
+ const statusDefinition = LEAVE_REQUEST_STATUS_DEFINITIONS[Math.floor(Math.random() * LEAVE_REQUEST_STATUS_DEFINITIONS.length)];
50396
+ results.push({
50397
+ id: uuid$9(),
50398
+ employeeId: employee.id,
50399
+ employee,
50400
+ leaveTypeId: leaveType.id,
50401
+ leaveType,
50402
+ startDate: start,
50403
+ endDate: end,
50404
+ durationDays: duration,
50405
+ reason: `Request for ${leaveType.title}`,
50406
+ statusId: statusDefinition.name,
50407
+ status: { id: statusDefinition.name, title: statusDefinition.title },
50408
+ });
50409
+ }
50410
+ });
50411
+ return results;
50412
+ }
50413
+ const LEAVE_REQUESTS_MOCK = buildLeaveRequests();
50414
+
50415
+ class AXMLeaveRequestDataSeeder {
50416
+ constructor() {
50417
+ this.storageService = inject(AXPEntityStorageService);
50418
+ }
50419
+ async seed() {
50420
+ await this.storageService.initial(RootConfig$j.entities.leaveRequest.source, LEAVE_REQUESTS_MOCK);
50421
+ }
50422
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveRequestDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
50423
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveRequestDataSeeder }); }
50424
+ }
50425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveRequestDataSeeder, decorators: [{
50426
+ type: Injectable
50427
+ }] });
50428
+
50246
50429
  //#region ---- Types ----
50247
50430
  const WORKFLOW_DEFINITION_ENTITY_SCHEMA = 'https://elsaworkflows.io/schemas/workflow-definition/v3.0.0/schema.json';
50248
50431
  const DEFAULT_TOOL_VERSION = '3.2.0.0';
@@ -50277,79 +50460,116 @@ function createWorkflowDefinitionEntityMock(def, options) {
50277
50460
  //#endregion
50278
50461
 
50279
50462
  const M$q = createMultiLanguageString;
50463
+ //#region ---- Workflow property interfaces ----
50464
+ const workflowLookup = (entity, textField, options) => ({
50465
+ type: 'lookup-editor',
50466
+ options: {
50467
+ entity,
50468
+ textField,
50469
+ valueField: options?.valueField ?? 'id',
50470
+ look: 'select',
50471
+ ...(options?.columns ? { columns: options.columns } : {}),
50472
+ },
50473
+ });
50474
+ const workflowDate = () => ({
50475
+ type: 'date-time-editor',
50476
+ options: { showTime: false },
50477
+ });
50478
+ //#endregion
50280
50479
  /**
50281
- * Generic employee lifecycle workflow: capture process row (dialog) → questionnaire → line-manager confirmation → employee status update.
50282
- * Caller passes employeeId, display names for tasks (employeeDisplayName, lifecycleProcessTypeTitle), questionnaireId,
50283
- * lifecycleProcessTypeId, targetEmployeeStatusId, and optional effectiveDate (ISO date) for the create dialog.
50480
+ * Generic employee lifecycle event workflow: capture event row (dialog) → questionnaire → line-manager confirmation → employee status update.
50481
+ * Caller passes employeeId, display names for tasks (employeeDisplayName, eventTypeTitle), questionnaireId,
50482
+ * eventTypeId, targetEmployeeStatusId, and optional effectiveDate for the create dialog.
50284
50483
  */
50285
- const employeeLifecycleGuidedFlowWorkflowDefinition = {
50484
+ const employeeLifecycleEventFlowWorkflowDefinition = {
50286
50485
  schemaVersion: 'acorex-platform-workflow/v1',
50287
- name: 'employeeLifecycleGuidedFlow',
50288
- title: M$q('Employee lifecycle guided flow', 'جریان هدایت‌شده چرخه عمر کارمند'),
50289
- description: M$q('Opens Employee Lifecycle Process create (type hidden; employee readonly; assignee and effective date prefilled), persists the row, then runs the questionnaire and manager approval path; on approve updates HumanCapitalManagement.Employee.statusId to targetEmployeeStatusId.', 'فرایند ایجاد رکورد چرخه عمر کارمند (نوع مخفی؛ کارمند فقط‌خواندنی؛ مسئول و تاریخ اثر از پیش پر شده)، سپس پرسشنامه و تأیید مدیر؛ در صورت تأیید، وضعیت کارمند به مقدار هدف به‌روز می‌شود.'),
50486
+ name: 'employee-lifecycle-event-flow',
50487
+ title: M$q('Employee lifecycle event flow', 'جریان رویداد چرخه عمر کارمند'),
50488
+ description: M$q('Opens Lifecycle Event create (event type hidden; employee readonly; assignee and effective date prefilled), persists the row, then runs the questionnaire and manager approval path; on approve updates HumanCapitalManagement.Employee.statusId to targetEmployeeStatusId.', 'فرم ایجاد رویداد چرخه عمر (نوع رویداد مخفی؛ کارمند فقط‌خواندنی؛ مسئول و تاریخ اثر از پیش پر شده)، سپس پرسشنامه و تأیید مدیر؛ در صورت تأیید، وضعیت کارمند به‌روز می‌شود.'),
50290
50489
  variables: [
50291
50490
  {
50292
50491
  name: 'employeeId',
50293
- title: 'Employee ID',
50294
- description: 'Subject HumanCapitalManagement.Employee row id',
50492
+ title: 'Employee',
50493
+ description: 'Subject HumanCapitalManagement.Employee',
50295
50494
  dataType: 'string',
50296
- interface: { type: 'text-editor', options: {} },
50495
+ interface: workflowLookup('HumanCapitalManagement.Employee', 'person.fullName', {
50496
+ columns: ['person.fullName', 'employeeCode'],
50497
+ }),
50297
50498
  },
50298
50499
  {
50299
50500
  name: 'questionnaireId',
50300
- title: 'Questionnaire ID',
50301
- description: 'AssessmentManagement questionnaire id (from lifecycle process type)',
50501
+ title: 'Questionnaire',
50502
+ description: 'AssessmentManagement questionnaire (from lifecycle event type)',
50302
50503
  dataType: 'string',
50303
- interface: { type: 'text-editor', options: {} },
50504
+ interface: workflowLookup('AssessmentManagement.Questionnaire', 'title', {
50505
+ columns: ['name', 'title'],
50506
+ }),
50304
50507
  },
50305
50508
  {
50306
- name: 'lifecycleProcessTypeId',
50307
- title: 'Lifecycle process type ID',
50308
- description: 'Optional template id for task context / tracing',
50509
+ name: 'eventTypeId',
50510
+ title: 'Lifecycle event type',
50511
+ description: 'Lifecycle event type template',
50309
50512
  dataType: 'string',
50310
- interface: { type: 'text-editor', options: {} },
50513
+ interface: workflowLookup('HumanCapitalManagement.LifecycleEventType', 'title', {
50514
+ columns: ['name', 'title'],
50515
+ }),
50311
50516
  },
50312
50517
  {
50313
50518
  name: 'targetEmployeeStatusId',
50314
- title: 'Target employee status id',
50315
- description: 'Employee.statusId after approval (e.g. active, terminated, pending)',
50519
+ title: 'Target employee status',
50520
+ description: 'Employee.statusId after approval (e.g. active, terminated)',
50316
50521
  dataType: 'string',
50317
50522
  interface: { type: 'text-editor', options: {} },
50318
50523
  },
50319
50524
  {
50320
50525
  name: 'assigneeUserId',
50321
- title: 'Assignee user ID',
50322
- description: 'Platform user id for subject employee',
50526
+ title: 'Assignee',
50527
+ description: 'Platform user for the subject employee',
50323
50528
  dataType: 'string',
50324
- interface: { type: 'text-editor', options: {} },
50529
+ interface: workflowLookup('SecurityManagement.User', 'displayName', {
50530
+ columns: ['displayName', 'username'],
50531
+ }),
50325
50532
  },
50326
50533
  {
50327
50534
  name: 'managerUserId',
50328
- title: 'Manager user ID',
50329
- description: 'Line manager login user id',
50535
+ title: 'Manager',
50536
+ description: 'Line manager user',
50330
50537
  dataType: 'string',
50331
- interface: { type: 'text-editor', options: {} },
50538
+ interface: workflowLookup('SecurityManagement.User', 'displayName', {
50539
+ columns: ['displayName', 'username'],
50540
+ }),
50332
50541
  },
50333
50542
  {
50334
50543
  name: 'initiatorUserId',
50335
- title: 'Initiator user ID',
50544
+ title: 'Initiator',
50336
50545
  description: 'Workflow starter; fallback when manager cannot be resolved',
50337
50546
  dataType: 'string',
50338
- interface: { type: 'text-editor', options: {} },
50547
+ interface: workflowLookup('SecurityManagement.User', 'displayName', {
50548
+ columns: ['displayName', 'username'],
50549
+ }),
50339
50550
  },
50340
50551
  {
50341
- name: 'employeeLifecycleProcessId',
50342
- title: 'Employee lifecycle process ID',
50343
- description: 'HumanCapitalManagement.EmployeeLifecycleProcess row id after the capture dialog and persistence step',
50552
+ name: 'lifecycleEventId',
50553
+ title: 'Lifecycle event',
50554
+ description: 'HumanCapitalManagement.LifecycleEvent row after capture and persistence',
50555
+ dataType: 'string',
50556
+ interface: workflowLookup('HumanCapitalManagement.LifecycleEvent', 'eventType.title', {
50557
+ columns: ['eventTypeId', 'effectiveDate', 'statusId'],
50558
+ }),
50559
+ },
50560
+ {
50561
+ name: 'lifecycleEventStatusId',
50562
+ title: 'Lifecycle event status',
50563
+ description: 'HumanCapitalManagement.LifecycleEvent.statusId mirrored for task board display',
50344
50564
  dataType: 'string',
50345
50565
  interface: { type: 'text-editor', options: {} },
50346
50566
  },
50347
50567
  {
50348
50568
  name: 'effectiveDate',
50349
50569
  title: 'Effective date',
50350
- description: 'Prefilled effective date for the lifecycle process create dialog (ISO yyyy-mm-dd)',
50351
- dataType: 'string',
50352
- interface: { type: 'text-editor', options: {} },
50570
+ description: 'Effective date for the lifecycle event',
50571
+ dataType: 'date',
50572
+ interface: workflowDate(),
50353
50573
  },
50354
50574
  {
50355
50575
  name: 'employeeDisplayName',
@@ -50359,52 +50579,65 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50359
50579
  interface: { type: 'text-editor', options: {} },
50360
50580
  },
50361
50581
  {
50362
- name: 'lifecycleProcessTypeTitle',
50363
- title: 'Lifecycle process type title',
50364
- description: 'Resolved lifecycle process type label in the active locale',
50582
+ name: 'eventTypeTitle',
50583
+ title: 'Lifecycle event type title',
50584
+ description: 'Resolved lifecycle event type label in the active locale',
50365
50585
  dataType: 'string',
50366
50586
  interface: { type: 'text-editor', options: {} },
50367
50587
  },
50368
50588
  {
50369
- name: 'assessmentCaseId',
50370
- title: 'Assessment case ID',
50371
- description: 'AssessmentManagement.AssessmentCase row for this lifecycle questionnaire',
50589
+ name: 'assessmentCaseTitle',
50590
+ title: 'Assessment case title',
50591
+ description: 'Friendly label for AssessmentManagement.AssessmentCase list and fill viewer',
50372
50592
  dataType: 'string',
50373
50593
  interface: { type: 'text-editor', options: {} },
50374
50594
  },
50595
+ {
50596
+ name: 'assessmentCaseId',
50597
+ title: 'Assessment case',
50598
+ description: 'AssessmentManagement.AssessmentCase for this lifecycle questionnaire',
50599
+ dataType: 'string',
50600
+ interface: workflowLookup('AssessmentManagement.AssessmentCase', 'title'),
50601
+ },
50375
50602
  {
50376
50603
  name: 'assessmentSessionId',
50377
- title: 'Assessment session ID',
50378
- description: 'AssessmentManagement.AssessmentSession row for the assignee responder',
50604
+ title: 'Assessment session',
50605
+ description: 'AssessmentManagement.AssessmentSession for the assignee responder',
50379
50606
  dataType: 'string',
50380
- interface: { type: 'text-editor', options: {} },
50607
+ interface: workflowLookup('AssessmentManagement.AssessmentSession', 'id'),
50381
50608
  },
50382
50609
  ],
50383
50610
  inputs: [
50384
50611
  {
50385
50612
  name: 'employeeId',
50386
- title: 'Employee ID',
50387
- description: 'Subject employee row id',
50613
+ title: 'Employee',
50614
+ description: 'Subject employee',
50388
50615
  dataType: 'string',
50389
- interface: { type: 'text-editor', options: {} },
50616
+ interface: workflowLookup('HumanCapitalManagement.Employee', 'person.fullName', {
50617
+ columns: ['person.fullName', 'employeeCode'],
50618
+ }),
50390
50619
  },
50391
50620
  {
50392
50621
  name: 'questionnaireId',
50393
- title: 'Questionnaire ID',
50394
- description: 'From lifecycle process type template',
50622
+ title: 'Questionnaire',
50623
+ description: 'From lifecycle event type template',
50395
50624
  dataType: 'string',
50396
- interface: { type: 'text-editor', options: {} },
50625
+ interface: workflowLookup('AssessmentManagement.Questionnaire', 'title', {
50626
+ columns: ['name', 'title'],
50627
+ }),
50397
50628
  },
50398
50629
  {
50399
- name: 'lifecycleProcessTypeId',
50400
- title: 'Lifecycle process type ID',
50401
- description: 'Optional; forwarded to task context',
50630
+ name: 'eventTypeId',
50631
+ title: 'Lifecycle event type',
50632
+ description: 'Lifecycle event type template',
50402
50633
  dataType: 'string',
50403
- interface: { type: 'text-editor', options: {} },
50634
+ interface: workflowLookup('HumanCapitalManagement.LifecycleEventType', 'title', {
50635
+ columns: ['name', 'title'],
50636
+ }),
50404
50637
  },
50405
50638
  {
50406
50639
  name: 'targetEmployeeStatusId',
50407
- title: 'Target employee status id',
50640
+ title: 'Target employee status',
50408
50641
  description: 'Applied to Employee.statusId when manager approves',
50409
50642
  dataType: 'string',
50410
50643
  interface: { type: 'text-editor', options: {} },
@@ -50412,9 +50645,9 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50412
50645
  {
50413
50646
  name: 'effectiveDate',
50414
50647
  title: 'Effective date',
50415
- description: 'Prefilled on the lifecycle process create form (ISO yyyy-mm-dd); optional',
50416
- dataType: 'string',
50417
- interface: { type: 'text-editor', options: {} },
50648
+ description: 'Prefilled on the lifecycle event create form; optional',
50649
+ dataType: 'date',
50650
+ interface: workflowDate(),
50418
50651
  },
50419
50652
  {
50420
50653
  name: 'employeeDisplayName',
@@ -50424,9 +50657,16 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50424
50657
  interface: { type: 'text-editor', options: {} },
50425
50658
  },
50426
50659
  {
50427
- name: 'lifecycleProcessTypeTitle',
50428
- title: 'Lifecycle process type title',
50429
- description: 'Lifecycle process type label in the active locale',
50660
+ name: 'eventTypeTitle',
50661
+ title: 'Lifecycle event type title',
50662
+ description: 'Lifecycle event type label in the active locale',
50663
+ dataType: 'string',
50664
+ interface: { type: 'text-editor', options: {} },
50665
+ },
50666
+ {
50667
+ name: 'assessmentCaseTitle',
50668
+ title: 'Assessment case title',
50669
+ description: 'Friendly label for AssessmentManagement.AssessmentCase and fill viewer',
50430
50670
  dataType: 'string',
50431
50671
  interface: { type: 'text-editor', options: {} },
50432
50672
  },
@@ -50443,11 +50683,12 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50443
50683
  variables: [
50444
50684
  { variableName: 'employeeId', value: '{{ inputs.employeeId }}' },
50445
50685
  { variableName: 'questionnaireId', value: '{{ inputs.questionnaireId }}' },
50446
- { variableName: 'lifecycleProcessTypeId', value: '{{ inputs.lifecycleProcessTypeId }}' },
50686
+ { variableName: 'eventTypeId', value: '{{ inputs.eventTypeId }}' },
50447
50687
  { variableName: 'targetEmployeeStatusId', value: '{{ inputs.targetEmployeeStatusId }}' },
50448
50688
  { variableName: 'effectiveDate', value: '{{ inputs.effectiveDate }}' },
50449
50689
  { variableName: 'employeeDisplayName', value: '{{ inputs.employeeDisplayName }}' },
50450
- { variableName: 'lifecycleProcessTypeTitle', value: '{{ inputs.lifecycleProcessTypeTitle }}' },
50690
+ { variableName: 'eventTypeTitle', value: '{{ inputs.eventTypeTitle }}' },
50691
+ { variableName: 'assessmentCaseTitle', value: '{{ inputs.assessmentCaseTitle || inputs.employeeDisplayName }}' },
50451
50692
  ],
50452
50693
  },
50453
50694
  },
@@ -50479,39 +50720,39 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50479
50720
  },
50480
50721
  },
50481
50722
  {
50482
- id: 'captureLifecycleProcessDetailsForm',
50723
+ id: 'captureLifecycleEventDetailsForm',
50483
50724
  name: 'workflow-activity:create-entity-form',
50484
50725
  inputs: {
50485
50726
  module: 'HumanCapitalManagement',
50486
- entity: 'EmployeeLifecycleProcess',
50727
+ entity: 'LifecycleEvent',
50487
50728
  persistInWorkflow: true,
50488
- excludes: ['lifecycleProcessTypeId'],
50729
+ excludes: ['eventTypeId'],
50489
50730
  readonlys: ['employeeId'],
50490
50731
  data: {
50491
50732
  employeeId: '{{ variables.employeeId }}',
50492
- lifecycleProcessTypeId: '{{ variables.lifecycleProcessTypeId }}',
50493
- processAssigneeUserId: '{{ variables.managerUserId || variables.initiatorUserId }}',
50494
- effectiveDate: '{{ variables.effectiveDate }}',
50733
+ eventTypeId: '{{ variables.eventTypeId }}',
50734
+ assignedToUserId: '{{ variables.managerUserId || variables.initiatorUserId }}',
50495
50735
  notes: '',
50496
50736
  },
50497
50737
  },
50498
50738
  },
50499
50739
  {
50500
- id: 'createEmployeeLifecycleProcessRecord',
50740
+ id: 'createLifecycleEventRecord',
50501
50741
  name: 'workflow-activity:entity-create',
50502
50742
  inputs: {
50503
- entity: 'HumanCapitalManagement.EmployeeLifecycleProcess',
50743
+ entity: 'HumanCapitalManagement.LifecycleEvent',
50504
50744
  data: {
50505
50745
  employeeId: '{{ variables.employeeId }}',
50506
- lifecycleProcessTypeId: '{{ variables.lifecycleProcessTypeId }}',
50507
- processAssigneeUserId: '{{ outputs.result.processAssigneeUserId }}',
50508
- effectiveDate: '{{ outputs.result.effectiveDate }}',
50509
- notes: '{{ outputs.result.notes }}',
50746
+ eventTypeId: '{{ variables.eventTypeId }}',
50747
+ assignedToUserId: '{{ variables.assignedToUserId }}',
50748
+ effectiveDate: '{{ variables.effectiveDate }}',
50749
+ notes: '{{ variables.notes }}',
50510
50750
  statusId: 'in-progress',
50511
50751
  },
50512
50752
  },
50513
50753
  outputToVariables: {
50514
- employeeLifecycleProcessId: 'id',
50754
+ lifecycleEventId: 'id',
50755
+ lifecycleEventStatusId: 'statusId',
50515
50756
  },
50516
50757
  },
50517
50758
  {
@@ -50521,8 +50762,7 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50521
50762
  entity: 'AssessmentManagement.AssessmentCase',
50522
50763
  data: {
50523
50764
  questionnaireId: '{{ variables.questionnaireId }}',
50524
- title: '{{ variables.lifecycleProcessTypeTitle }} — {{ variables.employeeDisplayName }}',
50525
- description: 'Employee lifecycle process {{ variables.employeeLifecycleProcessId }}',
50765
+ title: '{{ variables.assessmentCaseTitle || variables.employeeDisplayName }}',
50526
50766
  subjectRef: {
50527
50767
  type: 'HumanCapitalManagement.Employee',
50528
50768
  id: '{{ variables.employeeId }}',
@@ -50557,7 +50797,7 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50557
50797
  id: 'showLifecycleStartCancelledToast',
50558
50798
  name: 'workflow-activity:show-toast',
50559
50799
  inputs: {
50560
- message: '@human-capital-management:employee-lifecycle-processes.messages.lifecycle-start-cancelled',
50800
+ message: '@human-capital-management:lifecycle-events.messages.lifecycle-start-cancelled',
50561
50801
  type: 'info',
50562
50802
  },
50563
50803
  },
@@ -50565,20 +50805,24 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50565
50805
  id: 'subjectFillQuestionnaireTask',
50566
50806
  name: 'workflow-activity:human-task',
50567
50807
  inputs: {
50568
- title: '@human-capital-management:employee-lifecycle-processes.tasks.task-title',
50569
- description: '@human-capital-management:employee-lifecycle-processes.tasks.questionnaire.description',
50808
+ title: '@human-capital-management:lifecycle-events.tasks.task-title',
50809
+ description: '@human-capital-management:lifecycle-events.tasks.questionnaire.description',
50570
50810
  assignedUserIds: '{{ variables.managerUserId || variables.initiatorUserId }}',
50571
50811
  context: {
50572
50812
  employeeId: '{{ variables.employeeId }}',
50573
50813
  questionnaireId: '{{ variables.questionnaireId }}',
50574
- lifecycleProcessTypeId: '{{ variables.lifecycleProcessTypeId }}',
50814
+ eventTypeId: '{{ variables.eventTypeId }}',
50815
+ effectiveDate: '{{ variables.effectiveDate }}',
50816
+ lifecycleEventId: '{{ variables.lifecycleEventId }}',
50817
+ statusId: '{{ variables.lifecycleEventStatusId }}',
50818
+ entityType: 'HumanCapitalManagement.LifecycleEvent',
50575
50819
  _taskI18n: {
50576
50820
  employeeDisplayName: '{{ variables.employeeDisplayName }}',
50577
- lifecycleProcessTypeTitle: '{{ variables.lifecycleProcessTypeTitle }}',
50821
+ eventTypeTitle: '{{ variables.eventTypeTitle }}',
50578
50822
  effectiveDate: '{{ variables.effectiveDate }}',
50579
50823
  },
50580
50824
  _taskTitleParts: [
50581
- '{{ variables.lifecycleProcessTypeTitle }}',
50825
+ '{{ variables.eventTypeTitle }}',
50582
50826
  '{{ variables.employeeDisplayName }}',
50583
50827
  ],
50584
50828
  },
@@ -50601,38 +50845,47 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50601
50845
  inputs: {
50602
50846
  caseId: '{{ variables.assessmentCaseId }}',
50603
50847
  sessionId: '{{ variables.assessmentSessionId }}',
50848
+ title: '{{ variables.assessmentCaseTitle || variables.employeeDisplayName }}',
50604
50849
  showAs: 'popup',
50605
50850
  },
50606
50851
  },
50607
50852
  {
50608
- id: 'markLifecycleAwaitingManagerApproval',
50853
+ id: 'markLifecycleEventAwaitingManagerApproval',
50609
50854
  name: 'workflow-activity:entity-update',
50610
50855
  inputs: {
50611
- entity: 'HumanCapitalManagement.EmployeeLifecycleProcess',
50612
- id: '{{ variables.employeeLifecycleProcessId }}',
50856
+ entity: 'HumanCapitalManagement.LifecycleEvent',
50857
+ id: '{{ variables.lifecycleEventId }}',
50613
50858
  data: {
50614
50859
  notes: 'Questionnaire completed; awaiting manager approval.',
50860
+ statusId: AXPSystemStatusType.WaitingSignOff,
50615
50861
  },
50616
50862
  },
50863
+ outputToVariables: {
50864
+ lifecycleEventStatusId: 'data.statusId',
50865
+ },
50617
50866
  },
50618
50867
  {
50619
50868
  id: 'managerApproveEmployeeStatusTask',
50620
50869
  name: 'workflow-activity:human-task',
50621
50870
  inputs: {
50622
- title: '@human-capital-management:employee-lifecycle-processes.tasks.task-title',
50623
- description: '@human-capital-management:employee-lifecycle-processes.tasks.manager-approval.description',
50871
+ title: '@human-capital-management:lifecycle-events.tasks.task-title',
50872
+ description: '@human-capital-management:lifecycle-events.tasks.manager-approval.description',
50624
50873
  assignedUserIds: '{{ variables.managerUserId || variables.initiatorUserId }}',
50625
50874
  context: {
50626
50875
  employeeId: '{{ variables.employeeId }}',
50627
50876
  questionnaireId: '{{ variables.questionnaireId }}',
50628
50877
  targetEmployeeStatusId: '{{ variables.targetEmployeeStatusId }}',
50878
+ effectiveDate: '{{ variables.effectiveDate }}',
50879
+ lifecycleEventId: '{{ variables.lifecycleEventId }}',
50880
+ statusId: '{{ variables.lifecycleEventStatusId }}',
50881
+ entityType: 'HumanCapitalManagement.LifecycleEvent',
50629
50882
  _taskI18n: {
50630
50883
  employeeDisplayName: '{{ variables.employeeDisplayName }}',
50631
- lifecycleProcessTypeTitle: '{{ variables.lifecycleProcessTypeTitle }}',
50884
+ eventTypeTitle: '{{ variables.eventTypeTitle }}',
50632
50885
  effectiveDate: '{{ variables.effectiveDate }}',
50633
50886
  },
50634
50887
  _taskTitleParts: [
50635
- '{{ variables.lifecycleProcessTypeTitle }}',
50888
+ '{{ variables.eventTypeTitle }}',
50636
50889
  '{{ variables.employeeDisplayName }}',
50637
50890
  ],
50638
50891
  },
@@ -50668,11 +50921,11 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50668
50921
  },
50669
50922
  },
50670
50923
  {
50671
- id: 'updateEmployeeLifecycleProcessCompleted',
50924
+ id: 'updateLifecycleEventCompleted',
50672
50925
  name: 'workflow-activity:entity-update',
50673
50926
  inputs: {
50674
- entity: 'HumanCapitalManagement.EmployeeLifecycleProcess',
50675
- id: '{{ variables.employeeLifecycleProcessId }}',
50927
+ entity: 'HumanCapitalManagement.LifecycleEvent',
50928
+ id: '{{ variables.lifecycleEventId }}',
50676
50929
  data: {
50677
50930
  statusId: 'completed',
50678
50931
  },
@@ -50698,11 +50951,11 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50698
50951
  },
50699
50952
  },
50700
50953
  {
50701
- id: 'updateEmployeeLifecycleProcessCancelled',
50954
+ id: 'updateLifecycleEventCancelled',
50702
50955
  name: 'workflow-activity:entity-update',
50703
50956
  inputs: {
50704
- entity: 'HumanCapitalManagement.EmployeeLifecycleProcess',
50705
- id: '{{ variables.employeeLifecycleProcessId }}',
50957
+ entity: 'HumanCapitalManagement.LifecycleEvent',
50958
+ id: '{{ variables.lifecycleEventId }}',
50706
50959
  data: {
50707
50960
  statusId: 'cancelled',
50708
50961
  },
@@ -50723,7 +50976,7 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50723
50976
  id: 'showLifecycleRejectedToast',
50724
50977
  name: 'workflow-activity:show-toast',
50725
50978
  inputs: {
50726
- message: 'Employee lifecycle process was rejected by manager.',
50979
+ message: 'Lifecycle event was rejected by manager.',
50727
50980
  type: 'warning',
50728
50981
  },
50729
50982
  },
@@ -50743,18 +50996,18 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50743
50996
  },
50744
50997
  {
50745
50998
  source: { activtyName: 'resolveManagerFromSubjectEmployee', port: 'done' },
50746
- target: { activtyName: 'captureLifecycleProcessDetailsForm' },
50999
+ target: { activtyName: 'captureLifecycleEventDetailsForm' },
50747
51000
  },
50748
51001
  {
50749
- source: { activtyName: 'captureLifecycleProcessDetailsForm', port: 'Submitted' },
50750
- target: { activtyName: 'createEmployeeLifecycleProcessRecord' },
51002
+ source: { activtyName: 'captureLifecycleEventDetailsForm', port: 'Submitted' },
51003
+ target: { activtyName: 'createLifecycleEventRecord' },
50751
51004
  },
50752
51005
  {
50753
- source: { activtyName: 'captureLifecycleProcessDetailsForm', port: 'Cancelled' },
51006
+ source: { activtyName: 'captureLifecycleEventDetailsForm', port: 'Cancelled' },
50754
51007
  target: { activtyName: 'showLifecycleStartCancelledToast' },
50755
51008
  },
50756
51009
  {
50757
- source: { activtyName: 'createEmployeeLifecycleProcessRecord', port: 'Done' },
51010
+ source: { activtyName: 'createLifecycleEventRecord', port: 'Done' },
50758
51011
  target: { activtyName: 'createAssessmentCaseForLifecycle' },
50759
51012
  },
50760
51013
  {
@@ -50771,7 +51024,7 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50771
51024
  },
50772
51025
  {
50773
51026
  source: { activtyName: 'fillLifecycleQuestionnaire', port: 'Submitted' },
50774
- target: { activtyName: 'markLifecycleAwaitingManagerApproval' },
51027
+ target: { activtyName: 'markLifecycleEventAwaitingManagerApproval' },
50775
51028
  },
50776
51029
  {
50777
51030
  source: { activtyName: 'fillLifecycleQuestionnaire', port: 'Saved' },
@@ -50782,7 +51035,7 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50782
51035
  target: { activtyName: 'subjectFillQuestionnaireTask' },
50783
51036
  },
50784
51037
  {
50785
- source: { activtyName: 'markLifecycleAwaitingManagerApproval', port: 'Done' },
51038
+ source: { activtyName: 'markLifecycleEventAwaitingManagerApproval', port: 'Done' },
50786
51039
  target: { activtyName: 'managerApproveEmployeeStatusTask' },
50787
51040
  },
50788
51041
  {
@@ -50791,10 +51044,10 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50791
51044
  },
50792
51045
  {
50793
51046
  source: { activtyName: 'managerApproveEmployeeStatusTask', port: 'reject' },
50794
- target: { activtyName: 'updateEmployeeLifecycleProcessCancelled' },
51047
+ target: { activtyName: 'updateLifecycleEventCancelled' },
50795
51048
  },
50796
51049
  {
50797
- source: { activtyName: 'updateEmployeeLifecycleProcessCancelled', port: 'Done' },
51050
+ source: { activtyName: 'updateLifecycleEventCancelled', port: 'Done' },
50798
51051
  target: { activtyName: 'cancelAssessmentCaseOnReject' },
50799
51052
  },
50800
51053
  {
@@ -50803,10 +51056,10 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50803
51056
  },
50804
51057
  {
50805
51058
  source: { activtyName: 'updateEmployeeTargetStatus', port: 'Done' },
50806
- target: { activtyName: 'updateEmployeeLifecycleProcessCompleted' },
51059
+ target: { activtyName: 'updateLifecycleEventCompleted' },
50807
51060
  },
50808
51061
  {
50809
- source: { activtyName: 'updateEmployeeLifecycleProcessCompleted', port: 'Done' },
51062
+ source: { activtyName: 'updateLifecycleEventCompleted', port: 'Done' },
50810
51063
  target: { activtyName: 'closeAssessmentCaseOnApprove' },
50811
51064
  },
50812
51065
  {
@@ -50816,14 +51069,14 @@ const employeeLifecycleGuidedFlowWorkflowDefinition = {
50816
51069
  ],
50817
51070
  },
50818
51071
  };
50819
- const employeeLifecycleGuidedFlowWorkflowName = 'employeeLifecycleGuidedFlow';
50820
- /** Stable id so lifecycle process type mocks and seeds resolve the workflow row predictably. */
50821
- const EMPLOYEE_LIFECYCLE_GUIDED_FLOW_WORKFLOW_DEFINITION_ID = '7f000010-0010-4111-a111-0e0e0e0e0e0e';
51072
+ const employeeLifecycleEventFlowWorkflowName = 'employee-lifecycle-event-flow';
51073
+ /** Stable id so lifecycle event type mocks and seeds resolve the workflow row predictably. */
51074
+ const EMPLOYEE_LIFECYCLE_EVENT_FLOW_WORKFLOW_DEFINITION_ID = '7f000010-0010-4111-a111-0e0e0e0e0e0e';
50822
51075
  /**
50823
51076
  * Workflow definition entity row for WorkflowManagement.WorkflowDefinition seeding.
50824
51077
  */
50825
- const employeeLifecycleGuidedFlowWorkflowEntityMock = createWorkflowDefinitionEntityMock(employeeLifecycleGuidedFlowWorkflowDefinition, {
50826
- id: EMPLOYEE_LIFECYCLE_GUIDED_FLOW_WORKFLOW_DEFINITION_ID,
51078
+ const employeeLifecycleEventFlowWorkflowEntityMock = createWorkflowDefinitionEntityMock(employeeLifecycleEventFlowWorkflowDefinition, {
51079
+ id: EMPLOYEE_LIFECYCLE_EVENT_FLOW_WORKFLOW_DEFINITION_ID,
50827
51080
  statusId: AXPSystemStatusType.Published,
50828
51081
  });
50829
51082
 
@@ -50831,12 +51084,12 @@ const employeeLifecycleGuidedFlowWorkflowEntityMock = createWorkflowDefinitionEn
50831
51084
  //#endregion
50832
51085
  //#region ---- Stable demo IDs ----
50833
51086
  /** Stable ids so seeds and related mocks resolve types predictably. */
50834
- const MOCK_LIFECYCLE_PROCESS_TYPE_ONBOARDING_ID = '7f000001-0001-4111-a111-010101010101';
50835
- const MOCK_LIFECYCLE_PROCESS_TYPE_SEPARATION_ID = '7f000002-0002-4111-a111-020202020202';
50836
- const MOCK_LIFECYCLE_PROCESS_TYPE_PROMOTION_ID = '7f000003-0003-4111-a111-030303030303';
50837
- const MOCK_LIFECYCLE_PROCESS_TYPE_TRANSFER_ID = '7f000004-0004-4111-a111-040404040404';
50838
- const MOCK_LIFECYCLE_PROCESS_TYPE_RETURN_TO_WORK_ID = '7f000005-0005-4111-a111-050505050505';
50839
- const MOCK_LIFECYCLE_PROCESS_TYPE_LEAVE_OF_ABSENCE_ID = '7f000006-0006-4111-a111-060606060606';
51087
+ const MOCK_LIFECYCLE_EVENT_TYPE_ONBOARDING_ID = '7f000001-0001-4111-a111-010101010101';
51088
+ const MOCK_LIFECYCLE_EVENT_TYPE_SEPARATION_ID = '7f000002-0002-4111-a111-020202020202';
51089
+ const MOCK_LIFECYCLE_EVENT_TYPE_PROMOTION_ID = '7f000003-0003-4111-a111-030303030303';
51090
+ const MOCK_LIFECYCLE_EVENT_TYPE_TRANSFER_ID = '7f000004-0004-4111-a111-040404040404';
51091
+ const MOCK_LIFECYCLE_EVENT_TYPE_RETURN_TO_WORK_ID = '7f000005-0005-4111-a111-050505050505';
51092
+ const MOCK_LIFECYCLE_EVENT_TYPE_LEAVE_OF_ABSENCE_ID = '7f000006-0006-4111-a111-060606060606';
50840
51093
  //#endregion
50841
51094
  //#region ---- Meta-data builder payloads ----
50842
51095
  const M$p = createMultiLanguageString;
@@ -50872,22 +51125,22 @@ const separationQuestionnaireStub = {
50872
51125
  id: QUESTIONNAIRE_ID_EMPLOYEE_SEPARATION_CHECKLIST,
50873
51126
  title: M$p('Employee separation checklist', 'چک‌لیست جدایی کارمند'),
50874
51127
  };
50875
- function employeeLifecycleGuidedFlowStub() {
51128
+ function employeeLifecycleEventFlowStub() {
50876
51129
  return {
50877
- id: EMPLOYEE_LIFECYCLE_GUIDED_FLOW_WORKFLOW_DEFINITION_ID,
50878
- title: employeeLifecycleGuidedFlowWorkflowEntityMock.title ?? undefined,
51130
+ id: EMPLOYEE_LIFECYCLE_EVENT_FLOW_WORKFLOW_DEFINITION_ID,
51131
+ title: employeeLifecycleEventFlowWorkflowEntityMock.title ?? undefined,
50879
51132
  };
50880
51133
  }
50881
51134
  //#endregion
50882
51135
  //#region ---- Mock data ----
50883
- const LIFECYCLE_PROCESS_TYPES_MOCK = [
51136
+ const LIFECYCLE_EVENT_TYPES_MOCK = [
50884
51137
  {
50885
- id: MOCK_LIFECYCLE_PROCESS_TYPE_ONBOARDING_ID,
50886
- name: 'ONBOARDING_DEFAULT',
50887
- title: M$p('Default onboarding', 'استخدام و ورود پیش‌فرض'),
51138
+ id: MOCK_LIFECYCLE_EVENT_TYPE_ONBOARDING_ID,
51139
+ name: 'ONBOARDING',
51140
+ title: M$p('Onboarding', 'استخدام و ورود'),
50888
51141
  description: M$p('Standard new-hire path: profile capture, provisioning checklist, and employee induction questionnaire.', 'مسیر استاندارد کارکنان جدید: ثبت مشخصات، چک‌لیست دسترسی و پرسشنامه آشنایی کارمند.'),
50889
- workflowDefinitionId: EMPLOYEE_LIFECYCLE_GUIDED_FLOW_WORKFLOW_DEFINITION_ID,
50890
- workflowDefinition: employeeLifecycleGuidedFlowStub(),
51142
+ workflowDefinitionId: EMPLOYEE_LIFECYCLE_EVENT_FLOW_WORKFLOW_DEFINITION_ID,
51143
+ workflowDefinition: employeeLifecycleEventFlowStub(),
50891
51144
  questionnaireId: QUESTIONNAIRE_ID_HR_EMPLOYEE_INDUCTION,
50892
51145
  questionnaire: onboardingQuestionnaireStub,
50893
51146
  icon: 'fa-light fa-user-plus',
@@ -50939,12 +51192,12 @@ const LIFECYCLE_PROCESS_TYPES_MOCK = [
50939
51192
  ]),
50940
51193
  },
50941
51194
  {
50942
- id: MOCK_LIFECYCLE_PROCESS_TYPE_SEPARATION_ID,
51195
+ id: MOCK_LIFECYCLE_EVENT_TYPE_SEPARATION_ID,
50943
51196
  name: 'SEPARATION_DEFAULT',
50944
51197
  title: M$p('Offboarding / separation', 'خروج از سازمان / جدایی'),
50945
51198
  description: M$p('Exit checklist: access removal, asset return, employee separation questionnaire, and final approvals.', 'چک‌لیست خروج: حذف دسترسی، بازگشت دارایی، پرسشنامه جدایی کارمند و تأییدهای نهایی.'),
50946
- workflowDefinitionId: EMPLOYEE_LIFECYCLE_GUIDED_FLOW_WORKFLOW_DEFINITION_ID,
50947
- workflowDefinition: employeeLifecycleGuidedFlowStub(),
51199
+ workflowDefinitionId: EMPLOYEE_LIFECYCLE_EVENT_FLOW_WORKFLOW_DEFINITION_ID,
51200
+ workflowDefinition: employeeLifecycleEventFlowStub(),
50948
51201
  questionnaireId: QUESTIONNAIRE_ID_EMPLOYEE_SEPARATION_CHECKLIST,
50949
51202
  questionnaire: separationQuestionnaireStub,
50950
51203
  icon: 'fa-light fa-door-open',
@@ -50990,7 +51243,7 @@ const LIFECYCLE_PROCESS_TYPES_MOCK = [
50990
51243
  ]),
50991
51244
  },
50992
51245
  {
50993
- id: MOCK_LIFECYCLE_PROCESS_TYPE_PROMOTION_ID,
51246
+ id: MOCK_LIFECYCLE_EVENT_TYPE_PROMOTION_ID,
50994
51247
  name: 'PROMOTION_DEFAULT',
50995
51248
  title: M$p('Promotion', 'ارتقای شغلی'),
50996
51249
  description: M$p('Title or grade change with effective date and compensation band capture.', 'تغییر عنوان یا پایه با تاریخ اثر و ثبت بازهٔ حقوق و مزایا.'),
@@ -51033,7 +51286,7 @@ const LIFECYCLE_PROCESS_TYPES_MOCK = [
51033
51286
  ]),
51034
51287
  },
51035
51288
  {
51036
- id: MOCK_LIFECYCLE_PROCESS_TYPE_TRANSFER_ID,
51289
+ id: MOCK_LIFECYCLE_EVENT_TYPE_TRANSFER_ID,
51037
51290
  name: 'TRANSFER_DEFAULT',
51038
51291
  title: M$p('Transfer', 'انتقال سازمانی'),
51039
51292
  description: M$p('Move between business units or locations with manager and desk assignments.', 'جابه‌جایی بین واحد یا محل با مدیر و میز کار.'),
@@ -51076,7 +51329,7 @@ const LIFECYCLE_PROCESS_TYPES_MOCK = [
51076
51329
  ]),
51077
51330
  },
51078
51331
  {
51079
- id: MOCK_LIFECYCLE_PROCESS_TYPE_RETURN_TO_WORK_ID,
51332
+ id: MOCK_LIFECYCLE_EVENT_TYPE_RETURN_TO_WORK_ID,
51080
51333
  name: 'RETURN_TO_WORK_DEFAULT',
51081
51334
  title: M$p('Return to work', 'بازگشت به کار'),
51082
51335
  description: M$p('Medical or parental leave return: clearance, restrictions, and phased schedule.', 'بازگشت پس از مرخصی استعلاجی یا زایمان: مجوز، محدودیت‌ها و برنامه تدریجی.'),
@@ -51119,7 +51372,7 @@ const LIFECYCLE_PROCESS_TYPES_MOCK = [
51119
51372
  ]),
51120
51373
  },
51121
51374
  {
51122
- id: MOCK_LIFECYCLE_PROCESS_TYPE_LEAVE_OF_ABSENCE_ID,
51375
+ id: MOCK_LIFECYCLE_EVENT_TYPE_LEAVE_OF_ABSENCE_ID,
51123
51376
  name: 'LEAVE_OF_ABSENCE_DEFAULT',
51124
51377
  title: M$p('Leave of absence', 'مرخصی بلندمدت / غیبت موقت'),
51125
51378
  description: M$p('Structured absence workflow placeholder; leave entitlement stays on Leave Request records.', 'جریان مرخصی بلندمدت؛ محاسبه استحقاق مرخصی همچنان در رکورد درخواست مرخصی.'),
@@ -51167,229 +51420,17 @@ const LIFECYCLE_PROCESS_TYPES_MOCK = [
51167
51420
  ];
51168
51421
  //#endregion
51169
51422
 
51170
- //#region ---- Imports ----
51171
- //#endregion
51172
- //#region ---- Mock data ----
51173
- const onboardingType = LIFECYCLE_PROCESS_TYPES_MOCK.find((t) => t.id === MOCK_LIFECYCLE_PROCESS_TYPE_ONBOARDING_ID);
51174
- const separationType = LIFECYCLE_PROCESS_TYPES_MOCK.find((t) => t.id === MOCK_LIFECYCLE_PROCESS_TYPE_SEPARATION_ID);
51175
- /** Sample workflow-step assignee for list column demos (not Rod Jensen's login user). */
51176
- const demoProcessAssignee = mockUsers.find((u) => u.displayName === 'Sarah Johnson') ?? mockUsers[0];
51177
- const EMPLOYEE_LIFECYCLE_PROCESSES_MOCK = [
51178
- {
51179
- id: AXPDataGenerator.uuid(),
51180
- employeeId: EMPLOYEES_MOCK[0].id,
51181
- lifecycleProcessTypeId: onboardingType.id,
51182
- lifecycleProcessType: {
51183
- id: onboardingType.id,
51184
- name: onboardingType.name,
51185
- title: onboardingType.title,
51186
- },
51187
- processAssigneeUserId: demoProcessAssignee.id,
51188
- processAssigneeUser: { id: demoProcessAssignee.id, displayName: demoProcessAssignee.displayName },
51189
- effectiveDate: new Date(),
51190
- notes: 'Demo onboarding process instance.',
51191
- statusId: AXPSystemStatuses.Draft.name,
51192
- status: { id: AXPSystemStatuses.Draft.name, title: AXPSystemStatuses.Draft.title },
51193
- },
51194
- {
51195
- id: AXPDataGenerator.uuid(),
51196
- employeeId: EMPLOYEES_MOCK[1].id,
51197
- lifecycleProcessTypeId: separationType.id,
51198
- lifecycleProcessType: {
51199
- id: separationType.id,
51200
- name: separationType.name,
51201
- title: separationType.title,
51202
- },
51203
- processAssigneeUserId: demoProcessAssignee.id,
51204
- processAssigneeUser: { id: demoProcessAssignee.id, displayName: demoProcessAssignee.displayName },
51205
- effectiveDate: new Date(),
51206
- notes: 'Demo separation process instance.',
51207
- statusId: AXPSystemStatuses.InProgress.name,
51208
- status: { id: AXPSystemStatuses.InProgress.name, title: AXPSystemStatuses.InProgress.title },
51209
- },
51210
- ];
51211
- //#endregion
51212
-
51213
- class AXMEmployeeLifecycleProcessDataSeeder {
51214
- constructor() {
51215
- this.storageService = inject(AXPEntityStorageService);
51216
- }
51217
- async seed() {
51218
- await this.storageService.initial(RootConfig$j.entities.employeeLifecycleProcess.source, EMPLOYEE_LIFECYCLE_PROCESSES_MOCK);
51219
- }
51220
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEmployeeLifecycleProcessDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
51221
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEmployeeLifecycleProcessDataSeeder }); }
51222
- }
51223
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEmployeeLifecycleProcessDataSeeder, decorators: [{
51224
- type: Injectable
51225
- }] });
51226
-
51227
- function generateLeaveType() {
51228
- const uuid = AXPDataGenerator.uuid;
51229
- const M = createMultiLanguageString;
51230
- return [
51231
- {
51232
- id: uuid(),
51233
- title: M('Annual Leave', 'مرخصی سالانه'),
51234
- description: M('Paid time off for vacation, rest, or personal activities', 'مرخصی استحقاقی برای استراحت یا امور شخصی'),
51235
- color: '#3b82f6',
51236
- },
51237
- {
51238
- id: uuid(),
51239
- title: M("Sick & Carer's Leave", 'مرخصی استعلاجی و مراقبت'),
51240
- description: M('Time off for personal illness or to care for sick family members', 'غیبت به دلیل بیماری یا مراقبت از بیمار خانواده'),
51241
- color: '#ef4444',
51242
- },
51243
- {
51244
- id: uuid(),
51245
- title: M('Rostered Day off', 'روز تعطیل برنامه‌ریزی‌شده'),
51246
- description: M('Scheduled day off as part of the regular work roster', 'روز تعطیل طبق برنامه نوبت کاری'),
51247
- color: '#8b5cf6',
51248
- },
51249
- {
51250
- id: uuid(),
51251
- title: M('Training', 'آموزش'),
51252
- description: M('Time allocated for professional development, courses, or skill enhancement', 'زمان توسعه حرفه‌ای و دوره‌ها'),
51253
- color: '#06b6d4',
51254
- },
51255
- {
51256
- id: uuid(),
51257
- title: M('Compassionate & Bereavement Leave', 'مرخصی انسانی و سوگ'),
51258
- description: M('Time off granted for family emergencies or the death of a loved one', 'مرخصی برای فوت نزدیکان یا شرایط اضطراری خانوادگی'),
51259
- color: '#6366f1',
51260
- },
51261
- {
51262
- id: uuid(),
51263
- title: M('Time Off In Lieu', 'مرخصی جبرانی'),
51264
- description: M('Compensatory time off earned for working additional hours beyond normal schedule', 'جبران ساعت اضافه‌کاری'),
51265
- color: '#10b981',
51266
- },
51267
- {
51268
- id: uuid(),
51269
- title: M('Community Service Leave', 'مرخصی خدمت اجتماعی'),
51270
- description: M('Paid leave for volunteer work or community service activities', 'مرخصی برای داوطلبی و خدمات اجتماعی'),
51271
- color: '#059669',
51272
- },
51273
- {
51274
- id: uuid(),
51275
- title: M('Family & Domestic Violence Leave', 'مرخصی خشونت خانگی'),
51276
- description: M('Paid leave for employees experiencing family or domestic violence situations', 'مرخصی حمایتی برای کارکنان در معرض خشونت خانگی'),
51277
- color: '#ec4899',
51278
- },
51279
- {
51280
- id: uuid(),
51281
- title: M('Long Service Leave', 'مرخصی سنوات'),
51282
- description: M('Extended paid leave granted after many years of continuous service', 'مرخصی طولانی پس از سال‌ها خدمت'),
51283
- color: '#f59e0b',
51284
- },
51285
- {
51286
- id: uuid(),
51287
- title: M('Maternity & Paternal Leave', 'مرخصی زایمان و پدری'),
51288
- description: M('Time off for new parents to care for and bond with their newborn child', 'مرخصی والدین برای مراقبت از نوزاد'),
51289
- color: '#f472b6',
51290
- },
51291
- {
51292
- id: uuid(),
51293
- title: M("Public Holiday's", 'تعطیلات رسمی'),
51294
- description: M('Recognized public holidays and national observances', 'تعطیلات رسمی و مناسبت‌های ملی'),
51295
- color: '#eab308',
51296
- },
51297
- {
51298
- id: uuid(),
51299
- title: M('Unpaid Leave', 'مرخصی بدون حقوق'),
51300
- description: M('Leave without pay for personal reasons or extended time off', 'بدون حقوق به دلایل شخصی'),
51301
- color: '#6b7280',
51302
- },
51303
- {
51304
- id: uuid(),
51305
- title: M("Work's Compensation Leave", 'مرخصی بیمه کار'),
51306
- description: M('Leave due to work-related injury or illness covered by workers compensation', 'مرخصی ناشی از آسیب یا بیماری شغلی'),
51307
- color: '#dc2626',
51308
- },
51309
- ];
51310
- }
51311
- const LEAVE_TYPES_MOCK = generateLeaveType();
51312
-
51313
- class AXMLeaveTypeDataSeeder {
51314
- constructor() {
51315
- this.storageService = inject(AXPEntityStorageService);
51316
- }
51317
- async seed() {
51318
- await this.storageService.initial(RootConfig$j.entities.leaveType.source, LEAVE_TYPES_MOCK);
51319
- }
51320
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
51321
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveTypeDataSeeder }); }
51322
- }
51323
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveTypeDataSeeder, decorators: [{
51324
- type: Injectable
51325
- }] });
51326
-
51327
- const uuid$9 = AXPDataGenerator.uuid;
51328
- const LEAVE_REQUEST_STATUS_DEFINITIONS = [
51329
- AXPSystemStatuses.Pending,
51330
- AXPSystemStatuses.Approved,
51331
- AXPSystemStatuses.Rejected,
51332
- AXPSystemStatuses.Cancelled,
51333
- ];
51334
- function buildLeaveRequests() {
51335
- const results = [];
51336
- EMPLOYEES_MOCK.forEach((employee) => {
51337
- // Generate 2 leave requests per employee
51338
- const count = Math.floor(Math.random() * 2);
51339
- for (let i = 0; i < count; i++) {
51340
- const leaveType = LEAVE_TYPES_MOCK[Math.floor(Math.random() * LEAVE_TYPES_MOCK.length)];
51341
- const duration = Math.floor(Math.random() * 5) + 1; // 1-5 days
51342
- // Spread start/end across past, today, and future (inclusive) relative to "now"
51343
- const startDayOffset = Math.floor(Math.random() * 211) - 120; // -120 .. +90 days
51344
- const start = new Date();
51345
- start.setDate(start.getDate() + startDayOffset);
51346
- const end = new Date(start);
51347
- end.setDate(start.getDate() + duration);
51348
- const statusDefinition = LEAVE_REQUEST_STATUS_DEFINITIONS[Math.floor(Math.random() * LEAVE_REQUEST_STATUS_DEFINITIONS.length)];
51349
- results.push({
51350
- id: uuid$9(),
51351
- employeeId: employee.id,
51352
- employee,
51353
- leaveTypeId: leaveType.id,
51354
- leaveType,
51355
- startDate: start,
51356
- endDate: end,
51357
- durationDays: duration,
51358
- reason: `Request for ${leaveType.title}`,
51359
- statusId: statusDefinition.name,
51360
- status: { id: statusDefinition.name, title: statusDefinition.title },
51361
- });
51362
- }
51363
- });
51364
- return results;
51365
- }
51366
- const LEAVE_REQUESTS_MOCK = buildLeaveRequests();
51367
-
51368
- class AXMLeaveRequestDataSeeder {
51423
+ class AXMLifecycleEventTypeDataSeeder {
51369
51424
  constructor() {
51370
51425
  this.storageService = inject(AXPEntityStorageService);
51371
51426
  }
51372
51427
  async seed() {
51373
- await this.storageService.initial(RootConfig$j.entities.leaveRequest.source, LEAVE_REQUESTS_MOCK);
51428
+ await this.storageService.initial(RootConfig$j.entities.lifecycleEventType.source, LIFECYCLE_EVENT_TYPES_MOCK);
51374
51429
  }
51375
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveRequestDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
51376
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveRequestDataSeeder }); }
51430
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLifecycleEventTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
51431
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLifecycleEventTypeDataSeeder }); }
51377
51432
  }
51378
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLeaveRequestDataSeeder, decorators: [{
51379
- type: Injectable
51380
- }] });
51381
-
51382
- class AXMLifecycleProcessTypeDataSeeder {
51383
- constructor() {
51384
- this.storageService = inject(AXPEntityStorageService);
51385
- }
51386
- async seed() {
51387
- await this.storageService.initial(RootConfig$j.entities.lifecycleProcessType.source, LIFECYCLE_PROCESS_TYPES_MOCK);
51388
- }
51389
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLifecycleProcessTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
51390
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLifecycleProcessTypeDataSeeder }); }
51391
- }
51392
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLifecycleProcessTypeDataSeeder, decorators: [{
51433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLifecycleEventTypeDataSeeder, decorators: [{
51393
51434
  type: Injectable
51394
51435
  }] });
51395
51436
 
@@ -51837,7 +51878,7 @@ const createLeaveRequestWorkflowEntityMock = createWorkflowDefinitionEntityMock(
51837
51878
 
51838
51879
  /** Human Capital Management workflow definition entity rows seeded into WorkflowManagement.WorkflowDefinition. */
51839
51880
  const humanCapitalManagementWorkflowDefinitionEntityMocks = [
51840
- employeeLifecycleGuidedFlowWorkflowEntityMock,
51881
+ employeeLifecycleEventFlowWorkflowEntityMock,
51841
51882
  createLeaveRequestWorkflowEntityMock,
51842
51883
  ];
51843
51884
  class AXCHumanCapitalManagementWorkflowDefinitionDataSeeder {
@@ -52120,9 +52161,8 @@ class AXCHumanCapitalManagementMockModule {
52120
52161
  { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMEmployeeDataSeeder, multi: true },
52121
52162
  { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMPositionAssignmentDataSeeder, multi: true },
52122
52163
  { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMLeaveTypeDataSeeder, multi: true },
52123
- { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMLifecycleProcessTypeDataSeeder, multi: true },
52164
+ { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMLifecycleEventTypeDataSeeder, multi: true },
52124
52165
  { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMLeaveRequestDataSeeder, multi: true },
52125
- { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMEmployeeLifecycleProcessDataSeeder, multi: true },
52126
52166
  {
52127
52167
  provide: AXP_DATA_SEEDER_TOKEN,
52128
52168
  useClass: AXCHumanCapitalManagementWorkflowDefinitionDataSeeder,
@@ -52141,9 +52181,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
52141
52181
  { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMEmployeeDataSeeder, multi: true },
52142
52182
  { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMPositionAssignmentDataSeeder, multi: true },
52143
52183
  { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMLeaveTypeDataSeeder, multi: true },
52144
- { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMLifecycleProcessTypeDataSeeder, multi: true },
52184
+ { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMLifecycleEventTypeDataSeeder, multi: true },
52145
52185
  { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMLeaveRequestDataSeeder, multi: true },
52146
- { provide: AXP_DATA_SEEDER_TOKEN, useClass: AXMEmployeeLifecycleProcessDataSeeder, multi: true },
52147
52186
  {
52148
52187
  provide: AXP_DATA_SEEDER_TOKEN,
52149
52188
  useClass: AXCHumanCapitalManagementWorkflowDefinitionDataSeeder,
@@ -53477,7 +53516,6 @@ const learningManagementEnrollmentMocks = [
53477
53516
  title: learningManagementTrainingMocks[0].course.title,
53478
53517
  },
53479
53518
  status: 'Approved',
53480
- workflowInstanceId: null,
53481
53519
  notes: null,
53482
53520
  },
53483
53521
  {
@@ -53492,7 +53530,6 @@ const learningManagementEnrollmentMocks = [
53492
53530
  title: learningManagementTrainingMocks[0].course.title,
53493
53531
  },
53494
53532
  status: 'Requested',
53495
- workflowInstanceId: null,
53496
53533
  notes: null,
53497
53534
  },
53498
53535
  ];
@@ -58219,7 +58256,7 @@ const primaryMiddleware = {
58219
58256
  };
58220
58257
 
58221
58258
  /** Keys to omit from version snapshots so we don't duplicate audit metadata in the version store. */
58222
- const VERSION_SNAPSHOT_OMIT_KEYS = ['auditInfo', 'stateInfo', 'ownershipInfo'];
58259
+ const VERSION_SNAPSHOT_OMIT_KEYS = ['auditInfo', 'stateInfo', 'ownershipInfo', 'workflowInfo'];
58223
58260
  function snapshotForVersion(record) {
58224
58261
  if (record == null) {
58225
58262
  return null;
@@ -58233,7 +58270,7 @@ function snapshotForVersion(record) {
58233
58270
  /**
58234
58271
  * Combined middleware: enriches entity records with audit info (who/when) and records
58235
58272
  * version history for the "Change history" timeline. Version snapshots exclude auditInfo
58236
- * (and stateInfo, ownershipInfo) so we don't log audit metadata again in the version store.
58273
+ * (and stateInfo, ownershipInfo, workflowInfo) so we don't log platform metadata again in the version store.
58237
58274
  */
58238
58275
  const historyMiddleware = {
58239
58276
  target: { ops: ['create', 'update', 'delete'], order: 15 },
@@ -59273,8 +59310,8 @@ class AXCMiddlewaresModule {
59273
59310
  { provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: childCountMiddleware },
59274
59311
  { provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: createFileCastMiddleware },
59275
59312
  { provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: primaryMiddleware },
59313
+ { provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: visibilityFilterMiddleware }, // order: 20
59276
59314
  // { provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: firestoreRequestLoggerMiddleware }, // order: 200 - runs last before backend, logs request/response
59277
- //{ provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: visibilityFilterMiddleware }, // order: 20
59278
59315
  //{ provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: signatureLoaderMiddleware },
59279
59316
  // Sample entity event listener to show logs for all entity.* events
59280
59317
  //{ provide: AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, multi: true, useValue: AXCMockEntityLogListener },
@@ -59300,8 +59337,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
59300
59337
  { provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: childCountMiddleware },
59301
59338
  { provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: createFileCastMiddleware },
59302
59339
  { provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: primaryMiddleware },
59340
+ { provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: visibilityFilterMiddleware }, // order: 20
59303
59341
  // { provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: firestoreRequestLoggerMiddleware }, // order: 200 - runs last before backend, logs request/response
59304
- //{ provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: visibilityFilterMiddleware }, // order: 20
59305
59342
  //{ provide: AXP_ENTITY_STORAGE_MIDDLEWARE, multi: true, useValue: signatureLoaderMiddleware },
59306
59343
  // Sample entity event listener to show logs for all entity.* events
59307
59344
  //{ provide: AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, multi: true, useValue: AXCMockEntityLogListener },
@@ -67013,19 +67050,23 @@ class AXPSecurityManagementRoleDataSeeder {
67013
67050
  const roles = mockRoleDefinitions.map((role) => ({
67014
67051
  ...role,
67015
67052
  }));
67016
- await this.storageService.initial(entityName, roles);
67053
+ await this.storageService.initial(entityName, roles, {
67054
+ mergeType: 'merge',
67055
+ uniqueKeys: ['name'],
67056
+ });
67017
67057
  // Dexie `initial()` skips the whole batch when any role name already exists,
67018
67058
  // so permission changes in role.mock.ts would never reach IndexedDB without this sync.
67019
67059
  await this.syncRolePermissionsFromMock(entityName);
67020
67060
  }
67021
67061
  /**
67022
67062
  * Updates permissions (and metadata) on seeded roles when mock definitions change.
67063
+ * Skips system/immutable roles — policy middleware rejects those updates on app startup.
67023
67064
  */
67024
67065
  async syncRolePermissionsFromMock(entityName) {
67025
67066
  const storedRoles = await this.storageService.getAll(entityName);
67026
67067
  for (const mockRole of mockRoleDefinitions) {
67027
67068
  const existing = storedRoles.find((role) => role.name === mockRole.name);
67028
- if (!existing?.id) {
67069
+ if (!existing?.id || this.isPolicyProtectedRole(existing) || this.isPolicyProtectedRole(mockRole)) {
67029
67070
  continue;
67030
67071
  }
67031
67072
  await this.storageService.updateOne(entityName, existing.id, {
@@ -67035,6 +67076,9 @@ class AXPSecurityManagementRoleDataSeeder {
67035
67076
  });
67036
67077
  }
67037
67078
  }
67079
+ isPolicyProtectedRole(role) {
67080
+ return role.stateInfo?.isImmutable === true || role.stateInfo?.isSystem === true;
67081
+ }
67038
67082
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSecurityManagementRoleDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
67039
67083
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPSecurityManagementRoleDataSeeder }); }
67040
67084
  }
@@ -67057,20 +67101,59 @@ class AXPSecurityManagementUserDataSeeder {
67057
67101
  }
67058
67102
  async seed() {
67059
67103
  const entityName = `${RootConfig$6.module.name}.${RootConfig$6.entities.users.name}`;
67060
- await this.storageService.initial(entityName, mockUsers);
67104
+ await this.storageService.initial(entityName, mockUsers, {
67105
+ mergeType: 'merge',
67106
+ uniqueKeys: ['username'],
67107
+ });
67108
+ await this.syncMissingUsersFromMock(entityName);
67109
+ await this.syncOwnershipInfoFromMock(entityName);
67061
67110
  await this.syncCollaborationDemoUserRoles(entityName);
67062
67111
  }
67112
+ /**
67113
+ * Inserts mock users added after the first IndexedDB seed (e.g. demo accounts for new features).
67114
+ */
67115
+ async syncMissingUsersFromMock(usersEntityName) {
67116
+ const storedUsers = await this.backend.getAll(usersEntityName);
67117
+ for (const mockUser of mockUsers) {
67118
+ const exists = storedUsers.some((user) => user.username === mockUser.username);
67119
+ if (exists) {
67120
+ continue;
67121
+ }
67122
+ await this.storageService.insertOne(usersEntityName, mockUser);
67123
+ }
67124
+ }
67125
+ /**
67126
+ * Aligns stored user ownership with mock data so tenant-scoped list filtering works after re-seeds.
67127
+ */
67128
+ async syncOwnershipInfoFromMock(usersEntityName) {
67129
+ const storedUsers = await this.backend.getAll(usersEntityName);
67130
+ for (const mockUser of mockUsers) {
67131
+ if (!mockUser.ownershipInfo) {
67132
+ continue;
67133
+ }
67134
+ const storedUser = storedUsers.find((user) => user.username === mockUser.username);
67135
+ if (!storedUser?.id) {
67136
+ continue;
67137
+ }
67138
+ if (storedUser.ownershipInfo?.tenantId === mockUser.ownershipInfo.tenantId) {
67139
+ continue;
67140
+ }
67141
+ await this.storageService.updateOne(usersEntityName, storedUser.id, {
67142
+ ownershipInfo: mockUser.ownershipInfo,
67143
+ });
67144
+ }
67145
+ }
67063
67146
  /**
67064
67147
  * Keeps MAGFA collaboration demo user aligned with the conversation-only role in storage.
67065
67148
  */
67066
67149
  async syncCollaborationDemoUserRoles(usersEntityName) {
67067
67150
  const rolesEntityName = `${RootConfig$6.module.name}.${RootConfig$6.entities.roles.name}`;
67068
- const storedRoles = await this.storageService.getAll(rolesEntityName);
67151
+ const storedRoles = await this.backend.getAll(rolesEntityName);
67069
67152
  const conversationOnlyRole = storedRoles.find((role) => role.name === 'conversation-only');
67070
67153
  if (!conversationOnlyRole?.id) {
67071
67154
  return;
67072
67155
  }
67073
- const storedUsers = await this.storageService.getAll(usersEntityName);
67156
+ const storedUsers = await this.backend.getAll(usersEntityName);
67074
67157
  const demoUser = storedUsers.find((u) => u.username === 'mohamad.pour.ghorban');
67075
67158
  if (!demoUser?.id) {
67076
67159
  return;
@@ -67334,7 +67417,7 @@ class AXCSecurityManagementMockModule {
67334
67417
  provideQuerySetups([
67335
67418
  {
67336
67419
  key: 'SecurityManagement:User:RolesForListColumn',
67337
- loader: () => import('./acorex-connectivity-mock-user-roles-for-list-column.query-DSr7jDGu.mjs').then((m) => m.UserRolesForListColumnQuery),
67420
+ loader: () => import('./acorex-connectivity-mock-user-roles-for-list-column.query-CAhDQnWv.mjs').then((m) => m.UserRolesForListColumnQuery),
67338
67421
  },
67339
67422
  ]),
67340
67423
  ] }); }
@@ -67378,7 +67461,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
67378
67461
  provideQuerySetups([
67379
67462
  {
67380
67463
  key: 'SecurityManagement:User:RolesForListColumn',
67381
- loader: () => import('./acorex-connectivity-mock-user-roles-for-list-column.query-DSr7jDGu.mjs').then((m) => m.UserRolesForListColumnQuery),
67464
+ loader: () => import('./acorex-connectivity-mock-user-roles-for-list-column.query-CAhDQnWv.mjs').then((m) => m.UserRolesForListColumnQuery),
67382
67465
  },
67383
67466
  ]),
67384
67467
  ],
@@ -67894,6 +67977,22 @@ function generateTenants() {
67894
67977
  }
67895
67978
  const tenantMocks = generateTenants();
67896
67979
 
67980
+ //#region ---- Subscription Plan ID Constants ----
67981
+ /**
67982
+ * Stable subscription plan primary keys keyed by plan `code`.
67983
+ */
67984
+ const MOCK_SUBSCRIPTION_PLAN_IDS = {
67985
+ 'PREM-001': 'f0000005-0000-4000-a000-000000000001',
67986
+ 'STD-SUB-001': 'f0000005-0000-4000-a000-000000000002',
67987
+ 'ENT-001': 'f0000005-0000-4000-a000-000000000003',
67988
+ 'ORD-STD-001': 'f0000005-0000-4000-a000-000000000004',
67989
+ 'PC-001': 'f0000005-0000-4000-a000-000000000005',
67990
+ 'SM-BASIC-001': 'f0000005-0000-4000-a000-000000000006',
67991
+ 'CM-ENT-001': 'f0000005-0000-4000-a000-000000000007',
67992
+ 'MAGFA-001': 'f0000005-0000-4000-a000-000000000008',
67993
+ };
67994
+ //#endregion
67995
+
67897
67996
  function generateSubscriptionPlans() {
67898
67997
  const plans = [];
67899
67998
  // Get edition IDs from mock data
@@ -67902,7 +68001,10 @@ function generateSubscriptionPlans() {
67902
68001
  const financeEdition = EDITIONS.find((e) => e.title === 'Finance Enterprise');
67903
68002
  // Helper function to create subscription plan
67904
68003
  const createPlan = (title, code, description, isDisabled = false) => {
67905
- const planId = AXPDataGenerator.uuid();
68004
+ const planId = MOCK_SUBSCRIPTION_PLAN_IDS[code];
68005
+ if (!planId) {
68006
+ throw new Error(`Missing stable subscription plan id for code: ${code}`);
68007
+ }
67906
68008
  const plan = {
67907
68009
  id: planId,
67908
68010
  title,
@@ -68002,12 +68104,90 @@ function generateSubscriptions() {
68002
68104
  }
68003
68105
  const SUBSCRIPTIONS_MOCK = generateSubscriptions();
68004
68106
 
68107
+ //#region ---- Imports ----
68108
+ //#endregion
68109
+ //#region ---- Subscription Seeder ----
68110
+ /**
68111
+ * Seeds tenant subscriptions for the mock tenant loader.
68112
+ *
68113
+ * Dexie `initial()` defaults to `uniqueKeys: ['name']`, but subscription rows have no `name` field.
68114
+ * Subscriber and plan ids in mock files can also drift from IndexedDB after reloads, so rows are
68115
+ * resolved against stored tenants (by tenant `name`) and stored plans (by `code`) before insert/sync.
68116
+ */
68005
68117
  class AXCSubscriptionSeeder {
68006
68118
  constructor() {
68007
68119
  this.storageService = inject(AXPEntityStorageService);
68008
68120
  }
68009
68121
  async seed() {
68010
- await this.storageService.initial(RootConfig$x.entities.subscription.source, SUBSCRIPTIONS_MOCK);
68122
+ const entityName = RootConfig$x.entities.subscription.source;
68123
+ const resolvedMocks = await this.resolveMockSubscriptions();
68124
+ await this.storageService.initial(entityName, resolvedMocks, {
68125
+ mergeType: 'merge',
68126
+ uniqueKeys: ['subscriberId', 'planId'],
68127
+ });
68128
+ await this.syncSubscriptionsFromMock(entityName, resolvedMocks);
68129
+ }
68130
+ async resolveMockSubscriptions() {
68131
+ const tenantEntityName = `${RootConfig$y.module.name}.${RootConfig$y.entities.tenant.name}`;
68132
+ const planEntityName = RootConfig$x.entities.subscriptionPlan.source;
68133
+ const [storedTenants, storedPlans] = await Promise.all([
68134
+ this.storageService.getAll(tenantEntityName),
68135
+ this.storageService.getAll(planEntityName),
68136
+ ]);
68137
+ const resolved = [];
68138
+ for (const mock of SUBSCRIPTIONS_MOCK) {
68139
+ const mockTenantDef = tenantMocks.find((tenant) => tenant.id === mock.subscriberId);
68140
+ const storedTenant = storedTenants.find((tenant) => tenant.id === mock.subscriberId ||
68141
+ (!!mockTenantDef?.name && tenant.name === mockTenantDef.name));
68142
+ if (!storedTenant?.id) {
68143
+ continue;
68144
+ }
68145
+ const mockPlanDef = SUBSCRIPTION_PLANS_MOCK.find((plan) => plan.id === mock.planId);
68146
+ const storedPlan = storedPlans.find((plan) => plan.id === mock.planId || (!!mockPlanDef?.code && plan.code === mockPlanDef.code));
68147
+ if (!storedPlan?.id) {
68148
+ continue;
68149
+ }
68150
+ resolved.push({
68151
+ ...mock,
68152
+ subscriberId: storedTenant.id,
68153
+ subscriber: {
68154
+ id: storedTenant.id,
68155
+ title: storedTenant.title,
68156
+ displayName: storedTenant.title,
68157
+ },
68158
+ planId: storedPlan.id,
68159
+ plan: {
68160
+ id: storedPlan.id,
68161
+ title: storedPlan.title,
68162
+ },
68163
+ });
68164
+ }
68165
+ return resolved;
68166
+ }
68167
+ async syncSubscriptionsFromMock(entityName, resolvedMocks) {
68168
+ const storedSubscriptions = await this.storageService.getAll(entityName);
68169
+ for (const mock of resolvedMocks) {
68170
+ const existing = storedSubscriptions.find((subscription) => subscription.subscriberId === mock.subscriberId && subscription.planId === mock.planId);
68171
+ if (!existing?.id) {
68172
+ await this.storageService.insertOne(entityName, {
68173
+ ...mock,
68174
+ id: mock.id ?? AXPDataGenerator.uuid(),
68175
+ });
68176
+ continue;
68177
+ }
68178
+ const subscriberChanged = existing.subscriberId !== mock.subscriberId;
68179
+ const planChanged = existing.planId !== mock.planId;
68180
+ const statusChanged = existing.statusId !== mock.statusId;
68181
+ if (subscriberChanged || planChanged || statusChanged) {
68182
+ await this.storageService.updateOne(entityName, existing.id, {
68183
+ subscriberId: mock.subscriberId,
68184
+ subscriber: mock.subscriber,
68185
+ planId: mock.planId,
68186
+ plan: mock.plan,
68187
+ statusId: mock.statusId,
68188
+ });
68189
+ }
68190
+ }
68011
68191
  }
68012
68192
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCSubscriptionSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
68013
68193
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCSubscriptionSeeder }); }
@@ -68021,7 +68201,10 @@ class AXCSubscriptionPlanSeeder {
68021
68201
  this.storageService = inject(AXPEntityStorageService);
68022
68202
  }
68023
68203
  async seed() {
68024
- await this.storageService.initial(RootConfig$x.entities.subscriptionPlan.source, SUBSCRIPTION_PLANS_MOCK);
68204
+ await this.storageService.initial(RootConfig$x.entities.subscriptionPlan.source, SUBSCRIPTION_PLANS_MOCK, {
68205
+ mergeType: 'merge',
68206
+ uniqueKeys: ['code'],
68207
+ });
68025
68208
  }
68026
68209
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCSubscriptionPlanSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
68027
68210
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCSubscriptionPlanSeeder }); }
@@ -68168,7 +68351,7 @@ class AXCSupplierCategorySeeder {
68168
68351
  this.storageService = inject(AXPEntityStorageService);
68169
68352
  }
68170
68353
  async seed() {
68171
- await this.storageService.initial(`${RootConfig$y.module.name}.${RootConfig$y.entities.supplier.name}Category`, supplierCategoryMocks);
68354
+ await this.storageService.initial(`${RootConfig$z.module.name}.${RootConfig$z.entities.supplier.name}Category`, supplierCategoryMocks);
68172
68355
  }
68173
68356
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCSupplierCategorySeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
68174
68357
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCSupplierCategorySeeder }); }
@@ -68182,7 +68365,7 @@ class AXCSupplierDataSeeder {
68182
68365
  this.storageService = inject(AXPEntityStorageService);
68183
68366
  }
68184
68367
  async seed() {
68185
- await this.storageService.initial(RootConfig$y.entities.supplier.source, SUPPLIERS_MOCK);
68368
+ await this.storageService.initial(RootConfig$z.entities.supplier.source, SUPPLIERS_MOCK);
68186
68369
  }
68187
68370
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCSupplierDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
68188
68371
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCSupplierDataSeeder }); }
@@ -68625,7 +68808,7 @@ class AXMTaskTypeDataSeeder {
68625
68808
  this.storageService = inject(AXPEntityStorageService);
68626
68809
  }
68627
68810
  async seed() {
68628
- await this.storageService.initial(`${RootConfig$z.module.name}.${RootConfig$z.entities.taskType.name}`, taskTypeMock);
68811
+ await this.storageService.initial(`${RootConfig$A.module.name}.${RootConfig$A.entities.taskType.name}`, taskTypeMock);
68629
68812
  }
68630
68813
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMTaskTypeDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
68631
68814
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMTaskTypeDataSeeder }); }
@@ -68772,7 +68955,7 @@ class AXMTaskStatusDataSeeder {
68772
68955
  this.storageService = inject(AXPEntityStorageService);
68773
68956
  }
68774
68957
  async seed() {
68775
- await this.storageService.initial(`${RootConfig$z.module.name}.${RootConfig$z.entities.taskStatus.name}`, taskStatusMock);
68958
+ await this.storageService.initial(`${RootConfig$A.module.name}.${RootConfig$A.entities.taskStatus.name}`, taskStatusMock);
68776
68959
  }
68777
68960
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMTaskStatusDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
68778
68961
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMTaskStatusDataSeeder }); }
@@ -68943,7 +69126,7 @@ class AXMTaskDataSeeder {
68943
69126
  this.storageService = inject(AXPEntityStorageService);
68944
69127
  }
68945
69128
  async seed() {
68946
- await this.storageService.initial(`${RootConfig$z.module.name}.${RootConfig$z.entities.task.name}`, taskMock);
69129
+ await this.storageService.initial(`${RootConfig$A.module.name}.${RootConfig$A.entities.task.name}`, taskMock);
68947
69130
  }
68948
69131
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMTaskDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
68949
69132
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMTaskDataSeeder }); }
@@ -69051,7 +69234,7 @@ class AXMTaskTemplateDataSeeder {
69051
69234
  this.storageService = inject(AXPEntityStorageService);
69052
69235
  }
69053
69236
  async seed() {
69054
- await this.storageService.initial(`${RootConfig$z.module.name}.${RootConfig$z.entities.taskTemplate.name}`, taskTemplateMock);
69237
+ await this.storageService.initial(`${RootConfig$A.module.name}.${RootConfig$A.entities.taskTemplate.name}`, taskTemplateMock);
69055
69238
  }
69056
69239
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMTaskTemplateDataSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
69057
69240
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMTaskTemplateDataSeeder }); }
@@ -69119,7 +69302,7 @@ class AXCTenantSeeder {
69119
69302
  this.storageService = inject(AXPEntityStorageService);
69120
69303
  }
69121
69304
  async seed() {
69122
- await this.storageService.initial(RootConfig$A.entities.tenant.source, tenantMocks);
69305
+ await this.storageService.initial(RootConfig$y.entities.tenant.source, tenantMocks);
69123
69306
  }
69124
69307
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCTenantSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
69125
69308
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCTenantSeeder }); }
@@ -69295,12 +69478,113 @@ const tenantUserMocks = generateTenantUsers();
69295
69478
  //#region ---- Imports ----
69296
69479
  //#endregion
69297
69480
  //#region ---- Tenant User Seeder ----
69481
+ /**
69482
+ * Seeds `TenantManagement.TenantUser` mock memberships.
69483
+ *
69484
+ * Dexie `initial()` defaults to `uniqueKeys: ['name']`, but TenantUser rows have no `name` field.
69485
+ * User and tenant ids in mock files can drift from IndexedDB after reloads, so rows are resolved
69486
+ * against stored users (by `username`) and stored tenants (by tenant `name`) before insert/sync.
69487
+ */
69298
69488
  class AXCTenantUserSeeder {
69299
69489
  constructor() {
69300
69490
  this.storageService = inject(AXPEntityStorageService);
69491
+ this.backend = inject(AXP_ENTITY_STORAGE_BACKEND);
69301
69492
  }
69302
69493
  async seed() {
69303
- await this.storageService.initial(`${RootConfig$A.module.name}.${RootConfig$A.entities.tenantUser.name}`, tenantUserMocks);
69494
+ const entityName = `${RootConfig$y.module.name}.${RootConfig$y.entities.tenantUser.name}`;
69495
+ const resolvedMocks = await this.resolveMockTenantUsers();
69496
+ await this.storageService.initial(entityName, resolvedMocks, {
69497
+ mergeType: 'merge',
69498
+ uniqueKeys: ['userId', 'tenantId'],
69499
+ });
69500
+ await this.syncTenantUsersFromMock(entityName, resolvedMocks);
69501
+ }
69502
+ /**
69503
+ * Maps mock tenant-user rows to user/tenant/role ids currently stored in IndexedDB.
69504
+ */
69505
+ async resolveMockTenantUsers() {
69506
+ const tenantEntityName = `${RootConfig$y.module.name}.${RootConfig$y.entities.tenant.name}`;
69507
+ const userEntityName = `${RootConfig$6.module.name}.${RootConfig$6.entities.users.name}`;
69508
+ const roleEntityName = `${RootConfig$6.module.name}.${RootConfig$6.entities.roles.name}`;
69509
+ const [storedTenants, storedUsers, storedRoles] = await Promise.all([
69510
+ this.backend.getAll(tenantEntityName),
69511
+ this.backend.getAll(userEntityName),
69512
+ this.backend.getAll(roleEntityName),
69513
+ ]);
69514
+ const resolved = [];
69515
+ for (const mock of tenantUserMocks) {
69516
+ const username = mock.user?.username;
69517
+ if (!username) {
69518
+ continue;
69519
+ }
69520
+ const storedUser = storedUsers.find((user) => user.username === username);
69521
+ if (!storedUser?.id) {
69522
+ continue;
69523
+ }
69524
+ const mockTenantDef = tenantMocks.find((tenant) => tenant.id === mock.tenantId || tenant.id === mock.tenant?.id);
69525
+ const storedTenant = storedTenants.find((tenant) => tenant.id === mock.tenantId ||
69526
+ (!!mockTenantDef?.name && tenant.name === mockTenantDef.name));
69527
+ if (!storedTenant?.id) {
69528
+ continue;
69529
+ }
69530
+ const roleName = mock.role?.name;
69531
+ const storedRole = roleName ? storedRoles.find((role) => role.name === roleName) : undefined;
69532
+ resolved.push({
69533
+ ...mock,
69534
+ userId: storedUser.id,
69535
+ user: {
69536
+ id: storedUser.id,
69537
+ username: storedUser.username,
69538
+ displayName: storedUser.displayName,
69539
+ },
69540
+ tenantId: storedTenant.id,
69541
+ tenant: { id: storedTenant.id, title: storedTenant.title },
69542
+ roleId: storedRole?.id ?? mock.roleId,
69543
+ role: storedRole
69544
+ ? { id: storedRole.id, name: storedRole.name, title: storedRole.title }
69545
+ : mock.role,
69546
+ });
69547
+ }
69548
+ return resolved;
69549
+ }
69550
+ /**
69551
+ * Inserts or updates tenant-user rows when mock membership definitions change.
69552
+ */
69553
+ async syncTenantUsersFromMock(entityName, resolvedMocks) {
69554
+ const storedLinks = await this.backend.getAll(entityName);
69555
+ for (const mock of resolvedMocks) {
69556
+ const existing = this.findExistingTenantUserLink(storedLinks, mock);
69557
+ if (!existing?.id) {
69558
+ await this.storageService.insertOne(entityName, {
69559
+ ...mock,
69560
+ id: mock.id ?? AXPDataGenerator.uuid(),
69561
+ });
69562
+ continue;
69563
+ }
69564
+ const userChanged = existing.userId !== mock.userId;
69565
+ const roleChanged = existing.roleId !== mock.roleId;
69566
+ const statusChanged = existing.statusId !== mock.statusId;
69567
+ if (userChanged || roleChanged || statusChanged) {
69568
+ await this.storageService.updateOne(entityName, existing.id, {
69569
+ userId: mock.userId,
69570
+ user: mock.user,
69571
+ roleId: mock.roleId,
69572
+ role: mock.role,
69573
+ statusId: mock.statusId,
69574
+ });
69575
+ }
69576
+ }
69577
+ }
69578
+ findExistingTenantUserLink(storedLinks, mock) {
69579
+ const byIds = storedLinks.find((link) => link.userId === mock.userId && link.tenantId === mock.tenantId);
69580
+ if (byIds) {
69581
+ return byIds;
69582
+ }
69583
+ const username = mock.user?.username;
69584
+ if (!username) {
69585
+ return undefined;
69586
+ }
69587
+ return storedLinks.find((link) => link.user?.username === username && link.tenantId === mock.tenantId);
69304
69588
  }
69305
69589
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCTenantUserSeeder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
69306
69590
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCTenantUserSeeder }); }
@@ -69331,7 +69615,7 @@ class AXMCreateTenantUserCommand {
69331
69615
  };
69332
69616
  }
69333
69617
  // Check if account holder already exists for this tenant
69334
- const tenantUserEntityName = `${RootConfig$A.module.name}.${RootConfig$A.entities.tenantUser.name}`;
69618
+ const tenantUserEntityName = `${RootConfig$y.module.name}.${RootConfig$y.entities.tenantUser.name}`;
69335
69619
  const accountHolderResult = await this.storageService.query(tenantUserEntityName, {
69336
69620
  skip: 0,
69337
69621
  take: 1,
@@ -70717,8 +71001,8 @@ class AXCUserPassStrategyMock extends AXPAuthStrategy {
70717
71001
  try {
70718
71002
  let user = null;
70719
71003
  const func = entityRef?.queries?.list?.execute;
70720
- // Bypass visibility filter for authentication (system users need to be accessible)
70721
- const users = await func(bypassVisibilityFilter({
71004
+ // Bypass tenant/visibility filters for authentication (system users must be discoverable)
71005
+ const users = await func(bypassAllFilters({
70722
71006
  skip: 0,
70723
71007
  take: 1000,
70724
71008
  }));
@@ -71689,6 +71973,13 @@ function generateActivityDefinitions() {
71689
71973
  dataType: 'string',
71690
71974
  interface: { type: AXPWidgetsList.Editors.TextBox, options: {} },
71691
71975
  },
71976
+ {
71977
+ name: 'title',
71978
+ title: 'Viewer title',
71979
+ description: 'Optional popup title; defaults to assessment case title when omitted',
71980
+ dataType: 'string',
71981
+ interface: { type: AXPWidgetsList.Editors.TextBox, options: {} },
71982
+ },
71692
71983
  {
71693
71984
  name: 'showAs',
71694
71985
  title: 'Show as',
@@ -73075,6 +73366,63 @@ const documentWorkflowTriggerMiddleware = {
73075
73366
  },
73076
73367
  };
73077
73368
 
73369
+ const AXC_WORKFLOW_EXECUTION_STORE = new InjectionToken('AXC_WORKFLOW_EXECUTION_STORE');
73370
+
73371
+ //#region ---- Imports ----
73372
+ //#endregion
73373
+ //#region ---- Sync ----
73374
+ /**
73375
+ * Writes {@link AXPRecordWorkflowInfo} on a domain row and links the workflow instance entity ref.
73376
+ * Uses the workflow-trigger guard so entity update middleware does not re-start workflows.
73377
+ */
73378
+ async function syncEntityRecordWorkflowInfo(storage, store, params) {
73379
+ const entityType = params.entityType?.trim();
73380
+ const entityId = params.entityId?.trim();
73381
+ const instanceId = params.instanceId?.trim();
73382
+ if (!entityType || !entityId || !instanceId) {
73383
+ return;
73384
+ }
73385
+ const manageGuard = params.manageWorkflowTriggerGuard !== false;
73386
+ if (manageGuard) {
73387
+ setWorkflowStartInProgress(true);
73388
+ }
73389
+ try {
73390
+ const workflowInfo = buildAXPRecordWorkflowInfo({
73391
+ instanceId,
73392
+ definitionId: params.definitionId,
73393
+ correlationId: params.correlationId,
73394
+ pinnedVersion: params.pinnedVersion,
73395
+ });
73396
+ const instance = await store.getInstance(instanceId);
73397
+ if (instance) {
73398
+ instance.entityRefId = entityId;
73399
+ instance.entityRefType = entityType;
73400
+ await store.putInstance(instance);
73401
+ }
73402
+ let existingWorkflowInfo;
73403
+ try {
73404
+ const existing = await storage.getOne(entityType, entityId);
73405
+ existingWorkflowInfo = existing?.workflowInfo;
73406
+ }
73407
+ catch {
73408
+ /* record may not exist yet */
73409
+ }
73410
+ await storage.updateOne(entityType, entityId, {
73411
+ workflowInfo: {
73412
+ ...existingWorkflowInfo,
73413
+ ...workflowInfo,
73414
+ pinnedVersion: workflowInfo.pinnedVersion ?? existingWorkflowInfo?.pinnedVersion ?? null,
73415
+ },
73416
+ });
73417
+ }
73418
+ finally {
73419
+ if (manageGuard) {
73420
+ setWorkflowStartInProgress(false);
73421
+ }
73422
+ }
73423
+ }
73424
+ //#endregion
73425
+
73078
73426
  /**
73079
73427
  * Workflow Trigger Middleware
73080
73428
  *
@@ -73113,6 +73461,7 @@ const workflowTriggerMiddleware = {
73113
73461
  const workflowManager = inject(AXPWorkflowManager);
73114
73462
  const storageService = inject(AXPEntityStorageService);
73115
73463
  const workflowDefinitionService = inject(AXPWorkflowDefinitionService);
73464
+ const workflowExecutionStore = inject(AXC_WORKFLOW_EXECUTION_STORE);
73116
73465
  await next();
73117
73466
  if (!ctx.result) {
73118
73467
  return;
@@ -73299,6 +73648,14 @@ const workflowTriggerMiddleware = {
73299
73648
  if (!startResult.success || !startResult.instanceId) {
73300
73649
  continue;
73301
73650
  }
73651
+ await syncEntityRecordWorkflowInfo(storageService, workflowExecutionStore, {
73652
+ entityType: ctx.entityName,
73653
+ entityId: recordId,
73654
+ instanceId: startResult.instanceId,
73655
+ definitionId: workflow.name,
73656
+ correlationId,
73657
+ manageWorkflowTriggerGuard: false,
73658
+ });
73302
73659
  }
73303
73660
  catch {
73304
73661
  // Continue with other workflows
@@ -74307,8 +74664,6 @@ class AXCWorkflowExecutionDB extends Dexie {
74307
74664
  const axWorkflowExecutionDB = new AXCWorkflowExecutionDB();
74308
74665
  //#endregion
74309
74666
 
74310
- const AXC_WORKFLOW_EXECUTION_STORE = new InjectionToken('AXC_WORKFLOW_EXECUTION_STORE');
74311
-
74312
74667
  class AXCWorkflowExecutionStoreDexie {
74313
74668
  constructor() {
74314
74669
  this.db = axWorkflowExecutionDB;
@@ -74719,7 +75074,7 @@ class AXCWorkflowEngine {
74719
75074
  },
74720
75075
  ]
74721
75076
  : [],
74722
- input: workflowInput,
75077
+ input: { ...workflowInput, _workflowInstanceId: instanceId },
74723
75078
  output: {},
74724
75079
  properties: {},
74725
75080
  createdAt: now,
@@ -74961,6 +75316,33 @@ class AXCWorkflowEngine {
74961
75316
  lastActivityOutput,
74962
75317
  };
74963
75318
  }
75319
+ /**
75320
+ * Terminates a non-finished workflow instance (e.g. superseded lifecycle run).
75321
+ */
75322
+ async cancelInstance(instanceId, reason) {
75323
+ const instance = await this.getInstance(instanceId);
75324
+ if (!instance || instance.status === 'Finished') {
75325
+ return;
75326
+ }
75327
+ const now = new Date().toISOString();
75328
+ instance.status = 'Finished';
75329
+ instance.subStatus = 'Cancelled';
75330
+ instance.updatedAt = now;
75331
+ instance.finishedAt = now;
75332
+ instance.workflowState.status = 'Finished';
75333
+ instance.workflowState.subStatus = 'Cancelled';
75334
+ instance.workflowState.updatedAt = now;
75335
+ instance.workflowState.finishedAt = now;
75336
+ if (reason) {
75337
+ instance.workflowState.properties = {
75338
+ ...(instance.workflowState.properties ?? {}),
75339
+ cancelReason: reason,
75340
+ };
75341
+ }
75342
+ await this.store.updateInstance(instance);
75343
+ await this.updateInstanceInEntityService(instance);
75344
+ console.log(`[AXCWorkflowEngine] 🛑 Cancelled workflow instance: ${instanceId}`, { reason });
75345
+ }
74964
75346
  /**
74965
75347
  * Find activity in Graph by ID.
74966
75348
  */
@@ -75038,6 +75420,71 @@ class AXCWorkflowEngine {
75038
75420
  return { ...value };
75039
75421
  return { value };
75040
75422
  }
75423
+ /**
75424
+ * Extracts persisted create-entity-form payload (`data.result`) from a frontend step output.
75425
+ */
75426
+ extractPersistedEntityFormResult(output) {
75427
+ const result = output['result'];
75428
+ if (result && typeof result === 'object' && !Array.isArray(result)) {
75429
+ return result;
75430
+ }
75431
+ return null;
75432
+ }
75433
+ /**
75434
+ * Coerces date-like workflow values to a {@link Date} (local calendar date when input is `yyyy-mm-dd`).
75435
+ */
75436
+ coerceWorkflowDateValue(value) {
75437
+ if (value == null) {
75438
+ return null;
75439
+ }
75440
+ if (value instanceof Date) {
75441
+ return Number.isNaN(value.getTime()) ? null : value;
75442
+ }
75443
+ if (typeof value === 'string') {
75444
+ const trimmed = value.trim();
75445
+ const dateOnlyMatch = /^(\d{4})-(\d{2})-(\d{2})/.exec(trimmed);
75446
+ if (dateOnlyMatch) {
75447
+ const year = Number(dateOnlyMatch[1]);
75448
+ const month = Number(dateOnlyMatch[2]);
75449
+ const day = Number(dateOnlyMatch[3]);
75450
+ const local = new Date(year, month - 1, day);
75451
+ return Number.isNaN(local.getTime()) ? null : local;
75452
+ }
75453
+ const parsed = new Date(trimmed);
75454
+ return Number.isNaN(parsed.getTime()) ? null : parsed;
75455
+ }
75456
+ return null;
75457
+ }
75458
+ /**
75459
+ * Promotes `create-entity-form` submit payload (`output.result`) onto workflow variables
75460
+ * so downstream steps and human tasks see form values (e.g. effectiveDate), not start inputs.
75461
+ */
75462
+ buildPersistedEntityFormVariablePromotions(output, activityName, outcome) {
75463
+ if (activityName !== 'workflow-activity:create-entity-form' || outcome !== 'Submitted') {
75464
+ return {};
75465
+ }
75466
+ const form = this.extractPersistedEntityFormResult(output);
75467
+ if (!form) {
75468
+ return {};
75469
+ }
75470
+ const promoted = {};
75471
+ for (const [key, value] of Object.entries(form)) {
75472
+ if (value == null || key === 'id') {
75473
+ continue;
75474
+ }
75475
+ if (key === 'effectiveDate') {
75476
+ const coerced = this.coerceWorkflowDateValue(value);
75477
+ if (coerced) {
75478
+ promoted[key] = coerced;
75479
+ }
75480
+ continue;
75481
+ }
75482
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
75483
+ promoted[key] = value;
75484
+ }
75485
+ }
75486
+ return promoted;
75487
+ }
75041
75488
  /**
75042
75489
  * Resume a suspended workflow instance.
75043
75490
  *
@@ -76349,6 +76796,34 @@ class AXCWorkflowEngine {
76349
76796
  }
76350
76797
  //#endregion
76351
76798
  //#region ---- Backend Activity Executors ----
76799
+ /**
76800
+ * Evaluates activity inputs against current workflow scope (same as backend execution).
76801
+ */
76802
+ async evaluateActivityInputs(activity, state, lastOutput) {
76803
+ const scope = this.expressionScopeService.buildScopeFromState(state, this.ensureOutputsForScope(lastOutput));
76804
+ return this.expressionEvaluator.evaluate(activity.inputs || {}, scope);
76805
+ }
76806
+ /**
76807
+ * After entity-create: link instance entity ref and persist {@link AXPRecordWorkflowInfo} on the row.
76808
+ */
76809
+ async linkEntityRecordAfterCreate(instanceId, activity, state, lastOutput, entityId) {
76810
+ const properties = await this.evaluateActivityInputs(activity, state, lastOutput);
76811
+ const entityType = typeof properties['entity'] === 'string' ? properties['entity'].trim() : '';
76812
+ const recordId = entityId?.trim();
76813
+ if (!entityType || !recordId) {
76814
+ return;
76815
+ }
76816
+ const instance = await this.store.getInstance(instanceId);
76817
+ const definitionId = instance?.definitionId ?? instance?.workflowState?.definitionId ?? state.workflowId ?? null;
76818
+ const correlationId = instance?.correlationId ?? instance?.workflowState?.correlationId ?? null;
76819
+ await syncEntityRecordWorkflowInfo(this.entityStorageService, this.store, {
76820
+ entityType,
76821
+ entityId: recordId,
76822
+ instanceId,
76823
+ definitionId: definitionId != null ? String(definitionId) : null,
76824
+ correlationId: correlationId != null ? String(correlationId) : null,
76825
+ });
76826
+ }
76352
76827
  /**
76353
76828
  * Execute backend activities locally using CommandBus.
76354
76829
  *
@@ -76393,6 +76868,13 @@ class AXCWorkflowEngine {
76393
76868
  output,
76394
76869
  outcomes,
76395
76870
  };
76871
+ if (activityType === 'workflow-activity:entity-create' &&
76872
+ outcomes['Done'] &&
76873
+ output &&
76874
+ typeof output === 'object' &&
76875
+ typeof output['id'] === 'string') {
76876
+ await this.linkEntityRecordAfterCreate(state.instanceId, activity, state, lastOutput, output['id']);
76877
+ }
76396
76878
  return finalResult;
76397
76879
  }
76398
76880
  catch (error) {
@@ -76960,40 +77442,24 @@ class AXCWorkflowEngine {
76960
77442
  const allowedOutcomes = await this.getActivityAllowedOutcomes(workflow, request.activityNode);
76961
77443
  const outcome = this.normalizeOutcome(request.outcome ?? 'Done', allowedOutcomes, request.activityNode);
76962
77444
  // Apply frontend output: only last activity output is kept (overwritten each step)
76963
- const output = request.output || {};
77445
+ const output = (request.output || {});
76964
77446
  let lastActivityOutput = output;
76965
77447
  // Apply outputToVariables for the completed frontend activity (e.g. leaveRequestForm → leaveRequestId: 'id')
76966
77448
  const variableUpdatesFromOutput = this.getVariableUpdatesFromOutput(workflow, request.activityNode, output);
77449
+ const completedActivity = this.findActivityInGraph(workflow.graph, request.activityNode);
77450
+ const formResultPromotions = this.buildPersistedEntityFormVariablePromotions(output, completedActivity?.name, outcome);
76967
77451
  state = {
76968
77452
  ...state,
76969
77453
  variables: {
76970
77454
  ...state.variables,
76971
77455
  ...output, // Merge frontend output into variables
77456
+ ...formResultPromotions, // Promote capture-form fields (e.g. effectiveDate) onto variables
76972
77457
  ...variableUpdatesFromOutput, // Map output paths to variable names (e.g. id → leaveRequestId)
76973
77458
  [`${request.activityNode}_outcome`]: outcome, // Keep outcome for reference (normalized)
76974
77459
  },
76975
77460
  lastActivityOutput,
76976
77461
  lastUpdated: new Date(),
76977
77462
  };
76978
- // 🎯 Update entityRefId and entityRefType if entity was created
76979
- // Check if this activity created an entity (workflow-activity:create-entity)
76980
- const completedActivity = this.findActivityInGraph(workflow.graph, request.activityNode);
76981
- if (completedActivity?.name === 'workflow-activity:create-entity' && output['id']) {
76982
- // Extract entity type from activity inputs
76983
- const entityModule = completedActivity.inputs?.module || '';
76984
- const entityName = completedActivity.inputs?.entity || '';
76985
- const entityType = entityModule && entityName ? `${entityModule}.${entityName}` : null;
76986
- const entityId = output['id'];
76987
- if (entityId && entityType) {
76988
- // Update workflow instance with entity reference
76989
- const instance = await this.store.getInstance(request.instanceId);
76990
- if (instance) {
76991
- instance.entityRefId = entityId;
76992
- instance.entityRefType = entityType;
76993
- await this.store.putInstance(instance);
76994
- }
76995
- }
76996
- }
76997
77463
  // Find next activity based on outcome from frontend (use normalized outcome)
76998
77464
  const nextConnection = connections.find((conn) => conn.source.activtyName === request.activityNode &&
76999
77465
  (conn.source.port === outcome || (!conn.source.port && outcome === 'Done')));
@@ -77325,7 +77791,7 @@ class AXCWorkflowManagementMockModule {
77325
77791
  provideCommandSetups([
77326
77792
  {
77327
77793
  key: 'workflow-activity:assign-to-manager',
77328
- command: () => import('./acorex-connectivity-mock-assign-to-manager.activity-DtDwfWx9.mjs').then((c) => c.AssignToManagerActivity),
77794
+ command: () => import('./acorex-connectivity-mock-assign-to-manager.activity-BF9U-Hd6.mjs').then((c) => c.AssignToManagerActivity),
77329
77795
  },
77330
77796
  {
77331
77797
  key: 'workflow-activity:get-current-user-manager',
@@ -77361,7 +77827,7 @@ class AXCWorkflowManagementMockModule {
77361
77827
  },
77362
77828
  {
77363
77829
  key: 'workflow-activity:entity-create',
77364
- command: () => import('./acorex-connectivity-mock-entity-create.activity-Ca19tIj4.mjs').then((c) => c.EntityCreateActivity),
77830
+ command: () => import('./acorex-connectivity-mock-entity-create.activity-CdoUzUvF.mjs').then((c) => c.EntityCreateActivity),
77365
77831
  },
77366
77832
  {
77367
77833
  key: 'workflow-activity:entity-read',
@@ -77436,7 +77902,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
77436
77902
  provideCommandSetups([
77437
77903
  {
77438
77904
  key: 'workflow-activity:assign-to-manager',
77439
- command: () => import('./acorex-connectivity-mock-assign-to-manager.activity-DtDwfWx9.mjs').then((c) => c.AssignToManagerActivity),
77905
+ command: () => import('./acorex-connectivity-mock-assign-to-manager.activity-BF9U-Hd6.mjs').then((c) => c.AssignToManagerActivity),
77440
77906
  },
77441
77907
  {
77442
77908
  key: 'workflow-activity:get-current-user-manager',
@@ -77472,7 +77938,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
77472
77938
  },
77473
77939
  {
77474
77940
  key: 'workflow-activity:entity-create',
77475
- command: () => import('./acorex-connectivity-mock-entity-create.activity-Ca19tIj4.mjs').then((c) => c.EntityCreateActivity),
77941
+ command: () => import('./acorex-connectivity-mock-entity-create.activity-CdoUzUvF.mjs').then((c) => c.EntityCreateActivity),
77476
77942
  },
77477
77943
  {
77478
77944
  key: 'workflow-activity:entity-read',
@@ -81496,6 +81962,7 @@ class AXCMockModule {
81496
81962
  AXCSupplierManagementMockModule,
81497
81963
  AXCProcurementManagementMockModule,
81498
81964
  AXCOrderManagementMockModule,
81965
+ AXCTenantManagementMockModule,
81499
81966
  AXCSubscriptionManagementMockModule,
81500
81967
  AXCLocationManagementMockModule,
81501
81968
  AXCContactCoreMockModule,
@@ -81511,7 +81978,6 @@ class AXCMockModule {
81511
81978
  AXCAiManagementMockModule,
81512
81979
  AXCPlatformManagementMockModule,
81513
81980
  AXCApplicationManagementMockModule,
81514
- AXCTenantManagementMockModule,
81515
81981
  AXCLearningManagementMockModule,
81516
81982
  AXCAssetManagementMockModule,
81517
81983
  AXCProjectManagementMockModule,
@@ -81556,6 +82022,7 @@ class AXCMockModule {
81556
82022
  AXCSupplierManagementMockModule,
81557
82023
  AXCProcurementManagementMockModule,
81558
82024
  AXCOrderManagementMockModule,
82025
+ AXCTenantManagementMockModule,
81559
82026
  AXCSubscriptionManagementMockModule,
81560
82027
  AXCLocationManagementMockModule,
81561
82028
  AXCContactCoreMockModule,
@@ -81571,7 +82038,6 @@ class AXCMockModule {
81571
82038
  AXCAiManagementMockModule,
81572
82039
  AXCPlatformManagementMockModule,
81573
82040
  AXCApplicationManagementMockModule,
81574
- AXCTenantManagementMockModule,
81575
82041
  AXCLearningManagementMockModule,
81576
82042
  AXCAssetManagementMockModule,
81577
82043
  AXCProjectManagementMockModule,
@@ -81613,6 +82079,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
81613
82079
  AXCSupplierManagementMockModule,
81614
82080
  AXCProcurementManagementMockModule,
81615
82081
  AXCOrderManagementMockModule,
82082
+ AXCTenantManagementMockModule,
81616
82083
  AXCSubscriptionManagementMockModule,
81617
82084
  AXCLocationManagementMockModule,
81618
82085
  AXCContactCoreMockModule,
@@ -81628,7 +82095,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
81628
82095
  AXCAiManagementMockModule,
81629
82096
  AXCPlatformManagementMockModule,
81630
82097
  AXCApplicationManagementMockModule,
81631
- AXCTenantManagementMockModule,
81632
82098
  AXCLearningManagementMockModule,
81633
82099
  AXCAssetManagementMockModule,
81634
82100
  AXCProjectManagementMockModule,
@@ -81774,4 +82240,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
81774
82240
  */
81775
82241
 
81776
82242
  export { AXCFileStorageServiceFirestore as $, AXCAiChatRouterService as A, AXCAuthMockModule as B, AXCCalendarDataSeeder as C, AXCCalendarEventDataSeeder as D, AXCCalendarManagementMockModule as E, AXCCommandRegistryDataSeeder as F, AXCCommonMockModule as G, AXCContactCoreMockModule as H, AXCContentManagementMockModule as I, AXCConversationDataSeeder as J, AXCConversationMockConversationApi as K, AXCConversationMockMessageApi as L, AXCConversationMockModule as M, AXCConversationMockRealtimeApi as N, AXCConversationMockUserApi as O, AXCCustomerManagementMockModule as P, AXCDashboardManagementMockModule as Q, AXCDataManagementMockModule as R, AXCDexieEntityStorageService as S, AXCDocumentManagementMockModule as T, AXCEditionDataSeeder as U, AXCEntityDefinitionSeederService as V, AXCEntityDefinitionsModule as W, AXCEntityStorageInsertCommand as X, AXCEntityStorageModule as Y, AXCEntityStorageQueryQuery as Z, AXCFileStorageServiceDexie as _, AXMAiModelStableIds as a, AXMCalendarEventTypeSeeder as a$, AXCFinancialCoreMockModule as a0, AXCFirestoreEntityStorageService as a1, AXCFormTemplateManagementMockModule as a2, AXCGoogleStrategyMock as a3, AXCHealthCoreMockModule as a4, AXCHelpDeskMockModule as a5, AXCHumanCapitalManagementMockModule as a6, AXCIdentifierManagementMockModule as a7, AXCImageCaptchaChallengeProviderMock as a8, AXCLearningManagementMockModule as a9, AXCTaskManagementMockModule as aA, AXCTenantManagementMockModule as aB, AXCTenantSeeder as aC, AXCTextTemplateRenderBackend as aD, AXCTokensDataSeeder as aE, AXCUserPassStrategyMock as aF, AXCVersionDB as aG, AXCVersioningService as aH, AXCWidgetCatalogDataSeeder as aI, AXCWorkflowCategorySeeder as aJ, AXCWorkflowDefinitionDataSeeder as aK, AXCWorkflowEngine as aL, AXCWorkflowExecutionDB as aM, AXCWorkflowExecutionStoreDexie as aN, AXCWorkflowExecutionStoreFirestore as aO, AXCWorkflowInstanceCartableDemoSeeder as aP, AXCWorkflowManagementMockModule as aQ, AXC_ENTITY_STORAGE_BACKEND_TYPE as aR, AXC_FIRESTORE_CONFIG as aS, AXC_FIRESTORE_DB as aT, AXC_WORKFLOW_EXECUTION_STORE as aU, AXMAiDemisAssistAgentUuid as aV, AXMAiDemisAssistId as aW, AXMAiDemisGeneralAssistId as aX, AXMAiPlatformAssistantAssistId as aY, AXMAutomationDataSeeder as aZ, AXMBusinessUnitDataSeeder as a_, AXCLocaleManagementMockModule as aa, AXCLocationManagementMockModule as ab, AXCLockService as ac, AXCMeasurementCoreMockModule as ad, AXCMeetingManagementMockModule as ae, AXCMetaDataDefinitionDataSeeder as af, AXCMetadataCategorySeeder as ag, AXCMiddlewaresModule as ah, AXCMockCaptchaChallengeComponent as ai, AXCMockEntityLogListener as aj, AXCMockModule as ak, AXCMockShowMetaDataFormPopupCommand as al, AXCNotificationManagementMockModule as am, AXCOrderManagementMockModule as an, AXCOrganizationManagementMockModule as ao, AXCPersonCoreMockModule as ap, AXCPlatformManagementMockModule as aq, AXCProcurementManagementMockModule as ar, AXCProductCatalogMockModule as as, AXCProjectManagementMockModule as at, AXCQueryRegistryDataSeeder as au, AXCReportManagementMockModule as av, AXCSecurityManagementMockModule as aw, AXCStoredEntityDefinitionLoader as ax, AXCSubscriptionManagementMockModule as ay, AXCSupplierManagementMockModule as az, resolveAssistSpeechModelId as b, FINANCE_ENTERPRISE as b$, AXMDashboardChartDataSourceDefinition as b0, AXMEmployeeDataSeeder as b1, AXMEmploymentTypeDataSeeder as b2, AXMFormDataSourcesProvider as b3, AXMJobDefinitionDataSeeder as b4, AXMJobLevelDataSeeder as b5, AXMLeaveRequestDataSeeder as b6, AXMMeetingDataSeeder as b7, AXMMeetingFilesDataSeeder as b8, AXMMeetingParticipantDataSeeder as b9, AXPMockIdentifierService as bA, AXPMockLookupProvider as bB, AXPMockPolicyProvider as bC, AXPMockSequenceProvider as bD, AXPRoomDataSeeder as bE, AXPSecurityManagementRoleDataSeeder as bF, AXPSecurityManagementUserDataSeeder as bG, AXPTaskBoardPlatformManagementTaskProvider as bH, AXPTaskBoardProjectManagementTaskProvider as bI, AXVChangeType as bJ, BCC as bK, BOC as bL, BUSINESS_UNITS_MOCK as bM, CHAT_LAST_MESSAGE_IDS as bN, COLLABORATION_STANDARD as bO, COSTMANAGER_ENTERPRISE as bP, COSTMANAGER_PROFESSIONAL as bQ, COSTMANAGER_STANDARD as bR, CP as bS, CRM_ENTERPRISE as bT, DASHBOARDS as bU, EDITIONS as bV, EMPLOYEES_MOCK as bW, EMPLOYMENT_TYPES_MOCK as bX, ENTITY_DEFINITION_MAP as bY, ENTITY_REGISTRY as bZ, FINANCE_BASIC as b_, AXMMeetingRoleTypeDataSeeder as ba, AXMMeetingSessionDataSeeder as bb, AXMMeetingTypeDataSeeder as bc, AXMMeetingTypeFileTemplateDataSeeder as bd, AXMPositionAssignmentDataSeeder as be, AXMPositionDataSeeder as bf, AXMQuestionBankItemCategoryDataSeeder as bg, AXMQuestionBankItemDataSeeder as bh, AXMQuestionnaireCalculationDataSeeder as bi, AXMQuestionnaireCategoryDataSeeder as bj, AXMQuestionnaireDataSeeder as bk, AXMResponsibilityDataSeeder as bl, AXMTagDataSeeder as bm, AXMTeamBusinessUnitDataSeeder as bn, AXMTeamDataSeeder as bo, AXMTeamMemberDataSeeder as bp, AXMTeamMemberRoleDataSeeder as bq, AXMWorkflowDashboardChartDataSourceDefinition as br, AXM_AI_REGISTRY_COMMAND_NAME as bs, AXM_AI_REGISTRY_QUERY_NAME as bt, AXM_CORPORATE_BUSINESS_UNIT_ID as bu, AXPDashboardDataSeeder as bv, AXPIdentifierDB as bw, AXPMessageDataSeeder as bx, AXPMockChecksumProvider as by, AXPMockClockProvider as bz, resolveDelegatedAssistOptionString as c, WS as c$, FINANCE_PRO as c0, G as c1, HR_ENTERPRISE as c2, HW as c3, JOB_DEFINITIONS_CATEGORY_MOCK as c4, JOB_DEFINITIONS_MOCK as c5, JOB_DEFINITION_CATEGORY_KEY_TO_ID as c6, JOB_LEVELS_MOCK as c7, LASER_PLUMBING_TENANT_ID as c8, LEAVE_REQUESTS_MOCK as c9, QWS as cA, RESPONSIBILITIES_CATEGORY_MOCK as cB, RESPONSIBILITIES_MOCK as cC, RESPONSIBILITY_CATEGORY_KEY_TO_ID as cD, SAFETYMINDER_BASIC as cE, SAFETYMINDER_ENTERPRISE as cF, SAFETYMINDER_PROFESSIONAL as cG, SHOP_BASIC as cH, SHOP_ENTERPRISE as cI, SHOP_PRO as cJ, TAGS_MOCK as cK, TASKS as cL, TASK_STATUSES as cM, TASK_TEMPLATES as cN, TASK_TYPES as cO, TEAMS_CATEGORY_MOCK as cP, TEAMS_MOCK as cQ, TEAM_BUSINESS_UNITS_MOCK as cR, TEAM_CATEGORY_KEY_TO_ID as cS, TEAM_MEMBERS_MOCK as cT, TEAM_MEMBER_ROLES_MOCK as cU, TIMEPLICITY_TENANT_ID as cV, TLA as cW, TOKENS as cX, TPC as cY, VISIBILITY_FILTER_BYPASS as cZ, WORKFLOW_CATEGORIES as c_, MAGFA_COMMERCE_STANDARD as ca, MAGFA_CONVERSATION_DASHBOARD as cb, MAGFA_TENANT_ID as cc, METADATA_CATEGORY_IDS as cd, METADATA_GENERAL_CATEGORY_REFS as ce, METADATA_SYSTEM_CATEGORY_REFS as cf, MLC as cg, OHR as ch, ORDERING_BASIC as ci, ORDERING_ENTERPRISE as cj, ORDERING_STANDARD as ck, OWNERSHIP_FILTER_BYPASS as cl, PLATFORM_CONSOLE as cm, PLATFORM_TENANT_ID as cn, PM as co, POSITIONS_CATEGORY_MOCK as cp, POSITIONS_MOCK as cq, POSITION_ASSIGNMENTS_MOCK as cr, QCP as cs, QGEN as ct, QHW as cu, QOHR as cv, QPM as cw, QTLE as cx, QUESTIONNAIRE_CATEGORY_MOCK as cy, QUESTION_BANK_ITEM_CATEGORY_MOCK as cz, axcSyncSingleEmployeeDenormalizedOrgFields as d, meetingRoleTypeMock as d$, activityCategoryMocks as d0, activityDefinitionEntityMock as d1, applyEntityDefinitionFirestoreSnapshot as d2, automationCommandMiddleware as d3, automationMock as d4, avatarInterface as d5, awaitConversationMockSharedStorage as d6, axVersionDB as d7, axWorkflowExecutionDB as d8, axcPatchEmployeeActivePrimaryBusinessUnitRefsFromRows as d9, createWorkflowDefinitionEntityMock as dA, dateInterface as dB, dateTimeInterface as dC, descriptionInterface as dD, documentFolderSyncMiddleware as dE, emailInterface as dF, entityDefDb as dG, entityValidationMiddleware as dH, fileUploaderInterface as dI, finalizeActivityCategoryItemCounts as dJ, findEmployeeById as dK, folderStorageMiddleware as dL, groupOrderItemCalculatorMiddleware as dM, historyMiddleware as dN, identifierCommitMiddleware as dO, imageInterface as dP, inspectionOkXNaInterface as dQ, loadMockPropertyDefinitions as dR, lockGuardMiddleware as dS, longTextAnswerInterface as dT, lookupInterface as dU, lookupResolverMiddleware as dV, mapInterface as dW, meetingFilesMock as dX, meetingIds as dY, meetingMock as dZ, meetingParticipantMock as d_, axcPatchEmployeeActivePrimaryPositionRefsFromRows as da, axcPatchEmployeeManagerRefsFromRows as db, axcResolveCommandRegistrySeedId as dc, axcResolveQueryRegistrySeedId as dd, axcResolveWidgetCatalogSeedId as de, bankCategory as df, buildEntityStorageQuickSearchFilter as dg, buildWorkflowInstanceCartableDemoRows as dh, bypassAllFilters as di, bypassOwnershipFilter as dj, bypassVisibilityFilter as dk, calendarEventMock as dl, calendarEventTypeMockData as dm, calendarMock as dn, chatMessageMock as dp, chatMock as dq, checkboxInterface as dr, childCountMiddleware as ds, clearEntityDefinitionFirestoreCollections as dt, colorInterface as du, computeDiff as dv, contactInterface as dw, conversationDemoSeedUserIds as dx, createFileCastMiddleware as dy, createWidgetLayoutConfig as dz, ACTIVITY_CATEGORIES as e, meetingSessionMock as e0, meetingTimeSlotMock as e1, meetingTypeFileTemplateMock as e2, meetingTypeMock as e3, mergeDetailRelationMiddleware as e4, mergeQuickSearchIntoRequest as e5, metadataCategoryMocks as e6, mockParticipantIndexForSecurityUserId as e7, mockQuestionBankItemByName as e8, mockRoleDefinitions as e9, selectionListInterface as eA, sexAtBirthInterface as eB, signatureInterface as eC, signatureLoaderMiddleware as eD, statusDefaultMiddleware as eE, tagInterface as eF, tenantMocks as eG, textAreaInterface as eH, textInterface as eI, timeDurationInterface as eJ, titleInterface as eK, toUiRows as eL, toggleInterface as eM, tokenCategoryIds as eN, tokenCategoryMocks as eO, urlInterface as eP, versionInterface as eQ, visibilityFilterMiddleware as eR, workflowDefinitionEntityMock as eS, workflowDefinitionIds as eT, workflowDefinitionMock as eU, yesNoInterface as eV, multipleChoiceInterface as ea, multipleSelectInterface as eb, normalizeAnyFileArrayForView as ec, normalizeSnapshotFileFieldsForView as ed, numberInterface as ee, parseEntityStorageInsertData as ef, parseEntityStorageQueryRequest as eg, participantIds as eh, participantMock as ei, passwordInterface as ej, personIdentifierTypeMock as ek, personIds as el, personLegalIds as em, personMock as en, personNaturalIds as eo, phoneInterface as ep, primaryMiddleware as eq, provideMockPropertySetups as er, qrcodeInterface as es, questionBankItemMock as et, questionnaireCalculationMock as eu, questionnaireMock as ev, ratingInterface as ew, richTextInterface as ex, scaleInterface as ey, selectInterface as ez, ACTIVITY_CATEGORY_ID_BY_KEY as f, ACTIVITY_DEFINITIONS as g, AI_ASSIST_MOCK as h, AI_MODEL_MOCK as i, APPLICATIONS as j, APPLICATION_CATEGORY_IDS as k, APPLICATION_CATEGORY_MOCKS as l, mockUsers as m, AXCActivityCategorySeeder as n, AXCActivityDefinitionSeeder as o, AXCAiAssistSeeder as p, AXCAiManagementMockModule as q, resolveDelegatedAssistOptionModel as r, AXCAiModelSeeder as s, AXCAppTermDataSeeder as t, AXCAppVersionDataSeeder as u, AXCApplicationCategoryDataSeeder as v, AXCApplicationDataSeeder as w, AXCApplicationManagementMockModule as x, AXCAssessmentManagementMockModule as y, AXCAssetManagementMockModule as z };
81777
- //# sourceMappingURL=acorex-connectivity-mock-acorex-connectivity-mock-DBwcu-v0.mjs.map
82243
+ //# sourceMappingURL=acorex-connectivity-mock-acorex-connectivity-mock-SjZSega-.mjs.map