@ieeesa-npm/groups 0.15.10 → 0.15.12
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 +35 -3
- package/esm2022/lib/assets/country-calling-codes.mjs +83 -0
- package/esm2022/lib/assets/form-validations.mjs +7 -2
- package/esm2022/lib/components/add-user-roster/add-user-roster.component.mjs +160 -3
- package/esm2022/lib/components/edit-user-roles/edit-user-roles.component.mjs +102 -4
- package/esm2022/lib/components/roster-import/roster-import.component.mjs +120 -28
- package/esm2022/lib/components/view-roster/view-roster.component.mjs +13 -4
- package/esm2022/lib/groups.component.mjs +24 -2
- package/esm2022/lib/models/add-new-user.model.mjs +1 -1
- package/esm2022/lib/models/add-or-edit-user-group.model.mjs +1 -1
- package/esm2022/lib/models/group-user-info.model.mjs +1 -1
- package/esm2022/lib/models/required-profile-fields.model.mjs +2 -0
- package/esm2022/lib/models/roster-import.model.mjs +1 -1
- package/esm2022/lib/models/table-column-schema-user-group.model.mjs +3 -1
- package/esm2022/lib/models/user-info.model.mjs +1 -1
- package/esm2022/lib/models/user.model.mjs +1 -1
- package/esm2022/lib/services/groups.service.mjs +81 -7
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/ieeesa-npm-groups.mjs +616 -46
- package/fesm2022/ieeesa-npm-groups.mjs.map +1 -1
- package/lib/assets/country-calling-codes.d.ts +14 -0
- package/lib/assets/form-validations.d.ts +3 -0
- package/lib/components/add-user-roster/add-user-roster.component.d.ts +18 -0
- package/lib/components/create-group/create-group.component.d.ts +7 -2
- package/lib/components/edit-user-roles/edit-user-roles.component.d.ts +19 -0
- package/lib/components/roster-import/roster-import.component.d.ts +48 -8
- package/lib/groups.component.d.ts +14 -1
- package/lib/models/add-new-user.model.d.ts +3 -0
- package/lib/models/add-or-edit-user-group.model.d.ts +3 -0
- package/lib/models/group-user-info.model.d.ts +3 -0
- package/lib/models/required-profile-fields.model.d.ts +20 -0
- package/lib/models/roster-import.model.d.ts +6 -3
- package/lib/models/table-column-schema-user-group.model.d.ts +3 -1
- package/lib/models/user-info.model.d.ts +3 -0
- package/lib/models/user.model.d.ts +6 -0
- package/lib/services/groups.service.d.ts +49 -4
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SelectOption } from '@ieeesa-npm/models';
|
|
2
|
+
/**
|
|
3
|
+
* Frontend-only static list of country calling (dialing) codes used by the
|
|
4
|
+
* Phone Number field's country-code dropdown in the add-user-roster form.
|
|
5
|
+
*
|
|
6
|
+
* This is static reference data (it does not change per request), so it is kept
|
|
7
|
+
* on the frontend rather than fetched from an API — no extra dependency needed.
|
|
8
|
+
* Both `id` and `name` are the raw calling code (e.g. `+1`) so the dropdown
|
|
9
|
+
* shows only the code and that same code is what gets persisted/sent to the
|
|
10
|
+
* backend. Countries that share a calling code are represented once.
|
|
11
|
+
*/
|
|
12
|
+
export declare const COUNTRY_CALLING_CODES: SelectOption[];
|
|
13
|
+
/** Default country calling code option id (US/Canada), used when none is set. */
|
|
14
|
+
export declare const DEFAULT_COUNTRY_CALLING_CODE = "+1";
|
|
@@ -44,6 +44,8 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
44
44
|
groupRosterType: GroupRosterType;
|
|
45
45
|
isUserExist: boolean;
|
|
46
46
|
selectedOrganizations: AutoCompleteOption[];
|
|
47
|
+
countryCallingCodes: SelectOption[];
|
|
48
|
+
requiredProfileFields: string[];
|
|
47
49
|
timeOutId: ReturnType<typeof setTimeout>;
|
|
48
50
|
/**
|
|
49
51
|
* True when the selected group's roster type is INDIVIDUAL (the only roster
|
|
@@ -173,6 +175,12 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
173
175
|
* @memberof AddUserRosterComponent
|
|
174
176
|
*/
|
|
175
177
|
onFormCancel(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Gets the tenant's required profile fields so the add-user form only shows
|
|
180
|
+
* the phone/address fields the tenant has configured as required.
|
|
181
|
+
* @memberof AddUserRosterComponent
|
|
182
|
+
*/
|
|
183
|
+
getRequiredProfileFields(): void;
|
|
176
184
|
/**
|
|
177
185
|
* Gets the classifications from master data.
|
|
178
186
|
* @memberof AddUserRosterComponent
|
|
@@ -239,6 +247,16 @@ export declare class AddUserRosterComponent implements OnInit, OnDestroy {
|
|
|
239
247
|
* @memberof AddUserRosterComponent
|
|
240
248
|
*/
|
|
241
249
|
getAddNewUserPayload(formData: any): AddOrEditUserPayload | AddOrEditUserIndividualRosterPayload;
|
|
250
|
+
/**
|
|
251
|
+
* Appends the optional contact fields (phone country code, phone number and
|
|
252
|
+
* address) to the payload. The country code is sent only when a phone number
|
|
253
|
+
* is provided; phone number and address are included only when the user
|
|
254
|
+
* entered a value (so nulls/empties are not sent to the backend).
|
|
255
|
+
* @param {(AddOrEditUserPayload | AddOrEditUserIndividualRosterPayload)} payload
|
|
256
|
+
* @param {*} formData
|
|
257
|
+
* @memberof AddUserRosterComponent
|
|
258
|
+
*/
|
|
259
|
+
appendContactDetailsToPayload(payload: AddOrEditUserPayload | AddOrEditUserIndividualRosterPayload, formData: any): void;
|
|
242
260
|
/**
|
|
243
261
|
* Disables form submit button when org name length is less than minCharToSearch and greater than zero.
|
|
244
262
|
* @memberof AddUserRosterComponent
|
|
@@ -35,7 +35,7 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
|
|
|
35
35
|
createGroupText: {
|
|
36
36
|
heading: string;
|
|
37
37
|
reciprocalCredit: {
|
|
38
|
-
selectAtLeastOneGroup: string;
|
|
38
|
+
selectAtLeastOneGroup: string; /** Reciprocal credit state (Working Group only) — captured for Save. */
|
|
39
39
|
};
|
|
40
40
|
label: {
|
|
41
41
|
parentGroup: string;
|
|
@@ -60,7 +60,12 @@ export declare class CreateGroupComponent implements OnInit, OnDestroy {
|
|
|
60
60
|
parentGroup: string;
|
|
61
61
|
changeParentGroup: string;
|
|
62
62
|
newParentGroup: string;
|
|
63
|
-
groupType: string;
|
|
63
|
+
groupType: string;
|
|
64
|
+
/**
|
|
65
|
+
* Initialize the create group form group array and component.
|
|
66
|
+
* @return -returns nothing
|
|
67
|
+
* @memberof CreateGroupComponent
|
|
68
|
+
*/
|
|
64
69
|
groupName: string;
|
|
65
70
|
shortName: string;
|
|
66
71
|
groupScope: string;
|
|
@@ -39,7 +39,9 @@ export declare class EditUserRolesComponent implements OnInit, OnDestroy {
|
|
|
39
39
|
hasClassification: boolean;
|
|
40
40
|
groupRosterType: GroupRosterType;
|
|
41
41
|
representingOrganizations: SelectOption[];
|
|
42
|
+
countryCallingCodes: SelectOption[];
|
|
42
43
|
orgSearchValue: string;
|
|
44
|
+
requiredProfileFields: string[];
|
|
43
45
|
/**
|
|
44
46
|
* True when the selected group's roster type is INDIVIDUAL (the only roster
|
|
45
47
|
* type that shows the Representing Organization field).
|
|
@@ -111,6 +113,16 @@ export declare class EditUserRolesComponent implements OnInit, OnDestroy {
|
|
|
111
113
|
* @memberof EditUserRolesComponent
|
|
112
114
|
*/
|
|
113
115
|
getEditUserRolePayload(formData: any): AddOrEditUserPayload | AddOrEditUserIndividualRosterPayload;
|
|
116
|
+
/**
|
|
117
|
+
* Appends the optional contact fields (phone country code, phone number and
|
|
118
|
+
* address) to the payload. Reads from the combined PHONE control value
|
|
119
|
+
* ({ countryCode, phoneNumber }) and the address control. Sends the country
|
|
120
|
+
* code only when a number is present; omits empty values.
|
|
121
|
+
* @param {(AddOrEditUserPayload | AddOrEditUserIndividualRosterPayload)} payload
|
|
122
|
+
* @param {*} formData
|
|
123
|
+
* @memberof EditUserRolesComponent
|
|
124
|
+
*/
|
|
125
|
+
appendContactDetailsToPayload(payload: AddOrEditUserPayload | AddOrEditUserIndividualRosterPayload, formData: any): void;
|
|
114
126
|
/**
|
|
115
127
|
* Emits form cancel event.
|
|
116
128
|
* @memberof EditUserRolesComponent
|
|
@@ -140,6 +152,13 @@ export declare class EditUserRolesComponent implements OnInit, OnDestroy {
|
|
|
140
152
|
* @memberof editUserRoleFormGroupRef
|
|
141
153
|
*/
|
|
142
154
|
onEditUserRoleFormChange(form: FormGroup[]): void;
|
|
155
|
+
/**
|
|
156
|
+
* Gets the tenant's required profile fields so the edit-user form only shows
|
|
157
|
+
* the phone/address fields the tenant has configured as required. Builds the
|
|
158
|
+
* form once resolved (or immediately if the appId isn't available).
|
|
159
|
+
* @memberof EditUserRolesComponent
|
|
160
|
+
*/
|
|
161
|
+
getRequiredProfileFields(): void;
|
|
143
162
|
/**
|
|
144
163
|
* Gets the classifications from master data.
|
|
145
164
|
* @memberof EditUserRolesComponent
|
|
@@ -74,8 +74,46 @@ export declare class RosterImportComponent implements OnInit, OnDestroy {
|
|
|
74
74
|
/** Accepted file extensions (must match the BE contract: only .csv / .xlsx). */
|
|
75
75
|
readonly ACCEPTED_EXTENSIONS: string[];
|
|
76
76
|
constructor(rosterImportApiService: RosterImportApiService, groupService: GroupsService);
|
|
77
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Required column headers for display and the sample file. This is the static
|
|
79
|
+
* base set from constants PLUS any tenant-level required profile fields the
|
|
80
|
+
* host app configured (e.g. phone / address / employer), mapped to friendly
|
|
81
|
+
* headers and de-duplicated (case-insensitive) against the base columns.
|
|
82
|
+
* @return {string[]}
|
|
83
|
+
*/
|
|
78
84
|
get requiredColumns(): string[];
|
|
85
|
+
/**
|
|
86
|
+
* Appends the tenant-configured columns (from {@link tenantExtraColumns}) to
|
|
87
|
+
* the base column headers.
|
|
88
|
+
* @param {string[]} base - The static base column headers.
|
|
89
|
+
* @return {string[]}
|
|
90
|
+
* @memberof RosterImportComponent
|
|
91
|
+
*/
|
|
92
|
+
private mergeTenantColumns;
|
|
93
|
+
/**
|
|
94
|
+
* Resolves the tenant-configured required profile fields into the EXTRA
|
|
95
|
+
* columns to append after the base set — the single source of truth shared by
|
|
96
|
+
* both the header list ({@link requiredColumns}) and the sample file
|
|
97
|
+
* ({@link downloadSampleFile}) so the two never drift out of alignment.
|
|
98
|
+
*
|
|
99
|
+
* Each field becomes one column with its friendly `label` (known keys use the
|
|
100
|
+
* label map; unknown keys fall back to a title-cased key) and a `sampleValue`
|
|
101
|
+
* for the sample row. Fields whose label already exists in the base set
|
|
102
|
+
* (case-insensitive) are skipped so a tenant field like "employer" that is
|
|
103
|
+
* already a base column is not duplicated.
|
|
104
|
+
* @param {string[]} base - The static base column headers.
|
|
105
|
+
* @return {{ label: string; sampleValue: string }[]}
|
|
106
|
+
* @memberof RosterImportComponent
|
|
107
|
+
*/
|
|
108
|
+
private tenantExtraColumns;
|
|
109
|
+
/**
|
|
110
|
+
* Maps a tenant field key to its display header. Known keys use the configured
|
|
111
|
+
* label map; unknown keys fall back to a title-cased key.
|
|
112
|
+
* @param {string} field - The tenant field key (e.g. 'phone').
|
|
113
|
+
* @return {string}
|
|
114
|
+
* @memberof RosterImportComponent
|
|
115
|
+
*/
|
|
116
|
+
private tenantFieldLabel;
|
|
79
117
|
/** Comma-separated accepted file types for the input element. */
|
|
80
118
|
get acceptedFileTypes(): string;
|
|
81
119
|
/** The target group id from the dialog payload (falls back to selection). */
|
|
@@ -154,14 +192,16 @@ export declare class RosterImportComponent implements OnInit, OnDestroy {
|
|
|
154
192
|
*/
|
|
155
193
|
finalizeResult(job: RosterImportJob): void;
|
|
156
194
|
/**
|
|
157
|
-
*
|
|
195
|
+
* Normalizes the BE `error_report` into row-error view models.
|
|
158
196
|
*
|
|
159
|
-
* The BE
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
197
|
+
* The BE wraps the per-row entries in a `{ rows: [ { row, field, message } ] }`
|
|
198
|
+
* document, but that value has been observed to arrive in MULTIPLE shapes:
|
|
199
|
+
* - a parsed object `{ rows: [...] }` (confirm response — the common case),
|
|
200
|
+
* - a raw JSON string of the same object (JSONB passthrough), or
|
|
201
|
+
* - a bare array `[ { row, field, message } ]`.
|
|
202
|
+
* This handles all three (and `null`) so the error log renders regardless of
|
|
203
|
+
* how the field is serialized.
|
|
204
|
+
* @param {*} errorReport - The BE error_report (object, string, array, or null).
|
|
165
205
|
* @return {RosterImportRowError[]}
|
|
166
206
|
* @memberof RosterImportComponent
|
|
167
207
|
*/
|
|
@@ -62,6 +62,19 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
62
62
|
apiBaseURL: string;
|
|
63
63
|
userPermissions: UserPermission[];
|
|
64
64
|
userInfo: LoggedInUserInfo;
|
|
65
|
+
private _requiredProfileFields;
|
|
66
|
+
/**
|
|
67
|
+
* Tenant-level required profile fields (e.g. ['phone','address','employer'])
|
|
68
|
+
* supplied by the host app from its cached tenant configuration. Passed to
|
|
69
|
+
* GroupsService so the roster import appends them to its required columns and
|
|
70
|
+
* sample file. Optional — defaults to none.
|
|
71
|
+
*
|
|
72
|
+
* Implemented as a setter so EVERY input update (including a late,
|
|
73
|
+
* async-resolved value that arrives after ngOnInit) is propagated to the
|
|
74
|
+
* singleton GroupsService — not just the initial binding.
|
|
75
|
+
*/
|
|
76
|
+
set requiredProfileFields(value: string[] | null | undefined);
|
|
77
|
+
get requiredProfileFields(): string[];
|
|
65
78
|
permissionType: typeof PermissionType;
|
|
66
79
|
functionType: GroupFunctionType;
|
|
67
80
|
alignmentType: typeof AlignType;
|
|
@@ -230,5 +243,5 @@ export declare class GroupsComponent implements OnInit, OnDestroy {
|
|
|
230
243
|
*/
|
|
231
244
|
ngOnDestroy(): void;
|
|
232
245
|
static ɵfac: i0.ɵɵFactoryDeclaration<GroupsComponent, never>;
|
|
233
|
-
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; }; "userInfo": { "alias": "userInfo"; "required": false; }; }, {}, never, never, true, never>;
|
|
246
|
+
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; }; "userInfo": { "alias": "userInfo"; "required": false; }; "requiredProfileFields": { "alias": "requiredProfileFields"; "required": false; }; }, {}, never, never, true, never>;
|
|
234
247
|
}
|
|
@@ -13,6 +13,9 @@ export interface AddOrEditUserRolePayload {
|
|
|
13
13
|
email: string;
|
|
14
14
|
firstName?: string;
|
|
15
15
|
lastName?: string;
|
|
16
|
+
phoneCountryCode?: string;
|
|
17
|
+
phoneNumber?: string;
|
|
18
|
+
address?: string;
|
|
16
19
|
}
|
|
17
20
|
export interface AddOrEditIndividualRosterPayload extends AddOrEditUserRolePayload {
|
|
18
21
|
classification?: {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface RequiredProfileFieldsConfiguration {
|
|
2
|
+
configFieldValue?: {
|
|
3
|
+
requiredFields?: string[];
|
|
4
|
+
};
|
|
5
|
+
}
|
|
6
|
+
export interface RequiredProfileFieldsResponse {
|
|
7
|
+
status: boolean;
|
|
8
|
+
message?: string;
|
|
9
|
+
body?: RequiredProfileFieldsConfiguration[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Shape of the tenant required-profile-fields value cached in local storage by
|
|
13
|
+
* the hosting application at login (storage key `REQUIRED_PROFILE_FIELDS`). The
|
|
14
|
+
* add-user / edit-user forms read this cache to decide which optional fields
|
|
15
|
+
* (phone/address/employer) to show.
|
|
16
|
+
*/
|
|
17
|
+
export interface CachedRequiredProfileFields {
|
|
18
|
+
appId: string;
|
|
19
|
+
requiredFields: string[];
|
|
20
|
+
}
|
|
@@ -55,10 +55,13 @@ export interface RosterImportJob {
|
|
|
55
55
|
/** Rows skipped due to validation errors. */
|
|
56
56
|
failedRows?: number;
|
|
57
57
|
/**
|
|
58
|
-
* Row-level errors
|
|
59
|
-
*
|
|
58
|
+
* Row-level errors from the BE `error_report` JSONB column. Observed to arrive
|
|
59
|
+
* EITHER as a parsed object `{ rows: RosterImportErrorReport[] }` OR as a raw
|
|
60
|
+
* JSON string of the same shape (depending on serialization). A bare array is
|
|
61
|
+
* also tolerated. `null` when there are no row errors. The client normalizes
|
|
62
|
+
* all of these — see RosterImportComponent.parseErrorReport.
|
|
60
63
|
*/
|
|
61
|
-
errorReport?:
|
|
64
|
+
errorReport?: any;
|
|
62
65
|
}
|
|
63
66
|
/**
|
|
64
67
|
* Per-row validation outcome in a validate/preview response. Mirrors the BE
|
|
@@ -10,6 +10,9 @@ export interface User {
|
|
|
10
10
|
memberStatus: string | null;
|
|
11
11
|
organization: string | null;
|
|
12
12
|
employer: string | null;
|
|
13
|
+
phoneCountryCode: string | null;
|
|
14
|
+
phoneNumber: string | null;
|
|
15
|
+
address: string | null;
|
|
13
16
|
checked?: boolean;
|
|
14
17
|
canDelete?: boolean;
|
|
15
18
|
}
|
|
@@ -28,6 +31,9 @@ export interface GetGroupUsersResponse {
|
|
|
28
31
|
classification: Classification | null;
|
|
29
32
|
organizations: Organization[] | null;
|
|
30
33
|
employer: Employer | null;
|
|
34
|
+
phoneCountryCode?: string | null;
|
|
35
|
+
phoneNumber?: string | null;
|
|
36
|
+
address?: string | null;
|
|
31
37
|
canDelete?: boolean;
|
|
32
38
|
}[];
|
|
33
39
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
2
2
|
import { CreateGroupPayload, CreateGroupResponse } from '../models/create-group.model';
|
|
3
3
|
import { BusinessRule, GroupTypeConfiguration, GroupTypeConfigValue, GroupTypeResponse } from '../models/group-types.model';
|
|
4
|
-
import { AlertsService, HttpService } from '@ieeesa-npm/utility';
|
|
4
|
+
import { AlertsService, HttpService, StorageService } from '@ieeesa-npm/utility';
|
|
5
5
|
import { GetGroupResponse, GetGroupsPayload } from '../models/view-group.model';
|
|
6
6
|
import { DeleteGroupPayload } from '../models/delete-group.model';
|
|
7
7
|
import { GroupInfo } from '../models/group-info.model';
|
|
@@ -18,7 +18,7 @@ import { GetUserDetailsPayload, SearchUserByEmailResponse } from '../models/add-
|
|
|
18
18
|
import { OrganizationRequestPayload, OrganizationResponse } from '../models/organization.model';
|
|
19
19
|
import { ClassificationResponse } from '../models/classification.model';
|
|
20
20
|
import { GroupRosterType } from '../models/roster-type.model';
|
|
21
|
-
import { CheckboxOption } from '@ieeesa-npm/models';
|
|
21
|
+
import { CheckboxOption, SelectOption } from '@ieeesa-npm/models';
|
|
22
22
|
import { FormControlStatus } from '@angular/forms';
|
|
23
23
|
import { GroupPermission, UserPermission } from '../models/group-permissions.model';
|
|
24
24
|
import { PermissionType } from '../models/permission-type.model';
|
|
@@ -35,6 +35,7 @@ export declare class GroupsService {
|
|
|
35
35
|
private userPermissionsService;
|
|
36
36
|
private groupPermissionsService;
|
|
37
37
|
alertService: AlertsService;
|
|
38
|
+
private storageService;
|
|
38
39
|
groupsText: {
|
|
39
40
|
ER1000: string;
|
|
40
41
|
ER1001: string;
|
|
@@ -77,6 +78,7 @@ export declare class GroupsService {
|
|
|
77
78
|
"1037": string;
|
|
78
79
|
"1038": string;
|
|
79
80
|
"1039": string;
|
|
81
|
+
"1071": string;
|
|
80
82
|
"1072": string;
|
|
81
83
|
"1073": string;
|
|
82
84
|
"1074": string;
|
|
@@ -106,6 +108,13 @@ export declare class GroupsService {
|
|
|
106
108
|
};
|
|
107
109
|
apiBaseUrl: string;
|
|
108
110
|
userPermission: any;
|
|
111
|
+
/**
|
|
112
|
+
* Tenant-level required profile fields (e.g. ['phone','address','employer'])
|
|
113
|
+
* supplied by the host app from its cached tenant configuration. Consumed by
|
|
114
|
+
* the roster import to append tenant-mandated columns to the required-column
|
|
115
|
+
* list and the sample file. Empty when the tenant has none configured.
|
|
116
|
+
*/
|
|
117
|
+
requiredProfileFields: string[];
|
|
109
118
|
selectedGroupInfo: GroupInfo | undefined;
|
|
110
119
|
groupFunctionType: GroupFunctionType;
|
|
111
120
|
selectedGroupParentInfo: GroupInfo | undefined;
|
|
@@ -120,8 +129,35 @@ export declare class GroupsService {
|
|
|
120
129
|
userInfo: LoggedInUserInfo;
|
|
121
130
|
memberTypes: Role[];
|
|
122
131
|
representingOrganizations: RepresentingOrganization[];
|
|
123
|
-
constructor(httpService: HttpService, userPermissionsService: UserPermissionsService, groupPermissionsService: GroupPermissionsMapService, alertService: AlertsService);
|
|
132
|
+
constructor(httpService: HttpService, userPermissionsService: UserPermissionsService, groupPermissionsService: GroupPermissionsMapService, alertService: AlertsService, storageService: StorageService);
|
|
124
133
|
setAppConfig(apiBaseUrl: string, userPermission: any): void;
|
|
134
|
+
/**
|
|
135
|
+
* Stores the tenant-level required profile fields provided by the host app.
|
|
136
|
+
* @param {string[]} requiredProfileFields - Field keys (e.g. 'phone').
|
|
137
|
+
* @memberof GroupsService
|
|
138
|
+
*/
|
|
139
|
+
setRequiredProfileFields(requiredProfileFields: string[]): void;
|
|
140
|
+
/**
|
|
141
|
+
* Returns the tenant-level required profile fields (never null).
|
|
142
|
+
*
|
|
143
|
+
* Reads the local storage cache the hosting application writes at login (key
|
|
144
|
+
* `REQUIRED_PROFILE_FIELDS`) as the source of truth, so the add-user /
|
|
145
|
+
* edit-user forms always reflect the tenant configuration regardless of the
|
|
146
|
+
* @Input/resolver timing.
|
|
147
|
+
*
|
|
148
|
+
* The cache is only trusted when it is well-formed for the active
|
|
149
|
+
* application: its `appId` must match the current user's `appId` and its
|
|
150
|
+
* `requiredFields` must be an array. This guards against (a) a stale cache
|
|
151
|
+
* from a previously opened application applying another tenant's fields, and
|
|
152
|
+
* (b) a malformed cache crashing the forms when callers run
|
|
153
|
+
* `requiredFields.includes(...)` on a non-array value. When the cache is
|
|
154
|
+
* missing, for another app, or malformed, it falls back to the in-memory
|
|
155
|
+
* value set via {@link setRequiredProfileFields} (the host @Input), then to
|
|
156
|
+
* an empty list.
|
|
157
|
+
* @return {string[]}
|
|
158
|
+
* @memberof GroupsService
|
|
159
|
+
*/
|
|
160
|
+
getRequiredProfileFields(): string[];
|
|
125
161
|
/**
|
|
126
162
|
* Gets application group types from API and returns it as an observable.
|
|
127
163
|
* @return {Observable<GroupTypeResponse>} -It returns group types if success else error.
|
|
@@ -364,7 +400,9 @@ export declare class GroupsService {
|
|
|
364
400
|
*/
|
|
365
401
|
setUserInfo(userInfo: LoggedInUserInfo): void;
|
|
366
402
|
/**
|
|
367
|
-
* Returns the logged in user information.
|
|
403
|
+
* Returns the logged in user information. Falls back to the USER_INFO blob
|
|
404
|
+
* the host app persists to local storage when the userInfo input hasn't
|
|
405
|
+
* been set yet (e.g. host wiring not completed or timing race on init).
|
|
368
406
|
* @return {LoggedInUserInfo}
|
|
369
407
|
* @memberof GroupsService
|
|
370
408
|
*/
|
|
@@ -436,6 +474,13 @@ export declare class GroupsService {
|
|
|
436
474
|
* @memberof GroupsService
|
|
437
475
|
*/
|
|
438
476
|
getMemberTypes(): Role[];
|
|
477
|
+
/**
|
|
478
|
+
* Returns the frontend-only static list of country calling codes for the
|
|
479
|
+
* Phone Number field's country-code dropdown.
|
|
480
|
+
* @return {SelectOption[]}
|
|
481
|
+
* @memberof GroupsService
|
|
482
|
+
*/
|
|
483
|
+
getCountryCallingCodes(): SelectOption[];
|
|
439
484
|
/** Path prefix (relative to apiBaseUrl) for the reciprocal-credit endpoints. */
|
|
440
485
|
private readonly RECIPROCAL_BASE_PATH;
|
|
441
486
|
/**
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from './lib/models/roster-type.model';
|
|
|
28
28
|
export * from './lib/models/table-column-schema-user-group.model';
|
|
29
29
|
export * from './lib/models/parent-groups-info.model';
|
|
30
30
|
export * from './lib/models/reciprocal-credit.model';
|
|
31
|
+
export * from './lib/models/required-profile-fields.model';
|
|
31
32
|
export * from './lib/services/groups.service';
|
|
32
33
|
export * from './lib/services/roster-export.service';
|
|
33
34
|
export * from './lib/services/roster-import-api.service';
|