ngx-histaff-alpha 3.3.2 → 3.3.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/esm2022/lib/app/libraries/core-org-param/core-org-param.component.mjs +6 -4
- package/esm2022/lib/app/libraries/core-param-control/core-param-control/core-param-control.component.mjs +1 -1
- package/esm2022/lib/app/libraries/core-shift-cell/core-shift-cell.component.mjs +130 -0
- package/esm2022/lib/app/libraries/core-shift-sticker/core-shift-sticker.component.mjs +88 -23
- package/esm2022/lib/app/root/language/language/language.component.mjs +2 -1
- package/esm2022/lib/app/services/work-shift-dnd.service.mjs +20 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/ngx-histaff-alpha.mjs +229 -26
- package/fesm2022/ngx-histaff-alpha.mjs.map +1 -1
- package/lib/app/libraries/core-org-param/core-org-param.component.d.ts +2 -2
- package/lib/app/libraries/core-shift-cell/core-shift-cell.component.d.ts +20 -0
- package/lib/app/libraries/core-shift-sticker/core-shift-sticker.component.d.ts +37 -16
- package/lib/app/services/work-shift-dnd.service.d.ts +12 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, Pipe, ViewChild, forwardRef, Directive, HostListener, Inject, inject, isDevMode, InjectionToken, EventEmitter, Input, Output, ViewEncapsulation, NgModule, input, computed, ChangeDetectionStrategy, viewChild, signal } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, Pipe, ViewChild, forwardRef, Directive, HostListener, Inject, inject, isDevMode, InjectionToken, EventEmitter, Input, Output, ViewEncapsulation, NgModule, input, computed, ChangeDetectionStrategy, viewChild, ChangeDetectorRef, signal } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/platform-browser';
|
|
4
4
|
import { BehaviorSubject, Subject, filter, of, Observable, zip, catchError, tap as tap$1, throwError, take, switchMap, finalize as finalize$1, map as map$1, interval, concat, debounceTime, fromEvent, distinctUntilChanged, takeUntil } from 'rxjs';
|
|
5
5
|
import { api, EnumTranslateKey } from 'alpha-global-constants';
|
|
@@ -4892,6 +4892,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4892
4892
|
}]
|
|
4893
4893
|
}], ctorParameters: () => [] });
|
|
4894
4894
|
|
|
4895
|
+
class WorkShiftDndService {
|
|
4896
|
+
constructor() {
|
|
4897
|
+
this.draggingData$ = new BehaviorSubject('');
|
|
4898
|
+
this.draggingShift$ = new BehaviorSubject(undefined);
|
|
4899
|
+
this.draggingFromCellId$ = new BehaviorSubject('');
|
|
4900
|
+
this.dragoverCellId$ = new BehaviorSubject('');
|
|
4901
|
+
}
|
|
4902
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: WorkShiftDndService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4903
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: WorkShiftDndService, providedIn: 'root' }); }
|
|
4904
|
+
}
|
|
4905
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: WorkShiftDndService, decorators: [{
|
|
4906
|
+
type: Injectable,
|
|
4907
|
+
args: [{
|
|
4908
|
+
providedIn: 'root'
|
|
4909
|
+
}]
|
|
4910
|
+
}], ctorParameters: () => [] });
|
|
4911
|
+
|
|
4895
4912
|
class CoreFormControlBaseComponent {
|
|
4896
4913
|
constructor() {
|
|
4897
4914
|
this.onChange = (_) => { };
|
|
@@ -8127,7 +8144,7 @@ class CoreOrgParamComponent extends CoreFormControlBaseComponent {
|
|
|
8127
8144
|
this.onChange([]);
|
|
8128
8145
|
}
|
|
8129
8146
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CoreOrgParamComponent, deps: [{ token: SeekerService }, { token: LayoutService }, { token: OrganizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.3", type: CoreOrgParamComponent, isStandalone: true, selector: "core-org-param", providers: [
|
|
8147
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.3", type: CoreOrgParamComponent, isStandalone: true, selector: "core-org-param", inputs: { accessorMode: "accessorMode" }, providers: [
|
|
8131
8148
|
{
|
|
8132
8149
|
provide: NG_VALUE_ACCESSOR,
|
|
8133
8150
|
multi: true,
|
|
@@ -8151,7 +8168,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
8151
8168
|
useExisting: CoreOrgParamComponent
|
|
8152
8169
|
},
|
|
8153
8170
|
], 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\" (itemClick)=\"onItemClick($event)\" (itemDoubleClick)=\"onItemDoubleClick($event)\" (idsChange)=\"onIdsChange($event)\"\r\n [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 </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;background-color:#e9e9e9;right:3px;top:3px;width:29px;height:29px;border-radius:.275rem;cursor:pointer}.core-org-param-container>.seeker-icon-wrapper>.flex-wrapper{width:29px;height:29px;display:flex;align-items:center;justify-content:center}.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:29px;height:29px;border-radius:.275rem;cursor:pointer}.core-org-param-container .input-wrapper .clear-icon-wrapper>.flex-wrapper{width:29px;height:29px;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;border-radius:10px}.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);border-bottom-left-radius:10px;border-bottom-right-radius:10px;padding:var(--size-layout-block-cell-spacing);position:absolute;bottom:0;left:0;width:100%}.core-org-param-container .footer button:first-child{margin-right:var(--size-layout-block-cell-spacing)}.core-org-param-container .core-tabbe-wrapper{margin-top:5px}\n"] }]
|
|
8154
|
-
}], ctorParameters: () => [{ type: SeekerService }, { type: LayoutService }, { type: OrganizationService }]
|
|
8171
|
+
}], ctorParameters: () => [{ type: SeekerService }, { type: LayoutService }, { type: OrganizationService }], propDecorators: { accessorMode: [{
|
|
8172
|
+
type: Input
|
|
8173
|
+
}] } });
|
|
8155
8174
|
|
|
8156
8175
|
class CoreParamControlComponent extends BaseComponent {
|
|
8157
8176
|
constructor(mls, alertService) {
|
|
@@ -8167,7 +8186,7 @@ class CoreParamControlComponent extends BaseComponent {
|
|
|
8167
8186
|
}
|
|
8168
8187
|
}
|
|
8169
8188
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CoreParamControlComponent, deps: [{ token: MultiLanguageService }, { token: AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8170
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: CoreParamControlComponent, isStandalone: true, selector: "core-param-control", inputs: { control: "control", enableTimeZoneConverterForDateTimePeriodParameters: "enableTimeZoneConverterForDateTimePeriodParameters" }, usesInheritance: true, ngImport: i0, template: "<div class=\"core-param-control-container\">\r\n\r\n <!-- START: LABEL SESSION-->\r\n <label [class]=\"'control-label'\" *ngIf=\"control.controlType==='CHECKBOX'\">\r\n </label>\r\n <!-- ('UI.COMMON_FILTER' | translate: lang) + -->\r\n <label *ngIf=\"control.name==='dateFrom'\">\r\n {{\r\n\r\n (control.label | translate: lang) +\r\n ('UI.COMMON_FROM' | translate: lang)\r\n }}\r\n </label>\r\n\r\n <label *ngIf=\"control.name==='dateTo'\">\r\n {{\r\n 'UI.COMMON_TO' | translate: lang\r\n }}\r\n </label>\r\n <label *ngIf=\"control.controlType=='DATEPICKER' && control.name!=='dateFrom' && control.name!=='dateTo'\">\r\n {{ control.label | translate: lang }}\r\n </label>\r\n\r\n <label *ngIf=\"control.controlType!=='CHECKBOX' && control.controlType!=='DATEPICKER'\">\r\n {{ control.label | translate: lang }}\r\n </label>\r\n <!-- START: LABEL SESSION-->\r\n\r\n <!-- START: FORM-CONTROL SESSION-->\r\n <ng-container *ngIf=\"control.controlType==='SEEKER' && control.seekerSourceType==='ORGANIZATION_UNIT_SEEK'\">\r\n <core-org-param [(ngModel)]=\"control.ngModel\" (ngModelChange)=\"control.ngModelChange(control.name, $event)\"></core-org-param>\r\n </ng-container>\r\n <ng-container *ngIf=\"control.controlType==='TEXTBOX'\">\r\n <input *ngIf=\"control.type==='date'\" [(ngModel)]=\"control.ngModel\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\" [type]=\"control.type\"\r\n [disabled]=\"!!control.disabled!\" class=\"form-control\" useValueAsDate>\r\n <input *ngIf=\"control.type==='number'\" [(ngModel)]=\"control.ngModel\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\" [type]=\"control.type\"\r\n [disabled]=\"!!control.disabled!\" class=\"form-control\" [step]=\"control.step || '1'\">\r\n <input *ngIf=\"control.type!=='date' && control.type!=='number'\" [(ngModel)]=\"control.ngModel\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\" [type]=\"control.type\"\r\n [disabled]=\"!!control.disabled!\" class=\"form-control\">\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.controlType==='CHECKBOX'\">\r\n <core-checkbox [(ngModel)]=\"control.ngModel\" (ngModelChange)=\"control.ngModelChange(control.name, $event)\"\r\n [text]=\"control.label\" [inputValue]=\"control.value\" [disabled]=\"!!control.disabled!\"></core-checkbox>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.controlType==='DATEPICKER'\">\r\n <core-date-picker [(ngModel)]=\"control.ngModel\" [rangeLimit]=\"control.rangeLimit!\"\r\n [enableTimeZoneConverter]=\"enableTimeZoneConverterForDateTimePeriodParameters\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\"\r\n [disabled]=\"!!control.disabled!\"></core-date-picker>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.controlType==='DROPDOWN' && !!control.dropdownOptions$\">\r\n <core-dropdown [(ngModel)]=\"control.ngModel\" [disabled]=\"!!control.disabled!\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\" [paramMode]=\"true\"\r\n [options$]=\"control.dropdownOptions$!\"></core-dropdown>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.controlType==='CHECKLIST' && !!control.checklistOptions$\">\r\n <core-checklist [(ngModel)]=\"control.ngModel\" [disabled]=\"!!control.disabled!\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\" [paramMode]=\"true\"\r\n [options$]=\"control.checklistOptions$!\"></core-checklist>\r\n </ng-container>\r\n\r\n <!-- END: FORM-CONTROL SESSION-->\r\n\r\n</div>", styles: [".core-param-control-container{padding-left:0;font-size:13px}.core-param-control-container label{color:#848484}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: CoreDropdownComponent, selector: "core-dropdown", inputs: ["getByIdObject$", "paramMode", "shownFrom", "options$", "height", "placeholder", "loading", "warningDisable", "itemHeight"] }, { kind: "component", type: CoreChecklistComponent, selector: "core-checklist", inputs: ["paramMode", "getByIdObject$", "shownFrom", "options$", "height", "placeholder", "loading", "readonly", "disabled"] }, { kind: "component", type: CoreCheckboxComponent, selector: "core-checkbox", inputs: ["text", "tooltipPosition", "tooltip", "inputValue", "disabled"], outputs: ["onClick"] }, { kind: "component", type: CoreDatePickerComponent, selector: "core-date-picker", inputs: ["enableTimeZoneConverter", "showPlaceholder", "popupWidth", "popupXPadding", "rangeLimit", "readonly", "disabled"] }, { kind: "component", type: CoreOrgParamComponent, selector: "core-org-param" }] }); }
|
|
8189
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: CoreParamControlComponent, isStandalone: true, selector: "core-param-control", inputs: { control: "control", enableTimeZoneConverterForDateTimePeriodParameters: "enableTimeZoneConverterForDateTimePeriodParameters" }, usesInheritance: true, ngImport: i0, template: "<div class=\"core-param-control-container\">\r\n\r\n <!-- START: LABEL SESSION-->\r\n <label [class]=\"'control-label'\" *ngIf=\"control.controlType==='CHECKBOX'\">\r\n </label>\r\n <!-- ('UI.COMMON_FILTER' | translate: lang) + -->\r\n <label *ngIf=\"control.name==='dateFrom'\">\r\n {{\r\n\r\n (control.label | translate: lang) +\r\n ('UI.COMMON_FROM' | translate: lang)\r\n }}\r\n </label>\r\n\r\n <label *ngIf=\"control.name==='dateTo'\">\r\n {{\r\n 'UI.COMMON_TO' | translate: lang\r\n }}\r\n </label>\r\n <label *ngIf=\"control.controlType=='DATEPICKER' && control.name!=='dateFrom' && control.name!=='dateTo'\">\r\n {{ control.label | translate: lang }}\r\n </label>\r\n\r\n <label *ngIf=\"control.controlType!=='CHECKBOX' && control.controlType!=='DATEPICKER'\">\r\n {{ control.label | translate: lang }}\r\n </label>\r\n <!-- START: LABEL SESSION-->\r\n\r\n <!-- START: FORM-CONTROL SESSION-->\r\n <ng-container *ngIf=\"control.controlType==='SEEKER' && control.seekerSourceType==='ORGANIZATION_UNIT_SEEK'\">\r\n <core-org-param [(ngModel)]=\"control.ngModel\" (ngModelChange)=\"control.ngModelChange(control.name, $event)\"></core-org-param>\r\n </ng-container>\r\n <ng-container *ngIf=\"control.controlType==='TEXTBOX'\">\r\n <input *ngIf=\"control.type==='date'\" [(ngModel)]=\"control.ngModel\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\" [type]=\"control.type\"\r\n [disabled]=\"!!control.disabled!\" class=\"form-control\" useValueAsDate>\r\n <input *ngIf=\"control.type==='number'\" [(ngModel)]=\"control.ngModel\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\" [type]=\"control.type\"\r\n [disabled]=\"!!control.disabled!\" class=\"form-control\" [step]=\"control.step || '1'\">\r\n <input *ngIf=\"control.type!=='date' && control.type!=='number'\" [(ngModel)]=\"control.ngModel\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\" [type]=\"control.type\"\r\n [disabled]=\"!!control.disabled!\" class=\"form-control\">\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.controlType==='CHECKBOX'\">\r\n <core-checkbox [(ngModel)]=\"control.ngModel\" (ngModelChange)=\"control.ngModelChange(control.name, $event)\"\r\n [text]=\"control.label\" [inputValue]=\"control.value\" [disabled]=\"!!control.disabled!\"></core-checkbox>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.controlType==='DATEPICKER'\">\r\n <core-date-picker [(ngModel)]=\"control.ngModel\" [rangeLimit]=\"control.rangeLimit!\"\r\n [enableTimeZoneConverter]=\"enableTimeZoneConverterForDateTimePeriodParameters\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\"\r\n [disabled]=\"!!control.disabled!\"></core-date-picker>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.controlType==='DROPDOWN' && !!control.dropdownOptions$\">\r\n <core-dropdown [(ngModel)]=\"control.ngModel\" [disabled]=\"!!control.disabled!\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\" [paramMode]=\"true\"\r\n [options$]=\"control.dropdownOptions$!\"></core-dropdown>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.controlType==='CHECKLIST' && !!control.checklistOptions$\">\r\n <core-checklist [(ngModel)]=\"control.ngModel\" [disabled]=\"!!control.disabled!\"\r\n (ngModelChange)=\"control.ngModelChange(control.name, $event)\" [paramMode]=\"true\"\r\n [options$]=\"control.checklistOptions$!\"></core-checklist>\r\n </ng-container>\r\n\r\n <!-- END: FORM-CONTROL SESSION-->\r\n\r\n</div>", styles: [".core-param-control-container{padding-left:0;font-size:13px}.core-param-control-container label{color:#848484}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: CoreDropdownComponent, selector: "core-dropdown", inputs: ["getByIdObject$", "paramMode", "shownFrom", "options$", "height", "placeholder", "loading", "warningDisable", "itemHeight"] }, { kind: "component", type: CoreChecklistComponent, selector: "core-checklist", inputs: ["paramMode", "getByIdObject$", "shownFrom", "options$", "height", "placeholder", "loading", "readonly", "disabled"] }, { kind: "component", type: CoreCheckboxComponent, selector: "core-checkbox", inputs: ["text", "tooltipPosition", "tooltip", "inputValue", "disabled"], outputs: ["onClick"] }, { kind: "component", type: CoreDatePickerComponent, selector: "core-date-picker", inputs: ["enableTimeZoneConverter", "showPlaceholder", "popupWidth", "popupXPadding", "rangeLimit", "readonly", "disabled"] }, { kind: "component", type: CoreOrgParamComponent, selector: "core-org-param", inputs: ["accessorMode"] }] }); }
|
|
8171
8190
|
}
|
|
8172
8191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CoreParamControlComponent, decorators: [{
|
|
8173
8192
|
type: Component,
|
|
@@ -17959,6 +17978,7 @@ class LanguageComponent {
|
|
|
17959
17978
|
{
|
|
17960
17979
|
caption: EnumTranslateKey.UI_ENTITY_FIELD_CAPTION_LANGUAGE_KEY,
|
|
17961
17980
|
field: 'key',
|
|
17981
|
+
showForConfirmation: true,
|
|
17962
17982
|
type: 'string',
|
|
17963
17983
|
align: 'left',
|
|
17964
17984
|
width: 400,
|
|
@@ -23804,41 +23824,224 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
23804
23824
|
}] });
|
|
23805
23825
|
|
|
23806
23826
|
class CoreShiftStickerComponent extends BaseComponent {
|
|
23827
|
+
constructor() {
|
|
23828
|
+
super(...arguments);
|
|
23829
|
+
this.$container = viewChild('container');
|
|
23830
|
+
this.$shiftDetails = viewChild('shiftDetails');
|
|
23831
|
+
this.$check = viewChild('check');
|
|
23832
|
+
this.$plus = viewChild('plus');
|
|
23833
|
+
this.$shift = input.required();
|
|
23834
|
+
this.$shiftCellId = input.required();
|
|
23835
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
23836
|
+
this.workShiftDndService = inject(WorkShiftDndService);
|
|
23837
|
+
this.$height = input(36.59);
|
|
23838
|
+
this.$width = input();
|
|
23839
|
+
this.$code = computed(() => this.$shift().code);
|
|
23840
|
+
this.$name = computed(() => this.$shift().name);
|
|
23841
|
+
this.$hoursStart = computed(() => this.$shift().hoursStart);
|
|
23842
|
+
this.$hoursStop = computed(() => this.$shift().hoursStop);
|
|
23843
|
+
this.$symbolCode = computed(() => this.$shift().symbol.code);
|
|
23844
|
+
this.$symbolName = computed(() => this.$shift().symbol.name);
|
|
23845
|
+
this.$isOff = computed(() => this.$shift().symbol.isOff);
|
|
23846
|
+
this.$isHolidayCal = computed(() => this.$shift().symbol.isHolidayCal);
|
|
23847
|
+
this.$isHaveSal = computed(() => this.$shift().symbol.isHaveSal);
|
|
23848
|
+
this.$isInsArising = computed(() => this.$shift().symbol.isInsArising);
|
|
23849
|
+
this.$duration = computed(() => (this.$shift().hoursStop.getTime() - this.$shift().hoursStart.getTime()) / 1000 / 60 / 60);
|
|
23850
|
+
// Dynamic style property
|
|
23851
|
+
this.height = '36.59px';
|
|
23852
|
+
this.borderRadius = '2px';
|
|
23853
|
+
this.fontSize = '11px';
|
|
23854
|
+
this.lineHeight = 1.3;
|
|
23855
|
+
this.firstLinefontWeight = 600;
|
|
23856
|
+
this.cursor = 'pointer';
|
|
23857
|
+
this.padding = '4px 6px';
|
|
23858
|
+
this.color = 'white';
|
|
23859
|
+
this.backgroundColor = '#F76B6A';
|
|
23860
|
+
}
|
|
23861
|
+
ngOnChanges(changes) {
|
|
23862
|
+
if (!!changes['checked']) {
|
|
23863
|
+
this.cdr.markForCheck();
|
|
23864
|
+
}
|
|
23865
|
+
}
|
|
23807
23866
|
ngOnInit() {
|
|
23808
23867
|
this.subscriptions.push(this.mls.lang$.subscribe(x => this.lang = x));
|
|
23809
|
-
this.
|
|
23810
|
-
this.
|
|
23811
|
-
this.
|
|
23812
|
-
this.
|
|
23813
|
-
|
|
23814
|
-
|
|
23815
|
-
|
|
23816
|
-
|
|
23817
|
-
|
|
23818
|
-
|
|
23819
|
-
|
|
23820
|
-
|
|
23821
|
-
|
|
23822
|
-
|
|
23868
|
+
this.relativelyIsMorning = (this.$shift().hoursStart.getHours() >= 6 && this.$shift().hoursStart.getHours() <= 12) || (this.$shift().hoursStop.getHours() >= 6 && this.$shift().hoursStop.getHours() <= 12);
|
|
23869
|
+
this.relativelyIsAfternoon = (this.$shift().hoursStart.getHours() >= 12 && this.$shift().hoursStart.getHours() <= 18) || (this.$shift().hoursStop.getHours() >= 12 && this.$shift().hoursStop.getHours() <= 18);
|
|
23870
|
+
this.relativelyIsEverning = (this.$shift().hoursStart.getHours() >= 18 && this.$shift().hoursStart.getHours() <= 24) || (this.$shift().hoursStop.getHours() >= 18 && this.$shift().hoursStop.getHours() <= 0);
|
|
23871
|
+
this.relativelyIsNight = (this.$shift().hoursStart.getHours() >= 0 && this.$shift().hoursStart.getHours() <= 6) || (this.$shift().hoursStop.getHours() >= 0 && this.$shift().hoursStop.getHours() <= 6);
|
|
23872
|
+
}
|
|
23873
|
+
ngAfterViewInit() {
|
|
23874
|
+
setTimeout(() => {
|
|
23875
|
+
fromEvent(this.$container()?.nativeElement, 'dragstart')
|
|
23876
|
+
.subscribe((ev) => {
|
|
23877
|
+
ev.dataTransfer.setData("text/plain", `${this.$shiftCellId()}:${this.$shift().code}`);
|
|
23878
|
+
this.workShiftDndService.draggingData$.next(ev.dataTransfer.getData("text/plain"));
|
|
23879
|
+
this.workShiftDndService.draggingShift$.next(this.$shift());
|
|
23880
|
+
this.workShiftDndService.draggingFromCellId$.next(this.$shiftCellId());
|
|
23881
|
+
this.$shiftDetails()?.nativeElement.style.setProperty('width', '100%');
|
|
23882
|
+
this.$shiftDetails()?.nativeElement.style.setProperty('padding-left', '6px');
|
|
23883
|
+
this.$check()?.nativeElement.style.setProperty('display', 'none');
|
|
23884
|
+
this.$plus()?.nativeElement.style.setProperty('display', 'none');
|
|
23885
|
+
});
|
|
23886
|
+
fromEvent(this.$container()?.nativeElement, 'drag')
|
|
23887
|
+
.pipe(debounceTime(200))
|
|
23888
|
+
.subscribe((ev) => {
|
|
23889
|
+
});
|
|
23890
|
+
fromEvent(this.$container()?.nativeElement, 'dragend')
|
|
23891
|
+
.subscribe((ev) => {
|
|
23892
|
+
// According to the HTML5 Drag and Drop API,
|
|
23893
|
+
// dataTransfer is cleared or reset at the end of the drag operation.
|
|
23894
|
+
// This means that the data you set in dragstart is no longer available in dragend.
|
|
23895
|
+
this.workShiftDndService.draggingData$.next('');
|
|
23896
|
+
this.workShiftDndService.draggingShift$.next(undefined);
|
|
23897
|
+
this.workShiftDndService.draggingFromCellId$.next('');
|
|
23898
|
+
this.$shiftDetails()?.nativeElement.style.removeProperty('width');
|
|
23899
|
+
this.$shiftDetails()?.nativeElement.style.removeProperty('padding-left');
|
|
23900
|
+
this.$check()?.nativeElement.style.removeProperty('display');
|
|
23901
|
+
this.$plus()?.nativeElement.style.removeProperty('display');
|
|
23902
|
+
});
|
|
23903
|
+
});
|
|
23823
23904
|
}
|
|
23824
23905
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CoreShiftStickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
23825
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.3", type: CoreShiftStickerComponent, isStandalone: true, selector: "core-shift-sticker", inputs: { shift: "shift", width: "width" }, usesInheritance: true, ngImport: i0, template: "<div class=\"core-shift-sticker-container d-flex d-flex-between\"
|
|
23906
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.3", type: CoreShiftStickerComponent, isStandalone: true, selector: "core-shift-sticker", inputs: { $shift: { classPropertyName: "$shift", publicName: "$shift", isSignal: true, isRequired: true, transformFunction: null }, $shiftCellId: { classPropertyName: "$shiftCellId", publicName: "$shiftCellId", isSignal: true, isRequired: true, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: false, isRequired: false, transformFunction: null }, $height: { classPropertyName: "$height", publicName: "$height", isSignal: true, isRequired: false, transformFunction: null }, $width: { classPropertyName: "$width", publicName: "$width", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "$container", first: true, predicate: ["container"], descendants: true, isSignal: true }, { propertyName: "$shiftDetails", first: true, predicate: ["shiftDetails"], descendants: true, isSignal: true }, { propertyName: "$check", first: true, predicate: ["check"], descendants: true, isSignal: true }, { propertyName: "$plus", first: true, predicate: ["plus"], descendants: true, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #container class=\"core-shift-sticker-container d-flex d-flex-between open-font\" [ngStyle]=\"{\r\n position: 'relative',\r\n height,\r\n fontSize,\r\n cursor,\r\n width: $width() + 'px',\r\n margin: '2px'\r\n}\" draggable=\"true\">\r\n <div #shiftDetails class=\"shift-details p-relative\" [ngStyle]=\"{\r\n color,\r\n backgroundColor\r\n }\" [class.checked]=\"checked\">\r\n <div #check class=\"check p-absolute\">\r\n <core-checkbox [(ngModel)]=\"checked\"></core-checkbox>\r\n </div>\r\n <div class=\"ellipsis p-relative first-line\" title=\"9:00 AM - 11:00 AM \u2022 2h\"\r\n ng-class=\"{'icon-on-right': !event.showBigIcon && event.rrule && event.type !== 'availability'}\">\r\n {{ $hoursStart() | tableCell : 'TIME_HHMM' : lang }} - {{ $hoursStop() | tableCell : 'TIME_HHMM' : lang }} \u2022\r\n {{ $duration() }}\r\n </div>\r\n <div class=\"ellipsis second-line\" ng-class=\"{'icon-on-right': !event.showBigIcon && event.summary}\">\r\n <span>\r\n {{ $symbolCode() }} \u2022\r\n\r\n @if ($isOff()) {\r\n <i class=\"fas fa-plug-circle-minus\"></i>\r\n }\r\n @if ($isHolidayCal()) {\r\n <i class=\"fas fa-champagne-glasses\"></i>\r\n }\r\n @if ($isHaveSal()) {\r\n <i class=\"fas fa-sack-dollar\"></i>\r\n }\r\n @if ($isInsArising()) {\r\n <i class=\"fas fa-car-burst\"></i>\r\n }\r\n </span>\r\n </div>\r\n\r\n <div #plus class=\"plus p-absolute\">\r\n <i class=\"feather-plus\"></i>\r\n </div>\r\n\r\n </div>\r\n\r\n</div>", styles: [".core-shift-sticker-container{--height: 36.59px;--width: 228px;--border: none;--opacity: 1;box-sizing:border-box;min-width:105px;max-width:228px;opacity:var(--opacity);border:var(--border)}.core-shift-sticker-container *{box-sizing:border-box}.core-shift-sticker-container .shift-details{padding:4px 6px;font-size:11px;line-height:1.3;width:100%;border-radius:2px}.core-shift-sticker-container .shift-details .first-line{height:14.3px;font-weight:600}.core-shift-sticker-container .shift-details .second-line{height:14.3;font-weight:400}.core-shift-sticker-container .shift-details.checked{border-top-right-radius:0;border-bottom-right-radius:0;padding-left:var(--height)}.core-shift-sticker-container .shift-details.checked .check{display:flex;align-items:center;justify-content:center}.core-shift-sticker-container:hover{opacity:.8}.core-shift-sticker-container:hover .shift-details{width:calc(100% - var(--height) - 2px);border-top-right-radius:0;border-bottom-right-radius:0;padding-left:var(--height)}.core-shift-sticker-container:hover .shift-details .check,.core-shift-sticker-container:hover .shift-details .plus{display:flex;align-items:center;justify-content:center}.core-shift-sticker-container .check,.core-shift-sticker-container .plus{width:var(--height);height:var(--height);top:0;display:none}.core-shift-sticker-container .check{left:0}.core-shift-sticker-container .plus{font-size:24px;border:solid 2px #646464;border-radius:2px;right:calc(var(--height) * -1 - 2px);color:#646464}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: TableCellPipe, name: "tableCell" }, { kind: "component", type: CoreCheckboxComponent, selector: "core-checkbox", inputs: ["text", "tooltipPosition", "tooltip", "inputValue", "disabled"], outputs: ["onClick"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23826
23907
|
}
|
|
23827
23908
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CoreShiftStickerComponent, decorators: [{
|
|
23828
23909
|
type: Component,
|
|
23829
|
-
args: [{ selector: 'core-shift-sticker', standalone: true, imports: [
|
|
23910
|
+
args: [{ selector: 'core-shift-sticker', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
23830
23911
|
NgStyle,
|
|
23831
23912
|
TranslatePipe,
|
|
23832
23913
|
TooltipDirective,
|
|
23833
23914
|
TableCellPipe,
|
|
23834
|
-
|
|
23835
|
-
|
|
23836
|
-
|
|
23837
|
-
|
|
23838
|
-
}], width: [{
|
|
23915
|
+
CoreCheckboxComponent,
|
|
23916
|
+
FormsModule
|
|
23917
|
+
], template: "<div #container class=\"core-shift-sticker-container d-flex d-flex-between open-font\" [ngStyle]=\"{\r\n position: 'relative',\r\n height,\r\n fontSize,\r\n cursor,\r\n width: $width() + 'px',\r\n margin: '2px'\r\n}\" draggable=\"true\">\r\n <div #shiftDetails class=\"shift-details p-relative\" [ngStyle]=\"{\r\n color,\r\n backgroundColor\r\n }\" [class.checked]=\"checked\">\r\n <div #check class=\"check p-absolute\">\r\n <core-checkbox [(ngModel)]=\"checked\"></core-checkbox>\r\n </div>\r\n <div class=\"ellipsis p-relative first-line\" title=\"9:00 AM - 11:00 AM \u2022 2h\"\r\n ng-class=\"{'icon-on-right': !event.showBigIcon && event.rrule && event.type !== 'availability'}\">\r\n {{ $hoursStart() | tableCell : 'TIME_HHMM' : lang }} - {{ $hoursStop() | tableCell : 'TIME_HHMM' : lang }} \u2022\r\n {{ $duration() }}\r\n </div>\r\n <div class=\"ellipsis second-line\" ng-class=\"{'icon-on-right': !event.showBigIcon && event.summary}\">\r\n <span>\r\n {{ $symbolCode() }} \u2022\r\n\r\n @if ($isOff()) {\r\n <i class=\"fas fa-plug-circle-minus\"></i>\r\n }\r\n @if ($isHolidayCal()) {\r\n <i class=\"fas fa-champagne-glasses\"></i>\r\n }\r\n @if ($isHaveSal()) {\r\n <i class=\"fas fa-sack-dollar\"></i>\r\n }\r\n @if ($isInsArising()) {\r\n <i class=\"fas fa-car-burst\"></i>\r\n }\r\n </span>\r\n </div>\r\n\r\n <div #plus class=\"plus p-absolute\">\r\n <i class=\"feather-plus\"></i>\r\n </div>\r\n\r\n </div>\r\n\r\n</div>", styles: [".core-shift-sticker-container{--height: 36.59px;--width: 228px;--border: none;--opacity: 1;box-sizing:border-box;min-width:105px;max-width:228px;opacity:var(--opacity);border:var(--border)}.core-shift-sticker-container *{box-sizing:border-box}.core-shift-sticker-container .shift-details{padding:4px 6px;font-size:11px;line-height:1.3;width:100%;border-radius:2px}.core-shift-sticker-container .shift-details .first-line{height:14.3px;font-weight:600}.core-shift-sticker-container .shift-details .second-line{height:14.3;font-weight:400}.core-shift-sticker-container .shift-details.checked{border-top-right-radius:0;border-bottom-right-radius:0;padding-left:var(--height)}.core-shift-sticker-container .shift-details.checked .check{display:flex;align-items:center;justify-content:center}.core-shift-sticker-container:hover{opacity:.8}.core-shift-sticker-container:hover .shift-details{width:calc(100% - var(--height) - 2px);border-top-right-radius:0;border-bottom-right-radius:0;padding-left:var(--height)}.core-shift-sticker-container:hover .shift-details .check,.core-shift-sticker-container:hover .shift-details .plus{display:flex;align-items:center;justify-content:center}.core-shift-sticker-container .check,.core-shift-sticker-container .plus{width:var(--height);height:var(--height);top:0;display:none}.core-shift-sticker-container .check{left:0}.core-shift-sticker-container .plus{font-size:24px;border:solid 2px #646464;border-radius:2px;right:calc(var(--height) * -1 - 2px);color:#646464}\n"] }]
|
|
23918
|
+
}], propDecorators: { checked: [{
|
|
23839
23919
|
type: Input
|
|
23840
23920
|
}] } });
|
|
23841
23921
|
|
|
23922
|
+
class CoreShiftCellComponent extends CoreFormControlBaseComponent {
|
|
23923
|
+
writeValue(obj) {
|
|
23924
|
+
this.$shifts.set(obj);
|
|
23925
|
+
}
|
|
23926
|
+
constructor(cdr, workShiftDndService) {
|
|
23927
|
+
super();
|
|
23928
|
+
this.cdr = cdr;
|
|
23929
|
+
this.workShiftDndService = workShiftDndService;
|
|
23930
|
+
this.$backgroundColor = input('white');
|
|
23931
|
+
this.$container = viewChild('container');
|
|
23932
|
+
this.shiftCellId = crypto.randomUUID();
|
|
23933
|
+
this.dragElements = new Set();
|
|
23934
|
+
this.$shifts = signal([
|
|
23935
|
+
{
|
|
23936
|
+
code: 'X',
|
|
23937
|
+
name: 'Ca làm việc ngày thường',
|
|
23938
|
+
symbol: {
|
|
23939
|
+
code: 'X',
|
|
23940
|
+
name: 'X',
|
|
23941
|
+
isHaveSal: true,
|
|
23942
|
+
},
|
|
23943
|
+
hoursStart: new Date(2024, 7, 13, 8, 0, 0),
|
|
23944
|
+
hoursStop: new Date(2024, 7, 13, 17, 30, 0)
|
|
23945
|
+
},
|
|
23946
|
+
{
|
|
23947
|
+
code: 'OFF',
|
|
23948
|
+
name: 'Ca ngày nghỉ',
|
|
23949
|
+
symbol: {
|
|
23950
|
+
code: 'OFF',
|
|
23951
|
+
name: 'OFF',
|
|
23952
|
+
isOff: true,
|
|
23953
|
+
},
|
|
23954
|
+
hoursStart: new Date(2024, 7, 13, 8, 0, 0),
|
|
23955
|
+
hoursStop: new Date(2024, 7, 13, 17, 30, 0)
|
|
23956
|
+
},
|
|
23957
|
+
{
|
|
23958
|
+
code: 'CT',
|
|
23959
|
+
name: 'Ca công tác',
|
|
23960
|
+
symbol: {
|
|
23961
|
+
code: 'CT',
|
|
23962
|
+
name: 'CR',
|
|
23963
|
+
isRegister: true,
|
|
23964
|
+
},
|
|
23965
|
+
hoursStart: new Date(2024, 7, 13, 8, 0, 0),
|
|
23966
|
+
hoursStop: new Date(2024, 7, 13, 17, 30, 0)
|
|
23967
|
+
}
|
|
23968
|
+
]);
|
|
23969
|
+
}
|
|
23970
|
+
ngAfterViewInit() {
|
|
23971
|
+
setTimeout(() => {
|
|
23972
|
+
const containerElement = this.$container()?.nativeElement;
|
|
23973
|
+
containerElement.style.setProperty('--background-color', this.$backgroundColor());
|
|
23974
|
+
this.cdr.markForCheck();
|
|
23975
|
+
fromEvent(containerElement, 'dragenter').subscribe((ev) => {
|
|
23976
|
+
ev.preventDefault();
|
|
23977
|
+
if (this.workShiftDndService.draggingFromCellId$.value === this.shiftCellId)
|
|
23978
|
+
return;
|
|
23979
|
+
this.dragElements.add(ev.target);
|
|
23980
|
+
containerElement.classList.add('valid-drop');
|
|
23981
|
+
//containerElement.classList.remove('invalid-drop');
|
|
23982
|
+
if (this.workShiftDndService.draggingData$.value.split(':')[0] !== this.shiftCellId) {
|
|
23983
|
+
this.$container()?.nativeElement.style.setProperty('--background-color', '#fff4ce');
|
|
23984
|
+
this.cdr.markForCheck();
|
|
23985
|
+
}
|
|
23986
|
+
});
|
|
23987
|
+
// Subscribe to dragover event to allow drop
|
|
23988
|
+
fromEvent(containerElement, 'dragover').subscribe((ev) => {
|
|
23989
|
+
ev.preventDefault();
|
|
23990
|
+
});
|
|
23991
|
+
fromEvent(containerElement, 'dragleave')
|
|
23992
|
+
.subscribe((ev) => {
|
|
23993
|
+
ev.preventDefault();
|
|
23994
|
+
if (this.workShiftDndService.draggingFromCellId$.value === this.shiftCellId)
|
|
23995
|
+
return;
|
|
23996
|
+
this.dragElements.delete(ev.target);
|
|
23997
|
+
if (this.dragElements.size === 0) {
|
|
23998
|
+
containerElement.classList.remove('valid-drop');
|
|
23999
|
+
//containerElement.classList.add('invalid-drop');
|
|
24000
|
+
}
|
|
24001
|
+
this.$container()?.nativeElement.style.setProperty('--background-color', this.$backgroundColor());
|
|
24002
|
+
this.cdr.markForCheck();
|
|
24003
|
+
});
|
|
24004
|
+
// Subscribe to drop event
|
|
24005
|
+
fromEvent(containerElement, 'drop').subscribe((ev) => {
|
|
24006
|
+
ev.preventDefault();
|
|
24007
|
+
if (this.workShiftDndService.draggingFromCellId$.value === this.shiftCellId)
|
|
24008
|
+
return;
|
|
24009
|
+
this.dragElements.clear(); // Clear the set
|
|
24010
|
+
//containerElement.classList.remove('valid-drop', 'invalid-drop');
|
|
24011
|
+
containerElement.classList.remove('valid-drop');
|
|
24012
|
+
this.$container()?.nativeElement.style.setProperty('--background-color', this.$backgroundColor());
|
|
24013
|
+
this.cdr.markForCheck();
|
|
24014
|
+
const data = ev.dataTransfer?.getData('text/plain'); // Example data retrieval
|
|
24015
|
+
// Handle drop logic based on data
|
|
24016
|
+
if (data) {
|
|
24017
|
+
// Process dropped data here
|
|
24018
|
+
console.log('Dropped data:', data);
|
|
24019
|
+
}
|
|
24020
|
+
});
|
|
24021
|
+
});
|
|
24022
|
+
}
|
|
24023
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CoreShiftCellComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: WorkShiftDndService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24024
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.3", type: CoreShiftCellComponent, isStandalone: true, selector: "core-shift-cell", inputs: { $backgroundColor: { classPropertyName: "$backgroundColor", publicName: "$backgroundColor", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
24025
|
+
{
|
|
24026
|
+
provide: NG_VALUE_ACCESSOR,
|
|
24027
|
+
multi: true,
|
|
24028
|
+
useExisting: CoreShiftCellComponent
|
|
24029
|
+
}
|
|
24030
|
+
], viewQueries: [{ propertyName: "$container", first: true, predicate: ["container"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #container class=\"core-shift-cell-container\">\r\n @for (shift of $shifts(); track $index) {\r\n <core-shift-sticker [$shift]=\"shift\" [$shiftCellId]=\"shiftCellId\" [$width]=\"228\"></core-shift-sticker>\r\n }\r\n</div>\r\n", styles: [".core-shift-cell-container{--background-color: #000000;padding:15px;background-color:var(--background-color)}.core-shift-cell-container.valid-drop{background-color:#90ee90}.core-shift-cell-container.invalid-drop{background-color:#f08080}\n"], dependencies: [{ kind: "component", type: CoreShiftStickerComponent, selector: "core-shift-sticker", inputs: ["$shift", "$shiftCellId", "checked", "$height", "$width"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24031
|
+
}
|
|
24032
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CoreShiftCellComponent, decorators: [{
|
|
24033
|
+
type: Component,
|
|
24034
|
+
args: [{ selector: 'core-shift-cell', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
24035
|
+
CoreShiftStickerComponent
|
|
24036
|
+
], providers: [
|
|
24037
|
+
{
|
|
24038
|
+
provide: NG_VALUE_ACCESSOR,
|
|
24039
|
+
multi: true,
|
|
24040
|
+
useExisting: CoreShiftCellComponent
|
|
24041
|
+
}
|
|
24042
|
+
], template: "<div #container class=\"core-shift-cell-container\">\r\n @for (shift of $shifts(); track $index) {\r\n <core-shift-sticker [$shift]=\"shift\" [$shiftCellId]=\"shiftCellId\" [$width]=\"228\"></core-shift-sticker>\r\n }\r\n</div>\r\n", styles: [".core-shift-cell-container{--background-color: #000000;padding:15px;background-color:var(--background-color)}.core-shift-cell-container.valid-drop{background-color:#90ee90}.core-shift-cell-container.invalid-drop{background-color:#f08080}\n"] }]
|
|
24043
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: WorkShiftDndService }] });
|
|
24044
|
+
|
|
23842
24045
|
class CoreSubFormGroupComponent extends CorePageEditComponent {
|
|
23843
24046
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CoreSubFormGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
23844
24047
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: CoreSubFormGroupComponent, isStandalone: true, selector: "core-sub-form-group", usesInheritance: true, ngImport: i0, template: "<core-form *ngIf=\"!!sections.length\" [formName]=\"'form'\" [inputSections]=\"sections\" [mode$]=\"mode$\" (onFormCreated)=\"onFormCreatedLocal($event)\"></core-form>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CoreFormComponent, selector: "core-form", inputs: ["formName", "submitText", "leftInputSections", "leftInputSectionsFlexSize", "inputSections", "mode$", "bottomTemplateRef", "customFormButtonItems", "showCaptionButton", "disableSaveButton", "checkError$"], outputs: ["onFormCreated", "onFormRefCreated", "onSubmit", "onSave", "onCancal", "buttonClick"] }] }); }
|
|
@@ -26177,5 +26380,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
26177
26380
|
* Generated bundle index. Do not edit.
|
|
26178
26381
|
*/
|
|
26179
26382
|
|
|
26180
|
-
export { AlertComponent, AlertService, AnimatedTextComponent, AnimatedTextService, AppConfigService, AppInitializationService, AppService, ApplicationHelpService, 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, CoreCompositionComponent, CoreCompositionService, CoreCompositionState, CoreConfirmDialogComponent, CoreContractSeekerComponent, CoreControlComponent, CoreControlNoGridBufferComponent, CoreControlNoSeekerComponent, CoreControlService, CoreCurrencyInputComponent, CoreDatePickerComponent, CoreDatetimeService, CoreDropdownComponent, CoreEmployeeSeekerComponent, CoreFileUploaderComponent, CoreFormComponent, CoreFormControlBaseComponent, CoreFormControlSeekerComponent, CoreFormLiteComponent, CoreFormService, CoreFormTabComponent, CoreGridBufferComponent, CoreHeaderParamsComponent, CoreHelperComponent, CoreIosSwitcherComponent, CoreLineComponent, CoreListComponent, CoreListLazyComponent, CoreLoadingSurfaceComponent, CoreMccComponent, CoreMonthPickerComponent, CoreMonthSelectorComponent, CoreNavigationTrackerComponent, CoreOrgParamComponent, CoreOrgTreeComponent, CoreOrgTreeService, CoreOrgTreeState, CoreOrgUnitSeekerComponent, CoreOrgchartflexComponent, CorePageEditComponent, CorePageEditLiteComponent, CorePageEditService, CorePageEditTabComponent, CorePageHeaderComponent, CorePageListComponent, CorePageListContentComponent, CorePageListService, CorePageListState, CorePageViewComponent, CorePaginationComponent, CorePaginationFullComponent, CorePaginationFullService, CoreParamControlComponent, CorePermissionActionsComponent, CorePermissionComponent, CorePermissionService, CorePositionConcurrentSeekerComponent, CorePositionSeekerComponent, CoreQueryBuilderComponent, CoreRadioGroupComponent, CoreReducerIconComponent, CoreRotatingTextComponent, CoreRoutingHistoryComponent, CoreScrollComponent, CoreScrollLazyComponent, CoreSeenByComponent, CoreShiftStickerComponent, CoreStatisticWidgetComponent, CoreStatusStickerComponent, CoreSubFormGroupComponent, CoreTableComponent, CoreTableService, CoreTabsComponent, CoreTagsComponent, CoreTopicPickerComponent, CoreTopicTreeComponent, CoreTreeComponent, CoreTreeGridComponent, CoreWageSeekerComponent, CoreWorkingSeekerComponent, CoreYearPickerComponent, CustomValidators, DATE_VALUE_ACCESSOR, DESKTOP_SCREEN_HEDER_HEIGHT, DateValueAccessor, DecisionComponent, DialogService, DialogStateComponent, DomService, ECoreTableToolClass, ECoreTableToolCode, EnumAlertType, EnumBrowserType, EnumButtonCaptionCode, EnumCoreArticleCategoryTreeaAccessorMode, EnumCoreButtonCode, EnumCoreButtonVNSCode, EnumCoreFileUploaderType, EnumCoreFormControlSeekerSourceType, EnumCoreOrgTreeaAccessorMode, EnumCorePageEditBootstrapClass, EnumCorePageEditFieldType, EnumCorePageEditMode, EnumCoreSeekerColumnContract, EnumCoreSeekerColumnJob, EnumCoreSeekerColumnPosition, EnumCoreSeekerColumnPositionConcurrent, EnumCoreSeekerColumnStaffProfile, EnumCoreSeekerColumnWage, EnumCoreSeekerColumnWorking, EnumCoreTablePipeType, EnumCoreTreeGridEditMode, EnumCoreViewItemType, EnumDeviceType, EnumErrorType, EnumExType, EnumFilterOperator, EnumFormBaseContolType, EnumHrComparisonCode, EnumICoreStatisticWidgetDataType, EnumIconClass, EnumNotificationDir, EnumOparator, EnumOsType, EnumPermissionObjectType, EnumProfileInfoSector, EnumRecursiveFields, EnumSignalRType, EnumSortDirection, EnumStyleButtonClass, EnumSwUpdateVersionUpdatesEventType, EvaluateDialogComponent, EvaluateDialogService, FileService, FilterPipe, FooterComponent, FullscreenModalLoaderComponent, FunctionComponent, FunctionEditComponent, FunctionEditService, FunctionIgnoreComponent, FunctionIgnoreEditComponent, GroupFunctionComponent, GroupFunctionEditComponent, GrpcService, HeaderService, HistoryService, HotKeysDirective, HttpErrorHandler, HubConnectionService, HuconcurrentlyComponent, IAlertOptions, ImageErrorResolverDirective, InMemoryComponent, InitializationCanActivateFn, InitializationCanMatchFn, InterceptorSkipHeader, IpServiceService, ItemComponent, JobComponent, JsonService, LanguageChangerComponent, LanguageComponent, LanguageEditComponent, LayoutService, LongTaskService, MOBILE_SCREEN_HEDER_HEIGHT, MapAttachmentToServerPipe, MapAvatarToServerPipe, MapNewsfeedMediaToServerPipe, MapService, MenuComponent, MenuEditComponent, MenuService, MessageService, ModalService, MultiLanguageService, MutationLogComponent, MutationViewComponent, NavigatorComponent, NavigatorService, NewlyCreatedTokenService, NgxHistaffAlphaComponent, NgxHistaffAlphaService, NormalizeHumanNamePipe, NotificationActionType, OnlineUsersComponent, OrganizationService, PageTitleComponent, PaginationComponent, PortalRouteComponent, PortalRouteEditComponent, PositionComponent, PositionEditService, PositionTransferService, PushNotificationService, RandomAvatarService, RecursiveService, RequestCache, RequestCacheWithMap, ResponseService, RightchatComponent, RoutingService, STICKER_COLOR_SCHEMA, SeekerService, SocketService, StaffProfileComponent, StatisticAuthService, StatisticService, StringHtmlPipe, StringService, SysActionComponent, SysActionEditComponent, SysFunctionActionComponent, SysFunctionActionEditComponent, SysFunctionActionMapperComponent, SysFunctionUrlMapperComponent, SysMenuService, SysModuleComponent, SysModuleEditComponent, TLA_CONFIG, TableCellPipe, Textbox, ThreedotsComponent, TimeSheetService, TooltipComponent, TooltipDirective, TopicPermissionService, TopicTreeService, TranslatePipe, UnicodeService, UploadedFileService, UploadedFilenameCutoffPipe, UrlService, UserActivityComponent, UserActivityService, WageComponent, WaittingScreenComponent, alertOptions, attachmentOptions, authInterceptor, baseUrlInterceptor, blob_to_base64_script, cachingInterceptor, defaultPaging, httpInterceptorProviders, liner_to_nested_array_script, longAlertOptions, noneAutoClosedAlertOptions, normalizeHumanName, responseInterceptor, themeBlue, timeZoneInterceptor, tokenInterceptor };
|
|
26383
|
+
export { AlertComponent, AlertService, AnimatedTextComponent, AnimatedTextService, AppConfigService, AppInitializationService, AppService, ApplicationHelpService, 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, CoreCompositionComponent, CoreCompositionService, CoreCompositionState, CoreConfirmDialogComponent, CoreContractSeekerComponent, CoreControlComponent, CoreControlNoGridBufferComponent, CoreControlNoSeekerComponent, CoreControlService, CoreCurrencyInputComponent, CoreDatePickerComponent, CoreDatetimeService, CoreDropdownComponent, CoreEmployeeSeekerComponent, CoreFileUploaderComponent, CoreFormComponent, CoreFormControlBaseComponent, CoreFormControlSeekerComponent, CoreFormLiteComponent, CoreFormService, CoreFormTabComponent, CoreGridBufferComponent, CoreHeaderParamsComponent, CoreHelperComponent, CoreIosSwitcherComponent, CoreLineComponent, CoreListComponent, CoreListLazyComponent, CoreLoadingSurfaceComponent, CoreMccComponent, CoreMonthPickerComponent, CoreMonthSelectorComponent, CoreNavigationTrackerComponent, CoreOrgParamComponent, CoreOrgTreeComponent, CoreOrgTreeService, CoreOrgTreeState, CoreOrgUnitSeekerComponent, CoreOrgchartflexComponent, CorePageEditComponent, CorePageEditLiteComponent, CorePageEditService, CorePageEditTabComponent, CorePageHeaderComponent, CorePageListComponent, CorePageListContentComponent, CorePageListService, CorePageListState, CorePageViewComponent, CorePaginationComponent, CorePaginationFullComponent, CorePaginationFullService, CoreParamControlComponent, CorePermissionActionsComponent, CorePermissionComponent, CorePermissionService, CorePositionConcurrentSeekerComponent, CorePositionSeekerComponent, CoreQueryBuilderComponent, CoreRadioGroupComponent, CoreReducerIconComponent, CoreRotatingTextComponent, CoreRoutingHistoryComponent, CoreScrollComponent, CoreScrollLazyComponent, CoreSeenByComponent, CoreShiftCellComponent, CoreShiftStickerComponent, CoreStatisticWidgetComponent, CoreStatusStickerComponent, CoreSubFormGroupComponent, CoreTableComponent, CoreTableService, CoreTabsComponent, CoreTagsComponent, CoreTopicPickerComponent, CoreTopicTreeComponent, CoreTreeComponent, CoreTreeGridComponent, CoreWageSeekerComponent, CoreWorkingSeekerComponent, CoreYearPickerComponent, CustomValidators, DATE_VALUE_ACCESSOR, DESKTOP_SCREEN_HEDER_HEIGHT, DateValueAccessor, DecisionComponent, DialogService, DialogStateComponent, DomService, ECoreTableToolClass, ECoreTableToolCode, EnumAlertType, EnumBrowserType, EnumButtonCaptionCode, EnumCoreArticleCategoryTreeaAccessorMode, EnumCoreButtonCode, EnumCoreButtonVNSCode, EnumCoreFileUploaderType, EnumCoreFormControlSeekerSourceType, EnumCoreOrgTreeaAccessorMode, EnumCorePageEditBootstrapClass, EnumCorePageEditFieldType, EnumCorePageEditMode, EnumCoreSeekerColumnContract, EnumCoreSeekerColumnJob, EnumCoreSeekerColumnPosition, EnumCoreSeekerColumnPositionConcurrent, EnumCoreSeekerColumnStaffProfile, EnumCoreSeekerColumnWage, EnumCoreSeekerColumnWorking, EnumCoreTablePipeType, EnumCoreTreeGridEditMode, EnumCoreViewItemType, EnumDeviceType, EnumErrorType, EnumExType, EnumFilterOperator, EnumFormBaseContolType, EnumHrComparisonCode, EnumICoreStatisticWidgetDataType, EnumIconClass, EnumNotificationDir, EnumOparator, EnumOsType, EnumPermissionObjectType, EnumProfileInfoSector, EnumRecursiveFields, EnumSignalRType, EnumSortDirection, EnumStyleButtonClass, EnumSwUpdateVersionUpdatesEventType, EvaluateDialogComponent, EvaluateDialogService, FileService, FilterPipe, FooterComponent, FullscreenModalLoaderComponent, FunctionComponent, FunctionEditComponent, FunctionEditService, FunctionIgnoreComponent, FunctionIgnoreEditComponent, GroupFunctionComponent, GroupFunctionEditComponent, GrpcService, HeaderService, HistoryService, HotKeysDirective, HttpErrorHandler, HubConnectionService, HuconcurrentlyComponent, IAlertOptions, ImageErrorResolverDirective, InMemoryComponent, InitializationCanActivateFn, InitializationCanMatchFn, InterceptorSkipHeader, IpServiceService, ItemComponent, JobComponent, JsonService, LanguageChangerComponent, LanguageComponent, LanguageEditComponent, LayoutService, LongTaskService, MOBILE_SCREEN_HEDER_HEIGHT, MapAttachmentToServerPipe, MapAvatarToServerPipe, MapNewsfeedMediaToServerPipe, MapService, MenuComponent, MenuEditComponent, MenuService, MessageService, ModalService, MultiLanguageService, MutationLogComponent, MutationViewComponent, NavigatorComponent, NavigatorService, NewlyCreatedTokenService, NgxHistaffAlphaComponent, NgxHistaffAlphaService, NormalizeHumanNamePipe, NotificationActionType, OnlineUsersComponent, OrganizationService, PageTitleComponent, PaginationComponent, PortalRouteComponent, PortalRouteEditComponent, PositionComponent, PositionEditService, PositionTransferService, PushNotificationService, RandomAvatarService, RecursiveService, RequestCache, RequestCacheWithMap, ResponseService, RightchatComponent, RoutingService, STICKER_COLOR_SCHEMA, SeekerService, SocketService, StaffProfileComponent, StatisticAuthService, StatisticService, StringHtmlPipe, StringService, SysActionComponent, SysActionEditComponent, SysFunctionActionComponent, SysFunctionActionEditComponent, SysFunctionActionMapperComponent, SysFunctionUrlMapperComponent, SysMenuService, SysModuleComponent, SysModuleEditComponent, TLA_CONFIG, TableCellPipe, Textbox, ThreedotsComponent, TimeSheetService, TooltipComponent, TooltipDirective, TopicPermissionService, TopicTreeService, TranslatePipe, UnicodeService, UploadedFileService, UploadedFilenameCutoffPipe, UrlService, UserActivityComponent, UserActivityService, WageComponent, WaittingScreenComponent, WorkShiftDndService, alertOptions, attachmentOptions, authInterceptor, baseUrlInterceptor, blob_to_base64_script, cachingInterceptor, defaultPaging, httpInterceptorProviders, liner_to_nested_array_script, longAlertOptions, noneAutoClosedAlertOptions, normalizeHumanName, responseInterceptor, themeBlue, timeZoneInterceptor, tokenInterceptor };
|
|
26181
26384
|
//# sourceMappingURL=ngx-histaff-alpha.mjs.map
|