@ieeesa-npm/groups 0.7.1 → 0.7.3
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 +54 -11
- package/esm2022/lib/assets/form-validations.mjs +4 -1
- package/esm2022/lib/components/add-user-roster/add-user-roster.component.mjs +259 -22
- package/esm2022/lib/components/create-group/create-group.component.mjs +3 -3
- package/esm2022/lib/components/edit-user-roles/edit-user-roles.component.mjs +267 -33
- package/esm2022/lib/components/tree-view/tree-view.component.mjs +20 -5
- package/esm2022/lib/components/view-roster/view-roster.component.mjs +458 -98
- package/esm2022/lib/groups.component.mjs +39 -19
- package/esm2022/lib/models/add-or-edit-user-group.model.mjs +1 -1
- package/esm2022/lib/models/classification.model.mjs +2 -0
- package/esm2022/lib/models/filter-type.model.mjs +8 -0
- package/esm2022/lib/models/group-permissions.model.mjs +2 -0
- package/esm2022/lib/models/group-types.model.mjs +1 -1
- package/esm2022/lib/models/group-user-info.model.mjs +1 -1
- package/esm2022/lib/models/member-type.model.mjs +2 -0
- package/esm2022/lib/models/organization.model.mjs +2 -0
- package/esm2022/lib/models/permission-type.model.mjs +15 -0
- package/esm2022/lib/models/roster-type.model.mjs +7 -0
- package/esm2022/lib/models/table-column-schema-user-group.model.mjs +12 -0
- package/esm2022/lib/models/user.model.mjs +1 -1
- package/esm2022/lib/services/group-permissions-map-service.mjs +71 -0
- package/esm2022/lib/services/groups.service.mjs +139 -16
- package/esm2022/lib/services/user-permissions.service.mjs +43 -0
- package/esm2022/public-api.mjs +7 -1
- package/fesm2022/ieeesa-npm-groups.mjs +1367 -195
- package/fesm2022/ieeesa-npm-groups.mjs.map +1 -1
- package/lib/assets/form-validations.d.ts +2 -0
- package/lib/components/add-user-roster/add-user-roster.component.d.ts +58 -1
- package/lib/components/edit-user-roles/edit-user-roles.component.d.ts +64 -11
- package/lib/components/tree-view/tree-view.component.d.ts +5 -1
- package/lib/components/view-roster/view-roster.component.d.ts +67 -8
- package/lib/groups.component.d.ts +17 -3
- package/lib/models/add-or-edit-user-group.model.d.ts +24 -8
- package/lib/models/classification.model.d.ts +10 -0
- package/lib/models/filter-type.model.d.ts +5 -0
- package/lib/models/group-permissions.model.d.ts +9 -0
- package/lib/models/group-types.model.d.ts +1 -0
- package/lib/models/group-user-info.model.d.ts +3 -0
- package/lib/models/member-type.model.d.ts +10 -0
- package/lib/models/organization.model.d.ts +9 -0
- package/lib/models/permission-type.model.d.ts +12 -0
- package/lib/models/roster-type.model.d.ts +4 -0
- package/lib/models/table-column-schema-user-group.model.d.ts +9 -0
- package/lib/models/user.model.d.ts +20 -5
- package/lib/services/group-permissions-map-service.d.ts +8 -0
- package/lib/services/groups.service.d.ts +109 -18
- package/lib/services/user-permissions.service.d.ts +25 -0
- package/package.json +4 -4
- package/public-api.d.ts +6 -0
|
@@ -2,9 +2,11 @@ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
4
|
import { AlertsService, GlobalErrorHandlerService } from '@ieeesa-npm/utility';
|
|
5
|
-
import { FormGrid, FormModel,
|
|
5
|
+
import { FormGrid, AlignType, CheckboxOption, SelectOption, FormModel, FieldConfig, DynamicFormComponent } from '@ieeesa-npm/presentation';
|
|
6
6
|
import { GroupsService } from '../../services/groups.service';
|
|
7
|
+
import { AddOrEditUserIndividualRosterPayload, AddOrEditUserPayload } from '../../models/add-or-edit-user-group.model';
|
|
7
8
|
import { UserInfo } from '../../models/user-info.model';
|
|
9
|
+
import { GroupRosterType } from '../../models/roster-type.model';
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
9
11
|
/**
|
|
10
12
|
* Component implements the view and functionalities to add group users to roster.
|
|
@@ -33,6 +35,12 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
33
35
|
selectedUserRoles: string[];
|
|
34
36
|
userInfo: UserInfo;
|
|
35
37
|
isAddUserFormEmailSearch: boolean;
|
|
38
|
+
classifications: SelectOption[];
|
|
39
|
+
memberTypes: SelectOption[];
|
|
40
|
+
organizations: SelectOption[];
|
|
41
|
+
hasClassification: boolean;
|
|
42
|
+
groupRosterType: GroupRosterType;
|
|
43
|
+
dynamicFormComponent: DynamicFormComponent;
|
|
36
44
|
submitFormResponse: EventEmitter<any>;
|
|
37
45
|
formCancel: EventEmitter<any>;
|
|
38
46
|
constructor(groupService: GroupsService, globalErrorHandlerService: GlobalErrorHandlerService, alertService: AlertsService);
|
|
@@ -63,6 +71,18 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
63
71
|
* @memberof AddUserRosterComponent
|
|
64
72
|
*/
|
|
65
73
|
validateUserExistence(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Adds classification, Member Type and Representing Organization form controls while adding new user to an individual group roster.
|
|
76
|
+
* @memberof AddUserRosterComponent
|
|
77
|
+
*/
|
|
78
|
+
updateAddUserFormGroup(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Updates the add user form group controls by adding fieldConfig at required index.
|
|
81
|
+
* @param {number} indexPosition
|
|
82
|
+
* @param {FieldConfig} fieldConfig
|
|
83
|
+
* @memberof AddUserRosterComponent
|
|
84
|
+
*/
|
|
85
|
+
updateAddUserFormControls(indexPosition: number, fieldConfig: FieldConfig): void;
|
|
66
86
|
/**
|
|
67
87
|
* Handles add user form email search
|
|
68
88
|
* @param {string} email
|
|
@@ -92,12 +112,49 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
92
112
|
* @memberof AddUserRosterComponent
|
|
93
113
|
*/
|
|
94
114
|
onFormCancel(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Gets the classifications from master data.
|
|
117
|
+
* @memberof AddUserRosterComponent
|
|
118
|
+
*/
|
|
119
|
+
getClassifications(): void;
|
|
120
|
+
/**
|
|
121
|
+
* Gets the member types from master data.
|
|
122
|
+
* @memberof AddUserRosterComponent
|
|
123
|
+
*/
|
|
124
|
+
getMemberTypes(): void;
|
|
125
|
+
/**
|
|
126
|
+
* Gets the representing Organizations.
|
|
127
|
+
* @param {string} orgName
|
|
128
|
+
* @memberof AddUserRosterComponent
|
|
129
|
+
*/
|
|
130
|
+
getOrganizations(orgName: string): void;
|
|
131
|
+
/**
|
|
132
|
+
* Update the dropdown options of Classification, Member Type and Representing Organization form fields.
|
|
133
|
+
* @param {string} formControlName
|
|
134
|
+
* @param {string} formControlInputProperty
|
|
135
|
+
* @param {SelectOption[]} options
|
|
136
|
+
* @memberof AddUserRosterComponent
|
|
137
|
+
*/
|
|
138
|
+
updateFormControlOptions(formControlName: string, formControlInputProperty: string, options: SelectOption[]): void;
|
|
95
139
|
/**
|
|
96
140
|
* Handles the custom errors while searching user by email, validating user existence and adding new user to roster.
|
|
97
141
|
* @param {*} error
|
|
98
142
|
* @memberof AddUserRosterComponent
|
|
99
143
|
*/
|
|
100
144
|
handleErrors(error: any): void;
|
|
145
|
+
/**
|
|
146
|
+
* Handles add user form change event.
|
|
147
|
+
* @param {FormGroup[]} form
|
|
148
|
+
* @memberof AddUserRosterComponent
|
|
149
|
+
*/
|
|
150
|
+
onAddUserFormChange(form: FormGroup[]): void;
|
|
151
|
+
/**
|
|
152
|
+
* Constructs add new user payload from the form data depends on the GroupRosterType and returns.
|
|
153
|
+
* @param {*} formData
|
|
154
|
+
* @return {(AddOrEditUserPayload | AddOrEditUserIndividualRosterPayload)}
|
|
155
|
+
* @memberof AddUserRosterComponent
|
|
156
|
+
*/
|
|
157
|
+
getAddNewUserPayload(formData: any): AddOrEditUserPayload | AddOrEditUserIndividualRosterPayload;
|
|
101
158
|
/**
|
|
102
159
|
* NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
|
|
103
160
|
* @memberof AddUserRosterComponent
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { GroupsService } from '../../services/groups.service';
|
|
3
|
-
import { AlignType, CheckboxOption, FormGrid, FormModel } from '@ieeesa-npm/presentation';
|
|
3
|
+
import { AlignType, CheckboxOption, FieldConfig, FormGrid, FormModel, SelectOption, DynamicFormComponent } from '@ieeesa-npm/presentation';
|
|
4
4
|
import { FormGroup } from '@angular/forms';
|
|
5
5
|
import { GroupUserInfo } from '../../models/group-user-info.model';
|
|
6
6
|
import { Subject } from 'rxjs';
|
|
7
7
|
import { AlertsService, GlobalErrorHandlerService } from '@ieeesa-npm/utility';
|
|
8
|
+
import { AddOrEditUserIndividualRosterPayload, AddOrEditUserPayload } from '../../models/add-or-edit-user-group.model';
|
|
9
|
+
import { GroupTypeConfiguration } from '../../models/group-types.model';
|
|
10
|
+
import { GroupRosterType } from '../../models/roster-type.model';
|
|
8
11
|
import * as i0 from "@angular/core";
|
|
9
12
|
/**
|
|
10
|
-
* Component implements the functionalities to edit
|
|
13
|
+
* Component implements the view and functionalities to edit group users to roster.
|
|
11
14
|
* @class EditUserRolesComponent
|
|
12
15
|
* @implements {OnInit}
|
|
13
16
|
* @implements {OnDestroy}
|
|
@@ -24,11 +27,18 @@ export declare class EditUserRolesComponent implements OnInit, OnDestroy {
|
|
|
24
27
|
isSubmitButtonDisabled: boolean;
|
|
25
28
|
colWidth: FormGrid;
|
|
26
29
|
editUserRoleFormGroup: FormModel;
|
|
27
|
-
|
|
30
|
+
editUserRoleFormGroupRef: FormGroup;
|
|
28
31
|
userRoles: CheckboxOption[];
|
|
29
32
|
selectedUserRoleIds: string[];
|
|
30
33
|
selectedUserInfo: GroupUserInfo;
|
|
31
34
|
actionButtonAlign: AlignType;
|
|
35
|
+
classifications: SelectOption[];
|
|
36
|
+
memberTypes: SelectOption[];
|
|
37
|
+
organizations: SelectOption[];
|
|
38
|
+
groupTypes: GroupTypeConfiguration[];
|
|
39
|
+
hasClassification: boolean;
|
|
40
|
+
groupRosterType: GroupRosterType;
|
|
41
|
+
dynamicFormComponent: DynamicFormComponent;
|
|
32
42
|
submitFormResponse: EventEmitter<any>;
|
|
33
43
|
formCancel: EventEmitter<any>;
|
|
34
44
|
constructor(groupsService: GroupsService, globalErrorHandlerService: GlobalErrorHandlerService, alertService: AlertsService);
|
|
@@ -39,28 +49,41 @@ export declare class EditUserRolesComponent implements OnInit, OnDestroy {
|
|
|
39
49
|
*/
|
|
40
50
|
ngOnInit(): void;
|
|
41
51
|
/**
|
|
42
|
-
*
|
|
43
|
-
* @return -returns nothing
|
|
52
|
+
* Initialize the edit user role form group array.
|
|
44
53
|
* @memberof EditUserRolesComponent
|
|
45
54
|
*/
|
|
46
|
-
|
|
55
|
+
editUserRolesFormGroup(): void;
|
|
47
56
|
/**
|
|
48
|
-
*
|
|
57
|
+
* Adds classification, Member Type and Representing Organization form controls while editing new user to an individual group roster.
|
|
58
|
+
* @memberof AddUserRosterComponent
|
|
59
|
+
*/
|
|
60
|
+
updateEditUserRoleFormGroup(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Updates the edit user form group controls by adding fieldConfig at required index.
|
|
63
|
+
* @param {number} indexPosition
|
|
64
|
+
* @param {FieldConfig} fieldConfig
|
|
49
65
|
* @memberof EditUserRolesComponent
|
|
50
66
|
*/
|
|
51
|
-
|
|
67
|
+
updateEditUserRoleFormControls(indexPosition: number, fieldConfig: FieldConfig): void;
|
|
52
68
|
/**
|
|
53
|
-
* Handles user role selection in edit user roles form.
|
|
69
|
+
* Handles user role selection and save button enable disable in edit user roles form.
|
|
54
70
|
* @param {CheckboxOption} event
|
|
55
71
|
* @memberof EditUserRolesComponent
|
|
56
72
|
*/
|
|
57
73
|
onUserRoleSelection(event: CheckboxOption): void;
|
|
58
74
|
/**
|
|
59
|
-
* Update roles of user on form submission.
|
|
75
|
+
* Update roles and details of user on form submission.
|
|
60
76
|
* @param {FormGroup[]} form
|
|
61
77
|
* @memberof EditUserRolesComponent
|
|
62
78
|
*/
|
|
63
79
|
onEditUserRoleFormSubmit(form: FormGroup[]): void;
|
|
80
|
+
/**
|
|
81
|
+
* Constructs edit user payload from the form data depends on the GroupRosterType and returns.
|
|
82
|
+
* @param {*} formData
|
|
83
|
+
* @return {(AddOrEditUserPayload | AddOrEditUserIndividualRosterPayload)}
|
|
84
|
+
* @memberof EditUserRolesComponent
|
|
85
|
+
*/
|
|
86
|
+
getEditUserRolePayload(formData: any): AddOrEditUserPayload | AddOrEditUserIndividualRosterPayload;
|
|
64
87
|
/**
|
|
65
88
|
* Emits form cancel event.
|
|
66
89
|
* @memberof EditUserRolesComponent
|
|
@@ -72,6 +95,36 @@ export declare class EditUserRolesComponent implements OnInit, OnDestroy {
|
|
|
72
95
|
* @memberof EditUserRolesComponent
|
|
73
96
|
*/
|
|
74
97
|
getFormGroupReference(form: FormGroup[]): void;
|
|
98
|
+
/**
|
|
99
|
+
* Handles edit user role form change event.
|
|
100
|
+
* @param {FormGroup[]} form
|
|
101
|
+
* @memberof editUserRoleFormGroupRef
|
|
102
|
+
*/
|
|
103
|
+
onEditUserRoleFormChange(form: FormGroup[]): void;
|
|
104
|
+
/**
|
|
105
|
+
* Gets the classifications from master data.
|
|
106
|
+
* @memberof EditUserRolesComponent
|
|
107
|
+
*/
|
|
108
|
+
getClassifications(): void;
|
|
109
|
+
/**
|
|
110
|
+
* Gets the member types from master data.
|
|
111
|
+
* @memberof EditUserRolesComponent
|
|
112
|
+
*/
|
|
113
|
+
getMemberTypes(): void;
|
|
114
|
+
/**
|
|
115
|
+
* Gets the representing Organizations.
|
|
116
|
+
* @param {string} orgName
|
|
117
|
+
* @memberof AddUserRosterComponent
|
|
118
|
+
*/
|
|
119
|
+
getOrganizations(orgName: string): void;
|
|
120
|
+
/**
|
|
121
|
+
* Update the dropdown options of Classification, Member Type and Representing Organization form fields.
|
|
122
|
+
* @param {string} formControlName
|
|
123
|
+
* @param {string} formControlInputProperty
|
|
124
|
+
* @param {SelectOption[]} options
|
|
125
|
+
* @memberof EditUserRolesComponent
|
|
126
|
+
*/
|
|
127
|
+
updateFormControlOptions(formControlName: string, formControlInputProperty: string, options: SelectOption[]): void;
|
|
75
128
|
/**
|
|
76
129
|
* Captures the server side errors and handles it based on the custom or Http errors.
|
|
77
130
|
* @param {HttpErrorResponse} error
|
|
@@ -81,7 +134,7 @@ export declare class EditUserRolesComponent implements OnInit, OnDestroy {
|
|
|
81
134
|
handleErrors(error: any): void;
|
|
82
135
|
/**
|
|
83
136
|
* NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
|
|
84
|
-
* @memberof
|
|
137
|
+
* @memberof EditUserRolesComponent
|
|
85
138
|
*/
|
|
86
139
|
ngOnDestroy(): void;
|
|
87
140
|
static ɵfac: i0.ɵɵFactoryDeclaration<EditUserRolesComponent, never>;
|
|
@@ -7,6 +7,8 @@ import { MatTreeNodePadding } from '@angular/material/tree';
|
|
|
7
7
|
import { GroupInfo } from '../../models/group-info.model';
|
|
8
8
|
import { EditGroupAndParentInfo } from '../../models/edit-group.model';
|
|
9
9
|
import { GroupsService } from '../../services/groups.service';
|
|
10
|
+
import { PermissionType } from '../../models/permission-type.model';
|
|
11
|
+
import { GroupPermission } from '../../models/group-permissions.model';
|
|
10
12
|
import * as i0 from "@angular/core";
|
|
11
13
|
/**
|
|
12
14
|
* Dynamic Flat node creates a node structure
|
|
@@ -131,6 +133,7 @@ export declare class TreeViewComponent implements OnInit, AfterViewInit, OnDestr
|
|
|
131
133
|
plusCircleIconButton: IconButton;
|
|
132
134
|
minusCircleIconButton: IconButton;
|
|
133
135
|
editGroupAndParentGroupInfo: EditGroupAndParentInfo;
|
|
136
|
+
permissionType: typeof PermissionType;
|
|
134
137
|
menuItems: Menu[];
|
|
135
138
|
private parentGroups;
|
|
136
139
|
set parentGroupsInfo(value: GroupInfo[]);
|
|
@@ -144,6 +147,7 @@ export declare class TreeViewComponent implements OnInit, AfterViewInit, OnDestr
|
|
|
144
147
|
private deletedGroupId;
|
|
145
148
|
set deletedGroupIdInfo(id: string | undefined);
|
|
146
149
|
get deletedGroupIdInfo(): string | undefined;
|
|
150
|
+
userGroupPermissions: GroupPermission[];
|
|
147
151
|
toggleGroupClick: EventEmitter<GroupInfo>;
|
|
148
152
|
createGroupClick: EventEmitter<GroupInfo>;
|
|
149
153
|
editGroupClick: EventEmitter<EditGroupAndParentInfo>;
|
|
@@ -255,5 +259,5 @@ export declare class TreeViewComponent implements OnInit, AfterViewInit, OnDestr
|
|
|
255
259
|
*/
|
|
256
260
|
ngOnDestroy(): void;
|
|
257
261
|
static ɵfac: i0.ɵɵFactoryDeclaration<TreeViewComponent, never>;
|
|
258
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TreeViewComponent, "ieeesa-tree", never, { "parentGroupsInfo": { "alias": "parentGroupsInfo"; "required": false; }; "childGroupsInfo": { "alias": "childGroupsInfo"; "required": false; }; "isGroupSearchOrFilterActive": { "alias": "isGroupSearchOrFilterActive"; "required": false; }; "deletedGroupIdInfo": { "alias": "deletedGroupIdInfo"; "required": false; }; }, { "toggleGroupClick": "toggleGroupClick"; "createGroupClick": "createGroupClick"; "editGroupClick": "editGroupClick"; "deleteGroupClick": "deleteGroupClick"; "viewRosterClick": "viewRosterClick"; }, never, never, true, never>;
|
|
262
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TreeViewComponent, "ieeesa-tree", never, { "parentGroupsInfo": { "alias": "parentGroupsInfo"; "required": false; }; "childGroupsInfo": { "alias": "childGroupsInfo"; "required": false; }; "isGroupSearchOrFilterActive": { "alias": "isGroupSearchOrFilterActive"; "required": false; }; "deletedGroupIdInfo": { "alias": "deletedGroupIdInfo"; "required": false; }; "userGroupPermissions": { "alias": "userGroupPermissions"; "required": false; }; }, { "toggleGroupClick": "toggleGroupClick"; "createGroupClick": "createGroupClick"; "editGroupClick": "editGroupClick"; "deleteGroupClick": "deleteGroupClick"; "viewRosterClick": "viewRosterClick"; }, never, never, true, never>;
|
|
259
263
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectorRef, OnDestroy } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { Sort } from '@angular/material/sort';
|
|
4
4
|
import { MatDialog } from '@angular/material/dialog';
|
|
5
|
-
import { TableColumnSchema, TableActions,
|
|
5
|
+
import { TableColumnSchema, TableActions, AlignType, ChipOption, CheckboxOption, FiltersAndOptions } from '@ieeesa-npm/presentation';
|
|
6
6
|
import { AlertType, AlertsService, GlobalErrorHandlerService } from '@ieeesa-npm/utility';
|
|
7
7
|
import { GroupsService } from '../../services/groups.service';
|
|
8
8
|
import { User } from '../../models/user.model';
|
|
9
9
|
import { GroupUserInfo } from '../../models/group-user-info.model';
|
|
10
|
+
import { GroupRosterType } from '../../models/roster-type.model';
|
|
11
|
+
import { FilterType } from '../../models/filter-type.model';
|
|
10
12
|
import * as i0 from "@angular/core";
|
|
11
13
|
/**
|
|
12
14
|
* ViewRosterComponent implements the functionalities to add, edit, delete user to group roster, assign and modify roles(s) to the group users, and search user from roster.
|
|
@@ -14,7 +16,7 @@ import * as i0 from "@angular/core";
|
|
|
14
16
|
* @class ViewRosterComponent
|
|
15
17
|
* @implements {OnDestroy}
|
|
16
18
|
*/
|
|
17
|
-
export declare class ViewRosterComponent implements AfterViewInit, OnDestroy {
|
|
19
|
+
export declare class ViewRosterComponent implements AfterViewInit, OnDestroy, OnInit {
|
|
18
20
|
dialog: MatDialog;
|
|
19
21
|
private groupService;
|
|
20
22
|
private alertService;
|
|
@@ -29,40 +31,97 @@ export declare class ViewRosterComponent implements AfterViewInit, OnDestroy {
|
|
|
29
31
|
columnSchema: TableColumnSchema[];
|
|
30
32
|
tableData: User[];
|
|
31
33
|
selectedRoleIds: string[];
|
|
32
|
-
|
|
34
|
+
selectedMemberTypeIds: string[];
|
|
35
|
+
selectedClassificationIds: string[];
|
|
36
|
+
searchPlaceholderText: string;
|
|
37
|
+
selectedRoles: FiltersAndOptions;
|
|
38
|
+
selectedMemberTypes: FiltersAndOptions;
|
|
39
|
+
selectedClassifications: FiltersAndOptions;
|
|
33
40
|
roles: CheckboxOption[];
|
|
41
|
+
filterOptions: CheckboxOption[];
|
|
42
|
+
memberTypes: CheckboxOption[];
|
|
43
|
+
classifications: CheckboxOption[];
|
|
34
44
|
rosterActions: TableActions;
|
|
35
45
|
defaultSortedColumn: string;
|
|
36
|
-
|
|
46
|
+
dataTableClassName: string;
|
|
47
|
+
hasClassification: boolean;
|
|
37
48
|
searchTerm: string;
|
|
49
|
+
groupRosterType: GroupRosterType;
|
|
50
|
+
defaultColumnSortDirection: boolean;
|
|
51
|
+
tableColumnsForIndividual: any;
|
|
52
|
+
tableColumnsForSystemUsers: any;
|
|
53
|
+
emptyFieldValueReplacedBy: any;
|
|
38
54
|
constructor(dialog: MatDialog, groupService: GroupsService, alertService: AlertsService, cdr: ChangeDetectorRef, globalErrorHandlerService: GlobalErrorHandlerService);
|
|
55
|
+
ngOnInit(): void;
|
|
39
56
|
/**
|
|
40
57
|
* Show add new user success message when canShowMessage is set true
|
|
41
58
|
* @memberof ViewRosterComponent
|
|
42
59
|
*/
|
|
43
60
|
ngAfterViewInit(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Hides or shows roster add user, edit user and delete user actions based on user group permissions.
|
|
63
|
+
* @return {boolean}
|
|
64
|
+
* @memberof ViewRosterComponent
|
|
65
|
+
*/
|
|
66
|
+
getManageRosterActionsPermission(): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Configure Table information based on group roster type
|
|
69
|
+
* @memberof ViewRosterComponent
|
|
70
|
+
*/
|
|
71
|
+
configureTableInfo(): void;
|
|
44
72
|
/**
|
|
45
73
|
* Gets the group users by calling getGroupUsers() from groupService and sets tableData to display the users in a grid.
|
|
46
74
|
* @memberof ViewRosterComponent
|
|
47
75
|
*/
|
|
48
|
-
getGroupUsersAndInitializeTableView(): void;
|
|
76
|
+
getGroupUsersAndInitializeTableView(sortColumn: string, sortDirection: boolean): void;
|
|
77
|
+
/**
|
|
78
|
+
* Gets the groups based on the column name and sort direction.
|
|
79
|
+
* @param {Sort} sort
|
|
80
|
+
* @memberof ViewRosterComponent
|
|
81
|
+
*/
|
|
82
|
+
onSortGroupUsers(sort: Sort): void;
|
|
49
83
|
/**
|
|
50
84
|
* Gets the selected group type roles by calling getGroupTypeRoles() from groupService and sets assign roles.
|
|
51
85
|
* @memberof ViewRosterComponent
|
|
52
86
|
*/
|
|
53
87
|
getRoles(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Gets the classification by calling getClassifications() from groupService and sets classifications.
|
|
90
|
+
* @memberof ViewUserRosterComponent
|
|
91
|
+
*/
|
|
92
|
+
getClassifications(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Gets the member types by calling getMemberTypes() from groupService and sets member types.
|
|
95
|
+
* @memberof ViewUserRosterComponent
|
|
96
|
+
*/
|
|
97
|
+
getMemberTypes(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Sets the selected filter options for Member Type or Classification filter depends on the selection.
|
|
100
|
+
* @param {ChipOption} option
|
|
101
|
+
* @memberof ViewRosterComponent
|
|
102
|
+
*/
|
|
103
|
+
setSelectedFilterOptions(option: ChipOption): void;
|
|
54
104
|
/**
|
|
55
105
|
* Gets the group users by calling searchGroupUsers() from groupService and sets tableData to display the users in a grid.
|
|
56
106
|
* @param {string} searchTerm -searchTerm can be user name or email and user is searched based on the email or name.
|
|
57
107
|
* @memberof ViewRosterComponent
|
|
58
108
|
*/
|
|
59
109
|
onSearchGroupUsers(searchTerm: string): void;
|
|
110
|
+
/**
|
|
111
|
+
* Sets the selected options of filters and returns id of selected options
|
|
112
|
+
* @param {FiltersAndOptions[]} selectedOptions
|
|
113
|
+
* @param {FilterType} filterType
|
|
114
|
+
* @param {FiltersAndOptions} selectedFilterOptions
|
|
115
|
+
* @return {*}
|
|
116
|
+
* @memberof ViewRosterComponent
|
|
117
|
+
*/
|
|
118
|
+
getSelectedFilterOptionsAndIds(selectedOptions: FiltersAndOptions[], filterType: FilterType, selectedFilterOptions: FiltersAndOptions, selectedFilterIds: string[]): void;
|
|
60
119
|
/**
|
|
61
120
|
* Gets the group users by calling getGroupUsersByRoles() from groupService and sets tableData to display the users in a grid.
|
|
62
121
|
* @param {ChipOption[] | | CheckboxOption[]} roles
|
|
63
122
|
* @memberof ViewRosterComponent
|
|
64
123
|
*/
|
|
65
|
-
|
|
124
|
+
onFilterGroupUsers(selectedOptions: FiltersAndOptions[]): void;
|
|
66
125
|
/**
|
|
67
126
|
* Handles the custom errors while retrieving groups users, roles, search users, filter user by roles.
|
|
68
127
|
* @param {*} error
|
|
@@ -10,6 +10,9 @@ import { AlertType, BreakpointObserverService, AlertsService, GlobalErrorHandler
|
|
|
10
10
|
import { GroupFunctionType } from './models/group-function-type.model';
|
|
11
11
|
import { GetGroupsPayload } from './models/view-group.model';
|
|
12
12
|
import { EditGroupAndParentInfo } from './models/edit-group.model';
|
|
13
|
+
import { UserPermissionsService } from './services/user-permissions.service';
|
|
14
|
+
import { GroupPermission, UserPermission } from './models/group-permissions.model';
|
|
15
|
+
import { PermissionType } from './models/permission-type.model';
|
|
13
16
|
import * as i0 from "@angular/core";
|
|
14
17
|
/**
|
|
15
18
|
* Groups component is a wrapper or container component for groups management reusable component and in this component integrates all group management functionalities and this will be entry component for managing groups when it is consumed in other applications.
|
|
@@ -21,6 +24,7 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
21
24
|
alertService: AlertsService;
|
|
22
25
|
private breakpointObserverService;
|
|
23
26
|
globalErrorHandlerService: GlobalErrorHandlerService;
|
|
27
|
+
private userPermissionsService;
|
|
24
28
|
destroy$: Subject<boolean>;
|
|
25
29
|
dialogRef: any;
|
|
26
30
|
constants: any;
|
|
@@ -52,7 +56,8 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
52
56
|
};
|
|
53
57
|
applicationId: string;
|
|
54
58
|
apiBaseURL: string;
|
|
55
|
-
|
|
59
|
+
userPermissions: UserPermission[];
|
|
60
|
+
permissionType: typeof PermissionType;
|
|
56
61
|
functionType: GroupFunctionType;
|
|
57
62
|
alignmentType: typeof AlignType;
|
|
58
63
|
isSorting: boolean;
|
|
@@ -60,13 +65,22 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
60
65
|
searchType: SearchType;
|
|
61
66
|
minCharacterToSearch: number;
|
|
62
67
|
trimmedSearchTerm: string;
|
|
63
|
-
|
|
68
|
+
userGroupPermissions: GroupPermission[];
|
|
69
|
+
supportMessage: string;
|
|
70
|
+
constructor(dialog: MatDialog, groupsService: GroupsService, alertService: AlertsService, breakpointObserverService: BreakpointObserverService, globalErrorHandlerService: GlobalErrorHandlerService, userPermissionsService: UserPermissionsService);
|
|
64
71
|
/**
|
|
65
72
|
* Initialize the groups component.
|
|
66
73
|
* @return -returns nothing
|
|
67
74
|
* @memberof GroupsComponent
|
|
68
75
|
*/
|
|
69
76
|
ngOnInit(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Validates permission based access for provided feature.
|
|
79
|
+
* @param {PermissionType} permissionType
|
|
80
|
+
* @return {boolean}
|
|
81
|
+
* @memberof GroupsComponent
|
|
82
|
+
*/
|
|
83
|
+
validateAccess(permissionType: PermissionType): boolean;
|
|
70
84
|
/**
|
|
71
85
|
* Sets the dialog options for create group modal and calls openModal method.
|
|
72
86
|
* @param {GroupInfo} [parentGroupInfo] -An optional parameter. Parent group info to be passed for create child group.
|
|
@@ -186,5 +200,5 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
186
200
|
*/
|
|
187
201
|
ngOnDestroy(): void;
|
|
188
202
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupsComponent, never>;
|
|
189
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GroupsComponent, "ieeesa-groups", never, { "groupsPageInfo": { "alias": "groupsPageInfo"; "required": false; }; "applicationId": { "alias": "applicationId"; "required": false; }; "apiBaseURL": { "alias": "apiBaseURL"; "required": false; }; "
|
|
203
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GroupsComponent, "ieeesa-groups", never, { "groupsPageInfo": { "alias": "groupsPageInfo"; "required": false; }; "applicationId": { "alias": "applicationId"; "required": false; }; "apiBaseURL": { "alias": "apiBaseURL"; "required": false; }; "userPermissions": { "alias": "userPermissions"; "required": false; }; }, {}, never, never, true, never>;
|
|
190
204
|
}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
export interface AddOrEditUserPayload {
|
|
2
|
-
payload: {
|
|
3
|
-
groupId: string;
|
|
4
|
-
userId: string;
|
|
5
|
-
roles: string[];
|
|
6
|
-
email: string;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
1
|
export interface AddOrEditGroupUserDetailsResponse {
|
|
10
2
|
status: boolean;
|
|
11
3
|
message: string;
|
|
@@ -13,3 +5,27 @@ export interface AddOrEditGroupUserDetailsResponse {
|
|
|
13
5
|
errorCodes: string[];
|
|
14
6
|
};
|
|
15
7
|
}
|
|
8
|
+
export interface AddOrEditUserRolePayload {
|
|
9
|
+
groupId: string;
|
|
10
|
+
userId: string;
|
|
11
|
+
roles: string[];
|
|
12
|
+
email: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AddOrEditIndividualRosterPayload extends AddOrEditUserRolePayload {
|
|
15
|
+
classification?: {
|
|
16
|
+
classificationId: string;
|
|
17
|
+
};
|
|
18
|
+
organization: {
|
|
19
|
+
orgId: string;
|
|
20
|
+
orgName: string;
|
|
21
|
+
};
|
|
22
|
+
memberStatus: {
|
|
23
|
+
memberStatusId: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface AddOrEditUserPayload {
|
|
27
|
+
payload: AddOrEditUserRolePayload;
|
|
28
|
+
}
|
|
29
|
+
export interface AddOrEditUserIndividualRosterPayload {
|
|
30
|
+
payload: AddOrEditIndividualRosterPayload;
|
|
31
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum PermissionType {
|
|
2
|
+
VIEW_GROUPS = "VIEW_GROUPS",
|
|
3
|
+
CREATE_ROOT_GROUP = "CREATE_ROOT_GROUP",
|
|
4
|
+
CREATE_SUBGROUP = "CREATE_SUBGROUP",
|
|
5
|
+
EDIT_GROUP = "EDIT_GROUP",
|
|
6
|
+
DELETE_GROUP = "DELETE_GROUP",
|
|
7
|
+
MANAGE_SYSTEM_USERS = "MANAGE_SYSTEM_USERS",
|
|
8
|
+
VIEW_GROUP_OFFICERS = "VIEW_GROUP_OFFICERS",
|
|
9
|
+
MANAGE_GROUP_OFFICERS = "MANAGE_GROUP_OFFICERS",
|
|
10
|
+
VIEW_GROUP_MEMBERS = "VIEW_GROUP_MEMBERS",
|
|
11
|
+
MANAGE_GROUP_MEMBERS = "MANAGE_GROUP_MEMBERS"
|
|
12
|
+
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import { Classification } from './classification.model';
|
|
2
|
+
import { MemberType } from './member-type.model';
|
|
3
|
+
import { Organization } from './organization.model';
|
|
1
4
|
import { Role } from './role.model';
|
|
2
5
|
export interface User {
|
|
3
6
|
userId: string;
|
|
4
7
|
name: string;
|
|
5
8
|
email: string;
|
|
6
|
-
role: string;
|
|
9
|
+
role: string | null;
|
|
10
|
+
classification: string | null;
|
|
11
|
+
memberStatus: string | null;
|
|
12
|
+
organization: string | null;
|
|
13
|
+
employer: string | null;
|
|
7
14
|
checked?: boolean;
|
|
8
15
|
}
|
|
9
16
|
export interface GetGroupUsersResponse {
|
|
@@ -14,18 +21,26 @@ export interface GetGroupUsersResponse {
|
|
|
14
21
|
name: string;
|
|
15
22
|
email: string;
|
|
16
23
|
rolesList: Role[];
|
|
24
|
+
classification: Classification | null;
|
|
25
|
+
memberStatus: MemberType | null;
|
|
26
|
+
organization: Organization | null;
|
|
27
|
+
employer: string | null;
|
|
17
28
|
}[];
|
|
18
29
|
}
|
|
19
|
-
export interface
|
|
30
|
+
export interface FilterUsersPayload {
|
|
20
31
|
payload: {
|
|
21
32
|
groupId: string;
|
|
22
|
-
|
|
33
|
+
filterByRoleClassificationMemberStatusIds: string[];
|
|
34
|
+
sortColumn: string;
|
|
35
|
+
ascendingOrder: boolean;
|
|
23
36
|
};
|
|
24
37
|
}
|
|
25
38
|
export interface SearchUsersPayload {
|
|
26
39
|
payload: {
|
|
27
40
|
groupId: string;
|
|
28
|
-
|
|
29
|
-
|
|
41
|
+
searchByNameOrEmailOrRepOrg: string;
|
|
42
|
+
filterByRoleClassificationMemberStatusIds: string[];
|
|
43
|
+
sortColumn: string;
|
|
44
|
+
ascendingOrder: boolean;
|
|
30
45
|
};
|
|
31
46
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GroupPermission } from '../models/group-permissions.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class GroupPermissionsMapService {
|
|
4
|
+
groupPermissions: GroupPermission[];
|
|
5
|
+
getGroupPermissions(): GroupPermission[];
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GroupPermissionsMapService, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GroupPermissionsMapService>;
|
|
8
|
+
}
|