ngx-histaff-alpha 4.9.3 → 4.9.5
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/fesm2022/ngx-histaff-alpha.mjs +939 -102
- package/fesm2022/ngx-histaff-alpha.mjs.map +1 -1
- package/lib/app/enum/EnumDragType.d.ts +2 -1
- package/lib/app/interfaces/time-management/IAtHolidayItem.d.ts +5 -0
- package/lib/app/interfaces/time-management/IAtShiftPattern.d.ts +0 -1
- package/lib/app/interfaces/time-management/IAtShiftPatternPreview.d.ts +9 -0
- package/lib/app/libraries/core-at-pattern-card/core-at-pattern-card.component.d.ts +26 -0
- package/lib/app/libraries/core-at-pattern-collection/core-at-pattern-collection.component.d.ts +29 -0
- package/lib/app/libraries/core-date-picker/core-date-picker/core-date-picker.component.d.ts +1 -1
- package/lib/app/libraries/core-org-param/core-org-param.component.d.ts +3 -0
- package/lib/app/libraries/core-table/EnumCoreTablePipeType.d.ts +1 -0
- package/lib/app/libraries/pipes/table-cell.pipe.d.ts +1 -0
- package/lib/app/libraries/services/core-datetime.service.d.ts +5 -0
- package/lib/app/root/at-holiday/at-holiday.service.d.ts +11 -0
- package/lib/app/root/at-shift-pattern/at-shift-pattern.component.d.ts +3 -0
- package/lib/app/root/at-shift-pattern/at-shift-pattern.service.d.ts +5 -2
- package/lib/app/root/at-shift-pattern-apply/at-shift-pattern-apply.component.d.ts +92 -0
- package/lib/app/root/at-shift-pattern-apply/start-offset/start-offset.component.d.ts +12 -0
- package/lib/app/root/at-worksign/at-worksign.component.d.ts +1 -1
- package/lib/app/root/at-worksign/individual-schedule-apply/individual-schedule-apply.component.d.ts +54 -1
- package/lib/app/services/shift-pattern-dnd.service.d.ts +17 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -7,11 +7,11 @@ import * as i1$1 from '@angular/common/http';
|
|
|
7
7
|
import { HttpHeaders, HttpClient, HttpResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
8
8
|
import { last, map, tap, finalize, first, filter as filter$1, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, switchMap as switchMap$1 } from 'rxjs/operators';
|
|
9
9
|
import * as i3 from '@angular/common';
|
|
10
|
-
import { CommonModule, NgStyle, UpperCasePipe, AsyncPipe, NgIf, NgTemplateOutlet } from '@angular/common';
|
|
10
|
+
import { CommonModule, NgStyle, UpperCasePipe, AsyncPipe, LowerCasePipe, NgIf, NgTemplateOutlet } from '@angular/common';
|
|
11
11
|
import * as i4 from '@angular/forms';
|
|
12
12
|
import { NG_VALUE_ACCESSOR, FormsModule, NgControl, ReactiveFormsModule, FormControl, FormGroup, Validators, FormArray } from '@angular/forms';
|
|
13
13
|
import * as i1$2 from '@angular/router';
|
|
14
|
-
import { Router, RouterModule, NavigationStart, NavigationEnd, NavigationCancel, NavigationError, RouteConfigLoadEnd, RoutesRecognized } from '@angular/router';
|
|
14
|
+
import { Router, RouterModule, ActivatedRoute, NavigationStart, NavigationEnd, NavigationCancel, NavigationError, RouteConfigLoadEnd, RoutesRecognized } from '@angular/router';
|
|
15
15
|
import * as i1$3 from '@angular/service-worker';
|
|
16
16
|
import { HubConnectionBuilder, LogLevel } from '@microsoft/signalr';
|
|
17
17
|
import * as d3 from 'd3';
|
|
@@ -1588,6 +1588,7 @@ var EnumDragType;
|
|
|
1588
1588
|
EnumDragType["NONE"] = "NONE";
|
|
1589
1589
|
EnumDragType["WORK_SHIFT"] = "WORK_SHIFT";
|
|
1590
1590
|
EnumDragType["TABLE_COLUMN_RESIZE"] = "TABLE_COLUMN_RESIZE";
|
|
1591
|
+
EnumDragType["SHIFT_PATTERN"] = "SHIFT_PATTERN";
|
|
1591
1592
|
})(EnumDragType || (EnumDragType = {}));
|
|
1592
1593
|
|
|
1593
1594
|
var EnumErrorType;
|
|
@@ -5609,7 +5610,16 @@ const MONTHS = {
|
|
|
5609
5610
|
ua: ['Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень ', 'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень'],
|
|
5610
5611
|
};
|
|
5611
5612
|
class CoreDatetimeService {
|
|
5612
|
-
constructor() {
|
|
5613
|
+
constructor() {
|
|
5614
|
+
/*
|
|
5615
|
+
Creates a new Date object representing the current date and time in the client's local timezone.
|
|
5616
|
+
Returns the difference, in minutes, between the UTC time and the local time of the Date object.
|
|
5617
|
+
The result is:
|
|
5618
|
+
Positive: If the local timezone is behind UTC (e.g., UTC-7 returns 420).
|
|
5619
|
+
Negative: If the local timezone is ahead of UTC (e.g., UTC+7 returns -420).
|
|
5620
|
+
*/
|
|
5621
|
+
this.timeZoneOffset = (new Date()).getTimezoneOffset();
|
|
5622
|
+
}
|
|
5613
5623
|
getMonthText(lang, monthIndex) {
|
|
5614
5624
|
/*
|
|
5615
5625
|
monthIndex does not need to be in range [0-11].
|
|
@@ -7311,6 +7321,7 @@ var EnumCoreTablePipeType;
|
|
|
7311
7321
|
EnumCoreTablePipeType["TRANSLATE"] = "TRANSLATE";
|
|
7312
7322
|
EnumCoreTablePipeType["BEAUTIFUL_JSON"] = "BEAUTIFUL_JSON";
|
|
7313
7323
|
EnumCoreTablePipeType["DATE"] = "DATE";
|
|
7324
|
+
EnumCoreTablePipeType["DATE_LOCALIZED"] = "DATE_LOCALIZED";
|
|
7314
7325
|
EnumCoreTablePipeType["DATE_DDMM"] = "DATE_DDMM";
|
|
7315
7326
|
EnumCoreTablePipeType["NUMBER"] = "NUMBER";
|
|
7316
7327
|
EnumCoreTablePipeType["DECIMAL_TO_FIX_2"] = "DECIMAL_TO_FIX_2";
|
|
@@ -7367,6 +7378,15 @@ class TableCellPipe {
|
|
|
7367
7378
|
constructor(mls) {
|
|
7368
7379
|
this.mls = mls;
|
|
7369
7380
|
}
|
|
7381
|
+
getOrdinalSuffix(day) {
|
|
7382
|
+
if (day % 10 === 1 && day !== 11)
|
|
7383
|
+
return 'st';
|
|
7384
|
+
if (day % 10 === 2 && day !== 12)
|
|
7385
|
+
return 'nd';
|
|
7386
|
+
if (day % 10 === 3 && day !== 13)
|
|
7387
|
+
return 'rd';
|
|
7388
|
+
return 'th';
|
|
7389
|
+
}
|
|
7370
7390
|
transform(value, pipe, lang) {
|
|
7371
7391
|
if (value === null || value === undefined || value === '')
|
|
7372
7392
|
return value;
|
|
@@ -7377,6 +7397,7 @@ class TableCellPipe {
|
|
|
7377
7397
|
EnumCoreTablePipeType.BEAUTIFUL_JSON,
|
|
7378
7398
|
EnumCoreTablePipeType.DATE,
|
|
7379
7399
|
EnumCoreTablePipeType.DATE_DDMM,
|
|
7400
|
+
EnumCoreTablePipeType.DATE_LOCALIZED,
|
|
7380
7401
|
EnumCoreTablePipeType.NUMBER,
|
|
7381
7402
|
EnumCoreTablePipeType.DATE_TIME,
|
|
7382
7403
|
EnumCoreTablePipeType.TIME_HHMM,
|
|
@@ -7519,6 +7540,25 @@ class TableCellPipe {
|
|
|
7519
7540
|
else {
|
|
7520
7541
|
return value;
|
|
7521
7542
|
}
|
|
7543
|
+
case EnumCoreTablePipeType.DATE_LOCALIZED:
|
|
7544
|
+
// Define formats for languages
|
|
7545
|
+
const dateFormatOptions = { weekday: 'long', year: 'numeric', month: '2-digit', day: '2-digit' };
|
|
7546
|
+
if (lang === 'vi') {
|
|
7547
|
+
// Format date for 'vi' language
|
|
7548
|
+
return new Intl.DateTimeFormat('vi-VN', dateFormatOptions).format(value);
|
|
7549
|
+
}
|
|
7550
|
+
else if (lang === 'en') {
|
|
7551
|
+
// Custom format for English
|
|
7552
|
+
const day = value.getDate();
|
|
7553
|
+
const month = value.toLocaleString('en-US', { month: 'short' }); // Get short month name
|
|
7554
|
+
const year = value.getFullYear();
|
|
7555
|
+
const weekday = value.toLocaleString('en-US', { weekday: 'long' }); // Get full weekday name
|
|
7556
|
+
const ordinal = this.getOrdinalSuffix(day); // Append ordinal suffix to the day
|
|
7557
|
+
return `${weekday}, ${month} the ${day}${ordinal}, ${year}`;
|
|
7558
|
+
}
|
|
7559
|
+
else {
|
|
7560
|
+
return value.toISOString(); // Fallback for unsupported languages
|
|
7561
|
+
}
|
|
7522
7562
|
case EnumCoreTablePipeType.BOOLEAN_TO_TRUE_FALSE:
|
|
7523
7563
|
return !!value ?
|
|
7524
7564
|
this.mls.trans(EnumTranslateKey.UI_COMMON_BOOLEAN_TO_TRUE, lang) :
|
|
@@ -12616,6 +12656,7 @@ class CoreDatePickerComponent extends CoreFormControlBaseComponent {
|
|
|
12616
12656
|
console.log("UTC input ", input);
|
|
12617
12657
|
let obj = new Date();
|
|
12618
12658
|
if (input === null) {
|
|
12659
|
+
this.value = null;
|
|
12619
12660
|
this.textValue = '';
|
|
12620
12661
|
return;
|
|
12621
12662
|
}
|
|
@@ -12627,7 +12668,7 @@ class CoreDatePickerComponent extends CoreFormControlBaseComponent {
|
|
|
12627
12668
|
obj = new Date(new Date(input).setHours(0, 0, 0, 0));
|
|
12628
12669
|
}
|
|
12629
12670
|
}
|
|
12630
|
-
else if (input !== null && typeof (input
|
|
12671
|
+
else if (input !== null && typeof (input?.getFullYear) === "function") {
|
|
12631
12672
|
obj = input;
|
|
12632
12673
|
}
|
|
12633
12674
|
else {
|
|
@@ -19542,7 +19583,6 @@ class CoreShiftCellComponent extends CoreFormControlBaseComponent {
|
|
|
19542
19583
|
cleanUpSubsequentSubscriptions() {
|
|
19543
19584
|
this.dndEventSubscriptions.dragover?.unsubscribe();
|
|
19544
19585
|
this.dndEventSubscriptions.drop?.unsubscribe();
|
|
19545
|
-
//this.dndEventSubscriptions.dragleave?.unsubscribe();
|
|
19546
19586
|
}
|
|
19547
19587
|
ngAfterViewInit() {
|
|
19548
19588
|
setTimeout(() => {
|
|
@@ -19707,7 +19747,7 @@ class CoreShiftCellComponent extends CoreFormControlBaseComponent {
|
|
|
19707
19747
|
multi: true,
|
|
19708
19748
|
useExisting: CoreShiftCellComponent
|
|
19709
19749
|
}
|
|
19710
|
-
], viewQueries: [{ propertyName: "$container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "$firstAddWrapper", first: true, predicate: ["firstAddWrapper"], descendants: true, isSignal: true }, { propertyName: "$shiftStickers", predicate: ["shiftSticker"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #container class=\"core-shift-cell-container\">\r\n @for (shift$ of shifts$$!; track $index) {\r\n <div #shiftSticker>\r\n <core-shift-sticker [shift$]=\"shift$\" [$shiftCellId]=\"shiftCellId\" [$width]=\"228\"\r\n [parentShifts$]=\"shifts$\" [$readOnly]=\"$readOnly()\"></core-shift-sticker>\r\n </div>\r\n }\r\n\r\n @if (!value?.length) {\r\n @if (!$hideStarterPlusSign()) {\r\n <div #firstAddWrapper class=\"first-add-wrapper\" (click)=\"onAdd($event)\">\r\n <div class=\"icon-wrapper\" [class.hidden]=\"$readOnly()\">\r\n <i class=\"feather-plus\"></i>\r\n </div>\r\n </div>\r\n } @else {\r\n <div #firstAddWrapper class=\"first-add-wrapper\">\r\n {{ 'DROP_A_SHIFT_HERE' | translate: lang }}\r\n </div>\r\n }\r\n }\r\n\r\n\r\n\r\n</div>", styles: [".core-shift-cell-container{--first-add-height: 36.59px;--first-add-width: 228px;--first-add-border: 1px solid #E6EBED;--first-add-opacity: 1;--first-add-icon-width: 15px;--first-add-icon-height: 15px;--first-add-icon-border-radius: 50%;--first-add-icon-color: white;--first-add-icon-background-color: #3DC65A;--first-add-color: gray;padding:15px;background-color:transparent;animation:fadeIn .2s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.core-shift-cell-container .first-add-wrapper{display:flex;align-items:center;justify-content:center;height:var(--first-add-height);box-sizing:border-box;min-width:105px;max-width:228px;opacity:var(--first-add-opacity);border:var(--first-add-border)
|
|
19750
|
+
], viewQueries: [{ propertyName: "$container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "$firstAddWrapper", first: true, predicate: ["firstAddWrapper"], descendants: true, isSignal: true }, { propertyName: "$shiftStickers", predicate: ["shiftSticker"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #container class=\"core-shift-cell-container\">\r\n @for (shift$ of shifts$$!; track $index) {\r\n <div #shiftSticker>\r\n <core-shift-sticker [shift$]=\"shift$\" [$shiftCellId]=\"shiftCellId\" [$width]=\"228\"\r\n [parentShifts$]=\"shifts$\" [$readOnly]=\"$readOnly()\"></core-shift-sticker>\r\n </div>\r\n }\r\n\r\n @if (!value?.length) {\r\n @if (!$hideStarterPlusSign()) {\r\n <div #firstAddWrapper class=\"first-add-wrapper\" (click)=\"onAdd($event)\" [class.pointer]=\"!$readOnly()\">\r\n <div class=\"icon-wrapper\" [class.hidden]=\"$readOnly()\">\r\n <i class=\"feather-plus\"></i>\r\n </div>\r\n </div>\r\n } @else {\r\n <div #firstAddWrapper class=\"first-add-wrapper\">\r\n {{ 'DROP_A_SHIFT_HERE' | translate: lang }}\r\n </div>\r\n }\r\n }\r\n\r\n\r\n\r\n</div>", styles: [".core-shift-cell-container{--first-add-height: 36.59px;--first-add-width: 228px;--first-add-border: 1px solid #E6EBED;--first-add-opacity: 1;--first-add-icon-width: 15px;--first-add-icon-height: 15px;--first-add-icon-border-radius: 50%;--first-add-icon-color: white;--first-add-icon-background-color: #3DC65A;--first-add-color: gray;padding:15px;background-color:transparent;animation:fadeIn .2s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.core-shift-cell-container .first-add-wrapper{display:flex;align-items:center;justify-content:center;height:var(--first-add-height);box-sizing:border-box;min-width:105px;max-width:228px;opacity:var(--first-add-opacity);border:var(--first-add-border)}.core-shift-cell-container .first-add-wrapper .icon-wrapper{width:var(--first-add-icon-width);height:var(--first-add-icon-height);color:var(--first-add-icon-color);background-color:var(--first-add-icon-background-color);border-radius:var(--first-add-icon-border-radius)}.core-shift-cell-container .first-add-wrapper .icon-wrapper.hidden{display:none}.core-shift-cell-container .pointer{cursor:pointer}.core-shift-cell-container.valid-drop{background-color:#dff6dd}.core-shift-cell-container.invalid-drop{background-color:#f08080}\n"], dependencies: [{ kind: "component", type: CoreShiftStickerComponent, selector: "core-shift-sticker", inputs: ["shift$", "parentShifts$", "$readOnly", "$hideSymbolLine", "$shiftCellId", "checked", "$height", "$width"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
19711
19751
|
}
|
|
19712
19752
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreShiftCellComponent, decorators: [{
|
|
19713
19753
|
type: Component,
|
|
@@ -19720,7 +19760,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
19720
19760
|
multi: true,
|
|
19721
19761
|
useExisting: CoreShiftCellComponent
|
|
19722
19762
|
}
|
|
19723
|
-
], template: "<div #container class=\"core-shift-cell-container\">\r\n @for (shift$ of shifts$$!; track $index) {\r\n <div #shiftSticker>\r\n <core-shift-sticker [shift$]=\"shift$\" [$shiftCellId]=\"shiftCellId\" [$width]=\"228\"\r\n [parentShifts$]=\"shifts$\" [$readOnly]=\"$readOnly()\"></core-shift-sticker>\r\n </div>\r\n }\r\n\r\n @if (!value?.length) {\r\n @if (!$hideStarterPlusSign()) {\r\n <div #firstAddWrapper class=\"first-add-wrapper\" (click)=\"onAdd($event)\">\r\n <div class=\"icon-wrapper\" [class.hidden]=\"$readOnly()\">\r\n <i class=\"feather-plus\"></i>\r\n </div>\r\n </div>\r\n } @else {\r\n <div #firstAddWrapper class=\"first-add-wrapper\">\r\n {{ 'DROP_A_SHIFT_HERE' | translate: lang }}\r\n </div>\r\n }\r\n }\r\n\r\n\r\n\r\n</div>", styles: [".core-shift-cell-container{--first-add-height: 36.59px;--first-add-width: 228px;--first-add-border: 1px solid #E6EBED;--first-add-opacity: 1;--first-add-icon-width: 15px;--first-add-icon-height: 15px;--first-add-icon-border-radius: 50%;--first-add-icon-color: white;--first-add-icon-background-color: #3DC65A;--first-add-color: gray;padding:15px;background-color:transparent;animation:fadeIn .2s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.core-shift-cell-container .first-add-wrapper{display:flex;align-items:center;justify-content:center;height:var(--first-add-height);box-sizing:border-box;min-width:105px;max-width:228px;opacity:var(--first-add-opacity);border:var(--first-add-border)
|
|
19763
|
+
], template: "<div #container class=\"core-shift-cell-container\">\r\n @for (shift$ of shifts$$!; track $index) {\r\n <div #shiftSticker>\r\n <core-shift-sticker [shift$]=\"shift$\" [$shiftCellId]=\"shiftCellId\" [$width]=\"228\"\r\n [parentShifts$]=\"shifts$\" [$readOnly]=\"$readOnly()\"></core-shift-sticker>\r\n </div>\r\n }\r\n\r\n @if (!value?.length) {\r\n @if (!$hideStarterPlusSign()) {\r\n <div #firstAddWrapper class=\"first-add-wrapper\" (click)=\"onAdd($event)\" [class.pointer]=\"!$readOnly()\">\r\n <div class=\"icon-wrapper\" [class.hidden]=\"$readOnly()\">\r\n <i class=\"feather-plus\"></i>\r\n </div>\r\n </div>\r\n } @else {\r\n <div #firstAddWrapper class=\"first-add-wrapper\">\r\n {{ 'DROP_A_SHIFT_HERE' | translate: lang }}\r\n </div>\r\n }\r\n }\r\n\r\n\r\n\r\n</div>", styles: [".core-shift-cell-container{--first-add-height: 36.59px;--first-add-width: 228px;--first-add-border: 1px solid #E6EBED;--first-add-opacity: 1;--first-add-icon-width: 15px;--first-add-icon-height: 15px;--first-add-icon-border-radius: 50%;--first-add-icon-color: white;--first-add-icon-background-color: #3DC65A;--first-add-color: gray;padding:15px;background-color:transparent;animation:fadeIn .2s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.core-shift-cell-container .first-add-wrapper{display:flex;align-items:center;justify-content:center;height:var(--first-add-height);box-sizing:border-box;min-width:105px;max-width:228px;opacity:var(--first-add-opacity);border:var(--first-add-border)}.core-shift-cell-container .first-add-wrapper .icon-wrapper{width:var(--first-add-icon-width);height:var(--first-add-icon-height);color:var(--first-add-icon-color);background-color:var(--first-add-icon-background-color);border-radius:var(--first-add-icon-border-radius)}.core-shift-cell-container .first-add-wrapper .icon-wrapper.hidden{display:none}.core-shift-cell-container .pointer{cursor:pointer}.core-shift-cell-container.valid-drop{background-color:#dff6dd}.core-shift-cell-container.invalid-drop{background-color:#f08080}\n"] }]
|
|
19724
19764
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: WorkShiftDndService }, { type: DialogService }, { type: MultiLanguageService }, { type: DndService }] });
|
|
19725
19765
|
|
|
19726
19766
|
class CoreControlComponent extends BaseComponent {
|
|
@@ -20627,10 +20667,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
20627
20667
|
}], ctorParameters: () => [{ type: DialogService }] });
|
|
20628
20668
|
|
|
20629
20669
|
class AtShiftPatternService {
|
|
20630
|
-
constructor() {
|
|
20670
|
+
constructor(appService) {
|
|
20671
|
+
this.appService = appService;
|
|
20631
20672
|
this.activePattern$ = new BehaviorSubject(undefined);
|
|
20632
20673
|
}
|
|
20633
|
-
|
|
20674
|
+
loadItem(id) {
|
|
20675
|
+
return this.appService.get('/api/AtShiftPattern/GetByIdWithDetails?id=' + id);
|
|
20676
|
+
}
|
|
20677
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtShiftPatternService, deps: [{ token: AppService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
20634
20678
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtShiftPatternService, providedIn: 'root' }); }
|
|
20635
20679
|
}
|
|
20636
20680
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtShiftPatternService, decorators: [{
|
|
@@ -20638,7 +20682,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
20638
20682
|
args: [{
|
|
20639
20683
|
providedIn: 'root'
|
|
20640
20684
|
}]
|
|
20641
|
-
}], ctorParameters: () => [] });
|
|
20685
|
+
}], ctorParameters: () => [{ type: AppService }] });
|
|
20642
20686
|
|
|
20643
20687
|
class AtShiftPatternEditComponent extends BaseEditComponent {
|
|
20644
20688
|
constructor(dialogService, appService, atShiftPatternService, corePageListService, corePageEditService, coreFormService) {
|
|
@@ -20869,8 +20913,8 @@ class AtShiftPatternDetailComponent extends BaseComponent {
|
|
|
20869
20913
|
return;
|
|
20870
20914
|
const currentData = this.data$.value;
|
|
20871
20915
|
let cellObj = currentData.shiftDetails;
|
|
20872
|
-
if (cellObj.length <=
|
|
20873
|
-
this.alertService.error(this.mls.trans('
|
|
20916
|
+
if (cellObj.length <= 1) {
|
|
20917
|
+
this.alertService.error(this.mls.trans('AT_WORKSIGN_PATTERN_MUST_HAVE_AT_LEAST_1_DAY_IN_DETAIL'), alertOptions);
|
|
20874
20918
|
return;
|
|
20875
20919
|
}
|
|
20876
20920
|
const theFirstPart = cellObj.filter(x => x.dayNumber <= dayNumber);
|
|
@@ -20912,6 +20956,8 @@ class AtShiftPatternComponent extends BaseEditComponent {
|
|
|
20912
20956
|
this.atShiftPatternService = inject(AtShiftPatternService);
|
|
20913
20957
|
this.appService = inject(AppService);
|
|
20914
20958
|
this.coreButtonGroupService = inject(CoreButtonGroupService);
|
|
20959
|
+
this.router = inject(Router);
|
|
20960
|
+
this.route = inject(ActivatedRoute);
|
|
20915
20961
|
this.subscriptions = [];
|
|
20916
20962
|
this.rowClick$ = new BehaviorSubject(0);
|
|
20917
20963
|
this.title = "UI_COMPONENT_TITLE_AT_SHIFT_PATTERN";
|
|
@@ -20996,7 +21042,6 @@ class AtShiftPatternComponent extends BaseEditComponent {
|
|
|
20996
21042
|
});
|
|
20997
21043
|
}
|
|
20998
21044
|
onCorePageHeaderButtonClick(e) {
|
|
20999
|
-
console.log("onCorePageHeaderButtonClick", e);
|
|
21000
21045
|
switch (e.code) {
|
|
21001
21046
|
case EnumCoreButtonVNSCode.HEADER_SAVE:
|
|
21002
21047
|
this.loading = true;
|
|
@@ -21007,6 +21052,9 @@ class AtShiftPatternComponent extends BaseEditComponent {
|
|
|
21007
21052
|
}
|
|
21008
21053
|
}));
|
|
21009
21054
|
break;
|
|
21055
|
+
case EnumCoreButtonVNSCode.HEADER_INDIVIDUAL_SCHEDULE_APPLY:
|
|
21056
|
+
this.router.navigate(['apply'], { relativeTo: this.route });
|
|
21057
|
+
break;
|
|
21010
21058
|
default:
|
|
21011
21059
|
break;
|
|
21012
21060
|
}
|
|
@@ -21016,7 +21064,7 @@ class AtShiftPatternComponent extends BaseEditComponent {
|
|
|
21016
21064
|
}
|
|
21017
21065
|
loadItem() {
|
|
21018
21066
|
this.loading = true;
|
|
21019
|
-
this.subscriptions.push(this.
|
|
21067
|
+
this.subscriptions.push(this.atShiftPatternService.loadItem(this.rowClick$.value).subscribe(x => {
|
|
21020
21068
|
this.loading = false;
|
|
21021
21069
|
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21022
21070
|
this.formInitStringValue = JSON.stringify(x.body?.innerBody);
|
|
@@ -21065,6 +21113,671 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
21065
21113
|
], template: "<div class=\"core-at-shift-pattern-container\">\r\n\r\n <!-- <core-page-header [title]=\"title\" (buttonClick)=\"onCorePageHeaderButtonClick($event)\"></core-page-header> -->\r\n\r\n <div class=\"d-flex d-flex-between content-wrapper\">\r\n <div class=\"list-block\">\r\n <core-page-list [apiDefinition]=\"apiDefinition\" [columns]=\"columns\" [editRoute]=\"editRoute\" [crud]=\"crud\"\r\n [title]=\"title\" [autoResizeWithWindow]=\"true\" [checkboxExplicity]=\"true\"\r\n (listChange)=\"onListChange($event)\"\r\n (corePageHeaderButtonClick)=\"onCorePageHeaderButtonClick($event)\"\r\n (onInstanceCreated)=\"onInstanceCreated($event)\" (rowClick)=\"rowClick($event)\"></core-page-list>\r\n </div>\r\n\r\n @if (!(atShiftPatternService.activePattern$ | async)) {\r\n <div class=\"anim-block\">\r\n <div class=\"alert is-success\">\r\n <p class=\"alert-title\"><span class=\"ti-light-bulb\" aria-hidden=\"true\"></span>\r\n @if (lang === 'vi') {\r\n G\u1EE2I \u00DD\r\n } @else {\r\n TIP\r\n }\r\n \r\n </p>\r\n\r\n <div>\r\n @if (lang === 'vi') {\r\n M\u1EABu x\u1EBFp ca l\u00E0 c\u00F4ng c\u1EE5 tr\u1EF1c quan v\u00E0 ti\u1EC7n l\u1EE3i gi\u00FAp ph\u00F2ng nh\u00E2n s\u1EF1 (HR) qu\u1EA3n l\u00FD v\u00E0 b\u1ED1 tr\u00ED ca l\u00E0m vi\u1EC7c\r\n cho nh\u00E2n vi\u00EAn m\u1ED9t c\u00E1ch hi\u1EC7u qu\u1EA3. M\u00E0n h\u00ECnh n\u00E0y \u0111\u01B0\u1EE3c thi\u1EBFt k\u1EBF \u0111\u1EC3 \u0111\u00E1p \u1EE9ng nhu c\u1EA7u l\u1EADp k\u1EBF ho\u1EA1ch c\u00F4ng\r\n vi\u1EC7c h\u00E0ng ng\u00E0y, h\u00E0ng tu\u1EA7n ho\u1EB7c theo chu k\u1EF3 c\u1EE5 th\u1EC3, \u0111\u1EA3m b\u1EA3o t\u00EDnh linh ho\u1EA1t v\u00E0 s\u1EF1 d\u1EC5 d\u00E0ng trong qu\u1EA3n\r\n l\u00FD.\r\n\r\n <p></p>\r\n <div class=\"square-before\">\r\n <b style='color: gray;'>X\u1EBFp ca theo m\u1EABu tu\u1EA7n (WEEK)</b>:\r\n Cho ph\u00E9p HR b\u1ED1 tr\u00ED ca l\u00E0m vi\u1EC7c d\u1EF1a tr\u00EAn c\u00E1c th\u1EE9 trong tu\u1EA7n, v\u00ED d\u1EE5: th\u1EE9 Hai, th\u1EE9 Ba, v.v. Ph\u00F9 h\u1EE3p\r\n cho\r\n nh\u1EEFng chu k\u1EF3 l\u00E0m vi\u1EC7c l\u1EB7p l\u1EA1i \u0111\u1ECBnh k\u1EF3 (v\u00ED d\u1EE5: l\u1ECBch l\u00E0m vi\u1EC7c tu\u1EA7n).\r\n </div>\r\n\r\n <p></p>\r\n <div class=\"square-before\">\r\n <b style='color: gray;'>X\u1EBFp ca theo chu\u1ED7i ng\u00E0y (DAYS)</b>:\r\n D\u00E0nh cho c\u00E1c tr\u01B0\u1EDDng h\u1EE3p x\u1EBFp ca kh\u00F4ng c\u1ED1 \u0111\u1ECBnh theo th\u1EE9 trong tu\u1EA7n m\u00E0 d\u1EF1a tr\u00EAn m\u1ED9t chu\u1ED7i ng\u00E0y li\u00EAn\r\n t\u1EE5c. HR c\u00F3 th\u1EC3 ch\u1EC9 \u0111\u1ECBnh b\u1EAFt \u0111\u1EA7u t\u1EEB ng\u00E0y b\u1EA5t k\u1EF3 v\u00E0 thi\u1EBFt l\u1EADp c\u00E1c ca l\u00E0m vi\u1EC7c t\u01B0\u01A1ng \u1EE9ng.\r\n </div>\r\n\r\n <p></p>\r\n <div class=\"square-before\">\r\n \u1EA4n F1 \u0111\u1EC3 c\u00F3 th\u00EAm chi ti\u1EBFt\r\n </div>\r\n } @else {\r\n Shift Scheduling Template is an intuitive and convenient tool to help HR departments effectively\r\n manage\r\n and assign work shifts for employees. This screen is designed to meet the needs of daily, weekly, or\r\n specific cycle-based work planning, ensuring flexibility and ease of management.\r\n\r\n <p></p>\r\n <div class=\"square-before\">\r\n <b style='color: gray;'>Schedule shifts by weekly pattern (WEEK)</b>:\r\n Allows HR to assign work shifts based on days of the week, e.g., Monday, Tuesday, etc. This is\r\n suitable for recurring work cycles (e.g., weekly schedules).\r\n </div>\r\n\r\n <p></p>\r\n <div class=\"square-before\">\r\n <b style='color: gray;'>Schedule shifts by sequence of days (DAYS)</b>:\r\n Designed for cases where shifts are assigned based on a continuous sequence of days rather than\r\n specific days of the week. HR can specify any start date and set up corresponding work shifts.\r\n </div>\r\n\r\n <p></p>\r\n <div class=\"square-before\">\r\n Press F1 for more details\r\n </div>\r\n }\r\n </div>\r\n\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (!!(atShiftPatternService.activePattern$ | async)) {\r\n <div class=\"detail-block\">\r\n <div class=\"details-wrapper\">\r\n <div class=\"details-title\">\r\n \u2728 {{ (atShiftPatternService.activePattern$ | async)?.code }}\r\n </div>\r\n <core-at-shift-pattern-detail\r\n [data$]=\"atShiftPatternService.activePattern$\" (onCellChange)=\"onCellChange($event)\"></core-at-shift-pattern-detail>\r\n </div>\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n\r\n @if (!!loading) {\r\n <app-fullscreen-modal-loader></app-fullscreen-modal-loader>\r\n }\r\n\r\n</div>", styles: [".core-at-shift-pattern-container .list-block{width:50vw}.core-at-shift-pattern-container .anim-container{height:calc(100vh - 60px);display:flex;align-items:flex-start;justify-content:flex-end}.core-at-shift-pattern-container .anim-block,.core-at-shift-pattern-container .detail-block{margin-left:15px;padding-top:50px;display:flex}.core-at-shift-pattern-container .anim-block{width:100%;flex-direction:column;align-items:center;justify-content:space-around}.core-at-shift-pattern-container .detail-block{width:100%;align-items:flex-start;justify-content:center}.core-at-shift-pattern-container .details-wrapper{background-color:bisque;padding:0 15px 15px;width:100%;overflow-x:scroll}.core-at-shift-pattern-container .details-wrapper .details-title{height:40px;display:flex;align-items:center;justify-content:flex-start;font-weight:700}.core-at-shift-pattern-container .details-wrapper .col-md-4{min-width:280px}.core-at-shift-pattern-container .content-wrapper{align-items:flex-start}\n"] }]
|
|
21066
21114
|
}] });
|
|
21067
21115
|
|
|
21116
|
+
class ShiftPatternDndService {
|
|
21117
|
+
constructor() {
|
|
21118
|
+
this.draggingData$ = new BehaviorSubject('');
|
|
21119
|
+
this.draggingPattern$ = new BehaviorSubject(undefined);
|
|
21120
|
+
this.draggingFromCellId$ = new BehaviorSubject('');
|
|
21121
|
+
this.dragoverCellId$ = new BehaviorSubject('');
|
|
21122
|
+
this.collectionStarterX$ = new BehaviorSubject(0);
|
|
21123
|
+
this.collectionResetTransform$ = new BehaviorSubject(false);
|
|
21124
|
+
this.patternCollectionOpen$ = new BehaviorSubject(false);
|
|
21125
|
+
this.mls = inject(MultiLanguageService);
|
|
21126
|
+
}
|
|
21127
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ShiftPatternDndService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21128
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ShiftPatternDndService, providedIn: 'root' }); }
|
|
21129
|
+
}
|
|
21130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ShiftPatternDndService, decorators: [{
|
|
21131
|
+
type: Injectable,
|
|
21132
|
+
args: [{
|
|
21133
|
+
providedIn: 'root'
|
|
21134
|
+
}]
|
|
21135
|
+
}], ctorParameters: () => [] });
|
|
21136
|
+
|
|
21137
|
+
class CoreAtPatternCardComponent extends CoreFormControlBaseComponent {
|
|
21138
|
+
constructor() {
|
|
21139
|
+
super(...arguments);
|
|
21140
|
+
this.$container = viewChild('container');
|
|
21141
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
21142
|
+
this.shiftPatternDndService = inject(ShiftPatternDndService);
|
|
21143
|
+
this.dndService = inject(DndService);
|
|
21144
|
+
this.mls = inject(MultiLanguageService);
|
|
21145
|
+
}
|
|
21146
|
+
writeValue(obj) {
|
|
21147
|
+
this.value = obj;
|
|
21148
|
+
this.code = obj?.code;
|
|
21149
|
+
this.name = obj?.name;
|
|
21150
|
+
this.patternType = obj?.patternType;
|
|
21151
|
+
this.rotationDays = obj?.rotationDays;
|
|
21152
|
+
}
|
|
21153
|
+
ngOnInit() {
|
|
21154
|
+
this.mls.lang$.subscribe(x => this.lang = x);
|
|
21155
|
+
}
|
|
21156
|
+
ngAfterViewInit() {
|
|
21157
|
+
setTimeout(() => {
|
|
21158
|
+
fromEvent(this.$container()?.nativeElement, 'dragstart')
|
|
21159
|
+
.subscribe((ev) => {
|
|
21160
|
+
this.dndService.dragType = EnumDragType.SHIFT_PATTERN;
|
|
21161
|
+
ev.dataTransfer.setData("text/plain", `${this.value.code}`);
|
|
21162
|
+
this.shiftPatternDndService.draggingData$.next(ev.dataTransfer.getData("text/plain"));
|
|
21163
|
+
this.shiftPatternDndService.draggingPattern$.next(this.value);
|
|
21164
|
+
this.shiftPatternDndService.draggingFromCellId$.next('');
|
|
21165
|
+
});
|
|
21166
|
+
fromEvent(this.$container()?.nativeElement, 'drag')
|
|
21167
|
+
.pipe(debounceTime(200))
|
|
21168
|
+
.subscribe((ev) => {
|
|
21169
|
+
console.log("drag");
|
|
21170
|
+
});
|
|
21171
|
+
fromEvent(this.$container()?.nativeElement, 'dragend')
|
|
21172
|
+
.subscribe((ev) => {
|
|
21173
|
+
console.log("dragend");
|
|
21174
|
+
// According to the HTML5 Drag and Drop API,
|
|
21175
|
+
// dataTransfer is cleared or reset at the end of the drag operation.
|
|
21176
|
+
// This means that the data you set in dragstart is no longer available in dragend.
|
|
21177
|
+
this.shiftPatternDndService.draggingData$.next('');
|
|
21178
|
+
this.shiftPatternDndService.draggingPattern$.next(undefined);
|
|
21179
|
+
this.shiftPatternDndService.draggingFromCellId$.next('');
|
|
21180
|
+
});
|
|
21181
|
+
});
|
|
21182
|
+
}
|
|
21183
|
+
ngOnDestroy() {
|
|
21184
|
+
//
|
|
21185
|
+
}
|
|
21186
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreAtPatternCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
21187
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoreAtPatternCardComponent, isStandalone: true, selector: "core-at-pattern-card", providers: [
|
|
21188
|
+
{
|
|
21189
|
+
provide: NG_VALUE_ACCESSOR,
|
|
21190
|
+
multi: true,
|
|
21191
|
+
useExisting: CoreAtPatternCardComponent
|
|
21192
|
+
}
|
|
21193
|
+
], viewQueries: [{ propertyName: "$container", first: true, predicate: ["container"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #container class=\"core-at-shift-pattern-card-container\" draggable=\"true\">\r\n <div #shiftDetails class=\"pattern-details p-relative\">\r\n <div class=\"ellipsis p-relative\" [appTooltip]=\"name\">\r\n @if (patternType == 'WEEK') {\r\n <i class=\"feather-calendar\"></i>\r\n } @else {\r\n <i class=\"feather-layers\"></i>\r\n }\r\n {{ code }} <span> \u2022 </span> {{ rotationDays }} {{ ('UI_COMMON_DAY' | translate : lang | lowercase) }}\r\n </div>\r\n </div>\r\n</div>", styles: [".core-at-shift-pattern-card-container{background-color:#358ccb;width:200px;padding:15px;color:#fff;cursor:move}\n"], dependencies: [{ kind: "pipe", type: LowerCasePipe, name: "lowercase" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TooltipDirective, selector: "[appTooltip]", inputs: ["color", "backgroundColor", "appTooltip", "showAnyway", "position"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21194
|
+
}
|
|
21195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreAtPatternCardComponent, decorators: [{
|
|
21196
|
+
type: Component,
|
|
21197
|
+
args: [{ selector: 'core-at-pattern-card', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
21198
|
+
LowerCasePipe,
|
|
21199
|
+
TableCellPipe,
|
|
21200
|
+
CommonModule,
|
|
21201
|
+
TooltipDirective,
|
|
21202
|
+
TranslatePipe
|
|
21203
|
+
], providers: [
|
|
21204
|
+
{
|
|
21205
|
+
provide: NG_VALUE_ACCESSOR,
|
|
21206
|
+
multi: true,
|
|
21207
|
+
useExisting: CoreAtPatternCardComponent
|
|
21208
|
+
}
|
|
21209
|
+
], template: "<div #container class=\"core-at-shift-pattern-card-container\" draggable=\"true\">\r\n <div #shiftDetails class=\"pattern-details p-relative\">\r\n <div class=\"ellipsis p-relative\" [appTooltip]=\"name\">\r\n @if (patternType == 'WEEK') {\r\n <i class=\"feather-calendar\"></i>\r\n } @else {\r\n <i class=\"feather-layers\"></i>\r\n }\r\n {{ code }} <span> \u2022 </span> {{ rotationDays }} {{ ('UI_COMMON_DAY' | translate : lang | lowercase) }}\r\n </div>\r\n </div>\r\n</div>", styles: [".core-at-shift-pattern-card-container{background-color:#358ccb;width:200px;padding:15px;color:#fff;cursor:move}\n"] }]
|
|
21210
|
+
}] });
|
|
21211
|
+
|
|
21212
|
+
class CoreAtPatternCollectionComponent extends BaseComponent {
|
|
21213
|
+
constructor() {
|
|
21214
|
+
super(...arguments);
|
|
21215
|
+
this.domService = inject(DomService);
|
|
21216
|
+
this.appService = inject(AppService);
|
|
21217
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
21218
|
+
this.shiftPatternDndService = inject(ShiftPatternDndService);
|
|
21219
|
+
this.fullPatterns = [];
|
|
21220
|
+
this.filteredPatterns = [];
|
|
21221
|
+
this.searchHeight = 65;
|
|
21222
|
+
this.itemHeight = 69;
|
|
21223
|
+
this.keyword = '';
|
|
21224
|
+
}
|
|
21225
|
+
ngAfterViewInit() {
|
|
21226
|
+
setTimeout(() => {
|
|
21227
|
+
if (!!this.relativeMode) {
|
|
21228
|
+
this.container.nativeElement.style.setProperty('position', 'relative');
|
|
21229
|
+
this.container.nativeElement.style.setProperty('box-shadow', 'none');
|
|
21230
|
+
this.container.nativeElement.style.setProperty('z-index', 0);
|
|
21231
|
+
}
|
|
21232
|
+
this.subscriptions.push(this.appService.get('/api/AtShiftPattern/GetAllActive').subscribe(x => {
|
|
21233
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21234
|
+
this.fullPatterns = x.body.innerBody;
|
|
21235
|
+
this.filteredPatterns = x.body.innerBody;
|
|
21236
|
+
}
|
|
21237
|
+
}));
|
|
21238
|
+
this.subscriptions.push(this.mls.lang$.subscribe(x => {
|
|
21239
|
+
this.lang = x;
|
|
21240
|
+
}));
|
|
21241
|
+
this.subscriptions.push(this.shiftPatternDndService.collectionStarterX$.subscribe(x => {
|
|
21242
|
+
this.container.nativeElement.style.setProperty('--starter-x', x + 'px');
|
|
21243
|
+
}));
|
|
21244
|
+
this.subscriptions.push(this.shiftPatternDndService.collectionResetTransform$.subscribe(_ => {
|
|
21245
|
+
this.container.nativeElement.style.removeProperty('transform');
|
|
21246
|
+
}));
|
|
21247
|
+
let offset = {
|
|
21248
|
+
dx: 0,
|
|
21249
|
+
dy: 0,
|
|
21250
|
+
};
|
|
21251
|
+
const containerElement = this.container.nativeElement;
|
|
21252
|
+
const headerElement = this.header.nativeElement;
|
|
21253
|
+
if (!this.relativeMode) {
|
|
21254
|
+
containerElement.style.setProperty('z-index', this.domService.getMaxZIndex() + 1);
|
|
21255
|
+
}
|
|
21256
|
+
const handleMouseDown = (e) => {
|
|
21257
|
+
// important!
|
|
21258
|
+
e.preventDefault();
|
|
21259
|
+
const startPos = {
|
|
21260
|
+
x: e.clientX - offset.dx,
|
|
21261
|
+
y: e.clientY - offset.dy,
|
|
21262
|
+
};
|
|
21263
|
+
const handleMouseMove = (e) => {
|
|
21264
|
+
// How far the mouse has been moved
|
|
21265
|
+
const dx = e.clientX - startPos.x;
|
|
21266
|
+
const dy = e.clientY - startPos.y;
|
|
21267
|
+
// Set the position of element
|
|
21268
|
+
requestAnimationFrame(() => {
|
|
21269
|
+
containerElement.style.transform = `translate(${dx}px, ${dy}px)`;
|
|
21270
|
+
});
|
|
21271
|
+
// Reassign the position of mouse
|
|
21272
|
+
offset = { dx, dy };
|
|
21273
|
+
};
|
|
21274
|
+
var handleMouseUp = () => {
|
|
21275
|
+
document.removeEventListener('mousemove', handleMouseMove);
|
|
21276
|
+
document.removeEventListener('mouseup', handleMouseUp);
|
|
21277
|
+
};
|
|
21278
|
+
document.addEventListener('mousemove', handleMouseMove, { passive: true });
|
|
21279
|
+
document.addEventListener('mouseup', handleMouseUp, { passive: true });
|
|
21280
|
+
};
|
|
21281
|
+
var handleTouchStart = (e) => {
|
|
21282
|
+
const touch = e.touches[0];
|
|
21283
|
+
const startPos = {
|
|
21284
|
+
x: touch.clientX - offset.dx,
|
|
21285
|
+
y: touch.clientY - offset.dy,
|
|
21286
|
+
};
|
|
21287
|
+
var handleTouchMove = (e) => {
|
|
21288
|
+
const touch = e.touches[0];
|
|
21289
|
+
const dx = touch.clientX - startPos.x;
|
|
21290
|
+
const dy = touch.clientY - startPos.y;
|
|
21291
|
+
requestAnimationFrame(() => {
|
|
21292
|
+
containerElement.style.transform = `translate(${dx}px, ${dy}px)`;
|
|
21293
|
+
});
|
|
21294
|
+
offset = { dx, dy };
|
|
21295
|
+
};
|
|
21296
|
+
const handleTouchEnd = () => {
|
|
21297
|
+
document.removeEventListener('touchmove', handleTouchMove);
|
|
21298
|
+
document.removeEventListener('touchend', handleTouchEnd);
|
|
21299
|
+
};
|
|
21300
|
+
document.addEventListener('touchmove', handleTouchMove, { passive: true });
|
|
21301
|
+
document.addEventListener('touchend', handleTouchEnd, { passive: true });
|
|
21302
|
+
};
|
|
21303
|
+
if (!this.relativeMode) {
|
|
21304
|
+
headerElement.addEventListener('mousedown', handleMouseDown);
|
|
21305
|
+
headerElement.addEventListener('touchstart', handleTouchStart);
|
|
21306
|
+
}
|
|
21307
|
+
});
|
|
21308
|
+
}
|
|
21309
|
+
onClose(e) {
|
|
21310
|
+
e.preventDefault();
|
|
21311
|
+
this.shiftPatternDndService.patternCollectionOpen$.next(false);
|
|
21312
|
+
}
|
|
21313
|
+
filter() {
|
|
21314
|
+
this.filteredPatterns = this.fullPatterns.filter(x => {
|
|
21315
|
+
return (this.keyword === '' || x.code.toLowerCase().includes(this.keyword.toLowerCase()));
|
|
21316
|
+
});
|
|
21317
|
+
}
|
|
21318
|
+
onKeywordChange(e) {
|
|
21319
|
+
console.log(e);
|
|
21320
|
+
this.filter();
|
|
21321
|
+
}
|
|
21322
|
+
onFilterReset() {
|
|
21323
|
+
this.keyword = '';
|
|
21324
|
+
this.filteredPatterns = this.fullPatterns;
|
|
21325
|
+
}
|
|
21326
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreAtPatternCollectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
21327
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoreAtPatternCollectionComponent, isStandalone: true, selector: "core-at-pattern-collection", inputs: { height: "height", relativeMode: "relativeMode" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }, { propertyName: "header", first: true, predicate: ["header"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div #container class=\"core-at-pattern-collection-container\" draggable=\"true\">\r\n <div class=\"p-relative\">\r\n <div #header class=\"header\" [ngStyle]=\"{\r\n cursor: relativeMode ? 'auto' : 'move'\r\n }\">\r\n <span>{{ 'AT_SHIFT_PATTERN_COLLECTION' | translate: lang | uppercase }}</span>\r\n @if (!relativeMode) {\r\n <i class=\"feather-x\" (click)=\"onClose($event)\"></i>\r\n }\r\n </div>\r\n <div class=\"lookup-wrapper d-flex d-flex-start p15\">\r\n <div class=\"advanced-search d-flex d-flex-v h-100\">\r\n @if (keyword.length) {\r\n <div class=\"pointer\" [appTooltip]=\"'UI_COMMON_FILTER_RESET' | translate: lang\" (click)=\"onFilterReset()\">\r\n <i class=\"feather-x\"></i>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"lookup w-100\">\r\n <input class=\"form-control\" [placeholder]=\"'UI_COMMON_SEARCH' | translate: lang\" [(ngModel)]=\"keyword\"\r\n (ngModelChange)=\"onKeywordChange($event)\">\r\n </div>\r\n </div>\r\n <div class=\"scroll-wrapper\">\r\n <core-scroll [localOptions]=\"filteredPatterns\" [itemTemplate]=\"itemTemplateRef\"\r\n [itemCount]=\"filteredPatterns.length\" [height]=\"height - 50 - searchHeight\" [childHeight]=\"itemHeight\">\r\n </core-scroll>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #itemTemplateRef let-context=\"context\">\r\n <li [ngStyle]=\"{ height: itemHeight + 'px' }\">\r\n <core-at-pattern-card [ngModel]=\"context\"></core-at-pattern-card>\r\n </li>\r\n</ng-template>", styles: [".core-at-pattern-collection-container{--starter-x: 0px;background-color:#fff4ce;width:240px;position:fixed;display:block;z-index:9;top:0;left:var(--starter-x);box-shadow:.4rem 0 2rem #0000002e;border-radius:2px}.core-at-pattern-collection-container .scroll-wrapper{padding-left:9px;margin-right:15px}.core-at-pattern-collection-container ul,.core-at-pattern-collection-container li{padding:0;margin:0}.core-at-pattern-collection-container .header{padding:15px;display:block;height:50px}.core-at-pattern-collection-container .header i{color:gray;font-size:24px;float:right;cursor:pointer}.core-at-pattern-collection-container .lookup input:not(:last-child){margin-bottom:15px}li{margin-left:9px;margin-right:9px;border-radius:2px}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CoreScrollComponent, selector: "core-scroll", inputs: ["localOptions", "itemTemplate", "itemCount", "height", "childHeight", "renderAhread"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "directive", type: TooltipDirective, selector: "[appTooltip]", inputs: ["color", "backgroundColor", "appTooltip", "showAnyway", "position"] }, { kind: "component", type: CoreAtPatternCardComponent, selector: "core-at-pattern-card" }] }); }
|
|
21328
|
+
}
|
|
21329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreAtPatternCollectionComponent, decorators: [{
|
|
21330
|
+
type: Component,
|
|
21331
|
+
args: [{ selector: 'core-at-pattern-collection', imports: [
|
|
21332
|
+
NgStyle,
|
|
21333
|
+
UpperCasePipe,
|
|
21334
|
+
FormsModule,
|
|
21335
|
+
CoreScrollComponent,
|
|
21336
|
+
TranslatePipe,
|
|
21337
|
+
TooltipDirective,
|
|
21338
|
+
CoreAtPatternCardComponent
|
|
21339
|
+
], template: "<div #container class=\"core-at-pattern-collection-container\" draggable=\"true\">\r\n <div class=\"p-relative\">\r\n <div #header class=\"header\" [ngStyle]=\"{\r\n cursor: relativeMode ? 'auto' : 'move'\r\n }\">\r\n <span>{{ 'AT_SHIFT_PATTERN_COLLECTION' | translate: lang | uppercase }}</span>\r\n @if (!relativeMode) {\r\n <i class=\"feather-x\" (click)=\"onClose($event)\"></i>\r\n }\r\n </div>\r\n <div class=\"lookup-wrapper d-flex d-flex-start p15\">\r\n <div class=\"advanced-search d-flex d-flex-v h-100\">\r\n @if (keyword.length) {\r\n <div class=\"pointer\" [appTooltip]=\"'UI_COMMON_FILTER_RESET' | translate: lang\" (click)=\"onFilterReset()\">\r\n <i class=\"feather-x\"></i>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"lookup w-100\">\r\n <input class=\"form-control\" [placeholder]=\"'UI_COMMON_SEARCH' | translate: lang\" [(ngModel)]=\"keyword\"\r\n (ngModelChange)=\"onKeywordChange($event)\">\r\n </div>\r\n </div>\r\n <div class=\"scroll-wrapper\">\r\n <core-scroll [localOptions]=\"filteredPatterns\" [itemTemplate]=\"itemTemplateRef\"\r\n [itemCount]=\"filteredPatterns.length\" [height]=\"height - 50 - searchHeight\" [childHeight]=\"itemHeight\">\r\n </core-scroll>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template #itemTemplateRef let-context=\"context\">\r\n <li [ngStyle]=\"{ height: itemHeight + 'px' }\">\r\n <core-at-pattern-card [ngModel]=\"context\"></core-at-pattern-card>\r\n </li>\r\n</ng-template>", styles: [".core-at-pattern-collection-container{--starter-x: 0px;background-color:#fff4ce;width:240px;position:fixed;display:block;z-index:9;top:0;left:var(--starter-x);box-shadow:.4rem 0 2rem #0000002e;border-radius:2px}.core-at-pattern-collection-container .scroll-wrapper{padding-left:9px;margin-right:15px}.core-at-pattern-collection-container ul,.core-at-pattern-collection-container li{padding:0;margin:0}.core-at-pattern-collection-container .header{padding:15px;display:block;height:50px}.core-at-pattern-collection-container .header i{color:gray;font-size:24px;float:right;cursor:pointer}.core-at-pattern-collection-container .lookup input:not(:last-child){margin-bottom:15px}li{margin-left:9px;margin-right:9px;border-radius:2px}\n"] }]
|
|
21340
|
+
}], propDecorators: { height: [{
|
|
21341
|
+
type: Input,
|
|
21342
|
+
args: [{ required: true }]
|
|
21343
|
+
}], relativeMode: [{
|
|
21344
|
+
type: Input
|
|
21345
|
+
}], container: [{
|
|
21346
|
+
type: ViewChild,
|
|
21347
|
+
args: ['container']
|
|
21348
|
+
}], header: [{
|
|
21349
|
+
type: ViewChild,
|
|
21350
|
+
args: ['header']
|
|
21351
|
+
}] } });
|
|
21352
|
+
|
|
21353
|
+
var EnumShiftPatternType;
|
|
21354
|
+
(function (EnumShiftPatternType) {
|
|
21355
|
+
EnumShiftPatternType["WEEK"] = "WEEK";
|
|
21356
|
+
EnumShiftPatternType["DAYS"] = "DAYS";
|
|
21357
|
+
})(EnumShiftPatternType || (EnumShiftPatternType = {}));
|
|
21358
|
+
|
|
21359
|
+
class AtHolidayService {
|
|
21360
|
+
constructor(appService) {
|
|
21361
|
+
this.appService = appService;
|
|
21362
|
+
}
|
|
21363
|
+
getHolidayItemsInRange(range) {
|
|
21364
|
+
return this.appService.post('/api/AtHoliday/GetListInRange', range);
|
|
21365
|
+
}
|
|
21366
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtHolidayService, deps: [{ token: AppService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21367
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtHolidayService, providedIn: 'root' }); }
|
|
21368
|
+
}
|
|
21369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtHolidayService, decorators: [{
|
|
21370
|
+
type: Injectable,
|
|
21371
|
+
args: [{
|
|
21372
|
+
providedIn: 'root'
|
|
21373
|
+
}]
|
|
21374
|
+
}], ctorParameters: () => [{ type: AppService }] });
|
|
21375
|
+
|
|
21376
|
+
class StartOffsetComponent {
|
|
21377
|
+
constructor() {
|
|
21378
|
+
this.onClose = new EventEmitter();
|
|
21379
|
+
this.startOffset = 0;
|
|
21380
|
+
}
|
|
21381
|
+
onCloseLocal() {
|
|
21382
|
+
this.onClose.emit(this.startOffset);
|
|
21383
|
+
}
|
|
21384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: StartOffsetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21385
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.1", type: StartOffsetComponent, isStandalone: true, selector: "core-start-offset", inputs: { rotationDays: "rotationDays", scopeStartDate: "scopeStartDate", scopeEndDate: "scopeEndDate" }, outputs: { onClose: "onClose" }, ngImport: i0, template: "<div class=\"modal-container\">\r\n <div class=\"modal-content-root\">\r\n\r\n <div class=\"core-start-offset-container\">\r\n\r\n <div class=\"header\">\r\n <span>TO DO...</span>\r\n <i class=\"feather-x\" (click)=\"onCloseLocal()\"></i>\r\n </div>\r\n\r\n\r\n <div class=\"offset-slider\">\r\n <div class=\"offset-slider-line\">\r\n <h2>offset-slider-line</h2>\r\n </div>\r\n </div>\r\n <div class=\"day-scope\">\r\n <div class=\"day-scope-line\">\r\n <h2>day-scope-line</h2>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n</div>", styles: [".core-start-offset-container i{font-size:24px;color:#d3d3d3;cursor:pointer;display:block;position:absolute;top:5px;right:5px}\n"] }); }
|
|
21386
|
+
}
|
|
21387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: StartOffsetComponent, decorators: [{
|
|
21388
|
+
type: Component,
|
|
21389
|
+
args: [{ selector: 'core-start-offset', imports: [], template: "<div class=\"modal-container\">\r\n <div class=\"modal-content-root\">\r\n\r\n <div class=\"core-start-offset-container\">\r\n\r\n <div class=\"header\">\r\n <span>TO DO...</span>\r\n <i class=\"feather-x\" (click)=\"onCloseLocal()\"></i>\r\n </div>\r\n\r\n\r\n <div class=\"offset-slider\">\r\n <div class=\"offset-slider-line\">\r\n <h2>offset-slider-line</h2>\r\n </div>\r\n </div>\r\n <div class=\"day-scope\">\r\n <div class=\"day-scope-line\">\r\n <h2>day-scope-line</h2>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n</div>", styles: [".core-start-offset-container i{font-size:24px;color:#d3d3d3;cursor:pointer;display:block;position:absolute;top:5px;right:5px}\n"] }]
|
|
21390
|
+
}], propDecorators: { rotationDays: [{
|
|
21391
|
+
type: Input,
|
|
21392
|
+
args: [{ required: true }]
|
|
21393
|
+
}], scopeStartDate: [{
|
|
21394
|
+
type: Input,
|
|
21395
|
+
args: [{ required: true }]
|
|
21396
|
+
}], scopeEndDate: [{
|
|
21397
|
+
type: Input,
|
|
21398
|
+
args: [{ required: true }]
|
|
21399
|
+
}], onClose: [{
|
|
21400
|
+
type: Output
|
|
21401
|
+
}] } });
|
|
21402
|
+
|
|
21403
|
+
class AtShiftPatternApplyComponent {
|
|
21404
|
+
constructor() {
|
|
21405
|
+
this.subscriptions = [];
|
|
21406
|
+
this.dndService = inject(DndService);
|
|
21407
|
+
this.atShiftPatternService = inject(AtShiftPatternService);
|
|
21408
|
+
this.atHolidayService = inject(AtHolidayService);
|
|
21409
|
+
this.shiftPatternDndService = inject(ShiftPatternDndService);
|
|
21410
|
+
this.appService = inject(AppService);
|
|
21411
|
+
this.alertService = inject(AlertService);
|
|
21412
|
+
this.mls = inject(MultiLanguageService);
|
|
21413
|
+
this.coreDatetimeService = inject(CoreDatetimeService);
|
|
21414
|
+
this.patternCollectionHeight = 700;
|
|
21415
|
+
this.previewData = [];
|
|
21416
|
+
this.orgParamAccessorMode = EnumCoreOrgTreeaAccessorMode.CHECKED;
|
|
21417
|
+
this.orgIds = [];
|
|
21418
|
+
this.empObjectIds = [];
|
|
21419
|
+
this.fromDate = undefined;
|
|
21420
|
+
this.toDate = undefined;
|
|
21421
|
+
this.empObjOptions$ = new BehaviorSubject([]);
|
|
21422
|
+
this.ignoreHolidays = true;
|
|
21423
|
+
this.ignoreEmptyCells = true;
|
|
21424
|
+
this.override = true;
|
|
21425
|
+
this.dndEventSubscriptions = {
|
|
21426
|
+
dragenter: new Subscription(() => null),
|
|
21427
|
+
dragover: new Subscription(() => null),
|
|
21428
|
+
drop: new Subscription(() => null),
|
|
21429
|
+
dragleave: new Subscription(() => null)
|
|
21430
|
+
};
|
|
21431
|
+
this.colMdClass = 'col-md-4';
|
|
21432
|
+
this.isDraggingOverContainer = false;
|
|
21433
|
+
this.loading = false;
|
|
21434
|
+
this.dropzoneHeight = 300;
|
|
21435
|
+
this.dragOverElements = new Set();
|
|
21436
|
+
}
|
|
21437
|
+
ngOnInit() {
|
|
21438
|
+
this.mls.lang$.subscribe(x => this.lang = x);
|
|
21439
|
+
const now = new Date();
|
|
21440
|
+
const year = now.getFullYear();
|
|
21441
|
+
const month = now.getMonth() + 1;
|
|
21442
|
+
this.currentMonth = year.toString() + '-' + (month < 10 ? '0' + month.toString() : month.toString());
|
|
21443
|
+
this.onCurrentMonthChange(this.currentMonth);
|
|
21444
|
+
}
|
|
21445
|
+
setupDndSubscriptions() {
|
|
21446
|
+
const containerElement = this.dropzone?.nativeElement;
|
|
21447
|
+
// containerElement.style.setProperty('--background-color', 'lightgrey');
|
|
21448
|
+
const dragenterEvent = fromEvent(containerElement, 'dragenter');
|
|
21449
|
+
const dragoverEvent = fromEvent(containerElement, 'dragover');
|
|
21450
|
+
const dropEvent = fromEvent(containerElement, 'drop');
|
|
21451
|
+
const dragleaveEvent = fromEvent(containerElement, 'dragleave');
|
|
21452
|
+
this.dndEventSubscriptions.dragenter = dragenterEvent.subscribe((ev) => {
|
|
21453
|
+
ev.preventDefault();
|
|
21454
|
+
// Ignore other DnD types
|
|
21455
|
+
if (this.dndService.dragType !== EnumDragType.SHIFT_PATTERN)
|
|
21456
|
+
return;
|
|
21457
|
+
this.isDraggingOverContainer = true;
|
|
21458
|
+
this.cleanUpSubsequentSubscriptions();
|
|
21459
|
+
this.dragOverElements.add(ev.target);
|
|
21460
|
+
containerElement.classList.add('valid-drop');
|
|
21461
|
+
this.dropzone?.nativeElement.style.setProperty('background-color', '#fff4ce');
|
|
21462
|
+
// Subscribe to dragover event to allow drop
|
|
21463
|
+
this.dndEventSubscriptions.dragover = dragoverEvent.subscribe((ev) => {
|
|
21464
|
+
ev.preventDefault();
|
|
21465
|
+
});
|
|
21466
|
+
// Subscribe to drop event
|
|
21467
|
+
this.dndEventSubscriptions.drop = dropEvent.subscribe((ev) => {
|
|
21468
|
+
ev.preventDefault();
|
|
21469
|
+
this.dragOverElements.clear(); // Clear the set
|
|
21470
|
+
this.isDraggingOverContainer = false;
|
|
21471
|
+
containerElement.classList.remove('valid-drop');
|
|
21472
|
+
this.dropzone?.nativeElement.style.setProperty('background-color', 'lightgrey');
|
|
21473
|
+
const data = ev.dataTransfer?.getData('text/plain'); // Example data retrieval
|
|
21474
|
+
// Handle drop logic based on data
|
|
21475
|
+
if (data) {
|
|
21476
|
+
//alert(this.shiftPatternDndService.draggingPattern$.value?.code)
|
|
21477
|
+
this.makePreviewData();
|
|
21478
|
+
}
|
|
21479
|
+
});
|
|
21480
|
+
});
|
|
21481
|
+
this.dndEventSubscriptions.dragleave = dragleaveEvent.subscribe((ev) => {
|
|
21482
|
+
ev.preventDefault();
|
|
21483
|
+
this.dragOverElements.delete(ev.target);
|
|
21484
|
+
// Check if we are leaving the container
|
|
21485
|
+
if (ev.target.classList.contains('parent-container')) {
|
|
21486
|
+
// Check if the related target is still within the container
|
|
21487
|
+
if (!ev.relatedTarget || !ev.target.contains(ev.relatedTarget)) {
|
|
21488
|
+
this.isDraggingOverContainer = false;
|
|
21489
|
+
containerElement.classList.remove('valid-drop');
|
|
21490
|
+
}
|
|
21491
|
+
}
|
|
21492
|
+
if (this.dragOverElements.size === 0) {
|
|
21493
|
+
containerElement.classList.remove('valid-drop');
|
|
21494
|
+
}
|
|
21495
|
+
this.dropzone?.nativeElement.style.setProperty('background-color', 'lightgrey');
|
|
21496
|
+
this.dndEventSubscriptions.dragover?.unsubscribe();
|
|
21497
|
+
this.dndEventSubscriptions.drop?.unsubscribe();
|
|
21498
|
+
this.dndEventSubscriptions.dragover = undefined;
|
|
21499
|
+
this.dndEventSubscriptions.drop = undefined;
|
|
21500
|
+
});
|
|
21501
|
+
}
|
|
21502
|
+
ngAfterViewInit() {
|
|
21503
|
+
setTimeout(() => {
|
|
21504
|
+
this.loading = true;
|
|
21505
|
+
this.subscriptions.push(this.appService.get('/api/AtShiftPattern/GetEmpObjListForCheckList').subscribe(x => {
|
|
21506
|
+
this.loading = false;
|
|
21507
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21508
|
+
const empObjectIds = [];
|
|
21509
|
+
(x.body?.innerBody).forEach(x => {
|
|
21510
|
+
empObjectIds.push(x.value);
|
|
21511
|
+
});
|
|
21512
|
+
this.empObjectIds = empObjectIds;
|
|
21513
|
+
this.empObjOptions$.next(x.body?.innerBody);
|
|
21514
|
+
}
|
|
21515
|
+
}));
|
|
21516
|
+
this.dropzoneHeight = window.innerHeight - 60 - 50 - 91.5 - 15 - 15;
|
|
21517
|
+
this.patternCollectionHeight = window.innerHeight - 60 - 50 - 15;
|
|
21518
|
+
if (window.innerWidth >= 1920) {
|
|
21519
|
+
this.colMdClass = 'col-md-3';
|
|
21520
|
+
}
|
|
21521
|
+
else if (window.innerWidth >= 1440) {
|
|
21522
|
+
this.colMdClass = 'col-md-4';
|
|
21523
|
+
}
|
|
21524
|
+
else if (window.innerWidth >= 1280) {
|
|
21525
|
+
this.colMdClass = 'col-md-6';
|
|
21526
|
+
}
|
|
21527
|
+
else {
|
|
21528
|
+
this.colMdClass = 'col-md-12';
|
|
21529
|
+
}
|
|
21530
|
+
});
|
|
21531
|
+
}
|
|
21532
|
+
cleanUpSubscriptions() {
|
|
21533
|
+
this.dndEventSubscriptions.dragenter?.unsubscribe();
|
|
21534
|
+
this.dndEventSubscriptions.dragover?.unsubscribe();
|
|
21535
|
+
this.dndEventSubscriptions.drop?.unsubscribe();
|
|
21536
|
+
this.dndEventSubscriptions.dragleave?.unsubscribe();
|
|
21537
|
+
}
|
|
21538
|
+
cleanUpSubsequentSubscriptions() {
|
|
21539
|
+
this.dndEventSubscriptions.dragover?.unsubscribe();
|
|
21540
|
+
this.dndEventSubscriptions.drop?.unsubscribe();
|
|
21541
|
+
}
|
|
21542
|
+
onSalPeriodChange(salPerId) {
|
|
21543
|
+
this.salPeriod = salPerId;
|
|
21544
|
+
this.subscriptions.push(this.appService.post(api.AT_SALARY_PERIOD_GET_LIST_PERIOD, { id: salPerId }).subscribe(x => {
|
|
21545
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21546
|
+
const body = x.body;
|
|
21547
|
+
this.startDate = new Date(body.innerBody.startDate);
|
|
21548
|
+
this.startDateString = this.startDate.toDateString();
|
|
21549
|
+
this.startPeriod = new Date(body.innerBody.startDate);
|
|
21550
|
+
this.startPeriodString = this.startPeriod.toDateString();
|
|
21551
|
+
this.endDate = new Date(body.innerBody.endDate);
|
|
21552
|
+
this.endDateString = this.endDate.toDateString();
|
|
21553
|
+
this.endPeriod = new Date(body.innerBody.endDate);
|
|
21554
|
+
this.endPeriodString = this.endPeriod.toDateString();
|
|
21555
|
+
this.dateRangeLimit = {
|
|
21556
|
+
minDate: this.startDate,
|
|
21557
|
+
maxDate: this.endDate
|
|
21558
|
+
};
|
|
21559
|
+
}
|
|
21560
|
+
}));
|
|
21561
|
+
}
|
|
21562
|
+
onStartDateChange(e) {
|
|
21563
|
+
e.setHours(0, 0, 0, 0);
|
|
21564
|
+
this.previewData = [];
|
|
21565
|
+
this.scopeStartDate = e;
|
|
21566
|
+
if (!!this.startDate && !!this.endDate && this.startDate.getTime() > this.endDate.getTime()) {
|
|
21567
|
+
this.endDate = e;
|
|
21568
|
+
}
|
|
21569
|
+
}
|
|
21570
|
+
onEndDateChange(e) {
|
|
21571
|
+
e.setHours(0, 0, 0, 0);
|
|
21572
|
+
this.scopeEndDate = e;
|
|
21573
|
+
this.previewData = [];
|
|
21574
|
+
if (!!this.startDate && !!this.endDate && this.startDate.getTime() > this.endDate.getTime()) {
|
|
21575
|
+
this.startDate = e;
|
|
21576
|
+
}
|
|
21577
|
+
}
|
|
21578
|
+
onCurrentMonthChange(e) {
|
|
21579
|
+
this.previewData = [];
|
|
21580
|
+
this.subscriptions.push(this.appService.get(api.AT_SALARY_PERIOD_GET_BY_YEAR_MONTH_STRING + "?text=" + e).subscribe(x => {
|
|
21581
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21582
|
+
if (!!x.body.innerBody) {
|
|
21583
|
+
this.periodId = x.body.innerBody.id;
|
|
21584
|
+
this.startPeriod = new Date(x.body.innerBody.startDate);
|
|
21585
|
+
this.startPeriodString = this.startPeriod.toDateString();
|
|
21586
|
+
this.endPeriod = new Date(x.body.innerBody.endDate);
|
|
21587
|
+
this.endPeriodString = this.endPeriod.toDateString();
|
|
21588
|
+
this.startDate = new Date(x.body.innerBody.startDate);
|
|
21589
|
+
this.startDateString = this.startDate.toDateString();
|
|
21590
|
+
this.scopeStartDate = this.startDate;
|
|
21591
|
+
this.endDate = new Date(x.body.innerBody.endDate);
|
|
21592
|
+
this.endDateString = this.endDate.toDateString();
|
|
21593
|
+
this.scopeEndDate = this.endDate;
|
|
21594
|
+
this.onSalPeriodChange(x.body.innerBody.id);
|
|
21595
|
+
this.setupDndSubscriptions();
|
|
21596
|
+
this.dropzoneReady = true;
|
|
21597
|
+
}
|
|
21598
|
+
else {
|
|
21599
|
+
this.alertService.warn(this.mls.trans("NO_SALARY_PERIOD_FOUND_FOR_SELECTED_MONTH", this.lang), alertOptions);
|
|
21600
|
+
this.startDate = null;
|
|
21601
|
+
this.endDate = null;
|
|
21602
|
+
this.cleanUpSubscriptions();
|
|
21603
|
+
this.dropzoneReady = false;
|
|
21604
|
+
}
|
|
21605
|
+
}
|
|
21606
|
+
else {
|
|
21607
|
+
this.alertService.warn(this.mls.trans("OPP!SOME_THING_IS_WRONG_WHILE_READING_THE_SALARY_PERIOD_FOR_CURRENT_MONTH", this.lang), alertOptions);
|
|
21608
|
+
this.startDate = null;
|
|
21609
|
+
this.endDate = null;
|
|
21610
|
+
this.cleanUpSubscriptions();
|
|
21611
|
+
this.dropzoneReady = false;
|
|
21612
|
+
}
|
|
21613
|
+
}));
|
|
21614
|
+
}
|
|
21615
|
+
makePreviewData() {
|
|
21616
|
+
if (!this.shiftPatternDndService.draggingPattern$.value)
|
|
21617
|
+
return;
|
|
21618
|
+
if (!this.startDate || !this.endDate)
|
|
21619
|
+
return;
|
|
21620
|
+
const rawPattern = this.shiftPatternDndService.draggingPattern$.value;
|
|
21621
|
+
this.rotationDays = rawPattern.rotationDays;
|
|
21622
|
+
const requests = zip([
|
|
21623
|
+
this.atShiftPatternService.loadItem(rawPattern.id),
|
|
21624
|
+
this.atHolidayService.getHolidayItemsInRange({
|
|
21625
|
+
startDate: this.startDate,
|
|
21626
|
+
endDate: this.endDate
|
|
21627
|
+
})
|
|
21628
|
+
]);
|
|
21629
|
+
this.loading = true;
|
|
21630
|
+
this.subscriptions.push(requests.subscribe(x => {
|
|
21631
|
+
this.loading = false;
|
|
21632
|
+
if (x[0].ok && x[0].status === 200 && x[0].body?.statusCode === 200 &&
|
|
21633
|
+
x[1].ok && x[1].status === 200 && x[1].body?.statusCode === 200) {
|
|
21634
|
+
const pattern = x[0].body.innerBody;
|
|
21635
|
+
const holidays = x[1].body.innerBody;
|
|
21636
|
+
let holidayCode;
|
|
21637
|
+
let holidayName;
|
|
21638
|
+
const startDate = new Date(this.startDate.getTime() - this.coreDatetimeService.timeZoneOffset * 60000);
|
|
21639
|
+
startDate.setHours(0, 0, 0, 0); // Set to the start of the day in the adjusted timezone
|
|
21640
|
+
const endDate = new Date(this.endDate.getTime() - this.coreDatetimeService.timeZoneOffset * 60000);
|
|
21641
|
+
endDate.setHours(0, 0, 0, 0); // Set to the start of the day in the adjusted timezone
|
|
21642
|
+
this.mapInput = { pattern, holidays, startDate, endDate, startOffset: undefined };
|
|
21643
|
+
switch (pattern.patternType) {
|
|
21644
|
+
case EnumShiftPatternType.WEEK:
|
|
21645
|
+
this.mapWeekType(this.mapInput);
|
|
21646
|
+
break;
|
|
21647
|
+
case EnumShiftPatternType.DAYS:
|
|
21648
|
+
this.showStartOffset = true;
|
|
21649
|
+
//this.mapDaysType(pattern, holidays, holidayCode, holidayName, startDate, endDate);
|
|
21650
|
+
break;
|
|
21651
|
+
}
|
|
21652
|
+
}
|
|
21653
|
+
}));
|
|
21654
|
+
}
|
|
21655
|
+
mapWeekType(mapInput) {
|
|
21656
|
+
const { pattern, holidays, startDate, endDate } = mapInput;
|
|
21657
|
+
let holidayCode;
|
|
21658
|
+
let holidayName;
|
|
21659
|
+
const previewData = [];
|
|
21660
|
+
for (let date = startDate; date <= endDate; date = new Date(date.getTime() + 24 * 60 * 60 * 1000)) {
|
|
21661
|
+
const weekDay = (date.getDay() + 6) % 7 + 1; // Transform Sunday (0) to 7, and others to 1-based index
|
|
21662
|
+
const holidayCodeFilter = holidays.filter(x => {
|
|
21663
|
+
const dayItem = new Date(x.dayItem);
|
|
21664
|
+
//const time1 =
|
|
21665
|
+
return dayItem.getTime() === date.getTime();
|
|
21666
|
+
});
|
|
21667
|
+
if (!!holidayCodeFilter.length) {
|
|
21668
|
+
holidayCode = holidayCodeFilter[0].code;
|
|
21669
|
+
holidayName = holidayCodeFilter[0].name;
|
|
21670
|
+
}
|
|
21671
|
+
const shiftsFilter = pattern.shiftDetails?.filter(x => x.dayNumber === weekDay); // Get shifts for the one-based weekday index
|
|
21672
|
+
if (!!shiftsFilter.length) {
|
|
21673
|
+
const atShifts = shiftsFilter[0].shifts;
|
|
21674
|
+
previewData.push({
|
|
21675
|
+
workingday: date,
|
|
21676
|
+
isSaturday: date.getDay() === 6,
|
|
21677
|
+
isSunday: date.getDay() === 0,
|
|
21678
|
+
shifts: [...atShifts],
|
|
21679
|
+
holidayCode,
|
|
21680
|
+
holidayName
|
|
21681
|
+
});
|
|
21682
|
+
}
|
|
21683
|
+
else {
|
|
21684
|
+
previewData.push({
|
|
21685
|
+
workingday: new Date(date.getTime() + date.getTimezoneOffset() * 60000),
|
|
21686
|
+
isSaturday: date.getDay() === 6,
|
|
21687
|
+
isSunday: date.getDay() === 0,
|
|
21688
|
+
shifts: [],
|
|
21689
|
+
holidayCode,
|
|
21690
|
+
holidayName
|
|
21691
|
+
});
|
|
21692
|
+
}
|
|
21693
|
+
}
|
|
21694
|
+
this.previewData = previewData;
|
|
21695
|
+
}
|
|
21696
|
+
mapDaysType(mapInput) {
|
|
21697
|
+
const { pattern, holidays, startDate, endDate } = mapInput;
|
|
21698
|
+
let holidayCode;
|
|
21699
|
+
let holidayName;
|
|
21700
|
+
const rotationDays = pattern.shiftDetails?.length || 0; // Number of rotation days
|
|
21701
|
+
const previewData = [];
|
|
21702
|
+
for (let date = startDate; date <= endDate; date = new Date(date.getTime() + 24 * 60 * 60 * 1000)) {
|
|
21703
|
+
// Check if the date is a holiday
|
|
21704
|
+
const holidayCodeFilter = holidays.filter(x => {
|
|
21705
|
+
const dayItem = new Date(x.dayItem);
|
|
21706
|
+
return dayItem.getTime() === date.getTime();
|
|
21707
|
+
});
|
|
21708
|
+
if (holidayCodeFilter.length) {
|
|
21709
|
+
holidayCode = holidayCodeFilter[0].code;
|
|
21710
|
+
holidayName = holidayCodeFilter[0].name;
|
|
21711
|
+
}
|
|
21712
|
+
// Calculate the rotating day index
|
|
21713
|
+
const dayIndex = ((date.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000)) % rotationDays;
|
|
21714
|
+
const dayNumber = Math.floor(dayIndex) + 1; // 1-based index
|
|
21715
|
+
// Get shifts for the specific rotating day
|
|
21716
|
+
const shiftsFilter = pattern.shiftDetails?.filter(x => x.dayNumber === dayNumber);
|
|
21717
|
+
if (shiftsFilter && shiftsFilter.length > 0) {
|
|
21718
|
+
const atShifts = shiftsFilter[0].shifts;
|
|
21719
|
+
previewData.push({
|
|
21720
|
+
workingday: date,
|
|
21721
|
+
isSaturday: date.getDay() === 6,
|
|
21722
|
+
isSunday: date.getDay() === 0,
|
|
21723
|
+
shifts: [...atShifts],
|
|
21724
|
+
holidayCode,
|
|
21725
|
+
holidayName
|
|
21726
|
+
});
|
|
21727
|
+
}
|
|
21728
|
+
else {
|
|
21729
|
+
// Handle case when no shifts are found for the day
|
|
21730
|
+
previewData.push({
|
|
21731
|
+
workingday: new Date(date.getTime() + date.getTimezoneOffset() * 60000),
|
|
21732
|
+
isSaturday: date.getDay() === 6,
|
|
21733
|
+
isSunday: date.getDay() === 0,
|
|
21734
|
+
shifts: [],
|
|
21735
|
+
holidayCode,
|
|
21736
|
+
holidayName
|
|
21737
|
+
});
|
|
21738
|
+
}
|
|
21739
|
+
}
|
|
21740
|
+
this.previewData = previewData;
|
|
21741
|
+
}
|
|
21742
|
+
onCloseOffset(offset) {
|
|
21743
|
+
if (!!this.mapInput) {
|
|
21744
|
+
this.mapInput.startOffset = offset;
|
|
21745
|
+
this.mapDaysType(this.mapInput);
|
|
21746
|
+
}
|
|
21747
|
+
this.showStartOffset = false;
|
|
21748
|
+
}
|
|
21749
|
+
onCorePageHeaderButtonClick(e) {
|
|
21750
|
+
alert("To do: will approximately be finhished on Jan the 3rd, 2025");
|
|
21751
|
+
}
|
|
21752
|
+
ngOnDestroy() {
|
|
21753
|
+
this.cleanUpSubscriptions();
|
|
21754
|
+
this.dropzoneReady = false;
|
|
21755
|
+
this.subscriptions.map(x => x?.unsubscribe());
|
|
21756
|
+
}
|
|
21757
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtShiftPatternApplyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21758
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: AtShiftPatternApplyComponent, isStandalone: true, selector: "core-at-shift-pattern-apply", viewQueries: [{ propertyName: "dropzone", first: true, predicate: ["dropzone"], descendants: true }], ngImport: i0, template: "<div class=\"core-at-shift-pattern-apply-container\">\r\n <core-page-header [title]=\"'UI_COMPONENT_TITLE_AT_SHIFT_PATTERN_APPLY'\" (buttonClick)=\"onCorePageHeaderButtonClick($event)\"></core-page-header>\r\n <div class=\"patterns_condition-n-preview\">\r\n <div class=\"collection-wrapper\">\r\n <core-at-pattern-collection [relativeMode]=\"true\"\r\n [height]=\"patternCollectionHeight\"></core-at-pattern-collection>\r\n </div>\r\n <div class=\"orgtree-wrapper\">\r\n <core-org-tree [(ngModel)]=\"orgIds\"></core-org-tree>\r\n </div>\r\n <div class=\"condition-n-preview fs13\">\r\n\r\n <div class=\"condition\">\r\n <div class=\"d-flex d-flex-start mb15 pd3\">\r\n <div class=\"param-wrapper w200 mr15\">\r\n <label>K\u1EF3 c\u00F4ng</label>\r\n <div class=\"form-group vertical\">\r\n <core-month-selector [(ngModel)]=\"currentMonth\"\r\n (ngModelChange)=\"onCurrentMonthChange($event)\"></core-month-selector>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w175 mr15\">\r\n <label></label>\r\n <div class=\"form-group vertical\">\r\n <core-date-picker [(ngModel)]=\"startDate\" [rangeLimit]=\"dateRangeLimit\" (ngModelChange)=\"onStartDateChange($event)\"></core-date-picker>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w175 mr15\">\r\n <label></label>\r\n <div class=\"form-group vertical\">\r\n <core-date-picker [(ngModel)]=\"endDate\" [rangeLimit]=\"dateRangeLimit\" (ngModelChange)=\"onEndDateChange($event)\"></core-date-picker>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w250 mr15\">\r\n <div class=\"form-group vertical\">\r\n <label>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u00E2n vi\u00EAn</label>\r\n <core-checklist [paramMode]=\"true\" [(ngModel)]=\"empObjectIds\"\r\n [options$]=\"empObjOptions$\"></core-checklist>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex d-flex-start mb15 pd3\">\r\n <div class=\"param-wrapper w180 mr15\">\r\n <div class=\"form-group vertical\">\r\n <label></label>\r\n <core-checkbox [text]=\"'B\u1ECF qua ng\u00E0y l\u1EC5'\" [(ngModel)]=\"ignoreHolidays\"></core-checkbox>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w200 mr15\">\r\n <div class=\"form-group vertical\">\r\n <label></label>\r\n <core-checkbox [text]=\"'B\u1ECF qua ng\u00E0y m\u1EABu tr\u1ED1ng'\" [(ngModel)]=\"ignoreEmptyCells\"></core-checkbox>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w180 mr15\">\r\n <div class=\"form-group vertical\">\r\n <label></label>\r\n <core-checkbox [text]=\"'Ghi \u0111\u00E8'\" [(ngModel)]=\"ignoreEmptyCells\"></core-checkbox>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"preview\">\r\n\r\n <div #dropzone id=\"dropzone\" [class.ready]=\"dropzoneReady\" [ngStyle]=\"{\r\n height: dropzoneHeight + 'px'\r\n }\">\r\n\r\n @if (!previewData || !previewData.length) {\r\n <div [ngStyle]=\"{\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n width: '100%',\r\n height: dropzoneHeight + 'px'\r\n }\">\r\n <h2 style=\"color: white;\">K\u00E9o th\u1EA3 m\u1EABu x\u1EBFp ca v\u00E0o \u0111\u00E2y...</h2>\r\n </div>\r\n } @else {\r\n <div class=\"container mt60\">\r\n\r\n <div class=\"row gx-5 gy-5\">\r\n \r\n @for (dailyItem of previewData; track dailyItem.workingday) {\r\n <div [class]=\"colMdClass\">\r\n <div class=\"daily-item\">\r\n <div class=\"daily-item-header\" [class.saturday]=\"!!dailyItem?.isSaturday\" [class.sunday]=\"!!dailyItem?.isSunday\">\r\n <div class=\"workingday-wrapper d-flex d-flex-start\">\r\n <i class=\"feather-calendar\"></i><span>{{ dailyItem.workingday | tableCell : 'DATE_LOCALIZED' : lang }}</span>\r\n </div>\r\n @if (!!dailyItem.holidayName) {\r\n <div class=\"holidayName-wrapper d-flex d-flex-start\">\r\n <i class=\"feather-gift\"></i><span>{{ dailyItem.holidayName }}</span>\r\n </div>\r\n }\r\n </div>\r\n <core-shift-cell [ngModel]=\"dailyItem.shifts\" [$readOnly]=\"true\"></core-shift-cell>\r\n </div>\r\n </div>\r\n } \r\n \r\n </div>\r\n \r\n </div>\r\n \r\n }\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n @if (showStartOffset && !!rotationDays && !!scopeStartDate && !!scopeEndDate) {\r\n <core-start-offset [rotationDays]=\"rotationDays\" [scopeStartDate]=\"scopeStartDate\" [scopeEndDate]=\"scopeEndDate\" (onClose)=\"onCloseOffset($event)\"></core-start-offset>\r\n }\r\n\r\n </div>\r\n </div>\r\n</div>", styles: [".core-at-shift-pattern-apply-container .patterns_condition-n-preview{position:relative;vertical-align:top}.core-at-shift-pattern-apply-container .patterns_condition-n-preview .collection-wrapper{display:block;position:absolute;left:0;top:0}.core-at-shift-pattern-apply-container .patterns_condition-n-preview .orgtree-wrapper{display:block;position:absolute;left:240px;top:0}.core-at-shift-pattern-apply-container .patterns_condition-n-preview .condition-n-preview{display:block;padding-left:555px}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone{display:block;position:relative;width:100%;height:300px;overflow-y:auto}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone .daily-item{background-color:#fff;margin:15px;width:258px}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone .daily-item .daily-item-header{font-size:13px;padding:15px 15px 0}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone .daily-item .daily-item-header i{margin-right:8px}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone .daily-item .daily-item-header.saturday{color:#07b7ee}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone .daily-item .daily-item-header.sunday{color:#ef2b58}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone.ready{background-color:#d3d3d3}.core-at-shift-pattern-apply-container .patterns_condition-n-preview .condition-n-preview{margin-left:15px}.core-at-shift-pattern-apply-container .w175{width:160px}.core-at-shift-pattern-apply-container .w180{width:180px}.core-at-shift-pattern-apply-container .w200{width:200px}.core-at-shift-pattern-apply-container .mt60{margin-top:60px}.core-at-shift-pattern-apply-container .fs13{font-size:13px}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: CoreDatePickerComponent, selector: "core-date-picker", inputs: ["enableTimeZoneConverter", "showPlaceholder", "popupWidth", "popupXPadding", "popupAlign", "rangeLimit", "readonly", "disabled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CorePageHeaderComponent, selector: "core-page-header", inputs: ["instanceNumber", "shownItems", "title", "hideButtonGroup"], outputs: ["buttonClick"] }, { kind: "component", type: CoreAtPatternCollectionComponent, selector: "core-at-pattern-collection", inputs: ["height", "relativeMode"] }, { kind: "component", type: CoreMonthSelectorComponent, selector: "core-month-selector", inputs: ["align"], outputs: ["onYearClick"] }, { kind: "component", type: CoreChecklistComponent, selector: "core-checklist", inputs: ["paramMode", "getByIdObject$", "shownFrom", "options$", "height", "placeholder", "loading", "readonly", "disabled"] }, { kind: "component", type: CoreShiftCellComponent, selector: "core-shift-cell", inputs: ["$readOnly", "$hideStarterPlusSign", "$hideStickersWhileDragover", "$backgroundColor"] }, { kind: "component", type: CoreOrgTreeComponent, selector: "core-org-tree", inputs: ["lineColor", "fullWidthMode", "accessorMode", "searchMode", "fullRendering", "height", "disabledLoopExpand", "showCheckInheritance", "excludedIds$", "stateIsolated$"], outputs: ["itemDoubleClick", "itemClick"] }, { kind: "component", type: CoreCheckboxComponent, selector: "core-checkbox", inputs: ["text", "tooltipPosition", "tooltip", "inputValue", "disabled"], outputs: ["onClick"] }, { kind: "component", type: StartOffsetComponent, selector: "core-start-offset", inputs: ["rotationDays", "scopeStartDate", "scopeEndDate"], outputs: ["onClose"] }, { kind: "pipe", type: TableCellPipe, name: "tableCell" }] }); }
|
|
21759
|
+
}
|
|
21760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtShiftPatternApplyComponent, decorators: [{
|
|
21761
|
+
type: Component,
|
|
21762
|
+
args: [{ selector: 'core-at-shift-pattern-apply', imports: [
|
|
21763
|
+
NgStyle,
|
|
21764
|
+
CoreDatePickerComponent,
|
|
21765
|
+
FormsModule,
|
|
21766
|
+
CorePageHeaderComponent,
|
|
21767
|
+
CoreAtPatternCollectionComponent,
|
|
21768
|
+
CoreMonthSelectorComponent,
|
|
21769
|
+
CoreChecklistComponent,
|
|
21770
|
+
CoreShiftCellComponent,
|
|
21771
|
+
CoreOrgTreeComponent,
|
|
21772
|
+
CoreCheckboxComponent,
|
|
21773
|
+
StartOffsetComponent,
|
|
21774
|
+
TableCellPipe,
|
|
21775
|
+
], template: "<div class=\"core-at-shift-pattern-apply-container\">\r\n <core-page-header [title]=\"'UI_COMPONENT_TITLE_AT_SHIFT_PATTERN_APPLY'\" (buttonClick)=\"onCorePageHeaderButtonClick($event)\"></core-page-header>\r\n <div class=\"patterns_condition-n-preview\">\r\n <div class=\"collection-wrapper\">\r\n <core-at-pattern-collection [relativeMode]=\"true\"\r\n [height]=\"patternCollectionHeight\"></core-at-pattern-collection>\r\n </div>\r\n <div class=\"orgtree-wrapper\">\r\n <core-org-tree [(ngModel)]=\"orgIds\"></core-org-tree>\r\n </div>\r\n <div class=\"condition-n-preview fs13\">\r\n\r\n <div class=\"condition\">\r\n <div class=\"d-flex d-flex-start mb15 pd3\">\r\n <div class=\"param-wrapper w200 mr15\">\r\n <label>K\u1EF3 c\u00F4ng</label>\r\n <div class=\"form-group vertical\">\r\n <core-month-selector [(ngModel)]=\"currentMonth\"\r\n (ngModelChange)=\"onCurrentMonthChange($event)\"></core-month-selector>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w175 mr15\">\r\n <label></label>\r\n <div class=\"form-group vertical\">\r\n <core-date-picker [(ngModel)]=\"startDate\" [rangeLimit]=\"dateRangeLimit\" (ngModelChange)=\"onStartDateChange($event)\"></core-date-picker>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w175 mr15\">\r\n <label></label>\r\n <div class=\"form-group vertical\">\r\n <core-date-picker [(ngModel)]=\"endDate\" [rangeLimit]=\"dateRangeLimit\" (ngModelChange)=\"onEndDateChange($event)\"></core-date-picker>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w250 mr15\">\r\n <div class=\"form-group vertical\">\r\n <label>\u0110\u1ED1i t\u01B0\u1EE3ng nh\u00E2n vi\u00EAn</label>\r\n <core-checklist [paramMode]=\"true\" [(ngModel)]=\"empObjectIds\"\r\n [options$]=\"empObjOptions$\"></core-checklist>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"d-flex d-flex-start mb15 pd3\">\r\n <div class=\"param-wrapper w180 mr15\">\r\n <div class=\"form-group vertical\">\r\n <label></label>\r\n <core-checkbox [text]=\"'B\u1ECF qua ng\u00E0y l\u1EC5'\" [(ngModel)]=\"ignoreHolidays\"></core-checkbox>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w200 mr15\">\r\n <div class=\"form-group vertical\">\r\n <label></label>\r\n <core-checkbox [text]=\"'B\u1ECF qua ng\u00E0y m\u1EABu tr\u1ED1ng'\" [(ngModel)]=\"ignoreEmptyCells\"></core-checkbox>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w180 mr15\">\r\n <div class=\"form-group vertical\">\r\n <label></label>\r\n <core-checkbox [text]=\"'Ghi \u0111\u00E8'\" [(ngModel)]=\"ignoreEmptyCells\"></core-checkbox>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"preview\">\r\n\r\n <div #dropzone id=\"dropzone\" [class.ready]=\"dropzoneReady\" [ngStyle]=\"{\r\n height: dropzoneHeight + 'px'\r\n }\">\r\n\r\n @if (!previewData || !previewData.length) {\r\n <div [ngStyle]=\"{\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n width: '100%',\r\n height: dropzoneHeight + 'px'\r\n }\">\r\n <h2 style=\"color: white;\">K\u00E9o th\u1EA3 m\u1EABu x\u1EBFp ca v\u00E0o \u0111\u00E2y...</h2>\r\n </div>\r\n } @else {\r\n <div class=\"container mt60\">\r\n\r\n <div class=\"row gx-5 gy-5\">\r\n \r\n @for (dailyItem of previewData; track dailyItem.workingday) {\r\n <div [class]=\"colMdClass\">\r\n <div class=\"daily-item\">\r\n <div class=\"daily-item-header\" [class.saturday]=\"!!dailyItem?.isSaturday\" [class.sunday]=\"!!dailyItem?.isSunday\">\r\n <div class=\"workingday-wrapper d-flex d-flex-start\">\r\n <i class=\"feather-calendar\"></i><span>{{ dailyItem.workingday | tableCell : 'DATE_LOCALIZED' : lang }}</span>\r\n </div>\r\n @if (!!dailyItem.holidayName) {\r\n <div class=\"holidayName-wrapper d-flex d-flex-start\">\r\n <i class=\"feather-gift\"></i><span>{{ dailyItem.holidayName }}</span>\r\n </div>\r\n }\r\n </div>\r\n <core-shift-cell [ngModel]=\"dailyItem.shifts\" [$readOnly]=\"true\"></core-shift-cell>\r\n </div>\r\n </div>\r\n } \r\n \r\n </div>\r\n \r\n </div>\r\n \r\n }\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n @if (showStartOffset && !!rotationDays && !!scopeStartDate && !!scopeEndDate) {\r\n <core-start-offset [rotationDays]=\"rotationDays\" [scopeStartDate]=\"scopeStartDate\" [scopeEndDate]=\"scopeEndDate\" (onClose)=\"onCloseOffset($event)\"></core-start-offset>\r\n }\r\n\r\n </div>\r\n </div>\r\n</div>", styles: [".core-at-shift-pattern-apply-container .patterns_condition-n-preview{position:relative;vertical-align:top}.core-at-shift-pattern-apply-container .patterns_condition-n-preview .collection-wrapper{display:block;position:absolute;left:0;top:0}.core-at-shift-pattern-apply-container .patterns_condition-n-preview .orgtree-wrapper{display:block;position:absolute;left:240px;top:0}.core-at-shift-pattern-apply-container .patterns_condition-n-preview .condition-n-preview{display:block;padding-left:555px}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone{display:block;position:relative;width:100%;height:300px;overflow-y:auto}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone .daily-item{background-color:#fff;margin:15px;width:258px}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone .daily-item .daily-item-header{font-size:13px;padding:15px 15px 0}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone .daily-item .daily-item-header i{margin-right:8px}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone .daily-item .daily-item-header.saturday{color:#07b7ee}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone .daily-item .daily-item-header.sunday{color:#ef2b58}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone.ready{background-color:#d3d3d3}.core-at-shift-pattern-apply-container .patterns_condition-n-preview .condition-n-preview{margin-left:15px}.core-at-shift-pattern-apply-container .w175{width:160px}.core-at-shift-pattern-apply-container .w180{width:180px}.core-at-shift-pattern-apply-container .w200{width:200px}.core-at-shift-pattern-apply-container .mt60{margin-top:60px}.core-at-shift-pattern-apply-container .fs13{font-size:13px}\n"] }]
|
|
21776
|
+
}], propDecorators: { dropzone: [{
|
|
21777
|
+
type: ViewChild,
|
|
21778
|
+
args: ['dropzone']
|
|
21779
|
+
}] } });
|
|
21780
|
+
|
|
21068
21781
|
class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
21069
21782
|
constructor(seekerService, layoutService, organizationService, mls) {
|
|
21070
21783
|
super();
|
|
@@ -21075,6 +21788,10 @@ class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
|
21075
21788
|
this.accessorMode = EnumCoreOrgTreeaAccessorMode.CHECKED;
|
|
21076
21789
|
this.pendingIds = [];
|
|
21077
21790
|
this.subscriptions = [];
|
|
21791
|
+
this.buttonItems = [
|
|
21792
|
+
EnumCoreButtonVNSCode.NONE_HEADER_CANCEL,
|
|
21793
|
+
EnumCoreButtonVNSCode.NONE_HEADER_CONFIRM,
|
|
21794
|
+
];
|
|
21078
21795
|
this.seekerService.sourceSpaceHeight$.subscribe(x => {
|
|
21079
21796
|
this.sourceSpaceHeight = x;
|
|
21080
21797
|
this.sourceContainerHeight = this.showPageHeader ? x - this.layoutService.corePageHeaderHeight - 68 : x - 68;
|
|
@@ -21139,6 +21856,16 @@ class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
|
21139
21856
|
this.sourceOpen = false;
|
|
21140
21857
|
}
|
|
21141
21858
|
}
|
|
21859
|
+
onButtonClick(e) {
|
|
21860
|
+
switch (e.code) {
|
|
21861
|
+
case EnumCoreButtonVNSCode.NONE_HEADER_CONFIRM:
|
|
21862
|
+
this.onSelect();
|
|
21863
|
+
break;
|
|
21864
|
+
case EnumCoreButtonVNSCode.NONE_HEADER_CANCEL:
|
|
21865
|
+
this.onCancel();
|
|
21866
|
+
break;
|
|
21867
|
+
}
|
|
21868
|
+
}
|
|
21142
21869
|
onItemDoubleClick(e) {
|
|
21143
21870
|
this.onSelect();
|
|
21144
21871
|
}
|
|
@@ -21147,6 +21874,17 @@ class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
|
21147
21874
|
console.log("CoreOrgParamComponent onIdsChange: ", e);
|
|
21148
21875
|
this.onChange(e);
|
|
21149
21876
|
this.pendingIds = e;
|
|
21877
|
+
if (!!e.length) {
|
|
21878
|
+
this.buttonItems = [
|
|
21879
|
+
EnumCoreButtonVNSCode.NONE_HEADER_CANCEL,
|
|
21880
|
+
EnumCoreButtonVNSCode.NONE_HEADER_CONFIRM,
|
|
21881
|
+
];
|
|
21882
|
+
}
|
|
21883
|
+
else {
|
|
21884
|
+
this.buttonItems = [
|
|
21885
|
+
EnumCoreButtonVNSCode.NONE_HEADER_CANCEL,
|
|
21886
|
+
];
|
|
21887
|
+
}
|
|
21150
21888
|
}
|
|
21151
21889
|
onItemClick(e) {
|
|
21152
21890
|
if (this.accessorMode === EnumCoreOrgTreeaAccessorMode.ACTIVATED_INHERITANCE || this.accessorMode === EnumCoreOrgTreeaAccessorMode.ACTIVATED_SINGLE) {
|
|
@@ -21166,7 +21904,7 @@ class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
|
21166
21904
|
multi: true,
|
|
21167
21905
|
useExisting: CoreOrgParamComponent
|
|
21168
21906
|
},
|
|
21169
|
-
], usesInheritance: true, ngImport: i0, template: "<div #container class=\"core-org-param-container\">\r\n <div class=\"input-wrapper\">\r\n <label #shownText type=\"text\" class=\"text form-control pointer\" (click)=\"onClickSeek()\">\r\n <span [appTooltip]=\"valueToShow\">{{ valueToShow }}</span>\r\n </label>\r\n </div>\r\n <div class=\"seeker-icon-wrapper\" (click)=\"onClickSeek()\">\r\n <div class=\"flex-wrapper\">\r\n <i class=\"feather-search\"></i>\r\n </div>\r\n </div>\r\n\r\n @if (!!sourceOpen) {\r\n <div class=\"modal-container\">\r\n <div class=\"modal-content-root\" [ngStyle]=\"{ padding: '0px' }\">\r\n\r\n <div class=\"source-space\" [ngStyle]=\"{\r\n height: sourceSpaceHeight + 'px',\r\n overflow: 'hidden',\r\n boxSizing: 'border-box',\r\n }\">\r\n <div class=\"source-container\" [ngStyle]=\"{\r\n height: sourceContainerHeight + 'px',\r\n paddingTop: '0px',\r\n paddingBottom: '0px'\r\n }\">\r\n <i class=\"close-icon feather-x d-block\" (click)=\"onCancel()\"></i>\r\n\r\n <core-org-unit-seeker [accessorMode]=\"accessorMode\" [height]=\"childComponentHeight\"
|
|
21907
|
+
], usesInheritance: true, ngImport: i0, template: "<div #container class=\"core-org-param-container\">\r\n <div class=\"input-wrapper\">\r\n <label #shownText type=\"text\" class=\"text form-control pointer\" (click)=\"onClickSeek()\">\r\n <span [appTooltip]=\"valueToShow\">{{ valueToShow }}</span>\r\n </label>\r\n </div>\r\n <div class=\"seeker-icon-wrapper\" (click)=\"onClickSeek()\">\r\n <div class=\"flex-wrapper\">\r\n <i class=\"feather-search\"></i>\r\n </div>\r\n </div>\r\n\r\n @if (!!sourceOpen) {\r\n <div class=\"modal-container\">\r\n <div class=\"modal-content-root\" [ngStyle]=\"{ padding: '0px' }\">\r\n\r\n <div class=\"source-space\" [ngStyle]=\"{\r\n height: sourceSpaceHeight + 'px',\r\n overflow: 'hidden',\r\n boxSizing: 'border-box',\r\n }\">\r\n <div class=\"source-container\" [ngStyle]=\"{\r\n height: sourceContainerHeight + 'px',\r\n paddingTop: '0px',\r\n paddingBottom: '0px'\r\n }\">\r\n <i class=\"close-icon feather-x d-block\" (click)=\"onCancel()\"></i>\r\n\r\n <core-org-unit-seeker [accessorMode]=\"accessorMode\" [height]=\"childComponentHeight\"\r\n (itemClick)=\"onItemClick($event)\" (itemDoubleClick)=\"onItemDoubleClick($event)\"\r\n (idsChange)=\"onIdsChange($event)\" [height]=\"childComponentHeight\"></core-org-unit-seeker>\r\n\r\n </div>\r\n\r\n <div class=\"footer\">\r\n <div class=\"d-flex-end\">\r\n <!-- @if (!!pendingIds.length) {\r\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"onSelect()\">{{\r\n 'UI_CORE_CONFIRM_DIALOG_BUTTON_SELECT' | translate: lang }}</button>\r\n }\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onCancel()\">{{\r\n 'UI_CORE_CONFIRM_DIALOG_BUTTON_CANCEL' | translate: lang }}</button> -->\r\n\r\n\r\n <div class=\"d-flex d-flex-end w-100 pr18\">\r\n <core-button-group-vns [showCaption]=\"true\" [forHeader]=\"false\"\r\n (buttonClick)=\"onButtonClick($event)\" [shownItems]=\"buttonItems\"\r\n class=\"buttonGroupCustom\"></core-button-group-vns>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n }\r\n\r\n</div>", styles: [".core-org-param-container{display:block;position:relative;background-color:#fff}.core-org-param-container>.seeker-icon-wrapper{display:block;position:absolute;right:0;top:0;width:35px;height:35px;cursor:pointer}.core-org-param-container>.seeker-icon-wrapper>.flex-wrapper{width:35px;height:35px;display:flex;align-items:center;justify-content:center;border:1px solid #ced4da}.core-org-param-container>.seeker-icon-wrapper>.flex-wrapper>i.close-icon{color:#848484;font-size:20px}.core-org-param-container .input-wrapper{height:var(--size-form-control-height)}.core-org-param-container .input-wrapper label.text span{display:block;height:calc(var(--size-form-control-height) - 12px);line-height:calc(var(--size-form-control-height) - 12px);width:calc(100% - var(--size-form-control-height));overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:inherit}.core-org-param-container .input-wrapper .clear-icon-wrapper{display:none;position:absolute;background-color:transparent;right:28px;top:3px;width:35px;height:35px;cursor:pointer}.core-org-param-container .input-wrapper .clear-icon-wrapper>.flex-wrapper{width:35px;height:35px;display:flex;align-items:center;justify-content:center}.core-org-param-container .input-wrapper .clear-icon-wrapper>.flex-wrapper>i{color:#848484;font-size:20px}.core-org-param-container .input-wrapper:hover>.clear-icon-wrapper{display:block}.core-org-param-container>.seeker-icon-wrapper.multi-mode{position:relative;width:35px;height:35px}.core-org-param-container>.seeker-icon-wrapper.multi-mode>.flex-wrapper{width:35px;height:35px}.core-org-param-container .source-container{display:block;background-color:#fff;padding:var(--size-layout-block-cell-spacing);max-width:1200px}.core-org-param-container .source-container i.close-icon{font-size:20px;cursor:pointer;position:absolute;right:15px;top:15px}.core-org-param-container .source-container.d-none{display:none}.core-org-param-container .source-container>caption{display:block;width:100%}.core-org-param-container .source-container:has(~.footer){border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.core-org-param-container .footer{background-color:var(--color-bg-main);padding:var(--size-layout-block-cell-spacing);position:absolute;bottom:0;left:0;width:100%}.core-org-param-container .footer button{border-radius:0}.core-org-param-container .footer button:first-child{margin-right:var(--size-layout-block-cell-spacing)}.core-org-param-container .footer button:last-child{color:#fff;background-color:#000}.core-org-param-container .core-tabbe-wrapper{margin-top:5px}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CoreOrgUnitSeekerComponent, selector: "core-org-unit-seeker", inputs: ["accessorMode", "height", "excludedIds$"], outputs: ["itemDoubleClick", "itemClick", "idsChange"] }, { kind: "component", type: CoreButtonGroupVnsComponent, selector: "core-button-group-vns", inputs: ["height", "instanceNumber", "forHeader", "fixedShow", "shownItems", "showCaption", "lastChildEffectOff"], outputs: ["buttonClick"] }, { kind: "directive", type: TooltipDirective, selector: "[appTooltip]", inputs: ["color", "backgroundColor", "appTooltip", "showAnyway", "position"] }] }); }
|
|
21170
21908
|
}
|
|
21171
21909
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreOrgParamComponent, decorators: [{
|
|
21172
21910
|
type: Component,
|
|
@@ -21175,6 +21913,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
21175
21913
|
FormsModule,
|
|
21176
21914
|
CorePageHeaderComponent,
|
|
21177
21915
|
CoreOrgUnitSeekerComponent,
|
|
21916
|
+
CoreButtonGroupVnsComponent,
|
|
21178
21917
|
TranslatePipe,
|
|
21179
21918
|
TooltipDirective
|
|
21180
21919
|
], providers: [
|
|
@@ -21183,7 +21922,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
21183
21922
|
multi: true,
|
|
21184
21923
|
useExisting: CoreOrgParamComponent
|
|
21185
21924
|
},
|
|
21186
|
-
], template: "<div #container class=\"core-org-param-container\">\r\n <div class=\"input-wrapper\">\r\n <label #shownText type=\"text\" class=\"text form-control pointer\" (click)=\"onClickSeek()\">\r\n <span [appTooltip]=\"valueToShow\">{{ valueToShow }}</span>\r\n </label>\r\n </div>\r\n <div class=\"seeker-icon-wrapper\" (click)=\"onClickSeek()\">\r\n <div class=\"flex-wrapper\">\r\n <i class=\"feather-search\"></i>\r\n </div>\r\n </div>\r\n\r\n @if (!!sourceOpen) {\r\n <div class=\"modal-container\">\r\n <div class=\"modal-content-root\" [ngStyle]=\"{ padding: '0px' }\">\r\n\r\n <div class=\"source-space\" [ngStyle]=\"{\r\n height: sourceSpaceHeight + 'px',\r\n overflow: 'hidden',\r\n boxSizing: 'border-box',\r\n }\">\r\n <div class=\"source-container\" [ngStyle]=\"{\r\n height: sourceContainerHeight + 'px',\r\n paddingTop: '0px',\r\n paddingBottom: '0px'\r\n }\">\r\n <i class=\"close-icon feather-x d-block\" (click)=\"onCancel()\"></i>\r\n\r\n <core-org-unit-seeker [accessorMode]=\"accessorMode\" [height]=\"childComponentHeight\"
|
|
21925
|
+
], template: "<div #container class=\"core-org-param-container\">\r\n <div class=\"input-wrapper\">\r\n <label #shownText type=\"text\" class=\"text form-control pointer\" (click)=\"onClickSeek()\">\r\n <span [appTooltip]=\"valueToShow\">{{ valueToShow }}</span>\r\n </label>\r\n </div>\r\n <div class=\"seeker-icon-wrapper\" (click)=\"onClickSeek()\">\r\n <div class=\"flex-wrapper\">\r\n <i class=\"feather-search\"></i>\r\n </div>\r\n </div>\r\n\r\n @if (!!sourceOpen) {\r\n <div class=\"modal-container\">\r\n <div class=\"modal-content-root\" [ngStyle]=\"{ padding: '0px' }\">\r\n\r\n <div class=\"source-space\" [ngStyle]=\"{\r\n height: sourceSpaceHeight + 'px',\r\n overflow: 'hidden',\r\n boxSizing: 'border-box',\r\n }\">\r\n <div class=\"source-container\" [ngStyle]=\"{\r\n height: sourceContainerHeight + 'px',\r\n paddingTop: '0px',\r\n paddingBottom: '0px'\r\n }\">\r\n <i class=\"close-icon feather-x d-block\" (click)=\"onCancel()\"></i>\r\n\r\n <core-org-unit-seeker [accessorMode]=\"accessorMode\" [height]=\"childComponentHeight\"\r\n (itemClick)=\"onItemClick($event)\" (itemDoubleClick)=\"onItemDoubleClick($event)\"\r\n (idsChange)=\"onIdsChange($event)\" [height]=\"childComponentHeight\"></core-org-unit-seeker>\r\n\r\n </div>\r\n\r\n <div class=\"footer\">\r\n <div class=\"d-flex-end\">\r\n <!-- @if (!!pendingIds.length) {\r\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"onSelect()\">{{\r\n 'UI_CORE_CONFIRM_DIALOG_BUTTON_SELECT' | translate: lang }}</button>\r\n }\r\n <button class=\"btn btn-secondary\" type=\"button\" (click)=\"onCancel()\">{{\r\n 'UI_CORE_CONFIRM_DIALOG_BUTTON_CANCEL' | translate: lang }}</button> -->\r\n\r\n\r\n <div class=\"d-flex d-flex-end w-100 pr18\">\r\n <core-button-group-vns [showCaption]=\"true\" [forHeader]=\"false\"\r\n (buttonClick)=\"onButtonClick($event)\" [shownItems]=\"buttonItems\"\r\n class=\"buttonGroupCustom\"></core-button-group-vns>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n }\r\n\r\n</div>", styles: [".core-org-param-container{display:block;position:relative;background-color:#fff}.core-org-param-container>.seeker-icon-wrapper{display:block;position:absolute;right:0;top:0;width:35px;height:35px;cursor:pointer}.core-org-param-container>.seeker-icon-wrapper>.flex-wrapper{width:35px;height:35px;display:flex;align-items:center;justify-content:center;border:1px solid #ced4da}.core-org-param-container>.seeker-icon-wrapper>.flex-wrapper>i.close-icon{color:#848484;font-size:20px}.core-org-param-container .input-wrapper{height:var(--size-form-control-height)}.core-org-param-container .input-wrapper label.text span{display:block;height:calc(var(--size-form-control-height) - 12px);line-height:calc(var(--size-form-control-height) - 12px);width:calc(100% - var(--size-form-control-height));overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:inherit}.core-org-param-container .input-wrapper .clear-icon-wrapper{display:none;position:absolute;background-color:transparent;right:28px;top:3px;width:35px;height:35px;cursor:pointer}.core-org-param-container .input-wrapper .clear-icon-wrapper>.flex-wrapper{width:35px;height:35px;display:flex;align-items:center;justify-content:center}.core-org-param-container .input-wrapper .clear-icon-wrapper>.flex-wrapper>i{color:#848484;font-size:20px}.core-org-param-container .input-wrapper:hover>.clear-icon-wrapper{display:block}.core-org-param-container>.seeker-icon-wrapper.multi-mode{position:relative;width:35px;height:35px}.core-org-param-container>.seeker-icon-wrapper.multi-mode>.flex-wrapper{width:35px;height:35px}.core-org-param-container .source-container{display:block;background-color:#fff;padding:var(--size-layout-block-cell-spacing);max-width:1200px}.core-org-param-container .source-container i.close-icon{font-size:20px;cursor:pointer;position:absolute;right:15px;top:15px}.core-org-param-container .source-container.d-none{display:none}.core-org-param-container .source-container>caption{display:block;width:100%}.core-org-param-container .source-container:has(~.footer){border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.core-org-param-container .footer{background-color:var(--color-bg-main);padding:var(--size-layout-block-cell-spacing);position:absolute;bottom:0;left:0;width:100%}.core-org-param-container .footer button{border-radius:0}.core-org-param-container .footer button:first-child{margin-right:var(--size-layout-block-cell-spacing)}.core-org-param-container .footer button:last-child{color:#fff;background-color:#000}.core-org-param-container .core-tabbe-wrapper{margin-top:5px}\n"] }]
|
|
21187
21926
|
}], ctorParameters: () => [{ type: SeekerService }, { type: LayoutService }, { type: OrganizationService }, { type: MultiLanguageService }], propDecorators: { accessorMode: [{
|
|
21188
21927
|
type: Input
|
|
21189
21928
|
}] } });
|
|
@@ -21511,7 +22250,6 @@ class AtWorksignComponent extends BaseComponent {
|
|
|
21511
22250
|
this.endDateString = this.endDate.toDateString();
|
|
21512
22251
|
break;
|
|
21513
22252
|
case EnumWorkScheduleViewMode.CUSTOM:
|
|
21514
|
-
debugger;
|
|
21515
22253
|
this.endDate = new Date(this.startDate);
|
|
21516
22254
|
this.endDate.setDate(this.startDate.getDate() + 13);
|
|
21517
22255
|
this.endDateString = this.endDate.toDateString();
|
|
@@ -21579,43 +22317,6 @@ class AtWorksignComponent extends BaseComponent {
|
|
|
21579
22317
|
case EnumCoreButtonVNSCode.HEADER_CREATE:
|
|
21580
22318
|
this.alertService.info("This screen is designed for direct DnD (drag and drop) and do not have 'CREATE' action", alertOptions);
|
|
21581
22319
|
break;
|
|
21582
|
-
// this.atWorksignService.atSalaryPeriod$.next({
|
|
21583
|
-
// periodId: this.periodId,
|
|
21584
|
-
// startDate: this.startPeriod,
|
|
21585
|
-
// endDate: this.endPeriod,
|
|
21586
|
-
// })
|
|
21587
|
-
// this.router.navigate([
|
|
21588
|
-
// "individual-apply",
|
|
21589
|
-
// { listInstance: this.listInstance }
|
|
21590
|
-
// ], {
|
|
21591
|
-
// relativeTo: this.route.parent
|
|
21592
|
-
// })
|
|
21593
|
-
// break;
|
|
21594
|
-
/*
|
|
21595
|
-
this.shiftSortService.changeListEmployeeSelected([]);
|
|
21596
|
-
this.corePageEditService.fromUrl = this.router.url;
|
|
21597
|
-
|
|
21598
|
-
this.router.navigate([btoa('0'), { listInstance: this.corePageListInstanceNumber }], {
|
|
21599
|
-
relativeTo: this.route.parent,
|
|
21600
|
-
});
|
|
21601
|
-
break;
|
|
21602
|
-
case EnumCoreButtonVNSCode.HEADER_EDIT:
|
|
21603
|
-
if (this.selectedIds.length > 1) {
|
|
21604
|
-
this.alertService.error(this.mls.trans('SELECT_ONLY_ONE_RECORD_TO_EDIT'), alertOptions);
|
|
21605
|
-
}
|
|
21606
|
-
else {
|
|
21607
|
-
if (this.selectedIds.length == 1) {
|
|
21608
|
-
this.router.navigate([btoa('' + this.selectedIds[0]), { listInstance: this.corePageListInstanceNumber }], {
|
|
21609
|
-
relativeTo: this.route.parent,
|
|
21610
|
-
});
|
|
21611
|
-
} else {
|
|
21612
|
-
this.alertService.error(this.mls.trans('NO_SELECTED_ID_TO_EDIT'), alertOptions);
|
|
21613
|
-
}
|
|
21614
|
-
|
|
21615
|
-
}
|
|
21616
|
-
|
|
21617
|
-
break;
|
|
21618
|
-
*/
|
|
21619
22320
|
case EnumCoreButtonVNSCode.HEADER_DELETE:
|
|
21620
22321
|
if (this.selectedIds.length != 0) {
|
|
21621
22322
|
this.router.navigate([
|
|
@@ -21631,8 +22332,18 @@ class AtWorksignComponent extends BaseComponent {
|
|
|
21631
22332
|
}
|
|
21632
22333
|
break;
|
|
21633
22334
|
case EnumCoreButtonVNSCode.HEADER_GETSHIFTDEFAULT:
|
|
21634
|
-
this.
|
|
21635
|
-
|
|
22335
|
+
this.router.navigateByUrl('/cms/attendance/business/at-shift-pattern/apply');
|
|
22336
|
+
/*
|
|
22337
|
+
this.pendingAction = EnumCoreButtonVNSCode.HEADER_GETSHIFTDEFAULT
|
|
22338
|
+
this.dialogService.createNew(
|
|
22339
|
+
EnumTranslateKey.UI_CORE_DIALOG_SERVICE_CONFIRMATION,
|
|
22340
|
+
EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_BUTTON_CONFIRM,
|
|
22341
|
+
EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_BUTTON_CANCEL,
|
|
22342
|
+
undefined,
|
|
22343
|
+
EnumTranslateKey.UI_CORE_DIALOG_COMFIRM_GET_DEFAULT_SHIFT,
|
|
22344
|
+
[]
|
|
22345
|
+
);
|
|
22346
|
+
*/
|
|
21636
22347
|
break;
|
|
21637
22348
|
case EnumCoreButtonVNSCode.HEADER_DOWNLOAD:
|
|
21638
22349
|
break;
|
|
@@ -21648,44 +22359,10 @@ class AtWorksignComponent extends BaseComponent {
|
|
|
21648
22359
|
},
|
|
21649
22360
|
], { relativeTo: this.route });
|
|
21650
22361
|
break;
|
|
21651
|
-
/*
|
|
21652
|
-
if (this.orgIds != null && this.orgIds.length > 0) {
|
|
21653
|
-
this.loadingExport = true;
|
|
21654
|
-
const requestBody = {
|
|
21655
|
-
periodId: this.salPeriod,
|
|
21656
|
-
lstOrg: this.orgIds
|
|
21657
|
-
};
|
|
21658
|
-
this.subscriptions.push(
|
|
21659
|
-
this.appService.blobPost(api.AT_SHIFT_SORT_EXPORT_TEMP, requestBody).subscribe(x => {
|
|
21660
|
-
if (x.ok && x.status === 200) {
|
|
21661
|
-
let downloadLink = document.createElement("a");
|
|
21662
|
-
downloadLink.href = window.URL.createObjectURL(new Blob([x.body]))
|
|
21663
|
-
downloadLink.setAttribute("download", "IMPORT_SHIFT_SORT_TEMP.xlsx");
|
|
21664
|
-
document.body.appendChild(downloadLink);
|
|
21665
|
-
downloadLink.click();
|
|
21666
|
-
this.loadingExport = false;
|
|
21667
|
-
}
|
|
21668
|
-
}))
|
|
21669
|
-
}
|
|
21670
|
-
else {
|
|
21671
|
-
debugger;
|
|
21672
|
-
|
|
21673
|
-
this.alertService.warn("Chưa chọn sơ đồ tổ chức", alertOptions);
|
|
21674
|
-
}
|
|
21675
|
-
break;
|
|
21676
|
-
*/
|
|
21677
22362
|
case EnumCoreButtonVNSCode.HEADER_UPLOAD:
|
|
21678
22363
|
break;
|
|
21679
|
-
/*
|
|
21680
|
-
this.openFileExplorer();
|
|
21681
|
-
break;
|
|
21682
|
-
*/
|
|
21683
22364
|
case EnumCoreButtonVNSCode.HEADER_EXPORTEXEL:
|
|
21684
22365
|
break;
|
|
21685
|
-
/*
|
|
21686
|
-
this.exportToExcel();
|
|
21687
|
-
break;
|
|
21688
|
-
*/
|
|
21689
22366
|
default:
|
|
21690
22367
|
break;
|
|
21691
22368
|
}
|
|
@@ -21704,15 +22381,11 @@ class AtWorksignComponent extends BaseComponent {
|
|
|
21704
22381
|
this.dialogService.resetService();
|
|
21705
22382
|
switch (this.pendingAction) {
|
|
21706
22383
|
case EnumCoreButtonVNSCode.HEADER_GETSHIFTDEFAULT:
|
|
21707
|
-
//this.loading = true;
|
|
21708
22384
|
this.longTaskService.longApiRunning$.next(true);
|
|
21709
22385
|
this.subscriptions.push(this.appService.post(api.AT_SHIFT_SORT_GET_SHIFT_DEFAULT + "?usehub=true", { periodId: this.salPeriod, listOrgIds: this.orgIds }).subscribe(x => {
|
|
21710
22386
|
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21711
22387
|
this.alertService.info(this.mls.trans('GET_SUCCESS'), alertOptions);
|
|
21712
22388
|
}
|
|
21713
|
-
else {
|
|
21714
|
-
//this.alertService.error(JSON.stringify(x), alertOptions)
|
|
21715
|
-
}
|
|
21716
22389
|
this.longTaskService.longApiRunning$.next(false);
|
|
21717
22390
|
this.pendingAction = '';
|
|
21718
22391
|
}));
|
|
@@ -21975,7 +22648,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
21975
22648
|
FullscreenModalLoaderComponent,
|
|
21976
22649
|
ThreedotsComponent,
|
|
21977
22650
|
CoreApiProgressComponent,
|
|
21978
|
-
TooltipDirective
|
|
22651
|
+
TooltipDirective,
|
|
21979
22652
|
], template: "<div class=\"at-worksign-container\">\r\n\r\n @if (loading) {\r\n <app-fullscreen-modal-loader [content]=\"threeDots\"></app-fullscreen-modal-loader>\r\n }\r\n\r\n @if (longTaskIsRunning) {\r\n <core-api-progress></core-api-progress>\r\n }\r\n\r\n <ng-template #top>\r\n <div class=\"d-flex d-flex-start mb15 pd3\">\r\n <!-- <div class=\"param-wrapper w250 mr15\">\r\n <div class=\"form-group vertical\">\r\n <core-org-param [accessorMode]=\"orgParamAccessorMode\" [(ngModel)]=\"orgIds\"\r\n (ngModelChange)=\"onOrgIdsChange($event)\"></core-org-param>\r\n </div>\r\n </div> -->\r\n <div class=\"param-wrapper w150 mr15\">\r\n <div class=\"form-group vertical\">\r\n <core-month-selector [(ngModel)]=\"currentMonth\"\r\n (ngModelChange)=\"onCurrentMonthChange($event)\"></core-month-selector>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w150 mr15\">\r\n <div class=\"form-group vertical\">\r\n <core-dropdown [paramMode]=\"true\" [(ngModel)]=\"subPeriodOption\"\r\n (ngModelChange)=\"onSubPeriodOptionChange($event)\" [options$]=\"subPeriodOptions$\"\r\n [getByIdObject$]=\"subPeriodGetByIdObject$\" [shownFrom]=\"''\" [clearDisable]=\"true\"\r\n [fitHeightWithItemCount]=\"true\"></core-dropdown>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w150 mr15\">\r\n <div class=\"form-group vertical\">\r\n <div class=\"d-flex d-flex-around\">\r\n @if (!fullPeriodMode) {\r\n <div (click)=\"goPreviousSevenDays()\" [class.disabled]=\"startDateString===startPeriodString\"><i\r\n class=\"feather-arrow-left fs24 color-gray\"></i></div>\r\n }\r\n <h6 style=\"color: gray;\" class=\"h35 d-flex no-margin user-select-none\">{{ startDate | tableCell: \"DATE_DDMM\"\r\n :\r\n lang }} - {{\r\n endDate | tableCell: \"DATE_DDMM\" : lang }}</h6>\r\n @if (!fullPeriodMode) {\r\n <div (click)=\"goNextSevenDays()\" [class.disabled]=\"endDateString===endPeriodString\"><i\r\n class=\"feather-arrow-right fs24 color-gray\"></i></div>\r\n }\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <core-page-list [top]=\"top\" [title]=\"title\" [apiDefinition]=\"apiDefinition\" [columns]=\"columns\"\r\n [disableDoubleClick]=\"true\" [selfResolveCorePageHeaderButtonClick]=\"true\" [rowHeight]=\"'71px'\" [frozen]=\"2\"\r\n [columnSearchDefaultOpen]=\"true\" [editRoute]=\"editRoute\" [crud]=\"crud\" [normalMode]=\"true\" [title]=\"title\"\r\n [outerInOperators]=\"outerInOperators\" [outerParam$]=\"outerParam$\" [changeTracking]=\"true\"\r\n [changedItems$]=\"changedItems$\" [outerFilterOperators]=\"filterOperators\" [extraManualOffset]=\"55\"\r\n [fixedPageSize]=\"10\" [autoResizeWithWindow]=\"true\" (corePageHeaderButtonClick)=\"onCorePageHeaderButtonClick($event)\"\r\n (rowDoubleClick)=\"onRowDoubleClick($event)\" (onInstanceCreated)=\"onListInstanceCreated($event)\"\r\n [paramRows]=\"paramRows\" [autoColumnFitAvailableSpace]=\"false\"></core-page-list>\r\n\r\n @if (showShiftCollection) {\r\n <core-shift-collection [height]=\"800\"></core-shift-collection>\r\n }\r\n\r\n @for (day of days; track $index) {\r\n <ng-template #shiftCell let-context=\"context\" let-isLocked=\"context.isLocked\">\r\n <core-shift-cell [ngModel]=\"context['shifts' + ($index + 1)]\" [$readOnly]=\"isLocked\"\r\n (ngModelChange)=\"onCellChange('shifts' + ($index + 1), $event, context)\"></core-shift-cell>\r\n </ng-template>\r\n }\r\n\r\n <ng-template #threeDots>\r\n <app-threedots></app-threedots>\r\n </ng-template>\r\n\r\n <ng-template #orgNameWithLock let-orgName=\"context.orgName\" let-isLocked=\"context.isLocked\">\r\n <div class=\"d-flex d-flex-start orgNameWrapper\">\r\n <div class=\"icon-wrapper\">\r\n @if (!!isLocked) {\r\n <i class=\"feather-lock\"></i>\r\n } @else {\r\n <i class=\"feather-bookmark\"></i>\r\n }\r\n </div>\r\n <div class=\"org-name\" [appTooltip]=\"orgName\">{{ orgName }}</div>\r\n </div>\r\n </ng-template>\r\n\r\n</div>", styles: [".icon-wrapper{display:block;width:20px;height:20px}.icon-wrapper i{color:#d3d3d3;font-size:20px}.icon-wrapper i.feather-lock{color:brown}.org-name{display:block;margin-left:8px;width:100%;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
21980
22653
|
}], ctorParameters: () => [{ type: MultiLanguageService }, { type: CoreButtonGroupService }, { type: OrganizationService }, { type: AppService }, { type: AtWorksignService }, { type: AlertService }, { type: CorePageListService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: DialogService }, { type: WorkShiftDndService }, { type: LongTaskService }, { type: CoreDatetimeService }], propDecorators: { orgNameWithLock: [{
|
|
21981
22654
|
type: ViewChild,
|
|
@@ -22130,11 +22803,175 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
22130
22803
|
args: ['status']
|
|
22131
22804
|
}] } });
|
|
22132
22805
|
|
|
22133
|
-
class IndividualScheduleApplyComponent
|
|
22134
|
-
|
|
22135
|
-
|
|
22806
|
+
class IndividualScheduleApplyComponent extends BaseComponent {
|
|
22807
|
+
constructor(mls) {
|
|
22808
|
+
super(mls);
|
|
22809
|
+
this.mls = mls;
|
|
22810
|
+
this.atWorksignService = inject(AtWorksignService);
|
|
22811
|
+
this.layoutService = inject(LayoutService);
|
|
22812
|
+
this.urlService = inject(UrlService);
|
|
22813
|
+
this.router = inject(Router);
|
|
22814
|
+
this.route = inject(ActivatedRoute);
|
|
22815
|
+
this.dialogService = inject(DialogService);
|
|
22816
|
+
this.appService = inject(AppService);
|
|
22817
|
+
this.workShiftDndService = inject(WorkShiftDndService);
|
|
22818
|
+
this.employeeSeekerSourceType = EnumCoreFormControlSeekerSourceType.EMPLOYEE_SEEK;
|
|
22819
|
+
this.employeeObjectList$ = new BehaviorSubject([]);
|
|
22820
|
+
this.selectedEmployees = [];
|
|
22821
|
+
this.shiftCell = [];
|
|
22822
|
+
this.fromPeriod = this.atWorksignService.atSalaryPeriod$.value?.startDate;
|
|
22823
|
+
this.toPeriod = this.atWorksignService.atSalaryPeriod$.value?.endDate;
|
|
22824
|
+
this.fromDate = this.atWorksignService.atSalaryPeriod$.value?.startDate || new Date();
|
|
22825
|
+
this.toDate = this.atWorksignService.atSalaryPeriod$.value?.endDate || new Date();
|
|
22826
|
+
this.buttons = [/*EnumCoreButtonVNSCode.NONE_HEADER_SAVE, */ EnumCoreButtonVNSCode.NONE_HEADER_CANCEL];
|
|
22827
|
+
this.selectedEmployeeTableHeight = 400;
|
|
22828
|
+
this.dateRangeLimit = {
|
|
22829
|
+
minDate: this.fromPeriod || new Date(1900, 1, 1),
|
|
22830
|
+
maxDate: this.toPeriod || new Date(1900, 1, 1)
|
|
22831
|
+
};
|
|
22832
|
+
this.listInstance = Number(this.route.snapshot.paramMap.get('listInstance'));
|
|
22833
|
+
this.workShiftDndService.collectionStarterX$.next(0);
|
|
22834
|
+
}
|
|
22835
|
+
onButtonClick(e) {
|
|
22836
|
+
switch (e.code) {
|
|
22837
|
+
case EnumCoreButtonVNSCode.NONE_HEADER_CANCEL:
|
|
22838
|
+
if (!!this.urlService.previousRouteUrl$.value.length) {
|
|
22839
|
+
this.router.navigateByUrl(this.urlService.previousRouteUrl$.value);
|
|
22840
|
+
}
|
|
22841
|
+
else {
|
|
22842
|
+
this.router.navigate(['../'], { relativeTo: this.route });
|
|
22843
|
+
}
|
|
22844
|
+
break;
|
|
22845
|
+
case EnumCoreButtonVNSCode.NONE_HEADER_SAVE:
|
|
22846
|
+
break;
|
|
22847
|
+
if (this.validateForm()) {
|
|
22848
|
+
console.log({
|
|
22849
|
+
periodId: this.atWorksignService.atSalaryPeriod$.value?.periodId || 0,
|
|
22850
|
+
shiftCell: this.shiftCell,
|
|
22851
|
+
fromDate: this.fromDate,
|
|
22852
|
+
toDate: this.toDate,
|
|
22853
|
+
selectedEmployees: this.selectedEmployees
|
|
22854
|
+
});
|
|
22855
|
+
const model = {
|
|
22856
|
+
periodId: this.atWorksignService.atSalaryPeriod$.value?.periodId || 0,
|
|
22857
|
+
shiftIds: this.shiftCell.map(x => x.id || 0),
|
|
22858
|
+
fromDate: new Date(new Date(this.fromDate).setHours(0, 0, 0, 0)),
|
|
22859
|
+
toDate: new Date(new Date(this.toDate).setHours(0, 0, 0, 0)),
|
|
22860
|
+
employeeIds: this.selectedEmployees
|
|
22861
|
+
};
|
|
22862
|
+
this.loading = true;
|
|
22863
|
+
this.subscriptions.push(this.appService.post("/api/AtWorksign/IndividualScheduleApply?computingWithLocalTimeZone=true", model).subscribe(x => {
|
|
22864
|
+
this.loading = false;
|
|
22865
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
22866
|
+
this.initialFormValueString = JSON.stringify({
|
|
22867
|
+
periodId: this.atWorksignService.atSalaryPeriod$.value?.periodId || 0,
|
|
22868
|
+
shiftCell: this.shiftCell,
|
|
22869
|
+
fromDate: this.fromDate,
|
|
22870
|
+
toDate: this.toDate,
|
|
22871
|
+
selectedEmployees: this.selectedEmployees
|
|
22872
|
+
});
|
|
22873
|
+
this.router.navigate(['../'], { relativeTo: this.route, state: { instanceNumber: this.listInstance } });
|
|
22874
|
+
}
|
|
22875
|
+
}));
|
|
22876
|
+
}
|
|
22877
|
+
break;
|
|
22878
|
+
default:
|
|
22879
|
+
break;
|
|
22880
|
+
}
|
|
22881
|
+
}
|
|
22882
|
+
validateForm() {
|
|
22883
|
+
let result = true;
|
|
22884
|
+
if (!this.shiftCell.length) {
|
|
22885
|
+
this.shiftCellError = 'TIME_MANAGEMENT_ERROR_AT_LEAST_ONE_SHIFT_REQUIRED';
|
|
22886
|
+
result = false;
|
|
22887
|
+
}
|
|
22888
|
+
if (this.fromDate === null) {
|
|
22889
|
+
this.fromDateError = 'TIME_MANAGEMENT_ERROR_THE_FROM_DATE_IS_REQUIRED';
|
|
22890
|
+
}
|
|
22891
|
+
if (this.toDate === null) {
|
|
22892
|
+
this.toDateError = 'TIME_MANAGEMENT_ERROR_THE_TO_DATE_IS_REQUIRED';
|
|
22893
|
+
}
|
|
22894
|
+
if (this.fromDate && this.toDate && this.fromDate > this.toDate) {
|
|
22895
|
+
this.fromDateError = 'TIME_MANAGEMENT_ERROR_THE_FROM_DATE_MUST_LESS_THAN_OR_EQUAL_THE_TO_DATE';
|
|
22896
|
+
result = false;
|
|
22897
|
+
}
|
|
22898
|
+
if (this.selectedEmployees.length === 0) {
|
|
22899
|
+
this.selectedEmployeesError = 'TIME_MANAGEMENT_ERROR_NO_EMPLOYEE_SELECTED';
|
|
22900
|
+
result = false;
|
|
22901
|
+
}
|
|
22902
|
+
return result;
|
|
22903
|
+
}
|
|
22904
|
+
ngAfterViewInit() {
|
|
22905
|
+
setTimeout(() => {
|
|
22906
|
+
this.selectedEmployeeTableHeight = window.innerHeight - this.layoutService.headerHeight$.value - this.layoutService.corePageHeaderHeight - 106 - 24 - 15 - 35 - 40 * 2 - 15 - 15;
|
|
22907
|
+
this.initialFormValueString = JSON.stringify({
|
|
22908
|
+
periodId: this.atWorksignService.atSalaryPeriod$.value?.periodId || 0,
|
|
22909
|
+
shiftCell: [],
|
|
22910
|
+
fromDate: this.fromDate,
|
|
22911
|
+
toDate: this.toDate,
|
|
22912
|
+
selectedEmployees: this.selectedEmployees
|
|
22913
|
+
});
|
|
22914
|
+
this.shiftCollectionHeight = window.innerHeight - this.layoutService.headerHeight$.value - this.layoutService.corePageHeaderHeight - 15;
|
|
22915
|
+
});
|
|
22916
|
+
}
|
|
22917
|
+
onShiftCellChange(e) {
|
|
22918
|
+
if (!!e.length) {
|
|
22919
|
+
this.shiftCellError = "";
|
|
22920
|
+
}
|
|
22921
|
+
else {
|
|
22922
|
+
this.shiftCellError = 'TIME_MANAGEMENT_ERROR_AT_LEAST_ONE_SHIFT_REQUIRED';
|
|
22923
|
+
}
|
|
22924
|
+
}
|
|
22925
|
+
onFromDateChange(e) {
|
|
22926
|
+
if (!!e) {
|
|
22927
|
+
this.fromDateError = "";
|
|
22928
|
+
}
|
|
22929
|
+
else {
|
|
22930
|
+
this.fromDateError = 'TIME_MANAGEMENT_ERROR_THE_FROM_DATE_IS_REQUIRED';
|
|
22931
|
+
}
|
|
22932
|
+
}
|
|
22933
|
+
onToDateChange(e) {
|
|
22934
|
+
if (!!e) {
|
|
22935
|
+
this.toDateError = "";
|
|
22936
|
+
}
|
|
22937
|
+
else {
|
|
22938
|
+
this.fromDateError = 'TIME_MANAGEMENT_ERROR_THE_TO_DATE_IS_REQUIRED';
|
|
22939
|
+
}
|
|
22940
|
+
}
|
|
22941
|
+
onSelectedEmployeesChange(e) {
|
|
22942
|
+
if (!!e.length) {
|
|
22943
|
+
this.selectedEmployeesError = "";
|
|
22944
|
+
}
|
|
22945
|
+
else {
|
|
22946
|
+
this.selectedEmployeesError = 'TIME_MANAGEMENT_ERROR_NO_EMPLOYEE_SELECTED';
|
|
22947
|
+
}
|
|
22948
|
+
}
|
|
22949
|
+
canDeactivate() {
|
|
22950
|
+
const condition = JSON.stringify({
|
|
22951
|
+
periodId: this.atWorksignService.atSalaryPeriod$.value?.periodId || 0,
|
|
22952
|
+
shiftCell: this.shiftCell,
|
|
22953
|
+
fromDate: this.fromDate,
|
|
22954
|
+
toDate: this.toDate,
|
|
22955
|
+
selectedEmployees: this.selectedEmployees
|
|
22956
|
+
}) === this.initialFormValueString;
|
|
22957
|
+
if (condition) {
|
|
22958
|
+
return true;
|
|
22959
|
+
}
|
|
22960
|
+
else {
|
|
22961
|
+
this.dialogService.busy = true;
|
|
22962
|
+
this.dialogService.showConfirmDialog$.next(true);
|
|
22963
|
+
this.dialogService.title$.next(EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_TITLE);
|
|
22964
|
+
this.dialogService.body$.next(EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_BODY_CHANGES_WILL_BE_LOST);
|
|
22965
|
+
this.dialogService.okButtonText$.next(EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_BUTTON_CONFIRM);
|
|
22966
|
+
this.dialogService.cancelButtonText$.next(EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_BUTTON_GO_BACK_TO_EDIT_FORM);
|
|
22967
|
+
const observable = this.dialogService.canDeactivate$.asObservable();
|
|
22968
|
+
return observable;
|
|
22969
|
+
}
|
|
22970
|
+
}
|
|
22971
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: IndividualScheduleApplyComponent, deps: [{ token: MultiLanguageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22972
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.1", type: IndividualScheduleApplyComponent, isStandalone: true, selector: "app-individual-schedule-apply", usesInheritance: true, ngImport: i0, template: "<div class=\"modal-container\">\r\n\r\n <div class=\"modal-content-root\">\r\n\r\n <h2>THIS COMPONENT IS DEPRECATED</h2>\r\n <div class=\"buttons d-flex d-flex-end\">\r\n <core-button-group-vns [shownItems]=\"buttons\" [showCaption]=\"true\"\r\n (buttonClick)=\"onButtonClick($event)\"></core-button-group-vns>\r\n </div>\r\n\r\n <!-- <div class=\"app-individual-schedule-apply\">\r\n <div class=\"inner-container\">\r\n <core-page-header [title]=\"'UI_COMPONENT_TITLE_INDIVIDUAL_WORK_SCHEDULE_APPLY'\"\r\n [hideButtonGroup]=\"true\"></core-page-header>\r\n <div class=\"body\">\r\n <div class=\"w320 d-inline-block shift-collection\">\r\n <core-shift-collection [relativeMode]=\"true\" [height]=\"shiftCollectionHeight\"></core-shift-collection>\r\n </div>\r\n <div class=\"d-inline-block right-part pl15\">\r\n <div class=\"shift-cell-and-date-range d-inline-flex\">\r\n <div class=\"d-inline-block shift-cell pt15\">\r\n <label>{{ 'UI_TIME_MANAGEMENT_SHIFT_CELL' | translate: lang }}</label>\r\n <core-shift-cell [(ngModel)]=\"shiftCell\" (ngModelChange)=\"onShiftCellChange($event)\" [$hideStarterPlusSign]=\"true\"></core-shift-cell>\r\n @if (shiftCellError && shiftCellError.length) {\r\n <p class=\"form-control-error p-absolute\">{{shiftCellError | translate: lang}}</p>\r\n }\r\n </div>\r\n <div class=\"p15\">\r\n <label>{{ 'FROM_DATE' | translate: lang }}</label>\r\n <div class=\"mt15\">\r\n <core-date-picker [(ngModel)]=\"fromDate\" (ngModelChange)=\"onFromDateChange($event)\"></core-date-picker>\r\n </div>\r\n @if (fromDateError && fromDateError.length) {\r\n <p class=\"form-control-error p-absolute\">{{fromDateError | translate: lang}}</p>\r\n }\r\n </div>\r\n <div class=\"p15\">\r\n <label>{{ 'TO_DATE' | translate: lang }}</label>\r\n <div class=\"mt15\">\r\n <core-date-picker [(ngModel)]=\"toDate\" (ngModelChange)=\"onToDateChange($event)\"></core-date-picker>\r\n </div>\r\n @if (toDateError && toDateError.length) {\r\n <p class=\"form-control-error p-absolute\">{{toDateError | translate: lang}}</p>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"selected-employees mt30 mb15\">\r\n <label>{{ 'SELECT_EMPLOYEES' | translate: lang }}</label>\r\n <core-form-control-seeker [paramMode]=\"true\" [seekerSourceType]=\"employeeSeekerSourceType\"\r\n [multiMode]=\"true\" [objectList$]=\"employeeObjectList$\"\r\n [excludeExistingList]=\"true\"\r\n [multiModeTableHeight]=\"selectedEmployeeTableHeight\" [(ngModel)]=\"selectedEmployees\" (ngModelChange)=\"onSelectedEmployeesChange($event)\">\r\n </core-form-control-seeker>\r\n @if (selectedEmployeesError && selectedEmployeesError.length) {\r\n <p class=\"form-control-error p-absolute\">{{selectedEmployeesError | translate: lang}}</p>\r\n }\r\n </div>\r\n <div class=\"buttons d-flex d-flex-end\">\r\n <core-button-group-vns [shownItems]=\"buttons\" [showCaption]=\"true\"\r\n (buttonClick)=\"onButtonClick($event)\"></core-button-group-vns>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n", styles: [".app-individual-schedule-apply .inner-container .body{display:flex}.app-individual-schedule-apply .inner-container .body .right-part .shift-cell-and-date-range .shift-cell{width:262px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: CoreButtonGroupVnsComponent, selector: "core-button-group-vns", inputs: ["height", "instanceNumber", "forHeader", "fixedShow", "shownItems", "showCaption", "lastChildEffectOff"], outputs: ["buttonClick"] }] }); }
|
|
22136
22973
|
}
|
|
22137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: IndividualScheduleApplyComponent
|
|
22974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: IndividualScheduleApplyComponent, decorators: [{
|
|
22138
22975
|
type: Component,
|
|
22139
22976
|
args: [{ selector: 'app-individual-schedule-apply', imports: [
|
|
22140
22977
|
FormsModule,
|
|
@@ -22145,8 +22982,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
22145
22982
|
CorePageHeaderComponent,
|
|
22146
22983
|
CoreButtonGroupVnsComponent,
|
|
22147
22984
|
TranslatePipe
|
|
22148
|
-
], template: "<div class=\"modal-container\">\r\n\r\n <div class=\"modal-content-root\">\r\n\r\n <h2>DEPRECATED</h2>\r\n\r\n <!-- <div class=\"app-individual-schedule-apply\">\r\n <div class=\"inner-container\">\r\n <core-page-header [title]=\"'UI_COMPONENT_TITLE_INDIVIDUAL_WORK_SCHEDULE_APPLY'\"\r\n [hideButtonGroup]=\"true\"></core-page-header>\r\n <div class=\"body\">\r\n <div class=\"w320 d-inline-block shift-collection\">\r\n <core-shift-collection [relativeMode]=\"true\" [height]=\"shiftCollectionHeight\"></core-shift-collection>\r\n </div>\r\n <div class=\"d-inline-block right-part pl15\">\r\n <div class=\"shift-cell-and-date-range d-inline-flex\">\r\n <div class=\"d-inline-block shift-cell pt15\">\r\n <label>{{ 'UI_TIME_MANAGEMENT_SHIFT_CELL' | translate: lang }}</label>\r\n <core-shift-cell [(ngModel)]=\"shiftCell\" (ngModelChange)=\"onShiftCellChange($event)\" [$hideStarterPlusSign]=\"true\"></core-shift-cell>\r\n @if (shiftCellError && shiftCellError.length) {\r\n <p class=\"form-control-error p-absolute\">{{shiftCellError | translate: lang}}</p>\r\n }\r\n </div>\r\n <div class=\"p15\">\r\n <label>{{ 'FROM_DATE' | translate: lang }}</label>\r\n <div class=\"mt15\">\r\n <core-date-picker [(ngModel)]=\"fromDate\" (ngModelChange)=\"onFromDateChange($event)\"></core-date-picker>\r\n </div>\r\n @if (fromDateError && fromDateError.length) {\r\n <p class=\"form-control-error p-absolute\">{{fromDateError | translate: lang}}</p>\r\n }\r\n </div>\r\n <div class=\"p15\">\r\n <label>{{ 'TO_DATE' | translate: lang }}</label>\r\n <div class=\"mt15\">\r\n <core-date-picker [(ngModel)]=\"toDate\" (ngModelChange)=\"onToDateChange($event)\"></core-date-picker>\r\n </div>\r\n @if (toDateError && toDateError.length) {\r\n <p class=\"form-control-error p-absolute\">{{toDateError | translate: lang}}</p>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"selected-employees mt30 mb15\">\r\n <label>{{ 'SELECT_EMPLOYEES' | translate: lang }}</label>\r\n <core-form-control-seeker [paramMode]=\"true\" [seekerSourceType]=\"employeeSeekerSourceType\"\r\n [multiMode]=\"true\" [objectList$]=\"employeeObjectList$\"\r\n [excludeExistingList]=\"true\"\r\n [multiModeTableHeight]=\"selectedEmployeeTableHeight\" [(ngModel)]=\"selectedEmployees\" (ngModelChange)=\"onSelectedEmployeesChange($event)\">\r\n </core-form-control-seeker>\r\n @if (selectedEmployeesError && selectedEmployeesError.length) {\r\n <p class=\"form-control-error p-absolute\">{{selectedEmployeesError | translate: lang}}</p>\r\n }\r\n </div>\r\n <div class=\"buttons d-flex d-flex-end\">\r\n <core-button-group-vns [shownItems]=\"buttons\" [showCaption]=\"true\"\r\n (buttonClick)=\"onButtonClick($event)\"></core-button-group-vns>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n", styles: [".app-individual-schedule-apply .inner-container .body{display:flex}.app-individual-schedule-apply .inner-container .body .right-part .shift-cell-and-date-range .shift-cell{width:262px}\n"] }]
|
|
22149
|
-
}] });
|
|
22985
|
+
], template: "<div class=\"modal-container\">\r\n\r\n <div class=\"modal-content-root\">\r\n\r\n <h2>THIS COMPONENT IS DEPRECATED</h2>\r\n <div class=\"buttons d-flex d-flex-end\">\r\n <core-button-group-vns [shownItems]=\"buttons\" [showCaption]=\"true\"\r\n (buttonClick)=\"onButtonClick($event)\"></core-button-group-vns>\r\n </div>\r\n\r\n <!-- <div class=\"app-individual-schedule-apply\">\r\n <div class=\"inner-container\">\r\n <core-page-header [title]=\"'UI_COMPONENT_TITLE_INDIVIDUAL_WORK_SCHEDULE_APPLY'\"\r\n [hideButtonGroup]=\"true\"></core-page-header>\r\n <div class=\"body\">\r\n <div class=\"w320 d-inline-block shift-collection\">\r\n <core-shift-collection [relativeMode]=\"true\" [height]=\"shiftCollectionHeight\"></core-shift-collection>\r\n </div>\r\n <div class=\"d-inline-block right-part pl15\">\r\n <div class=\"shift-cell-and-date-range d-inline-flex\">\r\n <div class=\"d-inline-block shift-cell pt15\">\r\n <label>{{ 'UI_TIME_MANAGEMENT_SHIFT_CELL' | translate: lang }}</label>\r\n <core-shift-cell [(ngModel)]=\"shiftCell\" (ngModelChange)=\"onShiftCellChange($event)\" [$hideStarterPlusSign]=\"true\"></core-shift-cell>\r\n @if (shiftCellError && shiftCellError.length) {\r\n <p class=\"form-control-error p-absolute\">{{shiftCellError | translate: lang}}</p>\r\n }\r\n </div>\r\n <div class=\"p15\">\r\n <label>{{ 'FROM_DATE' | translate: lang }}</label>\r\n <div class=\"mt15\">\r\n <core-date-picker [(ngModel)]=\"fromDate\" (ngModelChange)=\"onFromDateChange($event)\"></core-date-picker>\r\n </div>\r\n @if (fromDateError && fromDateError.length) {\r\n <p class=\"form-control-error p-absolute\">{{fromDateError | translate: lang}}</p>\r\n }\r\n </div>\r\n <div class=\"p15\">\r\n <label>{{ 'TO_DATE' | translate: lang }}</label>\r\n <div class=\"mt15\">\r\n <core-date-picker [(ngModel)]=\"toDate\" (ngModelChange)=\"onToDateChange($event)\"></core-date-picker>\r\n </div>\r\n @if (toDateError && toDateError.length) {\r\n <p class=\"form-control-error p-absolute\">{{toDateError | translate: lang}}</p>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"selected-employees mt30 mb15\">\r\n <label>{{ 'SELECT_EMPLOYEES' | translate: lang }}</label>\r\n <core-form-control-seeker [paramMode]=\"true\" [seekerSourceType]=\"employeeSeekerSourceType\"\r\n [multiMode]=\"true\" [objectList$]=\"employeeObjectList$\"\r\n [excludeExistingList]=\"true\"\r\n [multiModeTableHeight]=\"selectedEmployeeTableHeight\" [(ngModel)]=\"selectedEmployees\" (ngModelChange)=\"onSelectedEmployeesChange($event)\">\r\n </core-form-control-seeker>\r\n @if (selectedEmployeesError && selectedEmployeesError.length) {\r\n <p class=\"form-control-error p-absolute\">{{selectedEmployeesError | translate: lang}}</p>\r\n }\r\n </div>\r\n <div class=\"buttons d-flex d-flex-end\">\r\n <core-button-group-vns [shownItems]=\"buttons\" [showCaption]=\"true\"\r\n (buttonClick)=\"onButtonClick($event)\"></core-button-group-vns>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n", styles: [".app-individual-schedule-apply .inner-container .body{display:flex}.app-individual-schedule-apply .inner-container .body .right-part .shift-cell-and-date-range .shift-cell{width:262px}\n"] }]
|
|
22986
|
+
}], ctorParameters: () => [{ type: MultiLanguageService }] });
|
|
22150
22987
|
|
|
22151
22988
|
class FunctionEditService {
|
|
22152
22989
|
constructor(appService) {
|
|
@@ -33565,5 +34402,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
33565
34402
|
* Generated bundle index. Do not edit.
|
|
33566
34403
|
*/
|
|
33567
34404
|
|
|
33568
|
-
export { ActionService, ActionSvgEditComponent, AlertComponent, AlertService, AnimatedTextComponent, AnimatedTextService, AppConfigService, AppInitializationService, AppService, ApplicationHelpService, AtShiftPatternComponent, AtShiftPatternEditComponent, AtWorksignComponent, AtWorksignService, AuthService, BaseComponent, BaseDropdownComponent, BaseEditComponent, ButtonGroupComponent, ButtonGroupModule, ButtonGroupService, CORE_VNS_BUTTONS, CacheService, CanActivateFunctionUrlMapperGuard, CanDeactivateGuard, CheckForUpdateService, ClientService, CommonHttpRequestService, ConfigService, ConfirmDialogStateComponent, ControlBase, CoreAccordionComponent, CoreAccordionService, CoreActiveUserCountComponent, CoreApiProgressComponent, CoreAttachmentComponent, CoreButtonComponent, CoreButtonGroupComponent, CoreButtonGroupService, CoreButtonGroupVnsComponent, CoreButtonVnsComponent, CoreCheckboxComponent, CoreChecklistComponent, CoreCommonParamKitComponent, CoreCompareDbPipelineComponent, CoreCompositionComponent, CoreCompositionService, CoreCompositionState, CoreConfirmDialogComponent, CoreContractSeekerComponent, CoreControlComponent, CoreControlNoGridBufferComponent, CoreControlNoSeekerComponent, CoreControlService, CoreCurrencyInputComponent, CoreD3Service, CoreDatePickerComponent, CoreDatetimeService, CoreDropdownComponent, CoreEmployeeScheduleComponent, CoreEmployeeSeekerComponent, CoreFileFormatPickerComponent, CoreFileUploaderComponent, CoreFilterHubComponent, CoreFilterHubService, CoreFormComponent, CoreFormControlBaseComponent, CoreFormControlSeekerComponent, CoreFormLiteComponent, CoreFormService, CoreFormTabComponent, CoreGridBufferComponent, CoreHeaderParamsComponent, CoreHelperComponent, CoreIosSwitcherComponent, CoreLineComponent, CoreListComponent, CoreListLazyComponent, CoreLoadingSurfaceComponent, CoreMccComponent, CoreMonthPickerComponent, CoreMonthSelectorComponent, CoreNavigationTrackerComponent, CoreOauthCallbackComponent, CoreOauthCallbackOffice365Component, CoreOrgParamComponent, CoreOrgTreeComponent, CoreOrgTreeService, CoreOrgTreeState, CoreOrgUnitSeekerComponent, CoreOrgchartflexComponent, CorePageEditComponent, CorePageEditLiteComponent, CorePageEditService, CorePageEditTabComponent, CorePageHeaderComponent, CorePageListComponent, CorePageListContentComponent, CorePageListService, CorePageListState, CorePageViewComponent, CorePaginationComponent, CorePaginationFullComponent, CorePaginationFullService, CoreParamControlComponent, CorePermissionActionsComponent, CorePermissionComponent, CorePermissionService, CorePieComponent, CorePositionConcurrentSeekerComponent, CorePositionSeekerComponent, CoreQrcodeComponent, CoreQueryBuilderComponent, CoreRadioGroupComponent, CoreReducerIconComponent, CoreRootMenuItemPickerComponent, CoreRootMenuItemPickerService, CoreRotatingTextComponent, CoreRouteAccumulatorComponent, CoreRoutingHistoryComponent, CoreSalaryPolicyPickerComponent, CoreScatterPlotComponent, CoreScrollComponent, CoreScrollLazyComponent, CoreSeenByComponent, CoreShiftCardComponent, CoreShiftCellComponent, CoreShiftCollectionComponent, CoreShiftStickerComponent, CoreStatisticWidgetComponent, CoreStatusStickerComponent, CoreSubFormGroupComponent, CoreTabListComponent, CoreTableComponent, CoreTableService, CoreTabsComponent, CoreTagsComponent, CoreTopicPickerComponent, CoreTopicTreeComponent, CoreTreeComponent, CoreTreeGridComponent, CoreWageSeekerComponent, CoreWorkingSeekerComponent, CoreYearPickerComponent, CoreYearSelectorComponent, CustomValidators, DATE_VALUE_ACCESSOR, DEFAULT_SVG, DESKTOP_SCREEN_HEDER_HEIGHT, DateValueAccessor, DecisionComponent, DialogService, DialogStateComponent, DndService, DomService, ECoreTableToolClass, ECoreTableToolCode, EnumAlertType, EnumBrowserType, EnumButtonCaptionCode, EnumCoreArticleCategoryTreeaAccessorMode, EnumCoreButtonCode, EnumCoreButtonVNSCode, EnumCoreD3ScaleType, EnumCoreFileUploaderType, EnumCoreFormControlSeekerSourceType, EnumCoreOrgTreeaAccessorMode, EnumCoreOrgTreeaSearchMode, EnumCorePageEditBootstrapClass, EnumCorePageEditFieldType, EnumCorePageEditMode, EnumCoreSeekerColumnContract, EnumCoreSeekerColumnJob, EnumCoreSeekerColumnPosition, EnumCoreSeekerColumnPositionConcurrent, EnumCoreSeekerColumnStaffProfile, EnumCoreSeekerColumnWage, EnumCoreSeekerColumnWorking, EnumCoreTablePipeType, EnumCoreTreeGridEditMode, EnumCoreViewItemType, EnumDeviceType, EnumDragType, EnumErrorType, EnumExType, EnumFilterOperator, EnumFormBaseContolType, EnumHrComparisonCode, EnumICoreStatisticWidgetDataType, EnumIconClass, EnumImageResolverType, EnumNotificationDir, EnumOparator, EnumOsType, EnumPermissionObjectType, EnumProfileInfoSector, EnumRecursiveFields, EnumSignalRType, EnumSortDirection, EnumSsrsExpressExportFormat, EnumSsrsExpressFileExtension, EnumStyleButtonClass, EnumSwUpdateVersionUpdatesEventType, EnumWorkScheduleViewMode, EvaluateDialogComponent, EvaluateDialogService, FileService, FilterKitService, FilterPipe, FooterComponent, FullscreenModalLoaderComponent, FunctionComponent, FunctionEditComponent, FunctionEditService, FunctionIgnoreComponent, FunctionIgnoreEditComponent, GroupFunctionComponent, GroupFunctionEditComponent, GrpcService, HeaderService, HistoryService, HotKeysDirective, HttpErrorHandler, HubConnectionService, HuconcurrentlyComponent, IAlertOptions, ImageErrorResolverDirective, InMemoryComponent, IndividualScheduleApplyComponent, InitializationCanActivateFn, InitializationCanMatchFn, InterceptorSkipHeader, IpServiceService, ItemComponent, JobComponent, JsonService, LanguageChangerComponent, LanguageComponent, LanguageEditComponent, LayoutService, LongTaskService, MOBILE_SCREEN_HEDER_HEIGHT, MapAppdemoToServerPipePipe, MapAttachmentToServerPipe, MapAvatarToServerPipe, MapNewsfeedMediaToServerPipe, MapService, MenuComponent, MenuEditComponent, MenuService, MessageService, ModalService, MultiLanguageService, MutationLogComponent, MutationViewComponent, NavigatorComponent, NavigatorService, NewlyCreatedTokenService, NormalizeHumanNamePipe, NotificationActionType, OnlineUsersComponent, OrganizationService, OtpInputComponent, OtpInputService, PaSalaryPolicyComponent, PaSalaryPolicyEditComponent, PageTitleComponent, PaginationComponent, PkceService, PortalRouteComponent, PortalRouteEditComponent, PositionComponent, PositionEditService, PositionTransferService, PushNotificationService, RandomAvatarService, RecursiveService, RequestCache, RequestCacheWithMap, ResponseService, RightchatComponent, RoutingService, STICKER_COLOR_SCHEMA, ScheduleOverviewComponent, SeekerService, SocketService, SsrsExpressService, StaffProfileComponent, StatisticAuthService, StatisticService, StringHtmlPipe, StringService, SunnyRotatingComponent, SysActionComponent, SysActionEditComponent, SysFunctionActionComponent, SysFunctionActionEditComponent, SysFunctionActionMapperComponent, SysFunctionUrlMapperComponent, SysMenuService, SysModuleComponent, SysModuleEditComponent, SysRouteAccessComponent, TLA_CONFIG, TableCellPipe, Textbox, ThreedotsComponent, TimeSheetService, TooltipComponent, TooltipDirective, TopicPermissionService, TopicTreeService, TranslatePipe, UnicodeService, UploadedFileService, UploadedFilenameCutoffPipe, UrlService, UserActivityComponent, UserActivityService, WageComponent, WaittingScreenComponent, WorkShiftDndService, alertOptions, appTypeInterceptor, attachmentOptions, authInterceptor, baseUrlInterceptor, blob_to_base64_script, cachingInterceptor, defaultPaging, graphInterceptor, httpInterceptorProviders, langInterceptor, liner_to_nested_array_script, longAlertOptions, noneAutoClosedAlertOptions, normalizeHumanName, responseInterceptor, themeBlue, timeZoneInterceptor, tokenInterceptor };
|
|
34405
|
+
export { ActionService, ActionSvgEditComponent, AlertComponent, AlertService, AnimatedTextComponent, AnimatedTextService, AppConfigService, AppInitializationService, AppService, ApplicationHelpService, AtShiftPatternApplyComponent, AtShiftPatternComponent, AtShiftPatternEditComponent, AtWorksignComponent, AtWorksignService, AuthService, BaseComponent, BaseDropdownComponent, BaseEditComponent, ButtonGroupComponent, ButtonGroupModule, ButtonGroupService, CORE_VNS_BUTTONS, CacheService, CanActivateFunctionUrlMapperGuard, CanDeactivateGuard, CheckForUpdateService, ClientService, CommonHttpRequestService, ConfigService, ConfirmDialogStateComponent, ControlBase, CoreAccordionComponent, CoreAccordionService, CoreActiveUserCountComponent, CoreApiProgressComponent, CoreAttachmentComponent, CoreButtonComponent, CoreButtonGroupComponent, CoreButtonGroupService, CoreButtonGroupVnsComponent, CoreButtonVnsComponent, CoreCheckboxComponent, CoreChecklistComponent, CoreCommonParamKitComponent, CoreCompareDbPipelineComponent, CoreCompositionComponent, CoreCompositionService, CoreCompositionState, CoreConfirmDialogComponent, CoreContractSeekerComponent, CoreControlComponent, CoreControlNoGridBufferComponent, CoreControlNoSeekerComponent, CoreControlService, CoreCurrencyInputComponent, CoreD3Service, CoreDatePickerComponent, CoreDatetimeService, CoreDropdownComponent, CoreEmployeeScheduleComponent, CoreEmployeeSeekerComponent, CoreFileFormatPickerComponent, CoreFileUploaderComponent, CoreFilterHubComponent, CoreFilterHubService, CoreFormComponent, CoreFormControlBaseComponent, CoreFormControlSeekerComponent, CoreFormLiteComponent, CoreFormService, CoreFormTabComponent, CoreGridBufferComponent, CoreHeaderParamsComponent, CoreHelperComponent, CoreIosSwitcherComponent, CoreLineComponent, CoreListComponent, CoreListLazyComponent, CoreLoadingSurfaceComponent, CoreMccComponent, CoreMonthPickerComponent, CoreMonthSelectorComponent, CoreNavigationTrackerComponent, CoreOauthCallbackComponent, CoreOauthCallbackOffice365Component, CoreOrgParamComponent, CoreOrgTreeComponent, CoreOrgTreeService, CoreOrgTreeState, CoreOrgUnitSeekerComponent, CoreOrgchartflexComponent, CorePageEditComponent, CorePageEditLiteComponent, CorePageEditService, CorePageEditTabComponent, CorePageHeaderComponent, CorePageListComponent, CorePageListContentComponent, CorePageListService, CorePageListState, CorePageViewComponent, CorePaginationComponent, CorePaginationFullComponent, CorePaginationFullService, CoreParamControlComponent, CorePermissionActionsComponent, CorePermissionComponent, CorePermissionService, CorePieComponent, CorePositionConcurrentSeekerComponent, CorePositionSeekerComponent, CoreQrcodeComponent, CoreQueryBuilderComponent, CoreRadioGroupComponent, CoreReducerIconComponent, CoreRootMenuItemPickerComponent, CoreRootMenuItemPickerService, CoreRotatingTextComponent, CoreRouteAccumulatorComponent, CoreRoutingHistoryComponent, CoreSalaryPolicyPickerComponent, CoreScatterPlotComponent, CoreScrollComponent, CoreScrollLazyComponent, CoreSeenByComponent, CoreShiftCardComponent, CoreShiftCellComponent, CoreShiftCollectionComponent, CoreShiftStickerComponent, CoreStatisticWidgetComponent, CoreStatusStickerComponent, CoreSubFormGroupComponent, CoreTabListComponent, CoreTableComponent, CoreTableService, CoreTabsComponent, CoreTagsComponent, CoreTopicPickerComponent, CoreTopicTreeComponent, CoreTreeComponent, CoreTreeGridComponent, CoreWageSeekerComponent, CoreWorkingSeekerComponent, CoreYearPickerComponent, CoreYearSelectorComponent, CustomValidators, DATE_VALUE_ACCESSOR, DEFAULT_SVG, DESKTOP_SCREEN_HEDER_HEIGHT, DateValueAccessor, DecisionComponent, DialogService, DialogStateComponent, DndService, DomService, ECoreTableToolClass, ECoreTableToolCode, EnumAlertType, EnumBrowserType, EnumButtonCaptionCode, EnumCoreArticleCategoryTreeaAccessorMode, EnumCoreButtonCode, EnumCoreButtonVNSCode, EnumCoreD3ScaleType, EnumCoreFileUploaderType, EnumCoreFormControlSeekerSourceType, EnumCoreOrgTreeaAccessorMode, EnumCoreOrgTreeaSearchMode, EnumCorePageEditBootstrapClass, EnumCorePageEditFieldType, EnumCorePageEditMode, EnumCoreSeekerColumnContract, EnumCoreSeekerColumnJob, EnumCoreSeekerColumnPosition, EnumCoreSeekerColumnPositionConcurrent, EnumCoreSeekerColumnStaffProfile, EnumCoreSeekerColumnWage, EnumCoreSeekerColumnWorking, EnumCoreTablePipeType, EnumCoreTreeGridEditMode, EnumCoreViewItemType, EnumDeviceType, EnumDragType, EnumErrorType, EnumExType, EnumFilterOperator, EnumFormBaseContolType, EnumHrComparisonCode, EnumICoreStatisticWidgetDataType, EnumIconClass, EnumImageResolverType, EnumNotificationDir, EnumOparator, EnumOsType, EnumPermissionObjectType, EnumProfileInfoSector, EnumRecursiveFields, EnumSignalRType, EnumSortDirection, EnumSsrsExpressExportFormat, EnumSsrsExpressFileExtension, EnumStyleButtonClass, EnumSwUpdateVersionUpdatesEventType, EnumWorkScheduleViewMode, EvaluateDialogComponent, EvaluateDialogService, FileService, FilterKitService, FilterPipe, FooterComponent, FullscreenModalLoaderComponent, FunctionComponent, FunctionEditComponent, FunctionEditService, FunctionIgnoreComponent, FunctionIgnoreEditComponent, GroupFunctionComponent, GroupFunctionEditComponent, GrpcService, HeaderService, HistoryService, HotKeysDirective, HttpErrorHandler, HubConnectionService, HuconcurrentlyComponent, IAlertOptions, ImageErrorResolverDirective, InMemoryComponent, IndividualScheduleApplyComponent, InitializationCanActivateFn, InitializationCanMatchFn, InterceptorSkipHeader, IpServiceService, ItemComponent, JobComponent, JsonService, LanguageChangerComponent, LanguageComponent, LanguageEditComponent, LayoutService, LongTaskService, MOBILE_SCREEN_HEDER_HEIGHT, MapAppdemoToServerPipePipe, MapAttachmentToServerPipe, MapAvatarToServerPipe, MapNewsfeedMediaToServerPipe, MapService, MenuComponent, MenuEditComponent, MenuService, MessageService, ModalService, MultiLanguageService, MutationLogComponent, MutationViewComponent, NavigatorComponent, NavigatorService, NewlyCreatedTokenService, NormalizeHumanNamePipe, NotificationActionType, OnlineUsersComponent, OrganizationService, OtpInputComponent, OtpInputService, PaSalaryPolicyComponent, PaSalaryPolicyEditComponent, PageTitleComponent, PaginationComponent, PkceService, PortalRouteComponent, PortalRouteEditComponent, PositionComponent, PositionEditService, PositionTransferService, PushNotificationService, RandomAvatarService, RecursiveService, RequestCache, RequestCacheWithMap, ResponseService, RightchatComponent, RoutingService, STICKER_COLOR_SCHEMA, ScheduleOverviewComponent, SeekerService, SocketService, SsrsExpressService, StaffProfileComponent, StatisticAuthService, StatisticService, StringHtmlPipe, StringService, SunnyRotatingComponent, SysActionComponent, SysActionEditComponent, SysFunctionActionComponent, SysFunctionActionEditComponent, SysFunctionActionMapperComponent, SysFunctionUrlMapperComponent, SysMenuService, SysModuleComponent, SysModuleEditComponent, SysRouteAccessComponent, TLA_CONFIG, TableCellPipe, Textbox, ThreedotsComponent, TimeSheetService, TooltipComponent, TooltipDirective, TopicPermissionService, TopicTreeService, TranslatePipe, UnicodeService, UploadedFileService, UploadedFilenameCutoffPipe, UrlService, UserActivityComponent, UserActivityService, WageComponent, WaittingScreenComponent, WorkShiftDndService, alertOptions, appTypeInterceptor, attachmentOptions, authInterceptor, baseUrlInterceptor, blob_to_base64_script, cachingInterceptor, defaultPaging, graphInterceptor, httpInterceptorProviders, langInterceptor, liner_to_nested_array_script, longAlertOptions, noneAutoClosedAlertOptions, normalizeHumanName, responseInterceptor, themeBlue, timeZoneInterceptor, tokenInterceptor };
|
|
33569
34406
|
//# sourceMappingURL=ngx-histaff-alpha.mjs.map
|