@acorex-platform/module-location-management-client 0.0.15 → 0.0.18
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 +164 -0
- package/fesm2022/acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DmpN-yas.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-location-management-client-contracts.mjs +2694 -0
- package/fesm2022/acorex-platform-module-location-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-location-management-client-create-location-with-assignment.command-D6VXtZRf.mjs +201 -0
- package/fesm2022/acorex-platform-module-location-management-client-create-location-with-assignment.command-D6VXtZRf.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-location-management-client.mjs +1955 -0
- package/fesm2022/acorex-platform-module-location-management-client.mjs.map +1 -0
- package/package.json +21 -5
- package/types/acorex-platform-module-location-management-client-contracts.d.ts +274 -0
- package/types/acorex-platform-module-location-management-client.d.ts +53 -0
- package/contracts/datasource.keys.d.ts +0 -6
- package/contracts/datasource.keys.js +0 -8
- package/contracts/entities/geographic-region/geographic-region.entity.d.ts +0 -2
- package/contracts/entities/geographic-region/geographic-region.entity.js +0 -725
- package/contracts/entities/geographic-region/geographic-region.types.d.ts +0 -27
- package/contracts/entities/geographic-region/geographic-region.types.js +0 -1
- package/contracts/entities/geographic-region/index.d.ts +0 -2
- package/contracts/entities/geographic-region/index.js +0 -2
- package/contracts/entities/index.d.ts +0 -5
- package/contracts/entities/index.js +0 -5
- package/contracts/entities/location/index.d.ts +0 -2
- package/contracts/entities/location/index.js +0 -2
- package/contracts/entities/location/location.entity.d.ts +0 -2
- package/contracts/entities/location/location.entity.js +0 -1075
- package/contracts/entities/location/location.types.d.ts +0 -30
- package/contracts/entities/location/location.types.js +0 -1
- package/contracts/entities/location-assignment/index.d.ts +0 -2
- package/contracts/entities/location-assignment/index.js +0 -2
- package/contracts/entities/location-assignment/location-assignment.entity.d.ts +0 -2
- package/contracts/entities/location-assignment/location-assignment.entity.js +0 -194
- package/contracts/entities/location-assignment/location-assignment.types.d.ts +0 -35
- package/contracts/entities/location-assignment/location-assignment.types.js +0 -2
- package/contracts/entities/location-role/index.d.ts +0 -2
- package/contracts/entities/location-role/index.js +0 -2
- package/contracts/entities/location-role/location-role.entity.d.ts +0 -2
- package/contracts/entities/location-role/location-role.entity.js +0 -143
- package/contracts/entities/location-role/location-role.types.d.ts +0 -6
- package/contracts/entities/location-role/location-role.types.js +0 -1
- package/contracts/entities/location-type/index.d.ts +0 -2
- package/contracts/entities/location-type/index.js +0 -2
- package/contracts/entities/location-type/location-type.entity.d.ts +0 -2
- package/contracts/entities/location-type/location-type.entity.js +0 -237
- package/contracts/entities/location-type/location-type.types.d.ts +0 -8
- package/contracts/entities/location-type/location-type.types.js +0 -1
- package/contracts/features.keys.d.ts +0 -1
- package/contracts/features.keys.js +0 -2
- package/contracts/index.d.ts +0 -8
- package/contracts/index.js +0 -10
- package/contracts/location-assignment.actions.d.ts +0 -8
- package/contracts/location-assignment.actions.js +0 -73
- package/contracts/location-assignment.utils.d.ts +0 -53
- package/contracts/location-assignment.utils.js +0 -145
- package/contracts/menu.keys.d.ts +0 -8
- package/contracts/menu.keys.js +0 -8
- package/contracts/package.json +0 -5
- package/contracts/permission.keys.d.ts +0 -33
- package/contracts/permission.keys.js +0 -42
- package/contracts/root-config.d.ts +0 -42
- package/contracts/root-config.js +0 -43
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { AXToastService } from '@acorex/components/toast';
|
|
2
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { inject, Injectable } from '@angular/core';
|
|
5
|
+
import { get } from 'lodash';
|
|
6
|
+
import { AXPEntityDataSelectorService, AXPEntityFormBuilderService, AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';
|
|
7
|
+
import { RootConfig, buildLocationAssignmentLocationSnapshot, buildLocationAssignmentPersonSnapshot, LOCATION_ASSIGNMENT_PARTY_TYPE, resolveLocationAssignmentDisplayTitle } from '@acorex-platform/module-location-management-client/contracts';
|
|
8
|
+
|
|
9
|
+
//#region ---- Imports ----
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ---- Command ----
|
|
12
|
+
class AXMLocationAssignmentAssignExistingLocationCommand {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.entityDataSelector = inject(AXPEntityDataSelectorService);
|
|
15
|
+
this.entityForm = inject(AXPEntityFormBuilderService);
|
|
16
|
+
this.entityService = inject(AXPEntityDefinitionRegistryService);
|
|
17
|
+
this.toastService = inject(AXToastService);
|
|
18
|
+
this.translationService = inject(AXTranslationService);
|
|
19
|
+
}
|
|
20
|
+
async execute(input) {
|
|
21
|
+
const { entity, data, options, hostContext } = (input?.__context__ ?? input ?? {});
|
|
22
|
+
const processData = {
|
|
23
|
+
...(hostContext ?? {}),
|
|
24
|
+
...(data ?? {}),
|
|
25
|
+
...(options?.process?.data ?? {}),
|
|
26
|
+
};
|
|
27
|
+
const ownerRef = this.resolveOwnerRef(processData);
|
|
28
|
+
if (!ownerRef.id) {
|
|
29
|
+
return {
|
|
30
|
+
success: false,
|
|
31
|
+
message: {
|
|
32
|
+
text: await this.translationService.translateAsync('@location-management:location-assignments.messages.missing-party-context'),
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const [moduleName, entityName] = (entity || '').split('.');
|
|
37
|
+
if (!moduleName || !entityName) {
|
|
38
|
+
return {
|
|
39
|
+
success: false,
|
|
40
|
+
message: {
|
|
41
|
+
text: await this.translationService.translateAsync('@general:messages.entity.invalid-identifier'),
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const locationEntity = await this.entityService.resolve(RootConfig.module.name, RootConfig.entities.location.name);
|
|
46
|
+
if (!locationEntity) {
|
|
47
|
+
return {
|
|
48
|
+
success: false,
|
|
49
|
+
message: {
|
|
50
|
+
text: await this.translationService.translateAsync('@general:messages.entity.invalid-identifier'),
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const selectorTitle = await this.translationService.translateAsync('@location-management:location-assignments.actions.assign-existing-location.selector-title');
|
|
55
|
+
const selectorResult = await this.entityDataSelector.open({
|
|
56
|
+
entity: locationEntity,
|
|
57
|
+
title: selectorTitle,
|
|
58
|
+
allowMultiple: false,
|
|
59
|
+
columns: ['title', 'code', 'street1', 'cityId', 'countryId'],
|
|
60
|
+
});
|
|
61
|
+
if (!selectorResult?.items?.length) {
|
|
62
|
+
return { success: false };
|
|
63
|
+
}
|
|
64
|
+
const selectedLocation = selectorResult.items[0];
|
|
65
|
+
const locationId = selectedLocation.id ?? selectedLocation._id;
|
|
66
|
+
const locationSnapshot = buildLocationAssignmentLocationSnapshot(selectedLocation, locationId);
|
|
67
|
+
const formTitle = await this.translationService.translateAsync('@location-management:location-assignments.actions.assign-existing-location.form-title', { params: { partyTitle: ownerRef.title } });
|
|
68
|
+
const result = await this.entityForm
|
|
69
|
+
.entity(`${moduleName}.${entityName}`)
|
|
70
|
+
.create({
|
|
71
|
+
locationId,
|
|
72
|
+
location: locationSnapshot,
|
|
73
|
+
ownerRef,
|
|
74
|
+
})
|
|
75
|
+
.include('roleId', 'personId', 'notes')
|
|
76
|
+
.title(formTitle)
|
|
77
|
+
.actions((actions) => {
|
|
78
|
+
actions.cancel('@general:actions.cancel.title');
|
|
79
|
+
actions.submit('@general:actions.create.title');
|
|
80
|
+
})
|
|
81
|
+
.onAction(async (dialogRef) => {
|
|
82
|
+
if (dialogRef.action() === 'cancel') {
|
|
83
|
+
return { success: false };
|
|
84
|
+
}
|
|
85
|
+
const locationAssignmentEntity = await this.entityService.resolve(moduleName, entityName);
|
|
86
|
+
const createFn = locationAssignmentEntity?.commands?.create?.execute;
|
|
87
|
+
if (!createFn) {
|
|
88
|
+
const msg = await this.translationService.translateAsync('@general:messages.entity.create-command-unavailable');
|
|
89
|
+
this.toastService.show({
|
|
90
|
+
color: 'danger',
|
|
91
|
+
title: await this.translationService.translateAsync('@general:messages.generic.error.title'),
|
|
92
|
+
content: msg,
|
|
93
|
+
});
|
|
94
|
+
throw new Error(msg);
|
|
95
|
+
}
|
|
96
|
+
dialogRef.setLoading(true);
|
|
97
|
+
try {
|
|
98
|
+
const context = dialogRef.context();
|
|
99
|
+
const personId = (context['personId'] ?? get(context, 'person.id'));
|
|
100
|
+
const personInContext = get(context, 'person');
|
|
101
|
+
const personSnapshot = personId && personInContext
|
|
102
|
+
? buildLocationAssignmentPersonSnapshot({ ...personInContext, id: personId }, personId)
|
|
103
|
+
: undefined;
|
|
104
|
+
const payload = {
|
|
105
|
+
...context,
|
|
106
|
+
locationId,
|
|
107
|
+
ownerRef,
|
|
108
|
+
location: locationSnapshot,
|
|
109
|
+
...(personId ? { personId, person: personSnapshot } : {}),
|
|
110
|
+
};
|
|
111
|
+
const createResult = await createFn(payload);
|
|
112
|
+
if (createResult?.data ?? createResult) {
|
|
113
|
+
return {
|
|
114
|
+
success: true,
|
|
115
|
+
data: createResult?.data ?? createResult,
|
|
116
|
+
message: {
|
|
117
|
+
text: await this.translationService.translateAsync('@general:messages.generic.success.description'),
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
success: false,
|
|
123
|
+
message: {
|
|
124
|
+
text: await this.translationService.translateAsync('@general:messages.entity.create-failed'),
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
const errorMsg = error instanceof Error
|
|
130
|
+
? error.message
|
|
131
|
+
: await this.translationService.translateAsync('@general:messages.entity.create-failed');
|
|
132
|
+
this.toastService.show({
|
|
133
|
+
color: 'danger',
|
|
134
|
+
title: await this.translationService.translateAsync('@general:messages.generic.error.title'),
|
|
135
|
+
content: errorMsg,
|
|
136
|
+
});
|
|
137
|
+
throw error;
|
|
138
|
+
}
|
|
139
|
+
finally {
|
|
140
|
+
dialogRef.setLoading(false);
|
|
141
|
+
}
|
|
142
|
+
})
|
|
143
|
+
.show();
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
146
|
+
resolveOwnerRef(processData) {
|
|
147
|
+
const nestedOwner = get(processData, 'ownerRef');
|
|
148
|
+
const locale = this.translationService.getActiveLang?.() ?? 'en-US';
|
|
149
|
+
return {
|
|
150
|
+
type: processData['ownerRef.type'] ?? nestedOwner?.type ?? LOCATION_ASSIGNMENT_PARTY_TYPE,
|
|
151
|
+
id: processData['ownerRef.id'] ?? nestedOwner?.id ?? '',
|
|
152
|
+
title: resolveLocationAssignmentDisplayTitle(locale, processData['ownerRef.title'], nestedOwner?.title, get(processData, 'party.title'), get(processData, 'title')),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLocationAssignmentAssignExistingLocationCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
156
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLocationAssignmentAssignExistingLocationCommand, providedIn: 'root' }); }
|
|
157
|
+
}
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMLocationAssignmentAssignExistingLocationCommand, decorators: [{
|
|
159
|
+
type: Injectable,
|
|
160
|
+
args: [{ providedIn: 'root' }]
|
|
161
|
+
}] });
|
|
162
|
+
|
|
163
|
+
export { AXMLocationAssignmentAssignExistingLocationCommand };
|
|
164
|
+
//# sourceMappingURL=acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DmpN-yas.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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,a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