@acorex-platform/module-tenant-management-client 0.0.59 → 0.0.60
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-tenant-management-client-approve-tenant-request.command-D18-n5Lc.mjs +91 -0
- package/fesm2022/acorex-platform-module-tenant-management-client-approve-tenant-request.command-D18-n5Lc.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entities-resource-share.mjs +6 -0
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entities-resource-share.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entities-tenant-user-app-access.mjs +110 -5
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entities-tenant-user-app-access.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entities-tenant-user.mjs +186 -9
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entities-tenant-user.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entities-tenant.mjs +158 -24
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entities-tenant.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-CDfoKWOn.mjs → acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-DqBYnske.mjs} +11 -5
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-DqBYnske.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-tenant-management-client-contracts-entity-catalog-resource-share.entity-BPbgUTEH.mjs → acorex-platform-module-tenant-management-client-contracts-entity-catalog-resource-share.entity-Bf7keWah.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-tenant-management-client-contracts-entity-catalog-resource-share.entity-BPbgUTEH.mjs.map → acorex-platform-module-tenant-management-client-contracts-entity-catalog-resource-share.entity-Bf7keWah.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-admin-scope-C6Ekm0Qg.mjs +43 -0
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-admin-scope-C6Ekm0Qg.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-app-access.entity-nA_yhhRD.mjs → acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-app-access.entity-BhkM_HyR.mjs} +66 -7
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-app-access.entity-BhkM_HyR.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user.entity-CmUdRisR.mjs → acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user.entity-Dk8LTu5B.mjs} +142 -11
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user.entity-Dk8LTu5B.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant.entity-ZpnmQnXF.mjs → acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant.entity-cOVeFcEP.mjs} +154 -26
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant.entity-cOVeFcEP.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts.mjs +96 -3
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-tenant-management-client-reject-tenant-request.command-CKSHPw1a.mjs +80 -0
- package/fesm2022/acorex-platform-module-tenant-management-client-reject-tenant-request.command-CKSHPw1a.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-tenant-management-client.mjs +350 -14
- package/fesm2022/acorex-platform-module-tenant-management-client.mjs.map +1 -1
- package/i18n/en-AU/tenant-management.json +91 -10
- package/i18n/en-US/tenant-management.json +91 -10
- package/i18n/fa-IR/tenant-management.json +92 -11
- package/package.json +1 -1
- package/types/acorex-platform-module-tenant-management-client-contracts.d.ts +178 -4
- package/types/acorex-platform-module-tenant-management-client.d.ts +25 -1
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-CDfoKWOn.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-app-access.entity-nA_yhhRD.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user.entity-CmUdRisR.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant.entity-ZpnmQnXF.mjs.map +0 -1
|
@@ -42,7 +42,13 @@ const RootConfig = {
|
|
|
42
42
|
},
|
|
43
43
|
queries: {
|
|
44
44
|
dashboard: {
|
|
45
|
+
/** Tenant-wide TenantUser count (Tenant Console Overview). */
|
|
45
46
|
activeUsersKpi: `${config.module}:Dashboard:ActiveUsersKpi`,
|
|
47
|
+
/**
|
|
48
|
+
* Current-application TenantUserAppAccess count (TM Application scope).
|
|
49
|
+
* On Tenant Console Overview / TM Application Overview widgets (D-17 / D-18).
|
|
50
|
+
*/
|
|
51
|
+
tmApplicationUsersKpi: `${config.module}:Dashboard:TmApplicationUsersKpi`,
|
|
46
52
|
usersByRoleDonut: `${config.module}:Dashboard:UsersByRoleDonut`,
|
|
47
53
|
},
|
|
48
54
|
reports: {
|
|
@@ -73,10 +79,10 @@ const AXMTenantManagementModuleConst = {
|
|
|
73
79
|
const tenantManagementLocalEntityCatalog = {
|
|
74
80
|
moduleName: RootConfig.module.name,
|
|
75
81
|
loaders: {
|
|
76
|
-
[RootConfig.entities.resourceShare.name]: () => import('./acorex-platform-module-tenant-management-client-contracts-entity-catalog-resource-share.entity-
|
|
77
|
-
[RootConfig.entities.tenant.name]: () => import('./acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant.entity-
|
|
78
|
-
[RootConfig.entities.tenantUser.name]: () => import('./acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user.entity-
|
|
79
|
-
[RootConfig.entities.tenantUserAppAccess.name]: () => import('./acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-app-access.entity-
|
|
82
|
+
[RootConfig.entities.resourceShare.name]: () => import('./acorex-platform-module-tenant-management-client-contracts-entity-catalog-resource-share.entity-Bf7keWah.mjs').then((m) => m.resourceShareEntityFactory()),
|
|
83
|
+
[RootConfig.entities.tenant.name]: () => import('./acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant.entity-cOVeFcEP.mjs').then((m) => m.tenantEntityFactory()),
|
|
84
|
+
[RootConfig.entities.tenantUser.name]: () => import('./acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user.entity-Dk8LTu5B.mjs').then((m) => m.tenantUserEntityFactory()),
|
|
85
|
+
[RootConfig.entities.tenantUserAppAccess.name]: () => import('./acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-app-access.entity-BhkM_HyR.mjs').then((m) => m.tenantUserAppAccessEntityFactory()),
|
|
80
86
|
},
|
|
81
87
|
};
|
|
82
88
|
//#endregion
|
|
@@ -86,4 +92,4 @@ const tenantManagementLocalEntityCatalog = {
|
|
|
86
92
|
*/
|
|
87
93
|
|
|
88
94
|
export { RootConfig as R, tenantManagementLocalEntityCatalog as t };
|
|
89
|
-
//# sourceMappingURL=acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-
|
|
95
|
+
//# sourceMappingURL=acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-DqBYnske.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-DqBYnske.mjs","sources":["../../../../libs/modules/tenant-management/contracts/src/root-config.ts","../../../../libs/modules/tenant-management/contracts/src/entity-catalog.ts","../../../../libs/modules/tenant-management/contracts/src/acorex-platform-module-tenant-management-client-contracts-entity-catalog.ts"],"sourcesContent":["const config = {\n i18n: 'tenant-management',\n module: 'TenantManagement',\n};\n\nexport const RootConfig = {\n config,\n module: {\n route: 'tenant-management',\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-building',\n },\n entities: {\n tenant: {\n name: 'Tenant',\n source: `${config.module}.Tenant`,\n title: `@${config.i18n}:tenants.entities.tenant.title`,\n titlePlural: `@${config.i18n}:tenants.entities.tenant.plural`,\n icon: 'fa-light fa-building',\n },\n tenantUser: {\n name: 'TenantUser',\n source: `${config.module}.TenantUser`,\n title: `@${config.i18n}:tenants.entities.tenant-user.title`,\n titlePlural: `@${config.i18n}:tenants.entities.tenant-user.plural`,\n icon: 'fa-light fa-user-group',\n },\n tenantUserAppAccess: {\n name: 'TenantUserAppAccess',\n source: `${config.module}.TenantUserAppAccess`,\n title: `@${config.i18n}:tenants.entities.tenant-user-app-access.title`,\n titlePlural: `@${config.i18n}:tenants.entities.tenant-user-app-access.plural`,\n icon: 'fa-light fa-app-store',\n },\n resourceShare: {\n name: 'ResourceShare',\n source: `${config.module}.ResourceShare`,\n title: `@${config.i18n}:tenants.entities.resource-share.title`,\n titlePlural: `@${config.i18n}:tenants.entities.resource-share.plural`,\n icon: 'fa-light fa-share-nodes',\n },\n },\n queries: {\n dashboard: {\n /** Tenant-wide TenantUser count (Tenant Console Overview). */\n activeUsersKpi: `${config.module}:Dashboard:ActiveUsersKpi`,\n /**\n * Current-application TenantUserAppAccess count (TM Application scope).\n * On Tenant Console Overview / TM Application Overview widgets (D-17 / D-18).\n */\n tmApplicationUsersKpi: `${config.module}:Dashboard:TmApplicationUsersKpi`,\n usersByRoleDonut: `${config.module}:Dashboard:UsersByRoleDonut`,\n },\n reports: {\n getTenantApplicationAccess: `${config.module}:Reports:GetTenantApplicationAccess`,\n getTenantUserDistribution: `${config.module}:Reports:GetTenantUserDistribution`,\n getTenantRegistrationTimeline: `${config.module}:Reports:GetTenantRegistrationTimeline`,\n getTenantRegistrationChartData: `${config.module}:Reports:GetTenantRegistrationChartData`,\n getSubscriptionsTimeline: `${config.module}:Reports:GetSubscriptionsTimeline`,\n getSubscriptionsChartData: `${config.module}:Reports:GetSubscriptionsChartData`,\n },\n },\n};\n\n// Keep the old export for backward compatibility\nexport const AXMTenantManagementModuleConst = {\n moduleName: 'TenantManagement',\n moduleRoute: 'tenant-management',\n i18n: 'tenant-management',\n} as const;\n","//#region ----- Imports -----\n\nimport type { AXPLocalEntityCatalog } from '@acorex-platform/framework-shared/entity';\n\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ----- Local entity catalog -----\n\n/**\n * Lazy per-entity layout factories. Do not re-export from the contracts barrel\n * so RootConfig imports stay light. Server seed and client `local-entities`\n * consume this catalog explicitly.\n */\nexport const tenantManagementLocalEntityCatalog: AXPLocalEntityCatalog = {\n moduleName: RootConfig.module.name,\n loaders: {\n [RootConfig.entities.resourceShare.name]: () =>\n import('./entities/resource-share/resource-share.entity.js').then((m) => m.resourceShareEntityFactory()),\n [RootConfig.entities.tenant.name]: () =>\n import('./entities/tenant/tenant.entity.js').then((m) => m.tenantEntityFactory()),\n [RootConfig.entities.tenantUser.name]: () =>\n import('./entities/tenant-user/tenant-user.entity.js').then((m) => m.tenantUserEntityFactory()),\n [RootConfig.entities.tenantUserAppAccess.name]: () =>\n import('./entities/tenant-user-app-access/tenant-user-app-access.entity.js').then((m) => m.tenantUserAppAccessEntityFactory()),\n },\n};\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './entity-catalog';\n"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,mBAAmB;AACzB,IA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A;;AAGH;AACO,MAAM,8BAA8B,GAAG;AAC5C,IAAA,UAAU,EAAE,kBAAkB;AAC9B,IAAA,WAAW,EAAE,mBAAmB;AAChC,IAAA,IAAI,EAAE,mBAAmB;CACjB;;ACtEV;AAMA;AAEA;AAEA;;;;AAIG;AACI,MAAM,kCAAkC,GAA0B;AACvE,IAAA,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAClC,IAAA,OAAO,EAAE;AACP,QAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,GAAG,MACxC,OAAO,+GAAoD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,0BAA0B,EAAE,CAAC;AAC1G,QAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,MACjC,OAAO,uGAAoC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,CAAC;AACnF,QAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,GAAG,MACrC,OAAO,4GAA8C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,uBAAuB,EAAE,CAAC;AACjG,QAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,GAAG,MAC9C,OAAO,uHAAoE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,gCAAgC,EAAE,CAAC;AACjI,KAAA;;AAGH;;AC7BA;;AAEG;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
|
|
2
2
|
import { entityMasterRecordActions, createAllQueryView, entityMasterCrudActions } from '@acorex-platform/framework-shared/entity';
|
|
3
|
-
import { R as RootConfig } from './acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-
|
|
3
|
+
import { R as RootConfig } from './acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-DqBYnske.mjs';
|
|
4
4
|
|
|
5
5
|
//#region ---- Imports ----
|
|
6
6
|
//#endregion
|
|
@@ -97,4 +97,4 @@ async function resourceShareEntityFactory() {
|
|
|
97
97
|
//#endregion
|
|
98
98
|
|
|
99
99
|
export { resourceShareEntityFactory };
|
|
100
|
-
//# sourceMappingURL=acorex-platform-module-tenant-management-client-contracts-entity-catalog-resource-share.entity-
|
|
100
|
+
//# sourceMappingURL=acorex-platform-module-tenant-management-client-contracts-entity-catalog-resource-share.entity-Bf7keWah.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-tenant-management-client-contracts-entity-catalog-resource-share.entity-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-tenant-management-client-contracts-entity-catalog-resource-share.entity-Bf7keWah.mjs","sources":["../../../../libs/modules/tenant-management/contracts/src/entities/resource-share/resource-share.entity.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';\nimport {\n AXPEntity,\n createAllQueryView,\n entityMasterCrudActions,\n entityMasterRecordActions,\n} from '@acorex-platform/framework-shared/entity';\nimport { RootConfig } from '../../root-config';\n\n//#endregion\n\n//#region ---- ResourceShare entity factory ----\n\n/**\n * Cross-tenant resource grants (performance-first collection).\n * Intended Mongo indexes (applied by storage when supported):\n * - (shareInfo.sharedWithTenantId, shareInfo.status, resourceInfo.type)\n * - (resourceInfo.type, resourceInfo.id, shareInfo.status)\n * - (shareInfo.ownerTenantId, shareInfo.sharedWithTenantId, shareInfo.status)\n */\nexport async function resourceShareEntityFactory(): Promise<AXPEntity | null> {\n const i18n = `${RootConfig.config.i18n}:tenants.entities.resource-share`;\n\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.resourceShare.name,\n title: RootConfig.entities.resourceShare.title,\n icon: RootConfig.entities.resourceShare.icon,\n searchTags: [\n 'resource-share',\n 'cross-tenant',\n 'sharing',\n 'isolation',\n 'access-grant',\n 'tenant',\n 'tenant-management',\n 'اشتراک منبع',\n 'اشتراک',\n 'مستأجر',\n ],\n formats: {\n individual: RootConfig.entities.resourceShare.title,\n plural: RootConfig.entities.resourceShare.titlePlural,\n },\n plugins: [{ name: 'history' }],\n groups: [\n {\n id: 'basic-info',\n title: `@general:terms.interface.basic-info`,\n },\n ],\n properties: [\n {\n name: 'id',\n title: `@general:terms.common.id`,\n groupId: 'basic-info',\n schema: {\n dataType: 'uuid',\n visible: false,\n nullable: false,\n readonly: true,\n unique: { enabled: true },\n },\n },\n {\n name: 'resourceInfo',\n title: `@${i18n}.fields.resource-info.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'object',\n interface: { type: AXPWidgetsCatalog.text },\n },\n },\n {\n name: 'shareInfo',\n title: `@${i18n}.fields.share-info.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'object',\n interface: { type: AXPWidgetsCatalog.text },\n },\n },\n ],\n interfaces: {\n master: {\n list: {\n actions: [...entityMasterCrudActions()],\n views: [createAllQueryView()],\n },\n single: {\n title: '{{ id }}',\n sections: [{ id: 'basic-info', layout: { positions: { lg: { colSpan: 12 } } } }],\n properties: [\n { name: 'resourceInfo', layout: { positions: { lg: { colSpan: 12 } } } },\n { name: 'shareInfo', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n actions: [...entityMasterRecordActions()],\n },\n },\n },\n };\n\n return entityDef;\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAAA;AAWA;AAEA;AAEA;;;;;;AAMG;AACI,eAAe,0BAA0B,GAAA;IAC9C,MAAM,IAAI,GAAG,CAAA,EAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAA,gCAAA,CAAkC;AAExE,IAAA,MAAM,SAAS,GAAc;AAC3B,QAAA,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC9B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AC1C,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;AAEA;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//#region ----- Tenant Users admin scope (operation-owned) -----
|
|
2
|
+
/** Query `params` key carrying the operation scope. */
|
|
3
|
+
const AXP_TENANT_USER_ADMIN_SCOPE_PARAM = 'tenantUserAdminScope';
|
|
4
|
+
/** HTTP header (lowercase) for getOne/update/delete (and related) ops. */
|
|
5
|
+
const AXP_TENANT_USER_ADMIN_SCOPE_HEADER = 'x-axp-tenant-user-admin-scope';
|
|
6
|
+
/** Entity list view name for TM → Tenant Users / Tenant Application Access. */
|
|
7
|
+
const AXP_TENANT_USERS_VIEW = 'tenant-users';
|
|
8
|
+
function normalizeTenantUserAdminScope(value) {
|
|
9
|
+
return value === 'current-tenant' ? 'current-tenant' : 'default';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether the URL carries the explicit Tenant Users operation context.
|
|
13
|
+
*
|
|
14
|
+
* Prefer durable `tenantUserAdminScope=current-tenant` (entity list rewrites
|
|
15
|
+
* unknown `view=` values to `all`). Also accept `view=tenant-users` when present.
|
|
16
|
+
* Never infer from entity path `/e/TenantUser*` alone.
|
|
17
|
+
*/
|
|
18
|
+
function isTenantUsersOperationUrl(url) {
|
|
19
|
+
if (!url) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
const parsed = new URL(url, 'http://local.invalid');
|
|
24
|
+
if (parsed.searchParams.get(AXP_TENANT_USER_ADMIN_SCOPE_PARAM)?.trim() === 'current-tenant') {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
if (parsed.searchParams.get('view')?.trim() === AXP_TENANT_USERS_VIEW) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
// Fall through to substring checks.
|
|
33
|
+
}
|
|
34
|
+
return (url.includes(`${AXP_TENANT_USER_ADMIN_SCOPE_PARAM}=current-tenant`) ||
|
|
35
|
+
url.includes(`view=${AXP_TENANT_USERS_VIEW}`));
|
|
36
|
+
}
|
|
37
|
+
function resolveTenantUserAdminScopeFromUrl(url) {
|
|
38
|
+
return isTenantUsersOperationUrl(url) ? 'current-tenant' : 'default';
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
|
|
42
|
+
export { AXP_TENANT_USERS_VIEW as A };
|
|
43
|
+
//# sourceMappingURL=acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-admin-scope-C6Ekm0Qg.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-admin-scope-C6Ekm0Qg.mjs","sources":["../../../../libs/modules/tenant-management/contracts/src/tenant-user-admin-scope.ts"],"sourcesContent":["//#region ----- Tenant Users admin scope (operation-owned) -----\n\n/**\n * Explicit Tenant Users / Tenant Application Access operation scope (ADR-TEN-001).\n * Selected by the calling surface (`view=tenant-users`), not Application.code / TM ids,\n * and not by generic `/e/TenantUser*` entity routes alone.\n *\n * - `current-tenant` — TM → Tenant Users (and related AppAccess): force session tenant\n * - `default` — generic / platform TenantUser ops: existing membership policy (incl. isPlatform)\n */\nexport type AXPTenantUserAdminScope = 'current-tenant' | 'default';\n\n/** Query `params` key carrying the operation scope. */\nexport const AXP_TENANT_USER_ADMIN_SCOPE_PARAM = 'tenantUserAdminScope';\n\n/** HTTP header (lowercase) for getOne/update/delete (and related) ops. */\nexport const AXP_TENANT_USER_ADMIN_SCOPE_HEADER = 'x-axp-tenant-user-admin-scope';\n\n/** Entity list view name for TM → Tenant Users / Tenant Application Access. */\nexport const AXP_TENANT_USERS_VIEW = 'tenant-users';\n\nexport function normalizeTenantUserAdminScope(value: unknown): AXPTenantUserAdminScope {\n return value === 'current-tenant' ? 'current-tenant' : 'default';\n}\n\n/**\n * Whether the URL carries the explicit Tenant Users operation context.\n *\n * Prefer durable `tenantUserAdminScope=current-tenant` (entity list rewrites\n * unknown `view=` values to `all`). Also accept `view=tenant-users` when present.\n * Never infer from entity path `/e/TenantUser*` alone.\n */\nexport function isTenantUsersOperationUrl(url: string | null | undefined): boolean {\n if (!url) {\n return false;\n }\n\n try {\n const parsed = new URL(url, 'http://local.invalid');\n if (\n parsed.searchParams.get(AXP_TENANT_USER_ADMIN_SCOPE_PARAM)?.trim() === 'current-tenant'\n ) {\n return true;\n }\n if (parsed.searchParams.get('view')?.trim() === AXP_TENANT_USERS_VIEW) {\n return true;\n }\n } catch {\n // Fall through to substring checks.\n }\n\n return (\n url.includes(`${AXP_TENANT_USER_ADMIN_SCOPE_PARAM}=current-tenant`) ||\n url.includes(`view=${AXP_TENANT_USERS_VIEW}`)\n );\n}\n\nexport function resolveTenantUserAdminScopeFromUrl(\n url: string | null | undefined,\n): AXPTenantUserAdminScope {\n return isTenantUsersOperationUrl(url) ? 'current-tenant' : 'default';\n}\n\n//#endregion\n"],"names":[],"mappings":"AAAA;AAYA;AACO,MAAM,iCAAiC,GAAG,sBAAsB;AAEvE;AACO,MAAM,kCAAkC,GAAG,+BAA+B;AAEjF;AACO,MAAM,qBAAqB,GAAG;AAE/B,SAAU,6BAA6B,CAAC,KAAc,EAAA;IAC1D,OAAO,KAAK,KAAK,gBAAgB,GAAG,gBAAgB,GAAG,SAAS;AAClE;AAEA;;;;;;AAMG;AACG,SAAU,yBAAyB,CAAC,GAA8B,EAAA;IACtE,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,IAAI;QACF,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,sBAAsB,CAAC;AACnD,QAAA,IACE,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,iCAAiC,CAAC,EAAE,IAAI,EAAE,KAAK,gBAAgB,EACvF;AACA,YAAA,OAAO,IAAI;QACb;AACA,QAAA,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,qBAAqB,EAAE;AACrE,YAAA,OAAO,IAAI;QACb;IACF;AAAE,IAAA,MAAM;;IAER;IAEA,QACE,GAAG,CAAC,QAAQ,CAAC,CAAA,EAAG,iCAAiC,iBAAiB,CAAC;QACnE,GAAG,CAAC,QAAQ,CAAC,CAAA,KAAA,EAAQ,qBAAqB,CAAA,CAAE,CAAC;AAEjD;AAEM,SAAU,kCAAkC,CAChD,GAA8B,EAAA;AAE9B,IAAA,OAAO,yBAAyB,CAAC,GAAG,CAAC,GAAG,gBAAgB,GAAG,SAAS;AACtE;AAEA;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AXPWidgetsList } from '@acorex-platform/framework-shared/core';
|
|
2
|
-
import { entityMasterCrudActions, entityMasterRecordActions, createAllQueryView } from '@acorex-platform/framework-shared/entity';
|
|
3
|
-
import {
|
|
1
|
+
import { AXPWidgetsList, AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { entityMasterCrudActions, entityMasterRecordActions, createAllQueryView, createQueryView } from '@acorex-platform/framework-shared/entity';
|
|
3
|
+
import { A as AXP_TENANT_USERS_VIEW } from './acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-admin-scope-C6Ekm0Qg.mjs';
|
|
4
|
+
import { R as RootConfig } from './acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-DqBYnske.mjs';
|
|
4
5
|
|
|
5
6
|
//#region ---- TenantUserAppAccess entity factory ----
|
|
6
7
|
async function tenantUserAppAccessEntityFactory() {
|
|
@@ -69,12 +70,15 @@ async function tenantUserAppAccessEntityFactory() {
|
|
|
69
70
|
type: AXPWidgetsList.Editors.LookupBox,
|
|
70
71
|
options: {
|
|
71
72
|
entity: `${RootConfig.module.name}.${RootConfig.entities.tenantUser.name}`,
|
|
72
|
-
|
|
73
|
+
// Prefer entity searchResult template (user.displayName) over nested textField
|
|
74
|
+
// so list/hydrate can resolve membership labels.
|
|
73
75
|
valueField: 'id',
|
|
74
76
|
look: 'select',
|
|
75
77
|
expose: [
|
|
76
78
|
{ source: 'id', target: 'tenantUser.id' },
|
|
77
79
|
{ source: 'userId', target: 'tenantUser.userId' },
|
|
80
|
+
{ source: 'userId', target: 'userId' },
|
|
81
|
+
{ source: 'user.displayName', target: 'tenantUser.displayName' },
|
|
78
82
|
{ source: 'tenantId', target: 'tenantUser.tenantId' },
|
|
79
83
|
{ source: 'tenantId', target: 'tenantId' },
|
|
80
84
|
],
|
|
@@ -87,6 +91,49 @@ async function tenantUserAppAccessEntityFactory() {
|
|
|
87
91
|
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
88
92
|
},
|
|
89
93
|
},
|
|
94
|
+
{
|
|
95
|
+
name: 'userId',
|
|
96
|
+
// List column label — values render from denormalized userDisplayName (expose target).
|
|
97
|
+
title: `@${i18n}.fields.tenant-user.title`,
|
|
98
|
+
groupId: 'basic-info',
|
|
99
|
+
schema: {
|
|
100
|
+
dataType: 'string',
|
|
101
|
+
interface: {
|
|
102
|
+
type: AXPWidgetsList.Editors.LookupBox,
|
|
103
|
+
options: {
|
|
104
|
+
entity: 'SecurityManagement.User',
|
|
105
|
+
textField: 'displayName',
|
|
106
|
+
valueField: 'id',
|
|
107
|
+
look: 'select',
|
|
108
|
+
expose: [
|
|
109
|
+
{ source: 'id', target: 'user.id' },
|
|
110
|
+
{ source: 'displayName', target: 'user.displayName' },
|
|
111
|
+
{ source: 'displayName', target: 'userDisplayName' },
|
|
112
|
+
{ source: 'username', target: 'user.username' },
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
options: {
|
|
118
|
+
sort: { enabled: true },
|
|
119
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'userDisplayName',
|
|
124
|
+
title: `@${i18n}.fields.user.title`,
|
|
125
|
+
groupId: 'basic-info',
|
|
126
|
+
schema: {
|
|
127
|
+
dataType: 'string',
|
|
128
|
+
// Snapshot for list display / filters; not a primary list column widget.
|
|
129
|
+
visible: false,
|
|
130
|
+
interface: { type: AXPWidgetsCatalog.text },
|
|
131
|
+
},
|
|
132
|
+
options: {
|
|
133
|
+
sort: { enabled: true },
|
|
134
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
135
|
+
},
|
|
136
|
+
},
|
|
90
137
|
{
|
|
91
138
|
name: 'tenantId',
|
|
92
139
|
title: `@${i18n}.fields.tenant.title`,
|
|
@@ -100,6 +147,11 @@ async function tenantUserAppAccessEntityFactory() {
|
|
|
100
147
|
textField: 'title',
|
|
101
148
|
valueField: 'id',
|
|
102
149
|
look: 'select',
|
|
150
|
+
expose: [
|
|
151
|
+
{ source: 'id', target: 'tenant.id' },
|
|
152
|
+
{ source: 'title', target: 'tenant.title' },
|
|
153
|
+
{ source: 'name', target: 'tenant.name' },
|
|
154
|
+
],
|
|
103
155
|
},
|
|
104
156
|
},
|
|
105
157
|
},
|
|
@@ -156,7 +208,8 @@ async function tenantUserAppAccessEntityFactory() {
|
|
|
156
208
|
},
|
|
157
209
|
],
|
|
158
210
|
columns: [
|
|
159
|
-
|
|
211
|
+
// Lookup column; list cells prefer expose target `userDisplayName` (no User identity join).
|
|
212
|
+
{ name: 'userId' },
|
|
160
213
|
{ name: 'tenantId' },
|
|
161
214
|
{ name: 'applicationId' },
|
|
162
215
|
{ name: 'startDate' },
|
|
@@ -196,7 +249,13 @@ async function tenantUserAppAccessEntityFactory() {
|
|
|
196
249
|
],
|
|
197
250
|
},
|
|
198
251
|
list: {
|
|
199
|
-
views: [
|
|
252
|
+
views: [
|
|
253
|
+
createAllQueryView(),
|
|
254
|
+
{
|
|
255
|
+
...createQueryView(AXP_TENANT_USERS_VIEW, RootConfig.entities.tenantUserAppAccess.titlePlural, true),
|
|
256
|
+
visible: false,
|
|
257
|
+
},
|
|
258
|
+
],
|
|
200
259
|
actions: [...entityMasterCrudActions(), ...entityMasterRecordActions()],
|
|
201
260
|
},
|
|
202
261
|
},
|
|
@@ -207,4 +266,4 @@ async function tenantUserAppAccessEntityFactory() {
|
|
|
207
266
|
//#endregion
|
|
208
267
|
|
|
209
268
|
export { tenantUserAppAccessEntityFactory };
|
|
210
|
-
//# sourceMappingURL=acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-app-access.entity-
|
|
269
|
+
//# sourceMappingURL=acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-app-access.entity-BhkM_HyR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-app-access.entity-BhkM_HyR.mjs","sources":["../../../../libs/modules/tenant-management/contracts/src/entities/tenant-user-app-access/tenant-user-app-access.entity.ts"],"sourcesContent":["import { AXPWidgetsCatalog, AXPWidgetsList } from '@acorex-platform/framework-shared/core';\nimport {\n AXPEntity,\n createAllQueryView,\n createQueryView,\n entityMasterCrudActions,\n entityMasterRecordActions,\n} from '@acorex-platform/framework-shared/entity';\nimport { AXP_TENANT_USERS_VIEW } from '../../tenant-user-admin-scope';\nimport { RootConfig } from '../../root-config';\n\n//#region ---- TenantUserAppAccess entity factory ----\n\nexport async function tenantUserAppAccessEntityFactory(): Promise<AXPEntity | null> {\n const i18n = RootConfig.config.i18n + ':tenants.entities.tenant-user-app-access';\n\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.tenantUserAppAccess.name,\n title: RootConfig.entities.tenantUserAppAccess.title,\n icon: RootConfig.entities.tenantUserAppAccess.icon,\n searchTags: [\n 'app-access',\n 'tenant-user',\n 'application-access',\n 'tenant',\n 'application',\n 'membership',\n 'tenant-management',\n 'دسترسی کاربر مستأجر به برنامه',\n 'دسترسی برنامه',\n 'مستأجر',\n ],\n formats: {\n individual: RootConfig.entities.tenantUserAppAccess.title,\n plural: RootConfig.entities.tenantUserAppAccess.titlePlural,\n searchResult: {\n title: '{{ application.title || applicationId }}',\n description: '{{ tenantUserId }}',\n },\n },\n plugins: [\n {\n name: 'status',\n options: {\n field: 'statusId',\n definition: 'tenant-management.status.tenant',\n },\n },\n { name: 'history' },\n ],\n groups: [\n {\n id: 'basic-info',\n title: `@${i18n}.groups.basic-info`,\n },\n ],\n properties: [\n {\n name: 'id',\n title: 'ID',\n groupId: 'basic-info',\n schema: {\n dataType: 'uuid',\n visible: false,\n nullable: false,\n readonly: true,\n unique: { enabled: true },\n },\n },\n {\n name: 'tenantUserId',\n title: `@${i18n}.fields.tenant-user.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n entity: `${RootConfig.module.name}.${RootConfig.entities.tenantUser.name}`,\n // Prefer entity searchResult template (user.displayName) over nested textField\n // so list/hydrate can resolve membership labels.\n valueField: 'id',\n look: 'select',\n expose: [\n { source: 'id', target: 'tenantUser.id' },\n { source: 'userId', target: 'tenantUser.userId' },\n { source: 'userId', target: 'userId' },\n { source: 'user.displayName', target: 'tenantUser.displayName' },\n { source: 'tenantId', target: 'tenantUser.tenantId' },\n { source: 'tenantId', target: 'tenantId' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n options: {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n },\n },\n {\n name: 'userId',\n // List column label — values render from denormalized userDisplayName (expose target).\n title: `@${i18n}.fields.tenant-user.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n entity: 'SecurityManagement.User',\n textField: 'displayName',\n valueField: 'id',\n look: 'select',\n expose: [\n { source: 'id', target: 'user.id' },\n { source: 'displayName', target: 'user.displayName' },\n { source: 'displayName', target: 'userDisplayName' },\n { source: 'username', target: 'user.username' },\n ],\n },\n },\n },\n options: {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n },\n },\n {\n name: 'userDisplayName',\n title: `@${i18n}.fields.user.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n // Snapshot for list display / filters; not a primary list column widget.\n visible: false,\n interface: { type: AXPWidgetsCatalog.text },\n },\n options: {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n },\n },\n {\n name: 'tenantId',\n title: `@${i18n}.fields.tenant.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n entity: `${RootConfig.module.name}.${RootConfig.entities.tenant.name}`,\n textField: 'title',\n valueField: 'id',\n look: 'select',\n expose: [\n { source: 'id', target: 'tenant.id' },\n { source: 'title', target: 'tenant.title' },\n { source: 'name', target: 'tenant.name' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n options: {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n },\n },\n {\n name: 'applicationId',\n title: `@${i18n}.fields.application.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n entity: 'ApplicationManagement.Application',\n textField: 'title',\n valueField: 'id',\n look: 'select',\n expose: [\n { source: 'id', target: 'application.id' },\n { source: 'title', target: 'application.title' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n options: {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n },\n },\n {\n name: 'startDate',\n title: `@${i18n}.fields.start-date.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'date',\n interface: { type: AXPWidgetsList.Editors.DateTimeBox },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'endDate',\n title: `@${i18n}.fields.end-date.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'date',\n interface: { type: AXPWidgetsList.Editors.DateTimeBox },\n },\n },\n ],\n columns: [\n // Lookup column; list cells prefer expose target `userDisplayName` (no User identity join).\n { name: 'userId' },\n { name: 'tenantId' },\n { name: 'applicationId' },\n { name: 'startDate' },\n { name: 'endDate' },\n ],\n interfaces: {\n master: {\n create: {\n sections: [{ id: 'basic-info' }],\n properties: [\n { name: 'tenantUserId' },\n { name: 'tenantId' },\n { name: 'applicationId' },\n { name: 'startDate' },\n { name: 'endDate' },\n ],\n },\n update: {\n sections: [{ id: 'basic-info' }],\n properties: [\n { name: 'tenantUserId' },\n { name: 'tenantId' },\n { name: 'applicationId' },\n { name: 'startDate' },\n { name: 'endDate' },\n ],\n },\n single: {\n title: '{{applicationId}}',\n sections: [{ id: 'basic-info' }],\n properties: [\n { name: 'tenantUserId' },\n { name: 'tenantId' },\n { name: 'applicationId' },\n { name: 'startDate' },\n { name: 'endDate' },\n ],\n },\n list: {\n views: [\n createAllQueryView(),\n {\n ...createQueryView(\n AXP_TENANT_USERS_VIEW,\n RootConfig.entities.tenantUserAppAccess.titlePlural,\n true,\n ),\n visible: false,\n },\n ],\n actions: [...entityMasterCrudActions(), ...entityMasterRecordActions()],\n },\n },\n },\n };\n\n return entityDef;\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAWA;AAEO,eAAe,gCAAgC,GAAA;IACpD,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,GAAG,0CAA0C;AAEhF,IAAA,MAAM,SAAS,GAAc;AAC3B,QAAA,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC9B,QAAA,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI;AAClD,QAAA,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,KAAK;AACpD,QAAA,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI;AAClD,QAAA,UAAU,EAAE;YACV,YAAY;YACZ,aAAa;YACb,oBAAoB;YACpB,QAAQ;YACR,aAAa;YACb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AAU,EAAE;wBACpB,EAAE,IAAI,EAAE,eAAe,EAAE;wBACzB,EAAE,IAAI,EAAE,WAAW,EAAE;wBACrB,EAAE,IAAI,EAAE,SAAS,EAAE;AACpB,qBAAA;AACF,iBAAA;AACD,gBAAA,MAAM,EAAE;AACN,oBAAA,KAAK,EAAE,mBAAmB;AAC1B,oBAAA,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC;AAChC,oBAAA,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,cAAc,EAAE;wBACxB,EAAE,IAAI,EAAE,UAAU,EAAE;wBACpB,EAAE,IAAI,EAAE,eAAe,EAAE;wBACzB,EAAE,IAAI,EAAE,WAAW,EAAE;wBACrB,EAAE,IAAI,EAAE,SAAS,EAAE;AACpB,qBAAA;AACF,iBAAA;AACD,gBAAA,IAAI,EAAE;AACJ,oBAAA,KAAK,EAAE;AACL,wBAAA,kBAAkB,EAAE;AACpB,wBAAA;AACE,4BAAA,GAAG,eAAe,CAChB,qBAAqB,EACrB,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EACnD,IAAI,CACL;AACD,4BAAA,OAAO,EAAE,KAAK;AACf,yBAAA;AACF,qBAAA;oBACD,OAAO,EAAE,CAAC,GAAG,uBAAuB,EAAE,EAAE,GAAG,yBAAyB,EAAE,CAAC;AACxE,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;AAEA;;"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { AXPSystemActionType, AXPWidgetsList } from '@acorex-platform/framework-shared/core';
|
|
2
|
-
import { entityMasterRecordActions, createAllQueryView, createQueryView,
|
|
3
|
-
import {
|
|
2
|
+
import { entityDetailsCrudActions, AXPEntityCommandScope, entityMasterRecordActions, createAllQueryView, createQueryView, entityMasterCrudActions } from '@acorex-platform/framework-shared/entity';
|
|
3
|
+
import { A as AXP_TENANT_USERS_VIEW } from './acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user-admin-scope-C6Ekm0Qg.mjs';
|
|
4
|
+
import { R as RootConfig } from './acorex-platform-module-tenant-management-client-contracts-entity-catalog-acorex-platform-module-tenant-management-client-contracts-entity-catalog-DqBYnske.mjs';
|
|
4
5
|
|
|
6
|
+
/** Same commands as SecurityManagement Users (ADR-TEN-001 D-05 / waiting-room parity). */
|
|
7
|
+
const INVITE_USER_COMMAND = 'SecurityManagement:User:Invite';
|
|
8
|
+
const CREATE_USER_IN_TENANT_COMMAND = 'SecurityManagement:User:CreateInTenant';
|
|
9
|
+
const SEND_PASSWORD_RESET_COMMAND = 'SecurityManagement:User:SendPasswordResetEmail';
|
|
10
|
+
const RESET_TWO_FACTOR_COMMAND = 'SecurityManagement:User:ResetTwoFactor';
|
|
11
|
+
const RESEND_INVITATION_COMMAND = 'SecurityManagement:User:ResendInvitation';
|
|
12
|
+
const CANCEL_INVITATION_COMMAND = 'SecurityManagement:User:CancelInvitation';
|
|
13
|
+
const APPROVE_JOIN_REQUEST_COMMAND = 'SecurityManagement:User:ApproveJoinRequest';
|
|
14
|
+
const REJECT_JOIN_REQUEST_COMMAND = 'SecurityManagement:User:RejectJoinRequest';
|
|
5
15
|
//#endregion
|
|
6
16
|
//#region ---- Tenant User Entity Factory ----
|
|
7
17
|
async function tenantUserEntityFactory() {
|
|
@@ -471,17 +481,53 @@ async function tenantUserEntityFactory() {
|
|
|
471
481
|
actions: [
|
|
472
482
|
...entityMasterCrudActions({ create: false }),
|
|
473
483
|
{
|
|
474
|
-
name: '
|
|
475
|
-
title:
|
|
476
|
-
icon: 'fa-light fa-
|
|
484
|
+
name: 'invite',
|
|
485
|
+
title: '@security-management:users.entities.user.actions.invite.title',
|
|
486
|
+
icon: 'fa-light fa-envelope',
|
|
477
487
|
command: {
|
|
478
|
-
name:
|
|
479
|
-
options: {},
|
|
488
|
+
name: INVITE_USER_COMMAND,
|
|
480
489
|
},
|
|
481
490
|
priority: 'primary',
|
|
482
491
|
type: AXPSystemActionType.Create,
|
|
483
492
|
scope: AXPEntityCommandScope.TypeLevel,
|
|
484
493
|
},
|
|
494
|
+
{
|
|
495
|
+
name: 'new-user',
|
|
496
|
+
title: '@security-management:users.entities.user.actions.create-in-tenant.title',
|
|
497
|
+
icon: 'fa-light fa-user',
|
|
498
|
+
command: {
|
|
499
|
+
name: CREATE_USER_IN_TENANT_COMMAND,
|
|
500
|
+
},
|
|
501
|
+
priority: 'primary',
|
|
502
|
+
type: AXPSystemActionType.Create,
|
|
503
|
+
scope: AXPEntityCommandScope.TypeLevel,
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
name: 'approve-join-request',
|
|
507
|
+
title: '@security-management:users.entities.user.actions.approve-join-request.title',
|
|
508
|
+
icon: 'fa-light fa-user-check',
|
|
509
|
+
command: {
|
|
510
|
+
name: APPROVE_JOIN_REQUEST_COMMAND,
|
|
511
|
+
},
|
|
512
|
+
color: 'success',
|
|
513
|
+
priority: 'primary',
|
|
514
|
+
type: 'view',
|
|
515
|
+
scope: AXPEntityCommandScope.Individual,
|
|
516
|
+
hidden: '{{ context.eval("statusId") !== "pending" || context.eval("invitation.source") !== "join-request" }}',
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
name: 'reject-join-request',
|
|
520
|
+
title: '@security-management:users.entities.user.actions.reject-join-request.title',
|
|
521
|
+
icon: 'fa-light fa-user-xmark',
|
|
522
|
+
command: {
|
|
523
|
+
name: REJECT_JOIN_REQUEST_COMMAND,
|
|
524
|
+
},
|
|
525
|
+
color: 'warning',
|
|
526
|
+
priority: 'primary',
|
|
527
|
+
type: 'view',
|
|
528
|
+
scope: AXPEntityCommandScope.Individual,
|
|
529
|
+
hidden: '{{ context.eval("statusId") !== "pending" || context.eval("invitation.source") !== "join-request" }}',
|
|
530
|
+
},
|
|
485
531
|
],
|
|
486
532
|
views: [
|
|
487
533
|
createAllQueryView({
|
|
@@ -491,8 +537,8 @@ async function tenantUserEntityFactory() {
|
|
|
491
537
|
conditions: [
|
|
492
538
|
{
|
|
493
539
|
name: 'invitation.source',
|
|
494
|
-
operator: { type: '
|
|
495
|
-
value: 'invite',
|
|
540
|
+
operator: { type: 'in' },
|
|
541
|
+
value: ['invite', 'join-request'],
|
|
496
542
|
hidden: true,
|
|
497
543
|
},
|
|
498
544
|
],
|
|
@@ -506,6 +552,12 @@ async function tenantUserEntityFactory() {
|
|
|
506
552
|
],
|
|
507
553
|
sorts: [{ name: 'invitation.sentAt', dir: 'desc' }],
|
|
508
554
|
}),
|
|
555
|
+
{
|
|
556
|
+
// TM menu `?view=tenant-users` — keeps named view (Device Sessions pattern).
|
|
557
|
+
// Current-tenant bound is enforced by tenantUserAdminScope (server), not by isPlatform.
|
|
558
|
+
...createQueryView(AXP_TENANT_USERS_VIEW, RootConfig.entities.tenantUser.titlePlural, true, { sorts: [{ name: 'startDate', dir: 'desc' }] }),
|
|
559
|
+
visible: false,
|
|
560
|
+
},
|
|
509
561
|
],
|
|
510
562
|
},
|
|
511
563
|
single: {
|
|
@@ -523,14 +575,93 @@ async function tenantUserEntityFactory() {
|
|
|
523
575
|
{ name: 'endDate', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
|
|
524
576
|
{ name: 'isAccountHolder', layout: { positions: { lg: { colSpan: 12, order: 6 } } } },
|
|
525
577
|
],
|
|
526
|
-
actions: [
|
|
578
|
+
actions: [
|
|
579
|
+
{
|
|
580
|
+
name: 'send-password-reset',
|
|
581
|
+
title: '@security-management:users.entities.user.actions.send-password-reset.title',
|
|
582
|
+
icon: 'fa-light fa-envelope',
|
|
583
|
+
command: { name: SEND_PASSWORD_RESET_COMMAND },
|
|
584
|
+
priority: 'secondary',
|
|
585
|
+
type: 'view',
|
|
586
|
+
scope: AXPEntityCommandScope.Individual,
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
name: 'reset-two-factor',
|
|
590
|
+
title: '@security-management:users.entities.user.actions.reset-two-factor.title',
|
|
591
|
+
icon: 'fa-light fa-shield-keyhole',
|
|
592
|
+
command: { name: RESET_TWO_FACTOR_COMMAND },
|
|
593
|
+
priority: 'secondary',
|
|
594
|
+
type: 'view',
|
|
595
|
+
scope: AXPEntityCommandScope.Individual,
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
name: 'resend-invitation',
|
|
599
|
+
title: '@security-management:users.entities.user.actions.resend-invitation.title',
|
|
600
|
+
icon: 'fa-light fa-paper-plane',
|
|
601
|
+
command: { name: RESEND_INVITATION_COMMAND },
|
|
602
|
+
priority: 'secondary',
|
|
603
|
+
type: 'view',
|
|
604
|
+
scope: AXPEntityCommandScope.Individual,
|
|
605
|
+
hidden: '{{ context.eval("statusId") !== "pending" || context.eval("invitation.source") !== "invite" }}',
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
name: 'cancel-invitation',
|
|
609
|
+
title: '@security-management:users.entities.user.actions.cancel-invitation.title',
|
|
610
|
+
icon: 'fa-light fa-user-xmark',
|
|
611
|
+
command: { name: CANCEL_INVITATION_COMMAND },
|
|
612
|
+
priority: 'secondary',
|
|
613
|
+
type: 'view',
|
|
614
|
+
scope: AXPEntityCommandScope.Individual,
|
|
615
|
+
hidden: '{{ context.eval("statusId") !== "pending" || context.eval("invitation.source") !== "invite" }}',
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
name: 'approve-join-request',
|
|
619
|
+
title: '@security-management:users.entities.user.actions.approve-join-request.title',
|
|
620
|
+
icon: 'fa-light fa-user-check',
|
|
621
|
+
command: { name: APPROVE_JOIN_REQUEST_COMMAND },
|
|
622
|
+
color: 'success',
|
|
623
|
+
priority: 'primary',
|
|
624
|
+
type: 'view',
|
|
625
|
+
scope: AXPEntityCommandScope.Individual,
|
|
626
|
+
hidden: '{{ context.eval("statusId") !== "pending" || context.eval("invitation.source") !== "join-request" }}',
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
name: 'reject-join-request',
|
|
630
|
+
title: '@security-management:users.entities.user.actions.reject-join-request.title',
|
|
631
|
+
icon: 'fa-light fa-user-xmark',
|
|
632
|
+
command: { name: REJECT_JOIN_REQUEST_COMMAND },
|
|
633
|
+
color: 'warning',
|
|
634
|
+
priority: 'primary',
|
|
635
|
+
type: 'view',
|
|
636
|
+
scope: AXPEntityCommandScope.Individual,
|
|
637
|
+
hidden: '{{ context.eval("statusId") !== "pending" || context.eval("invitation.source") !== "join-request" }}',
|
|
638
|
+
},
|
|
639
|
+
...entityMasterRecordActions(),
|
|
640
|
+
],
|
|
527
641
|
},
|
|
528
642
|
},
|
|
529
643
|
},
|
|
644
|
+
relatedEntities: [
|
|
645
|
+
{
|
|
646
|
+
entity: `${RootConfig.module.name}.${RootConfig.entities.tenantUserAppAccess.name}`,
|
|
647
|
+
title: `@${RootConfig.config.i18n}:tenants.entities.related-entities.tenant-user-app-access.title`,
|
|
648
|
+
icon: RootConfig.entities.tenantUserAppAccess.icon,
|
|
649
|
+
columns: ['applicationId', 'statusId', 'startDate', 'endDate'],
|
|
650
|
+
conditions: [
|
|
651
|
+
{
|
|
652
|
+
name: 'tenantUserId',
|
|
653
|
+
operator: { type: 'equal' },
|
|
654
|
+
value: '{{ context.eval("id") }}',
|
|
655
|
+
},
|
|
656
|
+
],
|
|
657
|
+
actions: [...entityDetailsCrudActions('tenantUserId')],
|
|
658
|
+
layout: { type: 'page-list', position: 'after', order: 1 },
|
|
659
|
+
},
|
|
660
|
+
],
|
|
530
661
|
};
|
|
531
662
|
return entityDef;
|
|
532
663
|
}
|
|
533
664
|
//#endregion
|
|
534
665
|
|
|
535
666
|
export { tenantUserEntityFactory };
|
|
536
|
-
//# sourceMappingURL=acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user.entity-
|
|
667
|
+
//# sourceMappingURL=acorex-platform-module-tenant-management-client-contracts-entity-catalog-tenant-user.entity-Dk8LTu5B.mjs.map
|