@skysoftware-co/bayan-hr-widgets-ui 1.0.26 → 1.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.
- package/README.md +88 -10
- package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs +198 -53
- package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs.map +1 -1
- package/lib/my-calendar-widget/my-calendar-widget.component.d.ts +16 -7
- package/lib/my-vacation-team-widget/components/vacation-subordinates-popup/vacation-subordinates-popup.component.d.ts +38 -0
- package/lib/my-vacation-team-widget/my-vacation-team-widget.component.d.ts +33 -0
- package/lib/profile-experiences-widget/profile-experiences-widget-component.d.ts +8 -4
- package/lib/shared/types/common.d.ts +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ components:
|
|
|
31
31
|
1. My Main Details Widget
|
|
32
32
|
2. My Upcoming Events Widget
|
|
33
33
|
3. My Calendar Widget
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
## Dependencies
|
|
36
36
|
This library depends on `@skysoftware-co/bayan-components-ui` package which provides:
|
|
37
37
|
- Employee Badge Component
|
|
@@ -243,6 +243,7 @@ This component displays an employee calendar showing vacations, public holidays,
|
|
|
243
243
|
|-------|------|---------------|-------------|
|
|
244
244
|
| `baseUrl` | string | `''` | Base URL for API calls |
|
|
245
245
|
| `headerContainerClass` | string | `''` | Additional CSS class for the header container |
|
|
246
|
+
| `datasource` | `ScheduleRequestsResponse \| null` | `null` | External datasource for pending requests. When provided, pending vacation requests are merged with calendar vacations (consecutive same-type vacations are combined), and pending event requests are added as events. The calendar reactively updates whenever this input changes after the initial calendar data has loaded. |
|
|
246
247
|
| `publicHolidayColor` | string | from `HRConstantsService`: `'#249EA0'` | Color for public holidays |
|
|
247
248
|
| `dayOffColor` | string | from `HRConstantsService`: `'#FCCF5A'` | Color for days off |
|
|
248
249
|
| `eventsColor` | string | from `HRConstantsService`: `'#e67e0f'` | Color for events |
|
|
@@ -271,15 +272,15 @@ The component calls `GET {baseUrl}/hr/employee-portal/calendar` with query param
|
|
|
271
272
|
- Header: `api-version: 2`
|
|
272
273
|
|
|
273
274
|
|
|
274
|
-
## My
|
|
275
|
+
## My Vacation Team Widget Component
|
|
275
276
|
|
|
276
277
|
### Usage
|
|
277
278
|
```html
|
|
278
|
-
<hr-my-
|
|
279
|
+
<hr-my-vacation-team-widget
|
|
279
280
|
[baseUrl]="environment.baseUrl"
|
|
280
281
|
[showProperty]="true"
|
|
281
282
|
(isLoadingChanged)="onLoadingChanged($event)">
|
|
282
|
-
</hr-my-
|
|
283
|
+
</hr-my-vacation-team-widget>
|
|
283
284
|
```
|
|
284
285
|
|
|
285
286
|
This component displays a "Next Week Vacation Insights" card showing two badges: **Upcoming Vacations** and **Expected To Return** counts for team subordinates. Clicking a badge opens a popup with a paginated, searchable data grid listing the relevant employees. It uses `SkyWidgetSectionItemComponent` from `@skysoftware-co/sky-components-ui` for badge display and `BayanEmployeeBadgeComponent` from `@skysoftware-co/bayan-components-ui` for employee photos in the popup.
|
|
@@ -289,20 +290,20 @@ This component displays a "Next Week Vacation Insights" card showing two badges:
|
|
|
289
290
|
|-------|------|---------------|-------------|
|
|
290
291
|
| `baseUrl` | string | `''` | Base URL for API calls |
|
|
291
292
|
| `showProperty` | boolean | `false` | Show employee property badge in the popup grid |
|
|
292
|
-
| `cardClass` | string | `'card rounded rounded-4 card-shadow border-top-0 h-100 p-4'` | Card container CSS class |
|
|
293
|
-
| `titleClass` | string | `'table-header-lg fw-meduim
|
|
293
|
+
| `cardClass` | string | `'card rounded rounded-4 card-shadow p-16 border-top-0 h-100 p-4'` | Card container CSS class |
|
|
294
|
+
| `titleClass` | string | `'table-header-lg fw-meduim'` | Card title CSS class |
|
|
294
295
|
| `valueClass` | string | `'fs-24 mt-1 link-dark hover-primary text-decoration-none'` | Badge value CSS class (clickable) |
|
|
295
296
|
| `disabledValueClass` | string | `'fs-24 mt-1 text-muted pe-none text-decoration-none'` | Badge value CSS class when count is 0 |
|
|
296
|
-
| `upcomingContainerClass` | string | `'border-start border-5 mb-
|
|
297
|
+
| `upcomingContainerClass` | string | `'border-start border-5 mb-3'` | Upcoming vacations badge container CSS class |
|
|
297
298
|
| `expectedContainerClass` | string | `'border-start border-5'` | Expected to return badge container CSS class |
|
|
298
299
|
|
|
299
300
|
### Output Events
|
|
300
301
|
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes
|
|
301
302
|
|
|
302
303
|
### API Endpoints
|
|
303
|
-
- **Summary**: `GET {baseUrl}/hr/widgets/me/team/
|
|
304
|
-
- **Upcoming list**: `GET {baseUrl}/hr/widgets/me/team/
|
|
305
|
-
- **Expected to return list**: `GET {baseUrl}/hr/widgets/me/team/
|
|
304
|
+
- **Summary**: `GET {baseUrl}/hr/widgets/me/team/subordinates/vacations/summary?ShowDirectSubordinatesOnly=false`
|
|
305
|
+
- **Upcoming list**: `GET {baseUrl}/hr/widgets/me/team/subordinates/vacations/upcoming`
|
|
306
|
+
- **Expected to return list**: `GET {baseUrl}/hr/widgets/me/team/subordinates/vacations/expected-to-return`
|
|
306
307
|
|
|
307
308
|
## Profile Widgets
|
|
308
309
|
|
|
@@ -343,6 +344,83 @@ The package also exports profile-focused widgets used in the employee profile pa
|
|
|
343
344
|
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
344
345
|
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
345
346
|
|
|
347
|
+
## Profile Experiences Widget
|
|
348
|
+
|
|
349
|
+
### Usage
|
|
350
|
+
```html
|
|
351
|
+
<hr-profile-experiences-widget
|
|
352
|
+
[baseUrl]="baseUrl"
|
|
353
|
+
(isLoadingChanged)="onExperiencesLoadingChanged($event)">
|
|
354
|
+
</hr-profile-experiences-widget>
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Input Properties
|
|
358
|
+
| Input | Type | Default Value | Description |
|
|
359
|
+
|-------|------|---------------|-------------|
|
|
360
|
+
| `baseUrl` | string | `''` | Base URL for API calls. |
|
|
361
|
+
| `sectionTitle` | string | `'experiences'` | Section title translation key. |
|
|
362
|
+
| `experienceIcon` | IconDefinition | `faUsersRays` | Header icon. |
|
|
363
|
+
| `viewIcon` | IconDefinition | `faEye` | Attachment view icon. |
|
|
364
|
+
| `downloadIcon` | IconDefinition | `faFolderArrowDown` | Attachment download icon. |
|
|
365
|
+
| `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class. |
|
|
366
|
+
| `headerTextClass` | string | `'fs-16 mt-2 text-secondary'` | Header text CSS class. |
|
|
367
|
+
| `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class. |
|
|
368
|
+
| `rowClass` | string | `'mt-4'` | Main row CSS class. |
|
|
369
|
+
| `itemRowClass` | string | `'row col-10 mt-3'` | Experience row CSS class. |
|
|
370
|
+
| `itemColumnClass` | string | `'col-3'` | Column CSS class. |
|
|
371
|
+
| `labelClass` | string | `'field-secondary-label-sm'` | `hr-info-field` label CSS class. |
|
|
372
|
+
| `valueClass` | string | `'text-dark-gray fs-14 text-ellipsis-one-line cursor-pointer'` | `hr-info-field` value CSS class. |
|
|
373
|
+
| `actionsColumnClass` | string | `'col-2 mt-3'` | Attachment action column CSS class. |
|
|
374
|
+
| `viewIconClass` | string | `'fs-15 text-dark cursor-pointer'` | View icon CSS class. |
|
|
375
|
+
| `downloadIconClass` | string | `'fs-15 text-dark cursor-pointer mx-2'` | Download icon CSS class. |
|
|
376
|
+
| `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class. |
|
|
377
|
+
| `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class. |
|
|
378
|
+
|
|
379
|
+
### Output Events
|
|
380
|
+
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
381
|
+
- `attachmentViewed: EventEmitter<any>` - Emitted when attachment view icon is clicked.
|
|
382
|
+
- `attachmentDownloaded: EventEmitter<any>` - Emitted when attachment download icon is clicked.
|
|
383
|
+
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
384
|
+
|
|
385
|
+
## Profile Degrees Widget
|
|
386
|
+
|
|
387
|
+
### Usage
|
|
388
|
+
```html
|
|
389
|
+
<hr-profile-degrees-widget
|
|
390
|
+
[baseUrl]="baseUrl"
|
|
391
|
+
(isLoadingChanged)="onDegreesLoadingChanged($event)">
|
|
392
|
+
</hr-profile-degrees-widget>
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Input Properties
|
|
396
|
+
| Input | Type | Default Value | Description |
|
|
397
|
+
|-------|------|---------------|-------------|
|
|
398
|
+
| `baseUrl` | string | `''` | Base URL for API calls. |
|
|
399
|
+
| `sectionTitle` | string | `'degrees'` | Section title translation key. |
|
|
400
|
+
| `degreesIcon` | IconDefinition | `faFileCertificate` | Header icon. |
|
|
401
|
+
| `viewIcon` | IconDefinition | `faEye` | Attachment view icon. |
|
|
402
|
+
| `downloadIcon` | IconDefinition | `faFolderArrowDown` | Attachment download icon. |
|
|
403
|
+
| `headerIconClass` | string | `'primary-icon-xl'` | Header icon CSS class. |
|
|
404
|
+
| `headerTextClass` | string | `'fs-16 mt-2 text-secondary'` | Header text CSS class. |
|
|
405
|
+
| `headerDividerClass` | string | `'flex-grow-1 ms-2'` | Header divider CSS class. |
|
|
406
|
+
| `rowClass` | string | `'mt-4'` | Main row CSS class. |
|
|
407
|
+
| `itemRowClass` | string | `'row col-10 mt-3'` | Degree row CSS class. |
|
|
408
|
+
| `itemColumnClass` | string | `'col-3'` | Column CSS class. |
|
|
409
|
+
| `labelClass` | string | `'field-secondary-label-sm'` | `hr-info-field` label CSS class. |
|
|
410
|
+
| `valueClass` | string | `'text-dark-gray fs-14'` | `hr-info-field` main value CSS class. |
|
|
411
|
+
| `valueEllipsisClass` | string | `'text-dark-gray fs-14 text-ellipsis-one-line cursor-pointer'` | `hr-info-field` ellipsis value CSS class. |
|
|
412
|
+
| `actionsColumnClass` | string | `'col-2 align-items-end mt-3'` | Attachment action column CSS class. |
|
|
413
|
+
| `viewIconClass` | string | `'fs-15 text-dark cursor-pointer'` | View icon CSS class. |
|
|
414
|
+
| `downloadIconClass` | string | `'fs-15 mx-3 text-dark cursor-pointer'` | Download icon CSS class. |
|
|
415
|
+
| `emptyStateContainerClass` | string | `'d-flex flex-column justify-content-center align-items-center my-5'` | Empty/loading container CSS class. |
|
|
416
|
+
| `emptyStateTextClass` | string | `'field-secondary-label-md'` | Empty/loading text CSS class. |
|
|
417
|
+
|
|
418
|
+
### Output Events
|
|
419
|
+
- `isLoadingChanged: EventEmitter<boolean>` - Emitted when loading state changes.
|
|
420
|
+
- `attachmentViewed: EventEmitter<any>` - Emitted when attachment view icon is clicked.
|
|
421
|
+
- `attachmentDownloaded: EventEmitter<any>` - Emitted when attachment download icon is clicked.
|
|
422
|
+
- `errorOccurred: EventEmitter<string>` - Emitted when API request fails.
|
|
423
|
+
|
|
346
424
|
## Profile Personal Info Contact Widget
|
|
347
425
|
|
|
348
426
|
### Usage
|