@skysoftware-co/bayan-hr-widgets-ui 2.0.27 → 2.0.28

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.
Files changed (104) hide show
  1. package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs +4811 -0
  2. package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs.map +1 -0
  3. package/package.json +15 -3
  4. package/types/skysoftware-co-bayan-hr-widgets-ui.d.ts +1308 -0
  5. package/ng-package.json +0 -9
  6. package/src/assets/i18n/ar.json +0 -166
  7. package/src/assets/i18n/en.json +0 -166
  8. package/src/assets/i18n/fr.json +0 -166
  9. package/src/lib/my-calendar-widget/my-calendar-widget.component.html +0 -25
  10. package/src/lib/my-calendar-widget/my-calendar-widget.component.ts +0 -220
  11. package/src/lib/my-main-details-widget/my-main-details-widget.component.html +0 -157
  12. package/src/lib/my-main-details-widget/my-main-details-widget.component.ts +0 -179
  13. package/src/lib/my-next-week-vacation-insights-widget/components/next-week-vacation-insights-popup/next-week-vacation-insights-popup.component.html +0 -131
  14. package/src/lib/my-next-week-vacation-insights-widget/components/next-week-vacation-insights-popup/next-week-vacation-insights-popup.component.ts +0 -119
  15. package/src/lib/my-next-week-vacation-insights-widget/my-next-week-vacation-insights-widget.component.html +0 -35
  16. package/src/lib/my-next-week-vacation-insights-widget/my-next-week-vacation-insights-widget.component.ts +0 -110
  17. package/src/lib/my-profile/address-widget/my-profile-address-widget.component.html +0 -57
  18. package/src/lib/my-profile/address-widget/my-profile-address-widget.component.ts +0 -70
  19. package/src/lib/my-profile/bank-info-widget/my-profile-bank-info-widget.component.html +0 -101
  20. package/src/lib/my-profile/bank-info-widget/my-profile-bank-info-widget.component.ts +0 -89
  21. package/src/lib/my-profile/contact-widget/my-profile-contact-widget.component.html +0 -89
  22. package/src/lib/my-profile/contact-widget/my-profile-contact-widget.component.ts +0 -78
  23. package/src/lib/my-profile/contract-widget/my-profile-contract-widget.component.html +0 -63
  24. package/src/lib/my-profile/contract-widget/my-profile-contract-widget.component.ts +0 -73
  25. package/src/lib/my-profile/degrees-widget/my-profile-degrees-widget-component.html +0 -86
  26. package/src/lib/my-profile/degrees-widget/my-profile-degrees-widget-component.ts +0 -98
  27. package/src/lib/my-profile/dependents-documents-widget/my-profile-dependents-documents-widget.html +0 -83
  28. package/src/lib/my-profile/dependents-documents-widget/my-profile-dependents-documents-widget.ts +0 -126
  29. package/src/lib/my-profile/documents-widgets/components/document-card/document-card.component.html +0 -53
  30. package/src/lib/my-profile/documents-widgets/components/document-card/document-card.component.ts +0 -50
  31. package/src/lib/my-profile/documents-widgets/components/document-row/document-row.component.html +0 -48
  32. package/src/lib/my-profile/documents-widgets/components/document-row/document-row.component.ts +0 -44
  33. package/src/lib/my-profile/documents-widgets/components/document-tablet-card/document-tablet-card.component.html +0 -46
  34. package/src/lib/my-profile/documents-widgets/components/document-tablet-card/document-tablet-card.component.ts +0 -47
  35. package/src/lib/my-profile/employee-dependents-widget/my-profile-employee-dependents-component.html +0 -50
  36. package/src/lib/my-profile/employee-dependents-widget/my-profile-employee-dependents-component.ts +0 -63
  37. package/src/lib/my-profile/entitlements-others-widget/my-profile-entitlements-others-widget.component.html +0 -26
  38. package/src/lib/my-profile/entitlements-others-widget/my-profile-entitlements-others-widget.component.ts +0 -66
  39. package/src/lib/my-profile/experiences-widget/my-profile-experiences-widget-component.html +0 -93
  40. package/src/lib/my-profile/experiences-widget/my-profile-experiences-widget-component.ts +0 -102
  41. package/src/lib/my-profile/indemnity-widget/my-profile-indemnity-widget.component.html +0 -49
  42. package/src/lib/my-profile/indemnity-widget/my-profile-indemnity-widget.component.ts +0 -79
  43. package/src/lib/my-profile/job-info-widget/my-profile-job-info-widget.component.html +0 -71
  44. package/src/lib/my-profile/job-info-widget/my-profile-job-info-widget.component.ts +0 -73
  45. package/src/lib/my-profile/languages-widget/my-profile-languages-widget.component.html +0 -23
  46. package/src/lib/my-profile/languages-widget/my-profile-languages-widget.component.ts +0 -70
  47. package/src/lib/my-profile/medical-insurance-widget/components/medical-insurance-card/medical-insurance-card.component.html +0 -18
  48. package/src/lib/my-profile/medical-insurance-widget/components/medical-insurance-card/medical-insurance-card.component.ts +0 -29
  49. package/src/lib/my-profile/medical-insurance-widget/my-profile-medical-insurance-widget.component.html +0 -52
  50. package/src/lib/my-profile/medical-insurance-widget/my-profile-medical-insurance-widget.component.ts +0 -103
  51. package/src/lib/my-profile/official-documents-widget/my-profile-official-documents-widget.html +0 -82
  52. package/src/lib/my-profile/official-documents-widget/my-profile-official-documents-widget.ts +0 -119
  53. package/src/lib/my-profile/other-nationalities-widget/my-profile-other-nationalities-widget.component.html +0 -23
  54. package/src/lib/my-profile/other-nationalities-widget/my-profile-other-nationalities-widget.component.ts +0 -70
  55. package/src/lib/my-profile/personal-info-main-widget/my-profile-personal-info-main-widget.component.html +0 -115
  56. package/src/lib/my-profile/personal-info-main-widget/my-profile-personal-info-main-widget.component.ts +0 -75
  57. package/src/lib/my-profile/salary-widget/my-profile-salary-widget.component.html +0 -37
  58. package/src/lib/my-profile/salary-widget/my-profile-salary-widget.component.ts +0 -85
  59. package/src/lib/my-profile/service-charge-widget/my-profile-service-charge-widget.component.html +0 -16
  60. package/src/lib/my-profile/service-charge-widget/my-profile-service-charge-widget.component.ts +0 -101
  61. package/src/lib/my-profile/ticket-widget/components/ticket-card/ticket-card.component.html +0 -23
  62. package/src/lib/my-profile/ticket-widget/components/ticket-card/ticket-card.component.ts +0 -26
  63. package/src/lib/my-profile/ticket-widget/my-profile-ticket-widget.component.html +0 -68
  64. package/src/lib/my-profile/ticket-widget/my-profile-ticket-widget.component.ts +0 -93
  65. package/src/lib/my-profile/vacations-widget/my-profile-vacations-widget.component.html +0 -34
  66. package/src/lib/my-profile/vacations-widget/my-profile-vacations-widget.component.ts +0 -66
  67. package/src/lib/my-team-subordinates-popup-widget/components/employee-main-info-card/employee-information-card.component.ts +0 -65
  68. package/src/lib/my-team-subordinates-popup-widget/components/employee-main-info-card/employee-main-info-card.component.html +0 -57
  69. package/src/lib/my-team-subordinates-popup-widget/components/my-team-subordinates-popup/my-team-popup.component.html +0 -108
  70. package/src/lib/my-team-subordinates-popup-widget/components/my-team-subordinates-popup/my-team-popup.component.ts +0 -332
  71. package/src/lib/my-upcoming-events-widget/components/event-item/event-item.component.html +0 -53
  72. package/src/lib/my-upcoming-events-widget/components/event-item/event-item.component.ts +0 -42
  73. package/src/lib/my-upcoming-events-widget/components/event-tab-bar/event-tab-bar.component.html +0 -21
  74. package/src/lib/my-upcoming-events-widget/components/event-tab-bar/event-tab-bar.component.ts +0 -44
  75. package/src/lib/my-upcoming-events-widget/components/events-popup/events-popup.component.html +0 -67
  76. package/src/lib/my-upcoming-events-widget/components/events-popup/events-popup.component.ts +0 -74
  77. package/src/lib/my-upcoming-events-widget/my-upcoming-events-widget.component.html +0 -74
  78. package/src/lib/my-upcoming-events-widget/my-upcoming-events-widget.component.ts +0 -199
  79. package/src/lib/services/hr-self-widgets.service.ts +0 -624
  80. package/src/lib/shared/components/card-header/card-header.component.html +0 -4
  81. package/src/lib/shared/components/card-header/card-header.component.ts +0 -18
  82. package/src/lib/shared/components/hr-employee-calendar/hr-employee-calendar.component.html +0 -47
  83. package/src/lib/shared/components/hr-employee-calendar/hr-employee-calendar.component.ts +0 -193
  84. package/src/lib/shared/components/info-field/info-field.component.html +0 -2
  85. package/src/lib/shared/components/info-field/info-field.component.ts +0 -20
  86. package/src/lib/shared/components/widget-card/widget-card-component.html +0 -3
  87. package/src/lib/shared/components/widget-card/widget-card-component.ts +0 -17
  88. package/src/lib/shared/pipes/translate.pipe.ts +0 -34
  89. package/src/lib/shared/services/bank-information-cache.service.ts +0 -29
  90. package/src/lib/shared/services/common-methods.service.ts +0 -33
  91. package/src/lib/shared/services/constants.service.ts +0 -12
  92. package/src/lib/shared/services/entitlements-cache.service.ts +0 -94
  93. package/src/lib/shared/services/job-information-cache.service.ts +0 -72
  94. package/src/lib/shared/services/my-team-popup.service.ts +0 -34
  95. package/src/lib/shared/services/personal-information-cache.service.ts +0 -77
  96. package/src/lib/shared/services/profile-documents-cache-service.ts +0 -44
  97. package/src/lib/shared/services/profile-employee-dependents-cach.ts +0 -37
  98. package/src/lib/shared/services/qualifications-cache.service.ts +0 -45
  99. package/src/lib/shared/services/translate.service.ts +0 -35
  100. package/src/lib/shared/types/common.ts +0 -359
  101. package/src/public-api.ts +0 -35
  102. package/tsconfig.lib.json +0 -11
  103. package/tsconfig.lib.prod.json +0 -9
  104. package/tsconfig.spec.json +0 -8
@@ -1,119 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { ChangeDetectionStrategy, Component, OnInit, inject, input, output, signal } from '@angular/core';
3
- import { SkyEmptyDesignCardComponent, SkySectionDividerComponent } from '@skysoftware-co/sky-components-ui';
4
- import { faFileLines, faFolderArrowDown } from '@fortawesome/pro-light-svg-icons';
5
- import { faEye } from '@fortawesome/pro-regular-svg-icons';
6
- import { HRSelfWidgetsService } from '../../services/hr-self-widgets.service';
7
- import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
8
- import { IconDefinition } from '@fortawesome/angular-fontawesome';
9
- import { HRDocumentCardComponent } from '../documents-widgets/components/document-card/document-card.component';
10
- import { HrDocumentTabletCardComponent } from '../documents-widgets/components/document-tablet-card/document-tablet-card.component';
11
- import { HRTranslatePipe } from '../../shared/pipes/translate.pipe';
12
-
13
- @Component({
14
- selector: 'hr-my-profile-personal-documents-widget',
15
- standalone: true,
16
- imports: [
17
- CommonModule,
18
- SkySectionDividerComponent,
19
- HRTranslatePipe,
20
- SkyEmptyDesignCardComponent,
21
- FontAwesomeModule,
22
- HRDocumentCardComponent,
23
- HrDocumentTabletCardComponent,
24
- ],
25
- templateUrl: './my-profile-official-documents-widget.html',
26
- changeDetection: ChangeDetectionStrategy.OnPush,
27
- })
28
- export class MyProfilePersonalDocumentsWidgetComponent implements OnInit {
29
- readonly documents = signal<any[]>([]);
30
- readonly isLoading = signal(true);
31
-
32
- readonly baseUrl = input<string>('');
33
- readonly employeeName = input<string>('');
34
- readonly sectionTitle = input<string>('EmployeeDocuments');
35
- readonly icon = input(faFileLines);
36
- readonly viewIcon = input<IconDefinition>(faEye);
37
- readonly downloadIcon = input(faFolderArrowDown);
38
- readonly headerIconClass = input<string>('primary-icon-xl');
39
- readonly headerTextClass = input<string>('fs-16 mt-2 text-secondary');
40
- readonly headerDividerClass = input<string>('flex-grow-1 ms-2');
41
- readonly valueClass = input<string>('text-dark-gray fs-14 text-break');
42
- readonly viewIconClass = input<string>('fs-15 text-dark cursor-pointer');
43
- readonly downloadIconClass = input<string>('fs-15 text-dark cursor-pointer');
44
- readonly emptyStateContainerClass = input<string>(
45
- 'd-flex flex-column justify-content-center align-items-center my-5',
46
- );
47
- readonly emptyStateTextClass = input<string>('field-secondary-label-md');
48
- readonly cardClass = input<string>('mt-4 card-shadow position-relative p-4');
49
- readonly topSpacingColClass = input<string>('col-md-3 col-6 mt-4');
50
- readonly titleContainerClass = input<string>('mb-3');
51
- readonly titleClass = input<string>('text-dark fs-16 mb-0');
52
- readonly labelClass = input<string>('field-secondary-label-sm mb-1');
53
- readonly actionsColumnClass = input<string>('col-2 d-flex flex-column mt-3');
54
- readonly rowClass = input<string>('row');
55
- readonly dataColClass = input<string>('col-10');
56
- readonly dataColSpacingClass = input<string>('mt-2');
57
- readonly dataRowClass = input<string>('row align-items-center py-1 gx-0');
58
- readonly typeColClass = input<string>('col-3');
59
- readonly numberColClass = input<string>('col-3');
60
- readonly issueDateColClass = input<string>('col-3');
61
- readonly expiryDateColClass = input<string>('col-3');
62
- readonly actionsColClass = input<string>('col-2 d-flex align-items-center');
63
- readonly actionsWrapperClass = input<string>('d-flex align-items-center gap-2');
64
- readonly downloadContainerClass = input<string>(
65
- 'bg-light-gray rounded-3 d-flex align-items-center justify-content-center px-1 cursor-pointer',
66
- );
67
-
68
- readonly tabletContainerClass = input<string>('mt-3');
69
- readonly tabletCardClass = input<string>('row px-4 py-3 card-shadow');
70
- readonly tabletCardHeight = input<string>('175px');
71
- readonly tabletColWithAttachmentClass = input<string>('col-5');
72
- readonly tabletColWithoutAttachmentClass = input<string>('col-6');
73
- readonly tabletActionsColClass = input<string>('col-1 d-flex align-items-center');
74
- readonly tabletBottomRowSpacingClass = input<string>('mt-4');
75
- readonly tabletDownloadCountClass = input<string>('text-dark fs-12 fw-bold ps-2');
76
-
77
- readonly isMobile = input<boolean>(false);
78
- readonly isTablet = input<boolean>(false);
79
-
80
- readonly isLoadingChanged = output<boolean>();
81
- readonly attachmentViewed = output<any>();
82
- readonly attachmentDownloaded = output<any>();
83
- readonly errorOccurred = output<string>();
84
-
85
- private readonly service = inject(HRSelfWidgetsService);
86
-
87
- ngOnInit(): void {
88
- if (!this.baseUrl()) {
89
- this.isLoading.set(false);
90
- return;
91
- }
92
- this.isLoadingChanged.emit(true);
93
- this.service.getPersonalDocuments(this.baseUrl()).subscribe({
94
- next: (res: any) => {
95
- this.documents.set(res ?? []);
96
- this.isLoading.set(false);
97
- this.isLoadingChanged.emit(false);
98
- },
99
- error: (error: any) => {
100
- this.documents.set([]);
101
- this.isLoading.set(false);
102
- this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
103
- this.isLoadingChanged.emit(false);
104
- },
105
- });
106
- }
107
-
108
- onAttachmentView(doc: any): void {
109
- if (doc.Attachments?.length) {
110
- this.attachmentViewed.emit(doc.Attachments[0]);
111
- }
112
- }
113
-
114
- onDownload(doc: any): void {
115
- const attachments = doc.Attachments ?? [];
116
- if (!attachments.length) return;
117
- this.attachmentDownloaded.emit(attachments);
118
- }
119
- }
@@ -1,23 +0,0 @@
1
- <sky-section-divider
2
- [fontAwesomeIcon]="otherNationalitiesIcon()"
3
- [text]="sectionTitle() | translate | uppercase"
4
- [iconClass]="headerIconClass()"
5
- [textClass]="headerTextClass()"
6
- [dividerClass]="headerDividerClass()"
7
- ></sky-section-divider>
8
-
9
- @if ((personalInfo()?.length ?? 0) > 0) {
10
- <div [ngClass]="contentTextClass()">
11
- {{ getOtherNationalities() }}
12
- </div>
13
- } @else {
14
- <sky-empty-design-card
15
- [visibleIcon]="false"
16
- [visibleQuickAction]="false"
17
- [containerClass]="emptyStateContainerClass()"
18
- [cardBodyClass]="''"
19
- [cardBodyContainerClass]="''"
20
- [emptyTextClass]="emptyStateTextClass()"
21
- [emptyText]="isLoading() ? (sectionTitle() | translate) + ' ' + ('IsLoading' | translate) : (emptyStateTextKey() | translate)"
22
- ></sky-empty-design-card>
23
- }
@@ -1,70 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { ChangeDetectionStrategy, Component, OnInit, inject, input, output, signal } from '@angular/core';
3
- import { faEarthAfrica } from '@fortawesome/pro-light-svg-icons';
4
- import { HRTranslatePipe } from '../../shared/pipes/translate.pipe';
5
- import { SkyEmptyDesignCardComponent, SkySectionDividerComponent } from '@skysoftware-co/sky-components-ui';
6
- import { HRSelfWidgetsService } from '../../services/hr-self-widgets.service';
7
-
8
- @Component({
9
- selector: 'hr-my-profile-other-nationalities-widget',
10
- standalone: true,
11
- imports: [CommonModule, HRTranslatePipe, SkySectionDividerComponent, SkyEmptyDesignCardComponent],
12
- templateUrl: './my-profile-other-nationalities-widget.component.html',
13
- changeDetection: ChangeDetectionStrategy.OnPush,
14
- })
15
- export class MyProfileOtherNationalitiesWidgetComponent implements OnInit {
16
- readonly personalInfo = signal<string[] | null>(null);
17
- readonly isLoading = signal(true);
18
- readonly baseUrl = input.required<string>();
19
- readonly headerIconClass = input<string>('primary-icon-xl');
20
- readonly headerTextClass = input<string>('fs-16 mt-2 text-secondary');
21
- readonly headerDividerClass = input<string>('flex-grow-1 ms-2');
22
- readonly contentTextClass = input<string>('text-dark-gray fs-14 fw-medium mt-4');
23
- readonly emptyStateContainerClass = input<string>(
24
- 'd-flex flex-column justify-content-center align-items-center my-5',
25
- );
26
- readonly emptyStateTextClass = input<string>('field-secondary-label-md');
27
- readonly emptyStateTextKey = input<string>('ThereIsNoOtherNationalitiesYet');
28
- readonly hasDataChange = output<boolean>();
29
- readonly isLoadingChanged = output<boolean>();
30
- readonly errorOccurred = output<string>();
31
-
32
- readonly otherNationalitiesIcon = input(faEarthAfrica);
33
- readonly sectionTitle = input('otherNationalities');
34
-
35
- private readonly hrSelfWidgetsService = inject(HRSelfWidgetsService);
36
-
37
- ngOnInit(): void {
38
- if (!this.baseUrl()) {
39
- this.isLoading.set(false);
40
- this.emitHasData();
41
- return;
42
- }
43
-
44
- this.isLoadingChanged.emit(true);
45
-
46
- this.hrSelfWidgetsService.getPersonalInfoOtherNationalities(this.baseUrl()).subscribe({
47
- next: response => {
48
- this.isLoading.set(false);
49
- this.isLoadingChanged.emit(false);
50
- this.personalInfo.set(response ?? []);
51
- this.emitHasData();
52
- },
53
- error: error => {
54
- this.isLoading.set(false);
55
- this.isLoadingChanged.emit(false);
56
- this.personalInfo.set([]);
57
- this.emitHasData();
58
- this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
59
- },
60
- });
61
- }
62
-
63
- private emitHasData(): void {
64
- this.hasDataChange.emit((this.personalInfo()?.length ?? 0) > 0);
65
- }
66
-
67
- getOtherNationalities(): string {
68
- return this.personalInfo()?.join(', ') || '-';
69
- }
70
- }
@@ -1,115 +0,0 @@
1
- <sky-section-divider
2
- [fontAwesomeIcon]="mainIcon()"
3
- [text]="sectionTitle() | translate | uppercase"
4
- [iconClass]="headerIconClass()"
5
- [textClass]="headerTextClass()"
6
- [dividerClass]="headerDividerClass()"
7
- ></sky-section-divider>
8
-
9
- @if (employeePersonalInformation()) {
10
- <div [ngClass]="rowClass()">
11
- <div [ngClass]="columnClass()">
12
- <hr-info-field
13
- [labelKey]="'Name'"
14
- [value]="employeePersonalInformation()!.EmployeeName"
15
- [labelClass]="labelClass()"
16
- [valueClass]="valueClass()"
17
- ></hr-info-field>
18
- </div>
19
- <div [ngClass]="columnClass()">
20
- <div [ngClass]="labelClass()">{{ 'Name' | translate }} ({{ alternateLanguage() }})</div>
21
- @if (employeePersonalInformation()!.EmployeeNameAlternate) {
22
- <div [ngClass]="valueClass()">{{ employeePersonalInformation()!.EmployeeNameAlternate }}</div>
23
- } @else {
24
- <div [ngClass]="valueClass()">{{ '—' }}</div>
25
- }
26
- </div>
27
-
28
- <div [ngClass]="hiddenSpacerColClass()"></div>
29
-
30
- <div [ngClass]="topSpacingColumnClass()">
31
- <hr-info-field
32
- [labelKey]="'Nationality'"
33
- [value]="employeePersonalInformation()!.NationalityName"
34
- [labelClass]="labelClass()"
35
- [valueClass]="valueClass()"
36
- ></hr-info-field>
37
- </div>
38
- <div [ngClass]="topSpacingColumnClass()">
39
- <hr-info-field
40
- [labelKey]="'NationalNumber'"
41
- [value]="employeePersonalInformation()!.NationalNumber"
42
- [labelClass]="labelClass()"
43
- [valueClass]="valueClass()"
44
- ></hr-info-field>
45
- </div>
46
- <div [ngClass]="topSpacingColumnClass()">
47
- <hr-info-field
48
- [labelKey]="'SocialSecurityNumber'"
49
- [value]="employeePersonalInformation()!.SocialSecurityNumber"
50
- [labelClass]="labelClass()"
51
- [valueClass]="valueClass()"
52
- ></hr-info-field>
53
- </div>
54
-
55
- <div [ngClass]="topSpacingColumnClass()">
56
- <hr-info-field
57
- [labelKey]="'MaritalStatus'"
58
- [value]="employeePersonalInformation()!.MaritalStateName"
59
- [labelClass]="labelClass()"
60
- [valueClass]="valueClass()"
61
- ></hr-info-field>
62
- </div>
63
- <div [ngClass]="topSpacingColumnClass()">
64
- <hr-info-field
65
- [labelKey]="'BirthDate'"
66
- [value]="employeePersonalInformation()!.BirthDate ? (employeePersonalInformation()!.BirthDate | date: 'dd/MM/yyyy') : null"
67
- [labelClass]="labelClass()"
68
- [valueClass]="valueClass()"
69
- ></hr-info-field>
70
- </div>
71
- <div [ngClass]="topSpacingColumnClass()">
72
- <hr-info-field
73
- [labelKey]="'BirthPlace'"
74
- [value]="employeePersonalInformation()!.BirthPlace"
75
- [labelClass]="labelClass()"
76
- [valueClass]="valueClass()"
77
- ></hr-info-field>
78
- </div>
79
-
80
- <div [ngClass]="topSpacingBottomMdSpacingColumnClass()">
81
- <hr-info-field
82
- [labelKey]="'BloodType'"
83
- [value]="employeePersonalInformation()!.BloodTypeCode"
84
- [labelClass]="labelClass()"
85
- [valueClass]="valueClass()"
86
- ></hr-info-field>
87
- </div>
88
- <div [ngClass]="topSpacingBottomMdSpacingColumnClass()">
89
- <hr-info-field
90
- [labelKey]="'Religion'"
91
- [value]="employeePersonalInformation()!.ReligionName"
92
- [labelClass]="labelClass()"
93
- [valueClass]="valueClass()"
94
- ></hr-info-field>
95
- </div>
96
- <div [ngClass]="topSpacingBottomSpacingColumnClass()">
97
- <hr-info-field
98
- [labelKey]="'MinistryOfLaborNumber'"
99
- [value]="employeePersonalInformation()!.MinistryOfLaborNumber"
100
- [labelClass]="labelClass()"
101
- [valueClass]="valueClass()"
102
- ></hr-info-field>
103
- </div>
104
- </div>
105
- } @else {
106
- <sky-empty-design-card
107
- [visibleIcon]="false"
108
- [visibleQuickAction]="false"
109
- [containerClass]="emptyStateContainerClass()"
110
- [cardBodyClass]="''"
111
- [cardBodyContainerClass]="''"
112
- [emptyTextClass]="emptyStateTextClass()"
113
- [emptyText]="isLoading() ? (sectionTitle() | translate) + ' ' + ('IsLoading' | translate) : ('ThereIsNoMainYet' | translate)"
114
- ></sky-empty-design-card>
115
- }
@@ -1,75 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { ChangeDetectionStrategy, Component, OnInit, inject, input, output, signal } from '@angular/core';
3
- import { faMemoCircleInfo } from '@fortawesome/pro-light-svg-icons';
4
- import { HRTranslatePipe } from '../../shared/pipes/translate.pipe';
5
- import { SkyEmptyDesignCardComponent, SkySectionDividerComponent } from '@skysoftware-co/sky-components-ui';
6
- import { PersonalInfoMainDetails } from '../../shared/types/common';
7
- import { HRSelfWidgetsService } from '../../services/hr-self-widgets.service';
8
- import { HRInfoFieldComponent } from '../../shared/components/info-field/info-field.component';
9
-
10
- @Component({
11
- selector: 'hr-my-profile-personal-info-main-widget',
12
- standalone: true,
13
- imports: [
14
- CommonModule,
15
- HRTranslatePipe,
16
- SkySectionDividerComponent,
17
- SkyEmptyDesignCardComponent,
18
- HRInfoFieldComponent,
19
- ],
20
- templateUrl: './my-profile-personal-info-main-widget.component.html',
21
- changeDetection: ChangeDetectionStrategy.OnPush,
22
- })
23
- export class ProfilePersonalInfoMainWidgetComponent implements OnInit {
24
- readonly employeePersonalInformation = signal<PersonalInfoMainDetails | null>(null);
25
- readonly isLoading = signal(true);
26
- readonly baseUrl = input.required<string>();
27
- readonly alternateLanguage = input<string>('English');
28
-
29
- readonly headerIconClass = input<string>('primary-icon-xl');
30
- readonly headerTextClass = input<string>('mt-2 field-secondary-label-lg');
31
- readonly headerDividerClass = input<string>('flex-grow-1 ms-2');
32
-
33
- readonly rowClass = input<string>('row mt-4');
34
- readonly columnClass = input<string>('col-md-4 col-6');
35
- readonly hiddenSpacerColClass = input<string>('col-md-4 col-6 d-md-block d-none');
36
- readonly topSpacingColumnClass = input<string>('col-md-4 col-6 mt-4');
37
- readonly topSpacingBottomMdSpacingColumnClass = input<string>('col-md-4 col-6 mt-4 mb-md-5');
38
- readonly topSpacingBottomSpacingColumnClass = input<string>('col-md-4 col-6 mt-4 mb-5');
39
- readonly labelClass = input<string>('field-secondary-label-sm');
40
- readonly valueClass = input<string>('fs-14 fw-medium text-ellipsis-one-line');
41
- readonly emptyStateContainerClass = input<string>(
42
- 'd-flex flex-column justify-content-center align-items-center my-5',
43
- );
44
- readonly emptyStateTextClass = input<string>('field-secondary-label-md');
45
-
46
- readonly mainIcon = input(faMemoCircleInfo);
47
- readonly sectionTitle = input('main');
48
-
49
- readonly isLoadingChanged = output<boolean>();
50
- readonly errorOccurred = output<string>();
51
-
52
- private readonly hrSelfWidgetsService = inject(HRSelfWidgetsService);
53
-
54
- ngOnInit(): void {
55
- if (!this.baseUrl()) {
56
- this.isLoading.set(false);
57
- return;
58
- }
59
- this.isLoadingChanged.emit(true);
60
-
61
- this.hrSelfWidgetsService.getPersonalInfoMainDetails(this.baseUrl()).subscribe({
62
- next: response => {
63
- this.isLoading.set(false);
64
- this.isLoadingChanged.emit(false);
65
- this.employeePersonalInformation.set(response);
66
- },
67
- error: error => {
68
- this.isLoading.set(false);
69
- this.isLoadingChanged.emit(false);
70
- this.employeePersonalInformation.set(null);
71
- this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
72
- },
73
- });
74
- }
75
- }
@@ -1,37 +0,0 @@
1
- @if (jobInformationSalary()) {
2
- <sky-section-divider
3
- [fontAwesomeIcon]="salaryIcon()"
4
- [text]="sectionTitle() | translate | uppercase"
5
- [iconClass]="headerIconClass()"
6
- [textClass]="headerTextClass()"
7
- [dividerClass]="headerDividerClass()"
8
- ></sky-section-divider>
9
-
10
- <div [ngClass]="rowClass()">
11
- <div [ngClass]="columnClass()">
12
- <div [ngClass]="labelClass()">{{ 'BasicSalary' | translate }}</div>
13
- <div [ngClass]="valueClass()">
14
- {{ formatAmount(basicSalary) }}
15
- <span [ngClass]="currencyClass()">{{ currencyCode() }}</span>
16
- </div>
17
- </div>
18
-
19
- @for (allowance of allowances; track allowance) {
20
- <div [ngClass]="columnClass()">
21
- <div [ngClass]="labelClass()">{{ allowance.AllowanceName }}</div>
22
- <div [ngClass]="valueClass()">
23
- {{ formatAmount(allowance.AllowanceAmount) }}
24
- <span [ngClass]="currencyClass()">{{ currencyCode() }}</span>
25
- </div>
26
- </div>
27
- }
28
-
29
- <div [ngClass]="grossSalaryColumnClass()">
30
- <div [ngClass]="labelClass()">{{ 'GrossSalary' | translate }}</div>
31
- <div [ngClass]="valueClass()">
32
- {{ formatAmount(jobInformationSalary()!.GrossSalary) }}
33
- <span [ngClass]="currencyClass()">{{ currencyCode() }}</span>
34
- </div>
35
- </div>
36
- </div>
37
- }
@@ -1,85 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { ChangeDetectionStrategy, Component, OnInit, inject, input, output, signal } from '@angular/core';
3
- import { faSackDollar } from '@fortawesome/pro-light-svg-icons';
4
- import { SkySectionDividerComponent } from '@skysoftware-co/sky-components-ui';
5
- import { HRSelfWidgetsService } from '../../services/hr-self-widgets.service';
6
- import { HRTranslatePipe } from '../../shared/pipes/translate.pipe';
7
- import { HRCommonMethodsService } from '../../shared/services/common-methods.service';
8
- import { Allowances, JobInformationSalary } from '../../shared/types/common';
9
-
10
- @Component({
11
- selector: 'hr-my-profile-salary-widget',
12
- standalone: true,
13
- imports: [CommonModule, HRTranslatePipe, SkySectionDividerComponent],
14
- templateUrl: './my-profile-salary-widget.component.html',
15
- changeDetection: ChangeDetectionStrategy.OnPush,
16
- })
17
- export class MyProfileSalaryWidgetComponent implements OnInit {
18
- readonly jobInformationSalary = signal<JobInformationSalary | null>(null);
19
- readonly isLoading = signal(true);
20
-
21
- readonly baseUrl = input.required<string>();
22
- readonly currencyCode = input<string>('');
23
- readonly currencyDecimals = input<number>(2);
24
- readonly headerIconClass = input<string>('primary-icon-xl');
25
- readonly headerTextClass = input<string>('mt-2 field-secondary-label-lg');
26
- readonly headerDividerClass = input<string>('flex-grow-1 ms-2');
27
- readonly rowClass = input<string>('row mt-4');
28
- readonly columnClass = input<string>('col-md-4 col-6 mt-4');
29
- readonly grossSalaryColumnClass = input<string>('col-md-4 col-6 my-4');
30
- readonly labelClass = input<string>('field-secondary-label-sm');
31
- readonly valueClass = input<string>('fs-14 fw-medium text-ellipsis-one-line');
32
- readonly currencyClass = input<string>('fs-10 text-secondary fw-light');
33
- readonly emptyStateContainerClass = input<string>(
34
- 'd-flex flex-column justify-content-center align-items-center my-5',
35
- );
36
- readonly emptyStateTextClass = input<string>('field-secondary-label-md');
37
-
38
- readonly salaryIcon = input(faSackDollar);
39
- readonly sectionTitle = input('Salary');
40
-
41
- readonly isLoadingChanged = output<boolean>();
42
- readonly errorOccurred = output<string>();
43
-
44
- private readonly hrSelfWidgetsService = inject(HRSelfWidgetsService);
45
- private readonly commonMethodsService = inject(HRCommonMethodsService);
46
-
47
- ngOnInit(): void {
48
- if (!this.baseUrl()) {
49
- this.isLoading.set(false);
50
- return;
51
- }
52
-
53
- this.isLoadingChanged.emit(true);
54
-
55
- this.hrSelfWidgetsService.getJobInformationSalary(this.baseUrl()).subscribe({
56
- next: response => {
57
- this.isLoading.set(false);
58
- this.jobInformationSalary.set(response);
59
- this.isLoadingChanged.emit(false);
60
- },
61
- error: error => {
62
- this.isLoading.set(false);
63
- this.jobInformationSalary.set(null);
64
- this.isLoadingChanged.emit(false);
65
- this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
66
- },
67
- });
68
- }
69
-
70
- get basicSalary(): number | null {
71
- return this.jobInformationSalary()?.BasicSalary ?? this.jobInformationSalary()?.CurrentBasicSalary ?? null;
72
- }
73
-
74
- get allowances(): Allowances[] {
75
- return this.jobInformationSalary()?.Allowances ?? [];
76
- }
77
-
78
- formatAmount(value: number | null | undefined): string {
79
- if (value == null) {
80
- return '�';
81
- }
82
-
83
- return this.commonMethodsService.currencyDecimalFormat(value, this.currencyDecimals()) || '�';
84
- }
85
- }
@@ -1,16 +0,0 @@
1
- @if (jobInformationServiceCharge()) {
2
- <sky-section-divider
3
- [fontAwesomeIcon]="serviceChargeIcon()"
4
- [text]="sectionTitle() | translate | uppercase"
5
- [iconClass]="headerIconClass()"
6
- [textClass]="headerTextClass()"
7
- [dividerClass]="headerDividerClass()"
8
- ></sky-section-divider>
9
-
10
- <div [ngClass]="rowClass()">
11
- <div [ngClass]="columnClass()">
12
- <div [ngClass]="labelClass()">{{ modeLabelKey | translate }}</div>
13
- <div [ngClass]="valueClass()">{{ value }}</div>
14
- </div>
15
- </div>
16
- }
@@ -1,101 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { ChangeDetectionStrategy, Component, OnInit, inject, input, output, signal } from '@angular/core';
3
- import { faEnvelopeOpenDollar } from '@fortawesome/pro-light-svg-icons';
4
- import { SkySectionDividerComponent } from '@skysoftware-co/sky-components-ui';
5
- import { HRSelfWidgetsService } from '../../services/hr-self-widgets.service';
6
- import { HRTranslatePipe } from '../../shared/pipes/translate.pipe';
7
- import { HRCommonMethodsService } from '../../shared/services/common-methods.service';
8
- import { JobInformationServiceCharge, ServiceChargeEntitlementMode } from '../../shared/types/common';
9
-
10
- @Component({
11
- selector: 'hr-my-profile-charge-widget',
12
- standalone: true,
13
- imports: [CommonModule, HRTranslatePipe, SkySectionDividerComponent],
14
- templateUrl: './my-profile-service-charge-widget.component.html',
15
- changeDetection: ChangeDetectionStrategy.OnPush,
16
- })
17
- export class MyProfileServiceChargeWidgetComponent implements OnInit {
18
- readonly jobInformationServiceCharge = signal<JobInformationServiceCharge | null>(null);
19
- readonly isLoading = signal(true);
20
-
21
- readonly baseUrl = input.required<string>();
22
- readonly currencyCode = input<string>('');
23
- readonly headerIconClass = input<string>('primary-icon-xl');
24
- readonly headerTextClass = input<string>('mt-2 field-secondary-label-lg');
25
- readonly headerDividerClass = input<string>('flex-grow-1 ms-2');
26
- readonly rowClass = input<string>('row mt-4 mb-5');
27
- readonly columnClass = input<string>('col-md-4 col-6');
28
- readonly labelClass = input<string>('field-secondary-label-sm');
29
- readonly valueClass = input<string>('fs-14 fw-medium text-ellipsis-one-line');
30
- readonly emptyStateContainerClass = input<string>(
31
- 'd-flex flex-column justify-content-center align-items-center my-5',
32
- );
33
- readonly emptyStateTextClass = input<string>('field-secondary-label-md');
34
-
35
- readonly serviceChargeIcon = input(faEnvelopeOpenDollar);
36
- readonly sectionTitle = input('ServiceCharge');
37
-
38
- readonly isLoadingChanged = output<boolean>();
39
- readonly errorOccurred = output<string>();
40
-
41
- private readonly hrSelfWidgetsService = inject(HRSelfWidgetsService);
42
- private readonly commonMethodsService = inject(HRCommonMethodsService);
43
-
44
- ngOnInit(): void {
45
- if (!this.baseUrl()) {
46
- this.isLoading.set(false);
47
- return;
48
- }
49
-
50
- this.isLoadingChanged.emit(true);
51
-
52
- this.hrSelfWidgetsService.getJobInformationServiceCharge(this.baseUrl()).subscribe({
53
- next: response => {
54
- this.isLoading.set(false);
55
- this.jobInformationServiceCharge.set(response);
56
- this.isLoadingChanged.emit(false);
57
- },
58
- error: error => {
59
- this.isLoading.set(false);
60
- this.jobInformationServiceCharge.set(null);
61
- this.isLoadingChanged.emit(false);
62
- this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
63
- },
64
- });
65
- }
66
-
67
- get modeLabelKey(): string {
68
- const mode = this.jobInformationServiceCharge()?.ServiceChargeEntitlementMode as unknown as string;
69
-
70
- switch (ServiceChargeEntitlementMode[mode as keyof typeof ServiceChargeEntitlementMode]) {
71
- case ServiceChargeEntitlementMode.Points:
72
- return 'Points';
73
- case ServiceChargeEntitlementMode.SalaryRatio:
74
- return 'SalaryRatio';
75
- case ServiceChargeEntitlementMode.FixedAmount:
76
- return 'FixedAmount';
77
- case ServiceChargeEntitlementMode.FixedRate:
78
- return 'FixedRate';
79
- default:
80
- return 'ServiceCharge';
81
- }
82
- }
83
-
84
- get value(): string {
85
- const data = this.jobInformationServiceCharge;
86
- const current = this.jobInformationServiceCharge();
87
- if (!current || current.ServiceChargeValue == null) {
88
- return '—';
89
- }
90
-
91
- if (
92
- ServiceChargeEntitlementMode[
93
- current.ServiceChargeEntitlementMode as unknown as keyof typeof ServiceChargeEntitlementMode
94
- ] === ServiceChargeEntitlementMode.FixedAmount
95
- ) {
96
- return `${this.commonMethodsService.currencyDecimalFormat(current.ServiceChargeValue, 4)} (${this.currencyCode()})`;
97
- }
98
-
99
- return this.commonMethodsService.currencyDecimalFormat(current.ServiceChargeValue, 2) || '—';
100
- }
101
- }
@@ -1,23 +0,0 @@
1
- <hr-widget-card [cardClass]="cardClass" [height]="cardHeight" [contentTemplate]="cardContent"></hr-widget-card>
2
-
3
- <ng-template #cardContent>
4
- <p [class]="nameClass" [ngClass]="isDependent ? 'd-flex' : ''">
5
- @if (isDependent) {
6
- <span class="text-ellipsis-one-line cursor-pointer" [title]="name">{{ name }}</span>
7
- <span class="mx-1">({{ typeName }})</span>
8
- } @else {
9
- {{ name }} ({{ 'Me' | translate }})
10
- }
11
- </p>
12
- <p [class]="subtitleClass">{{ entitlementText }}</p>
13
- @if (!isDependent) {
14
- <p class="fs-12 mb-2">
15
- <span [class]="labelClass">{{ 'Class' | translate }}:</span>
16
- <span [class]="valueClass">{{ ticketClassName }}</span>
17
- </p>
18
- <p class="fs-12">
19
- <span [class]="labelClass">{{ 'Sector' | translate }}:</span>
20
- <span [class]="valueClass">{{ ticketSectorName }}</span>
21
- </p>
22
- }
23
- </ng-template>