@skysoftware-co/bayan-hr-widgets-ui 2.0.18 → 2.0.20

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/ng-package.json +9 -0
  2. package/package.json +3 -15
  3. package/src/assets/i18n/ar.json +166 -0
  4. package/src/assets/i18n/en.json +166 -0
  5. package/src/assets/i18n/fr.json +166 -0
  6. package/src/lib/my-calendar-widget/my-calendar-widget.component.html +25 -0
  7. package/src/lib/my-calendar-widget/my-calendar-widget.component.ts +220 -0
  8. package/src/lib/my-main-details-widget/my-main-details-widget.component.html +157 -0
  9. package/src/lib/my-main-details-widget/my-main-details-widget.component.ts +179 -0
  10. package/src/lib/my-next-week-vacation-insights-widget/components/next-week-vacation-insights-popup/next-week-vacation-insights-popup.component.html +131 -0
  11. package/src/lib/my-next-week-vacation-insights-widget/components/next-week-vacation-insights-popup/next-week-vacation-insights-popup.component.ts +119 -0
  12. package/src/lib/my-next-week-vacation-insights-widget/my-next-week-vacation-insights-widget.component.html +35 -0
  13. package/src/lib/my-next-week-vacation-insights-widget/my-next-week-vacation-insights-widget.component.ts +110 -0
  14. package/src/lib/my-profile/address-widget/my-profile-address-widget.component.html +57 -0
  15. package/src/lib/my-profile/address-widget/my-profile-address-widget.component.ts +70 -0
  16. package/src/lib/my-profile/bank-info-widget/my-profile-bank-info-widget.component.html +101 -0
  17. package/src/lib/my-profile/bank-info-widget/my-profile-bank-info-widget.component.ts +89 -0
  18. package/src/lib/my-profile/contact-widget/my-profile-contact-widget.component.html +89 -0
  19. package/src/lib/my-profile/contact-widget/my-profile-contact-widget.component.ts +78 -0
  20. package/src/lib/my-profile/contract-widget/my-profile-contract-widget.component.html +63 -0
  21. package/src/lib/my-profile/contract-widget/my-profile-contract-widget.component.ts +73 -0
  22. package/src/lib/my-profile/degrees-widget/my-profile-degrees-widget-component.html +86 -0
  23. package/src/lib/my-profile/degrees-widget/my-profile-degrees-widget-component.ts +98 -0
  24. package/src/lib/my-profile/dependents-documents-widget/my-profile-dependents-documents-widget.html +83 -0
  25. package/src/lib/my-profile/dependents-documents-widget/my-profile-dependents-documents-widget.ts +126 -0
  26. package/src/lib/my-profile/documents-widgets/components/document-card/document-card.component.html +53 -0
  27. package/src/lib/my-profile/documents-widgets/components/document-card/document-card.component.ts +50 -0
  28. package/src/lib/my-profile/documents-widgets/components/document-row/document-row.component.html +48 -0
  29. package/src/lib/my-profile/documents-widgets/components/document-row/document-row.component.ts +44 -0
  30. package/src/lib/my-profile/documents-widgets/components/document-tablet-card/document-tablet-card.component.html +46 -0
  31. package/src/lib/my-profile/documents-widgets/components/document-tablet-card/document-tablet-card.component.ts +47 -0
  32. package/src/lib/my-profile/employee-dependents-widget/my-profile-employee-dependents-component.html +50 -0
  33. package/src/lib/my-profile/employee-dependents-widget/my-profile-employee-dependents-component.ts +63 -0
  34. package/src/lib/my-profile/entitlements-others-widget/my-profile-entitlements-others-widget.component.html +26 -0
  35. package/src/lib/my-profile/entitlements-others-widget/my-profile-entitlements-others-widget.component.ts +66 -0
  36. package/src/lib/my-profile/experiences-widget/my-profile-experiences-widget-component.html +93 -0
  37. package/src/lib/my-profile/experiences-widget/my-profile-experiences-widget-component.ts +102 -0
  38. package/src/lib/my-profile/indemnity-widget/my-profile-indemnity-widget.component.html +49 -0
  39. package/src/lib/my-profile/indemnity-widget/my-profile-indemnity-widget.component.ts +79 -0
  40. package/src/lib/my-profile/job-info-widget/my-profile-job-info-widget.component.html +71 -0
  41. package/src/lib/my-profile/job-info-widget/my-profile-job-info-widget.component.ts +73 -0
  42. package/src/lib/my-profile/languages-widget/my-profile-languages-widget.component.html +23 -0
  43. package/src/lib/my-profile/languages-widget/my-profile-languages-widget.component.ts +70 -0
  44. package/src/lib/my-profile/medical-insurance-widget/components/medical-insurance-card/medical-insurance-card.component.html +18 -0
  45. package/src/lib/my-profile/medical-insurance-widget/components/medical-insurance-card/medical-insurance-card.component.ts +29 -0
  46. package/src/lib/my-profile/medical-insurance-widget/my-profile-medical-insurance-widget.component.html +52 -0
  47. package/src/lib/my-profile/medical-insurance-widget/my-profile-medical-insurance-widget.component.ts +103 -0
  48. package/src/lib/my-profile/official-documents-widget/my-profile-official-documents-widget.html +82 -0
  49. package/src/lib/my-profile/official-documents-widget/my-profile-official-documents-widget.ts +119 -0
  50. package/src/lib/my-profile/other-nationalities-widget/my-profile-other-nationalities-widget.component.html +23 -0
  51. package/src/lib/my-profile/other-nationalities-widget/my-profile-other-nationalities-widget.component.ts +70 -0
  52. package/src/lib/my-profile/personal-info-main-widget/my-profile-personal-info-main-widget.component.html +115 -0
  53. package/src/lib/my-profile/personal-info-main-widget/my-profile-personal-info-main-widget.component.ts +75 -0
  54. package/src/lib/my-profile/salary-widget/my-profile-salary-widget.component.html +37 -0
  55. package/src/lib/my-profile/salary-widget/my-profile-salary-widget.component.ts +85 -0
  56. package/src/lib/my-profile/service-charge-widget/my-profile-service-charge-widget.component.html +16 -0
  57. package/src/lib/my-profile/service-charge-widget/my-profile-service-charge-widget.component.ts +101 -0
  58. package/src/lib/my-profile/ticket-widget/components/ticket-card/ticket-card.component.html +23 -0
  59. package/src/lib/my-profile/ticket-widget/components/ticket-card/ticket-card.component.ts +26 -0
  60. package/src/lib/my-profile/ticket-widget/my-profile-ticket-widget.component.html +68 -0
  61. package/src/lib/my-profile/ticket-widget/my-profile-ticket-widget.component.ts +93 -0
  62. package/src/lib/my-profile/vacations-widget/my-profile-vacations-widget.component.html +34 -0
  63. package/src/lib/my-profile/vacations-widget/my-profile-vacations-widget.component.ts +66 -0
  64. package/src/lib/my-team-subordinates-popup-widget/components/employee-main-info-card/employee-information-card.component.ts +65 -0
  65. package/src/lib/my-team-subordinates-popup-widget/components/employee-main-info-card/employee-main-info-card.component.html +57 -0
  66. package/src/lib/my-team-subordinates-popup-widget/components/my-team-subordinates-popup/my-team-popup.component.html +109 -0
  67. package/src/lib/my-team-subordinates-popup-widget/components/my-team-subordinates-popup/my-team-popup.component.ts +297 -0
  68. package/src/lib/my-upcoming-events-widget/components/event-item/event-item.component.html +53 -0
  69. package/src/lib/my-upcoming-events-widget/components/event-item/event-item.component.ts +42 -0
  70. package/src/lib/my-upcoming-events-widget/components/event-tab-bar/event-tab-bar.component.html +21 -0
  71. package/src/lib/my-upcoming-events-widget/components/event-tab-bar/event-tab-bar.component.ts +44 -0
  72. package/src/lib/my-upcoming-events-widget/components/events-popup/events-popup.component.html +67 -0
  73. package/src/lib/my-upcoming-events-widget/components/events-popup/events-popup.component.ts +74 -0
  74. package/src/lib/my-upcoming-events-widget/my-upcoming-events-widget.component.html +74 -0
  75. package/src/lib/my-upcoming-events-widget/my-upcoming-events-widget.component.ts +199 -0
  76. package/src/lib/services/hr-self-widgets.service.ts +624 -0
  77. package/src/lib/shared/components/card-header/card-header.component.html +4 -0
  78. package/src/lib/shared/components/card-header/card-header.component.ts +18 -0
  79. package/src/lib/shared/components/hr-employee-calendar/hr-employee-calendar.component.html +47 -0
  80. package/src/lib/shared/components/hr-employee-calendar/hr-employee-calendar.component.ts +193 -0
  81. package/src/lib/shared/components/info-field/info-field.component.html +2 -0
  82. package/src/lib/shared/components/info-field/info-field.component.ts +20 -0
  83. package/src/lib/shared/components/widget-card/widget-card-component.html +3 -0
  84. package/src/lib/shared/components/widget-card/widget-card-component.ts +17 -0
  85. package/src/lib/shared/pipes/translate.pipe.ts +34 -0
  86. package/src/lib/shared/services/bank-information-cache.service.ts +29 -0
  87. package/src/lib/shared/services/common-methods.service.ts +33 -0
  88. package/src/lib/shared/services/constants.service.ts +12 -0
  89. package/src/lib/shared/services/entitlements-cache.service.ts +94 -0
  90. package/src/lib/shared/services/job-information-cache.service.ts +72 -0
  91. package/src/lib/shared/services/my-team-popup.service.ts +34 -0
  92. package/src/lib/shared/services/personal-information-cache.service.ts +77 -0
  93. package/src/lib/shared/services/profile-documents-cache-service.ts +44 -0
  94. package/src/lib/shared/services/profile-employee-dependents-cach.ts +37 -0
  95. package/src/lib/shared/services/qualifications-cache.service.ts +45 -0
  96. package/src/lib/shared/services/translate.service.ts +35 -0
  97. package/src/lib/shared/types/common.ts +359 -0
  98. package/src/public-api.ts +35 -0
  99. package/tsconfig.lib.json +11 -0
  100. package/tsconfig.lib.prod.json +9 -0
  101. package/tsconfig.spec.json +8 -0
  102. package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs +0 -4785
  103. package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs.map +0 -1
  104. package/types/skysoftware-co-bayan-hr-widgets-ui.d.ts +0 -1305
@@ -0,0 +1,50 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
3
+ import { FontAwesomeModule, IconDefinition } from '@fortawesome/angular-fontawesome';
4
+ import { faFolderArrowDown } from '@fortawesome/pro-light-svg-icons';
5
+ import { faEye } from '@fortawesome/pro-regular-svg-icons';
6
+ import { HRTranslatePipe } from '../../../../shared/pipes/translate.pipe';
7
+ import { HRDocumentRowComponent } from '../document-row/document-row.component';
8
+ import { DocumentRow } from '../../../../shared/types/common';
9
+
10
+ @Component({
11
+ selector: 'hr-document-card',
12
+ standalone: true,
13
+ imports: [CommonModule, FontAwesomeModule, HRTranslatePipe, HRDocumentRowComponent],
14
+ templateUrl: './document-card.component.html',
15
+ })
16
+ export class HRDocumentCardComponent {
17
+ @Input() title: string = '';
18
+ @Input() documents: DocumentRow[] = [];
19
+ @Input() titleContainerClass: string = 'mb-3';
20
+ @Input() titleClass: string = 'text-dark fs-16 mb-0';
21
+ @Input() valueClass: string = 'text-dark-gray fs-14';
22
+ @Input() viewIcon: IconDefinition = faEye;
23
+ @Input() downloadIcon: IconDefinition = faFolderArrowDown;
24
+ @Input() viewIconClass: string = 'fs-15 text-dark cursor-pointer';
25
+ @Input() downloadIconClass: string = 'fs-15 text-dark cursor-pointer';
26
+ @Input() labelClass: string = 'field-secondary-label-sm mb-1';
27
+ @Input() rowClass: string = 'row';
28
+ @Input() dataColClass: string = 'col-10';
29
+ @Input() dataColSpacingClass: string = 'mt-2';
30
+ @Input() dataRowClass: string = 'row align-items-center py-1 gx-0';
31
+ @Input() typeColClass: string = 'col-3';
32
+ @Input() numberColClass: string = 'col-3';
33
+ @Input() issueDateColClass: string = 'col-3';
34
+ @Input() expiryDateColClass: string = 'col-3';
35
+ @Input() actionsColClass: string = 'col-2 d-flex align-items-center';
36
+ @Input() actionsWrapperClass: string = 'd-flex align-items-center gap-2';
37
+ @Input() downloadContainerClass: string =
38
+ 'bg-light-gray rounded-3 d-flex align-items-center justify-content-center px-1 cursor-pointer';
39
+
40
+ @Output() attachmentView = new EventEmitter<DocumentRow>();
41
+ @Output() download = new EventEmitter<DocumentRow>();
42
+
43
+ onAttachmentView(doc: DocumentRow): void {
44
+ this.attachmentView.emit(doc);
45
+ }
46
+
47
+ onDownload(doc: DocumentRow): void {
48
+ this.download.emit(doc);
49
+ }
50
+ }
@@ -0,0 +1,48 @@
1
+ <div [class]="rowClass">
2
+ <div [class]="dataColClass + ' ' + dataColSpacingClass">
3
+ <div [class]="dataRowClass">
4
+ <div [class]="typeColClass">
5
+ <p [class]="valueClass + ' mb-0 text-ellipsis-one-line'" [title]="doc.DocumentTypeName">
6
+ {{ doc.DocumentTypeName }}
7
+ </p>
8
+ </div>
9
+
10
+ <div [class]="numberColClass">
11
+ <p [class]="valueClass + ' mb-0'">
12
+ {{ doc.DocumentNumber || '—' }}
13
+ </p>
14
+ </div>
15
+
16
+ <div [class]="issueDateColClass">
17
+ <p [class]="valueClass + ' mb-0'">
18
+ {{ doc.IssueDate ? (doc.IssueDate | date: 'dd/MM/yyyy') : '—' }}
19
+ </p>
20
+ </div>
21
+
22
+ <div [class]="expiryDateColClass">
23
+ <p [class]="valueClass + ' mb-0'">
24
+ {{ doc.ExpiryDate ? (doc.ExpiryDate | date: 'dd/MM/yyyy') : '—' }}
25
+ </p>
26
+ </div>
27
+ </div>
28
+ </div>
29
+
30
+ <div [class]="actionsColClass">
31
+ @if (doc.Attachments?.length) {
32
+ <div [class]="actionsWrapperClass">
33
+ @if (doc.Attachments.length === 1) {
34
+ <fa-icon [icon]="viewIcon" [class]="viewIconClass" (click)="onAttachmentView()"></fa-icon>
35
+ } @else {
36
+ <div class="invisible">
37
+ <fa-icon [icon]="viewIcon"></fa-icon>
38
+ </div>
39
+ }
40
+
41
+ <div [class]="downloadContainerClass" (click)="onDownload()">
42
+ <fa-icon [icon]="downloadIcon" [class]="downloadIconClass"></fa-icon>
43
+ <span class="ps-1">{{ doc.Attachments.length }}</span>
44
+ </div>
45
+ </div>
46
+ }
47
+ </div>
48
+ </div>
@@ -0,0 +1,44 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
3
+ import { FontAwesomeModule, IconDefinition } from '@fortawesome/angular-fontawesome';
4
+ import { faFolderArrowDown } from '@fortawesome/pro-light-svg-icons';
5
+ import { faEye } from '@fortawesome/pro-regular-svg-icons';
6
+ import { DocumentRow } from '../../../../shared/types/common';
7
+
8
+ @Component({
9
+ selector: 'hr-document-row',
10
+ standalone: true,
11
+ imports: [CommonModule, FontAwesomeModule],
12
+ templateUrl: './document-row.component.html',
13
+ })
14
+ export class HRDocumentRowComponent {
15
+ @Input() doc!: DocumentRow;
16
+ @Input() valueClass: string = 'text-dark-gray fs-14';
17
+ @Input() viewIcon: IconDefinition = faEye;
18
+ @Input() downloadIcon: IconDefinition = faFolderArrowDown;
19
+ @Input() viewIconClass: string = 'fs-15 text-dark cursor-pointer';
20
+ @Input() downloadIconClass: string = 'fs-15 text-dark cursor-pointer';
21
+ @Input() rowClass: string = 'row';
22
+ @Input() dataColClass: string = 'col-10';
23
+ @Input() dataColSpacingClass: string = 'mt-2';
24
+ @Input() dataRowClass: string = 'row align-items-center py-1 gx-0';
25
+ @Input() typeColClass: string = 'col-3';
26
+ @Input() numberColClass: string = 'col-3';
27
+ @Input() issueDateColClass: string = 'col-3';
28
+ @Input() expiryDateColClass: string = 'col-3';
29
+ @Input() actionsColClass: string = 'col-2 d-flex align-items-center';
30
+ @Input() actionsWrapperClass: string = 'd-flex align-items-center gap-2';
31
+ @Input() downloadContainerClass: string =
32
+ 'bg-light-gray rounded-3 d-flex align-items-center justify-content-center px-1 cursor-pointer';
33
+
34
+ @Output() attachmentView = new EventEmitter<DocumentRow>();
35
+ @Output() download = new EventEmitter<DocumentRow>();
36
+
37
+ onAttachmentView(): void {
38
+ this.attachmentView.emit(this.doc);
39
+ }
40
+
41
+ onDownload(): void {
42
+ this.download.emit(this.doc);
43
+ }
44
+ }
@@ -0,0 +1,46 @@
1
+ <div [class]="tabletContainerClass">
2
+ <div [class]="tabletCardClass" [style.height]="cardHeight" [ngClass]="{ 'me-1': !isOdd, 'ms-1': isOdd }">
3
+ <div [ngClass]="doc.Attachments?.length ? tabletColWithAttachmentClass : tabletColWithoutAttachmentClass">
4
+ <p [class]="labelClass">{{ 'Type' | translate }}</p>
5
+ <p [class]="valueClass">{{ doc.DocumentTypeName }}</p>
6
+ </div>
7
+
8
+ <div [ngClass]="doc.Attachments?.length ? tabletColWithAttachmentClass : tabletColWithoutAttachmentClass">
9
+ <p [class]="labelClass">{{ 'Number' | translate }}</p>
10
+ <p [class]="valueClass">
11
+ {{ doc.DocumentNumber || '—' }}
12
+ </p>
13
+ </div>
14
+
15
+ @if (doc.Attachments?.length) {
16
+ <div [class]="tabletActionsColClass">
17
+ <div [class]="downloadContainerClass" (click)="onDownload()">
18
+ <fa-icon [icon]="downloadIcon" [class]="downloadIconClass"></fa-icon>
19
+ <span [class]="downloadCountClass">
20
+ {{ doc.Attachments.length }}
21
+ </span>
22
+ </div>
23
+ </div>
24
+ }
25
+
26
+ <div
27
+ [class]="tabletBottomRowSpacingClass"
28
+ [ngClass]="doc.Attachments?.length ? tabletColWithAttachmentClass : tabletColWithoutAttachmentClass"
29
+ >
30
+ <p [class]="labelClass">{{ 'IssueDate' | translate }}</p>
31
+ <p [class]="valueClass">
32
+ {{ doc.IssueDate ? (doc.IssueDate | date: 'dd/MM/yyyy') : '—' }}
33
+ </p>
34
+ </div>
35
+
36
+ <div
37
+ [class]="tabletBottomRowSpacingClass"
38
+ [ngClass]="doc.Attachments?.length ? tabletColWithAttachmentClass : tabletColWithoutAttachmentClass"
39
+ >
40
+ <p [class]="labelClass">{{ 'ExpiryDate' | translate }}</p>
41
+ <p [class]="valueClass">
42
+ {{ doc.ExpiryDate ? (doc.ExpiryDate | date: 'dd/MM/yyyy') : '—' }}
43
+ </p>
44
+ </div>
45
+ </div>
46
+ </div>
@@ -0,0 +1,47 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { Component, Input, Output, EventEmitter } from '@angular/core';
3
+ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
4
+ import { HRTranslatePipe } from '../../../../shared/pipes/translate.pipe';
5
+ import { DocumentRow } from '../../../../shared/types/common';
6
+
7
+ @Component({
8
+ selector: 'hr-document-tablet-card',
9
+ standalone: true,
10
+ imports: [CommonModule, FontAwesomeModule, HRTranslatePipe],
11
+ templateUrl: './document-tablet-card.component.html',
12
+ })
13
+ export class HrDocumentTabletCardComponent {
14
+ @Input() doc!: DocumentRow;
15
+ @Input() isOdd: boolean = false;
16
+
17
+ @Input() downloadIcon: any;
18
+ @Input() viewIcon: any;
19
+ @Input() cardHeight = '175px';
20
+
21
+ // Shared classes (same as large screen)
22
+ @Input() labelClass: string = 'field-secondary-label-sm';
23
+ @Input() valueClass: string = 'table-cell-md text-break';
24
+ @Input() downloadIconClass: string = 'fs-6 text-dark';
25
+ @Input() downloadContainerClass: string =
26
+ 'bg-light-gray rounded-3 d-flex justify-content-center align-items-center cursor-pointer px-2';
27
+ @Input() downloadCountClass: string = 'text-dark fs-12 fw-bold ps-2';
28
+
29
+ // Tablet-specific classes
30
+ @Input() tabletContainerClass: string = 'mt-3';
31
+ @Input() tabletCardClass: string = 'row px-4 py-3 card-shadow';
32
+ @Input() tabletColWithAttachmentClass: string = 'col-5';
33
+ @Input() tabletColWithoutAttachmentClass: string = 'col-6';
34
+ @Input() tabletActionsColClass: string = 'col-1 d-flex align-items-center';
35
+ @Input() tabletBottomRowSpacingClass: string = 'mt-4';
36
+
37
+ @Output() view = new EventEmitter<DocumentRow>();
38
+ @Output() download = new EventEmitter<DocumentRow>();
39
+
40
+ onView() {
41
+ this.view.emit(this.doc);
42
+ }
43
+
44
+ onDownload() {
45
+ this.download.emit(this.doc);
46
+ }
47
+ }
@@ -0,0 +1,50 @@
1
+ <sky-section-divider
2
+ [fontAwesomeIcon]="icon()"
3
+ [text]="sectionTitle() | translate | uppercase"
4
+ [iconClass]="headerIconClass()"
5
+ [textClass]="headerTextClass()"
6
+ [dividerClass]="headerDividerClass()"
7
+ ></sky-section-divider>
8
+
9
+ <div class="mt-4">
10
+ <div class="row mb-5">
11
+ @if (dependents().length) {
12
+ @for (d of dependents(); track d) {
13
+ <div class="col-lg-4 col-6 mt-4">
14
+ <hr-widget-card [contentTemplate]="dependentTemplate" [context]="{ d: d }" [height]="110"></hr-widget-card>
15
+ </div>
16
+ }
17
+ } @else {
18
+ <sky-empty-design-card
19
+ [containerClass]="emptyStateContainerClass()"
20
+ [cardBodyClass]="''"
21
+ [cardBodyContainerClass]="''"
22
+ [visibleIcon]="false"
23
+ [visibleQuickAction]="false"
24
+ [emptyTextClass]="emptyStateTextClass()"
25
+ [emptyText]="isLoading() ? (sectionTitle() | translate) + ' ' + ('IsLoading' | translate) : ('ThereAreNoDependentsYet' | translate)"
26
+ ></sky-empty-design-card>
27
+ }
28
+ </div>
29
+ </div>
30
+
31
+ <ng-template #dependentTemplate let-d="d">
32
+ <p class="text-dark fs-16 mb-2 d-flex">
33
+ <span class="text-truncate cursor-pointer" [title]="d.DependentName">
34
+ {{ d.DependentName }}
35
+ </span>
36
+ <span class="mx-1">({{ d.DependentTypeName }})</span>
37
+ </p>
38
+ <p class="mb-2 fs-12">
39
+ <span class="text-muted">{{ 'BirthDate' | translate }}:</span>
40
+ <span class="text-secondary mx-1">{{ d.BirthDate | date: 'dd/MM/yyyy' }}</span>
41
+ </p>
42
+ <p class="mb-0 fs-12">
43
+ <span class="text-muted">{{ 'NationalNumber' | translate }}:</span>
44
+ @if (d.NationalNumber) {
45
+ <span class="text-secondary mx-1">{{ d.NationalNumber }}</span>
46
+ } @else {
47
+ <span class="text-secondary mx-1">—</span>
48
+ }
49
+ </p>
50
+ </ng-template>
@@ -0,0 +1,63 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { ChangeDetectionStrategy, Component, OnInit, inject, input, output, signal } from '@angular/core';
3
+ import { Dependent } from '../../shared/types/common';
4
+ import { HRSelfWidgetsService } from '../../services/hr-self-widgets.service';
5
+ import { HRTranslatePipe } from '../../shared/pipes/translate.pipe';
6
+ import { WidgetCardComponent } from '../../shared/components/widget-card/widget-card-component';
7
+ import { SkyEmptyDesignCardComponent, SkySectionDividerComponent } from '@skysoftware-co/sky-components-ui';
8
+ import { faUsersLine } from '@fortawesome/pro-light-svg-icons';
9
+
10
+ @Component({
11
+ selector: 'hr-my-profile-dependents-widget',
12
+ standalone: true,
13
+ imports: [
14
+ CommonModule,
15
+ WidgetCardComponent,
16
+ HRTranslatePipe,
17
+ SkyEmptyDesignCardComponent,
18
+ SkySectionDividerComponent,
19
+ ],
20
+ templateUrl: './my-profile-employee-dependents-component.html',
21
+ changeDetection: ChangeDetectionStrategy.OnPush,
22
+ })
23
+ export class MyDependentsWidgetComponent implements OnInit {
24
+ readonly baseUrl = input<string>('');
25
+ readonly sectionTitle = input<string>('Dependents');
26
+ readonly icon = input(faUsersLine);
27
+ readonly headerIconClass = input<string>('primary-icon-xl');
28
+ readonly headerTextClass = input<string>('fs-16 mt-2 text-secondary');
29
+ readonly headerDividerClass = input<string>('flex-grow-1 ms-2');
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 dependents = signal<Dependent[]>([]);
36
+ readonly isLoading = signal(true);
37
+
38
+ readonly isLoadingChanged = output<boolean>();
39
+
40
+ private readonly service = inject(HRSelfWidgetsService);
41
+
42
+ ngOnInit(): void {
43
+ if (!this.baseUrl()) {
44
+ this.isLoading.set(false);
45
+ return;
46
+ }
47
+
48
+ this.isLoadingChanged.emit(true);
49
+
50
+ this.service.getEmployeeDependents(this.baseUrl()).subscribe({
51
+ next: res => {
52
+ this.dependents.set(res ?? []);
53
+ this.isLoading.set(false);
54
+ this.isLoadingChanged.emit(false);
55
+ },
56
+ error: () => {
57
+ this.dependents.set([]);
58
+ this.isLoading.set(false);
59
+ this.isLoadingChanged.emit(false);
60
+ },
61
+ });
62
+ }
63
+ }
@@ -0,0 +1,26 @@
1
+ <sky-section-divider
2
+ [fontAwesomeIcon]="othersIcon()"
3
+ [text]="sectionTitle() | translate | uppercase"
4
+ [iconClass]="headerIconClass()"
5
+ [textClass]="headerTextClass()"
6
+ [dividerClass]="headerDividerClass()"
7
+ ></sky-section-divider>
8
+
9
+ <div [class]="rowClass()">
10
+ <div [class]="columnClass()">
11
+ <hr-info-field
12
+ labelKey="OvertimeEligibility"
13
+ [value]="(isEligibleForOvertime() ? 'Eligible' : 'NotEligible') | translate"
14
+ [labelClass]="labelClass()"
15
+ [valueClass]="valueClass()"
16
+ ></hr-info-field>
17
+ </div>
18
+ <div [class]="columnClass()">
19
+ <hr-info-field
20
+ labelKey="SocialSecurityEligibility"
21
+ [value]="(isSocialSecurityMember() ? 'Member' : 'NotMember') | translate"
22
+ [labelClass]="labelClass()"
23
+ [valueClass]="valueClass()"
24
+ ></hr-info-field>
25
+ </div>
26
+ </div>
@@ -0,0 +1,66 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { ChangeDetectionStrategy, Component, OnInit, inject, input, output, signal } from '@angular/core';
3
+ import { HRTranslatePipe } from '../../shared/pipes/translate.pipe';
4
+ import { faGrid2Plus } from '@fortawesome/pro-light-svg-icons';
5
+ import { SkySectionDividerComponent } from '@skysoftware-co/sky-components-ui';
6
+ import { HRSelfWidgetsService } from '../../services/hr-self-widgets.service';
7
+ import { HRInfoFieldComponent } from '../../shared/components/info-field/info-field.component';
8
+ import { forkJoin } from 'rxjs';
9
+
10
+ @Component({
11
+ selector: 'hr-my-profile-entitlements-others-widget',
12
+ standalone: true,
13
+ imports: [CommonModule, HRTranslatePipe, SkySectionDividerComponent, HRInfoFieldComponent],
14
+ templateUrl: './my-profile-entitlements-others-widget.component.html',
15
+ changeDetection: ChangeDetectionStrategy.OnPush,
16
+ })
17
+ export class MyProfileEntitlementsOthersWidgetComponent implements OnInit {
18
+ readonly baseUrl = input.required<string>();
19
+ readonly sectionTitle = input<string>('Others');
20
+ readonly othersIcon = input(faGrid2Plus);
21
+
22
+ readonly headerIconClass = input<string>('primary-icon-xl');
23
+ readonly headerTextClass = input<string>('mt-2 field-secondary-label-lg');
24
+ readonly headerDividerClass = input<string>('flex-grow-1 ms-2');
25
+ readonly rowClass = input<string>('row mt-4 mb-5');
26
+ readonly columnClass = input<string>('col-md-4 col-6');
27
+ readonly labelClass = input<string>('field-secondary-label-sm');
28
+ readonly valueClass = input<string>('fs-14 fw-meduim');
29
+
30
+ readonly isLoadingChanged = output<boolean>();
31
+ readonly errorOccurred = output<string>();
32
+
33
+ readonly isEligibleForOvertime = signal(false);
34
+ readonly isSocialSecurityMember = signal(false);
35
+ readonly isLoading = signal(true);
36
+
37
+ private readonly selfWidgetsService = inject(HRSelfWidgetsService);
38
+
39
+ ngOnInit(): void {
40
+ if (!this.baseUrl()) {
41
+ this.isLoading.set(false);
42
+ return;
43
+ }
44
+ this.loadData();
45
+ }
46
+
47
+ private loadData(): void {
48
+ this.isLoadingChanged.emit(true);
49
+ forkJoin({
50
+ overtime: this.selfWidgetsService.getEntitlementsOvertime(this.baseUrl()),
51
+ socialSecurity: this.selfWidgetsService.getEntitlementsSocialSecurity(this.baseUrl()),
52
+ }).subscribe({
53
+ next: responses => {
54
+ this.isEligibleForOvertime.set(responses.overtime.ResponseData?.IsEligibleForOvertime ?? false);
55
+ this.isSocialSecurityMember.set(responses.socialSecurity.ResponseData?.IsSocialSecurityMember ?? false);
56
+ this.isLoading.set(false);
57
+ this.isLoadingChanged.emit(false);
58
+ },
59
+ error: error => {
60
+ this.isLoading.set(false);
61
+ this.errorOccurred.emit(error?.error?.ResponseData?.Errors?.[0]?.Message);
62
+ this.isLoadingChanged.emit(false);
63
+ },
64
+ });
65
+ }
66
+ }
@@ -0,0 +1,93 @@
1
+ <sky-section-divider
2
+ [fontAwesomeIcon]="experienceIcon()"
3
+ [text]="sectionTitle() | translate | uppercase"
4
+ [iconClass]="headerIconClass()"
5
+ [textClass]="headerTextClass()"
6
+ [dividerClass]="headerDividerClass()"
7
+ ></sky-section-divider>
8
+
9
+ <div [class]="wrapperClass">
10
+ @if (experiences().length > 0) {
11
+ <div class="row">
12
+ <div [class]="headerRowClass()">
13
+ <div [class]="itemColumnClass()">
14
+ <p [class]="labelClass()">{{ 'Period' | translate }}</p>
15
+ </div>
16
+
17
+ <div [class]="itemColumnClass()">
18
+ <p [class]="labelClass()">{{ 'Employer' | translate }}</p>
19
+ </div>
20
+
21
+ <div [class]="itemColumnClass()">
22
+ <p [class]="labelClass()">{{ 'Position' | translate }}</p>
23
+ </div>
24
+
25
+ <div [class]="itemColumnClass()">
26
+ <p [class]="labelClass()">{{ 'TerminationReason' | translate }}</p>
27
+ </div>
28
+ </div>
29
+
30
+ <div [class]="actionsSpacerClass()"></div>
31
+
32
+ @for (experience of experiences(); track experience) {
33
+ <div [class]="itemColumnsWrapperClass()">
34
+ <div [class]="itemColumnClass()">
35
+ <p
36
+ [class]="valueClass()"
37
+ [title]="(experience.StartDate | date: 'dd/MM/yyyy') + ' - ' + (experience.EndDate | date: 'dd/MM/yyyy')"
38
+ >
39
+ {{ (experience.StartDate | date: 'dd/MM/yyyy') + ' - ' + (experience.EndDate | date: 'dd/MM/yyyy') }}
40
+ </p>
41
+ </div>
42
+
43
+ <div [class]="itemColumnClass()">
44
+ <p [class]="valueClass()" [title]="experience.Employer ? experience.Employer : ''">
45
+ @if (experience.Employer) {
46
+ {{ experience.Employer }}
47
+ } @else {
48
+ {{ '—' }}
49
+ }
50
+ </p>
51
+ </div>
52
+
53
+ <div [class]="itemColumnClass()">
54
+ <p [class]="valueClass()" [title]="experience.Position ? experience.Position : ''">
55
+ @if (experience.Position) {
56
+ {{ experience.Position }}
57
+ } @else {
58
+ {{ '—' }}
59
+ }
60
+ </p>
61
+ </div>
62
+
63
+ <div [class]="itemColumnClass()">
64
+ <p [class]="valueClass()" [title]="experience.TerminationReason ? experience.TerminationReason : ''">
65
+ @if (experience.TerminationReason) {
66
+ {{ experience.TerminationReason }}
67
+ } @else {
68
+ {{ '—' }}
69
+ }
70
+ </p>
71
+ </div>
72
+ </div>
73
+
74
+ @if (experience.Document) {
75
+ <div [class]="actionsColumnClass()">
76
+ <fa-icon [icon]="viewIcon()" [class]="viewIconClass()" (click)="onAttachmentView(experience.Document)"></fa-icon>
77
+ <fa-icon [icon]="downloadIcon()" [class]="downloadIconClass()" (click)="onAttachmentDownload(experience.Document)"></fa-icon>
78
+ </div>
79
+ }
80
+ }
81
+ </div>
82
+ } @else {
83
+ <sky-empty-design-card
84
+ [containerClass]="emptyStateContainerClass()"
85
+ [cardBodyClass]="''"
86
+ [cardBodyContainerClass]="''"
87
+ [visibleIcon]="false"
88
+ [visibleQuickAction]="false"
89
+ [emptyTextClass]="emptyStateTextClass()"
90
+ [emptyText]="isLoading() ? (sectionTitle() | translate) + ' ' + ('IsLoading' | translate) : ('ThereIsNoExperiencesYet' | translate)"
91
+ ></sky-empty-design-card>
92
+ }
93
+ </div>
@@ -0,0 +1,102 @@
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 { faEye } from '@fortawesome/pro-regular-svg-icons';
5
+ import { faUsersRays, faFolderArrowDown } from '@fortawesome/pro-light-svg-icons';
6
+ import { HRSelfWidgetsService } from '../../services/hr-self-widgets.service';
7
+ import { HRTranslatePipe } from '../../shared/pipes/translate.pipe';
8
+ import { IconDefinition } from '@fortawesome/angular-fontawesome';
9
+ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
10
+ import { Experience } from '../../shared/types/common';
11
+
12
+ @Component({
13
+ selector: 'hr-my-profile-experiences-widget',
14
+ standalone: true,
15
+ imports: [CommonModule, SkySectionDividerComponent, HRTranslatePipe, SkyEmptyDesignCardComponent, FontAwesomeModule],
16
+ templateUrl: './my-profile-experiences-widget-component.html',
17
+ changeDetection: ChangeDetectionStrategy.OnPush,
18
+ })
19
+ export class MyProfileExperiencesWidgetComponent implements OnInit {
20
+ readonly experiences = signal<Experience[]>([]);
21
+ readonly isLoading = signal(true);
22
+
23
+ readonly baseUrl = input<string>('');
24
+ readonly sectionTitle = input<string>('experiences');
25
+
26
+ readonly viewIcon = input<IconDefinition>(faEye);
27
+ readonly downloadIcon = input(faFolderArrowDown);
28
+ readonly experienceIcon = input(faUsersRays);
29
+
30
+ readonly headerIconClass = input<string>('primary-icon-xl');
31
+ readonly headerTextClass = input<string>('fs-16 mt-2 text-secondary');
32
+ readonly headerDividerClass = input<string>('flex-grow-1 ms-2');
33
+ readonly rowClass = input<string>('mt-4');
34
+ readonly headerRowClass = input<string>('row col-10');
35
+ readonly actionsSpacerClass = input<string>('col-2');
36
+ readonly labelClass = input<string>('field-secondary-label-sm text-ellipsis-one-line');
37
+ readonly valueClass = input<string>('text-dark-gray fs-14 text-ellipsis-one-line');
38
+ readonly viewIconClass = input<string>('fs-15 text-dark cursor-pointer');
39
+ readonly downloadIconClass = input<string>('fs-15 mx-3 text-dark cursor-pointer');
40
+
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 itemRowClass = input<string>('row');
47
+ readonly itemColumnsWrapperClass = input<string>('row col-10 mt-3');
48
+ readonly itemColumnClass = input<string>('col-3');
49
+ readonly actionsColumnClass = input<string>('col-2 align-items-end mt-3');
50
+
51
+ readonly rowMarginBottomClass = input<string>('mb-5');
52
+ readonly rowMarginBottomEmptyClass = input<string>('mb-4');
53
+
54
+ readonly isLoadingChanged = output<boolean>();
55
+ readonly attachmentViewed = output<any>();
56
+ readonly attachmentDownloaded = output<any>();
57
+ readonly errorOccurred = output<string>();
58
+
59
+ private readonly service = inject(HRSelfWidgetsService);
60
+
61
+ ngOnInit(): void {
62
+ if (!this.baseUrl()) {
63
+ this.isLoading.set(false);
64
+ return;
65
+ }
66
+
67
+ this.isLoadingChanged.emit(true);
68
+
69
+ this.service.getEmployeeExperiences(this.baseUrl()).subscribe({
70
+ next: res => {
71
+ this.experiences.set(res ?? []);
72
+ this.isLoading.set(false);
73
+
74
+ this.isLoadingChanged.emit(false);
75
+ },
76
+ error: error => {
77
+ this.experiences.set([]);
78
+ this.isLoading.set(false);
79
+ this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
80
+ this.isLoadingChanged.emit(false);
81
+ },
82
+ });
83
+ }
84
+
85
+ onAttachmentView(file: any) {
86
+ this.attachmentViewed.emit(file);
87
+ }
88
+
89
+ onAttachmentDownload(file: any) {
90
+ this.attachmentDownloaded.emit(file);
91
+ }
92
+
93
+ get wrapperClass(): string {
94
+ const classes = [this.rowClass()];
95
+ if (this.experiences().length > 0) {
96
+ classes.push(this.rowMarginBottomClass());
97
+ } else {
98
+ classes.push(this.rowMarginBottomEmptyClass());
99
+ }
100
+ return classes.join(' ');
101
+ }
102
+ }