ngx-histaff-alpha 4.9.3 → 4.9.4
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 +700 -97
- package/fesm2022/ngx-histaff-alpha.mjs.map +1 -1
- package/lib/app/enum/EnumDragType.d.ts +2 -1
- package/lib/app/interfaces/time-management/IAtShiftPattern.d.ts +0 -1
- package/lib/app/interfaces/time-management/IAtShiftPatternPreview.d.ts +5 -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/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 +60 -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;
|
|
@@ -12616,6 +12617,7 @@ class CoreDatePickerComponent extends CoreFormControlBaseComponent {
|
|
|
12616
12617
|
console.log("UTC input ", input);
|
|
12617
12618
|
let obj = new Date();
|
|
12618
12619
|
if (input === null) {
|
|
12620
|
+
this.value = null;
|
|
12619
12621
|
this.textValue = '';
|
|
12620
12622
|
return;
|
|
12621
12623
|
}
|
|
@@ -12627,7 +12629,7 @@ class CoreDatePickerComponent extends CoreFormControlBaseComponent {
|
|
|
12627
12629
|
obj = new Date(new Date(input).setHours(0, 0, 0, 0));
|
|
12628
12630
|
}
|
|
12629
12631
|
}
|
|
12630
|
-
else if (input !== null && typeof (input
|
|
12632
|
+
else if (input !== null && typeof (input?.getFullYear) === "function") {
|
|
12631
12633
|
obj = input;
|
|
12632
12634
|
}
|
|
12633
12635
|
else {
|
|
@@ -19542,7 +19544,6 @@ class CoreShiftCellComponent extends CoreFormControlBaseComponent {
|
|
|
19542
19544
|
cleanUpSubsequentSubscriptions() {
|
|
19543
19545
|
this.dndEventSubscriptions.dragover?.unsubscribe();
|
|
19544
19546
|
this.dndEventSubscriptions.drop?.unsubscribe();
|
|
19545
|
-
//this.dndEventSubscriptions.dragleave?.unsubscribe();
|
|
19546
19547
|
}
|
|
19547
19548
|
ngAfterViewInit() {
|
|
19548
19549
|
setTimeout(() => {
|
|
@@ -20627,10 +20628,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
20627
20628
|
}], ctorParameters: () => [{ type: DialogService }] });
|
|
20628
20629
|
|
|
20629
20630
|
class AtShiftPatternService {
|
|
20630
|
-
constructor() {
|
|
20631
|
+
constructor(appService) {
|
|
20632
|
+
this.appService = appService;
|
|
20631
20633
|
this.activePattern$ = new BehaviorSubject(undefined);
|
|
20632
20634
|
}
|
|
20633
|
-
|
|
20635
|
+
loadItem(id) {
|
|
20636
|
+
return this.appService.get('/api/AtShiftPattern/GetByIdWithDetails?id=' + id);
|
|
20637
|
+
}
|
|
20638
|
+
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
20639
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtShiftPatternService, providedIn: 'root' }); }
|
|
20635
20640
|
}
|
|
20636
20641
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtShiftPatternService, decorators: [{
|
|
@@ -20638,7 +20643,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
20638
20643
|
args: [{
|
|
20639
20644
|
providedIn: 'root'
|
|
20640
20645
|
}]
|
|
20641
|
-
}], ctorParameters: () => [] });
|
|
20646
|
+
}], ctorParameters: () => [{ type: AppService }] });
|
|
20642
20647
|
|
|
20643
20648
|
class AtShiftPatternEditComponent extends BaseEditComponent {
|
|
20644
20649
|
constructor(dialogService, appService, atShiftPatternService, corePageListService, corePageEditService, coreFormService) {
|
|
@@ -20912,6 +20917,8 @@ class AtShiftPatternComponent extends BaseEditComponent {
|
|
|
20912
20917
|
this.atShiftPatternService = inject(AtShiftPatternService);
|
|
20913
20918
|
this.appService = inject(AppService);
|
|
20914
20919
|
this.coreButtonGroupService = inject(CoreButtonGroupService);
|
|
20920
|
+
this.router = inject(Router);
|
|
20921
|
+
this.route = inject(ActivatedRoute);
|
|
20915
20922
|
this.subscriptions = [];
|
|
20916
20923
|
this.rowClick$ = new BehaviorSubject(0);
|
|
20917
20924
|
this.title = "UI_COMPONENT_TITLE_AT_SHIFT_PATTERN";
|
|
@@ -20996,7 +21003,6 @@ class AtShiftPatternComponent extends BaseEditComponent {
|
|
|
20996
21003
|
});
|
|
20997
21004
|
}
|
|
20998
21005
|
onCorePageHeaderButtonClick(e) {
|
|
20999
|
-
console.log("onCorePageHeaderButtonClick", e);
|
|
21000
21006
|
switch (e.code) {
|
|
21001
21007
|
case EnumCoreButtonVNSCode.HEADER_SAVE:
|
|
21002
21008
|
this.loading = true;
|
|
@@ -21007,6 +21013,9 @@ class AtShiftPatternComponent extends BaseEditComponent {
|
|
|
21007
21013
|
}
|
|
21008
21014
|
}));
|
|
21009
21015
|
break;
|
|
21016
|
+
case EnumCoreButtonVNSCode.HEADER_INDIVIDUAL_SCHEDULE_APPLY:
|
|
21017
|
+
this.router.navigate(['apply'], { relativeTo: this.route });
|
|
21018
|
+
break;
|
|
21010
21019
|
default:
|
|
21011
21020
|
break;
|
|
21012
21021
|
}
|
|
@@ -21016,7 +21025,7 @@ class AtShiftPatternComponent extends BaseEditComponent {
|
|
|
21016
21025
|
}
|
|
21017
21026
|
loadItem() {
|
|
21018
21027
|
this.loading = true;
|
|
21019
|
-
this.subscriptions.push(this.
|
|
21028
|
+
this.subscriptions.push(this.atShiftPatternService.loadItem(this.rowClick$.value).subscribe(x => {
|
|
21020
21029
|
this.loading = false;
|
|
21021
21030
|
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21022
21031
|
this.formInitStringValue = JSON.stringify(x.body?.innerBody);
|
|
@@ -21065,6 +21074,243 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
21065
21074
|
], 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
21075
|
}] });
|
|
21067
21076
|
|
|
21077
|
+
class ShiftPatternDndService {
|
|
21078
|
+
constructor() {
|
|
21079
|
+
this.draggingData$ = new BehaviorSubject('');
|
|
21080
|
+
this.draggingPattern$ = new BehaviorSubject(undefined);
|
|
21081
|
+
this.draggingFromCellId$ = new BehaviorSubject('');
|
|
21082
|
+
this.dragoverCellId$ = new BehaviorSubject('');
|
|
21083
|
+
this.collectionStarterX$ = new BehaviorSubject(0);
|
|
21084
|
+
this.collectionResetTransform$ = new BehaviorSubject(false);
|
|
21085
|
+
this.patternCollectionOpen$ = new BehaviorSubject(false);
|
|
21086
|
+
this.mls = inject(MultiLanguageService);
|
|
21087
|
+
}
|
|
21088
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ShiftPatternDndService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
21089
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ShiftPatternDndService, providedIn: 'root' }); }
|
|
21090
|
+
}
|
|
21091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: ShiftPatternDndService, decorators: [{
|
|
21092
|
+
type: Injectable,
|
|
21093
|
+
args: [{
|
|
21094
|
+
providedIn: 'root'
|
|
21095
|
+
}]
|
|
21096
|
+
}], ctorParameters: () => [] });
|
|
21097
|
+
|
|
21098
|
+
class CoreAtPatternCardComponent extends CoreFormControlBaseComponent {
|
|
21099
|
+
constructor() {
|
|
21100
|
+
super(...arguments);
|
|
21101
|
+
this.$container = viewChild('container');
|
|
21102
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
21103
|
+
this.shiftPatternDndService = inject(ShiftPatternDndService);
|
|
21104
|
+
this.dndService = inject(DndService);
|
|
21105
|
+
this.mls = inject(MultiLanguageService);
|
|
21106
|
+
}
|
|
21107
|
+
writeValue(obj) {
|
|
21108
|
+
this.value = obj;
|
|
21109
|
+
this.code = obj?.code;
|
|
21110
|
+
this.name = obj?.name;
|
|
21111
|
+
this.patternType = obj?.patternType;
|
|
21112
|
+
this.rotationDays = obj?.rotationDays;
|
|
21113
|
+
}
|
|
21114
|
+
ngOnInit() {
|
|
21115
|
+
this.mls.lang$.subscribe(x => this.lang = x);
|
|
21116
|
+
}
|
|
21117
|
+
ngAfterViewInit() {
|
|
21118
|
+
setTimeout(() => {
|
|
21119
|
+
fromEvent(this.$container()?.nativeElement, 'dragstart')
|
|
21120
|
+
.subscribe((ev) => {
|
|
21121
|
+
this.dndService.dragType = EnumDragType.SHIFT_PATTERN;
|
|
21122
|
+
ev.dataTransfer.setData("text/plain", `${this.value.code}`);
|
|
21123
|
+
this.shiftPatternDndService.draggingData$.next(ev.dataTransfer.getData("text/plain"));
|
|
21124
|
+
this.shiftPatternDndService.draggingPattern$.next(this.value);
|
|
21125
|
+
this.shiftPatternDndService.draggingFromCellId$.next('');
|
|
21126
|
+
});
|
|
21127
|
+
fromEvent(this.$container()?.nativeElement, 'drag')
|
|
21128
|
+
.pipe(debounceTime(200))
|
|
21129
|
+
.subscribe((ev) => {
|
|
21130
|
+
console.log("drag");
|
|
21131
|
+
});
|
|
21132
|
+
fromEvent(this.$container()?.nativeElement, 'dragend')
|
|
21133
|
+
.subscribe((ev) => {
|
|
21134
|
+
console.log("dragend");
|
|
21135
|
+
// According to the HTML5 Drag and Drop API,
|
|
21136
|
+
// dataTransfer is cleared or reset at the end of the drag operation.
|
|
21137
|
+
// This means that the data you set in dragstart is no longer available in dragend.
|
|
21138
|
+
this.shiftPatternDndService.draggingData$.next('');
|
|
21139
|
+
this.shiftPatternDndService.draggingPattern$.next(undefined);
|
|
21140
|
+
this.shiftPatternDndService.draggingFromCellId$.next('');
|
|
21141
|
+
});
|
|
21142
|
+
});
|
|
21143
|
+
}
|
|
21144
|
+
ngOnDestroy() {
|
|
21145
|
+
//
|
|
21146
|
+
}
|
|
21147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreAtPatternCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
21148
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoreAtPatternCardComponent, isStandalone: true, selector: "core-at-pattern-card", providers: [
|
|
21149
|
+
{
|
|
21150
|
+
provide: NG_VALUE_ACCESSOR,
|
|
21151
|
+
multi: true,
|
|
21152
|
+
useExisting: CoreAtPatternCardComponent
|
|
21153
|
+
}
|
|
21154
|
+
], 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 }); }
|
|
21155
|
+
}
|
|
21156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreAtPatternCardComponent, decorators: [{
|
|
21157
|
+
type: Component,
|
|
21158
|
+
args: [{ selector: 'core-at-pattern-card', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
21159
|
+
LowerCasePipe,
|
|
21160
|
+
TableCellPipe,
|
|
21161
|
+
CommonModule,
|
|
21162
|
+
TooltipDirective,
|
|
21163
|
+
TranslatePipe
|
|
21164
|
+
], providers: [
|
|
21165
|
+
{
|
|
21166
|
+
provide: NG_VALUE_ACCESSOR,
|
|
21167
|
+
multi: true,
|
|
21168
|
+
useExisting: CoreAtPatternCardComponent
|
|
21169
|
+
}
|
|
21170
|
+
], 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"] }]
|
|
21171
|
+
}] });
|
|
21172
|
+
|
|
21173
|
+
class CoreAtPatternCollectionComponent extends BaseComponent {
|
|
21174
|
+
constructor() {
|
|
21175
|
+
super(...arguments);
|
|
21176
|
+
this.domService = inject(DomService);
|
|
21177
|
+
this.appService = inject(AppService);
|
|
21178
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
21179
|
+
this.shiftPatternDndService = inject(ShiftPatternDndService);
|
|
21180
|
+
this.fullPatterns = [];
|
|
21181
|
+
this.filteredPatterns = [];
|
|
21182
|
+
this.searchHeight = 65;
|
|
21183
|
+
this.itemHeight = 69;
|
|
21184
|
+
this.keyword = '';
|
|
21185
|
+
}
|
|
21186
|
+
ngAfterViewInit() {
|
|
21187
|
+
setTimeout(() => {
|
|
21188
|
+
if (!!this.relativeMode) {
|
|
21189
|
+
this.container.nativeElement.style.setProperty('position', 'relative');
|
|
21190
|
+
this.container.nativeElement.style.setProperty('box-shadow', 'none');
|
|
21191
|
+
this.container.nativeElement.style.setProperty('z-index', 0);
|
|
21192
|
+
}
|
|
21193
|
+
this.subscriptions.push(this.appService.get('/api/AtShiftPattern/GetAllActive').subscribe(x => {
|
|
21194
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21195
|
+
this.fullPatterns = x.body.innerBody;
|
|
21196
|
+
this.filteredPatterns = x.body.innerBody;
|
|
21197
|
+
}
|
|
21198
|
+
}));
|
|
21199
|
+
this.subscriptions.push(this.mls.lang$.subscribe(x => {
|
|
21200
|
+
this.lang = x;
|
|
21201
|
+
}));
|
|
21202
|
+
this.subscriptions.push(this.shiftPatternDndService.collectionStarterX$.subscribe(x => {
|
|
21203
|
+
this.container.nativeElement.style.setProperty('--starter-x', x + 'px');
|
|
21204
|
+
}));
|
|
21205
|
+
this.subscriptions.push(this.shiftPatternDndService.collectionResetTransform$.subscribe(_ => {
|
|
21206
|
+
this.container.nativeElement.style.removeProperty('transform');
|
|
21207
|
+
}));
|
|
21208
|
+
let offset = {
|
|
21209
|
+
dx: 0,
|
|
21210
|
+
dy: 0,
|
|
21211
|
+
};
|
|
21212
|
+
const containerElement = this.container.nativeElement;
|
|
21213
|
+
const headerElement = this.header.nativeElement;
|
|
21214
|
+
if (!this.relativeMode) {
|
|
21215
|
+
containerElement.style.setProperty('z-index', this.domService.getMaxZIndex() + 1);
|
|
21216
|
+
}
|
|
21217
|
+
const handleMouseDown = (e) => {
|
|
21218
|
+
// important!
|
|
21219
|
+
e.preventDefault();
|
|
21220
|
+
const startPos = {
|
|
21221
|
+
x: e.clientX - offset.dx,
|
|
21222
|
+
y: e.clientY - offset.dy,
|
|
21223
|
+
};
|
|
21224
|
+
const handleMouseMove = (e) => {
|
|
21225
|
+
// How far the mouse has been moved
|
|
21226
|
+
const dx = e.clientX - startPos.x;
|
|
21227
|
+
const dy = e.clientY - startPos.y;
|
|
21228
|
+
// Set the position of element
|
|
21229
|
+
requestAnimationFrame(() => {
|
|
21230
|
+
containerElement.style.transform = `translate(${dx}px, ${dy}px)`;
|
|
21231
|
+
});
|
|
21232
|
+
// Reassign the position of mouse
|
|
21233
|
+
offset = { dx, dy };
|
|
21234
|
+
};
|
|
21235
|
+
var handleMouseUp = () => {
|
|
21236
|
+
document.removeEventListener('mousemove', handleMouseMove);
|
|
21237
|
+
document.removeEventListener('mouseup', handleMouseUp);
|
|
21238
|
+
};
|
|
21239
|
+
document.addEventListener('mousemove', handleMouseMove, { passive: true });
|
|
21240
|
+
document.addEventListener('mouseup', handleMouseUp, { passive: true });
|
|
21241
|
+
};
|
|
21242
|
+
var handleTouchStart = (e) => {
|
|
21243
|
+
const touch = e.touches[0];
|
|
21244
|
+
const startPos = {
|
|
21245
|
+
x: touch.clientX - offset.dx,
|
|
21246
|
+
y: touch.clientY - offset.dy,
|
|
21247
|
+
};
|
|
21248
|
+
var handleTouchMove = (e) => {
|
|
21249
|
+
const touch = e.touches[0];
|
|
21250
|
+
const dx = touch.clientX - startPos.x;
|
|
21251
|
+
const dy = touch.clientY - startPos.y;
|
|
21252
|
+
requestAnimationFrame(() => {
|
|
21253
|
+
containerElement.style.transform = `translate(${dx}px, ${dy}px)`;
|
|
21254
|
+
});
|
|
21255
|
+
offset = { dx, dy };
|
|
21256
|
+
};
|
|
21257
|
+
const handleTouchEnd = () => {
|
|
21258
|
+
document.removeEventListener('touchmove', handleTouchMove);
|
|
21259
|
+
document.removeEventListener('touchend', handleTouchEnd);
|
|
21260
|
+
};
|
|
21261
|
+
document.addEventListener('touchmove', handleTouchMove, { passive: true });
|
|
21262
|
+
document.addEventListener('touchend', handleTouchEnd, { passive: true });
|
|
21263
|
+
};
|
|
21264
|
+
if (!this.relativeMode) {
|
|
21265
|
+
headerElement.addEventListener('mousedown', handleMouseDown);
|
|
21266
|
+
headerElement.addEventListener('touchstart', handleTouchStart);
|
|
21267
|
+
}
|
|
21268
|
+
});
|
|
21269
|
+
}
|
|
21270
|
+
onClose(e) {
|
|
21271
|
+
e.preventDefault();
|
|
21272
|
+
this.shiftPatternDndService.patternCollectionOpen$.next(false);
|
|
21273
|
+
}
|
|
21274
|
+
filter() {
|
|
21275
|
+
this.filteredPatterns = this.fullPatterns.filter(x => {
|
|
21276
|
+
return (this.keyword === '' || x.code.toLowerCase().includes(this.keyword.toLowerCase()));
|
|
21277
|
+
});
|
|
21278
|
+
}
|
|
21279
|
+
onKeywordChange(e) {
|
|
21280
|
+
console.log(e);
|
|
21281
|
+
this.filter();
|
|
21282
|
+
}
|
|
21283
|
+
onFilterReset() {
|
|
21284
|
+
this.keyword = '';
|
|
21285
|
+
this.filteredPatterns = this.fullPatterns;
|
|
21286
|
+
}
|
|
21287
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreAtPatternCollectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
21288
|
+
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" }] }); }
|
|
21289
|
+
}
|
|
21290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreAtPatternCollectionComponent, decorators: [{
|
|
21291
|
+
type: Component,
|
|
21292
|
+
args: [{ selector: 'core-at-pattern-collection', imports: [
|
|
21293
|
+
NgStyle,
|
|
21294
|
+
UpperCasePipe,
|
|
21295
|
+
FormsModule,
|
|
21296
|
+
CoreScrollComponent,
|
|
21297
|
+
TranslatePipe,
|
|
21298
|
+
TooltipDirective,
|
|
21299
|
+
CoreAtPatternCardComponent
|
|
21300
|
+
], 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"] }]
|
|
21301
|
+
}], propDecorators: { height: [{
|
|
21302
|
+
type: Input,
|
|
21303
|
+
args: [{ required: true }]
|
|
21304
|
+
}], relativeMode: [{
|
|
21305
|
+
type: Input
|
|
21306
|
+
}], container: [{
|
|
21307
|
+
type: ViewChild,
|
|
21308
|
+
args: ['container']
|
|
21309
|
+
}], header: [{
|
|
21310
|
+
type: ViewChild,
|
|
21311
|
+
args: ['header']
|
|
21312
|
+
}] } });
|
|
21313
|
+
|
|
21068
21314
|
class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
21069
21315
|
constructor(seekerService, layoutService, organizationService, mls) {
|
|
21070
21316
|
super();
|
|
@@ -21075,6 +21321,10 @@ class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
|
21075
21321
|
this.accessorMode = EnumCoreOrgTreeaAccessorMode.CHECKED;
|
|
21076
21322
|
this.pendingIds = [];
|
|
21077
21323
|
this.subscriptions = [];
|
|
21324
|
+
this.buttonItems = [
|
|
21325
|
+
EnumCoreButtonVNSCode.NONE_HEADER_CANCEL,
|
|
21326
|
+
EnumCoreButtonVNSCode.NONE_HEADER_CONFIRM,
|
|
21327
|
+
];
|
|
21078
21328
|
this.seekerService.sourceSpaceHeight$.subscribe(x => {
|
|
21079
21329
|
this.sourceSpaceHeight = x;
|
|
21080
21330
|
this.sourceContainerHeight = this.showPageHeader ? x - this.layoutService.corePageHeaderHeight - 68 : x - 68;
|
|
@@ -21139,6 +21389,16 @@ class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
|
21139
21389
|
this.sourceOpen = false;
|
|
21140
21390
|
}
|
|
21141
21391
|
}
|
|
21392
|
+
onButtonClick(e) {
|
|
21393
|
+
switch (e.code) {
|
|
21394
|
+
case EnumCoreButtonVNSCode.NONE_HEADER_CONFIRM:
|
|
21395
|
+
this.onSelect();
|
|
21396
|
+
break;
|
|
21397
|
+
case EnumCoreButtonVNSCode.NONE_HEADER_CANCEL:
|
|
21398
|
+
this.onCancel();
|
|
21399
|
+
break;
|
|
21400
|
+
}
|
|
21401
|
+
}
|
|
21142
21402
|
onItemDoubleClick(e) {
|
|
21143
21403
|
this.onSelect();
|
|
21144
21404
|
}
|
|
@@ -21147,6 +21407,17 @@ class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
|
21147
21407
|
console.log("CoreOrgParamComponent onIdsChange: ", e);
|
|
21148
21408
|
this.onChange(e);
|
|
21149
21409
|
this.pendingIds = e;
|
|
21410
|
+
if (!!e.length) {
|
|
21411
|
+
this.buttonItems = [
|
|
21412
|
+
EnumCoreButtonVNSCode.NONE_HEADER_CANCEL,
|
|
21413
|
+
EnumCoreButtonVNSCode.NONE_HEADER_CONFIRM,
|
|
21414
|
+
];
|
|
21415
|
+
}
|
|
21416
|
+
else {
|
|
21417
|
+
this.buttonItems = [
|
|
21418
|
+
EnumCoreButtonVNSCode.NONE_HEADER_CANCEL,
|
|
21419
|
+
];
|
|
21420
|
+
}
|
|
21150
21421
|
}
|
|
21151
21422
|
onItemClick(e) {
|
|
21152
21423
|
if (this.accessorMode === EnumCoreOrgTreeaAccessorMode.ACTIVATED_INHERITANCE || this.accessorMode === EnumCoreOrgTreeaAccessorMode.ACTIVATED_SINGLE) {
|
|
@@ -21166,7 +21437,7 @@ class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
|
21166
21437
|
multi: true,
|
|
21167
21438
|
useExisting: CoreOrgParamComponent
|
|
21168
21439
|
},
|
|
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\"
|
|
21440
|
+
], 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
21441
|
}
|
|
21171
21442
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoreOrgParamComponent, decorators: [{
|
|
21172
21443
|
type: Component,
|
|
@@ -21175,6 +21446,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
21175
21446
|
FormsModule,
|
|
21176
21447
|
CorePageHeaderComponent,
|
|
21177
21448
|
CoreOrgUnitSeekerComponent,
|
|
21449
|
+
CoreButtonGroupVnsComponent,
|
|
21178
21450
|
TranslatePipe,
|
|
21179
21451
|
TooltipDirective
|
|
21180
21452
|
], providers: [
|
|
@@ -21183,11 +21455,245 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
21183
21455
|
multi: true,
|
|
21184
21456
|
useExisting: CoreOrgParamComponent
|
|
21185
21457
|
},
|
|
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\"
|
|
21458
|
+
], 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
21459
|
}], ctorParameters: () => [{ type: SeekerService }, { type: LayoutService }, { type: OrganizationService }, { type: MultiLanguageService }], propDecorators: { accessorMode: [{
|
|
21188
21460
|
type: Input
|
|
21189
21461
|
}] } });
|
|
21190
21462
|
|
|
21463
|
+
var EnumShiftPatternType;
|
|
21464
|
+
(function (EnumShiftPatternType) {
|
|
21465
|
+
EnumShiftPatternType["WEEK"] = "WEEK";
|
|
21466
|
+
EnumShiftPatternType["DAYS"] = "DAYS";
|
|
21467
|
+
})(EnumShiftPatternType || (EnumShiftPatternType = {}));
|
|
21468
|
+
|
|
21469
|
+
class AtShiftPatternApplyComponent {
|
|
21470
|
+
constructor() {
|
|
21471
|
+
this.subscriptions = [];
|
|
21472
|
+
this.dndService = inject(DndService);
|
|
21473
|
+
this.atShiftPatternService = inject(AtShiftPatternService);
|
|
21474
|
+
this.shiftPatternDndService = inject(ShiftPatternDndService);
|
|
21475
|
+
this.appService = inject(AppService);
|
|
21476
|
+
this.alertService = inject(AlertService);
|
|
21477
|
+
this.mls = inject(MultiLanguageService);
|
|
21478
|
+
this.patternCollectionHeight = 700;
|
|
21479
|
+
this.previewData = [];
|
|
21480
|
+
this.orgParamAccessorMode = EnumCoreOrgTreeaAccessorMode.CHECKED;
|
|
21481
|
+
this.orgIds = [];
|
|
21482
|
+
this.empObjectIds = [];
|
|
21483
|
+
this.fromDate = undefined;
|
|
21484
|
+
this.toDate = undefined;
|
|
21485
|
+
this.empObjOptions$ = new BehaviorSubject([]);
|
|
21486
|
+
this.dndEventSubscriptions = {
|
|
21487
|
+
dragenter: new Subscription(() => null),
|
|
21488
|
+
dragover: new Subscription(() => null),
|
|
21489
|
+
drop: new Subscription(() => null),
|
|
21490
|
+
dragleave: new Subscription(() => null)
|
|
21491
|
+
};
|
|
21492
|
+
this.isDraggingOverContainer = false;
|
|
21493
|
+
this.loading = false;
|
|
21494
|
+
this.dropzoneHeight = 300;
|
|
21495
|
+
this.dragOverElements = new Set();
|
|
21496
|
+
}
|
|
21497
|
+
ngOnInit() {
|
|
21498
|
+
this.mls.lang$.subscribe(x => this.lang = x);
|
|
21499
|
+
}
|
|
21500
|
+
setupDndSubscriptions() {
|
|
21501
|
+
const containerElement = this.dropzone?.nativeElement;
|
|
21502
|
+
// containerElement.style.setProperty('--background-color', 'lightgrey');
|
|
21503
|
+
const dragenterEvent = fromEvent(containerElement, 'dragenter');
|
|
21504
|
+
const dragoverEvent = fromEvent(containerElement, 'dragover');
|
|
21505
|
+
const dropEvent = fromEvent(containerElement, 'drop');
|
|
21506
|
+
const dragleaveEvent = fromEvent(containerElement, 'dragleave');
|
|
21507
|
+
this.dndEventSubscriptions.dragenter = dragenterEvent.subscribe((ev) => {
|
|
21508
|
+
ev.preventDefault();
|
|
21509
|
+
// Ignore other DnD types
|
|
21510
|
+
if (this.dndService.dragType !== EnumDragType.SHIFT_PATTERN)
|
|
21511
|
+
return;
|
|
21512
|
+
this.isDraggingOverContainer = true;
|
|
21513
|
+
this.cleanUpSubsequentSubscriptions();
|
|
21514
|
+
this.dragOverElements.add(ev.target);
|
|
21515
|
+
containerElement.classList.add('valid-drop');
|
|
21516
|
+
this.dropzone?.nativeElement.style.setProperty('background-color', '#fff4ce');
|
|
21517
|
+
// Subscribe to dragover event to allow drop
|
|
21518
|
+
this.dndEventSubscriptions.dragover = dragoverEvent.subscribe((ev) => {
|
|
21519
|
+
ev.preventDefault();
|
|
21520
|
+
});
|
|
21521
|
+
// Subscribe to drop event
|
|
21522
|
+
this.dndEventSubscriptions.drop = dropEvent.subscribe((ev) => {
|
|
21523
|
+
ev.preventDefault();
|
|
21524
|
+
this.dragOverElements.clear(); // Clear the set
|
|
21525
|
+
this.isDraggingOverContainer = false;
|
|
21526
|
+
containerElement.classList.remove('valid-drop');
|
|
21527
|
+
this.dropzone?.nativeElement.style.setProperty('background-color', 'lightgrey');
|
|
21528
|
+
const data = ev.dataTransfer?.getData('text/plain'); // Example data retrieval
|
|
21529
|
+
// Handle drop logic based on data
|
|
21530
|
+
if (data) {
|
|
21531
|
+
//alert(this.shiftPatternDndService.draggingPattern$.value?.code)
|
|
21532
|
+
this.makePreviewData();
|
|
21533
|
+
}
|
|
21534
|
+
});
|
|
21535
|
+
});
|
|
21536
|
+
this.dndEventSubscriptions.dragleave = dragleaveEvent.subscribe((ev) => {
|
|
21537
|
+
ev.preventDefault();
|
|
21538
|
+
this.dragOverElements.delete(ev.target);
|
|
21539
|
+
// Check if we are leaving the container
|
|
21540
|
+
if (ev.target.classList.contains('parent-container')) {
|
|
21541
|
+
// Check if the related target is still within the container
|
|
21542
|
+
if (!ev.relatedTarget || !ev.target.contains(ev.relatedTarget)) {
|
|
21543
|
+
this.isDraggingOverContainer = false;
|
|
21544
|
+
containerElement.classList.remove('valid-drop');
|
|
21545
|
+
}
|
|
21546
|
+
}
|
|
21547
|
+
if (this.dragOverElements.size === 0) {
|
|
21548
|
+
containerElement.classList.remove('valid-drop');
|
|
21549
|
+
}
|
|
21550
|
+
this.dropzone?.nativeElement.style.setProperty('background-color', 'lightgrey');
|
|
21551
|
+
this.dndEventSubscriptions.dragover?.unsubscribe();
|
|
21552
|
+
this.dndEventSubscriptions.drop?.unsubscribe();
|
|
21553
|
+
this.dndEventSubscriptions.dragover = undefined;
|
|
21554
|
+
this.dndEventSubscriptions.drop = undefined;
|
|
21555
|
+
});
|
|
21556
|
+
}
|
|
21557
|
+
ngAfterViewInit() {
|
|
21558
|
+
setTimeout(() => {
|
|
21559
|
+
this.loading = true;
|
|
21560
|
+
this.subscriptions.push(this.appService.get('/api/AtShiftPattern/GetEmpObjListForCheckList').subscribe(x => {
|
|
21561
|
+
this.loading = false;
|
|
21562
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21563
|
+
this.empObjOptions$.next(x.body?.innerBody);
|
|
21564
|
+
}
|
|
21565
|
+
}));
|
|
21566
|
+
this.dropzoneHeight = window.innerHeight - 60 - 50 - 35 - 15 - 15;
|
|
21567
|
+
this.patternCollectionHeight = window.innerHeight - 60 - 50 - 15;
|
|
21568
|
+
//this.setupDndSubscriptions();
|
|
21569
|
+
});
|
|
21570
|
+
}
|
|
21571
|
+
cleanUpSubscriptions() {
|
|
21572
|
+
this.dndEventSubscriptions.dragenter?.unsubscribe();
|
|
21573
|
+
this.dndEventSubscriptions.dragover?.unsubscribe();
|
|
21574
|
+
this.dndEventSubscriptions.drop?.unsubscribe();
|
|
21575
|
+
this.dndEventSubscriptions.dragleave?.unsubscribe();
|
|
21576
|
+
}
|
|
21577
|
+
cleanUpSubsequentSubscriptions() {
|
|
21578
|
+
this.dndEventSubscriptions.dragover?.unsubscribe();
|
|
21579
|
+
this.dndEventSubscriptions.drop?.unsubscribe();
|
|
21580
|
+
}
|
|
21581
|
+
onSalPeriodChange(salPerId) {
|
|
21582
|
+
this.salPeriod = salPerId;
|
|
21583
|
+
this.subscriptions.push(this.appService.post(api.AT_SALARY_PERIOD_GET_LIST_PERIOD, { id: salPerId }).subscribe(x => {
|
|
21584
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21585
|
+
const body = x.body;
|
|
21586
|
+
this.startDate = new Date(body.innerBody.startDate);
|
|
21587
|
+
this.startDateString = this.startDate.toDateString();
|
|
21588
|
+
this.startPeriod = new Date(body.innerBody.startDate);
|
|
21589
|
+
this.startPeriodString = this.startPeriod.toDateString();
|
|
21590
|
+
this.endDate = new Date(body.innerBody.endDate);
|
|
21591
|
+
this.endDateString = this.endDate.toDateString();
|
|
21592
|
+
this.endPeriod = new Date(body.innerBody.endDate);
|
|
21593
|
+
this.endPeriodString = this.endPeriod.toDateString();
|
|
21594
|
+
}
|
|
21595
|
+
}));
|
|
21596
|
+
}
|
|
21597
|
+
onCurrentMonthChange(e) {
|
|
21598
|
+
this.subscriptions.push(this.appService.get(api.AT_SALARY_PERIOD_GET_BY_YEAR_MONTH_STRING + "?text=" + e).subscribe(x => {
|
|
21599
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21600
|
+
if (!!x.body.innerBody) {
|
|
21601
|
+
this.periodId = x.body.innerBody.id;
|
|
21602
|
+
this.startPeriod = new Date(x.body.innerBody.startDate);
|
|
21603
|
+
this.startPeriodString = this.startPeriod.toDateString();
|
|
21604
|
+
this.endPeriod = new Date(x.body.innerBody.endDate);
|
|
21605
|
+
this.endPeriodString = this.endPeriod.toDateString();
|
|
21606
|
+
this.startDate = new Date(x.body.innerBody.startDate);
|
|
21607
|
+
this.startDateString = this.startDate.toDateString();
|
|
21608
|
+
this.endDate = new Date(x.body.innerBody.endDate);
|
|
21609
|
+
this.endDateString = this.endDate.toDateString();
|
|
21610
|
+
this.onSalPeriodChange(x.body.innerBody.id);
|
|
21611
|
+
this.setupDndSubscriptions();
|
|
21612
|
+
this.dropzoneReady = true;
|
|
21613
|
+
}
|
|
21614
|
+
else {
|
|
21615
|
+
this.alertService.warn(this.mls.trans("NO_SALARY_PERIOD_FOUND_FOR_SELECTED_MONTH", this.lang), alertOptions);
|
|
21616
|
+
this.startDate = null;
|
|
21617
|
+
this.endDate = null;
|
|
21618
|
+
this.cleanUpSubscriptions();
|
|
21619
|
+
this.dropzoneReady = false;
|
|
21620
|
+
}
|
|
21621
|
+
}
|
|
21622
|
+
else {
|
|
21623
|
+
this.alertService.warn(this.mls.trans("OPP!SOME_THING_IS_WRONG_WHILE_READING_THE_SALARY_PERIOD_FOR_CURRENT_MONTH", this.lang), alertOptions);
|
|
21624
|
+
this.startDate = null;
|
|
21625
|
+
this.endDate = null;
|
|
21626
|
+
this.cleanUpSubscriptions();
|
|
21627
|
+
this.dropzoneReady = false;
|
|
21628
|
+
}
|
|
21629
|
+
}));
|
|
21630
|
+
}
|
|
21631
|
+
makePreviewData() {
|
|
21632
|
+
if (!this.shiftPatternDndService.draggingPattern$.value)
|
|
21633
|
+
return;
|
|
21634
|
+
if (!this.startDate || !this.endDate)
|
|
21635
|
+
return;
|
|
21636
|
+
const rawPattern = this.shiftPatternDndService.draggingPattern$.value;
|
|
21637
|
+
const previewData = [];
|
|
21638
|
+
this.subscriptions.push(this.atShiftPatternService.loadItem(rawPattern.id).subscribe(x => {
|
|
21639
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21640
|
+
const pattern = x.body.innerBody;
|
|
21641
|
+
switch (pattern.patternType) {
|
|
21642
|
+
case EnumShiftPatternType.WEEK:
|
|
21643
|
+
const startDate = new Date(this.startDate.setHours(0, 0, 0, 0)); // Set to start of the day
|
|
21644
|
+
const endDate = new Date(this.endDate.setHours(0, 0, 0, 0)); // Set to start of the day
|
|
21645
|
+
for (let date = startDate; date <= endDate; date = new Date(date.getTime() + 24 * 60 * 60 * 1000)) {
|
|
21646
|
+
const weekDay = (date.getDay() + 6) % 7 + 1; // Transform Sunday (0) to 7, and others to 1-based index
|
|
21647
|
+
const shiftsFilter = pattern.shiftDetails?.filter(x => x.dayNumber === weekDay); // Get shifts for the one-based weekday index
|
|
21648
|
+
if (!!shiftsFilter.length) {
|
|
21649
|
+
const atShifts = shiftsFilter[0].shifts;
|
|
21650
|
+
previewData.push({
|
|
21651
|
+
workingday: new Date(date), // Clone date to avoid mutations
|
|
21652
|
+
shifts: [...atShifts], // Clone shifts to avoid mutations
|
|
21653
|
+
});
|
|
21654
|
+
}
|
|
21655
|
+
else {
|
|
21656
|
+
previewData.push({
|
|
21657
|
+
workingday: new Date(date), // Clone date to avoid mutations
|
|
21658
|
+
shifts: [],
|
|
21659
|
+
});
|
|
21660
|
+
}
|
|
21661
|
+
}
|
|
21662
|
+
this.previewData = previewData;
|
|
21663
|
+
break;
|
|
21664
|
+
case EnumShiftPatternType.DAYS:
|
|
21665
|
+
alert("Mẫu theo chuỗi ngày đang được phát triển, tạm thời dùng mẫu week");
|
|
21666
|
+
break;
|
|
21667
|
+
}
|
|
21668
|
+
}
|
|
21669
|
+
}));
|
|
21670
|
+
}
|
|
21671
|
+
ngOnDestroy() {
|
|
21672
|
+
this.cleanUpSubscriptions();
|
|
21673
|
+
this.dropzoneReady = false;
|
|
21674
|
+
this.subscriptions.map(x => x?.unsubscribe());
|
|
21675
|
+
}
|
|
21676
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtShiftPatternApplyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21677
|
+
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'\"></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=\"condition-n-preview\">\r\n\r\n <div class=\"condition\">\r\n <div class=\"d-flex d-flex-start mb15 pd3\">\r\n <div class=\"param-wrapper w175 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 w175 mr15\">\r\n <div class=\"form-group vertical\">\r\n <core-date-picker [(ngModel)]=\"startDate\"></core-date-picker>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w175 mr15\">\r\n <div class=\"form-group vertical\">\r\n <core-date-picker [(ngModel)]=\"endDate\"></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 <core-org-param [accessorMode]=\"orgParamAccessorMode\" [(ngModel)]=\"orgIds\"></core-org-param>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w250 mr15\">\r\n <div class=\"form-group vertical\">\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>\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 <div class=\"container mt50\">\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=\"daily-item col-md-4\">\r\n <core-shift-cell [ngModel]=\"dailyItem.shifts\" [$readOnly]=\"true\"></core-shift-cell>\r\n </div>\r\n } \r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\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 .condition-n-preview{display:block;padding-left:240px}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone{display:block;position:relative;width:100%;height:300px}.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 .mt50{margin-top:50px}\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: CoreOrgParamComponent, selector: "core-org-param", inputs: ["accessorMode"] }, { 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"] }] }); }
|
|
21678
|
+
}
|
|
21679
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: AtShiftPatternApplyComponent, decorators: [{
|
|
21680
|
+
type: Component,
|
|
21681
|
+
args: [{ selector: 'core-at-shift-pattern-apply', imports: [
|
|
21682
|
+
NgStyle,
|
|
21683
|
+
CoreDatePickerComponent,
|
|
21684
|
+
FormsModule,
|
|
21685
|
+
CorePageHeaderComponent,
|
|
21686
|
+
CoreAtPatternCollectionComponent,
|
|
21687
|
+
CoreOrgParamComponent,
|
|
21688
|
+
CoreMonthSelectorComponent,
|
|
21689
|
+
CoreChecklistComponent,
|
|
21690
|
+
CoreShiftCellComponent,
|
|
21691
|
+
], template: "<div class=\"core-at-shift-pattern-apply-container\">\r\n <core-page-header [title]=\"'UI_COMPONENT_TITLE_AT_SHIFT_PATTERN_APPLY'\"></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=\"condition-n-preview\">\r\n\r\n <div class=\"condition\">\r\n <div class=\"d-flex d-flex-start mb15 pd3\">\r\n <div class=\"param-wrapper w175 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 w175 mr15\">\r\n <div class=\"form-group vertical\">\r\n <core-date-picker [(ngModel)]=\"startDate\"></core-date-picker>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w175 mr15\">\r\n <div class=\"form-group vertical\">\r\n <core-date-picker [(ngModel)]=\"endDate\"></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 <core-org-param [accessorMode]=\"orgParamAccessorMode\" [(ngModel)]=\"orgIds\"></core-org-param>\r\n </div>\r\n </div>\r\n <div class=\"param-wrapper w250 mr15\">\r\n <div class=\"form-group vertical\">\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>\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 <div class=\"container mt50\">\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=\"daily-item col-md-4\">\r\n <core-shift-cell [ngModel]=\"dailyItem.shifts\" [$readOnly]=\"true\"></core-shift-cell>\r\n </div>\r\n } \r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\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 .condition-n-preview{display:block;padding-left:240px}.core-at-shift-pattern-apply-container .patterns_condition-n-preview #dropzone{display:block;position:relative;width:100%;height:300px}.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 .mt50{margin-top:50px}\n"] }]
|
|
21692
|
+
}], propDecorators: { dropzone: [{
|
|
21693
|
+
type: ViewChild,
|
|
21694
|
+
args: ['dropzone']
|
|
21695
|
+
}] } });
|
|
21696
|
+
|
|
21191
21697
|
class AtWorksignService {
|
|
21192
21698
|
constructor() {
|
|
21193
21699
|
this.atSalaryPeriod$ = new BehaviorSubject(undefined);
|
|
@@ -21511,7 +22017,6 @@ class AtWorksignComponent extends BaseComponent {
|
|
|
21511
22017
|
this.endDateString = this.endDate.toDateString();
|
|
21512
22018
|
break;
|
|
21513
22019
|
case EnumWorkScheduleViewMode.CUSTOM:
|
|
21514
|
-
debugger;
|
|
21515
22020
|
this.endDate = new Date(this.startDate);
|
|
21516
22021
|
this.endDate.setDate(this.startDate.getDate() + 13);
|
|
21517
22022
|
this.endDateString = this.endDate.toDateString();
|
|
@@ -21579,43 +22084,6 @@ class AtWorksignComponent extends BaseComponent {
|
|
|
21579
22084
|
case EnumCoreButtonVNSCode.HEADER_CREATE:
|
|
21580
22085
|
this.alertService.info("This screen is designed for direct DnD (drag and drop) and do not have 'CREATE' action", alertOptions);
|
|
21581
22086
|
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
22087
|
case EnumCoreButtonVNSCode.HEADER_DELETE:
|
|
21620
22088
|
if (this.selectedIds.length != 0) {
|
|
21621
22089
|
this.router.navigate([
|
|
@@ -21631,8 +22099,18 @@ class AtWorksignComponent extends BaseComponent {
|
|
|
21631
22099
|
}
|
|
21632
22100
|
break;
|
|
21633
22101
|
case EnumCoreButtonVNSCode.HEADER_GETSHIFTDEFAULT:
|
|
21634
|
-
|
|
21635
|
-
|
|
22102
|
+
alert("To do: Show Dnd Pattern Collection");
|
|
22103
|
+
/*
|
|
22104
|
+
this.pendingAction = EnumCoreButtonVNSCode.HEADER_GETSHIFTDEFAULT
|
|
22105
|
+
this.dialogService.createNew(
|
|
22106
|
+
EnumTranslateKey.UI_CORE_DIALOG_SERVICE_CONFIRMATION,
|
|
22107
|
+
EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_BUTTON_CONFIRM,
|
|
22108
|
+
EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_BUTTON_CANCEL,
|
|
22109
|
+
undefined,
|
|
22110
|
+
EnumTranslateKey.UI_CORE_DIALOG_COMFIRM_GET_DEFAULT_SHIFT,
|
|
22111
|
+
[]
|
|
22112
|
+
);
|
|
22113
|
+
*/
|
|
21636
22114
|
break;
|
|
21637
22115
|
case EnumCoreButtonVNSCode.HEADER_DOWNLOAD:
|
|
21638
22116
|
break;
|
|
@@ -21648,44 +22126,10 @@ class AtWorksignComponent extends BaseComponent {
|
|
|
21648
22126
|
},
|
|
21649
22127
|
], { relativeTo: this.route });
|
|
21650
22128
|
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
22129
|
case EnumCoreButtonVNSCode.HEADER_UPLOAD:
|
|
21678
22130
|
break;
|
|
21679
|
-
/*
|
|
21680
|
-
this.openFileExplorer();
|
|
21681
|
-
break;
|
|
21682
|
-
*/
|
|
21683
22131
|
case EnumCoreButtonVNSCode.HEADER_EXPORTEXEL:
|
|
21684
22132
|
break;
|
|
21685
|
-
/*
|
|
21686
|
-
this.exportToExcel();
|
|
21687
|
-
break;
|
|
21688
|
-
*/
|
|
21689
22133
|
default:
|
|
21690
22134
|
break;
|
|
21691
22135
|
}
|
|
@@ -21704,15 +22148,11 @@ class AtWorksignComponent extends BaseComponent {
|
|
|
21704
22148
|
this.dialogService.resetService();
|
|
21705
22149
|
switch (this.pendingAction) {
|
|
21706
22150
|
case EnumCoreButtonVNSCode.HEADER_GETSHIFTDEFAULT:
|
|
21707
|
-
//this.loading = true;
|
|
21708
22151
|
this.longTaskService.longApiRunning$.next(true);
|
|
21709
22152
|
this.subscriptions.push(this.appService.post(api.AT_SHIFT_SORT_GET_SHIFT_DEFAULT + "?usehub=true", { periodId: this.salPeriod, listOrgIds: this.orgIds }).subscribe(x => {
|
|
21710
22153
|
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
21711
22154
|
this.alertService.info(this.mls.trans('GET_SUCCESS'), alertOptions);
|
|
21712
22155
|
}
|
|
21713
|
-
else {
|
|
21714
|
-
//this.alertService.error(JSON.stringify(x), alertOptions)
|
|
21715
|
-
}
|
|
21716
22156
|
this.longTaskService.longApiRunning$.next(false);
|
|
21717
22157
|
this.pendingAction = '';
|
|
21718
22158
|
}));
|
|
@@ -21975,7 +22415,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
21975
22415
|
FullscreenModalLoaderComponent,
|
|
21976
22416
|
ThreedotsComponent,
|
|
21977
22417
|
CoreApiProgressComponent,
|
|
21978
|
-
TooltipDirective
|
|
22418
|
+
TooltipDirective,
|
|
21979
22419
|
], 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
22420
|
}], 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
22421
|
type: ViewChild,
|
|
@@ -22130,11 +22570,174 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
22130
22570
|
args: ['status']
|
|
22131
22571
|
}] } });
|
|
22132
22572
|
|
|
22133
|
-
class IndividualScheduleApplyComponent
|
|
22134
|
-
|
|
22135
|
-
|
|
22573
|
+
class IndividualScheduleApplyComponent extends BaseComponent {
|
|
22574
|
+
constructor(mls) {
|
|
22575
|
+
super(mls);
|
|
22576
|
+
this.mls = mls;
|
|
22577
|
+
this.atWorksignService = inject(AtWorksignService);
|
|
22578
|
+
this.layoutService = inject(LayoutService);
|
|
22579
|
+
this.urlService = inject(UrlService);
|
|
22580
|
+
this.router = inject(Router);
|
|
22581
|
+
this.route = inject(ActivatedRoute);
|
|
22582
|
+
this.dialogService = inject(DialogService);
|
|
22583
|
+
this.appService = inject(AppService);
|
|
22584
|
+
this.workShiftDndService = inject(WorkShiftDndService);
|
|
22585
|
+
this.employeeSeekerSourceType = EnumCoreFormControlSeekerSourceType.EMPLOYEE_SEEK;
|
|
22586
|
+
this.employeeObjectList$ = new BehaviorSubject([]);
|
|
22587
|
+
this.selectedEmployees = [];
|
|
22588
|
+
this.shiftCell = [];
|
|
22589
|
+
this.fromPeriod = this.atWorksignService.atSalaryPeriod$.value?.startDate;
|
|
22590
|
+
this.toPeriod = this.atWorksignService.atSalaryPeriod$.value?.endDate;
|
|
22591
|
+
this.fromDate = this.atWorksignService.atSalaryPeriod$.value?.startDate || new Date();
|
|
22592
|
+
this.toDate = this.atWorksignService.atSalaryPeriod$.value?.endDate || new Date();
|
|
22593
|
+
this.buttons = [EnumCoreButtonVNSCode.NONE_HEADER_SAVE, EnumCoreButtonVNSCode.NONE_HEADER_CANCEL];
|
|
22594
|
+
this.selectedEmployeeTableHeight = 400;
|
|
22595
|
+
this.dateRangeLimit = {
|
|
22596
|
+
minDate: this.fromPeriod || new Date(1900, 1, 1),
|
|
22597
|
+
maxDate: this.toPeriod || new Date(1900, 1, 1)
|
|
22598
|
+
};
|
|
22599
|
+
this.listInstance = Number(this.route.snapshot.paramMap.get('listInstance'));
|
|
22600
|
+
this.workShiftDndService.collectionStarterX$.next(0);
|
|
22601
|
+
}
|
|
22602
|
+
onButtonClick(e) {
|
|
22603
|
+
switch (e.code) {
|
|
22604
|
+
case EnumCoreButtonVNSCode.NONE_HEADER_CANCEL:
|
|
22605
|
+
if (!!this.urlService.previousRouteUrl$.value.length) {
|
|
22606
|
+
this.router.navigateByUrl(this.urlService.previousRouteUrl$.value);
|
|
22607
|
+
}
|
|
22608
|
+
else {
|
|
22609
|
+
this.router.navigate(['../'], { relativeTo: this.route });
|
|
22610
|
+
}
|
|
22611
|
+
break;
|
|
22612
|
+
case EnumCoreButtonVNSCode.NONE_HEADER_SAVE:
|
|
22613
|
+
if (this.validateForm()) {
|
|
22614
|
+
console.log({
|
|
22615
|
+
periodId: this.atWorksignService.atSalaryPeriod$.value?.periodId || 0,
|
|
22616
|
+
shiftCell: this.shiftCell,
|
|
22617
|
+
fromDate: this.fromDate,
|
|
22618
|
+
toDate: this.toDate,
|
|
22619
|
+
selectedEmployees: this.selectedEmployees
|
|
22620
|
+
});
|
|
22621
|
+
const model = {
|
|
22622
|
+
periodId: this.atWorksignService.atSalaryPeriod$.value?.periodId || 0,
|
|
22623
|
+
shiftIds: this.shiftCell.map(x => x.id || 0),
|
|
22624
|
+
fromDate: new Date(new Date(this.fromDate).setHours(0, 0, 0, 0)),
|
|
22625
|
+
toDate: new Date(new Date(this.toDate).setHours(0, 0, 0, 0)),
|
|
22626
|
+
employeeIds: this.selectedEmployees
|
|
22627
|
+
};
|
|
22628
|
+
this.loading = true;
|
|
22629
|
+
this.subscriptions.push(this.appService.post("/api/AtWorksign/IndividualScheduleApply?computingWithLocalTimeZone=true", model).subscribe(x => {
|
|
22630
|
+
this.loading = false;
|
|
22631
|
+
if (x.ok && x.status === 200 && x.body?.statusCode === 200) {
|
|
22632
|
+
this.initialFormValueString = JSON.stringify({
|
|
22633
|
+
periodId: this.atWorksignService.atSalaryPeriod$.value?.periodId || 0,
|
|
22634
|
+
shiftCell: this.shiftCell,
|
|
22635
|
+
fromDate: this.fromDate,
|
|
22636
|
+
toDate: this.toDate,
|
|
22637
|
+
selectedEmployees: this.selectedEmployees
|
|
22638
|
+
});
|
|
22639
|
+
this.router.navigate(['../'], { relativeTo: this.route, state: { instanceNumber: this.listInstance } });
|
|
22640
|
+
}
|
|
22641
|
+
}));
|
|
22642
|
+
}
|
|
22643
|
+
break;
|
|
22644
|
+
default:
|
|
22645
|
+
break;
|
|
22646
|
+
}
|
|
22647
|
+
}
|
|
22648
|
+
validateForm() {
|
|
22649
|
+
let result = true;
|
|
22650
|
+
if (!this.shiftCell.length) {
|
|
22651
|
+
this.shiftCellError = 'TIME_MANAGEMENT_ERROR_AT_LEAST_ONE_SHIFT_REQUIRED';
|
|
22652
|
+
result = false;
|
|
22653
|
+
}
|
|
22654
|
+
if (this.fromDate === null) {
|
|
22655
|
+
this.fromDateError = 'TIME_MANAGEMENT_ERROR_THE_FROM_DATE_IS_REQUIRED';
|
|
22656
|
+
}
|
|
22657
|
+
if (this.toDate === null) {
|
|
22658
|
+
this.toDateError = 'TIME_MANAGEMENT_ERROR_THE_TO_DATE_IS_REQUIRED';
|
|
22659
|
+
}
|
|
22660
|
+
if (this.fromDate && this.toDate && this.fromDate > this.toDate) {
|
|
22661
|
+
this.fromDateError = 'TIME_MANAGEMENT_ERROR_THE_FROM_DATE_MUST_LESS_THAN_OR_EQUAL_THE_TO_DATE';
|
|
22662
|
+
result = false;
|
|
22663
|
+
}
|
|
22664
|
+
if (this.selectedEmployees.length === 0) {
|
|
22665
|
+
this.selectedEmployeesError = 'TIME_MANAGEMENT_ERROR_NO_EMPLOYEE_SELECTED';
|
|
22666
|
+
result = false;
|
|
22667
|
+
}
|
|
22668
|
+
return result;
|
|
22669
|
+
}
|
|
22670
|
+
ngAfterViewInit() {
|
|
22671
|
+
setTimeout(() => {
|
|
22672
|
+
this.selectedEmployeeTableHeight = window.innerHeight - this.layoutService.headerHeight$.value - this.layoutService.corePageHeaderHeight - 106 - 24 - 15 - 35 - 40 * 2 - 15 - 15;
|
|
22673
|
+
this.initialFormValueString = JSON.stringify({
|
|
22674
|
+
periodId: this.atWorksignService.atSalaryPeriod$.value?.periodId || 0,
|
|
22675
|
+
shiftCell: [],
|
|
22676
|
+
fromDate: this.fromDate,
|
|
22677
|
+
toDate: this.toDate,
|
|
22678
|
+
selectedEmployees: this.selectedEmployees
|
|
22679
|
+
});
|
|
22680
|
+
this.shiftCollectionHeight = window.innerHeight - this.layoutService.headerHeight$.value - this.layoutService.corePageHeaderHeight - 15;
|
|
22681
|
+
});
|
|
22682
|
+
}
|
|
22683
|
+
onShiftCellChange(e) {
|
|
22684
|
+
if (!!e.length) {
|
|
22685
|
+
this.shiftCellError = "";
|
|
22686
|
+
}
|
|
22687
|
+
else {
|
|
22688
|
+
this.shiftCellError = 'TIME_MANAGEMENT_ERROR_AT_LEAST_ONE_SHIFT_REQUIRED';
|
|
22689
|
+
}
|
|
22690
|
+
}
|
|
22691
|
+
onFromDateChange(e) {
|
|
22692
|
+
if (!!e) {
|
|
22693
|
+
this.fromDateError = "";
|
|
22694
|
+
}
|
|
22695
|
+
else {
|
|
22696
|
+
this.fromDateError = 'TIME_MANAGEMENT_ERROR_THE_FROM_DATE_IS_REQUIRED';
|
|
22697
|
+
}
|
|
22698
|
+
}
|
|
22699
|
+
onToDateChange(e) {
|
|
22700
|
+
if (!!e) {
|
|
22701
|
+
this.toDateError = "";
|
|
22702
|
+
}
|
|
22703
|
+
else {
|
|
22704
|
+
this.fromDateError = 'TIME_MANAGEMENT_ERROR_THE_TO_DATE_IS_REQUIRED';
|
|
22705
|
+
}
|
|
22706
|
+
}
|
|
22707
|
+
onSelectedEmployeesChange(e) {
|
|
22708
|
+
if (!!e.length) {
|
|
22709
|
+
this.selectedEmployeesError = "";
|
|
22710
|
+
}
|
|
22711
|
+
else {
|
|
22712
|
+
this.selectedEmployeesError = 'TIME_MANAGEMENT_ERROR_NO_EMPLOYEE_SELECTED';
|
|
22713
|
+
}
|
|
22714
|
+
}
|
|
22715
|
+
canDeactivate() {
|
|
22716
|
+
const condition = JSON.stringify({
|
|
22717
|
+
periodId: this.atWorksignService.atSalaryPeriod$.value?.periodId || 0,
|
|
22718
|
+
shiftCell: this.shiftCell,
|
|
22719
|
+
fromDate: this.fromDate,
|
|
22720
|
+
toDate: this.toDate,
|
|
22721
|
+
selectedEmployees: this.selectedEmployees
|
|
22722
|
+
}) === this.initialFormValueString;
|
|
22723
|
+
if (condition) {
|
|
22724
|
+
return true;
|
|
22725
|
+
}
|
|
22726
|
+
else {
|
|
22727
|
+
this.dialogService.busy = true;
|
|
22728
|
+
this.dialogService.showConfirmDialog$.next(true);
|
|
22729
|
+
this.dialogService.title$.next(EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_TITLE);
|
|
22730
|
+
this.dialogService.body$.next(EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_BODY_CHANGES_WILL_BE_LOST);
|
|
22731
|
+
this.dialogService.okButtonText$.next(EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_BUTTON_CONFIRM);
|
|
22732
|
+
this.dialogService.cancelButtonText$.next(EnumTranslateKey.UI_CORE_CONFIRM_DIALOG_BUTTON_GO_BACK_TO_EDIT_FORM);
|
|
22733
|
+
const observable = this.dialogService.canDeactivate$.asObservable();
|
|
22734
|
+
return observable;
|
|
22735
|
+
}
|
|
22736
|
+
}
|
|
22737
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: IndividualScheduleApplyComponent, deps: [{ token: MultiLanguageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22738
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.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 <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: "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: CoreShiftCollectionComponent, selector: "core-shift-collection", inputs: ["height", "relativeMode"] }, { kind: "component", type: CoreShiftCellComponent, selector: "core-shift-cell", inputs: ["$readOnly", "$hideStarterPlusSign", "$hideStickersWhileDragover", "$backgroundColor"] }, { kind: "component", type: CoreDatePickerComponent, selector: "core-date-picker", inputs: ["enableTimeZoneConverter", "showPlaceholder", "popupWidth", "popupXPadding", "popupAlign", "rangeLimit", "readonly", "disabled"] }, { kind: "component", type: CoreFormControlSeekerComponent, selector: "core-form-control-seeker", inputs: ["title", "showPageHeader", "preDefinedOuterParam$", "preDefinedOuterFilter$", "click$", "getByIdObject$", "paramMode", "multiMode", "objectList$", "useTheseColumns", "hideOrgTree", "excludedColumns", "excludeExistingList", "sourceSpaceHeight", "indirectBinding", "bindGridIdTo", "multiModeExtendedColumns", "multiModeExtendedSections", "editBufferData$", "multiModeTableHeight", "multiModeRowHeight", "seekerSourceType", "boundFrom", "shownFrom", "alsoBindTo", "seekerVerifyIgnore"], outputs: ["onDoubleClick"] }, { kind: "component", type: CorePageHeaderComponent, selector: "core-page-header", inputs: ["instanceNumber", "shownItems", "title", "hideButtonGroup"], outputs: ["buttonClick"] }, { kind: "component", type: CoreButtonGroupVnsComponent, selector: "core-button-group-vns", inputs: ["height", "instanceNumber", "forHeader", "fixedShow", "shownItems", "showCaption", "lastChildEffectOff"], outputs: ["buttonClick"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
22136
22739
|
}
|
|
22137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: IndividualScheduleApplyComponent
|
|
22740
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: IndividualScheduleApplyComponent, decorators: [{
|
|
22138
22741
|
type: Component,
|
|
22139
22742
|
args: [{ selector: 'app-individual-schedule-apply', imports: [
|
|
22140
22743
|
FormsModule,
|
|
@@ -22145,8 +22748,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
22145
22748
|
CorePageHeaderComponent,
|
|
22146
22749
|
CoreButtonGroupVnsComponent,
|
|
22147
22750
|
TranslatePipe
|
|
22148
|
-
], template: "<div class=\"modal-container\">\r\n\r\n <div class=\"modal-content-root\">\r\n\r\n <
|
|
22149
|
-
}] });
|
|
22751
|
+
], template: "<div class=\"modal-container\">\r\n\r\n <div class=\"modal-content-root\">\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"] }]
|
|
22752
|
+
}], ctorParameters: () => [{ type: MultiLanguageService }] });
|
|
22150
22753
|
|
|
22151
22754
|
class FunctionEditService {
|
|
22152
22755
|
constructor(appService) {
|
|
@@ -33565,5 +34168,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
|
33565
34168
|
* Generated bundle index. Do not edit.
|
|
33566
34169
|
*/
|
|
33567
34170
|
|
|
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 };
|
|
34171
|
+
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
34172
|
//# sourceMappingURL=ngx-histaff-alpha.mjs.map
|