@skysoftware-co/bayan-hr-widgets-ui 1.0.18 → 1.0.19
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 +2 -1
- package/fesm2022/skysoftware-co-bayan-hr-widgets-ui.mjs +94 -168
- 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/services/hr-self-widgets.service.d.ts +2 -8
- package/lib/shared/types/common.d.ts +0 -44
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/lib/shared/services/entitlements-cache.service.d.ts +0 -22
- /package/lib/{profile-job-information-salary-widget → profile-job-info-salary-widget}/profile-job-info-salary-widget.component.d.ts +0 -0
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 |
|
|
@@ -824,63 +824,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
824
824
|
}]
|
|
825
825
|
}] });
|
|
826
826
|
|
|
827
|
-
class EntitlementsCacheService {
|
|
828
|
-
baseUrl = '';
|
|
829
|
-
vacationDetails$ = null;
|
|
830
|
-
indemnityDetails$ = null;
|
|
831
|
-
ticketDetails$ = null;
|
|
832
|
-
medicalInsuranceDetails$ = null;
|
|
833
|
-
getVacationDetails(baseUrl) {
|
|
834
|
-
return this.baseUrl === baseUrl ? this.vacationDetails$ : null;
|
|
835
|
-
}
|
|
836
|
-
setVacationDetails(baseUrl, value) {
|
|
837
|
-
this.ensureBaseUrl(baseUrl);
|
|
838
|
-
this.vacationDetails$ = value;
|
|
839
|
-
}
|
|
840
|
-
getIndemnityDetails(baseUrl) {
|
|
841
|
-
return this.baseUrl === baseUrl ? this.indemnityDetails$ : null;
|
|
842
|
-
}
|
|
843
|
-
setIndemnityDetails(baseUrl, value) {
|
|
844
|
-
this.ensureBaseUrl(baseUrl);
|
|
845
|
-
this.indemnityDetails$ = value;
|
|
846
|
-
}
|
|
847
|
-
getTicketDetails(baseUrl) {
|
|
848
|
-
return this.baseUrl === baseUrl ? this.ticketDetails$ : null;
|
|
849
|
-
}
|
|
850
|
-
setTicketDetails(baseUrl, value) {
|
|
851
|
-
this.ensureBaseUrl(baseUrl);
|
|
852
|
-
this.ticketDetails$ = value;
|
|
853
|
-
}
|
|
854
|
-
getMedicalInsuranceDetails(baseUrl) {
|
|
855
|
-
return this.baseUrl === baseUrl ? this.medicalInsuranceDetails$ : null;
|
|
856
|
-
}
|
|
857
|
-
setMedicalInsuranceDetails(baseUrl, value) {
|
|
858
|
-
this.ensureBaseUrl(baseUrl);
|
|
859
|
-
this.medicalInsuranceDetails$ = value;
|
|
860
|
-
}
|
|
861
|
-
clear() {
|
|
862
|
-
this.baseUrl = '';
|
|
863
|
-
this.vacationDetails$ = null;
|
|
864
|
-
this.indemnityDetails$ = null;
|
|
865
|
-
this.ticketDetails$ = null;
|
|
866
|
-
this.medicalInsuranceDetails$ = null;
|
|
867
|
-
}
|
|
868
|
-
ensureBaseUrl(baseUrl) {
|
|
869
|
-
if (this.baseUrl && this.baseUrl !== baseUrl) {
|
|
870
|
-
this.clear();
|
|
871
|
-
}
|
|
872
|
-
this.baseUrl = baseUrl;
|
|
873
|
-
}
|
|
874
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: EntitlementsCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
875
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: EntitlementsCacheService, providedIn: 'root' });
|
|
876
|
-
}
|
|
877
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: EntitlementsCacheService, decorators: [{
|
|
878
|
-
type: Injectable,
|
|
879
|
-
args: [{
|
|
880
|
-
providedIn: 'root'
|
|
881
|
-
}]
|
|
882
|
-
}] });
|
|
883
|
-
|
|
884
827
|
class JobInformationCacheService {
|
|
885
828
|
baseUrl = '';
|
|
886
829
|
mainDetails$ = null;
|
|
@@ -1007,14 +950,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1007
950
|
class HRSelfWidgetsService {
|
|
1008
951
|
http;
|
|
1009
952
|
bankInformationCacheService;
|
|
1010
|
-
entitlementsCacheService;
|
|
1011
953
|
jobInformationCacheService;
|
|
1012
954
|
personalInformationCacheService;
|
|
1013
955
|
headers = { 'api-version': '1' };
|
|
1014
|
-
constructor(http, bankInformationCacheService,
|
|
956
|
+
constructor(http, bankInformationCacheService, jobInformationCacheService, personalInformationCacheService) {
|
|
1015
957
|
this.http = http;
|
|
1016
958
|
this.bankInformationCacheService = bankInformationCacheService;
|
|
1017
|
-
this.entitlementsCacheService = entitlementsCacheService;
|
|
1018
959
|
this.jobInformationCacheService = jobInformationCacheService;
|
|
1019
960
|
this.personalInformationCacheService = personalInformationCacheService;
|
|
1020
961
|
}
|
|
@@ -1233,79 +1174,7 @@ class HRSelfWidgetsService {
|
|
|
1233
1174
|
headers: this.headers
|
|
1234
1175
|
});
|
|
1235
1176
|
}
|
|
1236
|
-
|
|
1237
|
-
if (!forceRefresh) {
|
|
1238
|
-
const cachedRequest$ = this.entitlementsCacheService.getVacationDetails(baseUrl);
|
|
1239
|
-
if (cachedRequest$) {
|
|
1240
|
-
return cachedRequest$;
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
const request$ = this.http
|
|
1244
|
-
.get(`${baseUrl}/hr/widgets/me/profile/entitlements/vacations`, {
|
|
1245
|
-
headers: this.headers
|
|
1246
|
-
})
|
|
1247
|
-
.pipe(map((response) => response?.ResponseData ?? null), shareReplay(1), catchError((error) => {
|
|
1248
|
-
this.entitlementsCacheService.clear();
|
|
1249
|
-
return throwError(() => error);
|
|
1250
|
-
}));
|
|
1251
|
-
this.entitlementsCacheService.setVacationDetails(baseUrl, request$);
|
|
1252
|
-
return request$;
|
|
1253
|
-
}
|
|
1254
|
-
getEntitlementsIndemnity(baseUrl, forceRefresh = false) {
|
|
1255
|
-
if (!forceRefresh) {
|
|
1256
|
-
const cachedRequest$ = this.entitlementsCacheService.getIndemnityDetails(baseUrl);
|
|
1257
|
-
if (cachedRequest$) {
|
|
1258
|
-
return cachedRequest$;
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
const request$ = this.http
|
|
1262
|
-
.get(`${baseUrl}/hr/widgets/me/profile/entitlements/indemnity`, {
|
|
1263
|
-
headers: this.headers
|
|
1264
|
-
})
|
|
1265
|
-
.pipe(map((response) => response?.ResponseData ?? null), shareReplay(1), catchError((error) => {
|
|
1266
|
-
this.entitlementsCacheService.clear();
|
|
1267
|
-
return throwError(() => error);
|
|
1268
|
-
}));
|
|
1269
|
-
this.entitlementsCacheService.setIndemnityDetails(baseUrl, request$);
|
|
1270
|
-
return request$;
|
|
1271
|
-
}
|
|
1272
|
-
getEntitlementsTicket(baseUrl, forceRefresh = false) {
|
|
1273
|
-
if (!forceRefresh) {
|
|
1274
|
-
const cachedRequest$ = this.entitlementsCacheService.getTicketDetails(baseUrl);
|
|
1275
|
-
if (cachedRequest$) {
|
|
1276
|
-
return cachedRequest$;
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
const request$ = this.http
|
|
1280
|
-
.get(`${baseUrl}/hr/widgets/me/profile/entitlements/ticket`, {
|
|
1281
|
-
headers: this.headers
|
|
1282
|
-
})
|
|
1283
|
-
.pipe(map((response) => response?.ResponseData ?? null), shareReplay(1), catchError((error) => {
|
|
1284
|
-
this.entitlementsCacheService.clear();
|
|
1285
|
-
return throwError(() => error);
|
|
1286
|
-
}));
|
|
1287
|
-
this.entitlementsCacheService.setTicketDetails(baseUrl, request$);
|
|
1288
|
-
return request$;
|
|
1289
|
-
}
|
|
1290
|
-
getEntitlementsMedicalInsurance(baseUrl, forceRefresh = false) {
|
|
1291
|
-
if (!forceRefresh) {
|
|
1292
|
-
const cachedRequest$ = this.entitlementsCacheService.getMedicalInsuranceDetails(baseUrl);
|
|
1293
|
-
if (cachedRequest$) {
|
|
1294
|
-
return cachedRequest$;
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
const request$ = this.http
|
|
1298
|
-
.get(`${baseUrl}/hr/widgets/me/profile/entitlements/medical-insurance`, {
|
|
1299
|
-
headers: this.headers
|
|
1300
|
-
})
|
|
1301
|
-
.pipe(map((response) => response?.ResponseData ?? null), shareReplay(1), catchError((error) => {
|
|
1302
|
-
this.entitlementsCacheService.clear();
|
|
1303
|
-
return throwError(() => error);
|
|
1304
|
-
}));
|
|
1305
|
-
this.entitlementsCacheService.setMedicalInsuranceDetails(baseUrl, request$);
|
|
1306
|
-
return request$;
|
|
1307
|
-
}
|
|
1308
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, deps: [{ token: i1.HttpClient }, { token: BankInformationCacheService }, { token: EntitlementsCacheService }, { token: JobInformationCacheService }, { token: PersonalInformationCacheService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1177
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, deps: [{ token: i1.HttpClient }, { token: BankInformationCacheService }, { token: JobInformationCacheService }, { token: PersonalInformationCacheService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1309
1178
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, providedIn: 'root' });
|
|
1310
1179
|
}
|
|
1311
1180
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, decorators: [{
|
|
@@ -1313,7 +1182,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1313
1182
|
args: [{
|
|
1314
1183
|
providedIn: 'root'
|
|
1315
1184
|
}]
|
|
1316
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: BankInformationCacheService }, { type:
|
|
1185
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: BankInformationCacheService }, { type: JobInformationCacheService }, { type: PersonalInformationCacheService }] });
|
|
1317
1186
|
|
|
1318
1187
|
class HRConstantsService {
|
|
1319
1188
|
defaultVacationBalanceColor = '#727070';
|
|
@@ -2176,6 +2045,7 @@ class MyCalendarWidgetComponent {
|
|
|
2176
2045
|
selfWidgetsService;
|
|
2177
2046
|
baseUrl = '';
|
|
2178
2047
|
headerContainerClass = '';
|
|
2048
|
+
datasource = null;
|
|
2179
2049
|
isLoadingChanged = new EventEmitter();
|
|
2180
2050
|
calendarIcon = faCalendarDays;
|
|
2181
2051
|
legendContainerClass = 'row mb-2';
|
|
@@ -2198,17 +2068,29 @@ class MyCalendarWidgetComponent {
|
|
|
2198
2068
|
eventsColor = this.constants.defaultEventsColor;
|
|
2199
2069
|
hrCalendar;
|
|
2200
2070
|
scheduleCalenderVacation = [];
|
|
2201
|
-
minDate
|
|
2071
|
+
minDate;
|
|
2202
2072
|
maxDate;
|
|
2073
|
+
baseCalendarData = [];
|
|
2074
|
+
hrVacations = [];
|
|
2075
|
+
calendarLoaded = false;
|
|
2203
2076
|
constructor(selfWidgetsService) {
|
|
2204
2077
|
this.selfWidgetsService = selfWidgetsService;
|
|
2205
|
-
|
|
2206
|
-
this.minDate = new Date(currentDate.year(), currentDate.month(), currentDate.date());
|
|
2207
|
-
this.maxDate = new Date(this.minDate.getFullYear() + 1, this.minDate.getMonth() + 1, 0);
|
|
2078
|
+
this.initDateRange();
|
|
2208
2079
|
}
|
|
2209
2080
|
ngOnInit() {
|
|
2210
2081
|
this.loadCalendar();
|
|
2211
2082
|
}
|
|
2083
|
+
ngOnChanges(changes) {
|
|
2084
|
+
if (changes['datasource'] && this.datasource && this.calendarLoaded) {
|
|
2085
|
+
this.buildCalendarData();
|
|
2086
|
+
this.refreshCalendar();
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
initDateRange() {
|
|
2090
|
+
const currentDate = moment().date(1).subtract(1, 'month');
|
|
2091
|
+
this.minDate = new Date(currentDate.year(), currentDate.month(), currentDate.date());
|
|
2092
|
+
this.maxDate = new Date(this.minDate.getFullYear() + 1, this.minDate.getMonth() + 1, 0);
|
|
2093
|
+
}
|
|
2212
2094
|
getCalendar(month, year, monthsCount) {
|
|
2213
2095
|
return this.selfWidgetsService.getCalendar(this.baseUrl, month, year, monthsCount);
|
|
2214
2096
|
}
|
|
@@ -2222,46 +2104,54 @@ class MyCalendarWidgetComponent {
|
|
|
2222
2104
|
this.isLoadingChanged.emit(false);
|
|
2223
2105
|
this.mapCalendarData(response.ResponseData);
|
|
2224
2106
|
},
|
|
2225
|
-
error: (
|
|
2107
|
+
error: () => {
|
|
2226
2108
|
this.isLoadingChanged.emit(false);
|
|
2227
2109
|
},
|
|
2228
2110
|
});
|
|
2229
2111
|
}
|
|
2230
2112
|
mapCalendarData(data) {
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
result.push({
|
|
2234
|
-
VacationType: ScheduleVacationTypes.Vacations,
|
|
2235
|
-
Description: v.VacationTypeName,
|
|
2236
|
-
Color: v.Color,
|
|
2237
|
-
VacationDays: { StartDate: v.StartDate, EndDate: v.EndDate }
|
|
2238
|
-
});
|
|
2239
|
-
}
|
|
2240
|
-
for (const ph of data.PublicHolidays) {
|
|
2241
|
-
result.push({
|
|
2113
|
+
this.baseCalendarData = [
|
|
2114
|
+
...data.PublicHolidays.map(ph => ({
|
|
2242
2115
|
VacationType: ScheduleVacationTypes.PublicHoliday,
|
|
2243
2116
|
Description: ph.Description,
|
|
2244
2117
|
Color: this.publicHolidayColor,
|
|
2245
2118
|
VacationDays: { StartDate: ph.StartDate, EndDate: ph.EndDate }
|
|
2246
|
-
})
|
|
2247
|
-
|
|
2248
|
-
for (const od of data.OffDays) {
|
|
2249
|
-
result.push({
|
|
2119
|
+
})),
|
|
2120
|
+
...data.OffDays.map(od => ({
|
|
2250
2121
|
VacationType: ScheduleVacationTypes.DaysOff,
|
|
2251
2122
|
Description: this.translatePipe.transform('DayOff'),
|
|
2252
2123
|
Color: this.dayOffColor,
|
|
2253
2124
|
VacationDays: { StartDate: od, EndDate: od }
|
|
2254
|
-
})
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
this.
|
|
2125
|
+
}))
|
|
2126
|
+
];
|
|
2127
|
+
this.hrVacations = (data.Vacations ?? []).map(v => ({
|
|
2128
|
+
VacationType: ScheduleVacationTypes.Vacations,
|
|
2129
|
+
Description: v.VacationTypeName,
|
|
2130
|
+
Color: v.Color,
|
|
2131
|
+
VacationDays: { StartDate: v.StartDate, EndDate: v.EndDate }
|
|
2132
|
+
}));
|
|
2133
|
+
this.calendarLoaded = true;
|
|
2134
|
+
this.buildCalendarData();
|
|
2135
|
+
this.refreshCalendar();
|
|
2136
|
+
}
|
|
2137
|
+
buildCalendarData() {
|
|
2138
|
+
const pendingVacations = this.datasource?.PendingVacationRequests?.map(v => ({
|
|
2139
|
+
VacationType: ScheduleVacationTypes.Vacations,
|
|
2140
|
+
Description: v.VacationTypeName,
|
|
2141
|
+
Color: v.Color,
|
|
2142
|
+
VacationDays: { StartDate: v.StartDate, EndDate: v.EndDate }
|
|
2143
|
+
})) ?? [];
|
|
2144
|
+
const mergedVacations = this.mergeConsecutiveVacations([...this.hrVacations, ...pendingVacations]
|
|
2145
|
+
.sort((a, b) => new Date(a.VacationDays.StartDate).getTime() - new Date(b.VacationDays.StartDate).getTime()));
|
|
2146
|
+
const events = this.datasource?.PendingEventRequests?.map(ev => ({
|
|
2147
|
+
VacationType: ScheduleVacationTypes.Events,
|
|
2148
|
+
Description: ev.Description,
|
|
2149
|
+
Color: this.eventsColor,
|
|
2150
|
+
VacationDays: { StartDate: ev.StartDate, EndDate: ev.EndDate }
|
|
2151
|
+
})) ?? [];
|
|
2152
|
+
this.scheduleCalenderVacation = [...mergedVacations, ...this.baseCalendarData, ...events];
|
|
2153
|
+
}
|
|
2154
|
+
refreshCalendar() {
|
|
2265
2155
|
setTimeout(() => {
|
|
2266
2156
|
if (this.hrCalendar?.calendar) {
|
|
2267
2157
|
this.hrCalendar.calendar.instance._refresh();
|
|
@@ -2269,8 +2159,42 @@ class MyCalendarWidgetComponent {
|
|
|
2269
2159
|
}
|
|
2270
2160
|
}, 100);
|
|
2271
2161
|
}
|
|
2162
|
+
mergeConsecutiveVacations(vacations) {
|
|
2163
|
+
if (vacations.length === 0)
|
|
2164
|
+
return [];
|
|
2165
|
+
const grouped = new Map();
|
|
2166
|
+
for (const v of vacations) {
|
|
2167
|
+
const key = `${v.Description}|${v.Color ?? ''}`;
|
|
2168
|
+
if (!grouped.has(key))
|
|
2169
|
+
grouped.set(key, []);
|
|
2170
|
+
grouped.get(key).push(v);
|
|
2171
|
+
}
|
|
2172
|
+
const result = [];
|
|
2173
|
+
grouped.forEach((items) => {
|
|
2174
|
+
items.sort((a, b) => new Date(a.VacationDays.StartDate).getTime() - new Date(b.VacationDays.StartDate).getTime());
|
|
2175
|
+
let merged = { ...items[0], VacationDays: { ...items[0].VacationDays } };
|
|
2176
|
+
for (let i = 1; i < items.length; i++) {
|
|
2177
|
+
const current = items[i];
|
|
2178
|
+
const lastEnd = new Date(merged.VacationDays.EndDate);
|
|
2179
|
+
const currentStart = new Date(current.VacationDays.StartDate);
|
|
2180
|
+
const diffDays = (currentStart.getTime() - lastEnd.getTime()) / (1000 * 60 * 60 * 24);
|
|
2181
|
+
if (diffDays <= 1) {
|
|
2182
|
+
const currentEnd = new Date(current.VacationDays.EndDate);
|
|
2183
|
+
if (currentEnd.getTime() > lastEnd.getTime()) {
|
|
2184
|
+
merged.VacationDays.EndDate = current.VacationDays.EndDate;
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
else {
|
|
2188
|
+
result.push(merged);
|
|
2189
|
+
merged = { ...current, VacationDays: { ...current.VacationDays } };
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
result.push(merged);
|
|
2193
|
+
});
|
|
2194
|
+
return result.sort((a, b) => new Date(a.VacationDays.StartDate).getTime() - new Date(b.VacationDays.StartDate).getTime());
|
|
2195
|
+
}
|
|
2272
2196
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: MyCalendarWidgetComponent, deps: [{ token: HRSelfWidgetsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2273
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: MyCalendarWidgetComponent, isStandalone: true, selector: "hr-my-calendar-widget", inputs: { baseUrl: "baseUrl", headerContainerClass: "headerContainerClass", legendContainerClass: "legendContainerClass", legendRowClass: "legendRowClass", legendItemClass: "legendItemClass", legendDotClass: "legendDotClass", legendLabelClass: "legendLabelClass", publicHolidayDotClass: "publicHolidayDotClass", dayOffDotClass: "dayOffDotClass", eventsDotClass: "eventsDotClass", vacationsContainerClass: "vacationsContainerClass", vacationsItemClass: "vacationsItemClass", vacationsIconClass: "vacationsIconClass", calendarContainerClass: "calendarContainerClass", calendarClass: "calendarClass", publicHolidayColor: "publicHolidayColor", dayOffColor: "dayOffColor", eventsColor: "eventsColor" }, outputs: { isLoadingChanged: "isLoadingChanged" }, viewQueries: [{ propertyName: "hrCalendar", first: true, predicate: HREmployeeCalendarComponent, descendants: true }], ngImport: i0, template: "<hr-card-header\r\n [icon]=\"calendarIcon\"\r\n [title]=\"'Calendar' | HRTranslate\"\r\n [containerClass]=\"'d-flex align-items-center mb-3 ' + headerContainerClass\">\r\n</hr-card-header>\r\n<hr-employee-calendar\r\n [showEvents]=\"true\"\r\n [showUpComingVacations]=\"true\"\r\n [scheduleCalenderVacation]=\"scheduleCalenderVacation\"\r\n [minDate]=\"minDate\"\r\n [maxDate]=\"maxDate\"\r\n [legendContainerClass]=\"legendContainerClass\"\r\n [legendRowClass]=\"legendRowClass\"\r\n [legendItemClass]=\"legendItemClass\"\r\n [legendDotClass]=\"legendDotClass\"\r\n [legendLabelClass]=\"legendLabelClass\"\r\n [publicHolidayDotClass]=\"publicHolidayDotClass\"\r\n [dayOffDotClass]=\"dayOffDotClass\"\r\n [eventsDotClass]=\"eventsDotClass\"\r\n [vacationsContainerClass]=\"vacationsContainerClass\"\r\n [vacationsItemClass]=\"vacationsItemClass\"\r\n [vacationsIconClass]=\"vacationsIconClass\"\r\n [calendarContainerClass]=\"calendarContainerClass\"\r\n [calendarClass]=\"calendarClass\">\r\n</hr-employee-calendar>\r\n", dependencies: [{ kind: "component", type: HREmployeeCalendarComponent, selector: "hr-employee-calendar", inputs: ["showEvents", "showUpComingVacations", "scheduleCalenderVacation", "minDate", "maxDate", "legendContainerClass", "legendRowClass", "legendItemClass", "legendDotClass", "legendLabelClass", "publicHolidayDotClass", "dayOffDotClass", "eventsDotClass", "vacationsContainerClass", "vacationsItemClass", "vacationsIconClass", "calendarContainerClass", "calendarClass"] }, { kind: "component", type: HRCardHeaderComponent, selector: "hr-card-header", inputs: ["icon", "title", "containerClass", "iconClass", "titleClass"] }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }] });
|
|
2197
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: MyCalendarWidgetComponent, isStandalone: true, selector: "hr-my-calendar-widget", inputs: { baseUrl: "baseUrl", headerContainerClass: "headerContainerClass", datasource: "datasource", legendContainerClass: "legendContainerClass", legendRowClass: "legendRowClass", legendItemClass: "legendItemClass", legendDotClass: "legendDotClass", legendLabelClass: "legendLabelClass", publicHolidayDotClass: "publicHolidayDotClass", dayOffDotClass: "dayOffDotClass", eventsDotClass: "eventsDotClass", vacationsContainerClass: "vacationsContainerClass", vacationsItemClass: "vacationsItemClass", vacationsIconClass: "vacationsIconClass", calendarContainerClass: "calendarContainerClass", calendarClass: "calendarClass", publicHolidayColor: "publicHolidayColor", dayOffColor: "dayOffColor", eventsColor: "eventsColor" }, outputs: { isLoadingChanged: "isLoadingChanged" }, viewQueries: [{ propertyName: "hrCalendar", first: true, predicate: HREmployeeCalendarComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<hr-card-header\r\n [icon]=\"calendarIcon\"\r\n [title]=\"'Calendar' | HRTranslate\"\r\n [containerClass]=\"'d-flex align-items-center mb-3 ' + headerContainerClass\">\r\n</hr-card-header>\r\n<hr-employee-calendar\r\n [showEvents]=\"true\"\r\n [showUpComingVacations]=\"true\"\r\n [scheduleCalenderVacation]=\"scheduleCalenderVacation\"\r\n [minDate]=\"minDate\"\r\n [maxDate]=\"maxDate\"\r\n [legendContainerClass]=\"legendContainerClass\"\r\n [legendRowClass]=\"legendRowClass\"\r\n [legendItemClass]=\"legendItemClass\"\r\n [legendDotClass]=\"legendDotClass\"\r\n [legendLabelClass]=\"legendLabelClass\"\r\n [publicHolidayDotClass]=\"publicHolidayDotClass\"\r\n [dayOffDotClass]=\"dayOffDotClass\"\r\n [eventsDotClass]=\"eventsDotClass\"\r\n [vacationsContainerClass]=\"vacationsContainerClass\"\r\n [vacationsItemClass]=\"vacationsItemClass\"\r\n [vacationsIconClass]=\"vacationsIconClass\"\r\n [calendarContainerClass]=\"calendarContainerClass\"\r\n [calendarClass]=\"calendarClass\">\r\n</hr-employee-calendar>\r\n", dependencies: [{ kind: "component", type: HREmployeeCalendarComponent, selector: "hr-employee-calendar", inputs: ["showEvents", "showUpComingVacations", "scheduleCalenderVacation", "minDate", "maxDate", "legendContainerClass", "legendRowClass", "legendItemClass", "legendDotClass", "legendLabelClass", "publicHolidayDotClass", "dayOffDotClass", "eventsDotClass", "vacationsContainerClass", "vacationsItemClass", "vacationsIconClass", "calendarContainerClass", "calendarClass"] }, { kind: "component", type: HRCardHeaderComponent, selector: "hr-card-header", inputs: ["icon", "title", "containerClass", "iconClass", "titleClass"] }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }] });
|
|
2274
2198
|
}
|
|
2275
2199
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: MyCalendarWidgetComponent, decorators: [{
|
|
2276
2200
|
type: Component,
|
|
@@ -2279,6 +2203,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
2279
2203
|
type: Input
|
|
2280
2204
|
}], headerContainerClass: [{
|
|
2281
2205
|
type: Input
|
|
2206
|
+
}], datasource: [{
|
|
2207
|
+
type: Input
|
|
2282
2208
|
}], isLoadingChanged: [{
|
|
2283
2209
|
type: Output
|
|
2284
2210
|
}], legendContainerClass: [{
|
|
@@ -2325,11 +2251,11 @@ class HRInfoFieldComponent {
|
|
|
2325
2251
|
valueClass = 'fs-14 fw-medium';
|
|
2326
2252
|
fallbackValue = '—';
|
|
2327
2253
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRInfoFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2328
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: HRInfoFieldComponent, isStandalone: true, selector: "hr-info-field", inputs: { labelKey: "labelKey", value: "value", labelClass: "labelClass", valueClass: "valueClass", fallbackValue: "fallbackValue" }, ngImport: i0, template: "<div [ngClass]=\"labelClass\">{{labelKey | HRTranslate}}</div>\r\n<div [ngClass]=\"valueClass\"
|
|
2254
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: HRInfoFieldComponent, isStandalone: true, selector: "hr-info-field", inputs: { labelKey: "labelKey", value: "value", labelClass: "labelClass", valueClass: "valueClass", fallbackValue: "fallbackValue" }, ngImport: i0, template: "<div [ngClass]=\"labelClass\">{{labelKey | HRTranslate}}</div>\r\n<div [ngClass]=\"valueClass\">{{value || fallbackValue}}</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }] });
|
|
2329
2255
|
}
|
|
2330
2256
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRInfoFieldComponent, decorators: [{
|
|
2331
2257
|
type: Component,
|
|
2332
|
-
args: [{ selector: 'hr-info-field', standalone: true, imports: [CommonModule, HRTranslatePipe], template: "<div [ngClass]=\"labelClass\">{{labelKey | HRTranslate}}</div>\r\n<div [ngClass]=\"valueClass\"
|
|
2258
|
+
args: [{ selector: 'hr-info-field', standalone: true, imports: [CommonModule, HRTranslatePipe], template: "<div [ngClass]=\"labelClass\">{{labelKey | HRTranslate}}</div>\r\n<div [ngClass]=\"valueClass\">{{value || fallbackValue}}</div>\r\n" }]
|
|
2333
2259
|
}], propDecorators: { labelKey: [{
|
|
2334
2260
|
type: Input,
|
|
2335
2261
|
args: [{ required: true }]
|