@ieeesa-npm/groups 0.12.8 → 0.13.0

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.
@@ -2,7 +2,7 @@ import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import { Subject } from 'rxjs';
4
4
  import { AlertType, AlertsService, GlobalErrorHandlerService } from '@ieeesa-npm/utility';
5
- import { FormGrid, AlignType, CheckboxOption, SelectOption, FormModel, FieldConfig, DynamicFormComponent } from '@ieeesa-npm/presentation';
5
+ import { FormGrid, AlignType, CheckboxOption, SelectOption, FormModel, FieldConfig, DynamicFormComponent, AutoCompleteOption } from '@ieeesa-npm/presentation';
6
6
  import { GroupsService } from '../../services/groups.service';
7
7
  import { AddOrEditUserIndividualRosterPayload, AddOrEditUserPayload } from '../../models/add-or-edit-user-group.model';
8
8
  import { UserInfo } from '../../models/user-info.model';
@@ -42,6 +42,7 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
42
42
  hasClassification: boolean;
43
43
  groupRosterType: GroupRosterType;
44
44
  isUserExist: boolean;
45
+ selectedOrganizations: AutoCompleteOption[];
45
46
  dynamicFormComponent: DynamicFormComponent;
46
47
  submitFormResponse: EventEmitter<any>;
47
48
  formCancel: EventEmitter<any>;
@@ -196,6 +197,12 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
196
197
  * @memberof AddUserRosterComponent
197
198
  */
198
199
  showAlertMessage(message: string | string[], alertType: AlertType, isHtmlContent?: boolean): void;
200
+ /**
201
+ * Gets selected organizations.
202
+ * @param {AutoCompleteOption[]} selectedOrg
203
+ * @memberof AddUserRosterComponent
204
+ */
205
+ getSelectedOrganizations(selectedOrg: AutoCompleteOption[]): void;
199
206
  /**
200
207
  * NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
201
208
  * @memberof AddUserRosterComponent
@@ -62,7 +62,11 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
62
62
  };
63
63
  };
64
64
  characterLimit: {
65
- character500: number;
65
+ character500: number; /**
66
+ * Initialize the create group form group array and component.
67
+ * @return -returns nothing
68
+ * @memberof CreateGroupComponent
69
+ */
66
70
  character15: number;
67
71
  character1500: number;
68
72
  character2000: number;
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { GroupsService } from '../../services/groups.service';
3
- import { AlignType, CheckboxOption, DynamicFormComponent, FieldConfig, FormGrid, FormModel, SelectOption } from '@ieeesa-npm/presentation';
3
+ import { AlignType, AutoCompleteOption, CheckboxOption, DynamicFormComponent, FieldConfig, FormGrid, FormModel, SelectOption } 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';
@@ -38,6 +38,8 @@ export declare class EditUserRolesComponent implements OnInit, OnDestroy {
38
38
  groupTypes: GroupTypeConfiguration[];
39
39
  hasClassification: boolean;
40
40
  groupRosterType: GroupRosterType;
41
+ representingOrganizations: SelectOption[];
42
+ orgSearchValue: string;
41
43
  dynamicFormComponent: DynamicFormComponent;
42
44
  submitFormResponse: EventEmitter<any>;
43
45
  formCancel: EventEmitter<any>;
@@ -58,6 +60,12 @@ export declare class EditUserRolesComponent implements OnInit, OnDestroy {
58
60
  * @memberof AddUserRosterComponent
59
61
  */
60
62
  updateEditUserRoleFormGroup(): void;
63
+ /**
64
+ * Gets selected organizations.
65
+ * @param {AutoCompleteOption[]} selectedOrg
66
+ * @memberof EditUserRolesComponent
67
+ */
68
+ getSelectedOrganizations(selectedOrg: AutoCompleteOption[]): void;
61
69
  /**
62
70
  * Updates the edit user form group controls by adding fieldConfig at required index.
63
71
  * @param {number} indexPosition
@@ -7,6 +7,7 @@ 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 { GroupFunctionType } from '../../models/group-function-type.model';
10
11
  import { PermissionType } from '../../models/permission-type.model';
11
12
  import { GroupPermission } from '../../models/group-permissions.model';
12
13
  import { BreakpointObserverService } from '@ieeesa-npm/utility';
@@ -125,7 +126,7 @@ export declare class TreeViewComponent implements OnInit, AfterViewInit, OnDestr
125
126
  private breakpointObserverService;
126
127
  constants: any;
127
128
  buttons: Menu[];
128
- treeMarginIndent: number;
129
+ treePaddingIndent: number;
129
130
  selectedGroup: GroupNode;
130
131
  selectedGroupAction: Menu | IconButton;
131
132
  treeControl: FlatTreeControl<GroupNode>;
@@ -156,6 +157,7 @@ export declare class TreeViewComponent implements OnInit, AfterViewInit, OnDestr
156
157
  deleteGroupClick: EventEmitter<GroupInfo>;
157
158
  viewRosterClick: EventEmitter<GroupInfo>;
158
159
  isMobileView: boolean;
160
+ groupFunctionType: typeof GroupFunctionType;
159
161
  constructor(database: Groups, elementRef: ElementRef, groupsService: GroupsService, breakpointObserverService: BreakpointObserverService);
160
162
  /**
161
163
  * Initializes the tree view component
@@ -282,15 +284,6 @@ export declare class TreeViewComponent implements OnInit, AfterViewInit, OnDestr
282
284
  * @memberof TreeViewComponent
283
285
  */
284
286
  trackByFn(index: number, iconButton: IconButton): number;
285
- /**
286
- * Sets indentation based on the node level.
287
- * @param {GroupNode} node
288
- * @return {{ [key: string]: string }}
289
- * @memberof TreeViewComponent
290
- */
291
- getIndentation(node: GroupNode): {
292
- [key: string]: string;
293
- };
294
287
  /**
295
288
  * NgOnDestroy performs necessary cleanup tasks, such as unsubscribing from subscription when the component is being destroyed.
296
289
  * @memberof GroupsComponent
@@ -1,3 +1,4 @@
1
+ import { Organization } from './organization.model';
1
2
  export interface AddOrEditGroupUserDetailsResponse {
2
3
  status: boolean;
3
4
  message: string;
@@ -17,10 +18,10 @@ export interface AddOrEditIndividualRosterPayload extends AddOrEditUserRolePaylo
17
18
  classification?: {
18
19
  classificationId: string;
19
20
  };
20
- organization: {
21
+ organizations: {
21
22
  orgId: string;
22
23
  orgName: string;
23
- };
24
+ }[];
24
25
  }
25
26
  export interface AddOrEditUserPayload {
26
27
  payload: AddOrEditUserRolePayload;
@@ -28,3 +29,7 @@ export interface AddOrEditUserPayload {
28
29
  export interface AddOrEditUserIndividualRosterPayload {
29
30
  payload: AddOrEditIndividualRosterPayload;
30
31
  }
32
+ export interface RepresentingOrganization {
33
+ userId: string | null;
34
+ organizations: Organization[] | null;
35
+ }
@@ -26,7 +26,7 @@ export interface GetGroupUsersResponse {
26
26
  email: string;
27
27
  rolesList: Role[];
28
28
  classification: Classification | null;
29
- organization: Organization | null;
29
+ organizations: Organization[] | null;
30
30
  employer: Employer | null;
31
31
  canDelete?: boolean;
32
32
  }[];
@@ -12,7 +12,7 @@ import { EditGroupPayload } from '../models/edit-group.model';
12
12
  import { GroupFunctionType } from '../models/group-function-type.model';
13
13
  import { RosterFunctionType } from '../models/roster-function-type.model';
14
14
  import { GroupUserInfo } from '../models/group-user-info.model';
15
- import { AddOrEditUserPayload, AddOrEditGroupUserDetailsResponse, AddOrEditUserIndividualRosterPayload } from '../models/add-or-edit-user-group.model';
15
+ import { AddOrEditUserPayload, AddOrEditGroupUserDetailsResponse, AddOrEditUserIndividualRosterPayload, RepresentingOrganization } from '../models/add-or-edit-user-group.model';
16
16
  import { DeleteUserGroupPayload } from '../models/delete-user-group.model';
17
17
  import { GetUserDetailsPayload, SearchUserByEmailResponse } from '../models/add-new-user.model';
18
18
  import { OrganizationRequestPayload, OrganizationResponse } from '../models/organization.model';
@@ -44,6 +44,12 @@ export declare class GroupsService {
44
44
  "1005": string;
45
45
  "1006": string;
46
46
  "1007": string;
47
+ /**
48
+ * Sets selected group info.
49
+ * @param {(GroupInfo | undefined)} selectedGroupInfo -selected group info.
50
+ * @param {(GroupInfo | undefined)} [selectedGroupParentInfo] -selected parent group info.
51
+ * @memberof GroupsService
52
+ */
47
53
  "1008": string;
48
54
  "1009": string;
49
55
  "1010": string;
@@ -57,22 +63,24 @@ export declare class GroupsService {
57
63
  "1018": string;
58
64
  "1019": string;
59
65
  "1020": string;
60
- "1021": string;
66
+ "1021": string; /**
67
+ * Sets group function type.
68
+ * @param {GroupFunctionType} groupFunctionType -group function type.
69
+ * @memberof GroupsService
70
+ */
61
71
  "1022": string;
62
72
  "1023": string;
63
73
  "1024": string;
64
74
  "1025": string;
65
- "1026": string;
75
+ "1026": string; /**
76
+ * Returns group function type.
77
+ * @return {GroupFunctionType} -group function type.
78
+ * @memberof GroupsService
79
+ */
66
80
  "1027": string;
67
81
  "1028": string;
68
82
  "1029": string;
69
83
  "1030": string;
70
- /**
71
- * Gets the group users for the given group id.
72
- * @param {string} groupId
73
- * @return {Observable<GetGroupUsersResponse>}
74
- * @memberof GroupsService
75
- */
76
84
  "1031": string;
77
85
  "1032": string;
78
86
  "1033": string;
@@ -96,12 +104,6 @@ export declare class GroupsService {
96
104
  "2019": string;
97
105
  "2020": string;
98
106
  "2021": string;
99
- /**
100
- * Gets the group users based on searched name or email
101
- * @param {SearchUsersPayload} payload
102
- * @return {Observable<GetGroupUsersResponse>}
103
- * @memberof GroupsService
104
- */
105
107
  "2022": string;
106
108
  "2023": string;
107
109
  "2024": string;
@@ -122,6 +124,7 @@ export declare class GroupsService {
122
124
  isParentGroupChanged: boolean;
123
125
  userInfo: LoggedInUserInfo;
124
126
  memberTypes: Role[];
127
+ representingOrganizations: RepresentingOrganization[];
125
128
  constructor(httpService: HttpService, userPermissionsService: UserPermissionsService, groupPermissionsService: GroupPermissionsMapService, alertService: AlertsService);
126
129
  setAppConfig(apiBaseUrl: string, userPermission: any): void;
127
130
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ieeesa-npm/groups",
3
- "version": "0.12.8",
3
+ "version": "0.13.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0"