@skysoftware-co/bayan-hr-widgets-ui 1.0.33 → 1.0.34
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/README.md +97 -12
- package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs +67 -8
- package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs.map +1 -1
- package/lib/my-vacation-team-widget/components/vacation-subordinates-popup/vacation-subordinates-popup.component.d.ts +38 -0
- package/lib/my-vacation-team-widget/my-vacation-team-widget.component.d.ts +33 -0
- package/lib/services/hr-self-widgets.service.d.ts +5 -2
- package/lib/shared/services/profile-employee-dependents-cach.d.ts +13 -0
- package/lib/shared/types/common.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ components:
|
|
|
31
31
|
1. My Main Details Widget
|
|
32
32
|
2. My Upcoming Events Widget
|
|
33
33
|
3. My Calendar Widget
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
## Dependencies
|
|
36
36
|
This library depends on `@skysoftware-co/bayan-components-ui` package which provides:
|
|
37
37
|
- Employee Badge Component
|
|
@@ -243,6 +243,7 @@ This component displays an employee calendar showing vacations, public holidays,
|
|
|
243
243
|
|-------|------|---------------|-------------|
|
|
244
244
|
| `baseUrl` | string | `''` | Base URL for API calls |
|
|
245
245
|
| `headerContainerClass` | string | `''` | Additional CSS class for the header container |
|
|
246
|
+
| `datasource` | `ScheduleRequestsResponse \| null` | `null` | External datasource for pending requests. When provided, pending vacation requests are merged with calendar vacations (consecutive same-type vacations are combined), and pending event requests are added as events. The calendar reactively updates whenever this input changes after the initial calendar data has loaded. |
|
|
246
247
|
| `publicHolidayColor` | string | from `HRConstantsService`: `'#249EA0'` | Color for public holidays |
|
|
247
248
|
| `dayOffColor` | string | from `HRConstantsService`: `'#FCCF5A'` | Color for days off |
|
|
248
249
|
| `eventsColor` | string | from `HRConstantsService`: `'#e67e0f'` | Color for events |
|
|
@@ -271,15 +272,15 @@ The component calls `GET {baseUrl}/hr/employee-portal/calendar` with query param
|
|
|
271
272
|
- Header: `api-version: 2`
|
|
272
273
|
|
|
273
274
|
|
|
274
|
-
## My
|
|
275
|
+
## My Vacation Team Widget Component
|
|
275
276
|
|
|
276
277
|
### Usage
|
|
277
278
|
```html
|
|
278
|
-
<hr-my-
|
|
279
|
+
<hr-my-vacation-team-widget
|
|
279
280
|
[baseUrl]="environment.baseUrl"
|
|
280
281
|
[showProperty]="true"
|
|
281
282
|
(isLoadingChanged)="onLoadingChanged($event)">
|
|
282
|
-
</hr-my-
|
|
283
|
+
</hr-my-vacation-team-widget>
|
|
283
284
|
```
|
|
284
285
|
|
|
285
286
|
This component displays a "Next Week Vacation Insights" card showing two badges: **Upcoming Vacations** and **Expected To Return** counts for team subordinates. Clicking a badge opens a popup with a paginated, searchable data grid listing the relevant employees. It uses `SkyWidgetSectionItemComponent` from `@skysoftware-co/sky-components-ui` for badge display and `BayanEmployeeBadgeComponent` from `@skysoftware-co/bayan-components-ui` for employee photos in the popup.
|
|
@@ -289,22 +290,20 @@ This component displays a "Next Week Vacation Insights" card showing two badges:
|
|
|
289
290
|
|-------|------|---------------|-------------|
|
|
290
291
|
| `baseUrl` | string | `''` | Base URL for API calls |
|
|
291
292
|
| `showProperty` | boolean | `false` | Show employee property badge in the popup grid |
|
|
292
|
-
| `cardClass` | string | `'card rounded rounded-4 card-shadow border-top-0 h-100 p-4'` | Card container CSS class |
|
|
293
|
-
| `titleClass` | string | `'table-header-lg fw-meduim
|
|
293
|
+
| `cardClass` | string | `'card rounded rounded-4 card-shadow p-16 border-top-0 h-100 p-4'` | Card container CSS class |
|
|
294
|
+
| `titleClass` | string | `'table-header-lg fw-meduim'` | Card title CSS class |
|
|
294
295
|
| `valueClass` | string | `'fs-24 mt-1 link-dark hover-primary text-decoration-none'` | Badge value CSS class (clickable) |
|
|
295
296
|
| `disabledValueClass` | string | `'fs-24 mt-1 text-muted pe-none text-decoration-none'` | Badge value CSS class when count is 0 |
|
|
296
|
-
| `upcomingContainerClass` | string | `'border-start border-5 mb-
|
|
297
|
+
| `upcomingContainerClass` | string | `'border-start border-5 mb-3'` | Upcoming vacations badge container CSS class |
|
|
297
298
|
| `expectedContainerClass` | string | `'border-start border-5'` | Expected to return badge container CSS class |
|
|
298
|
-
| `firstRowClass` | string | `'mb-4'` | CSS class for the first badge row wrapper |
|
|
299
|
-
| `secondRowClass` | string | `'mt-3'` | CSS class for the second badge row wrapper |
|
|
300
299
|
|
|
301
300
|
### Output Events
|
|
302
301
|
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes
|
|
303
302
|
|
|
304
303
|
### API Endpoints
|
|
305
|
-
- **Summary**: `GET {baseUrl}/hr/widgets/me/team/
|
|
306
|
-
- **Upcoming list**: `GET {baseUrl}/hr/widgets/me/team/
|
|
307
|
-
- **Expected to return list**: `GET {baseUrl}/hr/widgets/me/team/
|
|
304
|
+
- **Summary**: `GET {baseUrl}/hr/widgets/me/team/subordinates/vacations/summary?ShowDirectSubordinatesOnly=false`
|
|
305
|
+
- **Upcoming list**: `GET {baseUrl}/hr/widgets/me/team/subordinates/vacations/upcoming`
|
|
306
|
+
- **Expected to return list**: `GET {baseUrl}/hr/widgets/me/team/subordinates/vacations/expected-to-return`
|
|
308
307
|
|
|
309
308
|
## Profile Widgets
|
|
310
309
|
|
|
@@ -345,6 +344,92 @@ The package also exports profile-focused widgets used in the employee profile pa
|
|
|
345
344
|
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
346
345
|
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
347
346
|
|
|
347
|
+
## Profile Experiences Widget
|
|
348
|
+
|
|
349
|
+
### Usage
|
|
350
|
+
```html
|
|
351
|
+
<hr-profile-experiences-widget
|
|
352
|
+
[baseUrl]="baseUrl"
|
|
353
|
+
(isLoadingChanged)="onExperiencesLoadingChanged($event)">
|
|
354
|
+
</hr-profile-experiences-widget>
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Input Properties
|
|
358
|
+
| Input | Type | Default Value | Description |
|
|
359
|
+
|-------|------|---------------|-------------|
|
|
360
|
+
| `baseUrl` | string | `''` | Base URL for API calls. |
|
|
361
|
+
| `sectionTitle` | string | `'experiences'` | Section title translation key. |
|
|
362
|
+
| `experienceIcon` | IconDefinition | `faUsersRays` | Header icon. |
|
|
363
|
+
| `viewIcon` | IconDefinition | `faEye` | Attachment view icon. |
|
|
364
|
+
| `downloadIcon` | IconDefinition | `faFolderArrowDown` | Attachment download icon. |
|
|
365
|
+
| `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class. |
|
|
366
|
+
| `headerTextClass` | string | `'fs-16 mt-2 text-secondary'` | Header text CSS class. |
|
|
367
|
+
| `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class. |
|
|
368
|
+
| `rowClass` | string | `'mt-4'` | Main row CSS class. |
|
|
369
|
+
| `rowMarginBottomClass` | string | `'mb-5'` | Bottom spacing class when experiences exist. |
|
|
370
|
+
| `rowMarginBottomEmptyClass` | string | `'mb-4'` | Bottom spacing class when list is empty. |
|
|
371
|
+
| `headerRowClass` | string | `'row col-10'` | Header labels row CSS class. |
|
|
372
|
+
| `actionsSpacerClass` | string | `'col-2'` | Spacer column class between labels and actions area. |
|
|
373
|
+
| `itemRowClass` | string | `'row'` | Backward-compatible row class input (not used in current template loop). |
|
|
374
|
+
| `itemColumnsWrapperClass` | string | `'row col-10 mt-3'` | Per-item columns wrapper CSS class. |
|
|
375
|
+
| `itemColumnClass` | string | `'col-3'` | Column CSS class. |
|
|
376
|
+
| `labelClass` | string | `'field-secondary-label-sm text-ellipsis-one-line'` | Header label CSS class. |
|
|
377
|
+
| `valueClass` | string | `'text-dark-gray fs-14 text-ellipsis-one-line'` | Value text CSS class. |
|
|
378
|
+
| `actionsColumnClass` | string | `'col-2 align-items-end mt-3'` | Attachment action column CSS class. |
|
|
379
|
+
| `viewIconClass` | string | `'fs-15 text-dark cursor-pointer'` | View icon CSS class. |
|
|
380
|
+
| `downloadIconClass` | string | `'fs-15 mx-3 text-dark cursor-pointer'` | Download icon CSS class. |
|
|
381
|
+
| `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class. |
|
|
382
|
+
| `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class. |
|
|
383
|
+
|
|
384
|
+
### Output Events
|
|
385
|
+
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
386
|
+
- `attachmentViewed: EventEmitter<any>` - Emitted when attachment view icon is clicked.
|
|
387
|
+
- `attachmentDownloaded: EventEmitter<any>` - Emitted when attachment download icon is clicked.
|
|
388
|
+
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
389
|
+
|
|
390
|
+
## Profile Degrees Widget
|
|
391
|
+
|
|
392
|
+
### Usage
|
|
393
|
+
```html
|
|
394
|
+
<hr-profile-degrees-widget
|
|
395
|
+
[baseUrl]="baseUrl"
|
|
396
|
+
(isLoadingChanged)="onDegreesLoadingChanged($event)">
|
|
397
|
+
</hr-profile-degrees-widget>
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### Input Properties
|
|
401
|
+
| Input | Type | Default Value | Description |
|
|
402
|
+
|-------|------|---------------|-------------|
|
|
403
|
+
| `baseUrl` | string | `''` | Base URL for API calls. |
|
|
404
|
+
| `sectionTitle` | string | `'Degrees'` | Section title translation key. |
|
|
405
|
+
| `degreesIcon` | IconDefinition | `faFileCertificate` | Header icon. |
|
|
406
|
+
| `viewIcon` | IconDefinition | `faEye` | Attachment view icon. |
|
|
407
|
+
| `downloadIcon` | IconDefinition | `faFolderArrowDown` | Attachment download icon. |
|
|
408
|
+
| `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class. |
|
|
409
|
+
| `headerTextClass` | string | `'fs-16 mt-2 text-secondary'` | Header text CSS class. |
|
|
410
|
+
| `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class. |
|
|
411
|
+
| `rowClass` | string | `'mt-4'` | Main row CSS class. |
|
|
412
|
+
| `rowMarginBottomClass` | string | `'mb-5'` | Bottom spacing class when degrees exist. |
|
|
413
|
+
| `rowMarginBottomEmptyClass` | string | `'mb-4'` | Bottom spacing class when list is empty. |
|
|
414
|
+
| `headerRowClass` | string | `'row col-10'` | Header labels row CSS class. |
|
|
415
|
+
| `actionsSpacerClass` | string | `'col-2'` | Spacer column class between labels and actions area. |
|
|
416
|
+
| `itemRowClass` | string | `'row'` | Backward-compatible row class input (not used in current template loop). |
|
|
417
|
+
| `itemColumnsWrapperClass` | string | `'row col-10 mt-3'` | Per-item columns wrapper CSS class. |
|
|
418
|
+
| `itemColumnClass` | string | `'col-3'` | Column CSS class. |
|
|
419
|
+
| `labelClass` | string | `'field-secondary-label-sm text-ellipsis-one-line'` | Header label CSS class. |
|
|
420
|
+
| `valueClass` | string | `'text-dark-gray fs-14 text-ellipsis-one-line'` | Value text CSS class. |
|
|
421
|
+
| `actionsColumnClass` | string | `'col-2 align-items-end mt-3'` | Attachment action column CSS class. |
|
|
422
|
+
| `viewIconClass` | string | `'fs-15 text-dark cursor-pointer'` | View icon CSS class. |
|
|
423
|
+
| `downloadIconClass` | string | `'fs-15 mx-3 text-dark cursor-pointer'` | Download icon CSS class. |
|
|
424
|
+
| `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class. |
|
|
425
|
+
| `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class. |
|
|
426
|
+
|
|
427
|
+
### Output Events
|
|
428
|
+
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
429
|
+
- `attachmentViewed: EventEmitter<any>` - Emitted when attachment view icon is clicked.
|
|
430
|
+
- `attachmentDownloaded: EventEmitter<any>` - Emitted when attachment download icon is clicked.
|
|
431
|
+
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
432
|
+
|
|
348
433
|
## Profile Personal Info Contact Widget
|
|
349
434
|
|
|
350
435
|
### Usage
|
|
@@ -188,6 +188,8 @@ var Employer$2 = "Employer";
|
|
|
188
188
|
var TerminationReason$2 = "Termination reason";
|
|
189
189
|
var ThereIsNoDegreesYet$2 = "There are no degrees yet";
|
|
190
190
|
var ThereIsNoExperiencesYet$2 = "There are no experiences yet";
|
|
191
|
+
var ThereIsNoDependentsYet$2 = "There are no dependents yet";
|
|
192
|
+
var DependentTypeName$2 = "Dependent Type";
|
|
191
193
|
var en = {
|
|
192
194
|
ReportingTo: ReportingTo$2,
|
|
193
195
|
NotAnknown: NotAnknown$2,
|
|
@@ -301,7 +303,7 @@ var en = {
|
|
|
301
303
|
Degrees: Degrees$2,
|
|
302
304
|
degrees: degrees$2,
|
|
303
305
|
experiences: experiences$2,
|
|
304
|
-
"Degree/Year": "Degree
|
|
306
|
+
"Degree/Year": "Degree/Year",
|
|
305
307
|
Country: Country$2,
|
|
306
308
|
Specialty: Specialty$2,
|
|
307
309
|
Institute: Institute$2,
|
|
@@ -309,7 +311,9 @@ var en = {
|
|
|
309
311
|
Employer: Employer$2,
|
|
310
312
|
TerminationReason: TerminationReason$2,
|
|
311
313
|
ThereIsNoDegreesYet: ThereIsNoDegreesYet$2,
|
|
312
|
-
ThereIsNoExperiencesYet: ThereIsNoExperiencesYet$2
|
|
314
|
+
ThereIsNoExperiencesYet: ThereIsNoExperiencesYet$2,
|
|
315
|
+
ThereIsNoDependentsYet: ThereIsNoDependentsYet$2,
|
|
316
|
+
DependentTypeName: DependentTypeName$2
|
|
313
317
|
};
|
|
314
318
|
|
|
315
319
|
var ReportingTo$1 = "مفوض الى";
|
|
@@ -410,7 +414,7 @@ var ThereIsNoJobMainYet$1 = "لا توجد معلومات وظيفية بعد";
|
|
|
410
414
|
var ThereIsNoJobContractYet$1 = "لا توجد معلومات عقد بعد";
|
|
411
415
|
var ThereIsNoJobSalaryYet$1 = "لا توجد معلومات راتب بعد";
|
|
412
416
|
var ThereIsNoJobServiceChargeYet$1 = "لا توجد معلومات مستحقات نهاية الخدمة بعد";
|
|
413
|
-
var NextWeekVacationInsights$1 = "
|
|
417
|
+
var NextWeekVacationInsights$1 = "رؤى إجازات الأسبوع القادم";
|
|
414
418
|
var UpcomingVacations$1 = "الإجازات القادمة";
|
|
415
419
|
var ExpectedToReturn$1 = "المتوقع عودتهم";
|
|
416
420
|
var Employee$1 = "الموظف";
|
|
@@ -429,6 +433,8 @@ var Employer$1 = "جهة العمل";
|
|
|
429
433
|
var TerminationReason$1 = "سبب إنهاء الخدمة";
|
|
430
434
|
var ThereIsNoDegreesYet$1 = "لا توجد مؤهلات علمية بعد";
|
|
431
435
|
var ThereIsNoExperiencesYet$1 = "لا توجد خبرات بعد";
|
|
436
|
+
var ThereIsNoDependentsYet$1 = "لا يوجد معالين حتى الآن";
|
|
437
|
+
var DependentTypeName$1 = "نوع المعال";
|
|
432
438
|
var ar = {
|
|
433
439
|
ReportingTo: ReportingTo$1,
|
|
434
440
|
NotAnknown: NotAnknown$1,
|
|
@@ -549,7 +555,9 @@ var ar = {
|
|
|
549
555
|
Employer: Employer$1,
|
|
550
556
|
TerminationReason: TerminationReason$1,
|
|
551
557
|
ThereIsNoDegreesYet: ThereIsNoDegreesYet$1,
|
|
552
|
-
ThereIsNoExperiencesYet: ThereIsNoExperiencesYet$1
|
|
558
|
+
ThereIsNoExperiencesYet: ThereIsNoExperiencesYet$1,
|
|
559
|
+
ThereIsNoDependentsYet: ThereIsNoDependentsYet$1,
|
|
560
|
+
DependentTypeName: DependentTypeName$1
|
|
553
561
|
};
|
|
554
562
|
|
|
555
563
|
var ReportingTo = "Rapport à";
|
|
@@ -670,6 +678,8 @@ var Employer = "Employeur";
|
|
|
670
678
|
var TerminationReason = "Motif de fin de service";
|
|
671
679
|
var ThereIsNoDegreesYet = "Il n'y a pas encore de diplomes";
|
|
672
680
|
var ThereIsNoExperiencesYet = "Il n'y a pas encore d'experiences";
|
|
681
|
+
var ThereIsNoDependentsYet = "Il n'y a pas encore de personnes à charge";
|
|
682
|
+
var DependentTypeName = "Type de personne à charge";
|
|
673
683
|
var fr = {
|
|
674
684
|
ReportingTo: ReportingTo,
|
|
675
685
|
NotAnknown: NotAnknown,
|
|
@@ -791,7 +801,9 @@ var fr = {
|
|
|
791
801
|
Employer: Employer,
|
|
792
802
|
TerminationReason: TerminationReason,
|
|
793
803
|
ThereIsNoDegreesYet: ThereIsNoDegreesYet,
|
|
794
|
-
ThereIsNoExperiencesYet: ThereIsNoExperiencesYet
|
|
804
|
+
ThereIsNoExperiencesYet: ThereIsNoExperiencesYet,
|
|
805
|
+
ThereIsNoDependentsYet: ThereIsNoDependentsYet,
|
|
806
|
+
DependentTypeName: DependentTypeName
|
|
795
807
|
};
|
|
796
808
|
|
|
797
809
|
const BUILT_IN_LEXICONS = { en, ar, fr };
|
|
@@ -1112,6 +1124,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1112
1124
|
}]
|
|
1113
1125
|
}] });
|
|
1114
1126
|
|
|
1127
|
+
class ProfileEmployeeDependentsCach {
|
|
1128
|
+
baseUrl = '';
|
|
1129
|
+
dependents$ = null;
|
|
1130
|
+
clear() {
|
|
1131
|
+
this.baseUrl = '';
|
|
1132
|
+
}
|
|
1133
|
+
ensureBaseUrl(baseUrl) {
|
|
1134
|
+
if (this.baseUrl && this.baseUrl !== baseUrl) {
|
|
1135
|
+
this.clear();
|
|
1136
|
+
}
|
|
1137
|
+
this.baseUrl = baseUrl;
|
|
1138
|
+
}
|
|
1139
|
+
setDependents(baseUrl, value) {
|
|
1140
|
+
this.ensureBaseUrl(baseUrl);
|
|
1141
|
+
this.dependents$ = value;
|
|
1142
|
+
}
|
|
1143
|
+
getDependents(baseUrl) {
|
|
1144
|
+
return this.baseUrl === baseUrl ? this.dependents$ : null;
|
|
1145
|
+
}
|
|
1146
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileEmployeeDependentsCach, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1147
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileEmployeeDependentsCach, providedIn: 'root' });
|
|
1148
|
+
}
|
|
1149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileEmployeeDependentsCach, decorators: [{
|
|
1150
|
+
type: Injectable,
|
|
1151
|
+
args: [{
|
|
1152
|
+
providedIn: 'root'
|
|
1153
|
+
}]
|
|
1154
|
+
}] });
|
|
1155
|
+
|
|
1115
1156
|
class HRSelfWidgetsService {
|
|
1116
1157
|
http;
|
|
1117
1158
|
bankInformationCacheService;
|
|
@@ -1119,14 +1160,16 @@ class HRSelfWidgetsService {
|
|
|
1119
1160
|
jobInformationCacheService;
|
|
1120
1161
|
personalInformationCacheService;
|
|
1121
1162
|
qualificationsCacheService;
|
|
1163
|
+
profileEmployeeDependentsCachService;
|
|
1122
1164
|
headers = { 'api-version': '1' };
|
|
1123
|
-
constructor(http, bankInformationCacheService, entitlementsCacheService, jobInformationCacheService, personalInformationCacheService, qualificationsCacheService) {
|
|
1165
|
+
constructor(http, bankInformationCacheService, entitlementsCacheService, jobInformationCacheService, personalInformationCacheService, qualificationsCacheService, profileEmployeeDependentsCachService) {
|
|
1124
1166
|
this.http = http;
|
|
1125
1167
|
this.bankInformationCacheService = bankInformationCacheService;
|
|
1126
1168
|
this.entitlementsCacheService = entitlementsCacheService;
|
|
1127
1169
|
this.jobInformationCacheService = jobInformationCacheService;
|
|
1128
1170
|
this.personalInformationCacheService = personalInformationCacheService;
|
|
1129
1171
|
this.qualificationsCacheService = qualificationsCacheService;
|
|
1172
|
+
this.profileEmployeeDependentsCachService = profileEmployeeDependentsCachService;
|
|
1130
1173
|
}
|
|
1131
1174
|
getMainDetails(baseUrl) {
|
|
1132
1175
|
return this.http.get(`${baseUrl}/hr/widgets/me/main-details`, {
|
|
@@ -1431,6 +1474,22 @@ class HRSelfWidgetsService {
|
|
|
1431
1474
|
this.qualificationsCacheService.setDegrees(baseUrl, request$);
|
|
1432
1475
|
return request$;
|
|
1433
1476
|
}
|
|
1477
|
+
getEmployeeDependents(baseUrl, forceRefresh = false) {
|
|
1478
|
+
if (!forceRefresh) {
|
|
1479
|
+
const cachedRequest$ = this.profileEmployeeDependentsCachService.getDependents(baseUrl);
|
|
1480
|
+
if (cachedRequest$) {
|
|
1481
|
+
return cachedRequest$;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
const request$ = this.http
|
|
1485
|
+
.get(`${baseUrl}/hr/widgets/me/profile/dependents`, { headers: this.headers })
|
|
1486
|
+
.pipe(map((response) => response?.ResponseData ?? []), shareReplay(1), catchError((error) => {
|
|
1487
|
+
this.profileEmployeeDependentsCachService.clear();
|
|
1488
|
+
return throwError(() => error);
|
|
1489
|
+
}));
|
|
1490
|
+
this.profileEmployeeDependentsCachService.setDependents(baseUrl, request$);
|
|
1491
|
+
return request$;
|
|
1492
|
+
}
|
|
1434
1493
|
getEmployeeExperiences(baseUrl, forceRefresh = false) {
|
|
1435
1494
|
if (!forceRefresh) {
|
|
1436
1495
|
const cached = this.qualificationsCacheService.getExperiences(baseUrl);
|
|
@@ -1446,7 +1505,7 @@ class HRSelfWidgetsService {
|
|
|
1446
1505
|
this.qualificationsCacheService.setExperiences(baseUrl, request$);
|
|
1447
1506
|
return request$;
|
|
1448
1507
|
}
|
|
1449
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, deps: [{ token: i1.HttpClient }, { token: BankInformationCacheService }, { token: EntitlementsCacheService }, { token: JobInformationCacheService }, { token: PersonalInformationCacheService }, { token: QualificationsCacheService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1508
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, deps: [{ token: i1.HttpClient }, { token: BankInformationCacheService }, { token: EntitlementsCacheService }, { token: JobInformationCacheService }, { token: PersonalInformationCacheService }, { token: QualificationsCacheService }, { token: ProfileEmployeeDependentsCach }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1450
1509
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, providedIn: 'root' });
|
|
1451
1510
|
}
|
|
1452
1511
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, decorators: [{
|
|
@@ -1454,7 +1513,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1454
1513
|
args: [{
|
|
1455
1514
|
providedIn: 'root'
|
|
1456
1515
|
}]
|
|
1457
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: BankInformationCacheService }, { type: EntitlementsCacheService }, { type: JobInformationCacheService }, { type: PersonalInformationCacheService }, { type: QualificationsCacheService }] });
|
|
1516
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: BankInformationCacheService }, { type: EntitlementsCacheService }, { type: JobInformationCacheService }, { type: PersonalInformationCacheService }, { type: QualificationsCacheService }, { type: ProfileEmployeeDependentsCach }] });
|
|
1458
1517
|
|
|
1459
1518
|
class HRConstantsService {
|
|
1460
1519
|
defaultVacationBalanceColor = '#727070';
|