@ieeesa-npm/tenants 0.1.3 → 0.1.4
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 +39 -1
- package/esm2022/lib/components/view-tenant-details/view-tenant-details.component.mjs +146 -7
- package/esm2022/lib/components/view-tenants-list/view-tenants-list.component.mjs +1 -1
- package/esm2022/lib/models/roles-and-permissions.model.mjs +2 -0
- package/esm2022/lib/services/tenant-applications.service.mjs +28 -1
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/ieeesa-npm-tenants.mjs +215 -6
- package/fesm2022/ieeesa-npm-tenants.mjs.map +1 -1
- package/lib/components/view-tenant-details/view-tenant-details.component.d.ts +39 -1
- package/lib/models/roles-and-permissions.model.d.ts +36 -0
- package/lib/services/tenant-applications.service.d.ts +18 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { BreakpointObserverService, GlobalErrorHandlerService } from '@ieeesa-npm/utility';
|
|
3
|
-
import { AccordionInfo, AlignType, SlideToggleOption } from '@ieeesa-npm/presentation';
|
|
3
|
+
import { AccordionInfo, Menu, PaginatorConfig, TableActions, AlignType, SlideToggleOption, TableColumnSchema } from '@ieeesa-npm/presentation';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import { TenantInfo } from '../../models/tenants.model';
|
|
6
6
|
import { TenantApplicationsService } from '../../services/tenant-applications.service';
|
|
7
7
|
import { UserPermission } from '../../models/tenants-permission.model';
|
|
8
8
|
import { SharedService } from '@ieeesa-npm/shared';
|
|
9
9
|
import { TenantsRoutesConfig } from '../../models/route-config.model';
|
|
10
|
+
import { GetRolesAndPermissionsPayload, RolesAndPermissions } from '../../models/roles-and-permissions.model';
|
|
11
|
+
import { PageEvent } from '@angular/material/paginator';
|
|
10
12
|
import { MatDialog } from '@angular/material/dialog';
|
|
11
13
|
import * as i0 from "@angular/core";
|
|
12
14
|
export declare class ViewTenantDetailsComponent implements OnInit, OnDestroy {
|
|
@@ -30,6 +32,18 @@ export declare class ViewTenantDetailsComponent implements OnInit, OnDestroy {
|
|
|
30
32
|
};
|
|
31
33
|
tenantDetails: TenantInfo;
|
|
32
34
|
accordionInfoList: AccordionInfo[];
|
|
35
|
+
appId: string;
|
|
36
|
+
iconSize: any;
|
|
37
|
+
rolesAndPermissionsTableCaption: any;
|
|
38
|
+
rolesAndPermissionsTableHeaderName: any;
|
|
39
|
+
rolesAndPermissionsTableSupportMessage: any;
|
|
40
|
+
permissionsColumnClassNumber: number;
|
|
41
|
+
menuItems: Menu[];
|
|
42
|
+
columnSchema: TableColumnSchema[];
|
|
43
|
+
tableData: RolesAndPermissions[];
|
|
44
|
+
isRolesAndPermissionsExpanded: boolean;
|
|
45
|
+
paginatorConfig: PaginatorConfig;
|
|
46
|
+
tableActions: TableActions;
|
|
33
47
|
viewTenantsRouteUrl: string;
|
|
34
48
|
alignmentType: typeof AlignType;
|
|
35
49
|
dialogRef: any;
|
|
@@ -45,6 +59,30 @@ export declare class ViewTenantDetailsComponent implements OnInit, OnDestroy {
|
|
|
45
59
|
* @memberof ViewTenantDetailsComponent
|
|
46
60
|
*/
|
|
47
61
|
getTenantDetails(appId: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* Display the corresponding tenant basic or feature details based on selected accordion.
|
|
64
|
+
* @param {AccordionInfo} accordionInfo
|
|
65
|
+
* @param {boolean} expanded
|
|
66
|
+
* @memberof ViewTenantDetailsComponent
|
|
67
|
+
*/
|
|
68
|
+
showTenantDetails(accordionInfo: AccordionInfo, expanded: boolean): void;
|
|
69
|
+
/**
|
|
70
|
+
* Fetches the configured roles of the selected tenant and creates the column schema.
|
|
71
|
+
* @memberof ViewTenantDetailsComponent
|
|
72
|
+
*/
|
|
73
|
+
getRolesAndInitializeTableSchema(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Fetches the roles and permissions mappings for the selected tenant and and initialize table view.
|
|
76
|
+
* @param {GetRolesAndPermissionsPayload} payload
|
|
77
|
+
* @memberof ViewTenantDetailsComponent
|
|
78
|
+
*/
|
|
79
|
+
getRolesAndPermissionsAndInitializeTableView(payload: GetRolesAndPermissionsPayload): void;
|
|
80
|
+
/**
|
|
81
|
+
* Fetch the roles and permissions records based on offset and page size while the pagination changes.
|
|
82
|
+
* @param {PageEvent} pageEvent
|
|
83
|
+
* @memberof ViewTenantDetailsComponent
|
|
84
|
+
*/
|
|
85
|
+
onTablePaginationChange(pageEvent: PageEvent): void;
|
|
48
86
|
/**
|
|
49
87
|
* Keeps track of the accordion based on the element's ID in DOM tree.
|
|
50
88
|
* @memberof ViewTenantDetailsComponent
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface RolesAndPermissions {
|
|
2
|
+
permission: string;
|
|
3
|
+
roleIdsList: string[];
|
|
4
|
+
}
|
|
5
|
+
export interface Role {
|
|
6
|
+
roleId: string;
|
|
7
|
+
roleName: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GetRolesResponse {
|
|
10
|
+
status: boolean;
|
|
11
|
+
message: string;
|
|
12
|
+
body?: Role[] | null | {
|
|
13
|
+
errorCodes: string[];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface GetRolesAndPermissionsPayload {
|
|
17
|
+
payload: {
|
|
18
|
+
offset: number;
|
|
19
|
+
pageSize: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface RolesAndPermissionsMapping {
|
|
23
|
+
permissionId: string;
|
|
24
|
+
permissionName: string;
|
|
25
|
+
roleList: Role[];
|
|
26
|
+
}
|
|
27
|
+
export interface GetRolesAndPermissionsResponse {
|
|
28
|
+
status: boolean;
|
|
29
|
+
message: string;
|
|
30
|
+
body: {
|
|
31
|
+
totalRecords: number;
|
|
32
|
+
rolePermissionDetails: RolesAndPermissionsMapping[] | null | {
|
|
33
|
+
errorCodes: string[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -10,6 +10,7 @@ import { CheckboxOption, RadioOption } from '@ieeesa-npm/presentation';
|
|
|
10
10
|
import { FeatureId, Features, GetFeaturesResponse } from '../models/features.model';
|
|
11
11
|
import { AppTypeConfig, GetAppTypesResponse } from '../models/app-type-config.model';
|
|
12
12
|
import { TenantPermissionsService } from './tenant-permissions.service';
|
|
13
|
+
import { GetRolesAndPermissionsPayload, GetRolesAndPermissionsResponse, GetRolesResponse } from '../models/roles-and-permissions.model';
|
|
13
14
|
import { UpdateTenantStatusRequestPayload, UpdateTenantStatusResponse } from '../models/update-tenant-status.model';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
16
|
export declare class TenantApplicationsService {
|
|
@@ -18,6 +19,8 @@ export declare class TenantApplicationsService {
|
|
|
18
19
|
private tenantPermissionsMapService;
|
|
19
20
|
tenantsText: {
|
|
20
21
|
"2050": string;
|
|
22
|
+
"3007": string;
|
|
23
|
+
"3009": string;
|
|
21
24
|
};
|
|
22
25
|
apiBaseUrl: string;
|
|
23
26
|
userPermission: UserPermission[];
|
|
@@ -112,6 +115,21 @@ export declare class TenantApplicationsService {
|
|
|
112
115
|
* @memberof TenantApplicationsService
|
|
113
116
|
*/
|
|
114
117
|
getFeatures(): Observable<GetFeaturesResponse>;
|
|
118
|
+
/**
|
|
119
|
+
* Gets list of roles from server using HttpService.
|
|
120
|
+
* @param {string} appId
|
|
121
|
+
* @return {*} {Observable<GetRolesResponse>}
|
|
122
|
+
* @memberof TenantApplicationsService
|
|
123
|
+
*/
|
|
124
|
+
getRoles(appId: string): Observable<GetRolesResponse>;
|
|
125
|
+
/**
|
|
126
|
+
* Gets list of roles and permissions mappings from server using HttpService.
|
|
127
|
+
* @param {string} appId
|
|
128
|
+
* @param {GetRolesAndPermissionsPayload} payload
|
|
129
|
+
* @return {*} {Observable<GetRolesAndPermissionsResponse>}
|
|
130
|
+
* @memberof TenantApplicationsService
|
|
131
|
+
*/
|
|
132
|
+
getRolesAndPermissionsMappings(appId: string, payload: GetRolesAndPermissionsPayload): Observable<GetRolesAndPermissionsResponse>;
|
|
115
133
|
/**
|
|
116
134
|
* Gets list of application types from server using HttpService.
|
|
117
135
|
* @return {Observable<GetAppTypesResponse>}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './lib/models/permission-type.model';
|
|
|
12
12
|
export * from './lib/models/tenants-permission.model';
|
|
13
13
|
export * from './lib/models/route-config.model';
|
|
14
14
|
export * from './lib/models/table-column-schema-view-tenant-list.model';
|
|
15
|
+
export * from './lib/models/roles-and-permissions.model';
|
|
15
16
|
export * from './lib/models/update-tenant-status.model';
|
|
16
17
|
export * from './lib/services/tenant-applications.service';
|
|
17
18
|
export * from './lib/services/tenant-permissions-map.service';
|