@ieeesa-npm/tenants 0.5.1 → 0.5.2
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 +6 -0
- package/esm2022/lib/components/create-tenant-application/create-tenant-application.component.mjs +73 -6
- package/esm2022/lib/components/tenant-basic-details/tenant-basic-details.component.mjs +3 -3
- package/esm2022/lib/components/view-tenant-details/view-tenant-details.component.mjs +68 -4
- package/esm2022/lib/models/required-profile-fields.model.mjs +2 -0
- package/esm2022/lib/services/tenant-applications.service.mjs +15 -1
- package/fesm2022/ieeesa-npm-tenants.mjs +161 -10
- package/fesm2022/ieeesa-npm-tenants.mjs.map +1 -1
- package/lib/components/create-tenant-application/create-tenant-application.component.d.ts +9 -0
- package/lib/components/tenant-basic-details/tenant-basic-details.component.d.ts +1 -1
- package/lib/components/view-tenant-details/view-tenant-details.component.d.ts +8 -0
- package/lib/models/required-profile-fields.model.d.ts +25 -0
- package/lib/services/tenant-applications.service.d.ts +12 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ import { TenantApplicationsService } from '../../services/tenant-applications.se
|
|
|
6
6
|
import { CreateTenantRequestPayload, NewTenantInfo, TenantBasicInfo } from '../../models/tenant.model';
|
|
7
7
|
import { SharedService } from '@ieeesa-npm/shared';
|
|
8
8
|
import { TenantFunctionType } from '../../models/tenant-function-type.model';
|
|
9
|
+
import { RequiredProfileFieldOption, RequiredProfileFieldsConfiguration } from '../../models/required-profile-fields.model';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class CreateTenantApplicationComponent implements OnInit, OnDestroy {
|
|
11
12
|
fileUploadService: FileUploadService;
|
|
@@ -33,9 +34,13 @@ export declare class CreateTenantApplicationComponent implements OnInit, OnDestr
|
|
|
33
34
|
selectedColor: string;
|
|
34
35
|
selectedAppTypeOption: RadioOption;
|
|
35
36
|
tenantFunctionType: TenantFunctionType;
|
|
37
|
+
tenantFunctionTypeEnum: typeof TenantFunctionType;
|
|
36
38
|
selectedTenantInfo: TenantBasicInfo | undefined;
|
|
37
39
|
isAppLogoModified: boolean;
|
|
38
40
|
updatedTenantBasicInfo: NewTenantInfo;
|
|
41
|
+
requiredProfileFieldsConfiguration?: RequiredProfileFieldsConfiguration;
|
|
42
|
+
requiredProfileFieldOptions: RequiredProfileFieldOption[];
|
|
43
|
+
private requiredProfileFieldsInitialState;
|
|
39
44
|
constructor(fileUploadService: FileUploadService, tenantAppService: TenantApplicationsService, sharedService: SharedService);
|
|
40
45
|
ngOnInit(): void;
|
|
41
46
|
/**
|
|
@@ -69,6 +74,10 @@ export declare class CreateTenantApplicationComponent implements OnInit, OnDestr
|
|
|
69
74
|
* @memberof CreateTenantApplicationComponent
|
|
70
75
|
*/
|
|
71
76
|
editTenant(): void;
|
|
77
|
+
getRequiredProfileFields(): void;
|
|
78
|
+
private captureRequiredProfileFieldsState;
|
|
79
|
+
private hasRequiredProfileFieldsChanges;
|
|
80
|
+
private updateRequiredProfileFields;
|
|
72
81
|
/**
|
|
73
82
|
* Constructs create tenant payload from the form data and returns.
|
|
74
83
|
* @param {*} formData
|
|
@@ -470,5 +470,5 @@ export declare class TenantBasicDetailsComponent implements OnDestroy {
|
|
|
470
470
|
*/
|
|
471
471
|
ngOnDestroy(): void;
|
|
472
472
|
static ɵfac: i0.ɵɵFactoryDeclaration<TenantBasicDetailsComponent, never>;
|
|
473
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TenantBasicDetailsComponent, "ieeesa-tenant-basic-details", never, { "tenantDetails": { "alias": "tenantDetails"; "required": false; }; }, {}, never,
|
|
473
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TenantBasicDetailsComponent, "ieeesa-tenant-basic-details", never, { "tenantDetails": { "alias": "tenantDetails"; "required": false; }; }, {}, never, ["[afterFeatures]"], true, never>;
|
|
474
474
|
}
|
|
@@ -14,6 +14,7 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
14
14
|
import { GetRolesAndPermissionsPayload, RolesAndPermissions, PaginationInfo, RoleDetails } from '../../models/roles-and-permissions.model';
|
|
15
15
|
import { PermissionType } from '../../models/permission-type.model';
|
|
16
16
|
import { RoleTypeOption } from '../../models/role-type.model';
|
|
17
|
+
import { RequiredProfileFieldOption, RequiredProfileFieldsConfiguration } from '../../models/required-profile-fields.model';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
export declare class ViewTenantDetailsComponent implements OnInit, OnDestroy {
|
|
19
20
|
dialog: MatDialog;
|
|
@@ -77,6 +78,9 @@ export declare class ViewTenantDetailsComponent implements OnInit, OnDestroy {
|
|
|
77
78
|
roleMenuElement: HTMLElement;
|
|
78
79
|
selectedRoleInfo: RoleDetails;
|
|
79
80
|
isGroupTypesExpanded: boolean;
|
|
81
|
+
requiredProfileFieldsConfiguration?: RequiredProfileFieldsConfiguration;
|
|
82
|
+
private requiredProfileFieldsInitialState;
|
|
83
|
+
requiredProfileFieldOptions: RequiredProfileFieldOption[];
|
|
80
84
|
roleTypeOptions: RoleTypeOption[];
|
|
81
85
|
/** Feature ids captured before the edit dialog opens, used to detect a feature list change on save. */
|
|
82
86
|
private featureIdsBeforeEdit;
|
|
@@ -99,6 +103,10 @@ export declare class ViewTenantDetailsComponent implements OnInit, OnDestroy {
|
|
|
99
103
|
* @memberof ViewTenantDetailsComponent
|
|
100
104
|
*/
|
|
101
105
|
showTenantDetails(accordionInfo: AccordionInfo, expanded: boolean): void;
|
|
106
|
+
getRequiredProfileFields(): void;
|
|
107
|
+
hasRequiredProfileFieldsChanges(): boolean;
|
|
108
|
+
private captureRequiredProfileFieldsState;
|
|
109
|
+
updateRequiredProfileFields(): void;
|
|
102
110
|
/**
|
|
103
111
|
* Fetches the configured roles of the selected tenant and creates the column schema.
|
|
104
112
|
* @memberof ViewTenantDetailsComponent
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface RequiredProfileFieldOption {
|
|
2
|
+
field: string;
|
|
3
|
+
label: string;
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface RequiredProfileFieldsValue {
|
|
7
|
+
requiredFields: string[];
|
|
8
|
+
}
|
|
9
|
+
export interface RequiredProfileFieldsConfiguration {
|
|
10
|
+
configFieldId: string;
|
|
11
|
+
configFieldName: string;
|
|
12
|
+
configFieldValue: RequiredProfileFieldsValue;
|
|
13
|
+
}
|
|
14
|
+
export interface RequiredProfileFieldsResponse {
|
|
15
|
+
status: boolean;
|
|
16
|
+
body?: RequiredProfileFieldsConfiguration[];
|
|
17
|
+
}
|
|
18
|
+
export interface UpdateRequiredProfileFieldsPayload {
|
|
19
|
+
payload: {
|
|
20
|
+
appId: string;
|
|
21
|
+
configFieldName: string;
|
|
22
|
+
configFieldId: string;
|
|
23
|
+
configFieldValue: RequiredProfileFieldsValue;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -16,6 +16,7 @@ import { UpdateTenantStatusRequestPayload, UpdateTenantStatusResponse } from '..
|
|
|
16
16
|
import { GetRoleTypesPayload, RoleTypeConfiguration, RoleTypeOption, RoleTypeResponse } from '../models/role-type.model';
|
|
17
17
|
import { ViewGroupTypeResponse } from '../models/view-tenant-group-types.model';
|
|
18
18
|
import { CreateGroupTypeRequestPayload, CreateGroupTypeResponse, CreatedOrModifiedGroupTypeInfo, GetRosterTypeOrSettingsResponse } from '../models/create-group-type.model';
|
|
19
|
+
import { RequiredProfileFieldsResponse, UpdateRequiredProfileFieldsPayload } from '../models/required-profile-fields.model';
|
|
19
20
|
import * as i0 from "@angular/core";
|
|
20
21
|
export declare class TenantApplicationsService {
|
|
21
22
|
private httpService;
|
|
@@ -46,7 +47,12 @@ export declare class TenantApplicationsService {
|
|
|
46
47
|
"2033": string;
|
|
47
48
|
"2034": string;
|
|
48
49
|
"2035": string;
|
|
49
|
-
"2036": string;
|
|
50
|
+
"2036": string; /**
|
|
51
|
+
* Gets tenant details from server using HttpService
|
|
52
|
+
* @param {string} appId
|
|
53
|
+
* @return {Observable<TenantDetailsResponse>}
|
|
54
|
+
* @memberof TenantApplicationsService
|
|
55
|
+
*/
|
|
50
56
|
"2037": string;
|
|
51
57
|
"2038": string;
|
|
52
58
|
"2039": string;
|
|
@@ -335,6 +341,11 @@ export declare class TenantApplicationsService {
|
|
|
335
341
|
* @memberof TenantApplicationsService
|
|
336
342
|
*/
|
|
337
343
|
updateTenantStatus(updateTenantStatusPayload: UpdateTenantStatusRequestPayload): Observable<UpdateTenantStatusResponse>;
|
|
344
|
+
getRequiredProfileFields(appId: string): Observable<RequiredProfileFieldsResponse>;
|
|
345
|
+
updateRequiredProfileFields(payload: UpdateRequiredProfileFieldsPayload): Observable<{
|
|
346
|
+
status: boolean;
|
|
347
|
+
message: string;
|
|
348
|
+
}>;
|
|
338
349
|
/**
|
|
339
350
|
* It generates Feature list from checkbox options generated in form array.
|
|
340
351
|
* @param {CheckboxOption[]} features
|