@acorex-platform/module-location-management-client 0.0.18 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DmpN-yas.mjs → acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DECKrIBR.mjs} +13 -14
- package/fesm2022/acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DECKrIBR.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-location-management-client-contracts.mjs +57 -2400
- package/fesm2022/acorex-platform-module-location-management-client-contracts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-location-management-client-create-location-with-assignment.command-D6VXtZRf.mjs → acorex-platform-module-location-management-client-create-location-with-assignment.command-Cl6KfruM.mjs} +17 -18
- package/fesm2022/acorex-platform-module-location-management-client-create-location-with-assignment.command-Cl6KfruM.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-location-management-client.mjs +141 -395
- package/fesm2022/acorex-platform-module-location-management-client.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-module-location-management-client-contracts.d.ts +50 -47
- package/types/acorex-platform-module-location-management-client.d.ts +3 -14
- package/fesm2022/acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DmpN-yas.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-location-management-client-create-location-with-assignment.command-D6VXtZRf.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import { AXPEntityAction, AXPEntityProperty, AXPQueryFilter,
|
|
1
|
+
import { AXPEntityAction, AXPEntityProperty, AXPQueryFilter, AXPEntityModel } from '@acorex-platform/framework-shared/entity';
|
|
2
2
|
import { AXPMultiLanguageString, AXPEntityReference } from '@acorex-platform/framework-shared/core';
|
|
3
3
|
|
|
4
|
-
/** Location Management datasource registry names. */
|
|
5
|
-
declare const AXMLocationManagementDataSourceKeys: {
|
|
6
|
-
readonly Countries: "countries";
|
|
7
|
-
readonly Provinces: "provinces";
|
|
8
|
-
readonly Cities: "cities";
|
|
9
|
-
};
|
|
10
|
-
|
|
11
4
|
declare const AXMLocationManagementFeatureKeys: {};
|
|
12
5
|
|
|
13
6
|
/** Read-only assignments list on Location detail (no create/update/delete). */
|
|
@@ -79,36 +72,57 @@ declare const AXPLocationManagementMenuKeys: {
|
|
|
79
72
|
readonly GeographicRegions: "location-management:menu:geographic-regions";
|
|
80
73
|
};
|
|
81
74
|
|
|
75
|
+
/**
|
|
76
|
+
* People & Organization capabilities used by this module.
|
|
77
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
78
|
+
*/
|
|
79
|
+
declare const AXPPeopleOrganizationPermissionKeys: {
|
|
80
|
+
readonly Access: "PeopleOrganization:Permission:Access";
|
|
81
|
+
readonly ViewOrganization: "PeopleOrganization:Permission:ViewOrganization";
|
|
82
|
+
readonly MaintainOrganization: "PeopleOrganization:Permission:MaintainOrganization";
|
|
83
|
+
readonly MaintainTeams: "PeopleOrganization:Permission:MaintainTeams";
|
|
84
|
+
readonly MaintainEmployees: "PeopleOrganization:Permission:MaintainEmployees";
|
|
85
|
+
readonly ManageEmployeeActions: "PeopleOrganization:Permission:ManageEmployeeActions";
|
|
86
|
+
readonly MaintainPersons: "PeopleOrganization:Permission:MaintainPersons";
|
|
87
|
+
readonly MaintainAttendance: "PeopleOrganization:Permission:MaintainAttendance";
|
|
88
|
+
readonly ManageAttendanceActions: "PeopleOrganization:Permission:ManageAttendanceActions";
|
|
89
|
+
readonly DesignJobs: "PeopleOrganization:Permission:DesignJobs";
|
|
90
|
+
readonly Setup: "PeopleOrganization:Permission:Setup";
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated Prefer {@link AXPPeopleOrganizationPermissionKeys}.
|
|
94
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
95
|
+
*/
|
|
82
96
|
declare const AXMLocationManagementPermissionsKeys: {
|
|
83
|
-
LocationManagement: {
|
|
84
|
-
Management:
|
|
85
|
-
Locations: {
|
|
86
|
-
Management:
|
|
87
|
-
View:
|
|
88
|
-
Edit:
|
|
89
|
-
Delete:
|
|
90
|
-
Create:
|
|
97
|
+
readonly LocationManagement: {
|
|
98
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
99
|
+
readonly Locations: {
|
|
100
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
101
|
+
readonly View: "PeopleOrganization:Permission:Setup";
|
|
102
|
+
readonly Edit: "PeopleOrganization:Permission:Setup";
|
|
103
|
+
readonly Delete: "PeopleOrganization:Permission:Setup";
|
|
104
|
+
readonly Create: "PeopleOrganization:Permission:Setup";
|
|
91
105
|
};
|
|
92
|
-
LocationTypes: {
|
|
93
|
-
Management:
|
|
94
|
-
View:
|
|
95
|
-
Edit:
|
|
96
|
-
Delete:
|
|
97
|
-
Create:
|
|
106
|
+
readonly LocationTypes: {
|
|
107
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
108
|
+
readonly View: "PeopleOrganization:Permission:Setup";
|
|
109
|
+
readonly Edit: "PeopleOrganization:Permission:Setup";
|
|
110
|
+
readonly Delete: "PeopleOrganization:Permission:Setup";
|
|
111
|
+
readonly Create: "PeopleOrganization:Permission:Setup";
|
|
98
112
|
};
|
|
99
|
-
LocationRoles: {
|
|
100
|
-
Management:
|
|
101
|
-
View:
|
|
102
|
-
Edit:
|
|
103
|
-
Delete:
|
|
104
|
-
Create:
|
|
113
|
+
readonly LocationRoles: {
|
|
114
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
115
|
+
readonly View: "PeopleOrganization:Permission:Setup";
|
|
116
|
+
readonly Edit: "PeopleOrganization:Permission:Setup";
|
|
117
|
+
readonly Delete: "PeopleOrganization:Permission:Setup";
|
|
118
|
+
readonly Create: "PeopleOrganization:Permission:Setup";
|
|
105
119
|
};
|
|
106
|
-
GeographicRegions: {
|
|
107
|
-
Management:
|
|
108
|
-
View:
|
|
109
|
-
Edit:
|
|
110
|
-
Delete:
|
|
111
|
-
Create:
|
|
120
|
+
readonly GeographicRegions: {
|
|
121
|
+
readonly Management: "PeopleOrganization:Permission:Setup";
|
|
122
|
+
readonly View: "PeopleOrganization:Permission:Setup";
|
|
123
|
+
readonly Edit: "PeopleOrganization:Permission:Setup";
|
|
124
|
+
readonly Delete: "PeopleOrganization:Permission:Setup";
|
|
125
|
+
readonly Create: "PeopleOrganization:Permission:Setup";
|
|
112
126
|
};
|
|
113
127
|
};
|
|
114
128
|
};
|
|
@@ -156,10 +170,8 @@ declare const RootConfig: {
|
|
|
156
170
|
};
|
|
157
171
|
};
|
|
158
172
|
|
|
159
|
-
declare function geographicRegionFactory(): Promise<AXPEntity | null>;
|
|
160
|
-
|
|
161
173
|
interface AXMLocationManagementGeographicRegionEntityModel extends AXPEntityModel<string> {
|
|
162
|
-
title:
|
|
174
|
+
title: AXPMultiLanguageString;
|
|
163
175
|
code?: string;
|
|
164
176
|
type: string;
|
|
165
177
|
parentId?: string;
|
|
@@ -184,8 +196,6 @@ interface GeographicRegionHierarchy {
|
|
|
184
196
|
district?: AXMLocationManagementGeographicRegionEntityModel;
|
|
185
197
|
}
|
|
186
198
|
|
|
187
|
-
declare function locationFactory(): Promise<AXPEntity | null>;
|
|
188
|
-
|
|
189
199
|
interface AXMLocationManagementLocationEntityModel extends AXPEntityModel<string> {
|
|
190
200
|
title: string;
|
|
191
201
|
code?: string;
|
|
@@ -216,8 +226,6 @@ interface AXMLocationManagementLocationEntityModel extends AXPEntityModel<string
|
|
|
216
226
|
fullAddress?: string;
|
|
217
227
|
}
|
|
218
228
|
|
|
219
|
-
declare function locationAssignmentFactory(): Promise<AXPEntity>;
|
|
220
|
-
|
|
221
229
|
interface AXMLocationManagementLocationAssignmentEntityModel extends AXPEntityModel<string> {
|
|
222
230
|
locationId: string;
|
|
223
231
|
ownerRef: AXPEntityReference;
|
|
@@ -252,16 +260,11 @@ interface AXMLocationManagementLocationAssignmentEntityModel extends AXPEntityMo
|
|
|
252
260
|
};
|
|
253
261
|
}
|
|
254
262
|
|
|
255
|
-
declare function locationRoleFactory(): Promise<AXPEntity>;
|
|
256
|
-
|
|
257
263
|
interface AXMLocationManagementLocationRoleEntityModel extends AXPEntityModel<string> {
|
|
258
|
-
name: string;
|
|
259
264
|
title: string;
|
|
260
265
|
description?: string | null;
|
|
261
266
|
}
|
|
262
267
|
|
|
263
|
-
declare function locationTypeFactory(): Promise<AXPEntity | null>;
|
|
264
|
-
|
|
265
268
|
interface AXMLocationManagementLocationTypeEntityModel extends AXPEntityModel<string> {
|
|
266
269
|
title: string;
|
|
267
270
|
description?: string;
|
|
@@ -270,5 +273,5 @@ interface AXMLocationManagementLocationTypeEntityModel extends AXPEntityModel<st
|
|
|
270
273
|
isActive: boolean;
|
|
271
274
|
}
|
|
272
275
|
|
|
273
|
-
export {
|
|
276
|
+
export { AXMLocationManagementFeatureKeys, AXMLocationManagementPermissionsKeys, AXPLocationManagementMenuKeys, AXPPeopleOrganizationPermissionKeys, LOCATION_ASSIGNMENT_LOCATION_PROPERTY_NAMES, LOCATION_ASSIGNMENT_PARTY_TYPE, LOCATION_ASSIGNMENT_REF_PROPERTY_NAMES, RootConfig, buildLocationAssignmentLocationSnapshot, buildLocationAssignmentPersonSnapshot, createLocationAssignmentOwnerRefLookupProperty, createLocationAssignmentOwnerRefTypeProperty, locationAssignmentDetailsCrudActionsForPartyContext, locationAssignmentLocationConditions, locationAssignmentPartyConditions, locationAssignmentReadOnlyRelatedActions, omitLocationAssignmentLocationFromEditLayouts, omitLocationAssignmentRefFromEditLayouts, resolveLocationAssignmentDisplayTitle };
|
|
274
277
|
export type { AXMLocationManagementGeographicRegionEntityModel, AXMLocationManagementLocationAssignmentEntityModel, AXMLocationManagementLocationEntityModel, AXMLocationManagementLocationRoleEntityModel, AXMLocationManagementLocationTypeEntityModel, GeographicRegionHierarchy };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import * as i1 from '@angular/common';
|
|
3
3
|
import * as i2 from '@acorex-platform/framework-client/layout/widget-core';
|
|
4
|
-
import { AXPEntity } from '@acorex-platform/framework-shared/entity';
|
|
5
|
-
import { AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader, AXPEntityPreloadEntity } from '@acorex-platform/framework-client/layout/entity';
|
|
6
4
|
import { AXPMenuProvider, AXPMenuProviderContext, AXPSearchCommandProvider, AXPSearchResult, AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext, AXPGeoLocation } from '@acorex-platform/framework-client/common';
|
|
7
5
|
|
|
8
6
|
declare class AXMLocationManagementModule {
|
|
@@ -11,17 +9,6 @@ declare class AXMLocationManagementModule {
|
|
|
11
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<AXMLocationManagementModule>;
|
|
12
10
|
}
|
|
13
11
|
|
|
14
|
-
declare class AXMLocationManagementEntityProvider implements AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader {
|
|
15
|
-
preload(): AXPEntityPreloadEntity[];
|
|
16
|
-
get(moduleName: string, entityName: string): Promise<AXPEntity | null>;
|
|
17
|
-
list(): Promise<{
|
|
18
|
-
name: string;
|
|
19
|
-
module: string;
|
|
20
|
-
}[]>;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXMLocationManagementEntityProvider, never>;
|
|
22
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXMLocationManagementEntityProvider>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
12
|
declare class AXMLocationManagementMenuProvider implements AXPMenuProvider {
|
|
26
13
|
private entityService;
|
|
27
14
|
provide(context: AXPMenuProviderContext): Promise<void>;
|
|
@@ -39,6 +26,7 @@ declare class AXMSettingProvider implements AXPSettingDefinitionProvider {
|
|
|
39
26
|
|
|
40
27
|
declare class AXMLocationManagementService {
|
|
41
28
|
private readonly entityService;
|
|
29
|
+
private readonly translationService;
|
|
42
30
|
private readonly geographicRegionDataAccessor;
|
|
43
31
|
getCountries(): Promise<AXPGeoLocation[]>;
|
|
44
32
|
getProvinces(countryId?: string): Promise<AXPGeoLocation[]>;
|
|
@@ -46,8 +34,9 @@ declare class AXMLocationManagementService {
|
|
|
46
34
|
countryId?: string;
|
|
47
35
|
provinceId?: string;
|
|
48
36
|
}): Promise<AXPGeoLocation[]>;
|
|
37
|
+
private toGeoLocation;
|
|
49
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXMLocationManagementService, never>;
|
|
50
39
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXMLocationManagementService>;
|
|
51
40
|
}
|
|
52
41
|
|
|
53
|
-
export {
|
|
42
|
+
export { AXMLocationManagementMenuProvider, AXMLocationManagementModule, AXMLocationManagementService, AXMSearchCommandProvider, AXMSettingProvider };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DmpN-yas.mjs","sources":["../../../../libs/modules/location-management/client/src/lib/commands/assign-existing-location-to-party.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\nimport { get } from 'lodash';\nimport {\n AXPEntityDataSelectorService,\n AXPEntityDefinitionRegistryService,\n AXPEntityFormBuilderService,\n} from '@acorex-platform/framework-client/layout/entity';\n\nimport { RootConfig, LOCATION_ASSIGNMENT_PARTY_TYPE, resolveLocationAssignmentDisplayTitle, buildLocationAssignmentLocationSnapshot, buildLocationAssignmentPersonSnapshot } from '@acorex-platform/module-location-management-client/contracts';\nimport { AXPCommand } from '@acorex-platform/framework-shared/runtime';\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMLocationAssignmentAssignExistingLocationCommand implements AXPCommand<any, any> {\n private readonly entityDataSelector = inject(AXPEntityDataSelectorService);\n private readonly entityForm = inject(AXPEntityFormBuilderService);\n private readonly entityService = inject(AXPEntityDefinitionRegistryService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: any): Promise<AXPExecuteCommandResult<any>> {\n const { entity, data, options, hostContext } = (input?.__context__ ?? input ?? {}) as {\n entity: string;\n data: Record<string, unknown>;\n hostContext?: Record<string, unknown>;\n options: { process?: { data?: Record<string, unknown> } };\n };\n\n const processData = {\n ...(hostContext ?? {}),\n ...(data ?? {}),\n ...(options?.process?.data ?? {}),\n };\n const ownerRef = this.resolveOwnerRef(processData);\n if (!ownerRef.id) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@location-management:location-assignments.messages.missing-party-context',\n ),\n },\n };\n }\n\n const [moduleName, entityName] = (entity || '').split('.');\n if (!moduleName || !entityName) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-identifier'),\n },\n };\n }\n\n const locationEntity = await this.entityService.resolve(\n RootConfig.module.name,\n RootConfig.entities.location.name,\n );\n if (!locationEntity) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-identifier'),\n },\n };\n }\n\n const selectorTitle = await this.translationService.translateAsync(\n '@location-management:location-assignments.actions.assign-existing-location.selector-title',\n );\n const selectorResult = await this.entityDataSelector.open({\n entity: locationEntity,\n title: selectorTitle,\n allowMultiple: false,\n columns: ['title', 'code', 'street1', 'cityId', 'countryId'],\n });\n\n if (!selectorResult?.items?.length) {\n return { success: false };\n }\n\n const selectedLocation = selectorResult.items[0];\n const locationId = selectedLocation.id ?? selectedLocation._id;\n const locationSnapshot = buildLocationAssignmentLocationSnapshot(\n selectedLocation as Record<string, unknown>,\n locationId as string,\n );\n\n const formTitle = await this.translationService.translateAsync(\n '@location-management:location-assignments.actions.assign-existing-location.form-title',\n { params: { partyTitle: ownerRef.title } },\n );\n\n const result = await this.entityForm\n .entity(`${moduleName}.${entityName}`)\n .create({\n locationId,\n location: locationSnapshot,\n ownerRef,\n })\n .include('roleId', 'personId', 'notes')\n .title(formTitle)\n .actions((actions) => {\n actions.cancel('@general:actions.cancel.title');\n actions.submit('@general:actions.create.title');\n })\n .onAction<AXPExecuteCommandResult<any>>(async (dialogRef) => {\n if (dialogRef.action() === 'cancel') {\n return { success: false };\n }\n\n const locationAssignmentEntity = await this.entityService.resolve(moduleName, entityName);\n const createFn = locationAssignmentEntity?.commands?.create?.execute as\n | ((payload: unknown) => Promise<AXPExecuteCommandResult<any>>)\n | undefined;\n\n if (!createFn) {\n const msg = await this.translationService.translateAsync(\n '@general:messages.entity.create-command-unavailable',\n );\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: msg,\n });\n throw new Error(msg);\n }\n\n dialogRef.setLoading(true);\n try {\n const context = dialogRef.context();\n const personId = (context['personId'] ?? get(context, 'person.id')) as string | undefined;\n const personInContext = get(context, 'person') as Record<string, unknown> | undefined;\n const personSnapshot =\n personId && personInContext\n ? buildLocationAssignmentPersonSnapshot({ ...personInContext, id: personId }, personId)\n : undefined;\n\n const payload = {\n ...context,\n locationId,\n ownerRef,\n location: locationSnapshot,\n ...(personId ? { personId, person: personSnapshot } : {}),\n };\n const createResult = await createFn(payload);\n if (createResult?.data ?? createResult) {\n return {\n success: true,\n data: createResult?.data ?? createResult,\n message: {\n text: await this.translationService.translateAsync('@general:messages.generic.success.description'),\n },\n };\n }\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.create-failed'),\n },\n };\n } catch (error: unknown) {\n const errorMsg =\n error instanceof Error\n ? error.message\n : await this.translationService.translateAsync('@general:messages.entity.create-failed');\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: errorMsg,\n });\n throw error;\n } finally {\n dialogRef.setLoading(false);\n }\n })\n .show();\n\n return result as unknown as AXPExecuteCommandResult<any>;\n }\n\n private resolveOwnerRef(processData: Record<string, unknown>) {\n const nestedOwner = get(processData, 'ownerRef') as { type?: string; id?: string; title?: unknown } | undefined;\n const locale = this.translationService.getActiveLang?.() ?? 'en-US';\n\n return {\n type: (processData['ownerRef.type'] as string) ?? nestedOwner?.type ?? LOCATION_ASSIGNMENT_PARTY_TYPE,\n id: (processData['ownerRef.id'] as string) ?? nestedOwner?.id ?? '',\n title: resolveLocationAssignmentDisplayTitle(\n locale,\n processData['ownerRef.title'],\n nestedOwner?.title,\n get(processData, 'party.title'),\n get(processData, 'title'),\n ),\n };\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AAAA;AAgBA;AAEA;MAGa,kDAAkD,CAAA;AAD/D,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,4BAA4B,CAAC;AACzD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,2BAA2B,CAAC;AAChD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,kCAAkC,CAAC;AAC1D,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAoLnE,IAAA;IAlLC,MAAM,OAAO,CAAC,KAAU,EAAA;AACtB,QAAA,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,KAAK,EAAE,WAAW,IAAI,KAAK,IAAI,EAAE,CAKhF;AAED,QAAA,MAAM,WAAW,GAAG;AAClB,YAAA,IAAI,WAAW,IAAI,EAAE,CAAC;AACtB,YAAA,IAAI,IAAI,IAAI,EAAE,CAAC;YACf,IAAI,OAAO,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC;SAClC;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC;AAClD,QAAA,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;YAChB,OAAO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AC7B,WAAW,EAAE,KAAK,EAClB,GAAG,CAAC,WAAW,EAAE,aAAa,CAAC,EAC/B,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAC1B;SACF;IACH;8GAxLW,kDAAkD,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlD,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kDAAkD,cADrC,MAAM,EAAA,CAAA,CAAA;;2FACnB,kDAAkD,EAAA,UAAA,EAAA,CAAA;kBAD9D,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-location-management-client-create-location-with-assignment.command-D6VXtZRf.mjs","sources":["../../../../libs/modules/location-management/client/src/lib/commands/create-location-with-assignment.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\nimport { get } from 'lodash';\nimport { AXPEntityDefinitionRegistryService, AXPEntityFormBuilderService } from '@acorex-platform/framework-client/layout/entity';\n\nimport { RootConfig, LOCATION_ASSIGNMENT_PARTY_TYPE, resolveLocationAssignmentDisplayTitle, buildLocationAssignmentLocationSnapshot, buildLocationAssignmentPersonSnapshot } from '@acorex-platform/module-location-management-client/contracts';\nimport { AXPCommand } from '@acorex-platform/framework-shared/runtime';\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMLocationAssignmentCreateWithNewLocationCommand implements AXPCommand<any, any> {\n private readonly entityForm = inject(AXPEntityFormBuilderService);\n private readonly entityService = inject(AXPEntityDefinitionRegistryService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(input: any): Promise<AXPExecuteCommandResult<any>> {\n const { entity, data, options, hostContext } = (input?.__context__ ?? input ?? {}) as {\n entity: string;\n data: Record<string, unknown>;\n hostContext?: Record<string, unknown>;\n options: { process?: { data?: Record<string, unknown> } };\n };\n\n const processData = {\n ...(hostContext ?? {}),\n ...(data ?? {}),\n ...(options?.process?.data ?? {}),\n };\n const ownerRef = this.resolveOwnerRef(processData);\n if (!ownerRef.id) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@location-management:location-assignments.messages.missing-party-context',\n ),\n },\n };\n }\n\n const [assignmentModuleName, assignmentEntityName] = (entity || '').split('.');\n if (!assignmentModuleName || !assignmentEntityName) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.invalid-identifier'),\n },\n };\n }\n\n const locationDialogTitle = await this.translationService.translateAsync(\n '@location-management:location-assignments.actions.create-with-new-location.location-dialog-title',\n );\n\n const locationResult = (await this.entityForm\n .entity(`${RootConfig.module.name}.${RootConfig.entities.location.name}`)\n .create({})\n .title(locationDialogTitle)\n .actions((actions) => {\n actions.cancel('@general:actions.cancel.title');\n actions.submit('@general:actions.create.title');\n })\n .onAction<AXPExecuteCommandResult<any>>(async (dialogRef) => {\n if (dialogRef.action() === 'cancel') {\n return { success: false };\n }\n\n const locationEntity = await this.entityService.resolve(\n RootConfig.module.name,\n RootConfig.entities.location.name,\n );\n const createLocationFn = locationEntity?.commands?.create?.execute as\n | ((payload: unknown) => Promise<AXPExecuteCommandResult<any>>)\n | undefined;\n\n if (!createLocationFn) {\n const msg = await this.translationService.translateAsync(\n '@general:messages.entity.create-command-unavailable',\n );\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: msg,\n });\n throw new Error(msg);\n }\n\n dialogRef.setLoading(true);\n try {\n const context = dialogRef.context();\n const createResult = await createLocationFn(context);\n const locationRow = createResult?.data ?? createResult;\n if (!locationRow?.id && !locationRow?._id) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.create-failed'),\n },\n };\n }\n return { success: true, data: locationRow };\n } catch (error: unknown) {\n const errorMsg =\n error instanceof Error\n ? error.message\n : await this.translationService.translateAsync('@general:messages.entity.create-failed');\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: errorMsg,\n });\n throw error;\n } finally {\n dialogRef.setLoading(false);\n }\n })\n .show()) as unknown as AXPExecuteCommandResult<any>;\n\n if (!locationResult?.success || !locationResult.data) {\n return { success: false };\n }\n\n const locationRow = locationResult.data as Record<string, unknown>;\n const locationId = (locationRow['id'] ?? locationRow['_id']) as string;\n const locationSnapshot = buildLocationAssignmentLocationSnapshot(locationRow, locationId);\n\n const assignmentFormTitle = await this.translationService.translateAsync(\n '@location-management:location-assignments.actions.create-with-new-location.assignment-dialog-title',\n );\n\n const assignmentResult = (await this.entityForm\n .entity(`${assignmentModuleName}.${assignmentEntityName}`)\n .create({\n locationId,\n location: locationSnapshot,\n ownerRef,\n })\n .include('roleId', 'personId', 'notes')\n .title(assignmentFormTitle)\n .actions((actions) => {\n actions.cancel('@general:actions.cancel.title');\n actions.submit('@general:actions.create.title');\n })\n .onAction<AXPExecuteCommandResult<any>>(async (dialogRef) => {\n if (dialogRef.action() === 'cancel') {\n return { success: false };\n }\n\n const locationAssignmentEntity = await this.entityService.resolve(\n assignmentModuleName,\n assignmentEntityName,\n );\n const createAssignmentFn = locationAssignmentEntity?.commands?.create?.execute as\n | ((payload: unknown) => Promise<AXPExecuteCommandResult<any>>)\n | undefined;\n\n if (!createAssignmentFn) {\n const msg = await this.translationService.translateAsync(\n '@general:messages.entity.create-command-unavailable',\n );\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: msg,\n });\n throw new Error(msg);\n }\n\n dialogRef.setLoading(true);\n try {\n const context = dialogRef.context();\n const personId = (context['personId'] ?? get(context, 'person.id')) as string | undefined;\n const personInContext = get(context, 'person') as Record<string, unknown> | undefined;\n const personSnapshot =\n personId && personInContext\n ? buildLocationAssignmentPersonSnapshot({ ...personInContext, id: personId }, personId)\n : undefined;\n\n const createResult = await createAssignmentFn({\n ...context,\n locationId,\n ownerRef,\n location: locationSnapshot,\n ...(personId ? { personId, person: personSnapshot } : {}),\n });\n if (createResult?.data ?? createResult) {\n return {\n success: true,\n data: createResult?.data ?? createResult,\n message: {\n text: await this.translationService.translateAsync('@general:messages.generic.success.description'),\n },\n };\n }\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync('@general:messages.entity.create-failed'),\n },\n };\n } catch (error: unknown) {\n const errorMsg =\n error instanceof Error\n ? error.message\n : await this.translationService.translateAsync('@general:messages.entity.create-failed');\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: errorMsg,\n });\n throw error;\n } finally {\n dialogRef.setLoading(false);\n }\n })\n .show()) as unknown as AXPExecuteCommandResult<any>;\n\n return assignmentResult;\n }\n\n private resolveOwnerRef(processData: Record<string, unknown>) {\n const nestedOwner = get(processData, 'ownerRef') as { type?: string; id?: string; title?: unknown } | undefined;\n const locale = this.translationService.getActiveLang?.() ?? 'en-US';\n\n return {\n type: (processData['ownerRef.type'] as string) ?? nestedOwner?.type ?? LOCATION_ASSIGNMENT_PARTY_TYPE,\n id: (processData['ownerRef.id'] as string) ?? nestedOwner?.id ?? '',\n title: resolveLocationAssignmentDisplayTitle(\n locale,\n processData['ownerRef.title'],\n nestedOwner?.title,\n get(processData, 'party.title'),\n get(processData, 'title'),\n ),\n };\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AAAA;AAYA;AAEA;MAGa,iDAAiD,CAAA;AAD9D,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC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