@acorex-platform/module-location-management-client 1.0.2 → 2.0.0-beta.1
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-acorex-platform-module-location-management-client-CnENeOgY.mjs +1658 -0
- package/fesm2022/acorex-platform-module-location-management-client-acorex-platform-module-location-management-client-CnENeOgY.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-location-management-client-address-widget-print.component-MyMPTP7_.mjs +21 -0
- package/fesm2022/acorex-platform-module-location-management-client-address-widget-print.component-MyMPTP7_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DECKrIBR.mjs → acorex-platform-module-location-management-client-assign-existing-location-to-party.command-BvuJiRNy.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-location-management-client-assign-existing-location-to-party.command-DECKrIBR.mjs.map → acorex-platform-module-location-management-client-assign-existing-location-to-party.command-BvuJiRNy.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location-assignment.mjs +1 -1
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location-assignment.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location-type.mjs +1 -0
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entities-location-type.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-acorex-platform-module-location-management-client-contracts-entity-catalog-CUIKXXZM.mjs +141 -0
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-acorex-platform-module-location-management-client-contracts-entity-catalog-CUIKXXZM.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-location-management-client-contracts-entity-catalog-geographic-region.entity-DBsnIXJ2.mjs → acorex-platform-module-location-management-client-contracts-entity-catalog-geographic-region.entity-DeQEPvAb.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-location-management-client-contracts-entity-catalog-geographic-region.entity-DBsnIXJ2.mjs.map → acorex-platform-module-location-management-client-contracts-entity-catalog-geographic-region.entity-DeQEPvAb.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.entity-D_of7F2n.mjs → acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.entity-Cm55C02R.mjs} +4 -4
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.entity-Cm55C02R.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.utils-CfwbSQiM.mjs → acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.utils-Bp3Axtxi.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.utils-CfwbSQiM.mjs.map → acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.utils-Bp3Axtxi.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-location-management-client-contracts-entity-catalog-location-role.entity-C735P573.mjs → acorex-platform-module-location-management-client-contracts-entity-catalog-location-role.entity-DfocIVqh.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-location-management-client-contracts-entity-catalog-location-role.entity-C735P573.mjs.map → acorex-platform-module-location-management-client-contracts-entity-catalog-location-role.entity-DfocIVqh.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-location-management-client-contracts-entity-catalog-location-type.entity-B1_lHdxY.mjs → acorex-platform-module-location-management-client-contracts-entity-catalog-location-type.entity-DJzjhezY.mjs} +3 -2
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-type.entity-DJzjhezY.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-location-management-client-contracts-entity-catalog-location.entity-Bkiyn_GH.mjs → acorex-platform-module-location-management-client-contracts-entity-catalog-location.entity-DKc5CTsC.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-location-management-client-contracts-entity-catalog-location.entity-Bkiyn_GH.mjs.map → acorex-platform-module-location-management-client-contracts-entity-catalog-location.entity-DKc5CTsC.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-location-management-client-contracts.mjs +75 -59
- 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-Cl6KfruM.mjs → acorex-platform-module-location-management-client-create-location-with-assignment.command-D1l3h2Op.mjs} +23 -10
- package/fesm2022/acorex-platform-module-location-management-client-create-location-with-assignment.command-D1l3h2Op.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-location-management-client.mjs +1 -1668
- 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 +3 -1
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-acorex-platform-module-location-management-client-contracts-entity-catalog--lXGk_uE.mjs +0 -70
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-acorex-platform-module-location-management-client-contracts-entity-catalog--lXGk_uE.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-assignment.entity-D_of7F2n.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-location-management-client-contracts-entity-catalog-location-type.entity-B1_lHdxY.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-location-management-client-create-location-with-assignment.command-Cl6KfruM.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-location-management-client-contracts.mjs","sources":["../../../../libs/modules/location-management/contracts/src/features.keys.ts","../../../../libs/modules/location-management/contracts/src/root-config.ts","../../../../libs/modules/location-management/contracts/src/location-assignment.actions.ts","../../../../libs/modules/location-management/contracts/src/location-assignment.utils.ts","../../../../libs/modules/location-management/contracts/src/menu.keys.ts","../../../../libs/modules/location-management/contracts/src/permission.keys.ts","../../../../libs/modules/location-management/contracts/src/manifest.ts","../../../../libs/modules/location-management/contracts/src/entities/location-assignment/location-assignment.types.ts","../../../../libs/modules/location-management/contracts/src/index.ts","../../../../libs/modules/location-management/contracts/src/acorex-platform-module-location-management-client-contracts.ts"],"sourcesContent":["// Management feature removed - module name is used directly as feature key\nexport const AXMLocationManagementFeatureKeys = {} as const;\n\n","const config = {\n i18n: 'location-management',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: 'LocationManagement',\n title: '@location-management:module.title',\n icon: 'fa-light fa-map-marker-alt',\n },\n entities: {\n location: {\n name: 'Location',\n title: '@location-management:locations.entities.location.title',\n titlePlural: '@location-management:locations.entities.location.plural',\n icon: 'fa-light fa-map-marker-alt',\n },\n\n locationType: {\n name: 'LocationType',\n title: '@location-management:location-types.entities.location-type.title',\n titlePlural: '@location-management:location-types.entities.location-type.plural',\n icon: 'fa-light fa-tags',\n },\n locationRole: {\n name: 'LocationRole',\n title: '@location-management:location-roles.entities.location-role.title',\n titlePlural: '@location-management:location-roles.entities.location-role.plural',\n icon: 'fa-light fa-map-pin',\n },\n geographicRegion: {\n name: 'GeographicRegion',\n title: '@location-management:geographic-regions.entities.geographic-region.title',\n titlePlural: '@location-management:geographic-regions.entities.geographic-region.plural',\n icon: 'fa-light fa-globe',\n },\n locationAssignment: {\n name: 'LocationAssignment',\n title: `@${config.i18n}:location-assignments.entities.location-assignment.title`,\n titlePlural: `@${config.i18n}:location-assignments.entities.location-assignment.plural`,\n icon: 'fa-light fa-building-user',\n },\n },\n} as const;\n","import { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport {\n AXPEntityAction,\n AXPEntityCommandScope,\n entityDetailsEditAction,\n entityMasterBulkDeleteAction,\n entityMasterCreateAction,\n entityMasterDeleteAction,\n entityMasterViewAction,\n entityOverrideDetailsViewAction,\n} from '@acorex-platform/framework-shared/entity';\n\nimport { RootConfig } from './root-config';\n\n//#region ---- Command keys ----\n\nconst ASSIGN_EXISTING_LOCATION = `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}:AssignExistingLocation`;\nconst CREATE_WITH_NEW_LOCATION = `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}:CreateWithNewLocation`;\n\n//#endregion\n\n//#region ---- Location assignment related-entity actions ----\n\nconst assigneeProcessOptions = () => ({\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {\n 'ownerRef.type': '{{ host.entity() }}',\n 'ownerRef.id': '{{ host.eval(\"id\") }}',\n 'ownerRef.title': '{{ host.eval(\"party.title\") }}',\n },\n },\n});\n\n/** Read-only assignments list on Location detail (no create/update/delete). */\nexport function locationAssignmentReadOnlyRelatedActions(): AXPEntityAction[] {\n return [\n { ...entityMasterCreateAction(), hidden: true },\n { ...entityMasterBulkDeleteAction(), hidden: true },\n { ...entityMasterDeleteAction(), hidden: true },\n { ...entityMasterViewAction(), hidden: true },\n ];\n}\n\nfunction locationAssignmentPartyCreateAction(): AXPEntityAction {\n const assigneeOptions = assigneeProcessOptions();\n\n return {\n name: 'Create',\n title: '@general:actions.create.title',\n command: { name: 'Entity:Create' },\n icon: 'fa-light fa-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n items: [\n {\n name: 'AssignExistingLocation',\n title: '@location-management:location-assignments.actions.assign-existing-location.title',\n command: { name: ASSIGN_EXISTING_LOCATION, options: assigneeOptions },\n icon: 'fa-light fa-map-marker-alt',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n name: 'CreateWithNewLocation',\n title: '@location-management:location-assignments.actions.create-with-new-location.title',\n command: { name: CREATE_WITH_NEW_LOCATION, options: assigneeOptions },\n icon: 'fa-light fa-location-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n ],\n };\n}\n\n/**\n * Actions for LocationAssignment when shown from Party/Customer/Supplier.\n * Create menu: assign existing location or create new location with assignee prefilled.\n */\nexport function locationAssignmentDetailsCrudActionsForPartyContext(\n _partyIdContextPath = 'id',\n): AXPEntityAction[] {\n return [\n { ...entityMasterCreateAction(), hidden: true },\n locationAssignmentPartyCreateAction(),\n entityDetailsEditAction(),\n entityOverrideDetailsViewAction(),\n ];\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport {\n AXPWidgetsList,\n formatAddressData,\n resolveMultiLanguageString,\n type AXPMultiLanguageString,\n} from '@acorex-platform/framework-shared/core';\nimport type { AXPEntityProperty, AXPQueryFilter } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Types ----\n\ntype LocationAssignmentLocationSnapshot = {\n id: string;\n title: string;\n fullAddress?: string;\n street1?: string;\n street2?: string;\n postalCode?: string;\n city?: { title: string };\n state?: { title: string };\n country?: { title: string };\n};\n\ntype LocationAssignmentPersonSnapshot = {\n id: string;\n fullName?: string;\n phones?: unknown[];\n emails?: unknown[];\n};\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Canonical assignee type for party-scoped location assignment links. */\nexport const LOCATION_ASSIGNMENT_PARTY_TYPE = 'BusinessCore.Party';\n\n//#endregion\n\n//#region ---- Display helpers ----\n\n/** Resolves assignee display title from host/process data (plain string or multi-language object). */\nexport function resolveLocationAssignmentDisplayTitle(locale: string, ...candidates: unknown[]): string {\n for (const candidate of candidates) {\n if (candidate == null || candidate === '') {\n continue;\n }\n\n const resolved = resolveMultiLanguageString(\n candidate as string | AXPMultiLanguageString | null | undefined,\n locale,\n ).trim();\n if (resolved) {\n return resolved;\n }\n }\n\n return '';\n}\n\n/** Builds a location snapshot for nested LocationAssignment display fields. */\nexport function buildLocationAssignmentLocationSnapshot(\n locationRow: Record<string, unknown>,\n locationId: string,\n): LocationAssignmentLocationSnapshot {\n const fullAddress =\n (locationRow['fullAddress'] as string | undefined)?.trim() || formatAddressData(locationRow)?.trim() || undefined;\n\n const toRegionRef = (value: unknown) => {\n if (value == null) {\n return undefined;\n }\n if (typeof value === 'object') {\n const record = value as Record<string, unknown>;\n const title = record['title'];\n if (title == null) {\n return undefined;\n }\n if (typeof title === 'string') {\n return { title };\n }\n if (typeof title === 'object') {\n return {\n title: resolveMultiLanguageString(title as AXPMultiLanguageString, 'en-US'),\n };\n }\n return undefined;\n }\n return { title: String(value) };\n };\n\n return {\n id: locationId,\n title: locationRow['title'] as string,\n fullAddress,\n street1: locationRow['street1'] as string | undefined,\n street2: locationRow['street2'] as string | undefined,\n postalCode: locationRow['postalCode'] as string | undefined,\n city: toRegionRef(locationRow['city']),\n state: toRegionRef(locationRow['state']),\n country: toRegionRef(locationRow['country']),\n };\n}\n\n/** Builds a person snapshot for nested LocationAssignment site-contact fields. */\nexport function buildLocationAssignmentPersonSnapshot(\n personRow: Record<string, unknown>,\n personId: string,\n): LocationAssignmentPersonSnapshot {\n const fullName =\n (personRow['fullName'] as string | undefined) ??\n [personRow['firstName'], personRow['lastName']].filter(Boolean).join(' ').trim();\n\n return {\n id: personId,\n fullName: fullName || undefined,\n phones: personRow['phones'] as unknown[] | undefined,\n emails: personRow['emails'] as unknown[] | undefined,\n };\n}\n\n//#endregion\n\n//#region ---- Filter helpers ----\n\n/** Filters LocationAssignment rows for a location detail context. */\nexport function locationAssignmentLocationConditions(locationIdContextPath = 'id'): AXPQueryFilter[] {\n return [\n {\n name: 'locationId',\n operator: { type: 'equal' },\n value: `{{context.eval(\"${locationIdContextPath}\")}}`,\n },\n ];\n}\n\n/** Filters LocationAssignment rows for the current details-view host entity. */\nexport function locationAssignmentPartyConditions(hostIdContextPath = 'id'): AXPQueryFilter[] {\n return [\n {\n name: 'ownerRef.type',\n operator: { type: 'equal' },\n value: '{{ host.entity() }}',\n },\n {\n name: 'ownerRef.id',\n operator: { type: 'equal' },\n value: `{{ host.eval(\"${hostIdContextPath}\") }}`,\n },\n ];\n}\n\n//#endregion\n\n//#region ---- Form layout helpers ----\n\n/** Assignee lookup omitted when injected from party/customer/supplier context. */\nexport const LOCATION_ASSIGNMENT_REF_PROPERTY_NAMES = ['ownerRef.id', 'ownerRef.type'] as const;\n\n/** Location lookup omitted when injected from location detail context. */\nexport const LOCATION_ASSIGNMENT_LOCATION_PROPERTY_NAMES = ['locationId'] as const;\n\ntype PropertyLayoutRef = { name: string; layout?: Record<string, unknown> };\n\nexport function omitLocationAssignmentRefFromEditLayouts<T extends PropertyLayoutRef>(layouts: T[]): T[] {\n return layouts.filter(\n (layout) =>\n !LOCATION_ASSIGNMENT_REF_PROPERTY_NAMES.includes(\n layout.name as (typeof LOCATION_ASSIGNMENT_REF_PROPERTY_NAMES)[number],\n ),\n );\n}\n\nexport function omitLocationAssignmentLocationFromEditLayouts<T extends PropertyLayoutRef>(layouts: T[]): T[] {\n return layouts.filter(\n (layout) =>\n !LOCATION_ASSIGNMENT_LOCATION_PROPERTY_NAMES.includes(\n layout.name as (typeof LOCATION_ASSIGNMENT_LOCATION_PROPERTY_NAMES)[number],\n ),\n );\n}\n\n//#endregion\n\n//#region ---- Property factories ----\n\n/** Polymorphic assignee lookup (AssessmentCase subjectRef pattern). */\nexport function createLocationAssignmentOwnerRefLookupProperty(\n groupId: string,\n options: { readonly?: boolean } = {},\n): AXPEntityProperty {\n const readonly = options.readonly ?? false;\n\n return {\n name: 'ownerRef.id',\n title: '@location-management:location-assignments.entities.location-assignment.fields.assignee.title',\n groupId,\n options: readonly\n ? { sort: { enabled: false }, filter: { advance: { enabled: false }, inline: { enabled: false } } }\n : { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },\n schema: {\n dataType: 'string',\n readonly,\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n readonly,\n entity: \"{{ context.eval('ownerRef.type') }}\",\n textField: 'title',\n valueField: 'id',\n expose: [\n { source: 'id', target: 'ownerRef.id' },\n { source: 'title', target: 'ownerRef.title' },\n ],\n triggers: [{ event: \"{{ events.context('ownerRef.type') }}\", action: '{{ widget.refresh() }}' }],\n },\n },\n },\n validations: [{ rule: 'required' }],\n };\n}\n\n/** Hidden assignee type field; defaults to BusinessCore.Party. */\nexport function createLocationAssignmentOwnerRefTypeProperty(groupId: string): AXPEntityProperty {\n return {\n name: 'ownerRef.type',\n title: '@location-management:location-assignments.entities.location-assignment.fields.assignee-type.title',\n groupId,\n schema: {\n dataType: 'string',\n visible: false,\n defaultValue: LOCATION_ASSIGNMENT_PARTY_TYPE,\n interface: { type: AXPWidgetsList.Editors.TextBox },\n },\n };\n}\n\n//#endregion\n","export const AXPLocationManagementMenuKeys = {\n Root: 'location-management:menu',\n Locations: 'location-management:menu:locations',\n Divider1: 'location-management:menu:divider-1',\n LocationTypes: 'location-management:menu:location-types',\n LocationRoles: 'location-management:menu:location-roles',\n GeographicRegions: 'location-management:menu:geographic-regions',\n} as const;\n\n","/**\n * People & Organization capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPPeopleOrganizationPermissionKeys = {\n Access: 'PeopleOrganization:Permission:Access',\n ViewOrganization: 'PeopleOrganization:Permission:ViewOrganization',\n MaintainOrganization: 'PeopleOrganization:Permission:MaintainOrganization',\n MaintainTeams: 'PeopleOrganization:Permission:MaintainTeams',\n MaintainEmployees: 'PeopleOrganization:Permission:MaintainEmployees',\n ManageEmployeeActions: 'PeopleOrganization:Permission:ManageEmployeeActions',\n MaintainPersons: 'PeopleOrganization:Permission:MaintainPersons',\n MaintainAttendance: 'PeopleOrganization:Permission:MaintainAttendance',\n ManageAttendanceActions: 'PeopleOrganization:Permission:ManageAttendanceActions',\n DesignJobs: 'PeopleOrganization:Permission:DesignJobs',\n Setup: 'PeopleOrganization:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPPeopleOrganizationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMLocationManagementPermissionsKeys = {\n LocationManagement: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n Locations: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n View: AXPPeopleOrganizationPermissionKeys.Setup,\n Edit: AXPPeopleOrganizationPermissionKeys.Setup,\n Delete: AXPPeopleOrganizationPermissionKeys.Setup,\n Create: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n LocationTypes: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n View: AXPPeopleOrganizationPermissionKeys.Setup,\n Edit: AXPPeopleOrganizationPermissionKeys.Setup,\n Delete: AXPPeopleOrganizationPermissionKeys.Setup,\n Create: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n LocationRoles: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n View: AXPPeopleOrganizationPermissionKeys.Setup,\n Edit: AXPPeopleOrganizationPermissionKeys.Setup,\n Delete: AXPPeopleOrganizationPermissionKeys.Setup,\n Create: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n GeographicRegions: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n View: AXPPeopleOrganizationPermissionKeys.Setup,\n Edit: AXPPeopleOrganizationPermissionKeys.Setup,\n Delete: AXPPeopleOrganizationPermissionKeys.Setup,\n Create: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n },\n} as const;\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Location Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const LocationManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n required: true,\n\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","import type { AXPEntityReference } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ---- Types ----\n\nexport interface AXMLocationManagementLocationAssignmentEntityModel extends AXPEntityModel<string> {\n locationId: string;\n ownerRef: AXPEntityReference;\n roleId: string;\n personId?: string;\n location?: {\n id: string;\n title: string;\n fullAddress?: string;\n street1?: string;\n street2?: string;\n postalCode?: string;\n city?: { title: string };\n state?: { title: string };\n country?: { title: string };\n };\n role?: { id: string; title: string };\n person?: { id: string; fullName?: string; phones?: unknown[]; emails?: unknown[] };\n}\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './features.keys';\nexport * from './location-assignment.actions';\nexport * from './location-assignment.utils';\nexport * from './menu.keys';\nexport * from './permission.keys';\n\nexport * from './root-config';\nexport * from './manifest';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AACO,MAAM,gCAAgC,GAAG;;ACDhD,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,qBAAqB;CAC5B;AAEM,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,oBAAoB;AAC1B,QAAA,KAAK,EAAE,mCAAmC;AAC1C,QAAA,IAAI,EAAE,4BAA4B;AACnC,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,KAAK,EAAE,wDAAwD;AAC/D,YAAA,WAAW,EAAE,yDAAyD;AACtE,YAAA,IAAI,EAAE,4BAA4B;AACnC,SAAA;AAED,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,cAAc;AACpB,YAAA,KAAK,EAAE,kEAAkE;AACzE,YAAA,WAAW,EAAE,mEAAmE;AAChF,YAAA,IAAI,EAAE,kBAAkB;AACzB,SAAA;AACD,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,cAAc;AACpB,YAAA,KAAK,EAAE,kEAAkE;AACzE,YAAA,WAAW,EAAE,mEAAmE;AAChF,YAAA,IAAI,EAAE,qBAAqB;AAC5B,SAAA;AACD,QAAA,gBAAgB,EAAE;AA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EAAE,mCAAmC,CAAC,KAAK;YACjD,MAAM,EAAE,mCAAmC,CAAC,KAAK;AAClD,SAAA;AACD,QAAA,aAAa,EAAE;YACb,UAAU,EAAE,mCAAmC,CAAC,KAAK;YACrD,IAAI,EAAE,mCAAmC,CAAC,KAAK;YAC/C,IAAI,EAAE,mCAAmC,CAAC,KAAK;YAC/C,MAAM,EAAE,mCAAmC,CAAC,KAAK;YACjD,MAAM,EAAE,mCAAmC,CAAC,KAAK;AAClD,SAAA;AACD,QAAA,iBAAiB,EAAE;YACjB,UAAU,EAAE,mCAAmC,CAAC,KAAK;YACrD,IAAI,EAAE,mCAAmC,CAAC,KAAK;YAC/C,IAAI,EAAE,mCAAmC,CAAC,KAAK;YAC/C,MAAM,EAAE,mCAAmC,CAAC,KAAK;YACjD,MAAM,EAAE,mCAAmC,CAAC,KAAK;AAClD,SAAA;AACF,KAAA;;;ACrDH;AAKA;AAEA;AAEA;;;AAGG;AACI,MAAM,0BAA0B,GAAsB;AAC3D,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AAC9B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,MAAM,EAAE,UAAU;AAClB,IAAA,QAAQ,EAAE,IAAI;;;AAKhB;;ACDA;;ACzBA;;ACAA;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-location-management-client-contracts.mjs","sources":["../../../../libs/modules/location-management/contracts/src/permission.keys.ts","../../../../libs/modules/location-management/contracts/src/reference-preparation.capabilities.ts","../../../../libs/modules/location-management/contracts/src/data-execution.capabilities.ts","../../../../libs/modules/location-management/contracts/src/features.keys.ts","../../../../libs/modules/location-management/contracts/src/root-config.ts","../../../../libs/modules/location-management/contracts/src/location-assignment.actions.ts","../../../../libs/modules/location-management/contracts/src/location-assignment.utils.ts","../../../../libs/modules/location-management/contracts/src/menu.keys.ts","../../../../libs/modules/location-management/contracts/src/manifest.ts","../../../../libs/modules/location-management/contracts/src/entities/location-assignment/location-assignment.types.ts","../../../../libs/modules/location-management/contracts/src/acorex-platform-module-location-management-client-contracts.ts"],"sourcesContent":["/**\n * People & Organization capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPPeopleOrganizationPermissionKeys = {\n Access: 'PeopleOrganization:Permission:Access',\n ViewOrganization: 'PeopleOrganization:Permission:ViewOrganization',\n MaintainOrganization: 'PeopleOrganization:Permission:MaintainOrganization',\n MaintainTeams: 'PeopleOrganization:Permission:MaintainTeams',\n MaintainEmployees: 'PeopleOrganization:Permission:MaintainEmployees',\n ManageEmployeeActions: 'PeopleOrganization:Permission:ManageEmployeeActions',\n MaintainPersons: 'PeopleOrganization:Permission:MaintainPersons',\n MaintainAttendance: 'PeopleOrganization:Permission:MaintainAttendance',\n ManageAttendanceActions: 'PeopleOrganization:Permission:ManageAttendanceActions',\n DesignJobs: 'PeopleOrganization:Permission:DesignJobs',\n Setup: 'PeopleOrganization:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPPeopleOrganizationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMLocationManagementPermissionsKeys = {\n LocationManagement: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n Locations: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n View: AXPPeopleOrganizationPermissionKeys.Setup,\n Edit: AXPPeopleOrganizationPermissionKeys.Setup,\n Delete: AXPPeopleOrganizationPermissionKeys.Setup,\n Create: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n LocationTypes: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n View: AXPPeopleOrganizationPermissionKeys.Setup,\n Edit: AXPPeopleOrganizationPermissionKeys.Setup,\n Delete: AXPPeopleOrganizationPermissionKeys.Setup,\n Create: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n LocationRoles: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n View: AXPPeopleOrganizationPermissionKeys.Setup,\n Edit: AXPPeopleOrganizationPermissionKeys.Setup,\n Delete: AXPPeopleOrganizationPermissionKeys.Setup,\n Create: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n GeographicRegions: {\n Management: AXPPeopleOrganizationPermissionKeys.Setup,\n View: AXPPeopleOrganizationPermissionKeys.Setup,\n Edit: AXPPeopleOrganizationPermissionKeys.Setup,\n Delete: AXPPeopleOrganizationPermissionKeys.Setup,\n Create: AXPPeopleOrganizationPermissionKeys.Setup,\n },\n },\n} as const;\n","import { axpRegisterDataExecutionCapabilities } from '@acorex-platform/framework-shared/runtime';\nimport { AXPPeopleOrganizationPermissionKeys } from './permission.keys';\n\n// Preparation uses this module's existing read entitlements and never grants access.\nexport function registerLocationManagementReferencePreparation(): void {\n for (const [name, permission] of [\n ['LocationManagement.LocationRole', AXPPeopleOrganizationPermissionKeys.Setup],\n ['LocationManagement.LocationType', AXPPeopleOrganizationPermissionKeys.Setup],\n ] as const) {\n axpRegisterDataExecutionCapabilities({\n targetKind: 'Entity', targetKey: name, revision: 'location-management-reference-preparation-v1',\n operations: ['read', 'getOne', 'query'],\n readAccess: { permissions: [permission], features: [] },\n });\n }\n}\nregisterLocationManagementReferencePreparation();\n","import { axpRegisterEntityPublicReadFields } from '@acorex-platform/framework-shared/entity';\n\naxpRegisterEntityPublicReadFields('LocationManagement.GeographicRegion', 'hasChild');\n","// Management feature removed - module name is used directly as feature key\nexport const AXMLocationManagementFeatureKeys = {} as const;\n\n","const config = {\n i18n: 'location-management',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: 'LocationManagement',\n title: '@location-management:module.title',\n icon: 'fa-light fa-map-marker-alt',\n },\n entities: {\n location: {\n name: 'Location',\n title: '@location-management:locations.entities.location.title',\n titlePlural: '@location-management:locations.entities.location.plural',\n icon: 'fa-light fa-map-marker-alt',\n },\n\n locationType: {\n name: 'LocationType',\n title: '@location-management:location-types.entities.location-type.title',\n titlePlural: '@location-management:location-types.entities.location-type.plural',\n icon: 'fa-light fa-tags',\n },\n locationRole: {\n name: 'LocationRole',\n title: '@location-management:location-roles.entities.location-role.title',\n titlePlural: '@location-management:location-roles.entities.location-role.plural',\n icon: 'fa-light fa-map-pin',\n },\n geographicRegion: {\n name: 'GeographicRegion',\n title: '@location-management:geographic-regions.entities.geographic-region.title',\n titlePlural: '@location-management:geographic-regions.entities.geographic-region.plural',\n icon: 'fa-light fa-globe',\n },\n locationAssignment: {\n name: 'LocationAssignment',\n title: `@${config.i18n}:location-assignments.entities.location-assignment.title`,\n titlePlural: `@${config.i18n}:location-assignments.entities.location-assignment.plural`,\n icon: 'fa-light fa-building-user',\n },\n },\n} as const;\n","import { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport {\n AXPEntityAction,\n AXPEntityCommandScope,\n entityDetailsEditAction,\n entityMasterBulkDeleteAction,\n entityMasterCreateAction,\n entityMasterDeleteAction,\n entityMasterViewAction,\n entityOverrideDetailsViewAction,\n} from '@acorex-platform/framework-shared/entity';\n\nimport { RootConfig } from './root-config';\n\n//#region ---- Command keys ----\n\nconst ASSIGN_EXISTING_LOCATION = `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}:AssignExistingLocation`;\nconst CREATE_WITH_NEW_LOCATION = `${RootConfig.module.name}.${RootConfig.entities.locationAssignment.name}:CreateWithNewLocation`;\n\n//#endregion\n\n//#region ---- Location assignment related-entity actions ----\n\nconst assigneeProcessOptions = () => ({\n process: {\n redirect: false,\n canCreateNewOne: true,\n data: {\n 'ownerRef.type': '{{ host.entity() }}',\n 'ownerRef.id': '{{ host.eval(\"id\") }}',\n 'ownerRef.title': '{{ host.eval(\"party.title\") }}',\n },\n },\n});\n\n/** Read-only assignments list on Location detail (no create/update/delete). */\nexport function locationAssignmentReadOnlyRelatedActions(): AXPEntityAction[] {\n return [\n { ...entityMasterCreateAction(), hidden: true },\n { ...entityMasterBulkDeleteAction(), hidden: true },\n { ...entityMasterDeleteAction(), hidden: true },\n { ...entityMasterViewAction(), hidden: true },\n ];\n}\n\nfunction locationAssignmentPartyCreateAction(): AXPEntityAction {\n const assigneeOptions = assigneeProcessOptions();\n\n return {\n name: 'Create',\n title: '@general:actions.create.title',\n command: { name: 'Entity:Create' },\n icon: 'fa-light fa-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n items: [\n {\n name: 'AssignExistingLocation',\n title: '@location-management:location-assignments.actions.assign-existing-location.title',\n command: { name: ASSIGN_EXISTING_LOCATION, options: assigneeOptions },\n icon: 'fa-light fa-map-marker-alt',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n {\n name: 'CreateWithNewLocation',\n title: '@location-management:location-assignments.actions.create-with-new-location.title',\n command: { name: CREATE_WITH_NEW_LOCATION, options: assigneeOptions },\n icon: 'fa-light fa-location-plus',\n priority: 'primary',\n type: AXPSystemActionType.Create,\n scope: AXPEntityCommandScope.TypeLevel,\n },\n ],\n };\n}\n\n/**\n * Actions for LocationAssignment when shown from Party/Customer/Supplier.\n * Create menu: assign existing location or create new location with assignee prefilled.\n */\nexport function locationAssignmentDetailsCrudActionsForPartyContext(\n _partyIdContextPath = 'id',\n): AXPEntityAction[] {\n return [\n { ...entityMasterCreateAction(), hidden: true },\n locationAssignmentPartyCreateAction(),\n entityDetailsEditAction(),\n entityOverrideDetailsViewAction(),\n ];\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport {\n AXPWidgetsList,\n formatAddressData,\n resolveMultiLanguageString,\n type AXPMultiLanguageString,\n} from '@acorex-platform/framework-shared/core';\nimport type { AXPEntityProperty, AXPQueryFilter } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Types ----\n\ntype LocationAssignmentLocationSnapshot = {\n id: string;\n title: string;\n fullAddress?: string;\n street1?: string;\n street2?: string;\n postalCode?: string;\n city?: { title: string };\n state?: { title: string };\n country?: { title: string };\n};\n\ntype LocationAssignmentPersonSnapshot = {\n id: string;\n fullName?: string;\n phones?: unknown[];\n emails?: unknown[];\n};\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Canonical assignee type for party-scoped location assignment links. */\nexport const LOCATION_ASSIGNMENT_PARTY_TYPE = 'BusinessCore.Party';\n\n//#endregion\n\n//#region ---- Display helpers ----\n\n/** Resolves assignee display title from host/process data (plain string or multi-language object). */\nexport function resolveLocationAssignmentDisplayTitle(locale: string, ...candidates: unknown[]): string {\n for (const candidate of candidates) {\n if (candidate == null || candidate === '') {\n continue;\n }\n\n const resolved = resolveMultiLanguageString(\n candidate as string | AXPMultiLanguageString | null | undefined,\n locale,\n ).trim();\n if (resolved) {\n return resolved;\n }\n }\n\n return '';\n}\n\n/** Builds a location snapshot for nested LocationAssignment display fields. */\nexport function buildLocationAssignmentLocationSnapshot(\n locationRow: Record<string, unknown>,\n locationId: string,\n): LocationAssignmentLocationSnapshot {\n const fullAddress =\n (locationRow['fullAddress'] as string | undefined)?.trim() || formatAddressData(locationRow)?.trim() || undefined;\n\n const toRegionRef = (value: unknown) => {\n if (value == null) {\n return undefined;\n }\n if (typeof value === 'object') {\n const record = value as Record<string, unknown>;\n const title = record['title'];\n if (title == null) {\n return undefined;\n }\n if (typeof title === 'string') {\n return { title };\n }\n if (typeof title === 'object') {\n return {\n title: resolveMultiLanguageString(title as AXPMultiLanguageString, 'en-US'),\n };\n }\n return undefined;\n }\n return { title: String(value) };\n };\n\n return {\n id: locationId,\n title: locationRow['title'] as string,\n fullAddress,\n street1: locationRow['street1'] as string | undefined,\n street2: locationRow['street2'] as string | undefined,\n postalCode: locationRow['postalCode'] as string | undefined,\n city: toRegionRef(locationRow['city']),\n state: toRegionRef(locationRow['state']),\n country: toRegionRef(locationRow['country']),\n };\n}\n\n/** Builds a person snapshot for nested LocationAssignment site-contact fields. */\nexport function buildLocationAssignmentPersonSnapshot(\n personRow: Record<string, unknown>,\n personId: string,\n): LocationAssignmentPersonSnapshot {\n const fullName =\n (personRow['fullName'] as string | undefined) ??\n [personRow['firstName'], personRow['lastName']].filter(Boolean).join(' ').trim();\n\n return {\n id: personId,\n fullName: fullName || undefined,\n phones: personRow['phones'] as unknown[] | undefined,\n emails: personRow['emails'] as unknown[] | undefined,\n };\n}\n\n//#endregion\n\n//#region ---- Filter helpers ----\n\n/** Filters LocationAssignment rows for a location detail context. */\nexport function locationAssignmentLocationConditions(locationIdContextPath = 'id'): AXPQueryFilter[] {\n return [\n {\n name: 'locationId',\n operator: { type: 'equal' },\n value: `{{context.eval(\"${locationIdContextPath}\")}}`,\n },\n ];\n}\n\n/** Filters LocationAssignment rows for the current details-view host entity. */\nexport function locationAssignmentPartyConditions(hostIdContextPath = 'id'): AXPQueryFilter[] {\n return [\n {\n name: 'ownerRef.type',\n operator: { type: 'equal' },\n value: '{{ host.entity() }}',\n },\n {\n name: 'ownerRef.id',\n operator: { type: 'equal' },\n value: `{{ host.eval(\"${hostIdContextPath}\") }}`,\n },\n ];\n}\n\n//#endregion\n\n//#region ---- Form layout helpers ----\n\n/** Assignee lookup omitted when injected from party/customer/supplier context. */\nexport const LOCATION_ASSIGNMENT_REF_PROPERTY_NAMES = ['ownerRef.id', 'ownerRef.type'] as const;\n\n/** Location lookup omitted when injected from location detail context. */\nexport const LOCATION_ASSIGNMENT_LOCATION_PROPERTY_NAMES = ['locationId'] as const;\n\ntype PropertyLayoutRef = { name: string; layout?: Record<string, unknown> };\n\nexport function omitLocationAssignmentRefFromEditLayouts<T extends PropertyLayoutRef>(layouts: T[]): T[] {\n return layouts.filter(\n (layout) =>\n !LOCATION_ASSIGNMENT_REF_PROPERTY_NAMES.includes(\n layout.name as (typeof LOCATION_ASSIGNMENT_REF_PROPERTY_NAMES)[number],\n ),\n );\n}\n\nexport function omitLocationAssignmentLocationFromEditLayouts<T extends PropertyLayoutRef>(layouts: T[]): T[] {\n return layouts.filter(\n (layout) =>\n !LOCATION_ASSIGNMENT_LOCATION_PROPERTY_NAMES.includes(\n layout.name as (typeof LOCATION_ASSIGNMENT_LOCATION_PROPERTY_NAMES)[number],\n ),\n );\n}\n\n//#endregion\n\n//#region ---- Property factories ----\n\n/** Polymorphic assignee lookup (AssessmentCase subjectRef pattern). */\nexport function createLocationAssignmentOwnerRefLookupProperty(\n groupId: string,\n options: { readonly?: boolean } = {},\n): AXPEntityProperty {\n const readonly = options.readonly ?? false;\n\n return {\n name: 'ownerRef.id',\n title: '@location-management:location-assignments.entities.location-assignment.fields.assignee.title',\n groupId,\n options: readonly\n ? { sort: { enabled: false }, filter: { advance: { enabled: false }, inline: { enabled: false } } }\n : { sort: { enabled: true }, filter: { advance: { enabled: true }, inline: { enabled: true } } },\n schema: {\n dataType: 'string',\n readonly,\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n readonly,\n entity: \"{{ context.eval('ownerRef.type') }}\",\n textField: 'title',\n valueField: 'id',\n expose: [\n { source: 'id', target: 'ownerRef.id' },\n { source: 'title', target: 'ownerRef.title' },\n ],\n triggers: [{ event: \"{{ events.context('ownerRef.type') }}\", action: '{{ widget.refresh() }}' }],\n },\n },\n },\n validations: [{ rule: 'required' }],\n };\n}\n\n/** Hidden assignee type field; defaults to BusinessCore.Party. */\nexport function createLocationAssignmentOwnerRefTypeProperty(groupId: string): AXPEntityProperty {\n return {\n name: 'ownerRef.type',\n title: '@location-management:location-assignments.entities.location-assignment.fields.assignee-type.title',\n groupId,\n schema: {\n dataType: 'string',\n visible: false,\n defaultValue: LOCATION_ASSIGNMENT_PARTY_TYPE,\n interface: { type: AXPWidgetsList.Editors.TextBox },\n },\n };\n}\n\n//#endregion\n","export const AXPLocationManagementMenuKeys = {\n Root: 'location-management:menu',\n Locations: 'location-management:menu:locations',\n Divider1: 'location-management:menu:divider-1',\n LocationTypes: 'location-management:menu:location-types',\n LocationRoles: 'location-management:menu:location-roles',\n GeographicRegions: 'location-management:menu:geographic-regions',\n} as const;\n\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Location Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const LocationManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n required: true,\n\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","import type { AXPEntityReference } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ---- Types ----\n\nexport interface AXMLocationManagementLocationAssignmentEntityModel extends AXPEntityModel<string> {\n locationId: string;\n ownerRef: AXPEntityReference;\n roleId: string;\n personId?: string;\n location?: {\n id: string;\n title: string;\n fullAddress?: string;\n street1?: string;\n street2?: string;\n postalCode?: string;\n city?: { title: string };\n state?: { title: string };\n country?: { title: string };\n };\n role?: { id: string; title: string };\n person?: { id: string; fullName?: string; phones?: unknown[]; emails?: unknown[] };\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;;;AAGG;AACI,MAAM,mCAAmC,GAAG;AACjD,IAAA,MAAM,EAAE,sCAAsC;AAC9C,IAAA,gBAAgB,EAAE,gDAAgD;AAClE,IAAA,oBAAoB,EAAE,oDAAoD;AAC1E,IAAA,aAAa,EAAE,6CAA6C;AAC5D,IAAA,iBAAiB,EAAE,iDAAiD;AACpE,IAAA,qBAAqB,EAAE,qDAAqD;AAC5E,IAAA,eAAe,EAAE,+CAA+C;AAChE,IAAA,kBAAkB,EAAE,kDAAkD;AACtE,IAAA,uBAAu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AE,KAAK;AACd,YAAA,YAAY,EAAE,8BAA8B;YAC5C,SAAS,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE;AACpD,SAAA;KACF;AACH;AAEA;;AChPO,MAAM,6BAA6B,GAAG;AACzC,IAAA,IAAI,EAAE,0BAA0B;AAChC,IAAA,SAAS,EAAE,oCAAoC;AAC/C,IAAA,QAAQ,EAAE,oCAAoC;AAC9C,IAAA,aAAa,EAAE,yCAAyC;AACxD,IAAA,aAAa,EAAE,yCAAyC;AACxD,IAAA,iBAAiB,EAAE,6CAA6C;;;ACNpE;AAKA;AAEA;AAEA;;;AAGG;AACI,MAAM,0BAA0B,GAAsB;AAC3D,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AAC9B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,MAAM,EAAE,UAAU;AAClB,IAAA,QAAQ,EAAE,IAAI;;;AAKhB;;ACDA;;ACzBA;;AAEG;;"}
|
|
@@ -10,6 +10,21 @@ import { resolveEntityActionCommandInput, mergeEntityActionProcessData } from '@
|
|
|
10
10
|
|
|
11
11
|
//#region ---- Imports ----
|
|
12
12
|
//#endregion
|
|
13
|
+
//#region ---- Helpers ----
|
|
14
|
+
/** Saved row from either a runtime command result or a plain create payload. */
|
|
15
|
+
function createdRow(result) {
|
|
16
|
+
if (!result || typeof result !== 'object') {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
const payload = runtimeCommandPayloadData(result);
|
|
20
|
+
const row = (payload ?? result);
|
|
21
|
+
const id = row['id'] ?? row['_id'];
|
|
22
|
+
if (id == null || id === '') {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
return row;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
13
28
|
//#region ---- Command ----
|
|
14
29
|
class AXMLocationAssignmentCreateWithNewLocationCommand {
|
|
15
30
|
constructor() {
|
|
@@ -67,9 +82,8 @@ class AXMLocationAssignmentCreateWithNewLocationCommand {
|
|
|
67
82
|
dialogRef.setLoading(true);
|
|
68
83
|
try {
|
|
69
84
|
const context = dialogRef.context();
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
if (!locationRow?.id && !locationRow?._id) {
|
|
85
|
+
const locationRow = createdRow(await createLocationFn(context));
|
|
86
|
+
if (!locationRow) {
|
|
73
87
|
return {
|
|
74
88
|
success: false,
|
|
75
89
|
message: {
|
|
@@ -95,7 +109,7 @@ class AXMLocationAssignmentCreateWithNewLocationCommand {
|
|
|
95
109
|
}
|
|
96
110
|
})
|
|
97
111
|
.show());
|
|
98
|
-
const locationRow =
|
|
112
|
+
const locationRow = createdRow(locationResult);
|
|
99
113
|
if (!locationRow) {
|
|
100
114
|
return { success: false };
|
|
101
115
|
}
|
|
@@ -138,17 +152,16 @@ class AXMLocationAssignmentCreateWithNewLocationCommand {
|
|
|
138
152
|
const personSnapshot = personId && personInContext
|
|
139
153
|
? buildLocationAssignmentPersonSnapshot({ ...personInContext, id: personId }, personId)
|
|
140
154
|
: undefined;
|
|
141
|
-
const
|
|
155
|
+
const assignmentRow = createdRow(await createAssignmentFn({
|
|
142
156
|
...context,
|
|
143
157
|
locationId,
|
|
144
158
|
ownerRef,
|
|
145
159
|
location: locationSnapshot,
|
|
146
160
|
...(personId ? { personId, person: personSnapshot } : {}),
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
if (__single_createResult) {
|
|
161
|
+
}));
|
|
162
|
+
if (assignmentRow) {
|
|
150
163
|
return { success: true, kind: 'object',
|
|
151
|
-
data:
|
|
164
|
+
data: assignmentRow,
|
|
152
165
|
message: {
|
|
153
166
|
text: await this.translationService.translateAsync('@general:messages.generic.success.description'),
|
|
154
167
|
},
|
|
@@ -197,4 +210,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
197
210
|
}] });
|
|
198
211
|
|
|
199
212
|
export { AXMLocationAssignmentCreateWithNewLocationCommand };
|
|
200
|
-
//# sourceMappingURL=acorex-platform-module-location-management-client-create-location-with-assignment.command-
|
|
213
|
+
//# sourceMappingURL=acorex-platform-module-location-management-client-create-location-with-assignment.command-D1l3h2Op.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-location-management-client-create-location-with-assignment.command-D1l3h2Op.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 { AXPRuntimeCommandResult, runtimeCommandPayloadData} 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 {\n AXPCommand,\n mergeEntityActionProcessData,\n resolveEntityActionCommandInput,\n type AXPCommandExecuteResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\n\n//#endregion\n\n//#region ---- Helpers ----\n\n/** Saved row from either a runtime command result or a plain create payload. */\nfunction createdRow(result: unknown): Record<string, unknown> | undefined {\n if (!result || typeof result !== 'object') {\n return undefined;\n }\n\n const payload = runtimeCommandPayloadData(result as AXPRuntimeCommandResult<Record<string, unknown>>);\n const row = (payload ?? result) as Record<string, unknown>;\n const id = row['id'] ?? row['_id'];\n if (id == null || id === '') {\n return undefined;\n }\n return row;\n}\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): AXPCommandExecuteResultPromise<any> {\n const resolved = resolveEntityActionCommandInput(input);\n const processData = mergeEntityActionProcessData(input);\n const entity = resolved.entity;\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<AXPRuntimeCommandResult<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) => AXPCommandExecuteResultPromise<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 locationRow = createdRow(await createLocationFn(context));\n if (!locationRow) {\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, kind: 'object', 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 AXPRuntimeCommandResult<any>;\n\n const locationRow = createdRow(locationResult);\n if (!locationRow) {\n return { success: false };\n }\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<AXPRuntimeCommandResult<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) => AXPCommandExecuteResultPromise<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 assignmentRow = createdRow(\n await createAssignmentFn({\n ...context,\n locationId,\n ownerRef,\n location: locationSnapshot,\n ...(personId ? { personId, person: personSnapshot } : {}),\n }),\n );\n if (assignmentRow) {\n return { success: true, kind: 'object',\n data: assignmentRow,\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 AXPRuntimeCommandResult<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;AAiBA;AAEA;AAEA;AACA,SAAS,UAAU,CAAC,MAAe,EAAA;IACjC,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAA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