@skysoftware-co/bayan-hr-widgets-ui 1.0.34 → 1.0.36
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 +233 -11
- package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs +851 -14
- package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs.map +1 -1
- package/lib/entitlements/profile-entitlements-indemnity-widget/profile-entitlements-indemnity-widget.component.d.ts +32 -0
- package/lib/entitlements/profile-entitlements-medical-insurance-widget/components/medical-insurance-card/medical-insurance-card.component.d.ts +19 -0
- package/lib/entitlements/profile-entitlements-medical-insurance-widget/profile-entitlements-medical-insurance-widget.component.d.ts +36 -0
- package/lib/entitlements/profile-entitlements-others-widget/profile-entitlements-others-widget.component.d.ts +26 -0
- package/lib/entitlements/profile-entitlements-ticket-widget/components/ticket-card/ticket-card.component.d.ts +17 -0
- package/lib/entitlements/profile-entitlements-ticket-widget/profile-entitlements-ticket-widget.component.d.ts +34 -0
- package/lib/entitlements/profile-entitlements-vacations-widget/profile-entitlements-vacations-widget.component.d.ts +29 -0
- package/lib/profile-employee-dependents-widget/profile-employee-dependents-component.d.ts +22 -0
- package/lib/services/hr-self-widgets.service.d.ts +2 -0
- package/lib/shared/components/widget-card/widget-card-component.d.ts +10 -0
- package/lib/shared/services/entitlements-cache.service.d.ts +6 -0
- package/lib/shared/types/common.d.ts +8 -8
- package/package.json +1 -1
- package/public-api.d.ts +7 -0
- package/lib/my-vacation-team-widget/components/vacation-subordinates-popup/vacation-subordinates-popup.component.d.ts +0 -38
- package/lib/my-vacation-team-widget/my-vacation-team-widget.component.d.ts +0 -33
package/README.md
CHANGED
|
@@ -25,13 +25,32 @@ Run `ng test shared-ui` to execute the unit tests via [Karma](https://karma-runn
|
|
|
25
25
|
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
26
26
|
|
|
27
27
|
## Sky Bayan HR Components
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
This package contains shared HR components used in Bayan HR system, you can find in first installation the below
|
|
30
30
|
components:
|
|
31
31
|
1. My Main Details Widget
|
|
32
32
|
2. My Upcoming Events Widget
|
|
33
33
|
3. My Calendar Widget
|
|
34
|
-
|
|
34
|
+
4. My Next Week Vacation Insights Widget
|
|
35
|
+
5. Profile Personal Info Main Widget
|
|
36
|
+
6. Profile Personal Info Contact Widget
|
|
37
|
+
7. Profile Personal Info Address Widget
|
|
38
|
+
8. Profile Personal Info Languages Widget
|
|
39
|
+
9. Profile Personal Info Other Nationalities Widget
|
|
40
|
+
10. Profile Experiences Widget
|
|
41
|
+
11. Profile Degrees Widget
|
|
42
|
+
12. Profile Bank Information Widget
|
|
43
|
+
13. Profile Job Info Main Widget
|
|
44
|
+
14. Profile Job Info Contract Widget
|
|
45
|
+
15. Profile Job Info Salary Widget
|
|
46
|
+
16. Profile Job Info Service Charge Widget
|
|
47
|
+
17. Profile Employee Dependents Widget
|
|
48
|
+
18. Profile Entitlements Vacations Widget
|
|
49
|
+
19. Profile Entitlements Indemnity Widget
|
|
50
|
+
20. Profile Entitlements Ticket Widget
|
|
51
|
+
21. Profile Entitlements Medical Insurance Widget
|
|
52
|
+
22. Profile Entitlements Others Widget
|
|
53
|
+
|
|
35
54
|
## Dependencies
|
|
36
55
|
This library depends on `@skysoftware-co/bayan-components-ui` package which provides:
|
|
37
56
|
- Employee Badge Component
|
|
@@ -272,15 +291,15 @@ The component calls `GET {baseUrl}/hr/employee-portal/calendar` with query param
|
|
|
272
291
|
- Header: `api-version: 2`
|
|
273
292
|
|
|
274
293
|
|
|
275
|
-
## My Vacation
|
|
294
|
+
## My Next Week Vacation Insights Widget Component
|
|
276
295
|
|
|
277
296
|
### Usage
|
|
278
297
|
```html
|
|
279
|
-
<hr-my-vacation-
|
|
298
|
+
<hr-my-next-week-vacation-insights-widget
|
|
280
299
|
[baseUrl]="environment.baseUrl"
|
|
281
300
|
[showProperty]="true"
|
|
282
301
|
(isLoadingChanged)="onLoadingChanged($event)">
|
|
283
|
-
</hr-my-vacation-
|
|
302
|
+
</hr-my-next-week-vacation-insights-widget>
|
|
284
303
|
```
|
|
285
304
|
|
|
286
305
|
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.
|
|
@@ -290,20 +309,22 @@ This component displays a "Next Week Vacation Insights" card showing two badges:
|
|
|
290
309
|
|-------|------|---------------|-------------|
|
|
291
310
|
| `baseUrl` | string | `''` | Base URL for API calls |
|
|
292
311
|
| `showProperty` | boolean | `false` | Show employee property badge in the popup grid |
|
|
293
|
-
| `cardClass` | string | `'card rounded rounded-4 card-shadow
|
|
294
|
-
| `titleClass` | string | `'table-header-lg fw-meduim'` | Card title CSS class |
|
|
312
|
+
| `cardClass` | string | `'card rounded rounded-4 card-shadow border-top-0 h-100 p-4'` | Card container CSS class |
|
|
313
|
+
| `titleClass` | string | `'table-header-lg fw-meduim mb-3 mt-2'` | Card title CSS class |
|
|
295
314
|
| `valueClass` | string | `'fs-24 mt-1 link-dark hover-primary text-decoration-none'` | Badge value CSS class (clickable) |
|
|
296
315
|
| `disabledValueClass` | string | `'fs-24 mt-1 text-muted pe-none text-decoration-none'` | Badge value CSS class when count is 0 |
|
|
297
|
-
| `upcomingContainerClass` | string | `'border-start border-5 mb-
|
|
316
|
+
| `upcomingContainerClass` | string | `'border-start border-5 mb-4'` | Upcoming vacations badge container CSS class |
|
|
298
317
|
| `expectedContainerClass` | string | `'border-start border-5'` | Expected to return badge container CSS class |
|
|
318
|
+
| `firstRowClass` | string | `'mb-4'` | CSS class for the first badge row wrapper |
|
|
319
|
+
| `secondRowClass` | string | `'mt-3'` | CSS class for the second badge row wrapper |
|
|
299
320
|
|
|
300
321
|
### Output Events
|
|
301
322
|
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes
|
|
302
323
|
|
|
303
324
|
### API Endpoints
|
|
304
|
-
- **Summary**: `GET {baseUrl}/hr/widgets/me/team/
|
|
305
|
-
- **Upcoming list**: `GET {baseUrl}/hr/widgets/me/team/
|
|
306
|
-
- **Expected to return list**: `GET {baseUrl}/hr/widgets/me/team/
|
|
325
|
+
- **Summary**: `GET {baseUrl}/hr/widgets/me/team/next-week-vacation-insights/summary?ShowDirectSubordinatesOnly=false`
|
|
326
|
+
- **Upcoming list**: `GET {baseUrl}/hr/widgets/me/team/next-week-vacation-insights/upcoming-vacations`
|
|
327
|
+
- **Expected to return list**: `GET {baseUrl}/hr/widgets/me/team/next-week-vacation-insights/expected-to-return`
|
|
307
328
|
|
|
308
329
|
## Profile Widgets
|
|
309
330
|
|
|
@@ -735,3 +756,204 @@ The package also exports profile-focused widgets used in the employee profile pa
|
|
|
735
756
|
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
736
757
|
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
737
758
|
|
|
759
|
+
## Profile Employee Dependents Widget
|
|
760
|
+
|
|
761
|
+
### Usage
|
|
762
|
+
```html
|
|
763
|
+
<hr-profile-dependents-widget
|
|
764
|
+
[baseUrl]="baseUrl"
|
|
765
|
+
(isLoadingChanged)="onDependentsLoadingChanged($event)">
|
|
766
|
+
</hr-profile-dependents-widget>
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
This component displays employee dependents as cards (3 per row on large screens). Each card shows the dependent's name, type, birth date, and national number. It uses the shared `hr-widget-card` component for card rendering.
|
|
770
|
+
|
|
771
|
+
### Input Properties
|
|
772
|
+
| Input | Type | Default Value | Description |
|
|
773
|
+
|-------|------|---------------|-------------|
|
|
774
|
+
| `baseUrl` | string | `''` | Base URL for API calls |
|
|
775
|
+
| `sectionTitle` | string | `'Dependents'` | Section title translation key |
|
|
776
|
+
| `icon` | IconDefinition | `faUsersLine` | Header icon |
|
|
777
|
+
| `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
|
|
778
|
+
| `headerTextClass` | string | `'fs-16 mt-2 text-secondary'` | Header text CSS class |
|
|
779
|
+
| `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
|
|
780
|
+
| `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
|
|
781
|
+
| `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
|
|
782
|
+
|
|
783
|
+
### Output Events
|
|
784
|
+
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
785
|
+
|
|
786
|
+
## Profile Entitlement Widgets
|
|
787
|
+
|
|
788
|
+
The package includes entitlement widgets for displaying employee benefits and entitlements in the profile page.
|
|
789
|
+
|
|
790
|
+
## Profile Entitlements Vacations Widget
|
|
791
|
+
|
|
792
|
+
### Usage
|
|
793
|
+
```html
|
|
794
|
+
<hr-profile-entitlements-vacations-widget
|
|
795
|
+
[baseUrl]="baseUrl"
|
|
796
|
+
(isLoadingChanged)="onVacationsLoadingChanged($event)">
|
|
797
|
+
</hr-profile-entitlements-vacations-widget>
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
This component displays a list of vacation entitlements (vacation type name and entitlement days) in a two-column grid layout.
|
|
801
|
+
|
|
802
|
+
### Input Properties
|
|
803
|
+
| Input | Type | Default Value | Description |
|
|
804
|
+
|-------|------|---------------|-------------|
|
|
805
|
+
| `baseUrl` | string | `''` | Base URL for API calls (required) |
|
|
806
|
+
| `sectionTitle` | string | `'Vacations'` | Section title translation key |
|
|
807
|
+
| `vacationsIcon` | IconDefinition | `faIslandTropical` | Header icon |
|
|
808
|
+
| `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
|
|
809
|
+
| `headerTextClass` | string | `'mt-2 field-secondary-label-lg'` | Header text CSS class |
|
|
810
|
+
| `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
|
|
811
|
+
| `rowClass` | string | `'row mt-4'` | Row container CSS class |
|
|
812
|
+
| `labelClass` | string | `'field-secondary-label-sm'` | Label CSS class |
|
|
813
|
+
| `valueClass` | string | `'fs-14 fw-meduim mt-2'` | Value CSS class |
|
|
814
|
+
| `labelColumnClass` | string | `'col-6'` | Label column CSS class |
|
|
815
|
+
| `valueColumnClass` | string | `'col-6'` | Value column CSS class |
|
|
816
|
+
| `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
|
|
817
|
+
| `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
|
|
818
|
+
|
|
819
|
+
### Output Events
|
|
820
|
+
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
821
|
+
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
822
|
+
|
|
823
|
+
## Profile Entitlements Indemnity Widget
|
|
824
|
+
|
|
825
|
+
### Usage
|
|
826
|
+
```html
|
|
827
|
+
<hr-profile-entitlements-indemnity-widget
|
|
828
|
+
[baseUrl]="baseUrl"
|
|
829
|
+
[currencyCode]="currencyCode"
|
|
830
|
+
(isLoadingChanged)="onIndemnityLoadingChanged($event)">
|
|
831
|
+
</hr-profile-entitlements-indemnity-widget>
|
|
832
|
+
```
|
|
833
|
+
|
|
834
|
+
This component shows indemnity entitlement details including eligibility status, service years, and start date. Uses `hr-info-field` sub-components for layout.
|
|
835
|
+
|
|
836
|
+
### Input Properties
|
|
837
|
+
| Input | Type | Default Value | Description |
|
|
838
|
+
|-------|------|---------------|-------------|
|
|
839
|
+
| `baseUrl` | string | `''` | Base URL for API calls (required) |
|
|
840
|
+
| `currencyCode` | string | `''` | Currency code for amount display |
|
|
841
|
+
| `currencyDecimals` | number | `0` | Decimal precision for amount formatting |
|
|
842
|
+
| `sectionTitle` | string | `'indemnity'` | Section title translation key |
|
|
843
|
+
| `indemnityIcon` | IconDefinition | `faFileSignature` | Header icon |
|
|
844
|
+
| `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
|
|
845
|
+
| `headerTextClass` | string | `'mt-2 field-secondary-label-lg'` | Header text CSS class |
|
|
846
|
+
| `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
|
|
847
|
+
| `rowClass` | string | `'row mt-4'` | Row container CSS class |
|
|
848
|
+
| `columnClass` | string | `'col-6'` | Field column CSS class |
|
|
849
|
+
| `topSpacingColumnClass` | string | `'col-6 mt-4'` | Field column with top spacing CSS class |
|
|
850
|
+
| `labelClass` | string | `'field-secondary-label-sm'` | Label CSS class |
|
|
851
|
+
| `valueClass` | string | `'fs-14 fw-meduim'` | Value CSS class |
|
|
852
|
+
| `dateFormat` | string | `'dd/MM/yyyy'` | Date format for start date |
|
|
853
|
+
| `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
|
|
854
|
+
| `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
|
|
855
|
+
|
|
856
|
+
### Output Events
|
|
857
|
+
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
858
|
+
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
859
|
+
|
|
860
|
+
## Profile Entitlements Ticket Widget
|
|
861
|
+
|
|
862
|
+
### Usage
|
|
863
|
+
```html
|
|
864
|
+
<hr-profile-entitlements-ticket-widget
|
|
865
|
+
[baseUrl]="baseUrl"
|
|
866
|
+
(isLoadingChanged)="onTicketLoadingChanged($event)">
|
|
867
|
+
</hr-profile-entitlements-ticket-widget>
|
|
868
|
+
```
|
|
869
|
+
|
|
870
|
+
This component displays ticket entitlements as cards — one for the employee and one per dependent. Each card shows name, ticket class, sector, and entitlement frequency. Uses `hr-ticket-card` sub-component with `hr-widget-card` for card rendering.
|
|
871
|
+
|
|
872
|
+
### Input Properties
|
|
873
|
+
| Input | Type | Default Value | Description |
|
|
874
|
+
|-------|------|---------------|-------------|
|
|
875
|
+
| `baseUrl` | string | `''` | Base URL for API calls (required) |
|
|
876
|
+
| `sectionTitle` | string | `'tickets'` | Section title translation key |
|
|
877
|
+
| `ticketsIcon` | IconDefinition | `faTicketsAirline` | Header icon |
|
|
878
|
+
| `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
|
|
879
|
+
| `headerTextClass` | string | `'mt-2 field-secondary-label-lg'` | Header text CSS class |
|
|
880
|
+
| `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
|
|
881
|
+
| `columnClass` | string | `'col-lg-4 col-6 mt-4'` | Card column CSS class |
|
|
882
|
+
| `cardHeight` | number | `135` | Card height in pixels |
|
|
883
|
+
| `cardClass` | string | `'p-3 card-shadow border border-1 h-100 rounded rounded-2'` | Card CSS class |
|
|
884
|
+
| `nameClass` | string | `'text-dark fs-16'` | Name text CSS class |
|
|
885
|
+
| `subtitleClass` | string | `'field-secondary-label-sm mb-3'` | Subtitle CSS class |
|
|
886
|
+
| `labelClass` | string | `'fs-12 text-secondary'` | Label CSS class |
|
|
887
|
+
| `valueClass` | string | `'fs-12 text-dark-gray mx-1'` | Value CSS class |
|
|
888
|
+
| `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
|
|
889
|
+
| `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
|
|
890
|
+
|
|
891
|
+
### Output Events
|
|
892
|
+
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
893
|
+
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
894
|
+
|
|
895
|
+
## Profile Entitlements Medical Insurance Widget
|
|
896
|
+
|
|
897
|
+
### Usage
|
|
898
|
+
```html
|
|
899
|
+
<hr-profile-entitlements-medical-insurance-widget
|
|
900
|
+
[baseUrl]="baseUrl"
|
|
901
|
+
(isLoadingChanged)="onMedicalInsuranceLoadingChanged($event)">
|
|
902
|
+
</hr-profile-entitlements-medical-insurance-widget>
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
This component displays medical insurance information as cards — the employee card shows class, number, coverage date, total employee/employer share; dependent cards show class, number, and coverage date. Uses `hr-medical-insurance-card` sub-component with `hr-widget-card` for card rendering.
|
|
906
|
+
|
|
907
|
+
### Input Properties
|
|
908
|
+
| Input | Type | Default Value | Description |
|
|
909
|
+
|-------|------|---------------|-------------|
|
|
910
|
+
| `baseUrl` | string | `''` | Base URL for API calls (required) |
|
|
911
|
+
| `sectionTitle` | string | `'MedicalInsurance'` | Section title translation key |
|
|
912
|
+
| `medicalInsuranceIcon` | IconDefinition | `faNotesMedical` | Header icon |
|
|
913
|
+
| `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
|
|
914
|
+
| `headerTextClass` | string | `'mt-2 field-secondary-label-lg'` | Header text CSS class |
|
|
915
|
+
| `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
|
|
916
|
+
| `labelClass` | string | `'field-secondary-label-sm'` | Label CSS class |
|
|
917
|
+
| `valueClass` | string | `'text-dark-gray mx-1'` | Value CSS class |
|
|
918
|
+
| `columnClass` | string | `'col-lg-4 col-6 mt-4'` | Card column CSS class |
|
|
919
|
+
| `cardHeight` | number | `185` | Card height in pixels |
|
|
920
|
+
| `cardClass` | string | `'p-3 card-shadow h-100 border border-1 rounded rounded-2'` | Card CSS class |
|
|
921
|
+
| `nameClass` | string | `'text-dark fs-16 mb-2'` | Name text CSS class |
|
|
922
|
+
| `dateFormat` | string | `'dd/MM/yyyy'` | Date format for coverage date |
|
|
923
|
+
| `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class |
|
|
924
|
+
| `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class |
|
|
925
|
+
|
|
926
|
+
### Output Events
|
|
927
|
+
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
928
|
+
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
929
|
+
|
|
930
|
+
## Profile Entitlements Others Widget
|
|
931
|
+
|
|
932
|
+
### Usage
|
|
933
|
+
```html
|
|
934
|
+
<hr-profile-entitlements-others-widget
|
|
935
|
+
[baseUrl]="baseUrl"
|
|
936
|
+
(isLoadingChanged)="onOthersLoadingChanged($event)">
|
|
937
|
+
</hr-profile-entitlements-others-widget>
|
|
938
|
+
```
|
|
939
|
+
|
|
940
|
+
This component displays two fields: overtime eligibility (Eligible/NotEligible) and social security membership (Member/NotMember). Fetches both values via `forkJoin`.
|
|
941
|
+
|
|
942
|
+
### Input Properties
|
|
943
|
+
| Input | Type | Default Value | Description |
|
|
944
|
+
|-------|------|---------------|-------------|
|
|
945
|
+
| `baseUrl` | string | `''` | Base URL for API calls (required) |
|
|
946
|
+
| `sectionTitle` | string | `'Others'` | Section title translation key |
|
|
947
|
+
| `othersIcon` | IconDefinition | `faGrid2Plus` | Header icon |
|
|
948
|
+
| `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class |
|
|
949
|
+
| `headerTextClass` | string | `'mt-2 field-secondary-label-lg'` | Header text CSS class |
|
|
950
|
+
| `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class |
|
|
951
|
+
| `rowClass` | string | `'row mt-4 mb-5'` | Row container CSS class |
|
|
952
|
+
| `columnClass` | string | `'col-md-4 col-6'` | Field column CSS class |
|
|
953
|
+
| `labelClass` | string | `'field-secondary-label-sm'` | Label CSS class |
|
|
954
|
+
| `valueClass` | string | `'fs-14 fw-meduim'` | Value CSS class |
|
|
955
|
+
|
|
956
|
+
### Output Events
|
|
957
|
+
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
958
|
+
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
959
|
+
|