@ieeesa-npm/tenants 0.2.8 → 0.2.9
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/esm2022/lib/assets/constants.json +47 -0
- package/esm2022/lib/components/tenant-basic-details/tenant-basic-details.component.mjs +1 -1
- package/esm2022/lib/components/view-tenant-details/view-tenant-details.component.mjs +10 -3
- package/esm2022/lib/components/view-tenant-group-types/view-tenant-group-types.component.mjs +173 -0
- package/esm2022/lib/models/view-tenant-group-types.model.mjs +9 -0
- package/esm2022/lib/services/tenant-applications.service.mjs +16 -1
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/ieeesa-npm-tenants.mjs +246 -4
- package/fesm2022/ieeesa-npm-tenants.mjs.map +1 -1
- package/lib/components/tenant-basic-details/tenant-basic-details.component.d.ts +36 -0
- package/lib/components/view-tenant-details/view-tenant-details.component.d.ts +1 -0
- package/lib/components/view-tenant-group-types/view-tenant-group-types.component.d.ts +57 -0
- package/lib/models/view-tenant-group-types.model.d.ts +27 -0
- package/lib/services/tenant-applications.service.d.ts +9 -10
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -288,6 +288,42 @@ export declare class TenantBasicDetailsComponent implements OnDestroy {
|
|
|
288
288
|
};
|
|
289
289
|
};
|
|
290
290
|
};
|
|
291
|
+
viewGroupTypes: {
|
|
292
|
+
actionButtonLabels: {
|
|
293
|
+
addGroupType: string;
|
|
294
|
+
};
|
|
295
|
+
actionMenuItems: {
|
|
296
|
+
id: number;
|
|
297
|
+
label: string;
|
|
298
|
+
ariaLabel: string;
|
|
299
|
+
iconURL: string;
|
|
300
|
+
toolTip: string;
|
|
301
|
+
isToolTipNeeded: boolean;
|
|
302
|
+
isDisabled: boolean;
|
|
303
|
+
}[];
|
|
304
|
+
tableColumns: {
|
|
305
|
+
heading: {
|
|
306
|
+
groupType: string;
|
|
307
|
+
rosterType: string;
|
|
308
|
+
description: string;
|
|
309
|
+
applicableRoles: string;
|
|
310
|
+
settings: string;
|
|
311
|
+
action: string;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
settings: {
|
|
315
|
+
allowSubGroup: string;
|
|
316
|
+
allowRoster: string;
|
|
317
|
+
allowAlternateVoting: string;
|
|
318
|
+
hasClassification: string;
|
|
319
|
+
allowEdit: string;
|
|
320
|
+
allowDelete: string;
|
|
321
|
+
};
|
|
322
|
+
errors: {
|
|
323
|
+
"2050": string;
|
|
324
|
+
"1010": string;
|
|
325
|
+
};
|
|
326
|
+
};
|
|
291
327
|
routeConfigPath: {
|
|
292
328
|
viewTenants: string;
|
|
293
329
|
viewTenantDetails: string;
|
|
@@ -65,6 +65,7 @@ export declare class ViewTenantDetailsComponent implements OnInit, OnDestroy {
|
|
|
65
65
|
createRoleScreenTexts: any;
|
|
66
66
|
roleMenuElement: HTMLElement;
|
|
67
67
|
selectedRoleInfo: RoleDetails;
|
|
68
|
+
isGroupTypesExpanded: boolean;
|
|
68
69
|
roleTypeOptions: RoleTypeOption[];
|
|
69
70
|
constructor(dialog: MatDialog, breakpointObserverService: BreakpointObserverService, tenantAppService: TenantApplicationsService, globalErrorHandlerService: GlobalErrorHandlerService, sharedService: SharedService);
|
|
70
71
|
/**
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Menu, TableColumnSchema } from '@ieeesa-npm/presentation';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { TenantApplicationsService } from '../../services/tenant-applications.service';
|
|
5
|
+
import { SharedService } from '@ieeesa-npm/shared';
|
|
6
|
+
import { GroupTypeDetails, ViewGroupTypeResponse } from '../../models/view-tenant-group-types.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Component for viewing and managing tenant group types. Fetches the configured group types associated to the selected tenant and displays in tabular view.
|
|
10
|
+
* @export
|
|
11
|
+
* @class ViewTenantGroupTypesComponent
|
|
12
|
+
* @implements {OnInit}
|
|
13
|
+
*/
|
|
14
|
+
export declare class ViewTenantGroupTypesComponent implements OnInit, OnDestroy {
|
|
15
|
+
private tenantAppService;
|
|
16
|
+
private sharedService;
|
|
17
|
+
destroy$: Subject<boolean>;
|
|
18
|
+
constants: any;
|
|
19
|
+
columnHeading: any;
|
|
20
|
+
settings: any;
|
|
21
|
+
tableRowActions: Menu[];
|
|
22
|
+
columnSchema: TableColumnSchema[];
|
|
23
|
+
groupTypes: GroupTypeDetails[];
|
|
24
|
+
appId: string;
|
|
25
|
+
constructor(tenantAppService: TenantApplicationsService, sharedService: SharedService);
|
|
26
|
+
/**
|
|
27
|
+
* Fetches group types data from the server and initializes column schema.
|
|
28
|
+
* @memberof ViewTenantGroupTypesComponent
|
|
29
|
+
*/
|
|
30
|
+
ngOnInit(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Formats raw group types data into a required format for display.
|
|
33
|
+
* @param {ViewGroupTypeResponse} groupTypeRes
|
|
34
|
+
* @return {GroupTypeDetails[]}
|
|
35
|
+
* @memberof ViewTenantGroupTypesComponent
|
|
36
|
+
*/
|
|
37
|
+
formatGroupTypesTableData(groupTypeRes: ViewGroupTypeResponse): GroupTypeDetails[];
|
|
38
|
+
/**
|
|
39
|
+
* Transforms business rule to required format in string.
|
|
40
|
+
* @param {*} rule
|
|
41
|
+
* @return {string}
|
|
42
|
+
* @memberof ViewTenantGroupTypesComponent
|
|
43
|
+
*/
|
|
44
|
+
transformBusinessRule(rule: any): string;
|
|
45
|
+
/**
|
|
46
|
+
* Initializes table column schema to display group types in tabular view.
|
|
47
|
+
* @memberof ViewTenantGroupTypesComponent
|
|
48
|
+
*/
|
|
49
|
+
initializeColumnSchema(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
|
|
52
|
+
* @memberof ViewTenantGroupTypesComponent
|
|
53
|
+
*/
|
|
54
|
+
ngOnDestroy(): void;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ViewTenantGroupTypesComponent, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ViewTenantGroupTypesComponent, "ieeesa-view-tenant-group-types", never, {}, {}, never, never, true, never>;
|
|
57
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GroupTypeConfiguration } from '@ieeesa-npm/groups';
|
|
2
|
+
import { Menu } from '@ieeesa-npm/presentation';
|
|
3
|
+
import { Role } from './roles-and-permissions.model';
|
|
4
|
+
export interface ViewGroupTypesConfiguration extends GroupTypeConfiguration {
|
|
5
|
+
roles: Role[] | null;
|
|
6
|
+
hasGroup: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ViewGroupTypeResponse {
|
|
9
|
+
status: boolean;
|
|
10
|
+
message: string;
|
|
11
|
+
body: ViewGroupTypesConfiguration[];
|
|
12
|
+
}
|
|
13
|
+
export interface GroupTypeDetails {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
rosterType: string;
|
|
17
|
+
businessRule: string;
|
|
18
|
+
roles: string;
|
|
19
|
+
hasGroup: boolean;
|
|
20
|
+
menuAction?: Menu[];
|
|
21
|
+
}
|
|
22
|
+
export declare enum GroupTypeSettings {
|
|
23
|
+
ALLOW_SUB_GROUP = "allowSubGroup",
|
|
24
|
+
ALLOW_ROSTER = "allowRoster",
|
|
25
|
+
ALLOW_ALTERNATE_VOTING = "allowAlternateVoting",
|
|
26
|
+
HAS_CLASSIFICATION = "hasClassification"
|
|
27
|
+
}
|
|
@@ -13,6 +13,7 @@ import { TenantFunctionType } from '../models/tenant-function-type.model';
|
|
|
13
13
|
import { GetRolesAndPermissionsPayload, GetRolesAndPermissionsResponse, GetRolesResponse, RoleInfo, DeleteRoleRequestPayload, DeleteRoleResponse, Role, RoleDetails, CreateModifyRoleRequestPayload, CreateModifyRoleResponse } from '../models/roles-and-permissions.model';
|
|
14
14
|
import { UpdateTenantStatusRequestPayload, UpdateTenantStatusResponse } from '../models/update-tenant-status.model';
|
|
15
15
|
import { GetRoleTypesPayload, RoleTypeConfiguration, RoleTypeOption, RoleTypeResponse } from '../models/role-type.model';
|
|
16
|
+
import { ViewGroupTypeResponse } from '../models/view-tenant-group-types.model';
|
|
16
17
|
import * as i0 from "@angular/core";
|
|
17
18
|
export declare class TenantApplicationsService {
|
|
18
19
|
private httpService;
|
|
@@ -48,19 +49,10 @@ export declare class TenantApplicationsService {
|
|
|
48
49
|
"2038": string;
|
|
49
50
|
"2039": string;
|
|
50
51
|
"2040": string;
|
|
51
|
-
/**
|
|
52
|
-
* Sets the user tenants information
|
|
53
|
-
* @param {TenantBasicInfo} tenantInfo
|
|
54
|
-
* @memberof TenantApplicationsService
|
|
55
|
-
*/
|
|
56
52
|
"2041": string;
|
|
57
53
|
"2042": string;
|
|
58
54
|
"2043": string;
|
|
59
|
-
"2044": string;
|
|
60
|
-
* Returns the tenants information
|
|
61
|
-
* @return {TenantBasicInfo}
|
|
62
|
-
* @memberof TenantApplicationsService
|
|
63
|
-
*/
|
|
55
|
+
"2044": string;
|
|
64
56
|
"2045": string;
|
|
65
57
|
"2046": string;
|
|
66
58
|
"2047": string;
|
|
@@ -326,6 +318,13 @@ export declare class TenantApplicationsService {
|
|
|
326
318
|
* @memberof TenantApplicationsService
|
|
327
319
|
*/
|
|
328
320
|
deleteRole(deleteRolePayload: DeleteRoleRequestPayload): Observable<DeleteRoleResponse>;
|
|
321
|
+
/**
|
|
322
|
+
* Gets group types from server using HttpService.
|
|
323
|
+
* @param {string} appId
|
|
324
|
+
* @return {Observable<ViewGroupTypeResponse>}
|
|
325
|
+
* @memberof TenantApplicationsService
|
|
326
|
+
*/
|
|
327
|
+
getGroupTypes(appId: string): Observable<ViewGroupTypeResponse>;
|
|
329
328
|
static ɵfac: i0.ɵɵFactoryDeclaration<TenantApplicationsService, never>;
|
|
330
329
|
static ɵprov: i0.ɵɵInjectableDeclaration<TenantApplicationsService>;
|
|
331
330
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './lib/components/create-tenant-application/create-tenant-applicat
|
|
|
4
4
|
export * from './lib/tenant-applications.component';
|
|
5
5
|
export * from './lib/components/tenant-basic-details/tenant-basic-details.component';
|
|
6
6
|
export * from './lib/components/create-modify-role/create-modify-role.component';
|
|
7
|
+
export * from './lib/components/view-tenant-group-types/view-tenant-group-types.component';
|
|
7
8
|
export * from './lib/models/app-type-config.model';
|
|
8
9
|
export * from './lib/models/app-type.model';
|
|
9
10
|
export * from './lib/models/tenant.model';
|
|
@@ -18,6 +19,7 @@ export * from './lib/models/update-tenant-status.model';
|
|
|
18
19
|
export * from './lib/models/tenant-function-type.model';
|
|
19
20
|
export * from './lib/models/role-type.model';
|
|
20
21
|
export * from './lib/models/role-menu-action.model';
|
|
22
|
+
export * from './lib/models/view-tenant-group-types.model';
|
|
21
23
|
export * from './lib/services/tenant-applications.service';
|
|
22
24
|
export * from './lib/services/tenant-permissions-map.service';
|
|
23
25
|
export * from './lib/services/tenant-permissions.service';
|