@skysoftware-co/bayan-hr-widgets-ui 1.0.18 → 1.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.
@@ -11,7 +11,7 @@ import { SkyShortcutIconComponent, SkySectionDividerComponent, SkyEmptyDesignCar
11
11
  import * as i1 from '@angular/common/http';
12
12
  import { HttpParams } from '@angular/common/http';
13
13
  import { map, shareReplay, catchError, throwError, lastValueFrom } from 'rxjs';
14
- import { faCakeCandles, faTreePalm, faCalendarStar, faMoneyCheckDollarPen, faMemoCircleInfo, faPhone, faBolt, faLanguage, faEarthAfrica, faHouse, faFileSignature, faSackDollar, faEnvelopeOpenDollar, faXmark } from '@fortawesome/pro-light-svg-icons';
14
+ import { faCakeCandles, faTreePalm, faCalendarStar, faMemoCircleInfo, faPhone, faBolt, faLanguage, faEarthAfrica, faHouse, faXmark } from '@fortawesome/pro-light-svg-icons';
15
15
  import * as i2 from 'devextreme-angular/core';
16
16
  import { faCircle, faCalendarDays } from '@fortawesome/pro-regular-svg-icons';
17
17
  import moment from 'moment';
@@ -1004,19 +1004,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
1004
1004
  }]
1005
1005
  }] });
1006
1006
 
1007
+ class QualificationsCacheService {
1008
+ baseUrl = '';
1009
+ degrees$ = null;
1010
+ experiences$ = null;
1011
+ getDegrees(baseUrl) {
1012
+ return this.baseUrl === baseUrl ? this.degrees$ : null;
1013
+ }
1014
+ setDegrees(baseUrl, value) {
1015
+ this.ensureBaseUrl(baseUrl);
1016
+ this.degrees$ = value;
1017
+ }
1018
+ getExperiences(baseUrl) {
1019
+ return this.baseUrl === baseUrl ? this.experiences$ : null;
1020
+ }
1021
+ setExperiences(baseUrl, value) {
1022
+ this.ensureBaseUrl(baseUrl);
1023
+ this.experiences$ = value;
1024
+ }
1025
+ clear() {
1026
+ this.baseUrl = '';
1027
+ this.degrees$ = null;
1028
+ this.experiences$ = null;
1029
+ }
1030
+ ensureBaseUrl(baseUrl) {
1031
+ if (this.baseUrl && this.baseUrl !== baseUrl) {
1032
+ this.clear();
1033
+ }
1034
+ this.baseUrl = baseUrl;
1035
+ }
1036
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: QualificationsCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1037
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: QualificationsCacheService, providedIn: 'root' });
1038
+ }
1039
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: QualificationsCacheService, decorators: [{
1040
+ type: Injectable,
1041
+ args: [{
1042
+ providedIn: 'root'
1043
+ }]
1044
+ }] });
1045
+
1007
1046
  class HRSelfWidgetsService {
1008
1047
  http;
1009
1048
  bankInformationCacheService;
1010
1049
  entitlementsCacheService;
1011
1050
  jobInformationCacheService;
1012
1051
  personalInformationCacheService;
1052
+ qualificationsCacheService;
1013
1053
  headers = { 'api-version': '1' };
1014
- constructor(http, bankInformationCacheService, entitlementsCacheService, jobInformationCacheService, personalInformationCacheService) {
1054
+ constructor(http, bankInformationCacheService, entitlementsCacheService, jobInformationCacheService, personalInformationCacheService, qualificationsCacheService) {
1015
1055
  this.http = http;
1016
1056
  this.bankInformationCacheService = bankInformationCacheService;
1017
1057
  this.entitlementsCacheService = entitlementsCacheService;
1018
1058
  this.jobInformationCacheService = jobInformationCacheService;
1019
1059
  this.personalInformationCacheService = personalInformationCacheService;
1060
+ this.qualificationsCacheService = qualificationsCacheService;
1020
1061
  }
1021
1062
  getMainDetails(baseUrl) {
1022
1063
  return this.http.get(`${baseUrl}/hr/widgets/me/main-details`, {
@@ -1233,7 +1274,7 @@ class HRSelfWidgetsService {
1233
1274
  headers: this.headers
1234
1275
  });
1235
1276
  }
1236
- getEntitlementsVacation(baseUrl, forceRefresh = false) {
1277
+ getEntitlementsVacations(baseUrl, forceRefresh = false) {
1237
1278
  if (!forceRefresh) {
1238
1279
  const cachedRequest$ = this.entitlementsCacheService.getVacationDetails(baseUrl);
1239
1280
  if (cachedRequest$) {
@@ -1305,7 +1346,38 @@ class HRSelfWidgetsService {
1305
1346
  this.entitlementsCacheService.setMedicalInsuranceDetails(baseUrl, request$);
1306
1347
  return request$;
1307
1348
  }
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 });
1349
+ getEmployeeDegrees(baseUrl, forceRefresh = false) {
1350
+ if (!forceRefresh) {
1351
+ const cachedRequest$ = this.qualificationsCacheService.getDegrees(baseUrl);
1352
+ if (cachedRequest$) {
1353
+ return cachedRequest$;
1354
+ }
1355
+ }
1356
+ const request$ = this.http
1357
+ .get(`${baseUrl}/hr/widgets/me/profile/personal-information/degrees`, { headers: this.headers })
1358
+ .pipe(map((response) => response?.ResponseData ?? []), shareReplay(1), catchError((error) => {
1359
+ this.qualificationsCacheService.clear();
1360
+ return throwError(() => error);
1361
+ }));
1362
+ this.qualificationsCacheService.setDegrees(baseUrl, request$);
1363
+ return request$;
1364
+ }
1365
+ getEmployeeExperiences(baseUrl, forceRefresh = false) {
1366
+ if (!forceRefresh) {
1367
+ const cached = this.qualificationsCacheService.getExperiences(baseUrl);
1368
+ if (cached)
1369
+ return cached;
1370
+ }
1371
+ const request$ = this.http
1372
+ .get(`${baseUrl}/hr/widgets/me/profile/qualifications/experiences`, { headers: this.headers })
1373
+ .pipe(map(res => res?.ResponseData ?? []), shareReplay(1), catchError((error) => {
1374
+ this.qualificationsCacheService.clear();
1375
+ return throwError(() => error);
1376
+ }));
1377
+ this.qualificationsCacheService.setExperiences(baseUrl, request$);
1378
+ return request$;
1379
+ }
1380
+ 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 }, { token: QualificationsCacheService }], target: i0.ɵɵFactoryTarget.Injectable });
1309
1381
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, providedIn: 'root' });
1310
1382
  }
1311
1383
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HRSelfWidgetsService, decorators: [{
@@ -1313,7 +1385,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
1313
1385
  args: [{
1314
1386
  providedIn: 'root'
1315
1387
  }]
1316
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: BankInformationCacheService }, { type: EntitlementsCacheService }, { type: JobInformationCacheService }, { type: PersonalInformationCacheService }] });
1388
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: BankInformationCacheService }, { type: EntitlementsCacheService }, { type: JobInformationCacheService }, { type: PersonalInformationCacheService }, { type: QualificationsCacheService }] });
1317
1389
 
1318
1390
  class HRConstantsService {
1319
1391
  defaultVacationBalanceColor = '#727070';
@@ -2176,6 +2248,7 @@ class MyCalendarWidgetComponent {
2176
2248
  selfWidgetsService;
2177
2249
  baseUrl = '';
2178
2250
  headerContainerClass = '';
2251
+ datasource = null;
2179
2252
  isLoadingChanged = new EventEmitter();
2180
2253
  calendarIcon = faCalendarDays;
2181
2254
  legendContainerClass = 'row mb-2';
@@ -2198,17 +2271,29 @@ class MyCalendarWidgetComponent {
2198
2271
  eventsColor = this.constants.defaultEventsColor;
2199
2272
  hrCalendar;
2200
2273
  scheduleCalenderVacation = [];
2201
- minDate = new Date();
2274
+ minDate;
2202
2275
  maxDate;
2276
+ baseCalendarData = [];
2277
+ hrVacations = [];
2278
+ calendarLoaded = false;
2203
2279
  constructor(selfWidgetsService) {
2204
2280
  this.selfWidgetsService = selfWidgetsService;
2205
- const currentDate = moment().date(1).subtract(1, 'month');
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);
2281
+ this.initDateRange();
2208
2282
  }
2209
2283
  ngOnInit() {
2210
2284
  this.loadCalendar();
2211
2285
  }
2286
+ ngOnChanges(changes) {
2287
+ if (changes['datasource'] && this.datasource && this.calendarLoaded) {
2288
+ this.buildCalendarData();
2289
+ this.refreshCalendar();
2290
+ }
2291
+ }
2292
+ initDateRange() {
2293
+ const currentDate = moment().date(1).subtract(1, 'month');
2294
+ this.minDate = new Date(currentDate.year(), currentDate.month(), currentDate.date());
2295
+ this.maxDate = new Date(this.minDate.getFullYear() + 1, this.minDate.getMonth() + 1, 0);
2296
+ }
2212
2297
  getCalendar(month, year, monthsCount) {
2213
2298
  return this.selfWidgetsService.getCalendar(this.baseUrl, month, year, monthsCount);
2214
2299
  }
@@ -2222,46 +2307,54 @@ class MyCalendarWidgetComponent {
2222
2307
  this.isLoadingChanged.emit(false);
2223
2308
  this.mapCalendarData(response.ResponseData);
2224
2309
  },
2225
- error: (error) => {
2310
+ error: () => {
2226
2311
  this.isLoadingChanged.emit(false);
2227
2312
  },
2228
2313
  });
2229
2314
  }
2230
2315
  mapCalendarData(data) {
2231
- const result = [];
2232
- for (const v of data.Vacations) {
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({
2316
+ this.baseCalendarData = [
2317
+ ...data.PublicHolidays.map(ph => ({
2242
2318
  VacationType: ScheduleVacationTypes.PublicHoliday,
2243
2319
  Description: ph.Description,
2244
2320
  Color: this.publicHolidayColor,
2245
2321
  VacationDays: { StartDate: ph.StartDate, EndDate: ph.EndDate }
2246
- });
2247
- }
2248
- for (const od of data.OffDays) {
2249
- result.push({
2322
+ })),
2323
+ ...data.OffDays.map(od => ({
2250
2324
  VacationType: ScheduleVacationTypes.DaysOff,
2251
2325
  Description: this.translatePipe.transform('DayOff'),
2252
2326
  Color: this.dayOffColor,
2253
2327
  VacationDays: { StartDate: od, EndDate: od }
2254
- });
2255
- }
2256
- for (const ev of data.Events) {
2257
- result.push({
2258
- VacationType: ScheduleVacationTypes.Events,
2259
- Description: ev.Description,
2260
- Color: this.eventsColor,
2261
- VacationDays: { StartDate: ev.StartDate, EndDate: ev.EndDate }
2262
- });
2263
- }
2264
- this.scheduleCalenderVacation = result;
2328
+ }))
2329
+ ];
2330
+ this.hrVacations = (data.Vacations ?? []).map(v => ({
2331
+ VacationType: ScheduleVacationTypes.Vacations,
2332
+ Description: v.VacationTypeName,
2333
+ Color: v.Color,
2334
+ VacationDays: { StartDate: v.StartDate, EndDate: v.EndDate }
2335
+ }));
2336
+ this.calendarLoaded = true;
2337
+ this.buildCalendarData();
2338
+ this.refreshCalendar();
2339
+ }
2340
+ buildCalendarData() {
2341
+ const pendingVacations = this.datasource?.PendingVacationRequests?.map(v => ({
2342
+ VacationType: ScheduleVacationTypes.Vacations,
2343
+ Description: v.VacationTypeName,
2344
+ Color: v.Color,
2345
+ VacationDays: { StartDate: v.StartDate, EndDate: v.EndDate }
2346
+ })) ?? [];
2347
+ const mergedVacations = this.mergeConsecutiveVacations([...this.hrVacations, ...pendingVacations]
2348
+ .sort((a, b) => new Date(a.VacationDays.StartDate).getTime() - new Date(b.VacationDays.StartDate).getTime()));
2349
+ const events = this.datasource?.PendingEventRequests?.map(ev => ({
2350
+ VacationType: ScheduleVacationTypes.Events,
2351
+ Description: ev.Description,
2352
+ Color: this.eventsColor,
2353
+ VacationDays: { StartDate: ev.StartDate, EndDate: ev.EndDate }
2354
+ })) ?? [];
2355
+ this.scheduleCalenderVacation = [...mergedVacations, ...this.baseCalendarData, ...events];
2356
+ }
2357
+ refreshCalendar() {
2265
2358
  setTimeout(() => {
2266
2359
  if (this.hrCalendar?.calendar) {
2267
2360
  this.hrCalendar.calendar.instance._refresh();
@@ -2269,8 +2362,42 @@ class MyCalendarWidgetComponent {
2269
2362
  }
2270
2363
  }, 100);
2271
2364
  }
2365
+ mergeConsecutiveVacations(vacations) {
2366
+ if (vacations.length === 0)
2367
+ return [];
2368
+ const grouped = new Map();
2369
+ for (const v of vacations) {
2370
+ const key = `${v.Description}|${v.Color ?? ''}`;
2371
+ if (!grouped.has(key))
2372
+ grouped.set(key, []);
2373
+ grouped.get(key).push(v);
2374
+ }
2375
+ const result = [];
2376
+ grouped.forEach((items) => {
2377
+ items.sort((a, b) => new Date(a.VacationDays.StartDate).getTime() - new Date(b.VacationDays.StartDate).getTime());
2378
+ let merged = { ...items[0], VacationDays: { ...items[0].VacationDays } };
2379
+ for (let i = 1; i < items.length; i++) {
2380
+ const current = items[i];
2381
+ const lastEnd = new Date(merged.VacationDays.EndDate);
2382
+ const currentStart = new Date(current.VacationDays.StartDate);
2383
+ const diffDays = (currentStart.getTime() - lastEnd.getTime()) / (1000 * 60 * 60 * 24);
2384
+ if (diffDays <= 1) {
2385
+ const currentEnd = new Date(current.VacationDays.EndDate);
2386
+ if (currentEnd.getTime() > lastEnd.getTime()) {
2387
+ merged.VacationDays.EndDate = current.VacationDays.EndDate;
2388
+ }
2389
+ }
2390
+ else {
2391
+ result.push(merged);
2392
+ merged = { ...current, VacationDays: { ...current.VacationDays } };
2393
+ }
2394
+ }
2395
+ result.push(merged);
2396
+ });
2397
+ return result.sort((a, b) => new Date(a.VacationDays.StartDate).getTime() - new Date(b.VacationDays.StartDate).getTime());
2398
+ }
2272
2399
  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" }] });
2400
+ 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
2401
  }
2275
2402
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: MyCalendarWidgetComponent, decorators: [{
2276
2403
  type: Component,
@@ -2279,6 +2406,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
2279
2406
  type: Input
2280
2407
  }], headerContainerClass: [{
2281
2408
  type: Input
2409
+ }], datasource: [{
2410
+ type: Input
2282
2411
  }], isLoadingChanged: [{
2283
2412
  type: Output
2284
2413
  }], legendContainerClass: [{
@@ -2343,130 +2472,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
2343
2472
  type: Input
2344
2473
  }] } });
2345
2474
 
2346
- class ProfileBankInfoWidgetComponent {
2347
- commonMethodsService;
2348
- hrSelfWidgetsService;
2349
- isLoading = true;
2350
- constructor(commonMethodsService, hrSelfWidgetsService) {
2351
- this.commonMethodsService = commonMethodsService;
2352
- this.hrSelfWidgetsService = hrSelfWidgetsService;
2353
- }
2354
- ngOnInit() {
2355
- this.isLoadingChanged.emit(true);
2356
- this.hrSelfWidgetsService.getBankInformation(this.baseUrl).subscribe({
2357
- next: (response) => {
2358
- this.isLoading = false;
2359
- this.employeeBankInformation = response ?? [];
2360
- this.isLoadingChanged.emit(false);
2361
- },
2362
- error: (error) => {
2363
- this.isLoading = false;
2364
- this.employeeBankInformation = [];
2365
- this.isLoadingChanged.emit(false);
2366
- this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
2367
- }
2368
- });
2369
- }
2370
- employeeBankInformation = [];
2371
- currencyCode = '';
2372
- currencyDecimals = 2;
2373
- headerIconClass = 'primary-icon-xl';
2374
- headerTextClass = 'mt-2 field-secondary-label-lg';
2375
- headerDividerClass = 'flex-grow-1 ms-2';
2376
- cardClass = 'mt-4 card-shadow position-relative';
2377
- mainBadgeClass = 'position-absolute text-center top-0 mt-3 start-0 bg-primary status-badge';
2378
- mainBadgeTextClass = 'mx-1 fs-12 text-white';
2379
- triangleClass = 'position-absolute start-0 top-0';
2380
- rowClass = 'row px-4 pb-3';
2381
- rowMainPtClass = 'pt-5';
2382
- rowNormalPtClass = 'pt-3';
2383
- columnClass = 'col-md-4 col-6';
2384
- responsiveTopSpacingColClass = 'col-md-4 col-6 mt-md-0 mt-4';
2385
- topSpacingColClass = 'col-md-4 col-6 mt-4';
2386
- labelClass = 'field-secondary-label-sm';
2387
- valueClass = 'table-cell-md text-ellipsis-one-line';
2388
- emptyStateContainerClass = 'd-flex flex-column justify-content-center align-items-center my-5';
2389
- emptyStateTextClass = 'field-secondary-label-md';
2390
- bankInformationIcon = faMoneyCheckDollarPen;
2391
- sectionHeaderVisibility = true;
2392
- sectionTitle = 'BankInformation';
2393
- language = 'en';
2394
- baseUrl = '';
2395
- errorOccurred = new EventEmitter();
2396
- isRTL = this.language === 'ar';
2397
- isLoadingChanged = new EventEmitter();
2398
- ngOnChanges(changes) {
2399
- if (changes['language']) {
2400
- this.isRTL = this.language === 'ar';
2401
- }
2402
- }
2403
- formatAmount(value) {
2404
- if (value == null) {
2405
- return '-';
2406
- }
2407
- return this.commonMethodsService.currencyDecimalFormat(value, this.currencyDecimals) || '-';
2408
- }
2409
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileBankInfoWidgetComponent, deps: [{ token: HRCommonMethodsService }, { token: HRSelfWidgetsService }], target: i0.ɵɵFactoryTarget.Component });
2410
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: ProfileBankInfoWidgetComponent, isStandalone: true, selector: "hr-profile-bank-info-widget", inputs: { currencyCode: "currencyCode", currencyDecimals: "currencyDecimals", headerIconClass: "headerIconClass", headerTextClass: "headerTextClass", headerDividerClass: "headerDividerClass", cardClass: "cardClass", mainBadgeClass: "mainBadgeClass", mainBadgeTextClass: "mainBadgeTextClass", triangleClass: "triangleClass", rowClass: "rowClass", rowMainPtClass: "rowMainPtClass", rowNormalPtClass: "rowNormalPtClass", columnClass: "columnClass", responsiveTopSpacingColClass: "responsiveTopSpacingColClass", topSpacingColClass: "topSpacingColClass", labelClass: "labelClass", valueClass: "valueClass", emptyStateContainerClass: "emptyStateContainerClass", emptyStateTextClass: "emptyStateTextClass", bankInformationIcon: "bankInformationIcon", sectionHeaderVisibility: "sectionHeaderVisibility", sectionTitle: "sectionTitle", language: "language", baseUrl: "baseUrl" }, outputs: { errorOccurred: "errorOccurred", isLoadingChanged: "isLoadingChanged" }, usesOnChanges: true, ngImport: i0, template: "@if(sectionHeaderVisibility){\r\n<sky-section-divider [fontAwesomeIcon]=\"bankInformationIcon\"\r\n [text]=\"(sectionTitle | HRTranslate|uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n}\r\n@if(employeeBankInformation.length > 0){\r\n@for (bankInfo of employeeBankInformation; track bankInfo){\r\n<div [class]=\"cardClass\">\r\n @if(bankInfo.IsMainBank && employeeBankInformation.length > 1){\r\n <div [class]=\"mainBadgeClass\"\r\n style=\"padding-top: 2px\"\r\n [style.margin-left]=\"!isRTL ? '-6px' : 'unset'\">\r\n <span [class]=\"mainBadgeTextClass\">{{'MainBank' | HRTranslate}}</span>\r\n </div>\r\n\r\n <div [class]=\"triangleClass\"\r\n [style.margin-left]=\"!isRTL ? '-6px' : 'unset'\"\r\n [style.margin-right]=\"isRTL ? '-5px' : '20px'\"\r\n [style.margin-top]=\"!isRTL ? '7px' : '4px'\">\r\n <svg viewBox=\"4 2 16 16\" class=\"status-badge-triangle\" fill=\"#e67e0f\">\r\n <path d=\"m3.86 8.753 5.482 4.796c.646.566 1.658.106 1.658-.753V3.204a1 1 0 0 0-1.659-.753l-5.48 4.796a1 1 0 0 0 0 1.506z\"></path>\r\n </svg>\r\n </div>\r\n }\r\n\r\n <div [ngClass]=\"[rowClass, bankInfo.IsMainBank ? rowMainPtClass : rowNormalPtClass]\">\r\n <div [class]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'Bank'\"\r\n [value]=\"bankInfo.BankName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [class]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'Branch'\"\r\n [value]=\"bankInfo.BranchName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [class]=\"responsiveTopSpacingColClass\">\r\n <hr-info-field [labelKey]=\"'IBAN'\"\r\n [value]=\"bankInfo.IBAN\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [class]=\"topSpacingColClass\">\r\n <hr-info-field [labelKey]=\"'AccountNumber'\"\r\n [value]=\"bankInfo.AccountNumber\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [class]=\"topSpacingColClass\">\r\n <hr-info-field [labelKey]=\"'Beneficiary'\"\r\n [value]=\"bankInfo.Beneficiary\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n @if(bankInfo.TransferAmount != null){\r\n <div [class]=\"topSpacingColClass\">\r\n <hr-info-field [labelKey]=\"'TransferAmount'\"\r\n [value]=\"formatAmount(bankInfo.TransferAmount) + ' (' + currencyCode + ')'\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n}\r\n}@else{\r\n<sky-empty-design-card [visibleIcon]=\"false\"\r\n [visibleQuickAction]=\"false\"\r\n [containerClass]=\"emptyStateContainerClass\"\r\n [cardBodyClass]=\"''\"\r\n [cardBodyContainerClass]=\"''\"\r\n [emptyTextClass]=\"emptyStateTextClass\"\r\n [emptyText]=\"isLoading ? ((sectionTitle | HRTranslate) + ' ' + ('IsLoading' | HRTranslate)) : ('ThereIsNoBankYet' | HRTranslate)\">\r\n</sky-empty-design-card>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i2$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }, { kind: "component", type: SkySectionDividerComponent, selector: "sky-section-divider", inputs: ["text", "fontAwesomeIcon", "textClass", "dividerClass", "iconClass"] }, { kind: "component", type: SkyEmptyDesignCardComponent, selector: "sky-empty-design-card", inputs: ["emptyIcon", "emptyIconClass", "emptyText", "emptyTextClass", "actionTitle", "actionIcon", "actionDisabled", "textColor", "disabledTitleClass", "activeTitleClass", "disabledIconClass", "activeIconClass", "actionClass", "containerClass", "cardBodyClass", "cardBodyContainerClass", "visibleIcon", "visibleQuickAction"], outputs: ["onActionClick"] }, { kind: "component", type: HRInfoFieldComponent, selector: "hr-info-field", inputs: ["labelKey", "value", "labelClass", "valueClass", "fallbackValue"] }] });
2411
- }
2412
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileBankInfoWidgetComponent, decorators: [{
2413
- type: Component,
2414
- args: [{ selector: 'hr-profile-bank-info-widget', standalone: true, imports: [CommonModule, HRTranslatePipe, SkySectionDividerComponent, SkyEmptyDesignCardComponent, HRInfoFieldComponent], template: "@if(sectionHeaderVisibility){\r\n<sky-section-divider [fontAwesomeIcon]=\"bankInformationIcon\"\r\n [text]=\"(sectionTitle | HRTranslate|uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n}\r\n@if(employeeBankInformation.length > 0){\r\n@for (bankInfo of employeeBankInformation; track bankInfo){\r\n<div [class]=\"cardClass\">\r\n @if(bankInfo.IsMainBank && employeeBankInformation.length > 1){\r\n <div [class]=\"mainBadgeClass\"\r\n style=\"padding-top: 2px\"\r\n [style.margin-left]=\"!isRTL ? '-6px' : 'unset'\">\r\n <span [class]=\"mainBadgeTextClass\">{{'MainBank' | HRTranslate}}</span>\r\n </div>\r\n\r\n <div [class]=\"triangleClass\"\r\n [style.margin-left]=\"!isRTL ? '-6px' : 'unset'\"\r\n [style.margin-right]=\"isRTL ? '-5px' : '20px'\"\r\n [style.margin-top]=\"!isRTL ? '7px' : '4px'\">\r\n <svg viewBox=\"4 2 16 16\" class=\"status-badge-triangle\" fill=\"#e67e0f\">\r\n <path d=\"m3.86 8.753 5.482 4.796c.646.566 1.658.106 1.658-.753V3.204a1 1 0 0 0-1.659-.753l-5.48 4.796a1 1 0 0 0 0 1.506z\"></path>\r\n </svg>\r\n </div>\r\n }\r\n\r\n <div [ngClass]=\"[rowClass, bankInfo.IsMainBank ? rowMainPtClass : rowNormalPtClass]\">\r\n <div [class]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'Bank'\"\r\n [value]=\"bankInfo.BankName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [class]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'Branch'\"\r\n [value]=\"bankInfo.BranchName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [class]=\"responsiveTopSpacingColClass\">\r\n <hr-info-field [labelKey]=\"'IBAN'\"\r\n [value]=\"bankInfo.IBAN\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [class]=\"topSpacingColClass\">\r\n <hr-info-field [labelKey]=\"'AccountNumber'\"\r\n [value]=\"bankInfo.AccountNumber\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [class]=\"topSpacingColClass\">\r\n <hr-info-field [labelKey]=\"'Beneficiary'\"\r\n [value]=\"bankInfo.Beneficiary\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n @if(bankInfo.TransferAmount != null){\r\n <div [class]=\"topSpacingColClass\">\r\n <hr-info-field [labelKey]=\"'TransferAmount'\"\r\n [value]=\"formatAmount(bankInfo.TransferAmount) + ' (' + currencyCode + ')'\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n}\r\n}@else{\r\n<sky-empty-design-card [visibleIcon]=\"false\"\r\n [visibleQuickAction]=\"false\"\r\n [containerClass]=\"emptyStateContainerClass\"\r\n [cardBodyClass]=\"''\"\r\n [cardBodyContainerClass]=\"''\"\r\n [emptyTextClass]=\"emptyStateTextClass\"\r\n [emptyText]=\"isLoading ? ((sectionTitle | HRTranslate) + ' ' + ('IsLoading' | HRTranslate)) : ('ThereIsNoBankYet' | HRTranslate)\">\r\n</sky-empty-design-card>\r\n}\r\n" }]
2415
- }], ctorParameters: () => [{ type: HRCommonMethodsService }, { type: HRSelfWidgetsService }], propDecorators: { currencyCode: [{
2416
- type: Input
2417
- }], currencyDecimals: [{
2418
- type: Input
2419
- }], headerIconClass: [{
2420
- type: Input
2421
- }], headerTextClass: [{
2422
- type: Input
2423
- }], headerDividerClass: [{
2424
- type: Input
2425
- }], cardClass: [{
2426
- type: Input
2427
- }], mainBadgeClass: [{
2428
- type: Input
2429
- }], mainBadgeTextClass: [{
2430
- type: Input
2431
- }], triangleClass: [{
2432
- type: Input
2433
- }], rowClass: [{
2434
- type: Input
2435
- }], rowMainPtClass: [{
2436
- type: Input
2437
- }], rowNormalPtClass: [{
2438
- type: Input
2439
- }], columnClass: [{
2440
- type: Input
2441
- }], responsiveTopSpacingColClass: [{
2442
- type: Input
2443
- }], topSpacingColClass: [{
2444
- type: Input
2445
- }], labelClass: [{
2446
- type: Input
2447
- }], valueClass: [{
2448
- type: Input
2449
- }], emptyStateContainerClass: [{
2450
- type: Input
2451
- }], emptyStateTextClass: [{
2452
- type: Input
2453
- }], bankInformationIcon: [{
2454
- type: Input
2455
- }], sectionHeaderVisibility: [{
2456
- type: Input
2457
- }], sectionTitle: [{
2458
- type: Input
2459
- }], language: [{
2460
- type: Input
2461
- }], baseUrl: [{
2462
- type: Input,
2463
- args: [{ required: true }]
2464
- }], errorOccurred: [{
2465
- type: Output
2466
- }], isLoadingChanged: [{
2467
- type: Output
2468
- }] } });
2469
-
2470
2475
  class ProfilePersonalInfoMainWidgetComponent {
2471
2476
  hrSelfWidgetsService;
2472
2477
  employeePersonalInformation = null;
@@ -2907,393 +2912,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
2907
2912
  type: Output
2908
2913
  }] } });
2909
2914
 
2910
- class ProfileJobInfoMainWidgetComponent {
2911
- hrSelfWidgetsService;
2912
- jobInformationMain = null;
2913
- isLoading = true;
2914
- baseUrl = '';
2915
- headerIconClass = 'primary-icon-xl';
2916
- headerTextClass = 'mt-2 field-secondary-label-lg';
2917
- headerDividerClass = 'flex-grow-1 ms-2';
2918
- rowClass = 'row mt-4';
2919
- columnClass = 'col-md-4 col-6';
2920
- responsiveTopSpacingColumnClass = 'col-md-4 col-6 mt-md-0 mt-4';
2921
- topSpacingBottomMdSpacingColumnClass = 'col-md-4 col-6 mt-4 mb-md-5';
2922
- topSpacingBottomSpacingColumnClass = 'col-md-4 col-6 mt-4 mb-5';
2923
- labelClass = 'field-secondary-label-sm';
2924
- valueClass = 'fs-14 fw-medium text-ellipsis-one-line';
2925
- emptyStateContainerClass = 'd-flex flex-column justify-content-center align-items-center my-5';
2926
- emptyStateTextClass = 'field-secondary-label-md';
2927
- mainIcon = faFileSignature;
2928
- sectionTitle = 'JobInformation';
2929
- isLoadingChanged = new EventEmitter();
2930
- errorOccurred = new EventEmitter();
2931
- constructor(hrSelfWidgetsService) {
2932
- this.hrSelfWidgetsService = hrSelfWidgetsService;
2933
- }
2934
- ngOnInit() {
2935
- if (!this.baseUrl) {
2936
- this.isLoading = false;
2937
- return;
2938
- }
2939
- this.isLoadingChanged.emit(true);
2940
- this.hrSelfWidgetsService.getJobInformationMain(this.baseUrl).subscribe({
2941
- next: (response) => {
2942
- this.isLoading = false;
2943
- this.jobInformationMain = response;
2944
- this.isLoadingChanged.emit(false);
2945
- },
2946
- error: (error) => {
2947
- this.isLoading = false;
2948
- this.jobInformationMain = null;
2949
- this.isLoadingChanged.emit(false);
2950
- this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
2951
- }
2952
- });
2953
- }
2954
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileJobInfoMainWidgetComponent, deps: [{ token: HRSelfWidgetsService }], target: i0.ɵɵFactoryTarget.Component });
2955
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: ProfileJobInfoMainWidgetComponent, isStandalone: true, selector: "hr-profile-job-info-main-widget", inputs: { baseUrl: "baseUrl", headerIconClass: "headerIconClass", headerTextClass: "headerTextClass", headerDividerClass: "headerDividerClass", rowClass: "rowClass", columnClass: "columnClass", responsiveTopSpacingColumnClass: "responsiveTopSpacingColumnClass", topSpacingBottomMdSpacingColumnClass: "topSpacingBottomMdSpacingColumnClass", topSpacingBottomSpacingColumnClass: "topSpacingBottomSpacingColumnClass", labelClass: "labelClass", valueClass: "valueClass", emptyStateContainerClass: "emptyStateContainerClass", emptyStateTextClass: "emptyStateTextClass", mainIcon: "mainIcon", sectionTitle: "sectionTitle" }, outputs: { isLoadingChanged: "isLoadingChanged", errorOccurred: "errorOccurred" }, ngImport: i0, template: "<sky-section-divider [fontAwesomeIcon]=\"mainIcon\"\r\n [text]=\"(sectionTitle | HRTranslate | uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n\r\n@if(jobInformationMain){\r\n<div [ngClass]=\"rowClass\">\r\n <div [ngClass]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'AdminUnit'\"\r\n [value]=\"jobInformationMain.AdminUnitName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'Position'\"\r\n [value]=\"jobInformationMain.PositionName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"responsiveTopSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'Grade'\"\r\n [value]=\"jobInformationMain.GradeName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [ngClass]=\"topSpacingBottomMdSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'JoiningDate'\"\r\n [value]=\"jobInformationMain.JoiningDate ? (jobInformationMain.JoiningDate | date: 'dd/MM/yyyy') : null\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"topSpacingBottomMdSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'CorporateJoiningDate'\"\r\n [value]=\"jobInformationMain.CorporateJoiningDate ? (jobInformationMain.CorporateJoiningDate | date: 'dd/MM/yyyy') : null\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"topSpacingBottomSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'Sponsor'\"\r\n [value]=\"jobInformationMain.SponsorName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n</div>\r\n}@else{\r\n<sky-empty-design-card [visibleIcon]=\"false\"\r\n [visibleQuickAction]=\"false\"\r\n [containerClass]=\"emptyStateContainerClass\"\r\n [cardBodyClass]=\"''\"\r\n [cardBodyContainerClass]=\"''\"\r\n [emptyTextClass]=\"emptyStateTextClass\"\r\n [emptyText]=\"isLoading ? ((sectionTitle | HRTranslate) + ' ' + ('IsLoading' | HRTranslate)) : ('ThereIsNoJobMainYet' | HRTranslate)\">\r\n</sky-empty-design-card>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i2$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }, { kind: "component", type: SkySectionDividerComponent, selector: "sky-section-divider", inputs: ["text", "fontAwesomeIcon", "textClass", "dividerClass", "iconClass"] }, { kind: "component", type: SkyEmptyDesignCardComponent, selector: "sky-empty-design-card", inputs: ["emptyIcon", "emptyIconClass", "emptyText", "emptyTextClass", "actionTitle", "actionIcon", "actionDisabled", "textColor", "disabledTitleClass", "activeTitleClass", "disabledIconClass", "activeIconClass", "actionClass", "containerClass", "cardBodyClass", "cardBodyContainerClass", "visibleIcon", "visibleQuickAction"], outputs: ["onActionClick"] }, { kind: "component", type: HRInfoFieldComponent, selector: "hr-info-field", inputs: ["labelKey", "value", "labelClass", "valueClass", "fallbackValue"] }] });
2956
- }
2957
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileJobInfoMainWidgetComponent, decorators: [{
2958
- type: Component,
2959
- args: [{ selector: 'hr-profile-job-info-main-widget', standalone: true, imports: [CommonModule, HRTranslatePipe, SkySectionDividerComponent, SkyEmptyDesignCardComponent, HRInfoFieldComponent], template: "<sky-section-divider [fontAwesomeIcon]=\"mainIcon\"\r\n [text]=\"(sectionTitle | HRTranslate | uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n\r\n@if(jobInformationMain){\r\n<div [ngClass]=\"rowClass\">\r\n <div [ngClass]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'AdminUnit'\"\r\n [value]=\"jobInformationMain.AdminUnitName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'Position'\"\r\n [value]=\"jobInformationMain.PositionName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"responsiveTopSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'Grade'\"\r\n [value]=\"jobInformationMain.GradeName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [ngClass]=\"topSpacingBottomMdSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'JoiningDate'\"\r\n [value]=\"jobInformationMain.JoiningDate ? (jobInformationMain.JoiningDate | date: 'dd/MM/yyyy') : null\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"topSpacingBottomMdSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'CorporateJoiningDate'\"\r\n [value]=\"jobInformationMain.CorporateJoiningDate ? (jobInformationMain.CorporateJoiningDate | date: 'dd/MM/yyyy') : null\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"topSpacingBottomSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'Sponsor'\"\r\n [value]=\"jobInformationMain.SponsorName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n</div>\r\n}@else{\r\n<sky-empty-design-card [visibleIcon]=\"false\"\r\n [visibleQuickAction]=\"false\"\r\n [containerClass]=\"emptyStateContainerClass\"\r\n [cardBodyClass]=\"''\"\r\n [cardBodyContainerClass]=\"''\"\r\n [emptyTextClass]=\"emptyStateTextClass\"\r\n [emptyText]=\"isLoading ? ((sectionTitle | HRTranslate) + ' ' + ('IsLoading' | HRTranslate)) : ('ThereIsNoJobMainYet' | HRTranslate)\">\r\n</sky-empty-design-card>\r\n}\r\n" }]
2960
- }], ctorParameters: () => [{ type: HRSelfWidgetsService }], propDecorators: { baseUrl: [{
2961
- type: Input,
2962
- args: [{ required: true }]
2963
- }], headerIconClass: [{
2964
- type: Input
2965
- }], headerTextClass: [{
2966
- type: Input
2967
- }], headerDividerClass: [{
2968
- type: Input
2969
- }], rowClass: [{
2970
- type: Input
2971
- }], columnClass: [{
2972
- type: Input
2973
- }], responsiveTopSpacingColumnClass: [{
2974
- type: Input
2975
- }], topSpacingBottomMdSpacingColumnClass: [{
2976
- type: Input
2977
- }], topSpacingBottomSpacingColumnClass: [{
2978
- type: Input
2979
- }], labelClass: [{
2980
- type: Input
2981
- }], valueClass: [{
2982
- type: Input
2983
- }], emptyStateContainerClass: [{
2984
- type: Input
2985
- }], emptyStateTextClass: [{
2986
- type: Input
2987
- }], mainIcon: [{
2988
- type: Input
2989
- }], sectionTitle: [{
2990
- type: Input
2991
- }], isLoadingChanged: [{
2992
- type: Output
2993
- }], errorOccurred: [{
2994
- type: Output
2995
- }] } });
2996
-
2997
- class ProfileJobInfoContractWidgetComponent {
2998
- hrSelfWidgetsService;
2999
- jobInformationContract = null;
3000
- isLoading = true;
3001
- baseUrl = '';
3002
- headerIconClass = 'primary-icon-xl';
3003
- headerTextClass = 'mt-2 field-secondary-label-lg';
3004
- headerDividerClass = 'flex-grow-1 ms-2';
3005
- rowClass = 'row mt-4';
3006
- columnClass = 'col-md-4 col-6';
3007
- responsiveTopSpacingColumnClass = 'col-md-4 col-6 mt-md-0 mt-4';
3008
- topSpacingBottomMdSpacingColumnClass = 'col-md-4 col-6 mt-4 mb-md-5';
3009
- topSpacingBottomSpacingColumnClass = 'col-md-4 col-6 mt-4 mb-5';
3010
- labelClass = 'field-secondary-label-sm';
3011
- valueClass = 'fs-14 fw-medium text-ellipsis-one-line';
3012
- emptyStateContainerClass = 'd-flex flex-column justify-content-center align-items-center my-5';
3013
- emptyStateTextClass = 'field-secondary-label-md';
3014
- contractIcon = faFileSignature;
3015
- sectionTitle = 'Contract';
3016
- isLoadingChanged = new EventEmitter();
3017
- errorOccurred = new EventEmitter();
3018
- constructor(hrSelfWidgetsService) {
3019
- this.hrSelfWidgetsService = hrSelfWidgetsService;
3020
- }
3021
- ngOnInit() {
3022
- if (!this.baseUrl) {
3023
- this.isLoading = false;
3024
- return;
3025
- }
3026
- this.isLoadingChanged.emit(true);
3027
- this.hrSelfWidgetsService.getJobInformationContract(this.baseUrl).subscribe({
3028
- next: (response) => {
3029
- this.isLoading = false;
3030
- this.jobInformationContract = response;
3031
- this.isLoadingChanged.emit(false);
3032
- },
3033
- error: (error) => {
3034
- this.isLoading = false;
3035
- this.jobInformationContract = null;
3036
- this.isLoadingChanged.emit(false);
3037
- this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
3038
- }
3039
- });
3040
- }
3041
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileJobInfoContractWidgetComponent, deps: [{ token: HRSelfWidgetsService }], target: i0.ɵɵFactoryTarget.Component });
3042
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: ProfileJobInfoContractWidgetComponent, isStandalone: true, selector: "hr-profile-job-info-contract-widget", inputs: { baseUrl: "baseUrl", headerIconClass: "headerIconClass", headerTextClass: "headerTextClass", headerDividerClass: "headerDividerClass", rowClass: "rowClass", columnClass: "columnClass", responsiveTopSpacingColumnClass: "responsiveTopSpacingColumnClass", topSpacingBottomMdSpacingColumnClass: "topSpacingBottomMdSpacingColumnClass", topSpacingBottomSpacingColumnClass: "topSpacingBottomSpacingColumnClass", labelClass: "labelClass", valueClass: "valueClass", emptyStateContainerClass: "emptyStateContainerClass", emptyStateTextClass: "emptyStateTextClass", contractIcon: "contractIcon", sectionTitle: "sectionTitle" }, outputs: { isLoadingChanged: "isLoadingChanged", errorOccurred: "errorOccurred" }, ngImport: i0, template: "<sky-section-divider [fontAwesomeIcon]=\"contractIcon\"\r\n [text]=\"(sectionTitle | HRTranslate | uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n\r\n@if(jobInformationContract){\r\n<div [ngClass]=\"rowClass\">\r\n <div [ngClass]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'ContractType'\"\r\n [value]=\"jobInformationContract.ContractTypeName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'ContractStartDate'\"\r\n [value]=\"jobInformationContract.ContractStartDate ? (jobInformationContract.ContractStartDate | date: 'dd/MM/yyyy') : null\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"responsiveTopSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'ContractEndDate'\"\r\n [value]=\"jobInformationContract.ContractEndDate ? (jobInformationContract.ContractEndDate | date: 'dd/MM/yyyy') : null\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [ngClass]=\"topSpacingBottomMdSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'ContractMaritalStatus'\"\r\n [value]=\"jobInformationContract.ContractMaritalStateName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"topSpacingBottomSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'ContractDependentsCount'\"\r\n [value]=\"jobInformationContract.ContractDependentsCount?.toString()\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n</div>\r\n}@else{\r\n<sky-empty-design-card [visibleIcon]=\"false\"\r\n [visibleQuickAction]=\"false\"\r\n [containerClass]=\"emptyStateContainerClass\"\r\n [cardBodyClass]=\"''\"\r\n [cardBodyContainerClass]=\"''\"\r\n [emptyTextClass]=\"emptyStateTextClass\"\r\n [emptyText]=\"isLoading ? ((sectionTitle | HRTranslate) + ' ' + ('IsLoading' | HRTranslate)) : ('ThereIsNoJobContractYet' | HRTranslate)\">\r\n</sky-empty-design-card>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i2$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }, { kind: "component", type: SkySectionDividerComponent, selector: "sky-section-divider", inputs: ["text", "fontAwesomeIcon", "textClass", "dividerClass", "iconClass"] }, { kind: "component", type: SkyEmptyDesignCardComponent, selector: "sky-empty-design-card", inputs: ["emptyIcon", "emptyIconClass", "emptyText", "emptyTextClass", "actionTitle", "actionIcon", "actionDisabled", "textColor", "disabledTitleClass", "activeTitleClass", "disabledIconClass", "activeIconClass", "actionClass", "containerClass", "cardBodyClass", "cardBodyContainerClass", "visibleIcon", "visibleQuickAction"], outputs: ["onActionClick"] }, { kind: "component", type: HRInfoFieldComponent, selector: "hr-info-field", inputs: ["labelKey", "value", "labelClass", "valueClass", "fallbackValue"] }] });
3043
- }
3044
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileJobInfoContractWidgetComponent, decorators: [{
3045
- type: Component,
3046
- args: [{ selector: 'hr-profile-job-info-contract-widget', standalone: true, imports: [CommonModule, HRTranslatePipe, SkySectionDividerComponent, SkyEmptyDesignCardComponent, HRInfoFieldComponent], template: "<sky-section-divider [fontAwesomeIcon]=\"contractIcon\"\r\n [text]=\"(sectionTitle | HRTranslate | uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n\r\n@if(jobInformationContract){\r\n<div [ngClass]=\"rowClass\">\r\n <div [ngClass]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'ContractType'\"\r\n [value]=\"jobInformationContract.ContractTypeName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"columnClass\">\r\n <hr-info-field [labelKey]=\"'ContractStartDate'\"\r\n [value]=\"jobInformationContract.ContractStartDate ? (jobInformationContract.ContractStartDate | date: 'dd/MM/yyyy') : null\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"responsiveTopSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'ContractEndDate'\"\r\n [value]=\"jobInformationContract.ContractEndDate ? (jobInformationContract.ContractEndDate | date: 'dd/MM/yyyy') : null\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n\r\n <div [ngClass]=\"topSpacingBottomMdSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'ContractMaritalStatus'\"\r\n [value]=\"jobInformationContract.ContractMaritalStateName\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n <div [ngClass]=\"topSpacingBottomSpacingColumnClass\">\r\n <hr-info-field [labelKey]=\"'ContractDependentsCount'\"\r\n [value]=\"jobInformationContract.ContractDependentsCount?.toString()\"\r\n [labelClass]=\"labelClass\"\r\n [valueClass]=\"valueClass\">\r\n </hr-info-field>\r\n </div>\r\n</div>\r\n}@else{\r\n<sky-empty-design-card [visibleIcon]=\"false\"\r\n [visibleQuickAction]=\"false\"\r\n [containerClass]=\"emptyStateContainerClass\"\r\n [cardBodyClass]=\"''\"\r\n [cardBodyContainerClass]=\"''\"\r\n [emptyTextClass]=\"emptyStateTextClass\"\r\n [emptyText]=\"isLoading ? ((sectionTitle | HRTranslate) + ' ' + ('IsLoading' | HRTranslate)) : ('ThereIsNoJobContractYet' | HRTranslate)\">\r\n</sky-empty-design-card>\r\n}\r\n" }]
3047
- }], ctorParameters: () => [{ type: HRSelfWidgetsService }], propDecorators: { baseUrl: [{
3048
- type: Input,
3049
- args: [{ required: true }]
3050
- }], headerIconClass: [{
3051
- type: Input
3052
- }], headerTextClass: [{
3053
- type: Input
3054
- }], headerDividerClass: [{
3055
- type: Input
3056
- }], rowClass: [{
3057
- type: Input
3058
- }], columnClass: [{
3059
- type: Input
3060
- }], responsiveTopSpacingColumnClass: [{
3061
- type: Input
3062
- }], topSpacingBottomMdSpacingColumnClass: [{
3063
- type: Input
3064
- }], topSpacingBottomSpacingColumnClass: [{
3065
- type: Input
3066
- }], labelClass: [{
3067
- type: Input
3068
- }], valueClass: [{
3069
- type: Input
3070
- }], emptyStateContainerClass: [{
3071
- type: Input
3072
- }], emptyStateTextClass: [{
3073
- type: Input
3074
- }], contractIcon: [{
3075
- type: Input
3076
- }], sectionTitle: [{
3077
- type: Input
3078
- }], isLoadingChanged: [{
3079
- type: Output
3080
- }], errorOccurred: [{
3081
- type: Output
3082
- }] } });
3083
-
3084
- class ProfileJobInfoSalaryWidgetComponent {
3085
- hrSelfWidgetsService;
3086
- commonMethodsService;
3087
- jobInformationSalary = null;
3088
- isLoading = true;
3089
- baseUrl = '';
3090
- currencyCode = '';
3091
- currencyDecimals = 2;
3092
- headerIconClass = 'primary-icon-xl';
3093
- headerTextClass = 'mt-2 field-secondary-label-lg';
3094
- headerDividerClass = 'flex-grow-1 ms-2';
3095
- rowClass = 'row mt-4';
3096
- columnClass = 'col-md-4 col-6 mt-4';
3097
- grossSalaryColumnClass = 'col-md-4 col-6 my-4';
3098
- labelClass = 'field-secondary-label-sm';
3099
- valueClass = 'fs-14 fw-medium text-ellipsis-one-line';
3100
- currencyClass = 'fs-10 text-secondary fw-light';
3101
- emptyStateContainerClass = 'd-flex flex-column justify-content-center align-items-center my-5';
3102
- emptyStateTextClass = 'field-secondary-label-md';
3103
- salaryIcon = faSackDollar;
3104
- sectionTitle = 'Salary';
3105
- isLoadingChanged = new EventEmitter();
3106
- errorOccurred = new EventEmitter();
3107
- constructor(hrSelfWidgetsService, commonMethodsService) {
3108
- this.hrSelfWidgetsService = hrSelfWidgetsService;
3109
- this.commonMethodsService = commonMethodsService;
3110
- }
3111
- ngOnInit() {
3112
- if (!this.baseUrl) {
3113
- this.isLoading = false;
3114
- return;
3115
- }
3116
- this.isLoadingChanged.emit(true);
3117
- this.hrSelfWidgetsService.getJobInformationSalary(this.baseUrl).subscribe({
3118
- next: (response) => {
3119
- this.isLoading = false;
3120
- this.jobInformationSalary = response;
3121
- this.isLoadingChanged.emit(false);
3122
- },
3123
- error: (error) => {
3124
- this.isLoading = false;
3125
- this.jobInformationSalary = null;
3126
- this.isLoadingChanged.emit(false);
3127
- this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
3128
- }
3129
- });
3130
- }
3131
- get basicSalary() {
3132
- return this.jobInformationSalary?.BasicSalary ?? this.jobInformationSalary?.CurrentBasicSalary ?? null;
3133
- }
3134
- get allowances() {
3135
- return this.jobInformationSalary?.Allowances ?? [];
3136
- }
3137
- formatAmount(value) {
3138
- if (value == null) {
3139
- return '—';
3140
- }
3141
- return this.commonMethodsService.currencyDecimalFormat(value, this.currencyDecimals) || '—';
3142
- }
3143
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileJobInfoSalaryWidgetComponent, deps: [{ token: HRSelfWidgetsService }, { token: HRCommonMethodsService }], target: i0.ɵɵFactoryTarget.Component });
3144
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: ProfileJobInfoSalaryWidgetComponent, isStandalone: true, selector: "hr-profile-job-info-salary-widget", inputs: { baseUrl: "baseUrl", currencyCode: "currencyCode", currencyDecimals: "currencyDecimals", headerIconClass: "headerIconClass", headerTextClass: "headerTextClass", headerDividerClass: "headerDividerClass", rowClass: "rowClass", columnClass: "columnClass", grossSalaryColumnClass: "grossSalaryColumnClass", labelClass: "labelClass", valueClass: "valueClass", currencyClass: "currencyClass", emptyStateContainerClass: "emptyStateContainerClass", emptyStateTextClass: "emptyStateTextClass", salaryIcon: "salaryIcon", sectionTitle: "sectionTitle" }, outputs: { isLoadingChanged: "isLoadingChanged", errorOccurred: "errorOccurred" }, ngImport: i0, template: "@if(jobInformationSalary){\r\n<sky-section-divider [fontAwesomeIcon]=\"salaryIcon\"\r\n [text]=\"(sectionTitle | HRTranslate | uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n\r\n<div [ngClass]=\"rowClass\">\r\n <div [ngClass]=\"columnClass\">\r\n <div [ngClass]=\"labelClass\">{{'BasicSalary' | HRTranslate}}</div>\r\n <div [ngClass]=\"valueClass\">{{formatAmount(basicSalary)}} <span [ngClass]=\"currencyClass\">{{currencyCode}}</span></div>\r\n </div>\r\n\r\n @for(allowance of allowances; track allowance){\r\n <div [ngClass]=\"columnClass\">\r\n <div [ngClass]=\"labelClass\">{{allowance.AllowanceName}}</div>\r\n <div [ngClass]=\"valueClass\">{{formatAmount(allowance.AllowanceAmount)}} <span [ngClass]=\"currencyClass\">{{currencyCode}}</span></div>\r\n </div>\r\n }\r\n\r\n <div [ngClass]=\"grossSalaryColumnClass\">\r\n <div [ngClass]=\"labelClass\">{{'GrossSalary' | HRTranslate}}</div>\r\n <div [ngClass]=\"valueClass\">{{formatAmount(jobInformationSalary.GrossSalary)}} <span [ngClass]=\"currencyClass\">{{currencyCode}}</span></div>\r\n </div>\r\n</div>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i2$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }, { kind: "component", type: SkySectionDividerComponent, selector: "sky-section-divider", inputs: ["text", "fontAwesomeIcon", "textClass", "dividerClass", "iconClass"] }] });
3145
- }
3146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileJobInfoSalaryWidgetComponent, decorators: [{
3147
- type: Component,
3148
- args: [{ selector: 'hr-profile-job-info-salary-widget', standalone: true, imports: [CommonModule, HRTranslatePipe, SkySectionDividerComponent], template: "@if(jobInformationSalary){\r\n<sky-section-divider [fontAwesomeIcon]=\"salaryIcon\"\r\n [text]=\"(sectionTitle | HRTranslate | uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n\r\n<div [ngClass]=\"rowClass\">\r\n <div [ngClass]=\"columnClass\">\r\n <div [ngClass]=\"labelClass\">{{'BasicSalary' | HRTranslate}}</div>\r\n <div [ngClass]=\"valueClass\">{{formatAmount(basicSalary)}} <span [ngClass]=\"currencyClass\">{{currencyCode}}</span></div>\r\n </div>\r\n\r\n @for(allowance of allowances; track allowance){\r\n <div [ngClass]=\"columnClass\">\r\n <div [ngClass]=\"labelClass\">{{allowance.AllowanceName}}</div>\r\n <div [ngClass]=\"valueClass\">{{formatAmount(allowance.AllowanceAmount)}} <span [ngClass]=\"currencyClass\">{{currencyCode}}</span></div>\r\n </div>\r\n }\r\n\r\n <div [ngClass]=\"grossSalaryColumnClass\">\r\n <div [ngClass]=\"labelClass\">{{'GrossSalary' | HRTranslate}}</div>\r\n <div [ngClass]=\"valueClass\">{{formatAmount(jobInformationSalary.GrossSalary)}} <span [ngClass]=\"currencyClass\">{{currencyCode}}</span></div>\r\n </div>\r\n</div>\r\n}\r\n" }]
3149
- }], ctorParameters: () => [{ type: HRSelfWidgetsService }, { type: HRCommonMethodsService }], propDecorators: { baseUrl: [{
3150
- type: Input,
3151
- args: [{ required: true }]
3152
- }], currencyCode: [{
3153
- type: Input
3154
- }], currencyDecimals: [{
3155
- type: Input
3156
- }], headerIconClass: [{
3157
- type: Input
3158
- }], headerTextClass: [{
3159
- type: Input
3160
- }], headerDividerClass: [{
3161
- type: Input
3162
- }], rowClass: [{
3163
- type: Input
3164
- }], columnClass: [{
3165
- type: Input
3166
- }], grossSalaryColumnClass: [{
3167
- type: Input
3168
- }], labelClass: [{
3169
- type: Input
3170
- }], valueClass: [{
3171
- type: Input
3172
- }], currencyClass: [{
3173
- type: Input
3174
- }], emptyStateContainerClass: [{
3175
- type: Input
3176
- }], emptyStateTextClass: [{
3177
- type: Input
3178
- }], salaryIcon: [{
3179
- type: Input
3180
- }], sectionTitle: [{
3181
- type: Input
3182
- }], isLoadingChanged: [{
3183
- type: Output
3184
- }], errorOccurred: [{
3185
- type: Output
3186
- }] } });
3187
-
3188
- class ProfileJobInfoServiceChargeWidgetComponent {
3189
- hrSelfWidgetsService;
3190
- commonMethodsService;
3191
- jobInformationServiceCharge = null;
3192
- isLoading = true;
3193
- baseUrl = '';
3194
- currencyCode = '';
3195
- headerIconClass = 'primary-icon-xl';
3196
- headerTextClass = 'mt-2 field-secondary-label-lg';
3197
- headerDividerClass = 'flex-grow-1 ms-2';
3198
- rowClass = 'row mt-4 mb-5';
3199
- columnClass = 'col-md-4 col-6';
3200
- labelClass = 'field-secondary-label-sm';
3201
- valueClass = 'fs-14 fw-medium text-ellipsis-one-line';
3202
- emptyStateContainerClass = 'd-flex flex-column justify-content-center align-items-center my-5';
3203
- emptyStateTextClass = 'field-secondary-label-md';
3204
- serviceChargeIcon = faEnvelopeOpenDollar;
3205
- sectionTitle = 'ServiceCharge';
3206
- isLoadingChanged = new EventEmitter();
3207
- errorOccurred = new EventEmitter();
3208
- constructor(hrSelfWidgetsService, commonMethodsService) {
3209
- this.hrSelfWidgetsService = hrSelfWidgetsService;
3210
- this.commonMethodsService = commonMethodsService;
3211
- }
3212
- ngOnInit() {
3213
- if (!this.baseUrl) {
3214
- this.isLoading = false;
3215
- return;
3216
- }
3217
- this.isLoadingChanged.emit(true);
3218
- this.hrSelfWidgetsService.getJobInformationServiceCharge(this.baseUrl).subscribe({
3219
- next: (response) => {
3220
- this.isLoading = false;
3221
- this.jobInformationServiceCharge = response;
3222
- this.isLoadingChanged.emit(false);
3223
- },
3224
- error: (error) => {
3225
- this.isLoading = false;
3226
- this.jobInformationServiceCharge = null;
3227
- this.isLoadingChanged.emit(false);
3228
- this.errorOccurred.emit(error.error.ResponseData.Errors[0].Message);
3229
- }
3230
- });
3231
- }
3232
- get modeLabelKey() {
3233
- const mode = this.jobInformationServiceCharge?.ServiceChargeEntitlementMode;
3234
- switch (ServiceChargeEntitlementMode[mode]) {
3235
- case ServiceChargeEntitlementMode.Points:
3236
- return 'Points';
3237
- case ServiceChargeEntitlementMode.SalaryRatio:
3238
- return 'SalaryRatio';
3239
- case ServiceChargeEntitlementMode.FixedAmount:
3240
- return 'FixedAmount';
3241
- case ServiceChargeEntitlementMode.FixedRate:
3242
- return 'FixedRate';
3243
- default:
3244
- return 'ServiceCharge';
3245
- }
3246
- }
3247
- get value() {
3248
- const data = this.jobInformationServiceCharge;
3249
- if (!data || data.ServiceChargeValue == null) {
3250
- return '—';
3251
- }
3252
- if (ServiceChargeEntitlementMode[data.ServiceChargeEntitlementMode] ===
3253
- ServiceChargeEntitlementMode.FixedAmount) {
3254
- return `${this.commonMethodsService.currencyDecimalFormat(data.ServiceChargeValue, 4)} (${this.currencyCode})`;
3255
- }
3256
- return this.commonMethodsService.currencyDecimalFormat(data.ServiceChargeValue, 2) || '—';
3257
- }
3258
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileJobInfoServiceChargeWidgetComponent, deps: [{ token: HRSelfWidgetsService }, { token: HRCommonMethodsService }], target: i0.ɵɵFactoryTarget.Component });
3259
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: ProfileJobInfoServiceChargeWidgetComponent, isStandalone: true, selector: "hr-profile-job-info-service-charge-widget", inputs: { baseUrl: "baseUrl", currencyCode: "currencyCode", headerIconClass: "headerIconClass", headerTextClass: "headerTextClass", headerDividerClass: "headerDividerClass", rowClass: "rowClass", columnClass: "columnClass", labelClass: "labelClass", valueClass: "valueClass", emptyStateContainerClass: "emptyStateContainerClass", emptyStateTextClass: "emptyStateTextClass", serviceChargeIcon: "serviceChargeIcon", sectionTitle: "sectionTitle" }, outputs: { isLoadingChanged: "isLoadingChanged", errorOccurred: "errorOccurred" }, ngImport: i0, template: "@if(jobInformationServiceCharge){\r\n<sky-section-divider [fontAwesomeIcon]=\"serviceChargeIcon\"\r\n [text]=\"(sectionTitle | HRTranslate | uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n\r\n<div [ngClass]=\"rowClass\">\r\n <div [ngClass]=\"columnClass\">\r\n <div [ngClass]=\"labelClass\">{{modeLabelKey | HRTranslate}}</div>\r\n <div [ngClass]=\"valueClass\">{{value}}</div>\r\n </div>\r\n</div>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i2$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: HRTranslatePipe, name: "HRTranslate" }, { kind: "component", type: SkySectionDividerComponent, selector: "sky-section-divider", inputs: ["text", "fontAwesomeIcon", "textClass", "dividerClass", "iconClass"] }] });
3260
- }
3261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: ProfileJobInfoServiceChargeWidgetComponent, decorators: [{
3262
- type: Component,
3263
- args: [{ selector: 'hr-profile-job-info-service-charge-widget', standalone: true, imports: [CommonModule, HRTranslatePipe, SkySectionDividerComponent], template: "@if(jobInformationServiceCharge){\r\n<sky-section-divider [fontAwesomeIcon]=\"serviceChargeIcon\"\r\n [text]=\"(sectionTitle | HRTranslate | uppercase)\"\r\n [iconClass]=\"headerIconClass\"\r\n [textClass]=\"headerTextClass\"\r\n [dividerClass]=\"headerDividerClass\">\r\n</sky-section-divider>\r\n\r\n<div [ngClass]=\"rowClass\">\r\n <div [ngClass]=\"columnClass\">\r\n <div [ngClass]=\"labelClass\">{{modeLabelKey | HRTranslate}}</div>\r\n <div [ngClass]=\"valueClass\">{{value}}</div>\r\n </div>\r\n</div>\r\n}\r\n" }]
3264
- }], ctorParameters: () => [{ type: HRSelfWidgetsService }, { type: HRCommonMethodsService }], propDecorators: { baseUrl: [{
3265
- type: Input,
3266
- args: [{ required: true }]
3267
- }], currencyCode: [{
3268
- type: Input
3269
- }], headerIconClass: [{
3270
- type: Input
3271
- }], headerTextClass: [{
3272
- type: Input
3273
- }], headerDividerClass: [{
3274
- type: Input
3275
- }], rowClass: [{
3276
- type: Input
3277
- }], columnClass: [{
3278
- type: Input
3279
- }], labelClass: [{
3280
- type: Input
3281
- }], valueClass: [{
3282
- type: Input
3283
- }], emptyStateContainerClass: [{
3284
- type: Input
3285
- }], emptyStateTextClass: [{
3286
- type: Input
3287
- }], serviceChargeIcon: [{
3288
- type: Input
3289
- }], sectionTitle: [{
3290
- type: Input
3291
- }], isLoadingChanged: [{
3292
- type: Output
3293
- }], errorOccurred: [{
3294
- type: Output
3295
- }] } });
3296
-
3297
2915
  class HRVacationSubordinatesPopupComponent {
3298
2916
  http;
3299
2917
  dataGrid;
@@ -3500,5 +3118,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
3500
3118
  * Generated bundle index. Do not edit.
3501
3119
  */
3502
3120
 
3503
- export { EventOption, EventTypeEnum, HRCardHeaderComponent, HRConstantsService, HREmployeeCalendarComponent, HRTranslatePipe, HRTranslateService, MainWidgetShortcut, MyCalendarWidgetComponent, MyMainDetailsWidgetComponent, MyUpcomingEventsWidgetComponent, MyVacationTeamWidgetComponent, ProfileBankInfoWidgetComponent, ProfileJobInfoContractWidgetComponent, ProfileJobInfoMainWidgetComponent, ProfileJobInfoSalaryWidgetComponent, ProfileJobInfoServiceChargeWidgetComponent, ProfilePersonalInfoAddressWidgetComponent, ProfilePersonalInfoContactWidgetComponent, ProfilePersonalInfoLanguagesWidgetComponent, ProfilePersonalInfoMainWidgetComponent, ProfilePersonalInfoOtherNationalitiesWidgetComponent, PublicHolidayWeekContext, RelativeDay, ScheduleVacationTypes, ServiceChargeEntitlementMode, VacationPopupType };
3121
+ export { EventOption, EventTypeEnum, HRCardHeaderComponent, HRConstantsService, HREmployeeCalendarComponent, HRTranslatePipe, HRTranslateService, MainWidgetShortcut, MyCalendarWidgetComponent, MyMainDetailsWidgetComponent, MyUpcomingEventsWidgetComponent, MyVacationTeamWidgetComponent, ProfilePersonalInfoAddressWidgetComponent, ProfilePersonalInfoContactWidgetComponent, ProfilePersonalInfoLanguagesWidgetComponent, ProfilePersonalInfoMainWidgetComponent, ProfilePersonalInfoOtherNationalitiesWidgetComponent, PublicHolidayWeekContext, RelativeDay, ScheduleVacationTypes, ServiceChargeEntitlementMode, VacationPopupType };
3504
3122
  //# sourceMappingURL=skysoftware-co-bayan-hr-widgets-ui.mjs.map