@brggroup/share-lib 0.1.77 → 0.1.78
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/brggroup-share-lib.mjs +432 -108
- package/fesm2022/brggroup-share-lib.mjs.map +1 -1
- package/lib/WF/wf-combine/workflow-editor-combine/detail/wf-template.detail.d.ts +3 -2
- package/lib/WF/wf-combine/workflow-editor-combine/detail/wf-template.detail.d.ts.map +1 -1
- package/lib/WF/wf-combine/workflow-editor-combine/workflow-editor-combine.d.ts.map +1 -1
- package/lib/WF/wf-doc/wf-doc-list/wf-doc-list.d.ts.map +1 -1
- package/lib/WF/wf-doc/wf-doc-process/wf-doc-process.d.ts.map +1 -1
- package/lib/WF/wf-doc-swimlane/wf-doc-swimlane.d.ts +47 -0
- package/lib/WF/wf-doc-swimlane/wf-doc-swimlane.d.ts.map +1 -0
- package/lib/WF/wf-doc.service.d.ts +2 -0
- package/lib/WF/wf-doc.service.d.ts.map +1 -1
- package/lib/WF/wf-editor/workflow-editor.component.d.ts +6 -1
- package/lib/WF/wf-editor/workflow-editor.component.d.ts.map +1 -1
- package/lib/WF/wf-template.service.d.ts +1 -0
- package/lib/WF/wf-template.service.d.ts.map +1 -1
- package/lib/components/extend/extend-select/display-item.pipe.d.ts +8 -0
- package/lib/components/extend/extend-select/display-item.pipe.d.ts.map +1 -0
- package/lib/components/extend/extend-select/extend-select.d.ts +9 -15
- package/lib/components/extend/extend-select/extend-select.d.ts.map +1 -1
- package/lib/services/noti.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/public-api.d.ts.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, InjectionToken, NgZone, DestroyRef, Component, HostListener, ViewContainerRef, EventEmitter, Input, Output, ViewChild, Directive, Optional, Self,
|
|
2
|
+
import { inject, Injectable, InjectionToken, NgZone, DestroyRef, Component, HostListener, ViewContainerRef, EventEmitter, Input, Output, ViewChild, Directive, Optional, Self, Pipe, HostBinding, ChangeDetectorRef, forwardRef, ChangeDetectionStrategy } from '@angular/core';
|
|
3
3
|
import * as i1$8 from '@angular/router';
|
|
4
4
|
import { Router, ActivatedRoute, NavigationEnd, RouterModule, RouterOutlet } from '@angular/router';
|
|
5
5
|
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
@@ -32,6 +32,7 @@ import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
|
32
32
|
import { parse, isValid, startOfWeek, endOfWeek, subWeeks, startOfMonth, endOfMonth, subMonths } from 'date-fns';
|
|
33
33
|
import * as i6$1 from 'ng-zorro-antd/input-number';
|
|
34
34
|
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
35
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
35
36
|
import * as i13 from 'ng-zorro-antd/select';
|
|
36
37
|
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
37
38
|
import * as i8 from 'ng-zorro-antd/tooltip';
|
|
@@ -78,7 +79,6 @@ import * as i5$4 from 'ng-zorro-antd/empty';
|
|
|
78
79
|
import { NzEmptyModule, NzEmptyComponent } from 'ng-zorro-antd/empty';
|
|
79
80
|
import * as i16 from 'ng-zorro-antd/alert';
|
|
80
81
|
import { NzAlertModule, NzAlertComponent } from 'ng-zorro-antd/alert';
|
|
81
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
82
82
|
import * as i1$6 from 'ng-zorro-antd/tabs';
|
|
83
83
|
import { NzTabsModule } from 'ng-zorro-antd/tabs';
|
|
84
84
|
import * as i12 from '@angular/cdk/clipboard';
|
|
@@ -533,14 +533,56 @@ class NotiService {
|
|
|
533
533
|
this.notification.error('Lỗi phát sinh', errorMsg, {
|
|
534
534
|
showDetail: !!_data?.Data,
|
|
535
535
|
onDetail: () => {
|
|
536
|
+
// 1. Hàm helper để tìm và cắt các chuỗi dài (stack trace) thành Array
|
|
537
|
+
const formatTrace = (data) => {
|
|
538
|
+
if (!data || typeof data !== 'object')
|
|
539
|
+
return data;
|
|
540
|
+
// Clone data để không làm thay đổi object gốc của ứng dụng
|
|
541
|
+
const cloned = JSON.parse(JSON.stringify(data));
|
|
542
|
+
const traverse = (obj) => {
|
|
543
|
+
for (let key in obj) {
|
|
544
|
+
if (typeof obj[key] === 'string') {
|
|
545
|
+
// Cắt chuỗi nếu phát hiện các ký tự xuống dòng (kể cả dạng text literal \r\n từ backend)
|
|
546
|
+
const lines = obj[key].split(/\\r\\n|\\n|\r\n|\n/);
|
|
547
|
+
if (lines.length > 1) {
|
|
548
|
+
// Lọc bỏ các khoảng trắng thừa và các dòng trống
|
|
549
|
+
obj[key] = lines.map((l) => l.trim()).filter((l) => l.length > 0);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
else if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
553
|
+
traverse(obj[key]);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
traverse(cloned);
|
|
558
|
+
return cloned;
|
|
559
|
+
};
|
|
560
|
+
// 2. Gọi hàm formatTrace bọc lấy _data
|
|
536
561
|
const detailContent = {
|
|
537
562
|
API_URL: err?.url || 'Không xác định',
|
|
538
|
-
Details: _data,
|
|
563
|
+
Details: formatTrace(_data),
|
|
539
564
|
};
|
|
565
|
+
const formattedJson = escapeHtml(JSON.stringify(detailContent, null, 2));
|
|
566
|
+
// 3. Cập nhật CSS: Thêm break-all để ép bẻ dòng với các đường dẫn file (C:\...) quá dài không có khoảng trắng
|
|
567
|
+
const htmlContent = `
|
|
568
|
+
<pre style="
|
|
569
|
+
white-space: pre-wrap;
|
|
570
|
+
word-break: break-all;
|
|
571
|
+
overflow-wrap: break-word;
|
|
572
|
+
background-color: #f5f5f5;
|
|
573
|
+
padding: 12px;
|
|
574
|
+
border-radius: 4px;
|
|
575
|
+
font-family: monospace;
|
|
576
|
+
font-size: 13px;
|
|
577
|
+
max-height: 60vh;
|
|
578
|
+
overflow-y: auto;
|
|
579
|
+
overflow-x: hidden;
|
|
580
|
+
">${formattedJson}</pre>
|
|
581
|
+
`;
|
|
540
582
|
this.modal.error({
|
|
541
583
|
nzTitle: 'Chi tiết lỗi',
|
|
542
|
-
nzContent:
|
|
543
|
-
nzWidth: this.device.isMobile ? '90vw' : '
|
|
584
|
+
nzContent: htmlContent,
|
|
585
|
+
nzWidth: this.device.isMobile ? '90vw' : '75vw', // Nới rộng thêm một chút trên desktop
|
|
544
586
|
nzDraggable: true,
|
|
545
587
|
nzCentered: true,
|
|
546
588
|
nzOkText: 'Đóng',
|
|
@@ -3002,15 +3044,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
3002
3044
|
args: ['inputElement']
|
|
3003
3045
|
}] } });
|
|
3004
3046
|
|
|
3047
|
+
class DisplayItemPipe {
|
|
3048
|
+
transform(item, displayField, displayFields) {
|
|
3049
|
+
if (!item)
|
|
3050
|
+
return '';
|
|
3051
|
+
if (displayField) {
|
|
3052
|
+
return item[displayField];
|
|
3053
|
+
}
|
|
3054
|
+
if (displayFields?.length === 2) {
|
|
3055
|
+
return `[${item[displayFields[0]]}] [${item[displayFields[1]]}]`;
|
|
3056
|
+
}
|
|
3057
|
+
if (displayFields?.length) {
|
|
3058
|
+
return displayFields
|
|
3059
|
+
.map((field) => item[field])
|
|
3060
|
+
.filter((x) => x)
|
|
3061
|
+
.join(' - ');
|
|
3062
|
+
}
|
|
3063
|
+
return String(item);
|
|
3064
|
+
}
|
|
3065
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DisplayItemPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3066
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: DisplayItemPipe, isStandalone: true, name: "displayItem" });
|
|
3067
|
+
}
|
|
3068
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DisplayItemPipe, decorators: [{
|
|
3069
|
+
type: Pipe,
|
|
3070
|
+
args: [{
|
|
3071
|
+
name: 'displayItem',
|
|
3072
|
+
standalone: true, // Rất tốt cho Angular 19
|
|
3073
|
+
}]
|
|
3074
|
+
}] });
|
|
3075
|
+
|
|
3005
3076
|
class ExtendSelectComponent {
|
|
3077
|
+
destroyRef = inject(DestroyRef);
|
|
3006
3078
|
label = '';
|
|
3007
3079
|
floatingLabel = true;
|
|
3008
3080
|
placeHolder = '';
|
|
3009
3081
|
labelAlign = 'left';
|
|
3010
3082
|
dropdownMatchSelectWidth = false;
|
|
3011
|
-
/**
|
|
3012
|
-
* default = 8
|
|
3013
|
-
*/
|
|
3014
3083
|
labelSpan = 8;
|
|
3015
3084
|
labelFlex = null;
|
|
3016
3085
|
get disabled() {
|
|
@@ -3018,16 +3087,9 @@ class ExtendSelectComponent {
|
|
|
3018
3087
|
}
|
|
3019
3088
|
set disabled(val) {
|
|
3020
3089
|
this._disabled = val;
|
|
3021
|
-
|
|
3022
|
-
const control = this.formData.controls[this.controlName];
|
|
3023
|
-
if (this._disabled) {
|
|
3024
|
-
control.disable({ emitEvent: false });
|
|
3025
|
-
}
|
|
3026
|
-
else {
|
|
3027
|
-
control.enable({ emitEvent: false }); // <-- bỏ disable
|
|
3028
|
-
}
|
|
3029
|
-
}
|
|
3090
|
+
this.updateFormControlState();
|
|
3030
3091
|
}
|
|
3092
|
+
_disabled = false;
|
|
3031
3093
|
required = false;
|
|
3032
3094
|
noBottom = false;
|
|
3033
3095
|
multiple = false;
|
|
@@ -3036,91 +3098,86 @@ class ExtendSelectComponent {
|
|
|
3036
3098
|
inputWidth = '';
|
|
3037
3099
|
inputHeight = '';
|
|
3038
3100
|
borderBottomOnly = false;
|
|
3039
|
-
/**
|
|
3040
|
-
*
|
|
3041
|
-
*/
|
|
3042
3101
|
displayInline = false;
|
|
3043
3102
|
size = 'default';
|
|
3044
3103
|
lstItem = [];
|
|
3045
3104
|
displayField = '';
|
|
3046
3105
|
displayFields = [];
|
|
3047
3106
|
info = '';
|
|
3048
|
-
/**
|
|
3049
|
-
* Không có thì value sẽ là cả object
|
|
3050
|
-
*/
|
|
3051
3107
|
valueField = '';
|
|
3052
3108
|
formData;
|
|
3053
3109
|
controlName;
|
|
3054
3110
|
_ngModel = null;
|
|
3111
|
+
isSubmited = false;
|
|
3112
|
+
get maxMultipleCount() {
|
|
3113
|
+
// Nếu là multiple thì giới hạn số lượng bằng độ dài mảng,
|
|
3114
|
+
// Nếu không phải multiple thì gán Infinity để NG-ZORRO tự động ẨN bộ đếm.
|
|
3115
|
+
return this.multiple ? this.lstItem.length : Infinity;
|
|
3116
|
+
}
|
|
3055
3117
|
_ngModelChange = new EventEmitter();
|
|
3056
3118
|
itemChange = new EventEmitter();
|
|
3057
3119
|
onFocus = new EventEmitter();
|
|
3058
|
-
isSubmited = false;
|
|
3059
3120
|
get cssHeight() {
|
|
3060
|
-
return this.inputHeight ? +this.inputHeight.
|
|
3121
|
+
return this.inputHeight ? +this.inputHeight.replace('px', '') - 1 + 'px' : null;
|
|
3061
3122
|
}
|
|
3062
|
-
_disabled = false;
|
|
3063
3123
|
ngOnInit() {
|
|
3064
3124
|
if (this.formData && this.controlName) {
|
|
3065
|
-
this.formData.controls[this.controlName]
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
this.
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3125
|
+
const control = this.formData.controls[this.controlName];
|
|
3126
|
+
if (control) {
|
|
3127
|
+
if (this.required) {
|
|
3128
|
+
control.setValidators(Validators.required);
|
|
3129
|
+
}
|
|
3130
|
+
this.updateFormControlState();
|
|
3131
|
+
// Lắng nghe thay đổi form an toàn, tự động hủy khi component bị destroy
|
|
3132
|
+
control.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((val) => {
|
|
3133
|
+
this._ngModelChange.emit(val);
|
|
3134
|
+
this.itemChange.emit(this.findSelectedItem(val));
|
|
3135
|
+
});
|
|
3074
3136
|
}
|
|
3075
3137
|
}
|
|
3076
3138
|
}
|
|
3077
|
-
|
|
3078
|
-
if (this.
|
|
3079
|
-
|
|
3139
|
+
updateFormControlState() {
|
|
3140
|
+
if (this.formData && this.controlName) {
|
|
3141
|
+
const control = this.formData.controls[this.controlName];
|
|
3142
|
+
if (control) {
|
|
3143
|
+
this._disabled ? control.disable({ emitEvent: false }) : control.enable({ emitEvent: false });
|
|
3144
|
+
}
|
|
3080
3145
|
}
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3146
|
+
}
|
|
3147
|
+
findSelectedItem(val) {
|
|
3148
|
+
if (!this.valueField)
|
|
3149
|
+
return val;
|
|
3150
|
+
// Xử lý multiple
|
|
3151
|
+
if (Array.isArray(val)) {
|
|
3152
|
+
return this.lstItem.filter((x) => val.includes(x[this.valueField]));
|
|
3087
3153
|
}
|
|
3088
|
-
return
|
|
3154
|
+
return this.lstItem.find((x) => x[this.valueField] == val);
|
|
3089
3155
|
}
|
|
3090
3156
|
onSelectChange(val) {
|
|
3091
|
-
if (val
|
|
3157
|
+
if (Array.isArray(val) && val.includes('__all__')) {
|
|
3092
3158
|
const allIds = this.lstItem.map((x) => (this.valueField ? x[this.valueField] : x));
|
|
3093
3159
|
val = allIds;
|
|
3094
3160
|
}
|
|
3095
3161
|
this._ngModel = val;
|
|
3096
3162
|
this._ngModelChange.emit(val);
|
|
3097
3163
|
if (this.valueField) {
|
|
3098
|
-
this.itemChange.emit(this.
|
|
3164
|
+
this.itemChange.emit(this.findSelectedItem(val));
|
|
3099
3165
|
}
|
|
3100
3166
|
}
|
|
3101
3167
|
get isInvalidNgModel() {
|
|
3102
3168
|
if (!this.required)
|
|
3103
3169
|
return false;
|
|
3104
|
-
|
|
3105
|
-
const isEmpty = this._ngModel === null ||
|
|
3106
|
-
this._ngModel === undefined ||
|
|
3107
|
-
this._ngModel === '' ||
|
|
3108
|
-
(Array.isArray(this._ngModel) && this._ngModel.length === 0);
|
|
3109
|
-
return isEmpty;
|
|
3170
|
+
return (this._ngModel == null || this._ngModel === '' || (Array.isArray(this._ngModel) && this._ngModel.length === 0));
|
|
3110
3171
|
}
|
|
3111
3172
|
get customValidateStatus() {
|
|
3112
|
-
|
|
3113
|
-
if (this.isInvalidNgModel && this.isSubmited) {
|
|
3114
|
-
return 'error';
|
|
3115
|
-
}
|
|
3116
|
-
return '';
|
|
3173
|
+
return this.isInvalidNgModel && this.isSubmited ? 'error' : '';
|
|
3117
3174
|
}
|
|
3118
3175
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ExtendSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3119
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: ExtendSelectComponent, isStandalone: true, selector: "extend-select", inputs: { label: "label", floatingLabel: "floatingLabel", placeHolder: "placeHolder", labelAlign: "labelAlign", dropdownMatchSelectWidth: "dropdownMatchSelectWidth", labelSpan: "labelSpan", labelFlex: "labelFlex", disabled: "disabled", required: "required", noBottom: "noBottom", multiple: "multiple", showSelectAll: "showSelectAll", maxTagCount: "maxTagCount", inputWidth: "inputWidth", inputHeight: "inputHeight", borderBottomOnly: "borderBottomOnly", displayInline: "displayInline", size: "size", lstItem: "lstItem", displayField: "displayField", displayFields: "displayFields", info: "info", valueField: "valueField", formData: "formData", controlName: "controlName", _ngModel: "_ngModel", isSubmited: "isSubmited" }, outputs: { _ngModelChange: "_ngModelChange", itemChange: "itemChange", onFocus: "onFocus" }, host: { properties: { "style.--custom-select-height": "this.cssHeight" } }, ngImport: i0, template: "<div\n class=\"extend-select-wrapper\"\n [ngClass]=\"[floatingLabel && label ? 'floating-label' : '']\"\n [ngStyle]=\"{ display: displayInline ? 'inline' : null }\"\n>\n @if (!multiple) {\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"floatingLabel || labelFlex ? null : labelSpan\"\n [nzFlex]=\"labelFlex\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzNoColon]=\"true\"\n [nzLabelWrap]=\"floatingLabel ? false : true\"\n [nzTooltipTitle]=\"info\"\n [nzTooltipIcon]=\"info ? 'info-circle' : ''\"\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzAllowClear]=\"true\"\n [nzShowSearch]=\"true\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [formControlName]=\"controlName\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"floatingLabel || labelFlex ? null : labelSpan\"\n [nzFlex]=\"labelFlex\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzNoColon]=\"true\"\n [nzLabelWrap]=\"floatingLabel ? false : true\"\n [nzTooltipTitle]=\"info\"\n [nzTooltipIcon]=\"true ? 'info-circle' : ''\"\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzValidateStatus]=\"customValidateStatus\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzAllowClear]=\"true\"\n [nzShowSearch]=\"true\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n } @else {\n <nz-select\n class=\"full-width\"\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n [disabled]=\"disabled\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n 'custom-height-select': inputHeight ? true : false,\n }\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n }\n }\n } @else {\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"floatingLabel || labelFlex ? null : labelSpan\"\n [nzFlex]=\"labelFlex\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzNoColon]=\"true\"\n [nzLabelWrap]=\"floatingLabel ? false : true\"\n [nzTooltipTitle]=\"info\"\n [nzTooltipIcon]=\"info ? 'info-circle' : ''\"\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzMode]=\"'multiple'\"\n [nzMaxMultipleCount]=\"lstItem.length\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzAllowClear]=\"true\"\n [nzShowSearch]=\"true\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [formControlName]=\"controlName\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"floatingLabel || labelFlex ? null : labelSpan\"\n [nzFlex]=\"labelFlex\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzNoColon]=\"true\"\n [nzLabelWrap]=\"floatingLabel ? false : true\"\n [nzTooltipTitle]=\"info\"\n [nzTooltipIcon]=\"info ? 'info-circle' : ''\"\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzValidateStatus]=\"customValidateStatus\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzMode]=\"'multiple'\"\n [nzMaxMultipleCount]=\"lstItem.length\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzAllowClear]=\"true\"\n [nzShowSearch]=\"true\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n } @else {\n <nz-select\n class=\"full-width\"\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzMode]=\"'multiple'\"\n [nzMaxMultipleCount]=\"lstItem.length\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n }\n }\n }\n</div>\n", styles: ["::ng-deep .extend-select-wrapper.floating-label{position:relative;padding-top:14px}::ng-deep .extend-select-wrapper.floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:5px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .extend-select-wrapper.floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .extend-select-wrapper .full-width{width:100%}.extend-select-wrapper.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.extend-select-wrapper.floating-label nz-form-item:has(input[disabled]) nz-form-label,.extend-select-wrapper.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.extend-select-wrapper.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.extend-select-wrapper.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.extend-select-wrapper.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i5.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i13.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i13.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzToolTipModule }] });
|
|
3176
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: ExtendSelectComponent, isStandalone: true, selector: "extend-select", inputs: { label: "label", floatingLabel: "floatingLabel", placeHolder: "placeHolder", labelAlign: "labelAlign", dropdownMatchSelectWidth: "dropdownMatchSelectWidth", labelSpan: "labelSpan", labelFlex: "labelFlex", disabled: "disabled", required: "required", noBottom: "noBottom", multiple: "multiple", showSelectAll: "showSelectAll", maxTagCount: "maxTagCount", inputWidth: "inputWidth", inputHeight: "inputHeight", borderBottomOnly: "borderBottomOnly", displayInline: "displayInline", size: "size", lstItem: "lstItem", displayField: "displayField", displayFields: "displayFields", info: "info", valueField: "valueField", formData: "formData", controlName: "controlName", _ngModel: "_ngModel", isSubmited: "isSubmited" }, outputs: { _ngModelChange: "_ngModelChange", itemChange: "itemChange", onFocus: "onFocus" }, host: { properties: { "style.--custom-select-height": "this.cssHeight" } }, ngImport: i0, template: "<div\n class=\"extend-select-wrapper\"\n [ngClass]=\"{ 'floating-label': floatingLabel && label }\"\n [ngStyle]=\"{ display: displayInline ? 'inline' : null }\"\n>\n <ng-template #labelTemplate>\n <nz-form-label\n [nzSpan]=\"floatingLabel || labelFlex ? null : labelSpan\"\n [nzFlex]=\"labelFlex\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzNoColon]=\"true\"\n [nzLabelWrap]=\"!floatingLabel\"\n [nzTooltipTitle]=\"info\"\n [nzTooltipIcon]=\"info ? 'info-circle' : ''\"\n >\n {{ label }}\n </nz-form-label>\n </ng-template>\n\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n @if (label) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n }\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzMode]=\"multiple ? 'multiple' : 'default'\"\n [nzMaxMultipleCount]=\"maxMultipleCount\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [formControlName]=\"controlName\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option nzLabel=\"-- Ch\u1ECDn t\u1EA5t c\u1EA3 --\" nzValue=\"__all__\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option\n nzCustomContent\n [nzLabel]=\"item | displayItem: displayField : displayFields\"\n [nzValue]=\"valueField ? item[valueField] : item\"\n >\n @if (displayFields.length === 2) {\n <span class=\"semi-bold-code\">[{{ item[displayFields[0]] }}]</span> {{ item[displayFields[1]] }}\n } @else {\n {{ item | displayItem: displayField : displayFields }}\n }\n </nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n <!-- Tr\u01B0\u1EDDng h\u1EE3p KH\u00D4NG c\u00F3 controlName (D\u00F9ng ngModel) -->\n @if (label) {\n <nz-form-item>\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzValidateStatus]=\"customValidateStatus\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzMode]=\"multiple ? 'multiple' : 'default'\"\n [nzMaxMultipleCount]=\"maxMultipleCount\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n >\n <!-- B\u1EAET BU\u1ED8C \u0110\u1EC2 TR\u1EF0C TI\u1EBEP \u1EDE \u0110\u00C2Y -->\n @if (showSelectAll) {\n <nz-option nzLabel=\"-- Ch\u1ECDn t\u1EA5t c\u1EA3 --\" nzValue=\"__all__\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option\n nzCustomContent\n [nzLabel]=\"item | displayItem: displayField : displayFields\"\n [nzValue]=\"valueField ? item[valueField] : item\"\n >\n @if (displayFields.length === 2) {\n <span class=\"semi-bold-code\">[{{ item[displayFields[0]] }}]</span> {{ item[displayFields[1]] }}\n } @else {\n {{ item | displayItem: displayField : displayFields }}\n }\n </nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n } @else {\n <!-- Kh\u00F4ng c\u00F3 controlName, Kh\u00F4ng c\u00F3 label -->\n <nz-select\n class=\"full-width\"\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzMode]=\"multiple ? 'multiple' : 'default'\"\n [nzMaxMultipleCount]=\"maxMultipleCount\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n [ngStyle]=\"{ width: inputWidth, height: inputHeight }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n 'custom-height-select': !!inputHeight,\n }\"\n >\n <!-- B\u1EAET BU\u1ED8C \u0110\u1EC2 TR\u1EF0C TI\u1EBEP \u1EDE \u0110\u00C2Y -->\n @if (showSelectAll) {\n <nz-option nzLabel=\"-- Ch\u1ECDn t\u1EA5t c\u1EA3 --\" nzValue=\"__all__\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option\n nzCustomContent\n [nzLabel]=\"item | displayItem: displayField : displayFields\"\n [nzValue]=\"valueField ? item[valueField] : item\"\n >\n @if (displayFields.length === 2) {\n <span class=\"semi-bold-code\">[{{ item[displayFields[0]] }}]</span> {{ item[displayFields[1]] }}\n } @else {\n {{ item | displayItem: displayField : displayFields }}\n }\n </nz-option>\n }\n </nz-select>\n }\n }\n</div>\n", styles: ["::ng-deep .extend-select-wrapper.floating-label{position:relative;padding-top:14px}::ng-deep .extend-select-wrapper.floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:5px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .extend-select-wrapper.floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .extend-select-wrapper .full-width{width:100%}.extend-select-wrapper.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.extend-select-wrapper.floating-label nz-form-item:has(input[disabled]) nz-form-label,.extend-select-wrapper.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.extend-select-wrapper.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.extend-select-wrapper.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.extend-select-wrapper.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}.semi-bold-code{font-weight:500}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i5.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i13.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i13.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "pipe", type: DisplayItemPipe, name: "displayItem" }] });
|
|
3120
3177
|
}
|
|
3121
3178
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ExtendSelectComponent, decorators: [{
|
|
3122
3179
|
type: Component,
|
|
3123
|
-
args: [{ selector: 'extend-select', imports: [
|
|
3180
|
+
args: [{ selector: 'extend-select', standalone: true, imports: [
|
|
3124
3181
|
CommonModule,
|
|
3125
3182
|
FormsModule,
|
|
3126
3183
|
ReactiveFormsModule,
|
|
@@ -3128,7 +3185,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
3128
3185
|
NzFormModule,
|
|
3129
3186
|
NzSelectModule,
|
|
3130
3187
|
NzToolTipModule,
|
|
3131
|
-
], template: "<div\n class=\"extend-select-wrapper\"\n [ngClass]=\"[floatingLabel && label ? 'floating-label' : '']\"\n [ngStyle]=\"{ display: displayInline ? 'inline' : null }\"\n>\n @if (!multiple) {\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"floatingLabel || labelFlex ? null : labelSpan\"\n [nzFlex]=\"labelFlex\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzNoColon]=\"true\"\n [nzLabelWrap]=\"floatingLabel ? false : true\"\n [nzTooltipTitle]=\"info\"\n [nzTooltipIcon]=\"info ? 'info-circle' : ''\"\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzAllowClear]=\"true\"\n [nzShowSearch]=\"true\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [formControlName]=\"controlName\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"floatingLabel || labelFlex ? null : labelSpan\"\n [nzFlex]=\"labelFlex\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzNoColon]=\"true\"\n [nzLabelWrap]=\"floatingLabel ? false : true\"\n [nzTooltipTitle]=\"info\"\n [nzTooltipIcon]=\"true ? 'info-circle' : ''\"\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzValidateStatus]=\"customValidateStatus\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzAllowClear]=\"true\"\n [nzShowSearch]=\"true\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n } @else {\n <nz-select\n class=\"full-width\"\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n [disabled]=\"disabled\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n 'custom-height-select': inputHeight ? true : false,\n }\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n }\n }\n } @else {\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"floatingLabel || labelFlex ? null : labelSpan\"\n [nzFlex]=\"labelFlex\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzNoColon]=\"true\"\n [nzLabelWrap]=\"floatingLabel ? false : true\"\n [nzTooltipTitle]=\"info\"\n [nzTooltipIcon]=\"info ? 'info-circle' : ''\"\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzMode]=\"'multiple'\"\n [nzMaxMultipleCount]=\"lstItem.length\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzAllowClear]=\"true\"\n [nzShowSearch]=\"true\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [formControlName]=\"controlName\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"floatingLabel || labelFlex ? null : labelSpan\"\n [nzFlex]=\"labelFlex\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzNoColon]=\"true\"\n [nzLabelWrap]=\"floatingLabel ? false : true\"\n [nzTooltipTitle]=\"info\"\n [nzTooltipIcon]=\"info ? 'info-circle' : ''\"\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzValidateStatus]=\"customValidateStatus\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzMode]=\"'multiple'\"\n [nzMaxMultipleCount]=\"lstItem.length\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzAllowClear]=\"true\"\n [nzShowSearch]=\"true\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n } @else {\n <nz-select\n class=\"full-width\"\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzMode]=\"'multiple'\"\n [nzMaxMultipleCount]=\"lstItem.length\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option [nzLabel]=\"'-- Ch\u1ECDn t\u1EA5t c\u1EA3 --'\" [nzValue]=\"'__all__'\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option [nzLabel]=\"getDisplay(item)\" [nzValue]=\"valueField ? item[valueField] : item\"></nz-option>\n }\n </nz-select>\n }\n }\n }\n</div>\n", styles: ["::ng-deep .extend-select-wrapper.floating-label{position:relative;padding-top:14px}::ng-deep .extend-select-wrapper.floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:5px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .extend-select-wrapper.floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .extend-select-wrapper .full-width{width:100%}.extend-select-wrapper.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.extend-select-wrapper.floating-label nz-form-item:has(input[disabled]) nz-form-label,.extend-select-wrapper.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.extend-select-wrapper.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.extend-select-wrapper.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.extend-select-wrapper.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}\n"] }]
|
|
3188
|
+
DisplayItemPipe,
|
|
3189
|
+
], template: "<div\n class=\"extend-select-wrapper\"\n [ngClass]=\"{ 'floating-label': floatingLabel && label }\"\n [ngStyle]=\"{ display: displayInline ? 'inline' : null }\"\n>\n <ng-template #labelTemplate>\n <nz-form-label\n [nzSpan]=\"floatingLabel || labelFlex ? null : labelSpan\"\n [nzFlex]=\"labelFlex\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzNoColon]=\"true\"\n [nzLabelWrap]=\"!floatingLabel\"\n [nzTooltipTitle]=\"info\"\n [nzTooltipIcon]=\"info ? 'info-circle' : ''\"\n >\n {{ label }}\n </nz-form-label>\n </ng-template>\n\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n @if (label) {\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n }\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzMode]=\"multiple ? 'multiple' : 'default'\"\n [nzMaxMultipleCount]=\"maxMultipleCount\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [formControlName]=\"controlName\"\n (nzFocus)=\"onFocus.emit()\"\n >\n @if (showSelectAll) {\n <nz-option nzLabel=\"-- Ch\u1ECDn t\u1EA5t c\u1EA3 --\" nzValue=\"__all__\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option\n nzCustomContent\n [nzLabel]=\"item | displayItem: displayField : displayFields\"\n [nzValue]=\"valueField ? item[valueField] : item\"\n >\n @if (displayFields.length === 2) {\n <span class=\"semi-bold-code\">[{{ item[displayFields[0]] }}]</span> {{ item[displayFields[1]] }}\n } @else {\n {{ item | displayItem: displayField : displayFields }}\n }\n </nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n <!-- Tr\u01B0\u1EDDng h\u1EE3p KH\u00D4NG c\u00F3 controlName (D\u00F9ng ngModel) -->\n @if (label) {\n <nz-form-item>\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\n <nz-form-control\n [nzSpan]=\"floatingLabel || labelFlex ? null : 24 - labelSpan\"\n [ngClass]=\"{ 'full-width': floatingLabel }\"\n [nzValidateStatus]=\"customValidateStatus\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-select\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzMode]=\"multiple ? 'multiple' : 'default'\"\n [nzMaxMultipleCount]=\"maxMultipleCount\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n >\n <!-- B\u1EAET BU\u1ED8C \u0110\u1EC2 TR\u1EF0C TI\u1EBEP \u1EDE \u0110\u00C2Y -->\n @if (showSelectAll) {\n <nz-option nzLabel=\"-- Ch\u1ECDn t\u1EA5t c\u1EA3 --\" nzValue=\"__all__\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option\n nzCustomContent\n [nzLabel]=\"item | displayItem: displayField : displayFields\"\n [nzValue]=\"valueField ? item[valueField] : item\"\n >\n @if (displayFields.length === 2) {\n <span class=\"semi-bold-code\">[{{ item[displayFields[0]] }}]</span> {{ item[displayFields[1]] }}\n } @else {\n {{ item | displayItem: displayField : displayFields }}\n }\n </nz-option>\n }\n </nz-select>\n </nz-form-control>\n </nz-form-item>\n } @else {\n <!-- Kh\u00F4ng c\u00F3 controlName, Kh\u00F4ng c\u00F3 label -->\n <nz-select\n class=\"full-width\"\n nzShowSearch\n nzAllowClear\n [nzSize]=\"size\"\n [nzPlaceHolder]=\"placeHolder\"\n [nzMode]=\"multiple ? 'multiple' : 'default'\"\n [nzMaxMultipleCount]=\"maxMultipleCount\"\n [nzMaxTagCount]=\"maxTagCount\"\n [nzDropdownMatchSelectWidth]=\"dropdownMatchSelectWidth\"\n [ngModel]=\"_ngModel\"\n [disabled]=\"disabled\"\n (ngModelChange)=\"onSelectChange($event)\"\n (nzFocus)=\"onFocus.emit()\"\n [ngStyle]=\"{ width: inputWidth, height: inputHeight }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n 'custom-height-select': !!inputHeight,\n }\"\n >\n <!-- B\u1EAET BU\u1ED8C \u0110\u1EC2 TR\u1EF0C TI\u1EBEP \u1EDE \u0110\u00C2Y -->\n @if (showSelectAll) {\n <nz-option nzLabel=\"-- Ch\u1ECDn t\u1EA5t c\u1EA3 --\" nzValue=\"__all__\"></nz-option>\n }\n @for (item of lstItem; track $index) {\n <nz-option\n nzCustomContent\n [nzLabel]=\"item | displayItem: displayField : displayFields\"\n [nzValue]=\"valueField ? item[valueField] : item\"\n >\n @if (displayFields.length === 2) {\n <span class=\"semi-bold-code\">[{{ item[displayFields[0]] }}]</span> {{ item[displayFields[1]] }}\n } @else {\n {{ item | displayItem: displayField : displayFields }}\n }\n </nz-option>\n }\n </nz-select>\n }\n }\n</div>\n", styles: ["::ng-deep .extend-select-wrapper.floating-label{position:relative;padding-top:14px}::ng-deep .extend-select-wrapper.floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:5px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .extend-select-wrapper.floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .extend-select-wrapper .full-width{width:100%}.extend-select-wrapper.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.extend-select-wrapper.floating-label nz-form-item:has(input[disabled]) nz-form-label,.extend-select-wrapper.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.extend-select-wrapper.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.extend-select-wrapper.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.extend-select-wrapper.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}.semi-bold-code{font-weight:500}\n"] }]
|
|
3132
3190
|
}], propDecorators: { label: [{
|
|
3133
3191
|
type: Input
|
|
3134
3192
|
}], floatingLabel: [{
|
|
@@ -3181,14 +3239,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
3181
3239
|
type: Input
|
|
3182
3240
|
}], _ngModel: [{
|
|
3183
3241
|
type: Input
|
|
3242
|
+
}], isSubmited: [{
|
|
3243
|
+
type: Input
|
|
3184
3244
|
}], _ngModelChange: [{
|
|
3185
3245
|
type: Output
|
|
3186
3246
|
}], itemChange: [{
|
|
3187
3247
|
type: Output
|
|
3188
3248
|
}], onFocus: [{
|
|
3189
3249
|
type: Output
|
|
3190
|
-
}], isSubmited: [{
|
|
3191
|
-
type: Input
|
|
3192
3250
|
}], cssHeight: [{
|
|
3193
3251
|
type: HostBinding,
|
|
3194
3252
|
args: ['style.--custom-select-height']
|
|
@@ -11601,6 +11659,7 @@ class WorkflowAction extends WF_TemplateStageAction$1 {
|
|
|
11601
11659
|
labelBack;
|
|
11602
11660
|
isBackAction;
|
|
11603
11661
|
editorOption;
|
|
11662
|
+
Conditions;
|
|
11604
11663
|
getFromStageCode(lstStage) {
|
|
11605
11664
|
if (!lstStage || !lstStage.length)
|
|
11606
11665
|
return '';
|
|
@@ -11631,6 +11690,7 @@ class WorkflowAction extends WF_TemplateStageAction$1 {
|
|
|
11631
11690
|
this.labelBack = obj.labelBack || '';
|
|
11632
11691
|
this.isBackAction = obj.isBackAction || false;
|
|
11633
11692
|
this.editorOption = new WorkflowActionEditorOption(obj.editorOption);
|
|
11693
|
+
this.Conditions = obj.Conditions || {};
|
|
11634
11694
|
}
|
|
11635
11695
|
}
|
|
11636
11696
|
class WorkflowActionRef extends WF_TemplateActionRef$1 {
|
|
@@ -11727,11 +11787,15 @@ class WorkflowEditorComponent extends BaseComponent {
|
|
|
11727
11787
|
lstRole = [];
|
|
11728
11788
|
lstUser = [];
|
|
11729
11789
|
lstEmailTemplate = [];
|
|
11790
|
+
getdata = new EventEmitter();
|
|
11730
11791
|
ready = false;
|
|
11731
11792
|
template = new Workflow$1();
|
|
11732
11793
|
lstStage = [];
|
|
11733
11794
|
lstAction = [];
|
|
11734
11795
|
lstActionRef = [];
|
|
11796
|
+
get lstActionOfTemplate() {
|
|
11797
|
+
return this.lstAction.filter((x) => !x.WF_TemplateStage_Id);
|
|
11798
|
+
}
|
|
11735
11799
|
get lstActionOfCurrentStage() {
|
|
11736
11800
|
if (this.selectedStage && this.selectedStage.WF_TemplateStage_Id) {
|
|
11737
11801
|
return this.lstAction.filter((x) => x.WF_TemplateStage_Id == this.selectedStage.WF_TemplateStage_Id);
|
|
@@ -11777,6 +11841,7 @@ class WorkflowEditorComponent extends BaseComponent {
|
|
|
11777
11841
|
//#region wf editor
|
|
11778
11842
|
Math = Math;
|
|
11779
11843
|
drawTemplateVisibel = false;
|
|
11844
|
+
drawTemplateActionVisibel = false;
|
|
11780
11845
|
settingVisible = false;
|
|
11781
11846
|
infoVisible = false;
|
|
11782
11847
|
wfcSetting = { ShowGrid: true };
|
|
@@ -12095,6 +12160,13 @@ class WorkflowEditorComponent extends BaseComponent {
|
|
|
12095
12160
|
action.FromSide = 'right';
|
|
12096
12161
|
this.lstAction = this.lstAction ? [...this.lstAction, action] : [action];
|
|
12097
12162
|
}
|
|
12163
|
+
addTempldateAction() {
|
|
12164
|
+
const action = new WorkflowAction();
|
|
12165
|
+
action.IsTempId = true;
|
|
12166
|
+
action.WF_TemplateStageAction_Id = Date.now();
|
|
12167
|
+
action.FromSide = 'right';
|
|
12168
|
+
this.lstAction = this.lstAction ? [...this.lstAction, action] : [action];
|
|
12169
|
+
}
|
|
12098
12170
|
onchangeAllowBack(action) {
|
|
12099
12171
|
console.log('onchangeAllowBack', action);
|
|
12100
12172
|
const stage = this.lstStage.find((x) => x.WF_TemplateStage_Id == action.To_WF_TemplateStage_Id);
|
|
@@ -13413,6 +13485,7 @@ class WorkflowEditorComponent extends BaseComponent {
|
|
|
13413
13485
|
console.log(action);
|
|
13414
13486
|
if (await this.confirm('Delete Rule???')) {
|
|
13415
13487
|
this.onDeleteRule.emit({
|
|
13488
|
+
WF_Template_Id: action.WF_Template_Id,
|
|
13416
13489
|
WF_TemplateStageAction_Id: action.WF_TemplateStageAction_Id,
|
|
13417
13490
|
WF_TransitionRule_Id: action.WF_TransitionRule_Id,
|
|
13418
13491
|
});
|
|
@@ -13432,7 +13505,7 @@ class WorkflowEditorComponent extends BaseComponent {
|
|
|
13432
13505
|
});
|
|
13433
13506
|
}
|
|
13434
13507
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WorkflowEditorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
13435
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: WorkflowEditorComponent, isStandalone: true, selector: "app-workflow-editor", inputs: { lstOrg: "lstOrg", lstRole: "lstRole", lstUser: "lstUser", lstEmailTemplate: "lstEmailTemplate" }, outputs: { onSave: "onSave", onDeleteStage: "onDeleteStage", onDeleteAction: "onDeleteAction", onDeleteRule: "onDeleteRule", onDeleteRuleLine: "onDeleteRuleLine", onCheckRule: "onCheckRule", onCheckAllRule: "onCheckAllRule" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, static: true }, { propertyName: "svgRef", first: true, predicate: ["svg"], descendants: true, static: true }, { propertyName: "inputStageStatusElement", first: true, predicate: ["inputStageStatusElement"], descendants: true }, { propertyName: "inputActionTypeElement", first: true, predicate: ["inputActionTypeElement"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n #canvas\r\n class=\"workflow-canvas\"\r\n [class.connecting]=\"!!connectingFrom\"\r\n [class.dragging-point]=\"!!draggingPoint\"\r\n style=\"width: 100%; height: 100%\"\r\n (mousedown)=\"onMouseDownCanvas($event)\"\r\n (mousemove)=\"onMouseMoveCanvas($event)\"\r\n (mouseup)=\"onMouseUpCanvas($event)\"\r\n (click)=\"onClickCanvas($event)\"\r\n (wheel)=\"onWheelCanvas($event)\"\r\n>\r\n <!-- \r\n\r\n [style.width.px]=\"getCanvasWidth()\"\r\n [style.height.px]=\"getCanvasHeight()\" \r\n\r\n [style.width.px]=\"CANVAS_WIDTH\"\r\n [style.height.px]=\"CANVAS_HEIGHT\"\r\n\r\n style=\"width: 100%; height: calc(100vh - 120px)\"\r\n \r\n -->\r\n\r\n <div class=\"toolbar\" (mousedown)=\"$event.stopPropagation()\" (click)=\"$event.stopPropagation()\">\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Editor setting\" (click)=\"settingVisible = true\">\r\n <nz-icon nzType=\"setting\"></nz-icon>\r\n </button>\r\n\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Infomation\" (click)=\"infoVisible = true\">\r\n <nz-icon nzType=\"info-circle\"></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Template setting\" (click)=\"drawTemplateVisibel = true\">\r\n <nz-icon nzType=\"setting\"></nz-icon> T\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nzDanger [nzLoading]=\"!ready\" nz-tooltip=\"Save (Ctrl + S)\" (click)=\"save()\">\r\n <nz-icon nzType=\"save\"></nz-icon>\r\n </button>\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Add stage\" (click)=\"addStage()\">\r\n <nz-icon nzType=\"plus\" class=\"color-primary\"></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n [nzType]=\"isMoveMode ? 'primary' : 'default'\"\r\n nz-tooltip=\"Move mode\"\r\n (click)=\"isMoveMode = true\"\r\n >\r\n <nz-icon><img src=\"/assets/icon/hand-palm.png\" width=\"19\" height=\"19\" /></nz-icon>\r\n </button>\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n [nzType]=\"!isMoveMode ? 'primary' : 'default'\"\r\n nz-tooltip=\"Select mode\"\r\n (click)=\"isMoveMode = false\"\r\n >\r\n <nz-icon><img src=\"/assets/icon/cursor.png\" width=\"19\" height=\"19\" /></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <!-- UNDO / REDO -->\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nzType=\"default\"\r\n [disabled]=\"undoStack.length === 0\"\r\n nz-tooltip=\"Undo\"\r\n (click)=\"undo()\"\r\n >\r\n <nz-icon nzType=\"undo\"></nz-icon>\r\n </button>\r\n\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nzType=\"default\"\r\n [disabled]=\"redoStack.length === 0\"\r\n nz-tooltip=\"Redo\"\r\n (click)=\"redo()\"\r\n >\r\n <nz-icon nzType=\"redo\"></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <!-- ALIGN -->\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignLeft()\">\u27F8</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignCenter()\">\u2261</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignRight()\">\u27F9</button>\r\n\r\n <span class=\"divider\"></span>\r\n\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignTop()\">\u21D1</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignMiddle()\">\u2550</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignBottom()\">\u21D3</button>\r\n\r\n <span class=\"divider\"></span>\r\n\r\n <!-- DISTRIBUTE -->\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 3\" (click)=\"distributeHorizontal()\">\r\n \u21C4\r\n </button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 3\" (click)=\"distributeVertical()\">\u21C5</button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomOut()\" nz-tooltip=\"Zoom Out\">\r\n <nz-icon nzType=\"minus\"></nz-icon>\r\n </button>\r\n <span>{{ Math.round(zoom * 100) }}%</span>\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomIn()\" nz-tooltip=\"Zoom In\">\r\n <nz-icon nzType=\"plus\"></nz-icon>\r\n </button>\r\n <span class=\"divider\"></span>\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"resetZoom()\" nz-tooltip=\"Reset Zoom (Ctrl+0)\">\r\n <nz-icon nzType=\"expand\"></nz-icon>\r\n </button>\r\n </div>\r\n\r\n <div\r\n class=\"canvas-content\"\r\n [class.panning]=\"isMoveMode\"\r\n [style.width.px]=\"getCanvasWidth()\"\r\n [style.height.px]=\"getCanvasHeight()\"\r\n [style.transform]=\"\r\n 'translate(' + template.editorOption.panX + 'px,' + template.editorOption.panY + 'px) scale(' + zoom + ')'\r\n \"\r\n >\r\n <!-- GRID -->\r\n <div *ngIf=\"wfcSetting.ShowGrid\" class=\"grid-layer\"></div>\r\n\r\n <!-- SVG EDGES -->\r\n <svg #svg class=\"edges-layer\" width=\"100%\" height=\"100%\" preserveAspectRatio=\"none\">\r\n <g>\r\n <!-- DEFS -->\r\n <defs>\r\n <!-- glow effect -->\r\n <filter id=\"edge-glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\r\n <feGaussianBlur stdDeviation=\"2\" result=\"blur\" />\r\n <feMerge>\r\n <feMergeNode in=\"blur\" />\r\n <feMergeNode in=\"SourceGraphic\" />\r\n </feMerge>\r\n </filter>\r\n\r\n <!-- arrow markers -->\r\n <marker\r\n id=\"arrow-blue\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n refX=\"10\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"blue\" d=\"M0,0 L10,5 L0,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-red\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n refX=\"10\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"red\" d=\"M0,0 L10,5 L0,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-blue-start\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n viewBox=\"0 0 10 10\"\r\n refX=\"0\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"blue\" d=\"M10,0 L0,5 L10,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-red-start\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n viewBox=\"0 0 10 10\"\r\n refX=\"0\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"red\" d=\"M10,0 L0,5 L10,10\"></path>\r\n </marker>\r\n </defs>\r\n\r\n <!-- EDGES B\u00CCNH TH\u01AF\u1EDCNG -->\r\n <ng-container *ngFor=\"let e of normalEdges; let i = index\">\r\n <path\r\n class=\"edge\"\r\n [attr.id]=\"'edge-path-' + i\"\r\n [attr.d]=\"buildPath(e)\"\r\n marker-end=\"url(#arrow-blue)\"\r\n [attr.marker-start]=\"e.allowBack ? 'url(#arrow-blue-start)' : ''\"\r\n ></path>\r\n\r\n <path\r\n class=\"edge-hit\"\r\n [attr.d]=\"buildPath(e)\"\r\n (mouseenter)=\"onMouseEnterEdge(e)\"\r\n (mouseleave)=\"onMouseLeaveEdge(e)\"\r\n (click)=\"onClickEdge(e, $event)\"\r\n ></path>\r\n\r\n <!-- LABEL -->\r\n <!-- text b\u00E1m theo line -->\r\n <!-- \r\n <text *ngIf=\"e.ActionText\" class=\"edge-label\" dy=\"-6\">\r\n <textPath [attr.href]=\"'#edge-path-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.ActionText }}\r\n </textPath>\r\n </text> \r\n \r\n <text *ngIf=\"e.allowBack && e.labelBack\" class=\"edge-label\" dy=\"14\">\r\n <textPath [attr.href]=\"'#edge-path-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.labelBack }}\r\n </textPath>\r\n </text>\r\n -->\r\n\r\n <!-- text th\u1EB3ng n\u1EB1m ngang -->\r\n <text\r\n *ngIf=\"e.ActionText\"\r\n class=\"edge-label\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.ActionText }}\r\n </text>\r\n\r\n <text\r\n *ngIf=\"e.allowBack && e.labelBack\"\r\n class=\"edge-label\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y + 14\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.labelBack }}\r\n </text>\r\n </ng-container>\r\n\r\n <!-- EDGE \u0110ANG HOVER (LU\u00D4N TR\u00CAN C\u00D9NG) -->\r\n <ng-container *ngFor=\"let e of hoverEdges; let i = index\">\r\n <path\r\n class=\"edge red\"\r\n [attr.id]=\"'edge-path-hover-' + i\"\r\n [attr.d]=\"buildPath(e)\"\r\n marker-end=\"url(#arrow-red)\"\r\n [attr.marker-start]=\"e.allowBack ? 'url(#arrow-red-start)' : ''\"\r\n ></path>\r\n\r\n <path\r\n class=\"edge-hit\"\r\n [attr.d]=\"buildPath(e)\"\r\n (mouseleave)=\"onMouseLeaveEdge(e)\"\r\n (click)=\"onClickEdge(e, $event)\"\r\n ></path>\r\n\r\n <!-- LABEL -->\r\n <!-- <text *ngIf=\"e.ActionText\" class=\"edge-label\" dy=\"-6\">\r\n <textPath [attr.href]=\"'#edge-path-hover-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.ActionText }}\r\n </textPath>\r\n </text>\r\n\r\n <text *ngIf=\"e.allowBack && e.labelBack\" class=\"edge-label\" dy=\"14\">\r\n <textPath [attr.href]=\"'#edge-path-hover-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.labelBack }}\r\n </textPath>\r\n </text> -->\r\n\r\n <text\r\n *ngIf=\"e.ActionText\"\r\n class=\"edge-label\"\r\n style=\"font-weight: bold\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.ActionText }}\r\n </text>\r\n\r\n <text\r\n *ngIf=\"e.allowBack && e.labelBack\"\r\n class=\"edge-label\"\r\n style=\"font-weight: bold\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y + 14\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.labelBack }}\r\n </text>\r\n </ng-container>\r\n\r\n <!-- preview -->\r\n <path\r\n *ngIf=\"connectingFrom\"\r\n class=\"edge\"\r\n [attr.d]=\"buildPreviewPath()\"\r\n stroke-dasharray=\"5,5\"\r\n marker-end=\"url(#arrow-blue)\"\r\n ></path>\r\n </g>\r\n </svg>\r\n\r\n <div\r\n *ngIf=\"isSelecting && selectStart && selectEnd\"\r\n class=\"selection-box\"\r\n [style.left.px]=\"Math.min(selectStart.x, selectEnd.x)\"\r\n [style.top.px]=\"Math.min(selectStart.y, selectEnd.y)\"\r\n [style.width.px]=\"Math.abs(selectEnd.x - selectStart.x)\"\r\n [style.height.px]=\"Math.abs(selectEnd.y - selectStart.y)\"\r\n ></div>\r\n\r\n <!-- lstStage -->\r\n @for (n of lstStage; track $index) {\r\n <!-- START NODE -->\r\n @if (n.StageType === \"_start_\") {\r\n <nz-card\r\n class=\"workflow-node workflow-node-start\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <nz-tag [nzColor]=\"'green'\"> START </nz-tag>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector RIGHT: output -->\r\n <div class=\"connector connector-right connector-start\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n } @else {\r\n <div\r\n class=\"connector connector-right connector-start reverse\"\r\n (click)=\"onClickConnector($event, n, 'right')\"\r\n ></div>\r\n }\r\n </nz-card>\r\n }\r\n <!-- END NODE -->\r\n @else if (n.StageType === \"_end_\") {\r\n <nz-card\r\n class=\"workflow-node workflow-node-end\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <nz-tag [nzColor]=\"'red'\"> END </nz-tag>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector LEFT: input -->\r\n <div class=\"connector connector-left connector-end\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n } @else {\r\n <div\r\n class=\"connector connector-left connector-end reverse\"\r\n (click)=\"onClickConnector($event, n, 'left')\"\r\n ></div>\r\n }\r\n </nz-card>\r\n } @else {\r\n <nz-card\r\n class=\"workflow-node\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <div class=\"title\">{{ n.Code }}</div>\r\n\r\n <div>{{ n.Name }}</div>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector RIGHT: output -->\r\n <div class=\"connector connector-right\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n\r\n <!-- connector LEFT: input -->\r\n <div class=\"connector connector-left\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n } @else {\r\n <div class=\"connector connector-right reverse\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n <div class=\"connector connector-left reverse\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n }\r\n </nz-card>\r\n }\r\n }\r\n\r\n <!-- POINTS -->\r\n @for (p of connectingPoints; track $index) {\r\n @if (p != draggingPoint) {\r\n <div\r\n class=\"waypoint\"\r\n [style.left.px]=\"p.x\"\r\n [style.top.px]=\"p.y\"\r\n (mousedown)=\"onmousedownPoint($event, p)\"\r\n (contextmenu)=\"onRightClickPoint($event, hoverAction!, $index)\"\r\n ></div>\r\n } @else {\r\n <div\r\n class=\"waypoint dragging\"\r\n [style.left.px]=\"p.x\"\r\n [style.top.px]=\"p.y\"\r\n (mousedown)=\"onmousedownPoint($event, p)\"\r\n ></div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n<!-- drawer TEMPLATE -->\r\n<nz-drawer\r\n [nzTitle]=\"drawTemplateTitle\"\r\n nzPlacement=\"right\"\r\n [nzWidth]=\"500\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"drawTemplateVisibel\"\r\n [nzFooter]=\"footerTplTemplate\"\r\n (nzOnClose)=\"drawTemplateVisibel = false\"\r\n>\r\n <ng-template #drawTemplateTitle> <nz-icon nzType=\"setting\"></nz-icon> Template </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <extend-select\r\n [label]=\"'Org'\"\r\n [lstItem]=\"lstOrg\"\r\n [valueField]=\"'App_Org_Id'\"\r\n [displayFields]=\"['Name', 'Code']\"\r\n [(_ngModel)]=\"template.App_Org_Id\"\r\n ></extend-select>\r\n <extend-input [label]=\"'Code'\" [(_ngModel)]=\"template.Code\"></extend-input>\r\n <extend-input [label]=\"'Name'\" [(_ngModel)]=\"template.Name\"></extend-input>\r\n <extend-select\r\n [label]=\"'Type'\"\r\n [lstItem]=\"template.lstTemplateType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.DocType\"\r\n ></extend-select>\r\n <extend-textarea [label]=\"'Desscription'\" [(_ngModel)]=\"template.Description\"></extend-textarea>\r\n <extend-select\r\n [label]=\"'Print template'\"\r\n [lstItem]=\"template.lstTemplatePrint\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.TemplatePrint\"\r\n ></extend-select>\r\n <extend-select\r\n [label]=\"'Apply to'\"\r\n [lstItem]=\"template.lstApplyTo\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.ApplyTo\"\r\n ></extend-select>\r\n\r\n <extend-checkbox [label]=\"'Active'\" [(_ngModel)]=\"template.IsActive\"></extend-checkbox>\r\n <extend-checkbox [label]=\"'Use Allow back'\" [(_ngModel)]=\"template.editorOption.AllowbackInUse\"></extend-checkbox>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Stage</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of getLstStage; track tag) {\r\n <div nz-col>\r\n <nz-tag (click)=\"hoverStage = tag\">\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Stage status</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstStageStatus; track tag) {\r\n <div nz-col>\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableStageStatus(tag) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleCloseStageStatus(tag)\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputStageStatusVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInputStageStatus()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action type\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputStageStatusElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Code\"\r\n [(ngModel)]=\"inputStageStatusCode\"\r\n (keydown.enter)=\"inputStageStatusNameElement.select()\"\r\n />\r\n <input\r\n #inputStageStatusNameElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Name\"\r\n [(ngModel)]=\"inputStageStatusName\"\r\n (blur)=\"handleInputStageStatusConfirm()\"\r\n (keydown.enter)=\"handleInputStageStatusConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Action type</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstActionType; track tag) {\r\n <div nz-col>\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableActionType(tag) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleCloseActionType(tag)\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputActionTypeVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInputActionType()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action type\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputActionTypeElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Code\"\r\n [(ngModel)]=\"inputActionTypeCode\"\r\n (keydown.enter)=\"inputActionTypeNameElement.select()\"\r\n />\r\n <input\r\n #inputActionTypeNameElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Name\"\r\n [(ngModel)]=\"inputActionTypeName\"\r\n (blur)=\"handleInputActionTypeConfirm()\"\r\n (keydown.enter)=\"handleInputActionTypeConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Action status</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstActionStatus; track tag) {\r\n <div nz-col>\r\n @if (template.editingActionStatus != tag) {\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableActionStatus(tag.Code) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleClose(tag.Code)\"\r\n (click)=\"template.editingActionStatus = checkRemoveableActionStatus(tag.Code) ? tag : undefined\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n } @else {\r\n <input\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n [appAutoFocus]=\"true\"\r\n [(ngModel)]=\"tag.Code\"\r\n (blur)=\"template.editingActionStatus = undefined\"\r\n (keydown.enter)=\"template.editingActionStatus = undefined\"\r\n /> \r\n }\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInput()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action status\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"+ New Action status\"\r\n [(ngModel)]=\"inputValue\"\r\n (blur)=\"handleInputConfirm()\"\r\n (keydown.enter)=\"handleInputConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #footerTplTemplate>\r\n <div nz-flex [nzGap]=\"6\" [nzJustify]=\"'end'\">\r\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button (click)=\"drawTemplateVisibel = false\">Close</button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- drawer STAGE -->\r\n<nz-drawer\r\n [nzTitle]=\"drawerTitleStage\"\r\n [nzPlacement]=\"selectedStage?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\r\n [nzVisible]=\"!!selectedStage\"\r\n [nzWidth]=\"'calc(50vw)'\"\r\n [nzClosable]=\"false\"\r\n [nzFooter]=\"footerTplNode\"\r\n (nzOnClose)=\"selectedStage = undefined\"\r\n>\r\n <ng-template #drawerTitleStage>\r\n <div nz-row nzJustify=\"space-between\">\r\n @if (selectedStage && selectedStage.editorOption) {\r\n @if (selectedStage.editorOption.drawerPosition == \"left\") {\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the right\"\r\n (click)=\"selectedStage.editorOption.drawerPosition = 'right'\"\r\n >\r\n <nz-icon nzType=\"double-right\"></nz-icon>\r\n </button>\r\n STAGE\r\n } @else {\r\n STAGE\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the left\"\r\n (click)=\"selectedStage.editorOption.drawerPosition = 'left'\"\r\n >\r\n <nz-icon nzType=\"double-left\"></nz-icon>\r\n </button>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <ng-container *ngIf=\"selectedStage\">\r\n <nz-radio-group [(ngModel)]=\"selectedStage.StageType\">\r\n <label nz-radio nzValue=\"_start_\">UI start</label>\r\n <label nz-radio nzValue=\"_end_\">UI end</label>\r\n <label nz-radio nzValue=\"start\">START</label>\r\n <label nz-radio nzValue=\"node\">NODE</label>\r\n <label nz-radio nzValue=\"end\">END</label>\r\n </nz-radio-group>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Code'\"\r\n [required]=\"true\"\r\n [(_ngModel)]=\"selectedStage.Code\"\r\n ></extend-input>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"16\"\r\n [label]=\"'Name'\"\r\n [required]=\"true\"\r\n [(_ngModel)]=\"selectedStage.Name\"\r\n ></extend-input>\r\n </div>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Sequence'\"\r\n [(_ngModel)]=\"selectedStage.SeqValue\"\r\n ></extend-input-number>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"16\"\r\n [label]=\"'Org implement'\"\r\n [lstItem]=\"lstOrg\"\r\n [valueField]=\"'App_Org_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedStage.App_Org_Id\"\r\n ></extend-select>\r\n </div>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Number of Days'\"\r\n [precision]=\"1\"\r\n [(_ngModel)]=\"selectedStage.NumberDay\"\r\n ></extend-input-number>\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Number of Person'\"\r\n [precision]=\"1\"\r\n [(_ngModel)]=\"selectedStage.NumberPerson\"\r\n ></extend-input-number>\r\n </div>\r\n\r\n @if (selectedStage.editorOption) {\r\n @if ([\"start\", \"node\", \"end\"].includes(selectedStage.StageType.toLowerCase())) {\r\n <extend-checkbox\r\n [label]=\"'Reverse'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedStage.editorOption.isReverse\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <extend-checkbox\r\n [label]=\"'Require user action'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedStage.IsRequireUser\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"16\">\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> List Action</h3>\r\n <div nz-col>\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"addAction()\">\r\n <nz-icon nzType=\"plus\"></nz-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <nz-table nzSize=\"small\" [nzData]=\"lstActionOfCurrentStage\" [nzShowPagination]=\"false\" [nzNoResult]=\"' '\">\r\n <thead>\r\n <tr [hidden]=\"true\">\r\n <th nzWidth=\"40px\"></th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (action of lstActionOfCurrentStage; track $index) {\r\n <tr (click)=\"onclickaction(action)\">\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-left': action == hoverAction ? 'solid 4px orange' : '',\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n ({{ $index + 1 }})\r\n <nz-icon\r\n nzType=\"delete\"\r\n nzTheme=\"outline\"\r\n class=\"color-warn cursor-pointer icon-size-16\"\r\n (click)=\"$event.stopPropagation(); deleteAction(action)\"\r\n ></nz-icon>\r\n </td>\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\" class=\"has-floating-label floating-label\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"z-index: 2\">\r\n <label>Action status</label>\r\n </nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"action.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(action.ActionStatus)\"\r\n (blur)=\"onenterAotu(action.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"action.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(action)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"action.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"action.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(action)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.To_StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"action.DocProcessStatus\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Role</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstRole\"\r\n [valueField]=\"'App_Role_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstRoleId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>User</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstUser\"\r\n [valueField]=\"'App_User_Id'\"\r\n [displayFields]=\"['UserName', 'FullName']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstUserId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Email action</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailAction\"\r\n [valueField]=\"'ID'\"\r\n [displayField]=\"'Name'\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstEmailActionId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>Email template</div>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>\r\n <div nz-col nzSpan=\"1\"></div>\r\n <div nz-col nzSpan=\"23\" class=\"form-item-no-bottom\" style=\"font-weight: normal\">\r\n @for (actionRef of lstActionRefOf(action); track $index) {\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [labelSpan]=\"12\"\r\n [size]=\"'small'\"\r\n [label]=\"emailActionText(actionRef.To_WF_TemplateStageAction_Id)\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"actionRef.TemplateMail\"\r\n ></extend-select>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"8\">\r\n Action rule\r\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"actionRuleModalVisible = true\">\r\n <nz-icon nzType=\"export\" nzTheme=\"outline\" class=\"color-primary\" />\r\n </button>\r\n <button\r\n *ngIf=\"action.WF_TransitionRule_Id\"\r\n nz-button\r\n nzType=\"text\"\r\n nzSize=\"small\"\r\n (click)=\"deleteActionRule(action)\"\r\n >\r\n <nz-icon nzType=\"delete\" nzTheme=\"outline\" class=\"color-warn\" />\r\n </button>\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row nzJustify=\"end\">\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"addAction()\">\r\n <nz-icon nzType=\"plus\"></nz-icon>Add Action\r\n </button>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #footerTplNode>\r\n <div\r\n nz-flex\r\n [nzGap]=\"6\"\r\n [nzJustify]=\"\r\n selectedStage && selectedStage.editorOption && selectedStage.editorOption.drawerPosition == 'left'\r\n ? 'start'\r\n : 'end'\r\n \"\r\n >\r\n <button nz-button nzDanger nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button (click)=\"selectedStage = undefined\">Close</button>\r\n <button\r\n *ngIf=\"selectedStage && ['START', 'END'].indexOf(selectedStage.StageType) < 0\"\r\n nz-button\r\n nzDanger\r\n (click)=\"deleteStage()\"\r\n >\r\n Delete\r\n </button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- drawer ACTION -->\r\n<nz-drawer\r\n [nzTitle]=\"drawerTitleAction\"\r\n nzTitle=\"ACTION\"\r\n [nzPlacement]=\"selectedAction?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\r\n [nzClosable]=\"false\"\r\n [nzWidth]=\"750\"\r\n [nzVisible]=\"!!selectedAction\"\r\n [nzFooter]=\"footerTplAction\"\r\n (nzOnClose)=\"selectedAction = undefined\"\r\n>\r\n <ng-template #drawerTitleAction>\r\n <div nz-row nzJustify=\"space-between\">\r\n @if (selectedAction && selectedAction.editorOption) {\r\n @if (selectedAction.editorOption.drawerPosition == \"left\") {\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the right\"\r\n (click)=\"selectedAction.editorOption.drawerPosition = 'right'\"\r\n >\r\n <nz-icon nzType=\"double-right\"></nz-icon>\r\n </button>\r\n ACTION\r\n } @else {\r\n ACTION\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the left\"\r\n (click)=\"selectedAction.editorOption.drawerPosition = 'left'\"\r\n >\r\n <nz-icon nzType=\"double-left\"></nz-icon>\r\n </button>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <ng-container *ngIf=\"selectedAction\">\r\n <div>\r\n <strong\r\n >{{ selectedAction.getFromStageCode(lstStage) }} -> {{ selectedAction.getToStageCode(lstStage) }}</strong\r\n >\r\n </div>\r\n <div>{{ selectedAction.getFromStageName(lstStage) }} -> {{ selectedAction.getToStageName(lstStage) }}</div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\" class=\"has-floating-label floating-label\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"z-index: 2\">\r\n <label>Action status</label>\r\n </nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"selectedAction.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(selectedAction.ActionStatus)\"\r\n (blur)=\"onenterAotu(selectedAction.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"selectedAction.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(selectedAction)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"selectedAction.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedAction.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedAction.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(selectedAction)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedAction.To_StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"selectedAction.DocProcessStatus\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Role</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstRole\"\r\n [valueField]=\"'App_Role_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstRoleId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>User</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstUser\"\r\n [valueField]=\"'App_User_Id'\"\r\n [displayFields]=\"['UserName', 'FullName']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstUserId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Email action</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailAction\"\r\n [valueField]=\"'ID'\"\r\n [displayField]=\"'Name'\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstEmailActionId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div *ngIf=\"selectedAction._lstEmailActionId && selectedAction._lstEmailActionId.length\" nz-row>\r\n Email template\r\n </div>\r\n <div *ngIf=\"selectedAction._lstEmailActionId && selectedAction._lstEmailActionId.length\" nz-row>\r\n <div nz-col nzSpan=\"1\"></div>\r\n <div nz-col nzSpan=\"23\" class=\"form-item-no-bottom\" style=\"font-weight: normal\">\r\n @for (actionRef of lstActionRefOf(selectedAction); track $index) {\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [labelSpan]=\"12\"\r\n [size]=\"'small'\"\r\n [label]=\"emailActionText(actionRef.To_WF_TemplateStageAction_Id)\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"actionRef.TemplateMail\"\r\n ></extend-select>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"8\">\r\n Action rule\r\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"actionRuleModalVisible = true\">\r\n <nz-icon nzType=\"export\" nzTheme=\"outline\" class=\"color-primary\" />\r\n </button>\r\n <button\r\n *ngIf=\"selectedAction.WF_TransitionRule_Id\"\r\n nz-button\r\n nzType=\"text\"\r\n nzSize=\"small\"\r\n (click)=\"deleteActionRule(selectedAction)\"\r\n >\r\n <nz-icon nzType=\"delete\" nzTheme=\"outline\" class=\"color-warn\" />\r\n </button>\r\n </div>\r\n\r\n <!-- <box [height]=\"16\"></box> -->\r\n <nz-divider></nz-divider>\r\n\r\n @if (template.editorOption.AllowbackInUse) {\r\n <extend-checkbox\r\n [label]=\"'Allow back'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedAction.allowBack\"\r\n (_ngModelChange)=\"onchangeAllowBack(selectedAction)\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n @if (selectedAction.allowBack) {\r\n <div>\r\n <strong\r\n >{{ selectedAction.getToStageCode(lstStage) }} -> {{ selectedAction.getFromStageCode(lstStage) }}</strong\r\n >\r\n </div>\r\n <div>{{ selectedAction.getToStageName(lstStage) }} -> {{ selectedAction.getFromStageName(lstStage) }}</div>\r\n\r\n @if (selectedBackAction) {\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"height: 32px\">Action status</nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"selectedBackAction.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(selectedBackAction.ActionStatus)\"\r\n (blur)=\"onenterAotu(selectedBackAction.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"selectedBackAction.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(selectedBackAction)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"selectedBackAction.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedBackAction.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"lstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedBackAction.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(selectedBackAction)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedBackAction.To_StageStatus\"\r\n ></extend-select>\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #footerTplAction>\r\n <div\r\n nz-flex\r\n [nzGap]=\"6\"\r\n [nzJustify]=\"selectedAction && selectedAction.editorOption.drawerPosition == 'left' ? 'start' : 'end'\"\r\n >\r\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button nzDanger (click)=\"deleteAction(selectedAction!)\">Delete</button>\r\n <button nz-button (click)=\"selectedAction = undefined\">Close</button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- setting editor -->\r\n<nz-drawer\r\n [nzTitle]=\"drawSettingTitle\"\r\n nzPlacement=\"right\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"settingVisible\"\r\n (nzOnClose)=\"settingVisible = false\"\r\n>\r\n <ng-template #drawSettingTitle> <nz-icon nzType=\"setting\"></nz-icon> Editor </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <div class=\"form-item-no-bottom\">\r\n <extend-checkbox [label]=\"'Show grid'\" [labelSpan]=\"0\" [(_ngModel)]=\"wfcSetting.ShowGrid\"></extend-checkbox>\r\n\r\n <box [height]=\"16\"></box>\r\n </div>\r\n </ng-container>\r\n</nz-drawer>\r\n\r\n<!-- editor infomation -->\r\n<nz-drawer\r\n [nzTitle]=\"drawInfoTitle\"\r\n nzPlacement=\"right\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"infoVisible\"\r\n (nzOnClose)=\"infoVisible = false\"\r\n>\r\n <ng-template #drawInfoTitle> <nz-icon nzType=\"info-circle\"></nz-icon> Infomation </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <p>1. C\u00E1c th\u00E0nh ph\u1EA7n: Stage or Node (stag, node quy tr\u00ECnh), Action or Connector (\u0111\u01B0\u1EDDng n\u1ED1i gi\u1EEFa c\u00E1c stage)</p>\r\n <p>2. Save \u0111\u1EC3 load c\u00E1c th\u00F4ng tin: Stage status, Action type</p>\r\n <p>\r\n 3. N\u1ED1i 2 node (t\u1EA1o connector t\u01B0\u01A1ng \u0111\u01B0\u01A1ng t\u1EA1o action):\r\n <br />- Click ch\u1EA5m cam t\u1EEB Node ngu\u1ED3n \u0111\u1EBFn ch\u1EA5m xanh c\u1EE7a Node \u0111\u00EDch (ho\u1EB7c click v\u00E0o Node \u0111\u00EDch), c\u00F3 th\u1EC3 click th\u00E0nh\r\n nhi\u1EC1u \u0111i\u1EC3m \u0111\u1EC3 t\u1EA1o \u0111\u01B0\u1EDDng n\u1ED1i cong<br />- Khi hover connector chuy\u1EC3n sang m\u1EA7u \u0111\u1ECF c\u00F3 th\u1EC3 click \u0111\u00FAp \u0111\u1EC3 th\u00EAm m\u1ED9t \u0111i\u1EC3m\r\n c\u1EE7a connector<br />- Khi hover l\u00EAn \u0111i\u1EC3m c\u1EE7a connector c\u00F3 th\u1EC3 di chuy\u1EC3n \u0111i\u1EC3m \u0111\u00F3 b\u1EB1ng c\u00E1ch nh\u1EA5n gi\u1EEF chu\u1ED9t v\u00E0 k\u00E9o th\u1EA3\r\n \u0111\u1EBFn v\u1ECB tr\u00ED m\u1EDBi<br />- Chu\u1ED9t ph\u1EA3i v\u00E0o \u0111i\u1EC3m n\u1ED1i connector \u0111\u1EC3 xo\u00E1 \u0111i\u1EC3m \u0111\u00F3\r\n </p>\r\n </ng-container>\r\n</nz-drawer>\r\n\r\n<!-- action rule modal -->\r\n<nz-modal\r\n [(nzVisible)]=\"actionRuleModalVisible\"\r\n [nzMaskClosable]=\"false\"\r\n [nzClosable]=\"false\"\r\n [nzKeyboard]=\"true\"\r\n [nzWidth]=\"'90vw'\"\r\n>\r\n <ng-container *nzModalTitle>\r\n ACTION RULE: [{{ selectedStage?.Code }}] {{ selectedStage?.Name }} > [{{ hoverAction?.ActionStatus }}]\r\n {{ hoverAction?.ActionText }}\r\n </ng-container>\r\n <ng-container *nzModalContent>\r\n @if (hoverAction && hoverAction.actionRule) {\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Code'\" [(_ngModel)]=\"hoverAction.actionRule.Code\"></extend-input>\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Name'\" [(_ngModel)]=\"hoverAction.actionRule.Name\"></extend-input>\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Note'\" [(_ngModel)]=\"hoverAction.actionRule.Note\"></extend-input>\r\n <extend-checkbox\r\n nz-col\r\n nzSpan=\"12\"\r\n [label]=\"'IsActive'\"\r\n [(_ngModel)]=\"hoverAction.actionRule.IsActive\"\r\n ></extend-checkbox>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"16\">\r\n <div nz-col nzSpan=\"24\">\r\n <nz-table nzSize=\"small\" [nzData]=\"hoverAction.actionRule.lstLine\" [nzShowPagination]=\"false\">\r\n <thead>\r\n <tr>\r\n <th [nzWidth]=\"'40px'\"><icon-add (click)=\"addActionRuleLine()\"></icon-add></th>\r\n <th [nzWidth]=\"'150px'\">\r\n Rule type\r\n <icon-info\r\n [tooltip]=\"'DomainCode: WF_RuleType (change-action-parent, change-action-child, execute-store )'\"\r\n ></icon-info>\r\n </th>\r\n <th>Template</th>\r\n <th>Template stage</th>\r\n <th>Template action</th>\r\n <th>Store to exec</th>\r\n <th>Email template</th>\r\n <th>Email to</th>\r\n <th [nzWidth]=\"'50px'\">Active</th>\r\n <th>Action</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (item of hoverAction.actionRule.lstLine; track $index) {\r\n <tr>\r\n <td><icon-delete (click)=\"deleteActionRuleLine(hoverAction.actionRule, item)\"></icon-delete></td>\r\n <td>\r\n <dic-domain-select\r\n [size]=\"'small'\"\r\n [DomainCode]=\"'WF_RuleType'\"\r\n [(_ngModel)]=\"item.RuleType\"\r\n ></dic-domain-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n #xxx\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstTemplateForRule(item)\"\r\n [valueField]=\"'WF_Template_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_Template_Id\"\r\n (_ngModelChange)=\"item.WF_TemplateStage_Id = 0; item.WF_TemplateStageAction_Id = 0\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n #yyy\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstStageForRule(xxx._ngModel)\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"item.WF_TemplateStageAction_Id = 0\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstActionForRule(yyy._ngModel)\"\r\n [valueField]=\"'WF_TemplateStageAction_Id'\"\r\n [displayFields]=\"['ActionStatus', 'ActionText']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_TemplateStageAction_Id\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-input [size]=\"'small'\" [(_ngModel)]=\"item.StoreToExec\"></extend-input>\r\n </td>\r\n <td>\r\n <extend-select\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'App_MailTemplate_Id'\"\r\n [displayField]=\"'Code'\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.App_MailTemplate_Id\"\r\n ></extend-select>\r\n </td>\r\n <td class=\"form-item-no-bottom\">\r\n <extend-textarea [size]=\"'small'\" [minRows]=\"1\" [(_ngModel)]=\"item.EmailTo\"></extend-textarea>\r\n </td>\r\n <td class=\"text-center form-item-no-bottom\">\r\n <extend-checkbox [(_ngModel)]=\"item.IsActive\"></extend-checkbox>\r\n </td>\r\n <td>\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"checkAction(item)\">Check</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n </div>\r\n </div>\r\n }\r\n </ng-container>\r\n <ng-container *nzModalFooter>\r\n <button nz-button nzType=\"primary\" (click)=\"checkAllAction()\">OK</button>\r\n </ng-container>\r\n</nz-modal>\r\n", styles: ["@charset \"UTF-8\";::ng-deep .workflow-wrapper{border:solid 1px lightgray;overflow:hidden;width:100%}.workflow-canvas{position:relative;background:#f0f2f5;cursor:default;overflow:hidden;outline:1px dashed rgba(0,0,0,.1)}.workflow-canvas .edges-layer{position:absolute;inset:0;width:100%;height:100%;z-index:1}.workflow-canvas .edges-layer path{stroke-width:2;fill:none}.canvas-content{transform-origin:0 0;width:100%;height:100%;transition:transform .05s linear}.canvas-content{outline:1px dashed red}.canvas-content.panning{cursor:grab}.canvas-content.panning:active{cursor:grabbing}.workflow-canvas.panning{cursor:grab}.workflow-canvas.panning:active{cursor:grabbing}.workflow-canvas.connecting,.workflow-canvas.connecting .workflow-node{cursor:crosshair}.workflow-node{position:absolute;width:160px;cursor:grab;-webkit-user-select:none;user-select:none;z-index:2}.workflow-node:active{cursor:grabbing}.workflow-node.connecting-source,.workflow-node.selected,.workflow-node:hover:not(.workflow-node-start,.workflow-node-end){outline:2px dashed #1890ff}.workflow-node .title{font-weight:600;margin-bottom:6px}.workflow-node-start{width:0px}.workflow-node-start.connecting-source,.workflow-node-start.selected,.workflow-node-start:hover{outline:unset}.workflow-node-start.connecting-source nz-tag,.workflow-node-start.selected nz-tag,.workflow-node-start:hover nz-tag{outline:2px dashed}.workflow-node-start nz-tag{position:relative;top:45px;right:35px}.workflow-node-end{width:0px}.workflow-node-end.connecting-source,.workflow-node-end.selected,.workflow-node-end:hover{outline:unset}.workflow-node-end.connecting-source nz-tag,.workflow-node-end.selected nz-tag,.workflow-node-end:hover nz-tag{outline:2px dashed}.workflow-node-end nz-tag{position:relative;top:45px;right:32px}.connector{position:absolute;top:39px;width:12px;height:12px;background:#1890ff;border-radius:50%;transform:translateY(-50%);cursor:crosshair;transition:box-shadow .15s ease-out,transform .15s ease-out}.connector:hover{box-shadow:0 0 0 3px #1890ff4d;transform:translateY(-50%) scale(1.15)}.connector-right{right:-8px;background:orange}.connector-right.reverse,.connector-left{left:-8px}.connector-left.reverse{left:unset;right:-8px}.connector-start{width:16px;height:16px;right:-8px;background:green;box-shadow:0 0 0 3px #1890ff4d}.connector-end{width:16px;height:16px;left:-8px;background:#000;box-shadow:0 0 0 3px #1890ff4d}.edge{cursor:pointer;stroke:#1890ff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2;fill:none;transition:stroke .15s ease}.edge-hit{stroke:transparent;stroke-width:18px!important;fill:none;cursor:pointer}.edge-hit:hover+.edge{stroke:#ff4d4f;stroke-width:2}.workflow-canvas.dragging-point .edge-hit{pointer-events:none}.edge:hover+.edge-label{fill:#1890ff;font-weight:500}.edge-label{font-size:12px;fill:#555;pointer-events:none;-webkit-user-select:none;user-select:none}.blue{stroke:#1890ff!important}.red{stroke:#ff4d4f!important;box-shadow:0 0 0 3px #1890ff4d!important}.workflow-svg{background:transparent;overflow:visible}.waypoint{position:absolute;width:10px;height:10px;background:#ff4d4f;border-radius:50%;transform:translate(-50%,-50%) scale(1);cursor:move;z-index:1;transition:transform .12s ease-out,background-color .12s ease-out,box-shadow .12s ease-out}.waypoint:hover{background:#ff7875;transform:translate(-50%,-50%) scale(1.25);box-shadow:0 0 0 4px #ff787559}.waypoint.dragging{transition:none;transform:translate(-50%,-50%) scale(1.15);pointer-events:none}.workflow-canvas.dragging-point svg{cursor:grabbing}.selection-box{position:absolute;border:1px dashed #1890ff;background:#1890ff1a;pointer-events:none}.toolbar{position:absolute;top:8px;left:8px;display:flex;gap:4px;padding:6px;background:#fff;border-radius:6px;box-shadow:0 2px 8px #00000026;z-index:100}.toolbar .divider{width:1px;background:#e5e5e5;margin:0 2px}nz-tag.selected{outline:2px dashed #1890ff}.grid-layer{position:absolute;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(rgba(0,0,0,.08) 1px,transparent 1px);background-size:20px 20px}.grid-layer{background-image:linear-gradient(to right,rgba(0,0,0,.06) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.06) 1px,transparent 1px);background-size:20px 20px}.editable-tag{background:#fff;border-style:dashed}::ng-deep .minimap{position:absolute;width:180px;height:125px;top:0;right:0;background-color:#eee;border:1px solid #aaa;opacity:.9;z-index:1}::ng-deep .minimap{position:absolute;width:200px;height:140px;top:8px;right:8px;background-color:#f8f9fa;border:1px solid #d9d9d9;border-radius:8px;box-shadow:0 4px 12px #0000001a;overflow:hidden;z-index:100;-webkit-user-select:none;user-select:none}::ng-deep .minimap-node{position:absolute;background-color:#bfbfbf;border-radius:2px}::ng-deep .minimap-node-round{position:absolute;background-color:#bfbfbf;border-radius:50%}::ng-deep .minimap-node-round-start{background-color:#52c41a}::ng-deep .minimap-node-round-end{background-color:#ff4d4f}::ng-deep .minimap-viewport{position:absolute;box-sizing:border-box;background-color:#1890ff26;border:1.5px solid #1890ff;border-radius:4px;z-index:2;cursor:grab;transition:none}::ng-deep .minimap-viewport.grabbing,::ng-deep .minimap-viewport:active{cursor:grabbing;background-color:#1890ff40}::ng-deep .has-floating-label.floating-label{position:relative;padding-top:14px}::ng-deep .has-floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:13px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .has-floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .has-floating-label .full-width{width:100%}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzCardModule }, { kind: "component", type: i3$5.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i3$6.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i3$6.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i7.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: i6$2.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i6$2.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: Box, selector: "box", inputs: ["display", "width", "height"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$2.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "component", type: ExtendInput, selector: "extend-input", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "inputClass", "labelSpan", "labelFlex", "inputFlex", "showClear", "disabled", "readOnly", "required", "noBottom", "selectModeType", "autocomplete", "autofocus", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "displayField", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "onclickClearIcon", "onenter"] }, { kind: "component", type: ExtendSelectComponent, selector: "extend-select", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "dropdownMatchSelectWidth", "labelSpan", "labelFlex", "disabled", "required", "noBottom", "multiple", "showSelectAll", "maxTagCount", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "lstItem", "displayField", "displayFields", "info", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "itemChange", "onFocus"] }, { kind: "component", type: ExtendCheckbox, selector: "extend-checkbox", inputs: ["label", "labelSpan", "labelFlex", "paddingTop", "disabled", "formData", "controlName", "valueType", "_ngModel"], outputs: ["_ngModelChange"] }, { kind: "component", type: ExtendTextArea, selector: "extend-textarea", inputs: ["label", "placeHolder", "labelAlign", "floatingLabel", "displayInline", "formItemNoButtom", "labelSpan", "labelFlex", "inputFlex", "disabled", "required", "noBottom", "selectModeType", "inputClass", "size", "isSubmited", "minRows", "maxRows", "lstItem", "displayField", "valueField", "formData", "controlName", "_ngModel", "isTouched", "inputErrorMessage", "errorMessages"], outputs: ["_ngModelChange"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i6.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i6.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "component", type: ExtendInputNumber, selector: "extend-input-number", inputs: ["label", "placeHolder", "labelAlign", "floatingLabel", "hiddenUpDown", "labelSpan", "labelFlex", "inputFlex", "disabled", "required", "noBottom", "size", "min", "max", "precision", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "isSubmited", "separatorType", "formData", "controlName", "_ngModel"], outputs: ["_ngModelChange"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i4.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i4.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i4.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i4.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i4.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i4.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzDividerModule }, { kind: "component", type: i17.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "directive", type: AutoFocusDirective, selector: "[appAutoFocus]", inputs: ["appAutoFocus"] }, { kind: "ngmodule", type: NzAutocompleteModule }, { kind: "component", type: i16$1.NzAutocompleteComponent, selector: "nz-autocomplete", inputs: ["nzWidth", "nzOverlayClassName", "nzOverlayStyle", "nzDefaultActiveFirstOption", "nzBackfill", "compareWith", "nzDataSource"], outputs: ["selectionChange"], exportAs: ["nzAutocomplete"] }, { kind: "component", type: i16$1.NzAutocompleteOptionComponent, selector: "nz-auto-option", inputs: ["nzValue", "nzLabel", "nzDisabled"], outputs: ["selectionChange", "mouseEntered"], exportAs: ["nzAutoOption"] }, { kind: "directive", type: i16$1.NzAutocompleteTriggerDirective, selector: "input[nzAutocomplete], textarea[nzAutocomplete]", inputs: ["nzAutocomplete"], exportAs: ["nzAutocompleteTrigger"] }, { kind: "component", type: IconDelete, selector: "icon-delete", inputs: ["size"], outputs: ["click"] }, { kind: "component", type: NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "directive", type: NzModalTitleDirective, selector: "[nzModalTitle]", exportAs: ["nzModalTitle"] }, { kind: "component", type: IconAdd, selector: "icon-add", inputs: ["size"], outputs: ["click"] }, { kind: "directive", type: NzModalFooterDirective, selector: "[nzModalFooter]", exportAs: ["nzModalFooter"] }, { kind: "component", type: DicDomainSelectComponent$1, selector: "dic-domain-select", inputs: ["layOutType", "label", "placeHolder", "labelSpan", "labelAlign", "disabled", "required", "multiple", "showSelectAll", "maxTagCount", "inputWidth", "inputHeight", "size", "borderBottomOnly", "defaultFirstItem", "floatingLabel", "DomainCode", "ParentItemCode", "_ngModel", "formData", "controlName"], outputs: ["_ngModelChange"] }, { kind: "component", type: IconInfo, selector: "icon-info", inputs: ["size", "tooltip"], outputs: ["click"] }] });
|
|
13508
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: WorkflowEditorComponent, isStandalone: true, selector: "app-workflow-editor", inputs: { lstOrg: "lstOrg", lstRole: "lstRole", lstUser: "lstUser", lstEmailTemplate: "lstEmailTemplate" }, outputs: { getdata: "getdata", onSave: "onSave", onDeleteStage: "onDeleteStage", onDeleteAction: "onDeleteAction", onDeleteRule: "onDeleteRule", onDeleteRuleLine: "onDeleteRuleLine", onCheckRule: "onCheckRule", onCheckAllRule: "onCheckAllRule" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, static: true }, { propertyName: "svgRef", first: true, predicate: ["svg"], descendants: true, static: true }, { propertyName: "inputStageStatusElement", first: true, predicate: ["inputStageStatusElement"], descendants: true }, { propertyName: "inputActionTypeElement", first: true, predicate: ["inputActionTypeElement"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n #canvas\r\n class=\"workflow-canvas\"\r\n [class.connecting]=\"!!connectingFrom\"\r\n [class.dragging-point]=\"!!draggingPoint\"\r\n style=\"width: 100%; height: 100%\"\r\n (mousedown)=\"onMouseDownCanvas($event)\"\r\n (mousemove)=\"onMouseMoveCanvas($event)\"\r\n (mouseup)=\"onMouseUpCanvas($event)\"\r\n (click)=\"onClickCanvas($event)\"\r\n (wheel)=\"onWheelCanvas($event)\"\r\n>\r\n <!-- \r\n\r\n [style.width.px]=\"getCanvasWidth()\"\r\n [style.height.px]=\"getCanvasHeight()\" \r\n\r\n [style.width.px]=\"CANVAS_WIDTH\"\r\n [style.height.px]=\"CANVAS_HEIGHT\"\r\n\r\n style=\"width: 100%; height: calc(100vh - 120px)\"\r\n \r\n -->\r\n\r\n <div class=\"toolbar\" (mousedown)=\"$event.stopPropagation()\" (click)=\"$event.stopPropagation()\">\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Editor setting\" (click)=\"settingVisible = true\">\r\n <nz-icon nzType=\"setting\"></nz-icon>\r\n </button>\r\n\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Infomation\" (click)=\"infoVisible = true\">\r\n <nz-icon nzType=\"info-circle\"></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Template setting\" (click)=\"drawTemplateVisibel = true\">\r\n <nz-icon nzType=\"setting\"></nz-icon> T\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nzDanger [nzLoading]=\"!ready\" nz-tooltip=\"Save (Ctrl + S)\" (click)=\"save()\">\r\n <nz-icon nzType=\"save\"></nz-icon>\r\n </button>\r\n <button nz-button nzSize=\"small\" [nzLoading]=\"!ready\" nz-tooltip=\"Reload\" (click)=\"getdata.emit()\">\r\n <nz-icon nzType=\"reload\" class=\"color-primary\"></nz-icon>\r\n </button>\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Add stage\" (click)=\"addStage()\">\r\n <nz-icon nzType=\"plus\" class=\"color-primary\"></nz-icon>\r\n </button>\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"Add template action\"\r\n class=\"color-primary\"\r\n (click)=\"drawTemplateActionVisibel = true\"\r\n >\r\n A\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n [nzType]=\"isMoveMode ? 'primary' : 'default'\"\r\n nz-tooltip=\"Move mode\"\r\n (click)=\"isMoveMode = true\"\r\n >\r\n <nz-icon><img src=\"/assets/icon/hand-palm.png\" width=\"19\" height=\"19\" /></nz-icon>\r\n </button>\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n [nzType]=\"!isMoveMode ? 'primary' : 'default'\"\r\n nz-tooltip=\"Select mode\"\r\n (click)=\"isMoveMode = false\"\r\n >\r\n <nz-icon><img src=\"/assets/icon/cursor.png\" width=\"19\" height=\"19\" /></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <!-- UNDO / REDO -->\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nzType=\"default\"\r\n [disabled]=\"undoStack.length === 0\"\r\n nz-tooltip=\"Undo\"\r\n (click)=\"undo()\"\r\n >\r\n <nz-icon nzType=\"undo\"></nz-icon>\r\n </button>\r\n\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nzType=\"default\"\r\n [disabled]=\"redoStack.length === 0\"\r\n nz-tooltip=\"Redo\"\r\n (click)=\"redo()\"\r\n >\r\n <nz-icon nzType=\"redo\"></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <!-- ALIGN -->\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignLeft()\">\u27F8</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignCenter()\">\u2261</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignRight()\">\u27F9</button>\r\n\r\n <span class=\"divider\"></span>\r\n\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignTop()\">\u21D1</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignMiddle()\">\u2550</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignBottom()\">\u21D3</button>\r\n\r\n <span class=\"divider\"></span>\r\n\r\n <!-- DISTRIBUTE -->\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 3\" (click)=\"distributeHorizontal()\">\r\n \u21C4\r\n </button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 3\" (click)=\"distributeVertical()\">\u21C5</button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomOut()\" nz-tooltip=\"Zoom Out\">\r\n <nz-icon nzType=\"minus\"></nz-icon>\r\n </button>\r\n <span>{{ Math.round(zoom * 100) }}%</span>\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomIn()\" nz-tooltip=\"Zoom In\">\r\n <nz-icon nzType=\"plus\"></nz-icon>\r\n </button>\r\n <span class=\"divider\"></span>\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"resetZoom()\" nz-tooltip=\"Reset Zoom (Ctrl+0)\">\r\n <nz-icon nzType=\"expand\"></nz-icon>\r\n </button>\r\n </div>\r\n\r\n <div\r\n class=\"canvas-content\"\r\n [class.panning]=\"isMoveMode\"\r\n [style.width.px]=\"getCanvasWidth()\"\r\n [style.height.px]=\"getCanvasHeight()\"\r\n [style.transform]=\"\r\n 'translate(' + template.editorOption.panX + 'px,' + template.editorOption.panY + 'px) scale(' + zoom + ')'\r\n \"\r\n >\r\n <!-- GRID -->\r\n <div *ngIf=\"wfcSetting.ShowGrid\" class=\"grid-layer\"></div>\r\n\r\n <!-- SVG EDGES -->\r\n <svg #svg class=\"edges-layer\" width=\"100%\" height=\"100%\" preserveAspectRatio=\"none\">\r\n <g>\r\n <!-- DEFS -->\r\n <defs>\r\n <!-- glow effect -->\r\n <filter id=\"edge-glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\r\n <feGaussianBlur stdDeviation=\"2\" result=\"blur\" />\r\n <feMerge>\r\n <feMergeNode in=\"blur\" />\r\n <feMergeNode in=\"SourceGraphic\" />\r\n </feMerge>\r\n </filter>\r\n\r\n <!-- arrow markers -->\r\n <marker\r\n id=\"arrow-blue\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n refX=\"10\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"blue\" d=\"M0,0 L10,5 L0,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-red\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n refX=\"10\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"red\" d=\"M0,0 L10,5 L0,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-blue-start\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n viewBox=\"0 0 10 10\"\r\n refX=\"0\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"blue\" d=\"M10,0 L0,5 L10,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-red-start\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n viewBox=\"0 0 10 10\"\r\n refX=\"0\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"red\" d=\"M10,0 L0,5 L10,10\"></path>\r\n </marker>\r\n </defs>\r\n\r\n <!-- EDGES B\u00CCNH TH\u01AF\u1EDCNG -->\r\n <ng-container *ngFor=\"let e of normalEdges; let i = index\">\r\n <path\r\n class=\"edge\"\r\n [attr.id]=\"'edge-path-' + i\"\r\n [attr.d]=\"buildPath(e)\"\r\n marker-end=\"url(#arrow-blue)\"\r\n [attr.marker-start]=\"e.allowBack ? 'url(#arrow-blue-start)' : ''\"\r\n ></path>\r\n\r\n <path\r\n class=\"edge-hit\"\r\n [attr.d]=\"buildPath(e)\"\r\n (mouseenter)=\"onMouseEnterEdge(e)\"\r\n (mouseleave)=\"onMouseLeaveEdge(e)\"\r\n (click)=\"onClickEdge(e, $event)\"\r\n ></path>\r\n\r\n <!-- LABEL -->\r\n <!-- text b\u00E1m theo line -->\r\n <!-- \r\n <text *ngIf=\"e.ActionText\" class=\"edge-label\" dy=\"-6\">\r\n <textPath [attr.href]=\"'#edge-path-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.ActionText }}\r\n </textPath>\r\n </text> \r\n \r\n <text *ngIf=\"e.allowBack && e.labelBack\" class=\"edge-label\" dy=\"14\">\r\n <textPath [attr.href]=\"'#edge-path-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.labelBack }}\r\n </textPath>\r\n </text>\r\n -->\r\n\r\n <!-- text th\u1EB3ng n\u1EB1m ngang -->\r\n <text\r\n *ngIf=\"e.ActionText\"\r\n class=\"edge-label\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.ActionText }}\r\n </text>\r\n\r\n <text\r\n *ngIf=\"e.allowBack && e.labelBack\"\r\n class=\"edge-label\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y + 14\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.labelBack }}\r\n </text>\r\n </ng-container>\r\n\r\n <!-- EDGE \u0110ANG HOVER (LU\u00D4N TR\u00CAN C\u00D9NG) -->\r\n <ng-container *ngFor=\"let e of hoverEdges; let i = index\">\r\n <path\r\n class=\"edge red\"\r\n [attr.id]=\"'edge-path-hover-' + i\"\r\n [attr.d]=\"buildPath(e)\"\r\n marker-end=\"url(#arrow-red)\"\r\n [attr.marker-start]=\"e.allowBack ? 'url(#arrow-red-start)' : ''\"\r\n ></path>\r\n\r\n <path\r\n class=\"edge-hit\"\r\n [attr.d]=\"buildPath(e)\"\r\n (mouseleave)=\"onMouseLeaveEdge(e)\"\r\n (click)=\"onClickEdge(e, $event)\"\r\n ></path>\r\n\r\n <!-- LABEL -->\r\n <!-- <text *ngIf=\"e.ActionText\" class=\"edge-label\" dy=\"-6\">\r\n <textPath [attr.href]=\"'#edge-path-hover-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.ActionText }}\r\n </textPath>\r\n </text>\r\n\r\n <text *ngIf=\"e.allowBack && e.labelBack\" class=\"edge-label\" dy=\"14\">\r\n <textPath [attr.href]=\"'#edge-path-hover-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.labelBack }}\r\n </textPath>\r\n </text> -->\r\n\r\n <text\r\n *ngIf=\"e.ActionText\"\r\n class=\"edge-label\"\r\n style=\"font-weight: bold\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.ActionText }}\r\n </text>\r\n\r\n <text\r\n *ngIf=\"e.allowBack && e.labelBack\"\r\n class=\"edge-label\"\r\n style=\"font-weight: bold\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y + 14\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.labelBack }}\r\n </text>\r\n </ng-container>\r\n\r\n <!-- preview -->\r\n <path\r\n *ngIf=\"connectingFrom\"\r\n class=\"edge\"\r\n [attr.d]=\"buildPreviewPath()\"\r\n stroke-dasharray=\"5,5\"\r\n marker-end=\"url(#arrow-blue)\"\r\n ></path>\r\n </g>\r\n </svg>\r\n\r\n <div\r\n *ngIf=\"isSelecting && selectStart && selectEnd\"\r\n class=\"selection-box\"\r\n [style.left.px]=\"Math.min(selectStart.x, selectEnd.x)\"\r\n [style.top.px]=\"Math.min(selectStart.y, selectEnd.y)\"\r\n [style.width.px]=\"Math.abs(selectEnd.x - selectStart.x)\"\r\n [style.height.px]=\"Math.abs(selectEnd.y - selectStart.y)\"\r\n ></div>\r\n\r\n <!-- lstStage -->\r\n @for (n of lstStage; track $index) {\r\n <!-- START NODE -->\r\n @if (n.StageType === \"_start_\") {\r\n <nz-card\r\n class=\"workflow-node workflow-node-start\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <nz-tag [nzColor]=\"'green'\"> START </nz-tag>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector RIGHT: output -->\r\n <div class=\"connector connector-right connector-start\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n } @else {\r\n <div\r\n class=\"connector connector-right connector-start reverse\"\r\n (click)=\"onClickConnector($event, n, 'right')\"\r\n ></div>\r\n }\r\n </nz-card>\r\n }\r\n <!-- END NODE -->\r\n @else if (n.StageType === \"_end_\") {\r\n <nz-card\r\n class=\"workflow-node workflow-node-end\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <nz-tag [nzColor]=\"'red'\"> END </nz-tag>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector LEFT: input -->\r\n <div class=\"connector connector-left connector-end\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n } @else {\r\n <div\r\n class=\"connector connector-left connector-end reverse\"\r\n (click)=\"onClickConnector($event, n, 'left')\"\r\n ></div>\r\n }\r\n </nz-card>\r\n } @else {\r\n <nz-card\r\n class=\"workflow-node\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <div class=\"title\">{{ n.Code }}</div>\r\n\r\n <div>{{ n.Name }}</div>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector RIGHT: output -->\r\n <div class=\"connector connector-right\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n\r\n <!-- connector LEFT: input -->\r\n <div class=\"connector connector-left\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n } @else {\r\n <div class=\"connector connector-right reverse\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n <div class=\"connector connector-left reverse\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n }\r\n </nz-card>\r\n }\r\n }\r\n\r\n <!-- POINTS -->\r\n @for (p of connectingPoints; track $index) {\r\n @if (p != draggingPoint) {\r\n <div\r\n class=\"waypoint\"\r\n [style.left.px]=\"p.x\"\r\n [style.top.px]=\"p.y\"\r\n (mousedown)=\"onmousedownPoint($event, p)\"\r\n (contextmenu)=\"onRightClickPoint($event, hoverAction!, $index)\"\r\n ></div>\r\n } @else {\r\n <div\r\n class=\"waypoint dragging\"\r\n [style.left.px]=\"p.x\"\r\n [style.top.px]=\"p.y\"\r\n (mousedown)=\"onmousedownPoint($event, p)\"\r\n ></div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n<!-- drawer TEMPLATE -->\r\n<nz-drawer\r\n [nzTitle]=\"drawTemplateTitle\"\r\n nzPlacement=\"right\"\r\n [nzWidth]=\"500\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"drawTemplateVisibel\"\r\n [nzFooter]=\"footerTplTemplate\"\r\n (nzOnClose)=\"drawTemplateVisibel = false\"\r\n>\r\n <ng-template #drawTemplateTitle> <nz-icon nzType=\"setting\"></nz-icon> Template </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <extend-select\r\n [label]=\"'Org'\"\r\n [lstItem]=\"lstOrg\"\r\n [valueField]=\"'App_Org_Id'\"\r\n [displayFields]=\"['Name', 'Code']\"\r\n [(_ngModel)]=\"template.App_Org_Id\"\r\n ></extend-select>\r\n <extend-input [label]=\"'Code'\" [(_ngModel)]=\"template.Code\"></extend-input>\r\n <extend-input [label]=\"'Name'\" [(_ngModel)]=\"template.Name\"></extend-input>\r\n <extend-select\r\n [label]=\"'Type'\"\r\n [lstItem]=\"template.lstTemplateType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.DocType\"\r\n ></extend-select>\r\n <extend-textarea [label]=\"'Desscription'\" [(_ngModel)]=\"template.Description\"></extend-textarea>\r\n <extend-select\r\n [label]=\"'Print template'\"\r\n [lstItem]=\"template.lstTemplatePrint\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.TemplatePrint\"\r\n ></extend-select>\r\n <extend-select\r\n [label]=\"'Apply to'\"\r\n [lstItem]=\"template.lstApplyTo\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.ApplyTo\"\r\n ></extend-select>\r\n\r\n <extend-checkbox [label]=\"'Active'\" [(_ngModel)]=\"template.IsActive\"></extend-checkbox>\r\n <extend-checkbox [label]=\"'Use Allow back'\" [(_ngModel)]=\"template.editorOption.AllowbackInUse\"></extend-checkbox>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Stage</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of getLstStage; track tag) {\r\n <div nz-col>\r\n <nz-tag (click)=\"hoverStage = tag\">\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Stage status</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstStageStatus; track tag) {\r\n <div nz-col>\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableStageStatus(tag) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleCloseStageStatus(tag)\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputStageStatusVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInputStageStatus()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action type\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputStageStatusElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Code\"\r\n [(ngModel)]=\"inputStageStatusCode\"\r\n (keydown.enter)=\"inputStageStatusNameElement.select()\"\r\n />\r\n <input\r\n #inputStageStatusNameElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Name\"\r\n [(ngModel)]=\"inputStageStatusName\"\r\n (blur)=\"handleInputStageStatusConfirm()\"\r\n (keydown.enter)=\"handleInputStageStatusConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Action type</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstActionType; track tag) {\r\n <div nz-col>\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableActionType(tag) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleCloseActionType(tag)\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputActionTypeVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInputActionType()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action type\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputActionTypeElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Code\"\r\n [(ngModel)]=\"inputActionTypeCode\"\r\n (keydown.enter)=\"inputActionTypeNameElement.select()\"\r\n />\r\n <input\r\n #inputActionTypeNameElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Name\"\r\n [(ngModel)]=\"inputActionTypeName\"\r\n (blur)=\"handleInputActionTypeConfirm()\"\r\n (keydown.enter)=\"handleInputActionTypeConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Action status</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstActionStatus; track tag) {\r\n <div nz-col>\r\n @if (template.editingActionStatus != tag) {\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableActionStatus(tag.Code) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleClose(tag.Code)\"\r\n (click)=\"template.editingActionStatus = checkRemoveableActionStatus(tag.Code) ? tag : undefined\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n } @else {\r\n <input\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n [appAutoFocus]=\"true\"\r\n [(ngModel)]=\"tag.Code\"\r\n (blur)=\"template.editingActionStatus = undefined\"\r\n (keydown.enter)=\"template.editingActionStatus = undefined\"\r\n /> \r\n }\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInput()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action status\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"+ New Action status\"\r\n [(ngModel)]=\"inputValue\"\r\n (blur)=\"handleInputConfirm()\"\r\n (keydown.enter)=\"handleInputConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #footerTplTemplate>\r\n <div nz-flex [nzGap]=\"6\" [nzJustify]=\"'end'\">\r\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button (click)=\"drawTemplateVisibel = false\">Close</button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- drawer STAGE -->\r\n<nz-drawer\r\n [nzTitle]=\"drawerTitleStage\"\r\n [nzPlacement]=\"selectedStage?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\r\n [nzVisible]=\"!!selectedStage\"\r\n [nzWidth]=\"'calc(50vw)'\"\r\n [nzClosable]=\"false\"\r\n [nzFooter]=\"footerTplNode\"\r\n (nzOnClose)=\"selectedStage = undefined\"\r\n>\r\n <ng-template #drawerTitleStage>\r\n <div nz-row nzJustify=\"space-between\">\r\n @if (selectedStage && selectedStage.editorOption) {\r\n @if (selectedStage.editorOption.drawerPosition == \"left\") {\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the right\"\r\n (click)=\"selectedStage.editorOption.drawerPosition = 'right'\"\r\n >\r\n <nz-icon nzType=\"double-right\"></nz-icon>\r\n </button>\r\n STAGE\r\n } @else {\r\n STAGE\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the left\"\r\n (click)=\"selectedStage.editorOption.drawerPosition = 'left'\"\r\n >\r\n <nz-icon nzType=\"double-left\"></nz-icon>\r\n </button>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <ng-container *ngIf=\"selectedStage\">\r\n <nz-radio-group [(ngModel)]=\"selectedStage.StageType\">\r\n <label nz-radio nzValue=\"_start_\">UI start</label>\r\n <label nz-radio nzValue=\"_end_\">UI end</label>\r\n <label nz-radio nzValue=\"start\">START</label>\r\n <label nz-radio nzValue=\"node\">NODE</label>\r\n <label nz-radio nzValue=\"end\">END</label>\r\n </nz-radio-group>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Code'\"\r\n [required]=\"true\"\r\n [(_ngModel)]=\"selectedStage.Code\"\r\n ></extend-input>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"16\"\r\n [label]=\"'Name'\"\r\n [required]=\"true\"\r\n [(_ngModel)]=\"selectedStage.Name\"\r\n ></extend-input>\r\n </div>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Sequence'\"\r\n [(_ngModel)]=\"selectedStage.SeqValue\"\r\n ></extend-input-number>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"16\"\r\n [label]=\"'Org implement'\"\r\n [lstItem]=\"lstOrg\"\r\n [valueField]=\"'App_Org_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedStage.App_Org_Id\"\r\n ></extend-select>\r\n </div>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Number of Days'\"\r\n [precision]=\"1\"\r\n [(_ngModel)]=\"selectedStage.NumberDay\"\r\n ></extend-input-number>\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Number of Person'\"\r\n [precision]=\"1\"\r\n [(_ngModel)]=\"selectedStage.NumberPerson\"\r\n ></extend-input-number>\r\n </div>\r\n\r\n @if (selectedStage.editorOption) {\r\n @if ([\"start\", \"node\", \"end\"].includes(selectedStage.StageType.toLowerCase())) {\r\n <extend-checkbox\r\n [label]=\"'Reverse'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedStage.editorOption.isReverse\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <extend-checkbox\r\n [label]=\"'Require user action'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedStage.IsRequireUser\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"16\">\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> List Action</h3>\r\n <div nz-col>\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"addAction()\">\r\n <nz-icon nzType=\"plus\"></nz-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <nz-table\r\n class=\"no-hover-color\"\r\n nzSize=\"small\"\r\n [nzData]=\"lstActionOfCurrentStage\"\r\n [nzShowPagination]=\"false\"\r\n [nzNoResult]=\"' '\"\r\n >\r\n <thead>\r\n <tr [hidden]=\"true\">\r\n <th nzWidth=\"40px\"></th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (action of lstActionOfCurrentStage; track $index) {\r\n <tr (click)=\"onclickaction(action)\">\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-left': action == hoverAction ? 'solid 4px orange' : '',\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n ({{ $index + 1 }})\r\n <nz-icon\r\n nzType=\"delete\"\r\n nzTheme=\"outline\"\r\n class=\"color-warn cursor-pointer icon-size-16\"\r\n (click)=\"$event.stopPropagation(); deleteAction(action)\"\r\n ></nz-icon>\r\n </td>\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\" class=\"has-floating-label floating-label\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"z-index: 2\">\r\n <label>Action status</label>\r\n </nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"action.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(action.ActionStatus)\"\r\n (blur)=\"onenterAotu(action.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"action.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(action)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"action.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"action.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(action)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.To_StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"action.DocProcessStatus\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Role</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstRole\"\r\n [valueField]=\"'App_Role_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstRoleId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>User</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstUser\"\r\n [valueField]=\"'App_User_Id'\"\r\n [displayFields]=\"['UserName', 'FullName']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstUserId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Email action</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailAction\"\r\n [valueField]=\"'ID'\"\r\n [displayField]=\"'Name'\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstEmailActionId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>Email template</div>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>\r\n <div nz-col nzSpan=\"1\"></div>\r\n <div nz-col nzSpan=\"23\" class=\"form-item-no-bottom\" style=\"font-weight: normal\">\r\n @for (actionRef of lstActionRefOf(action); track $index) {\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [labelSpan]=\"12\"\r\n [size]=\"'small'\"\r\n [label]=\"emailActionText(actionRef.To_WF_TemplateStageAction_Id)\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"actionRef.TemplateMail\"\r\n ></extend-select>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"8\">\r\n Action rule\r\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"actionRuleModalVisible = true\">\r\n <nz-icon nzType=\"export\" nzTheme=\"outline\" class=\"color-primary\" />\r\n </button>\r\n <button\r\n *ngIf=\"action.WF_TransitionRule_Id\"\r\n nz-button\r\n nzType=\"text\"\r\n nzSize=\"small\"\r\n (click)=\"deleteActionRule(action)\"\r\n >\r\n <nz-icon nzType=\"delete\" nzTheme=\"outline\" class=\"color-warn\" />\r\n </button>\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row nzJustify=\"end\">\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"addAction()\">\r\n <nz-icon nzType=\"plus\"></nz-icon>Add Action\r\n </button>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #footerTplNode>\r\n <div\r\n nz-flex\r\n [nzGap]=\"6\"\r\n [nzJustify]=\"\r\n selectedStage && selectedStage.editorOption && selectedStage.editorOption.drawerPosition == 'left'\r\n ? 'start'\r\n : 'end'\r\n \"\r\n >\r\n <button nz-button nzDanger nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button (click)=\"selectedStage = undefined\">Close</button>\r\n <button\r\n *ngIf=\"selectedStage && ['START', 'END'].indexOf(selectedStage.StageType) < 0\"\r\n nz-button\r\n nzDanger\r\n (click)=\"deleteStage()\"\r\n >\r\n Delete\r\n </button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- drawer TEMPLATE ACTION -->\r\n<nz-drawer\r\n [nzTitle]=\"drawerTitleTemplateAction\"\r\n [nzVisible]=\"drawTemplateActionVisibel\"\r\n [nzWidth]=\"'calc(50vw)'\"\r\n [nzClosable]=\"false\"\r\n [nzFooter]=\"footerTplTemplateAction\"\r\n (nzOnClose)=\"drawTemplateActionVisibel = false\"\r\n>\r\n <ng-template #drawerTitleTemplateAction>\r\n <div nz-row nzJustify=\"space-between\">Template action</div>\r\n </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <nz-table nzSize=\"small\" [nzData]=\"lstActionOfTemplate\" [nzShowPagination]=\"false\" [nzNoResult]=\"' '\">\r\n <thead>\r\n <tr [hidden]=\"true\">\r\n <th nzWidth=\"40px\"></th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (action of lstActionOfTemplate; track $index) {\r\n <tr (click)=\"onclickaction(action)\">\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-left': action == hoverAction ? 'solid 4px orange' : '',\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n ({{ $index + 1 }})\r\n <nz-icon\r\n nzType=\"delete\"\r\n nzTheme=\"outline\"\r\n class=\"color-warn cursor-pointer icon-size-16\"\r\n (click)=\"$event.stopPropagation(); deleteAction(action)\"\r\n ></nz-icon>\r\n </td>\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\" class=\"has-floating-label floating-label\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"z-index: 2\">\r\n <label>Action status</label>\r\n </nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"action.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(action.ActionStatus)\"\r\n (blur)=\"onenterAotu(action.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"action.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(action)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"action.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"action.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(action)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.To_StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"action.DocProcessStatus\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row class=\"text-bold\">Role</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstRole\"\r\n [valueField]=\"'App_Role_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstRoleId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row class=\"text-bold\">User</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstUser\"\r\n [valueField]=\"'App_User_Id'\"\r\n [displayFields]=\"['UserName', 'FullName']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstUserId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row class=\"text-bold\">Email action</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailAction\"\r\n [valueField]=\"'ID'\"\r\n [displayField]=\"'Name'\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstEmailActionId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <!-- Conditions -->\r\n <div nz-row nzGutter=\"32\" class=\"text-bold\">\r\n <div nz-col>Conditions</div>\r\n <div nz-col>\r\n <extend-checkbox label=\"Allway\" [(_ngModel)]=\"action.Conditions.Allway\"></extend-checkbox>\r\n </div>\r\n </div>\r\n <div nz-row class=\"form-item-no-bottom\">\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [label]=\"'Stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [multiple]=\"true\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"action.Conditions.LstStage\"\r\n (_ngModelChange)=\"onchangeNextStage(action)\"\r\n ></extend-select>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [multiple]=\"true\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"action.Conditions.LstDocProcessStatus\"\r\n ></extend-select>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [multiple]=\"true\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.Conditions.LstStageStatus\"\r\n ></extend-select>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [label]=\"'Action status'\"\r\n [lstItem]=\"template.lstActionStatus\"\r\n [multiple]=\"true\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.Conditions.LstActionStatus\"\r\n ></extend-select>\r\n </div>\r\n\r\n <box [height]=\"8\"></box>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>Email template</div>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>\r\n <div nz-col nzSpan=\"1\"></div>\r\n <div nz-col nzSpan=\"23\" class=\"form-item-no-bottom\" style=\"font-weight: normal\">\r\n @for (actionRef of lstActionRefOf(action); track $index) {\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [labelSpan]=\"12\"\r\n [size]=\"'small'\"\r\n [label]=\"emailActionText(actionRef.To_WF_TemplateStageAction_Id)\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"actionRef.TemplateMail\"\r\n ></extend-select>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"8\" class=\"text-bold\">\r\n Action rule\r\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"actionRuleModalVisible = true\">\r\n <nz-icon nzType=\"export\" nzTheme=\"outline\" class=\"color-primary\" />\r\n </button>\r\n <button\r\n *ngIf=\"action.WF_TransitionRule_Id\"\r\n nz-button\r\n nzType=\"text\"\r\n nzSize=\"small\"\r\n (click)=\"deleteActionRule(action)\"\r\n >\r\n <nz-icon nzType=\"delete\" nzTheme=\"outline\" class=\"color-warn\" />\r\n </button>\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row nzJustify=\"end\">\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"addTempldateAction()\">\r\n <nz-icon nzType=\"plus\"></nz-icon>Add Action\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #footerTplTemplateAction>\r\n <div\r\n nz-flex\r\n [nzGap]=\"6\"\r\n [nzJustify]=\"\r\n selectedStage && selectedStage.editorOption && selectedStage.editorOption.drawerPosition == 'left'\r\n ? 'start'\r\n : 'end'\r\n \"\r\n >\r\n <button nz-button nzDanger nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button (click)=\"selectedStage = undefined\">Close</button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- drawer ACTION -->\r\n<nz-drawer\r\n [nzTitle]=\"drawerTitleAction\"\r\n nzTitle=\"ACTION\"\r\n [nzPlacement]=\"selectedAction?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\r\n [nzClosable]=\"false\"\r\n [nzWidth]=\"750\"\r\n [nzVisible]=\"!!selectedAction\"\r\n [nzFooter]=\"footerTplAction\"\r\n (nzOnClose)=\"selectedAction = undefined\"\r\n>\r\n <ng-template #drawerTitleAction>\r\n <div nz-row nzJustify=\"space-between\">\r\n @if (selectedAction && selectedAction.editorOption) {\r\n @if (selectedAction.editorOption.drawerPosition == \"left\") {\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the right\"\r\n (click)=\"selectedAction.editorOption.drawerPosition = 'right'\"\r\n >\r\n <nz-icon nzType=\"double-right\"></nz-icon>\r\n </button>\r\n ACTION\r\n } @else {\r\n ACTION\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the left\"\r\n (click)=\"selectedAction.editorOption.drawerPosition = 'left'\"\r\n >\r\n <nz-icon nzType=\"double-left\"></nz-icon>\r\n </button>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <ng-container *ngIf=\"selectedAction\">\r\n <div>\r\n <strong\r\n >{{ selectedAction.getFromStageCode(lstStage) }} -> {{ selectedAction.getToStageCode(lstStage) }}</strong\r\n >\r\n </div>\r\n <div>{{ selectedAction.getFromStageName(lstStage) }} -> {{ selectedAction.getToStageName(lstStage) }}</div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\" class=\"has-floating-label floating-label\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"z-index: 2\">\r\n <label>Action status</label>\r\n </nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"selectedAction.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(selectedAction.ActionStatus)\"\r\n (blur)=\"onenterAotu(selectedAction.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"selectedAction.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(selectedAction)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"selectedAction.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedAction.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedAction.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(selectedAction)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedAction.To_StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"selectedAction.DocProcessStatus\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Role</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstRole\"\r\n [valueField]=\"'App_Role_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstRoleId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>User</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstUser\"\r\n [valueField]=\"'App_User_Id'\"\r\n [displayFields]=\"['UserName', 'FullName']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstUserId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Email action</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailAction\"\r\n [valueField]=\"'ID'\"\r\n [displayField]=\"'Name'\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstEmailActionId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div *ngIf=\"selectedAction._lstEmailActionId && selectedAction._lstEmailActionId.length\" nz-row>\r\n Email template\r\n </div>\r\n <div *ngIf=\"selectedAction._lstEmailActionId && selectedAction._lstEmailActionId.length\" nz-row>\r\n <div nz-col nzSpan=\"1\"></div>\r\n <div nz-col nzSpan=\"23\" class=\"form-item-no-bottom\" style=\"font-weight: normal\">\r\n @for (actionRef of lstActionRefOf(selectedAction); track $index) {\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [labelSpan]=\"12\"\r\n [size]=\"'small'\"\r\n [label]=\"emailActionText(actionRef.To_WF_TemplateStageAction_Id)\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"actionRef.TemplateMail\"\r\n ></extend-select>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"8\">\r\n Action rule\r\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"actionRuleModalVisible = true\">\r\n <nz-icon nzType=\"export\" nzTheme=\"outline\" class=\"color-primary\" />\r\n </button>\r\n <button\r\n *ngIf=\"selectedAction.WF_TransitionRule_Id\"\r\n nz-button\r\n nzType=\"text\"\r\n nzSize=\"small\"\r\n (click)=\"deleteActionRule(selectedAction)\"\r\n >\r\n <nz-icon nzType=\"delete\" nzTheme=\"outline\" class=\"color-warn\" />\r\n </button>\r\n </div>\r\n\r\n <!-- <box [height]=\"16\"></box> -->\r\n <nz-divider></nz-divider>\r\n\r\n @if (template.editorOption.AllowbackInUse) {\r\n <extend-checkbox\r\n [label]=\"'Allow back'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedAction.allowBack\"\r\n (_ngModelChange)=\"onchangeAllowBack(selectedAction)\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n @if (selectedAction.allowBack) {\r\n <div>\r\n <strong\r\n >{{ selectedAction.getToStageCode(lstStage) }} -> {{ selectedAction.getFromStageCode(lstStage) }}</strong\r\n >\r\n </div>\r\n <div>{{ selectedAction.getToStageName(lstStage) }} -> {{ selectedAction.getFromStageName(lstStage) }}</div>\r\n\r\n @if (selectedBackAction) {\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"height: 32px\">Action status</nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"selectedBackAction.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(selectedBackAction.ActionStatus)\"\r\n (blur)=\"onenterAotu(selectedBackAction.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"selectedBackAction.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(selectedBackAction)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"selectedBackAction.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedBackAction.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"lstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedBackAction.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(selectedBackAction)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedBackAction.To_StageStatus\"\r\n ></extend-select>\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #footerTplAction>\r\n <div\r\n nz-flex\r\n [nzGap]=\"6\"\r\n [nzJustify]=\"selectedAction && selectedAction.editorOption.drawerPosition == 'left' ? 'start' : 'end'\"\r\n >\r\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button nzDanger (click)=\"deleteAction(selectedAction!)\">Delete</button>\r\n <button nz-button (click)=\"selectedAction = undefined\">Close</button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- setting editor -->\r\n<nz-drawer\r\n [nzTitle]=\"drawSettingTitle\"\r\n nzPlacement=\"right\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"settingVisible\"\r\n (nzOnClose)=\"settingVisible = false\"\r\n>\r\n <ng-template #drawSettingTitle> <nz-icon nzType=\"setting\"></nz-icon> Editor </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <div class=\"form-item-no-bottom\">\r\n <extend-checkbox [label]=\"'Show grid'\" [labelSpan]=\"0\" [(_ngModel)]=\"wfcSetting.ShowGrid\"></extend-checkbox>\r\n\r\n <box [height]=\"16\"></box>\r\n </div>\r\n </ng-container>\r\n</nz-drawer>\r\n\r\n<!-- editor infomation -->\r\n<nz-drawer\r\n [nzTitle]=\"drawInfoTitle\"\r\n nzPlacement=\"right\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"infoVisible\"\r\n (nzOnClose)=\"infoVisible = false\"\r\n>\r\n <ng-template #drawInfoTitle> <nz-icon nzType=\"info-circle\"></nz-icon> Infomation </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <p>1. C\u00E1c th\u00E0nh ph\u1EA7n: Stage or Node (stag, node quy tr\u00ECnh), Action or Connector (\u0111\u01B0\u1EDDng n\u1ED1i gi\u1EEFa c\u00E1c stage)</p>\r\n <p>2. Save \u0111\u1EC3 load c\u00E1c th\u00F4ng tin: Stage status, Action type</p>\r\n <p>\r\n 3. N\u1ED1i 2 node (t\u1EA1o connector t\u01B0\u01A1ng \u0111\u01B0\u01A1ng t\u1EA1o action):\r\n <br />- Click ch\u1EA5m cam t\u1EEB Node ngu\u1ED3n \u0111\u1EBFn ch\u1EA5m xanh c\u1EE7a Node \u0111\u00EDch (ho\u1EB7c click v\u00E0o Node \u0111\u00EDch), c\u00F3 th\u1EC3 click th\u00E0nh\r\n nhi\u1EC1u \u0111i\u1EC3m \u0111\u1EC3 t\u1EA1o \u0111\u01B0\u1EDDng n\u1ED1i cong<br />- Khi hover connector chuy\u1EC3n sang m\u1EA7u \u0111\u1ECF c\u00F3 th\u1EC3 click \u0111\u00FAp \u0111\u1EC3 th\u00EAm m\u1ED9t \u0111i\u1EC3m\r\n c\u1EE7a connector<br />- Khi hover l\u00EAn \u0111i\u1EC3m c\u1EE7a connector c\u00F3 th\u1EC3 di chuy\u1EC3n \u0111i\u1EC3m \u0111\u00F3 b\u1EB1ng c\u00E1ch nh\u1EA5n gi\u1EEF chu\u1ED9t v\u00E0 k\u00E9o th\u1EA3\r\n \u0111\u1EBFn v\u1ECB tr\u00ED m\u1EDBi<br />- Chu\u1ED9t ph\u1EA3i v\u00E0o \u0111i\u1EC3m n\u1ED1i connector \u0111\u1EC3 xo\u00E1 \u0111i\u1EC3m \u0111\u00F3\r\n </p>\r\n </ng-container>\r\n</nz-drawer>\r\n\r\n<!-- action rule modal -->\r\n<nz-modal\r\n [(nzVisible)]=\"actionRuleModalVisible\"\r\n [nzMaskClosable]=\"false\"\r\n [nzClosable]=\"false\"\r\n [nzKeyboard]=\"true\"\r\n [nzWidth]=\"'90vw'\"\r\n>\r\n <ng-container *nzModalTitle>\r\n ACTION RULE: [{{ selectedStage?.Code }}] {{ selectedStage?.Name }} > [{{ hoverAction?.ActionStatus }}]\r\n {{ hoverAction?.ActionText }}\r\n </ng-container>\r\n <ng-container *nzModalContent>\r\n @if (hoverAction && hoverAction.actionRule) {\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Code'\" [(_ngModel)]=\"hoverAction.actionRule.Code\"></extend-input>\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Name'\" [(_ngModel)]=\"hoverAction.actionRule.Name\"></extend-input>\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Note'\" [(_ngModel)]=\"hoverAction.actionRule.Note\"></extend-input>\r\n <extend-checkbox\r\n nz-col\r\n nzSpan=\"12\"\r\n [label]=\"'IsActive'\"\r\n [(_ngModel)]=\"hoverAction.actionRule.IsActive\"\r\n ></extend-checkbox>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"16\">\r\n <div nz-col nzSpan=\"24\">\r\n <nz-table nzSize=\"small\" [nzData]=\"hoverAction.actionRule.lstLine\" [nzShowPagination]=\"false\">\r\n <thead>\r\n <tr>\r\n <th [nzWidth]=\"'40px'\"><icon-add (click)=\"addActionRuleLine()\"></icon-add></th>\r\n <th [nzWidth]=\"'150px'\">\r\n Rule type\r\n <icon-info\r\n [tooltip]=\"'DomainCode: WF_RuleType (change-action-parent, change-action-child, execute-store )'\"\r\n ></icon-info>\r\n </th>\r\n <th>Template</th>\r\n <th>Template stage</th>\r\n <th>Template action</th>\r\n <th>Store to exec</th>\r\n <th>Email template</th>\r\n <th>Email to</th>\r\n <th [nzWidth]=\"'50px'\">Active</th>\r\n <th>Action</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (item of hoverAction.actionRule.lstLine; track $index) {\r\n <tr>\r\n <td><icon-delete (click)=\"deleteActionRuleLine(hoverAction.actionRule, item)\"></icon-delete></td>\r\n <td>\r\n <dic-domain-select\r\n [size]=\"'small'\"\r\n [DomainCode]=\"'WF_RuleType'\"\r\n [(_ngModel)]=\"item.RuleType\"\r\n ></dic-domain-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n #xxx\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstTemplateForRule(item)\"\r\n [valueField]=\"'WF_Template_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_Template_Id\"\r\n (_ngModelChange)=\"item.WF_TemplateStage_Id = 0; item.WF_TemplateStageAction_Id = 0\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n #yyy\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstStageForRule(xxx._ngModel)\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"item.WF_TemplateStageAction_Id = 0\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstActionForRule(yyy._ngModel)\"\r\n [valueField]=\"'WF_TemplateStageAction_Id'\"\r\n [displayFields]=\"['ActionStatus', 'ActionText']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_TemplateStageAction_Id\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-input [size]=\"'small'\" [(_ngModel)]=\"item.StoreToExec\"></extend-input>\r\n </td>\r\n <td>\r\n <extend-select\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'App_MailTemplate_Id'\"\r\n [displayField]=\"'Code'\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.App_MailTemplate_Id\"\r\n ></extend-select>\r\n </td>\r\n <td class=\"form-item-no-bottom\">\r\n <extend-textarea [size]=\"'small'\" [minRows]=\"1\" [(_ngModel)]=\"item.EmailTo\"></extend-textarea>\r\n </td>\r\n <td class=\"text-center form-item-no-bottom\">\r\n <extend-checkbox [(_ngModel)]=\"item.IsActive\"></extend-checkbox>\r\n </td>\r\n <td>\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"checkAction(item)\">Check</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n </div>\r\n </div>\r\n }\r\n </ng-container>\r\n <ng-container *nzModalFooter>\r\n <button nz-button nzType=\"primary\" (click)=\"checkAllAction()\">OK</button>\r\n </ng-container>\r\n</nz-modal>\r\n", styles: ["@charset \"UTF-8\";::ng-deep .workflow-wrapper{border:solid 1px lightgray;overflow:hidden;width:100%}.workflow-canvas{position:relative;background:#f0f2f5;cursor:default;overflow:hidden;outline:1px dashed rgba(0,0,0,.1)}.workflow-canvas .edges-layer{position:absolute;inset:0;width:100%;height:100%;z-index:1}.workflow-canvas .edges-layer path{stroke-width:2;fill:none}.canvas-content{transform-origin:0 0;width:100%;height:100%;transition:transform .05s linear}.canvas-content{outline:1px dashed red}.canvas-content.panning{cursor:grab}.canvas-content.panning:active{cursor:grabbing}.workflow-canvas.panning{cursor:grab}.workflow-canvas.panning:active{cursor:grabbing}.workflow-canvas.connecting,.workflow-canvas.connecting .workflow-node{cursor:crosshair}.workflow-node{position:absolute;width:160px;cursor:grab;-webkit-user-select:none;user-select:none;z-index:2}.workflow-node:active{cursor:grabbing}.workflow-node.connecting-source,.workflow-node.selected,.workflow-node:hover:not(.workflow-node-start,.workflow-node-end){outline:2px dashed #1890ff}.workflow-node .title{font-weight:600;margin-bottom:6px}.workflow-node-start{width:0px}.workflow-node-start.connecting-source,.workflow-node-start.selected,.workflow-node-start:hover{outline:unset}.workflow-node-start.connecting-source nz-tag,.workflow-node-start.selected nz-tag,.workflow-node-start:hover nz-tag{outline:2px dashed}.workflow-node-start nz-tag{position:relative;top:45px;right:35px}.workflow-node-end{width:0px}.workflow-node-end.connecting-source,.workflow-node-end.selected,.workflow-node-end:hover{outline:unset}.workflow-node-end.connecting-source nz-tag,.workflow-node-end.selected nz-tag,.workflow-node-end:hover nz-tag{outline:2px dashed}.workflow-node-end nz-tag{position:relative;top:45px;right:32px}.connector{position:absolute;top:39px;width:12px;height:12px;background:#1890ff;border-radius:50%;transform:translateY(-50%);cursor:crosshair;transition:box-shadow .15s ease-out,transform .15s ease-out}.connector:hover{box-shadow:0 0 0 3px #1890ff4d;transform:translateY(-50%) scale(1.15)}.connector-right{right:-8px;background:orange}.connector-right.reverse,.connector-left{left:-8px}.connector-left.reverse{left:unset;right:-8px}.connector-start{width:16px;height:16px;right:-8px;background:green;box-shadow:0 0 0 3px #1890ff4d}.connector-end{width:16px;height:16px;left:-8px;background:#000;box-shadow:0 0 0 3px #1890ff4d}.edge{cursor:pointer;stroke:#1890ff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2;fill:none;transition:stroke .15s ease}.edge-hit{stroke:transparent;stroke-width:18px!important;fill:none;cursor:pointer}.edge-hit:hover+.edge{stroke:#ff4d4f;stroke-width:2}.workflow-canvas.dragging-point .edge-hit{pointer-events:none}.edge:hover+.edge-label{fill:#1890ff;font-weight:500}.edge-label{font-size:12px;fill:#555;pointer-events:none;-webkit-user-select:none;user-select:none}.blue{stroke:#1890ff!important}.red{stroke:#ff4d4f!important;box-shadow:0 0 0 3px #1890ff4d!important}.workflow-svg{background:transparent;overflow:visible}.waypoint{position:absolute;width:10px;height:10px;background:#ff4d4f;border-radius:50%;transform:translate(-50%,-50%) scale(1);cursor:move;z-index:1;transition:transform .12s ease-out,background-color .12s ease-out,box-shadow .12s ease-out}.waypoint:hover{background:#ff7875;transform:translate(-50%,-50%) scale(1.25);box-shadow:0 0 0 4px #ff787559}.waypoint.dragging{transition:none;transform:translate(-50%,-50%) scale(1.15);pointer-events:none}.workflow-canvas.dragging-point svg{cursor:grabbing}.selection-box{position:absolute;border:1px dashed #1890ff;background:#1890ff1a;pointer-events:none}.toolbar{position:absolute;top:8px;left:8px;display:flex;gap:4px;padding:6px;background:#fff;border-radius:6px;box-shadow:0 2px 8px #00000026;z-index:100}.toolbar .divider{width:1px;background:#e5e5e5;margin:0 2px}nz-tag.selected{outline:2px dashed #1890ff}.grid-layer{position:absolute;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(rgba(0,0,0,.08) 1px,transparent 1px);background-size:20px 20px}.grid-layer{background-image:linear-gradient(to right,rgba(0,0,0,.06) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.06) 1px,transparent 1px);background-size:20px 20px}.editable-tag{background:#fff;border-style:dashed}::ng-deep .minimap{position:absolute;width:180px;height:125px;top:0;right:0;background-color:#eee;border:1px solid #aaa;opacity:.9;z-index:1}::ng-deep .minimap{position:absolute;width:200px;height:140px;top:8px;right:8px;background-color:#f8f9fa;border:1px solid #d9d9d9;border-radius:8px;box-shadow:0 4px 12px #0000001a;overflow:hidden;z-index:100;-webkit-user-select:none;user-select:none}::ng-deep .minimap-node{position:absolute;background-color:#bfbfbf;border-radius:2px}::ng-deep .minimap-node-round{position:absolute;background-color:#bfbfbf;border-radius:50%}::ng-deep .minimap-node-round-start{background-color:#52c41a}::ng-deep .minimap-node-round-end{background-color:#ff4d4f}::ng-deep .minimap-viewport{position:absolute;box-sizing:border-box;background-color:#1890ff26;border:1.5px solid #1890ff;border-radius:4px;z-index:2;cursor:grab;transition:none}::ng-deep .minimap-viewport.grabbing,::ng-deep .minimap-viewport:active{cursor:grabbing;background-color:#1890ff40}::ng-deep .has-floating-label.floating-label{position:relative;padding-top:14px}::ng-deep .has-floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:13px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .has-floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .has-floating-label .full-width{width:100%}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzCardModule }, { kind: "component", type: i3$5.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i3$6.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i3$6.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "component", type: i7.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: i6$2.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i6$2.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: Box, selector: "box", inputs: ["display", "width", "height"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$2.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "component", type: ExtendInput, selector: "extend-input", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "inputClass", "labelSpan", "labelFlex", "inputFlex", "showClear", "disabled", "readOnly", "required", "noBottom", "selectModeType", "autocomplete", "autofocus", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "displayField", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "onclickClearIcon", "onenter"] }, { kind: "component", type: ExtendSelectComponent, selector: "extend-select", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "dropdownMatchSelectWidth", "labelSpan", "labelFlex", "disabled", "required", "noBottom", "multiple", "showSelectAll", "maxTagCount", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "lstItem", "displayField", "displayFields", "info", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "itemChange", "onFocus"] }, { kind: "component", type: ExtendCheckbox, selector: "extend-checkbox", inputs: ["label", "labelSpan", "labelFlex", "paddingTop", "disabled", "formData", "controlName", "valueType", "_ngModel"], outputs: ["_ngModelChange"] }, { kind: "component", type: ExtendTextArea, selector: "extend-textarea", inputs: ["label", "placeHolder", "labelAlign", "floatingLabel", "displayInline", "formItemNoButtom", "labelSpan", "labelFlex", "inputFlex", "disabled", "required", "noBottom", "selectModeType", "inputClass", "size", "isSubmited", "minRows", "maxRows", "lstItem", "displayField", "valueField", "formData", "controlName", "_ngModel", "isTouched", "inputErrorMessage", "errorMessages"], outputs: ["_ngModelChange"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i6.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i6.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "component", type: ExtendInputNumber, selector: "extend-input-number", inputs: ["label", "placeHolder", "labelAlign", "floatingLabel", "hiddenUpDown", "labelSpan", "labelFlex", "inputFlex", "disabled", "required", "noBottom", "size", "min", "max", "precision", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "isSubmited", "separatorType", "formData", "controlName", "_ngModel"], outputs: ["_ngModelChange"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i4.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i4.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i4.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i4.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i4.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i4.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzDividerModule }, { kind: "component", type: i17.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "directive", type: AutoFocusDirective, selector: "[appAutoFocus]", inputs: ["appAutoFocus"] }, { kind: "ngmodule", type: NzAutocompleteModule }, { kind: "component", type: i16$1.NzAutocompleteComponent, selector: "nz-autocomplete", inputs: ["nzWidth", "nzOverlayClassName", "nzOverlayStyle", "nzDefaultActiveFirstOption", "nzBackfill", "compareWith", "nzDataSource"], outputs: ["selectionChange"], exportAs: ["nzAutocomplete"] }, { kind: "component", type: i16$1.NzAutocompleteOptionComponent, selector: "nz-auto-option", inputs: ["nzValue", "nzLabel", "nzDisabled"], outputs: ["selectionChange", "mouseEntered"], exportAs: ["nzAutoOption"] }, { kind: "directive", type: i16$1.NzAutocompleteTriggerDirective, selector: "input[nzAutocomplete], textarea[nzAutocomplete]", inputs: ["nzAutocomplete"], exportAs: ["nzAutocompleteTrigger"] }, { kind: "component", type: IconDelete, selector: "icon-delete", inputs: ["size"], outputs: ["click"] }, { kind: "component", type: NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "directive", type: NzModalTitleDirective, selector: "[nzModalTitle]", exportAs: ["nzModalTitle"] }, { kind: "component", type: IconAdd, selector: "icon-add", inputs: ["size"], outputs: ["click"] }, { kind: "directive", type: NzModalFooterDirective, selector: "[nzModalFooter]", exportAs: ["nzModalFooter"] }, { kind: "component", type: DicDomainSelectComponent$1, selector: "dic-domain-select", inputs: ["layOutType", "label", "placeHolder", "labelSpan", "labelAlign", "disabled", "required", "multiple", "showSelectAll", "maxTagCount", "inputWidth", "inputHeight", "size", "borderBottomOnly", "defaultFirstItem", "floatingLabel", "DomainCode", "ParentItemCode", "_ngModel", "formData", "controlName"], outputs: ["_ngModelChange"] }, { kind: "component", type: IconInfo, selector: "icon-info", inputs: ["size", "tooltip"], outputs: ["click"] }] });
|
|
13436
13509
|
}
|
|
13437
13510
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WorkflowEditorComponent, decorators: [{
|
|
13438
13511
|
type: Component,
|
|
@@ -13467,7 +13540,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
13467
13540
|
NzModalFooterDirective,
|
|
13468
13541
|
DicDomainSelectComponent$1,
|
|
13469
13542
|
IconInfo,
|
|
13470
|
-
], selector: 'app-workflow-editor', template: "<div\r\n #canvas\r\n class=\"workflow-canvas\"\r\n [class.connecting]=\"!!connectingFrom\"\r\n [class.dragging-point]=\"!!draggingPoint\"\r\n style=\"width: 100%; height: 100%\"\r\n (mousedown)=\"onMouseDownCanvas($event)\"\r\n (mousemove)=\"onMouseMoveCanvas($event)\"\r\n (mouseup)=\"onMouseUpCanvas($event)\"\r\n (click)=\"onClickCanvas($event)\"\r\n (wheel)=\"onWheelCanvas($event)\"\r\n>\r\n <!-- \r\n\r\n [style.width.px]=\"getCanvasWidth()\"\r\n [style.height.px]=\"getCanvasHeight()\" \r\n\r\n [style.width.px]=\"CANVAS_WIDTH\"\r\n [style.height.px]=\"CANVAS_HEIGHT\"\r\n\r\n style=\"width: 100%; height: calc(100vh - 120px)\"\r\n \r\n -->\r\n\r\n <div class=\"toolbar\" (mousedown)=\"$event.stopPropagation()\" (click)=\"$event.stopPropagation()\">\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Editor setting\" (click)=\"settingVisible = true\">\r\n <nz-icon nzType=\"setting\"></nz-icon>\r\n </button>\r\n\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Infomation\" (click)=\"infoVisible = true\">\r\n <nz-icon nzType=\"info-circle\"></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Template setting\" (click)=\"drawTemplateVisibel = true\">\r\n <nz-icon nzType=\"setting\"></nz-icon> T\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nzDanger [nzLoading]=\"!ready\" nz-tooltip=\"Save (Ctrl + S)\" (click)=\"save()\">\r\n <nz-icon nzType=\"save\"></nz-icon>\r\n </button>\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Add stage\" (click)=\"addStage()\">\r\n <nz-icon nzType=\"plus\" class=\"color-primary\"></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n [nzType]=\"isMoveMode ? 'primary' : 'default'\"\r\n nz-tooltip=\"Move mode\"\r\n (click)=\"isMoveMode = true\"\r\n >\r\n <nz-icon><img src=\"/assets/icon/hand-palm.png\" width=\"19\" height=\"19\" /></nz-icon>\r\n </button>\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n [nzType]=\"!isMoveMode ? 'primary' : 'default'\"\r\n nz-tooltip=\"Select mode\"\r\n (click)=\"isMoveMode = false\"\r\n >\r\n <nz-icon><img src=\"/assets/icon/cursor.png\" width=\"19\" height=\"19\" /></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <!-- UNDO / REDO -->\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nzType=\"default\"\r\n [disabled]=\"undoStack.length === 0\"\r\n nz-tooltip=\"Undo\"\r\n (click)=\"undo()\"\r\n >\r\n <nz-icon nzType=\"undo\"></nz-icon>\r\n </button>\r\n\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nzType=\"default\"\r\n [disabled]=\"redoStack.length === 0\"\r\n nz-tooltip=\"Redo\"\r\n (click)=\"redo()\"\r\n >\r\n <nz-icon nzType=\"redo\"></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <!-- ALIGN -->\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignLeft()\">\u27F8</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignCenter()\">\u2261</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignRight()\">\u27F9</button>\r\n\r\n <span class=\"divider\"></span>\r\n\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignTop()\">\u21D1</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignMiddle()\">\u2550</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignBottom()\">\u21D3</button>\r\n\r\n <span class=\"divider\"></span>\r\n\r\n <!-- DISTRIBUTE -->\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 3\" (click)=\"distributeHorizontal()\">\r\n \u21C4\r\n </button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 3\" (click)=\"distributeVertical()\">\u21C5</button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomOut()\" nz-tooltip=\"Zoom Out\">\r\n <nz-icon nzType=\"minus\"></nz-icon>\r\n </button>\r\n <span>{{ Math.round(zoom * 100) }}%</span>\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomIn()\" nz-tooltip=\"Zoom In\">\r\n <nz-icon nzType=\"plus\"></nz-icon>\r\n </button>\r\n <span class=\"divider\"></span>\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"resetZoom()\" nz-tooltip=\"Reset Zoom (Ctrl+0)\">\r\n <nz-icon nzType=\"expand\"></nz-icon>\r\n </button>\r\n </div>\r\n\r\n <div\r\n class=\"canvas-content\"\r\n [class.panning]=\"isMoveMode\"\r\n [style.width.px]=\"getCanvasWidth()\"\r\n [style.height.px]=\"getCanvasHeight()\"\r\n [style.transform]=\"\r\n 'translate(' + template.editorOption.panX + 'px,' + template.editorOption.panY + 'px) scale(' + zoom + ')'\r\n \"\r\n >\r\n <!-- GRID -->\r\n <div *ngIf=\"wfcSetting.ShowGrid\" class=\"grid-layer\"></div>\r\n\r\n <!-- SVG EDGES -->\r\n <svg #svg class=\"edges-layer\" width=\"100%\" height=\"100%\" preserveAspectRatio=\"none\">\r\n <g>\r\n <!-- DEFS -->\r\n <defs>\r\n <!-- glow effect -->\r\n <filter id=\"edge-glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\r\n <feGaussianBlur stdDeviation=\"2\" result=\"blur\" />\r\n <feMerge>\r\n <feMergeNode in=\"blur\" />\r\n <feMergeNode in=\"SourceGraphic\" />\r\n </feMerge>\r\n </filter>\r\n\r\n <!-- arrow markers -->\r\n <marker\r\n id=\"arrow-blue\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n refX=\"10\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"blue\" d=\"M0,0 L10,5 L0,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-red\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n refX=\"10\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"red\" d=\"M0,0 L10,5 L0,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-blue-start\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n viewBox=\"0 0 10 10\"\r\n refX=\"0\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"blue\" d=\"M10,0 L0,5 L10,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-red-start\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n viewBox=\"0 0 10 10\"\r\n refX=\"0\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"red\" d=\"M10,0 L0,5 L10,10\"></path>\r\n </marker>\r\n </defs>\r\n\r\n <!-- EDGES B\u00CCNH TH\u01AF\u1EDCNG -->\r\n <ng-container *ngFor=\"let e of normalEdges; let i = index\">\r\n <path\r\n class=\"edge\"\r\n [attr.id]=\"'edge-path-' + i\"\r\n [attr.d]=\"buildPath(e)\"\r\n marker-end=\"url(#arrow-blue)\"\r\n [attr.marker-start]=\"e.allowBack ? 'url(#arrow-blue-start)' : ''\"\r\n ></path>\r\n\r\n <path\r\n class=\"edge-hit\"\r\n [attr.d]=\"buildPath(e)\"\r\n (mouseenter)=\"onMouseEnterEdge(e)\"\r\n (mouseleave)=\"onMouseLeaveEdge(e)\"\r\n (click)=\"onClickEdge(e, $event)\"\r\n ></path>\r\n\r\n <!-- LABEL -->\r\n <!-- text b\u00E1m theo line -->\r\n <!-- \r\n <text *ngIf=\"e.ActionText\" class=\"edge-label\" dy=\"-6\">\r\n <textPath [attr.href]=\"'#edge-path-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.ActionText }}\r\n </textPath>\r\n </text> \r\n \r\n <text *ngIf=\"e.allowBack && e.labelBack\" class=\"edge-label\" dy=\"14\">\r\n <textPath [attr.href]=\"'#edge-path-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.labelBack }}\r\n </textPath>\r\n </text>\r\n -->\r\n\r\n <!-- text th\u1EB3ng n\u1EB1m ngang -->\r\n <text\r\n *ngIf=\"e.ActionText\"\r\n class=\"edge-label\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.ActionText }}\r\n </text>\r\n\r\n <text\r\n *ngIf=\"e.allowBack && e.labelBack\"\r\n class=\"edge-label\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y + 14\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.labelBack }}\r\n </text>\r\n </ng-container>\r\n\r\n <!-- EDGE \u0110ANG HOVER (LU\u00D4N TR\u00CAN C\u00D9NG) -->\r\n <ng-container *ngFor=\"let e of hoverEdges; let i = index\">\r\n <path\r\n class=\"edge red\"\r\n [attr.id]=\"'edge-path-hover-' + i\"\r\n [attr.d]=\"buildPath(e)\"\r\n marker-end=\"url(#arrow-red)\"\r\n [attr.marker-start]=\"e.allowBack ? 'url(#arrow-red-start)' : ''\"\r\n ></path>\r\n\r\n <path\r\n class=\"edge-hit\"\r\n [attr.d]=\"buildPath(e)\"\r\n (mouseleave)=\"onMouseLeaveEdge(e)\"\r\n (click)=\"onClickEdge(e, $event)\"\r\n ></path>\r\n\r\n <!-- LABEL -->\r\n <!-- <text *ngIf=\"e.ActionText\" class=\"edge-label\" dy=\"-6\">\r\n <textPath [attr.href]=\"'#edge-path-hover-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.ActionText }}\r\n </textPath>\r\n </text>\r\n\r\n <text *ngIf=\"e.allowBack && e.labelBack\" class=\"edge-label\" dy=\"14\">\r\n <textPath [attr.href]=\"'#edge-path-hover-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.labelBack }}\r\n </textPath>\r\n </text> -->\r\n\r\n <text\r\n *ngIf=\"e.ActionText\"\r\n class=\"edge-label\"\r\n style=\"font-weight: bold\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.ActionText }}\r\n </text>\r\n\r\n <text\r\n *ngIf=\"e.allowBack && e.labelBack\"\r\n class=\"edge-label\"\r\n style=\"font-weight: bold\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y + 14\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.labelBack }}\r\n </text>\r\n </ng-container>\r\n\r\n <!-- preview -->\r\n <path\r\n *ngIf=\"connectingFrom\"\r\n class=\"edge\"\r\n [attr.d]=\"buildPreviewPath()\"\r\n stroke-dasharray=\"5,5\"\r\n marker-end=\"url(#arrow-blue)\"\r\n ></path>\r\n </g>\r\n </svg>\r\n\r\n <div\r\n *ngIf=\"isSelecting && selectStart && selectEnd\"\r\n class=\"selection-box\"\r\n [style.left.px]=\"Math.min(selectStart.x, selectEnd.x)\"\r\n [style.top.px]=\"Math.min(selectStart.y, selectEnd.y)\"\r\n [style.width.px]=\"Math.abs(selectEnd.x - selectStart.x)\"\r\n [style.height.px]=\"Math.abs(selectEnd.y - selectStart.y)\"\r\n ></div>\r\n\r\n <!-- lstStage -->\r\n @for (n of lstStage; track $index) {\r\n <!-- START NODE -->\r\n @if (n.StageType === \"_start_\") {\r\n <nz-card\r\n class=\"workflow-node workflow-node-start\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <nz-tag [nzColor]=\"'green'\"> START </nz-tag>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector RIGHT: output -->\r\n <div class=\"connector connector-right connector-start\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n } @else {\r\n <div\r\n class=\"connector connector-right connector-start reverse\"\r\n (click)=\"onClickConnector($event, n, 'right')\"\r\n ></div>\r\n }\r\n </nz-card>\r\n }\r\n <!-- END NODE -->\r\n @else if (n.StageType === \"_end_\") {\r\n <nz-card\r\n class=\"workflow-node workflow-node-end\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <nz-tag [nzColor]=\"'red'\"> END </nz-tag>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector LEFT: input -->\r\n <div class=\"connector connector-left connector-end\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n } @else {\r\n <div\r\n class=\"connector connector-left connector-end reverse\"\r\n (click)=\"onClickConnector($event, n, 'left')\"\r\n ></div>\r\n }\r\n </nz-card>\r\n } @else {\r\n <nz-card\r\n class=\"workflow-node\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <div class=\"title\">{{ n.Code }}</div>\r\n\r\n <div>{{ n.Name }}</div>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector RIGHT: output -->\r\n <div class=\"connector connector-right\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n\r\n <!-- connector LEFT: input -->\r\n <div class=\"connector connector-left\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n } @else {\r\n <div class=\"connector connector-right reverse\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n <div class=\"connector connector-left reverse\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n }\r\n </nz-card>\r\n }\r\n }\r\n\r\n <!-- POINTS -->\r\n @for (p of connectingPoints; track $index) {\r\n @if (p != draggingPoint) {\r\n <div\r\n class=\"waypoint\"\r\n [style.left.px]=\"p.x\"\r\n [style.top.px]=\"p.y\"\r\n (mousedown)=\"onmousedownPoint($event, p)\"\r\n (contextmenu)=\"onRightClickPoint($event, hoverAction!, $index)\"\r\n ></div>\r\n } @else {\r\n <div\r\n class=\"waypoint dragging\"\r\n [style.left.px]=\"p.x\"\r\n [style.top.px]=\"p.y\"\r\n (mousedown)=\"onmousedownPoint($event, p)\"\r\n ></div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n<!-- drawer TEMPLATE -->\r\n<nz-drawer\r\n [nzTitle]=\"drawTemplateTitle\"\r\n nzPlacement=\"right\"\r\n [nzWidth]=\"500\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"drawTemplateVisibel\"\r\n [nzFooter]=\"footerTplTemplate\"\r\n (nzOnClose)=\"drawTemplateVisibel = false\"\r\n>\r\n <ng-template #drawTemplateTitle> <nz-icon nzType=\"setting\"></nz-icon> Template </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <extend-select\r\n [label]=\"'Org'\"\r\n [lstItem]=\"lstOrg\"\r\n [valueField]=\"'App_Org_Id'\"\r\n [displayFields]=\"['Name', 'Code']\"\r\n [(_ngModel)]=\"template.App_Org_Id\"\r\n ></extend-select>\r\n <extend-input [label]=\"'Code'\" [(_ngModel)]=\"template.Code\"></extend-input>\r\n <extend-input [label]=\"'Name'\" [(_ngModel)]=\"template.Name\"></extend-input>\r\n <extend-select\r\n [label]=\"'Type'\"\r\n [lstItem]=\"template.lstTemplateType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.DocType\"\r\n ></extend-select>\r\n <extend-textarea [label]=\"'Desscription'\" [(_ngModel)]=\"template.Description\"></extend-textarea>\r\n <extend-select\r\n [label]=\"'Print template'\"\r\n [lstItem]=\"template.lstTemplatePrint\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.TemplatePrint\"\r\n ></extend-select>\r\n <extend-select\r\n [label]=\"'Apply to'\"\r\n [lstItem]=\"template.lstApplyTo\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.ApplyTo\"\r\n ></extend-select>\r\n\r\n <extend-checkbox [label]=\"'Active'\" [(_ngModel)]=\"template.IsActive\"></extend-checkbox>\r\n <extend-checkbox [label]=\"'Use Allow back'\" [(_ngModel)]=\"template.editorOption.AllowbackInUse\"></extend-checkbox>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Stage</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of getLstStage; track tag) {\r\n <div nz-col>\r\n <nz-tag (click)=\"hoverStage = tag\">\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Stage status</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstStageStatus; track tag) {\r\n <div nz-col>\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableStageStatus(tag) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleCloseStageStatus(tag)\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputStageStatusVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInputStageStatus()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action type\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputStageStatusElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Code\"\r\n [(ngModel)]=\"inputStageStatusCode\"\r\n (keydown.enter)=\"inputStageStatusNameElement.select()\"\r\n />\r\n <input\r\n #inputStageStatusNameElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Name\"\r\n [(ngModel)]=\"inputStageStatusName\"\r\n (blur)=\"handleInputStageStatusConfirm()\"\r\n (keydown.enter)=\"handleInputStageStatusConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Action type</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstActionType; track tag) {\r\n <div nz-col>\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableActionType(tag) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleCloseActionType(tag)\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputActionTypeVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInputActionType()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action type\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputActionTypeElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Code\"\r\n [(ngModel)]=\"inputActionTypeCode\"\r\n (keydown.enter)=\"inputActionTypeNameElement.select()\"\r\n />\r\n <input\r\n #inputActionTypeNameElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Name\"\r\n [(ngModel)]=\"inputActionTypeName\"\r\n (blur)=\"handleInputActionTypeConfirm()\"\r\n (keydown.enter)=\"handleInputActionTypeConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Action status</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstActionStatus; track tag) {\r\n <div nz-col>\r\n @if (template.editingActionStatus != tag) {\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableActionStatus(tag.Code) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleClose(tag.Code)\"\r\n (click)=\"template.editingActionStatus = checkRemoveableActionStatus(tag.Code) ? tag : undefined\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n } @else {\r\n <input\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n [appAutoFocus]=\"true\"\r\n [(ngModel)]=\"tag.Code\"\r\n (blur)=\"template.editingActionStatus = undefined\"\r\n (keydown.enter)=\"template.editingActionStatus = undefined\"\r\n /> \r\n }\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInput()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action status\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"+ New Action status\"\r\n [(ngModel)]=\"inputValue\"\r\n (blur)=\"handleInputConfirm()\"\r\n (keydown.enter)=\"handleInputConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #footerTplTemplate>\r\n <div nz-flex [nzGap]=\"6\" [nzJustify]=\"'end'\">\r\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button (click)=\"drawTemplateVisibel = false\">Close</button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- drawer STAGE -->\r\n<nz-drawer\r\n [nzTitle]=\"drawerTitleStage\"\r\n [nzPlacement]=\"selectedStage?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\r\n [nzVisible]=\"!!selectedStage\"\r\n [nzWidth]=\"'calc(50vw)'\"\r\n [nzClosable]=\"false\"\r\n [nzFooter]=\"footerTplNode\"\r\n (nzOnClose)=\"selectedStage = undefined\"\r\n>\r\n <ng-template #drawerTitleStage>\r\n <div nz-row nzJustify=\"space-between\">\r\n @if (selectedStage && selectedStage.editorOption) {\r\n @if (selectedStage.editorOption.drawerPosition == \"left\") {\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the right\"\r\n (click)=\"selectedStage.editorOption.drawerPosition = 'right'\"\r\n >\r\n <nz-icon nzType=\"double-right\"></nz-icon>\r\n </button>\r\n STAGE\r\n } @else {\r\n STAGE\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the left\"\r\n (click)=\"selectedStage.editorOption.drawerPosition = 'left'\"\r\n >\r\n <nz-icon nzType=\"double-left\"></nz-icon>\r\n </button>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <ng-container *ngIf=\"selectedStage\">\r\n <nz-radio-group [(ngModel)]=\"selectedStage.StageType\">\r\n <label nz-radio nzValue=\"_start_\">UI start</label>\r\n <label nz-radio nzValue=\"_end_\">UI end</label>\r\n <label nz-radio nzValue=\"start\">START</label>\r\n <label nz-radio nzValue=\"node\">NODE</label>\r\n <label nz-radio nzValue=\"end\">END</label>\r\n </nz-radio-group>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Code'\"\r\n [required]=\"true\"\r\n [(_ngModel)]=\"selectedStage.Code\"\r\n ></extend-input>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"16\"\r\n [label]=\"'Name'\"\r\n [required]=\"true\"\r\n [(_ngModel)]=\"selectedStage.Name\"\r\n ></extend-input>\r\n </div>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Sequence'\"\r\n [(_ngModel)]=\"selectedStage.SeqValue\"\r\n ></extend-input-number>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"16\"\r\n [label]=\"'Org implement'\"\r\n [lstItem]=\"lstOrg\"\r\n [valueField]=\"'App_Org_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedStage.App_Org_Id\"\r\n ></extend-select>\r\n </div>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Number of Days'\"\r\n [precision]=\"1\"\r\n [(_ngModel)]=\"selectedStage.NumberDay\"\r\n ></extend-input-number>\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Number of Person'\"\r\n [precision]=\"1\"\r\n [(_ngModel)]=\"selectedStage.NumberPerson\"\r\n ></extend-input-number>\r\n </div>\r\n\r\n @if (selectedStage.editorOption) {\r\n @if ([\"start\", \"node\", \"end\"].includes(selectedStage.StageType.toLowerCase())) {\r\n <extend-checkbox\r\n [label]=\"'Reverse'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedStage.editorOption.isReverse\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <extend-checkbox\r\n [label]=\"'Require user action'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedStage.IsRequireUser\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"16\">\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> List Action</h3>\r\n <div nz-col>\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"addAction()\">\r\n <nz-icon nzType=\"plus\"></nz-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <nz-table nzSize=\"small\" [nzData]=\"lstActionOfCurrentStage\" [nzShowPagination]=\"false\" [nzNoResult]=\"' '\">\r\n <thead>\r\n <tr [hidden]=\"true\">\r\n <th nzWidth=\"40px\"></th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (action of lstActionOfCurrentStage; track $index) {\r\n <tr (click)=\"onclickaction(action)\">\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-left': action == hoverAction ? 'solid 4px orange' : '',\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n ({{ $index + 1 }})\r\n <nz-icon\r\n nzType=\"delete\"\r\n nzTheme=\"outline\"\r\n class=\"color-warn cursor-pointer icon-size-16\"\r\n (click)=\"$event.stopPropagation(); deleteAction(action)\"\r\n ></nz-icon>\r\n </td>\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\" class=\"has-floating-label floating-label\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"z-index: 2\">\r\n <label>Action status</label>\r\n </nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"action.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(action.ActionStatus)\"\r\n (blur)=\"onenterAotu(action.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"action.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(action)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"action.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"action.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(action)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.To_StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"action.DocProcessStatus\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Role</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstRole\"\r\n [valueField]=\"'App_Role_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstRoleId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>User</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstUser\"\r\n [valueField]=\"'App_User_Id'\"\r\n [displayFields]=\"['UserName', 'FullName']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstUserId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Email action</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailAction\"\r\n [valueField]=\"'ID'\"\r\n [displayField]=\"'Name'\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstEmailActionId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>Email template</div>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>\r\n <div nz-col nzSpan=\"1\"></div>\r\n <div nz-col nzSpan=\"23\" class=\"form-item-no-bottom\" style=\"font-weight: normal\">\r\n @for (actionRef of lstActionRefOf(action); track $index) {\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [labelSpan]=\"12\"\r\n [size]=\"'small'\"\r\n [label]=\"emailActionText(actionRef.To_WF_TemplateStageAction_Id)\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"actionRef.TemplateMail\"\r\n ></extend-select>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"8\">\r\n Action rule\r\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"actionRuleModalVisible = true\">\r\n <nz-icon nzType=\"export\" nzTheme=\"outline\" class=\"color-primary\" />\r\n </button>\r\n <button\r\n *ngIf=\"action.WF_TransitionRule_Id\"\r\n nz-button\r\n nzType=\"text\"\r\n nzSize=\"small\"\r\n (click)=\"deleteActionRule(action)\"\r\n >\r\n <nz-icon nzType=\"delete\" nzTheme=\"outline\" class=\"color-warn\" />\r\n </button>\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row nzJustify=\"end\">\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"addAction()\">\r\n <nz-icon nzType=\"plus\"></nz-icon>Add Action\r\n </button>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #footerTplNode>\r\n <div\r\n nz-flex\r\n [nzGap]=\"6\"\r\n [nzJustify]=\"\r\n selectedStage && selectedStage.editorOption && selectedStage.editorOption.drawerPosition == 'left'\r\n ? 'start'\r\n : 'end'\r\n \"\r\n >\r\n <button nz-button nzDanger nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button (click)=\"selectedStage = undefined\">Close</button>\r\n <button\r\n *ngIf=\"selectedStage && ['START', 'END'].indexOf(selectedStage.StageType) < 0\"\r\n nz-button\r\n nzDanger\r\n (click)=\"deleteStage()\"\r\n >\r\n Delete\r\n </button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- drawer ACTION -->\r\n<nz-drawer\r\n [nzTitle]=\"drawerTitleAction\"\r\n nzTitle=\"ACTION\"\r\n [nzPlacement]=\"selectedAction?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\r\n [nzClosable]=\"false\"\r\n [nzWidth]=\"750\"\r\n [nzVisible]=\"!!selectedAction\"\r\n [nzFooter]=\"footerTplAction\"\r\n (nzOnClose)=\"selectedAction = undefined\"\r\n>\r\n <ng-template #drawerTitleAction>\r\n <div nz-row nzJustify=\"space-between\">\r\n @if (selectedAction && selectedAction.editorOption) {\r\n @if (selectedAction.editorOption.drawerPosition == \"left\") {\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the right\"\r\n (click)=\"selectedAction.editorOption.drawerPosition = 'right'\"\r\n >\r\n <nz-icon nzType=\"double-right\"></nz-icon>\r\n </button>\r\n ACTION\r\n } @else {\r\n ACTION\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the left\"\r\n (click)=\"selectedAction.editorOption.drawerPosition = 'left'\"\r\n >\r\n <nz-icon nzType=\"double-left\"></nz-icon>\r\n </button>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <ng-container *ngIf=\"selectedAction\">\r\n <div>\r\n <strong\r\n >{{ selectedAction.getFromStageCode(lstStage) }} -> {{ selectedAction.getToStageCode(lstStage) }}</strong\r\n >\r\n </div>\r\n <div>{{ selectedAction.getFromStageName(lstStage) }} -> {{ selectedAction.getToStageName(lstStage) }}</div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\" class=\"has-floating-label floating-label\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"z-index: 2\">\r\n <label>Action status</label>\r\n </nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"selectedAction.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(selectedAction.ActionStatus)\"\r\n (blur)=\"onenterAotu(selectedAction.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"selectedAction.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(selectedAction)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"selectedAction.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedAction.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedAction.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(selectedAction)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedAction.To_StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"selectedAction.DocProcessStatus\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Role</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstRole\"\r\n [valueField]=\"'App_Role_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstRoleId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>User</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstUser\"\r\n [valueField]=\"'App_User_Id'\"\r\n [displayFields]=\"['UserName', 'FullName']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstUserId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Email action</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailAction\"\r\n [valueField]=\"'ID'\"\r\n [displayField]=\"'Name'\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstEmailActionId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div *ngIf=\"selectedAction._lstEmailActionId && selectedAction._lstEmailActionId.length\" nz-row>\r\n Email template\r\n </div>\r\n <div *ngIf=\"selectedAction._lstEmailActionId && selectedAction._lstEmailActionId.length\" nz-row>\r\n <div nz-col nzSpan=\"1\"></div>\r\n <div nz-col nzSpan=\"23\" class=\"form-item-no-bottom\" style=\"font-weight: normal\">\r\n @for (actionRef of lstActionRefOf(selectedAction); track $index) {\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [labelSpan]=\"12\"\r\n [size]=\"'small'\"\r\n [label]=\"emailActionText(actionRef.To_WF_TemplateStageAction_Id)\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"actionRef.TemplateMail\"\r\n ></extend-select>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"8\">\r\n Action rule\r\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"actionRuleModalVisible = true\">\r\n <nz-icon nzType=\"export\" nzTheme=\"outline\" class=\"color-primary\" />\r\n </button>\r\n <button\r\n *ngIf=\"selectedAction.WF_TransitionRule_Id\"\r\n nz-button\r\n nzType=\"text\"\r\n nzSize=\"small\"\r\n (click)=\"deleteActionRule(selectedAction)\"\r\n >\r\n <nz-icon nzType=\"delete\" nzTheme=\"outline\" class=\"color-warn\" />\r\n </button>\r\n </div>\r\n\r\n <!-- <box [height]=\"16\"></box> -->\r\n <nz-divider></nz-divider>\r\n\r\n @if (template.editorOption.AllowbackInUse) {\r\n <extend-checkbox\r\n [label]=\"'Allow back'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedAction.allowBack\"\r\n (_ngModelChange)=\"onchangeAllowBack(selectedAction)\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n @if (selectedAction.allowBack) {\r\n <div>\r\n <strong\r\n >{{ selectedAction.getToStageCode(lstStage) }} -> {{ selectedAction.getFromStageCode(lstStage) }}</strong\r\n >\r\n </div>\r\n <div>{{ selectedAction.getToStageName(lstStage) }} -> {{ selectedAction.getFromStageName(lstStage) }}</div>\r\n\r\n @if (selectedBackAction) {\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"height: 32px\">Action status</nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"selectedBackAction.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(selectedBackAction.ActionStatus)\"\r\n (blur)=\"onenterAotu(selectedBackAction.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"selectedBackAction.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(selectedBackAction)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"selectedBackAction.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedBackAction.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"lstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedBackAction.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(selectedBackAction)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedBackAction.To_StageStatus\"\r\n ></extend-select>\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #footerTplAction>\r\n <div\r\n nz-flex\r\n [nzGap]=\"6\"\r\n [nzJustify]=\"selectedAction && selectedAction.editorOption.drawerPosition == 'left' ? 'start' : 'end'\"\r\n >\r\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button nzDanger (click)=\"deleteAction(selectedAction!)\">Delete</button>\r\n <button nz-button (click)=\"selectedAction = undefined\">Close</button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- setting editor -->\r\n<nz-drawer\r\n [nzTitle]=\"drawSettingTitle\"\r\n nzPlacement=\"right\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"settingVisible\"\r\n (nzOnClose)=\"settingVisible = false\"\r\n>\r\n <ng-template #drawSettingTitle> <nz-icon nzType=\"setting\"></nz-icon> Editor </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <div class=\"form-item-no-bottom\">\r\n <extend-checkbox [label]=\"'Show grid'\" [labelSpan]=\"0\" [(_ngModel)]=\"wfcSetting.ShowGrid\"></extend-checkbox>\r\n\r\n <box [height]=\"16\"></box>\r\n </div>\r\n </ng-container>\r\n</nz-drawer>\r\n\r\n<!-- editor infomation -->\r\n<nz-drawer\r\n [nzTitle]=\"drawInfoTitle\"\r\n nzPlacement=\"right\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"infoVisible\"\r\n (nzOnClose)=\"infoVisible = false\"\r\n>\r\n <ng-template #drawInfoTitle> <nz-icon nzType=\"info-circle\"></nz-icon> Infomation </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <p>1. C\u00E1c th\u00E0nh ph\u1EA7n: Stage or Node (stag, node quy tr\u00ECnh), Action or Connector (\u0111\u01B0\u1EDDng n\u1ED1i gi\u1EEFa c\u00E1c stage)</p>\r\n <p>2. Save \u0111\u1EC3 load c\u00E1c th\u00F4ng tin: Stage status, Action type</p>\r\n <p>\r\n 3. N\u1ED1i 2 node (t\u1EA1o connector t\u01B0\u01A1ng \u0111\u01B0\u01A1ng t\u1EA1o action):\r\n <br />- Click ch\u1EA5m cam t\u1EEB Node ngu\u1ED3n \u0111\u1EBFn ch\u1EA5m xanh c\u1EE7a Node \u0111\u00EDch (ho\u1EB7c click v\u00E0o Node \u0111\u00EDch), c\u00F3 th\u1EC3 click th\u00E0nh\r\n nhi\u1EC1u \u0111i\u1EC3m \u0111\u1EC3 t\u1EA1o \u0111\u01B0\u1EDDng n\u1ED1i cong<br />- Khi hover connector chuy\u1EC3n sang m\u1EA7u \u0111\u1ECF c\u00F3 th\u1EC3 click \u0111\u00FAp \u0111\u1EC3 th\u00EAm m\u1ED9t \u0111i\u1EC3m\r\n c\u1EE7a connector<br />- Khi hover l\u00EAn \u0111i\u1EC3m c\u1EE7a connector c\u00F3 th\u1EC3 di chuy\u1EC3n \u0111i\u1EC3m \u0111\u00F3 b\u1EB1ng c\u00E1ch nh\u1EA5n gi\u1EEF chu\u1ED9t v\u00E0 k\u00E9o th\u1EA3\r\n \u0111\u1EBFn v\u1ECB tr\u00ED m\u1EDBi<br />- Chu\u1ED9t ph\u1EA3i v\u00E0o \u0111i\u1EC3m n\u1ED1i connector \u0111\u1EC3 xo\u00E1 \u0111i\u1EC3m \u0111\u00F3\r\n </p>\r\n </ng-container>\r\n</nz-drawer>\r\n\r\n<!-- action rule modal -->\r\n<nz-modal\r\n [(nzVisible)]=\"actionRuleModalVisible\"\r\n [nzMaskClosable]=\"false\"\r\n [nzClosable]=\"false\"\r\n [nzKeyboard]=\"true\"\r\n [nzWidth]=\"'90vw'\"\r\n>\r\n <ng-container *nzModalTitle>\r\n ACTION RULE: [{{ selectedStage?.Code }}] {{ selectedStage?.Name }} > [{{ hoverAction?.ActionStatus }}]\r\n {{ hoverAction?.ActionText }}\r\n </ng-container>\r\n <ng-container *nzModalContent>\r\n @if (hoverAction && hoverAction.actionRule) {\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Code'\" [(_ngModel)]=\"hoverAction.actionRule.Code\"></extend-input>\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Name'\" [(_ngModel)]=\"hoverAction.actionRule.Name\"></extend-input>\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Note'\" [(_ngModel)]=\"hoverAction.actionRule.Note\"></extend-input>\r\n <extend-checkbox\r\n nz-col\r\n nzSpan=\"12\"\r\n [label]=\"'IsActive'\"\r\n [(_ngModel)]=\"hoverAction.actionRule.IsActive\"\r\n ></extend-checkbox>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"16\">\r\n <div nz-col nzSpan=\"24\">\r\n <nz-table nzSize=\"small\" [nzData]=\"hoverAction.actionRule.lstLine\" [nzShowPagination]=\"false\">\r\n <thead>\r\n <tr>\r\n <th [nzWidth]=\"'40px'\"><icon-add (click)=\"addActionRuleLine()\"></icon-add></th>\r\n <th [nzWidth]=\"'150px'\">\r\n Rule type\r\n <icon-info\r\n [tooltip]=\"'DomainCode: WF_RuleType (change-action-parent, change-action-child, execute-store )'\"\r\n ></icon-info>\r\n </th>\r\n <th>Template</th>\r\n <th>Template stage</th>\r\n <th>Template action</th>\r\n <th>Store to exec</th>\r\n <th>Email template</th>\r\n <th>Email to</th>\r\n <th [nzWidth]=\"'50px'\">Active</th>\r\n <th>Action</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (item of hoverAction.actionRule.lstLine; track $index) {\r\n <tr>\r\n <td><icon-delete (click)=\"deleteActionRuleLine(hoverAction.actionRule, item)\"></icon-delete></td>\r\n <td>\r\n <dic-domain-select\r\n [size]=\"'small'\"\r\n [DomainCode]=\"'WF_RuleType'\"\r\n [(_ngModel)]=\"item.RuleType\"\r\n ></dic-domain-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n #xxx\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstTemplateForRule(item)\"\r\n [valueField]=\"'WF_Template_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_Template_Id\"\r\n (_ngModelChange)=\"item.WF_TemplateStage_Id = 0; item.WF_TemplateStageAction_Id = 0\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n #yyy\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstStageForRule(xxx._ngModel)\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"item.WF_TemplateStageAction_Id = 0\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstActionForRule(yyy._ngModel)\"\r\n [valueField]=\"'WF_TemplateStageAction_Id'\"\r\n [displayFields]=\"['ActionStatus', 'ActionText']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_TemplateStageAction_Id\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-input [size]=\"'small'\" [(_ngModel)]=\"item.StoreToExec\"></extend-input>\r\n </td>\r\n <td>\r\n <extend-select\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'App_MailTemplate_Id'\"\r\n [displayField]=\"'Code'\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.App_MailTemplate_Id\"\r\n ></extend-select>\r\n </td>\r\n <td class=\"form-item-no-bottom\">\r\n <extend-textarea [size]=\"'small'\" [minRows]=\"1\" [(_ngModel)]=\"item.EmailTo\"></extend-textarea>\r\n </td>\r\n <td class=\"text-center form-item-no-bottom\">\r\n <extend-checkbox [(_ngModel)]=\"item.IsActive\"></extend-checkbox>\r\n </td>\r\n <td>\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"checkAction(item)\">Check</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n </div>\r\n </div>\r\n }\r\n </ng-container>\r\n <ng-container *nzModalFooter>\r\n <button nz-button nzType=\"primary\" (click)=\"checkAllAction()\">OK</button>\r\n </ng-container>\r\n</nz-modal>\r\n", styles: ["@charset \"UTF-8\";::ng-deep .workflow-wrapper{border:solid 1px lightgray;overflow:hidden;width:100%}.workflow-canvas{position:relative;background:#f0f2f5;cursor:default;overflow:hidden;outline:1px dashed rgba(0,0,0,.1)}.workflow-canvas .edges-layer{position:absolute;inset:0;width:100%;height:100%;z-index:1}.workflow-canvas .edges-layer path{stroke-width:2;fill:none}.canvas-content{transform-origin:0 0;width:100%;height:100%;transition:transform .05s linear}.canvas-content{outline:1px dashed red}.canvas-content.panning{cursor:grab}.canvas-content.panning:active{cursor:grabbing}.workflow-canvas.panning{cursor:grab}.workflow-canvas.panning:active{cursor:grabbing}.workflow-canvas.connecting,.workflow-canvas.connecting .workflow-node{cursor:crosshair}.workflow-node{position:absolute;width:160px;cursor:grab;-webkit-user-select:none;user-select:none;z-index:2}.workflow-node:active{cursor:grabbing}.workflow-node.connecting-source,.workflow-node.selected,.workflow-node:hover:not(.workflow-node-start,.workflow-node-end){outline:2px dashed #1890ff}.workflow-node .title{font-weight:600;margin-bottom:6px}.workflow-node-start{width:0px}.workflow-node-start.connecting-source,.workflow-node-start.selected,.workflow-node-start:hover{outline:unset}.workflow-node-start.connecting-source nz-tag,.workflow-node-start.selected nz-tag,.workflow-node-start:hover nz-tag{outline:2px dashed}.workflow-node-start nz-tag{position:relative;top:45px;right:35px}.workflow-node-end{width:0px}.workflow-node-end.connecting-source,.workflow-node-end.selected,.workflow-node-end:hover{outline:unset}.workflow-node-end.connecting-source nz-tag,.workflow-node-end.selected nz-tag,.workflow-node-end:hover nz-tag{outline:2px dashed}.workflow-node-end nz-tag{position:relative;top:45px;right:32px}.connector{position:absolute;top:39px;width:12px;height:12px;background:#1890ff;border-radius:50%;transform:translateY(-50%);cursor:crosshair;transition:box-shadow .15s ease-out,transform .15s ease-out}.connector:hover{box-shadow:0 0 0 3px #1890ff4d;transform:translateY(-50%) scale(1.15)}.connector-right{right:-8px;background:orange}.connector-right.reverse,.connector-left{left:-8px}.connector-left.reverse{left:unset;right:-8px}.connector-start{width:16px;height:16px;right:-8px;background:green;box-shadow:0 0 0 3px #1890ff4d}.connector-end{width:16px;height:16px;left:-8px;background:#000;box-shadow:0 0 0 3px #1890ff4d}.edge{cursor:pointer;stroke:#1890ff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2;fill:none;transition:stroke .15s ease}.edge-hit{stroke:transparent;stroke-width:18px!important;fill:none;cursor:pointer}.edge-hit:hover+.edge{stroke:#ff4d4f;stroke-width:2}.workflow-canvas.dragging-point .edge-hit{pointer-events:none}.edge:hover+.edge-label{fill:#1890ff;font-weight:500}.edge-label{font-size:12px;fill:#555;pointer-events:none;-webkit-user-select:none;user-select:none}.blue{stroke:#1890ff!important}.red{stroke:#ff4d4f!important;box-shadow:0 0 0 3px #1890ff4d!important}.workflow-svg{background:transparent;overflow:visible}.waypoint{position:absolute;width:10px;height:10px;background:#ff4d4f;border-radius:50%;transform:translate(-50%,-50%) scale(1);cursor:move;z-index:1;transition:transform .12s ease-out,background-color .12s ease-out,box-shadow .12s ease-out}.waypoint:hover{background:#ff7875;transform:translate(-50%,-50%) scale(1.25);box-shadow:0 0 0 4px #ff787559}.waypoint.dragging{transition:none;transform:translate(-50%,-50%) scale(1.15);pointer-events:none}.workflow-canvas.dragging-point svg{cursor:grabbing}.selection-box{position:absolute;border:1px dashed #1890ff;background:#1890ff1a;pointer-events:none}.toolbar{position:absolute;top:8px;left:8px;display:flex;gap:4px;padding:6px;background:#fff;border-radius:6px;box-shadow:0 2px 8px #00000026;z-index:100}.toolbar .divider{width:1px;background:#e5e5e5;margin:0 2px}nz-tag.selected{outline:2px dashed #1890ff}.grid-layer{position:absolute;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(rgba(0,0,0,.08) 1px,transparent 1px);background-size:20px 20px}.grid-layer{background-image:linear-gradient(to right,rgba(0,0,0,.06) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.06) 1px,transparent 1px);background-size:20px 20px}.editable-tag{background:#fff;border-style:dashed}::ng-deep .minimap{position:absolute;width:180px;height:125px;top:0;right:0;background-color:#eee;border:1px solid #aaa;opacity:.9;z-index:1}::ng-deep .minimap{position:absolute;width:200px;height:140px;top:8px;right:8px;background-color:#f8f9fa;border:1px solid #d9d9d9;border-radius:8px;box-shadow:0 4px 12px #0000001a;overflow:hidden;z-index:100;-webkit-user-select:none;user-select:none}::ng-deep .minimap-node{position:absolute;background-color:#bfbfbf;border-radius:2px}::ng-deep .minimap-node-round{position:absolute;background-color:#bfbfbf;border-radius:50%}::ng-deep .minimap-node-round-start{background-color:#52c41a}::ng-deep .minimap-node-round-end{background-color:#ff4d4f}::ng-deep .minimap-viewport{position:absolute;box-sizing:border-box;background-color:#1890ff26;border:1.5px solid #1890ff;border-radius:4px;z-index:2;cursor:grab;transition:none}::ng-deep .minimap-viewport.grabbing,::ng-deep .minimap-viewport:active{cursor:grabbing;background-color:#1890ff40}::ng-deep .has-floating-label.floating-label{position:relative;padding-top:14px}::ng-deep .has-floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:13px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .has-floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .has-floating-label .full-width{width:100%}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}\n"] }]
|
|
13543
|
+
], selector: 'app-workflow-editor', template: "<div\r\n #canvas\r\n class=\"workflow-canvas\"\r\n [class.connecting]=\"!!connectingFrom\"\r\n [class.dragging-point]=\"!!draggingPoint\"\r\n style=\"width: 100%; height: 100%\"\r\n (mousedown)=\"onMouseDownCanvas($event)\"\r\n (mousemove)=\"onMouseMoveCanvas($event)\"\r\n (mouseup)=\"onMouseUpCanvas($event)\"\r\n (click)=\"onClickCanvas($event)\"\r\n (wheel)=\"onWheelCanvas($event)\"\r\n>\r\n <!-- \r\n\r\n [style.width.px]=\"getCanvasWidth()\"\r\n [style.height.px]=\"getCanvasHeight()\" \r\n\r\n [style.width.px]=\"CANVAS_WIDTH\"\r\n [style.height.px]=\"CANVAS_HEIGHT\"\r\n\r\n style=\"width: 100%; height: calc(100vh - 120px)\"\r\n \r\n -->\r\n\r\n <div class=\"toolbar\" (mousedown)=\"$event.stopPropagation()\" (click)=\"$event.stopPropagation()\">\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Editor setting\" (click)=\"settingVisible = true\">\r\n <nz-icon nzType=\"setting\"></nz-icon>\r\n </button>\r\n\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Infomation\" (click)=\"infoVisible = true\">\r\n <nz-icon nzType=\"info-circle\"></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Template setting\" (click)=\"drawTemplateVisibel = true\">\r\n <nz-icon nzType=\"setting\"></nz-icon> T\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nzDanger [nzLoading]=\"!ready\" nz-tooltip=\"Save (Ctrl + S)\" (click)=\"save()\">\r\n <nz-icon nzType=\"save\"></nz-icon>\r\n </button>\r\n <button nz-button nzSize=\"small\" [nzLoading]=\"!ready\" nz-tooltip=\"Reload\" (click)=\"getdata.emit()\">\r\n <nz-icon nzType=\"reload\" class=\"color-primary\"></nz-icon>\r\n </button>\r\n <button nz-button nzSize=\"small\" nz-tooltip=\"Add stage\" (click)=\"addStage()\">\r\n <nz-icon nzType=\"plus\" class=\"color-primary\"></nz-icon>\r\n </button>\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"Add template action\"\r\n class=\"color-primary\"\r\n (click)=\"drawTemplateActionVisibel = true\"\r\n >\r\n A\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n [nzType]=\"isMoveMode ? 'primary' : 'default'\"\r\n nz-tooltip=\"Move mode\"\r\n (click)=\"isMoveMode = true\"\r\n >\r\n <nz-icon><img src=\"/assets/icon/hand-palm.png\" width=\"19\" height=\"19\" /></nz-icon>\r\n </button>\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n [nzType]=\"!isMoveMode ? 'primary' : 'default'\"\r\n nz-tooltip=\"Select mode\"\r\n (click)=\"isMoveMode = false\"\r\n >\r\n <nz-icon><img src=\"/assets/icon/cursor.png\" width=\"19\" height=\"19\" /></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <!-- UNDO / REDO -->\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nzType=\"default\"\r\n [disabled]=\"undoStack.length === 0\"\r\n nz-tooltip=\"Undo\"\r\n (click)=\"undo()\"\r\n >\r\n <nz-icon nzType=\"undo\"></nz-icon>\r\n </button>\r\n\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nzType=\"default\"\r\n [disabled]=\"redoStack.length === 0\"\r\n nz-tooltip=\"Redo\"\r\n (click)=\"redo()\"\r\n >\r\n <nz-icon nzType=\"redo\"></nz-icon>\r\n </button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <!-- ALIGN -->\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignLeft()\">\u27F8</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignCenter()\">\u2261</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignRight()\">\u27F9</button>\r\n\r\n <span class=\"divider\"></span>\r\n\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignTop()\">\u21D1</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignMiddle()\">\u2550</button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 2\" (click)=\"alignBottom()\">\u21D3</button>\r\n\r\n <span class=\"divider\"></span>\r\n\r\n <!-- DISTRIBUTE -->\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 3\" (click)=\"distributeHorizontal()\">\r\n \u21C4\r\n </button>\r\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedStageId.size < 3\" (click)=\"distributeVertical()\">\u21C5</button>\r\n\r\n <box [width]=\"1\"></box>\r\n <span class=\"divider\"></span>\r\n <box [width]=\"1\"></box>\r\n\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomOut()\" nz-tooltip=\"Zoom Out\">\r\n <nz-icon nzType=\"minus\"></nz-icon>\r\n </button>\r\n <span>{{ Math.round(zoom * 100) }}%</span>\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomIn()\" nz-tooltip=\"Zoom In\">\r\n <nz-icon nzType=\"plus\"></nz-icon>\r\n </button>\r\n <span class=\"divider\"></span>\r\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"resetZoom()\" nz-tooltip=\"Reset Zoom (Ctrl+0)\">\r\n <nz-icon nzType=\"expand\"></nz-icon>\r\n </button>\r\n </div>\r\n\r\n <div\r\n class=\"canvas-content\"\r\n [class.panning]=\"isMoveMode\"\r\n [style.width.px]=\"getCanvasWidth()\"\r\n [style.height.px]=\"getCanvasHeight()\"\r\n [style.transform]=\"\r\n 'translate(' + template.editorOption.panX + 'px,' + template.editorOption.panY + 'px) scale(' + zoom + ')'\r\n \"\r\n >\r\n <!-- GRID -->\r\n <div *ngIf=\"wfcSetting.ShowGrid\" class=\"grid-layer\"></div>\r\n\r\n <!-- SVG EDGES -->\r\n <svg #svg class=\"edges-layer\" width=\"100%\" height=\"100%\" preserveAspectRatio=\"none\">\r\n <g>\r\n <!-- DEFS -->\r\n <defs>\r\n <!-- glow effect -->\r\n <filter id=\"edge-glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\r\n <feGaussianBlur stdDeviation=\"2\" result=\"blur\" />\r\n <feMerge>\r\n <feMergeNode in=\"blur\" />\r\n <feMergeNode in=\"SourceGraphic\" />\r\n </feMerge>\r\n </filter>\r\n\r\n <!-- arrow markers -->\r\n <marker\r\n id=\"arrow-blue\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n refX=\"10\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"blue\" d=\"M0,0 L10,5 L0,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-red\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n refX=\"10\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"red\" d=\"M0,0 L10,5 L0,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-blue-start\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n viewBox=\"0 0 10 10\"\r\n refX=\"0\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"blue\" d=\"M10,0 L0,5 L10,10\"></path>\r\n </marker>\r\n\r\n <marker\r\n id=\"arrow-red-start\"\r\n markerWidth=\"10\"\r\n markerHeight=\"10\"\r\n viewBox=\"0 0 10 10\"\r\n refX=\"0\"\r\n refY=\"5\"\r\n orient=\"auto\"\r\n markerUnits=\"strokeWidth\"\r\n >\r\n <path class=\"red\" d=\"M10,0 L0,5 L10,10\"></path>\r\n </marker>\r\n </defs>\r\n\r\n <!-- EDGES B\u00CCNH TH\u01AF\u1EDCNG -->\r\n <ng-container *ngFor=\"let e of normalEdges; let i = index\">\r\n <path\r\n class=\"edge\"\r\n [attr.id]=\"'edge-path-' + i\"\r\n [attr.d]=\"buildPath(e)\"\r\n marker-end=\"url(#arrow-blue)\"\r\n [attr.marker-start]=\"e.allowBack ? 'url(#arrow-blue-start)' : ''\"\r\n ></path>\r\n\r\n <path\r\n class=\"edge-hit\"\r\n [attr.d]=\"buildPath(e)\"\r\n (mouseenter)=\"onMouseEnterEdge(e)\"\r\n (mouseleave)=\"onMouseLeaveEdge(e)\"\r\n (click)=\"onClickEdge(e, $event)\"\r\n ></path>\r\n\r\n <!-- LABEL -->\r\n <!-- text b\u00E1m theo line -->\r\n <!-- \r\n <text *ngIf=\"e.ActionText\" class=\"edge-label\" dy=\"-6\">\r\n <textPath [attr.href]=\"'#edge-path-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.ActionText }}\r\n </textPath>\r\n </text> \r\n \r\n <text *ngIf=\"e.allowBack && e.labelBack\" class=\"edge-label\" dy=\"14\">\r\n <textPath [attr.href]=\"'#edge-path-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.labelBack }}\r\n </textPath>\r\n </text>\r\n -->\r\n\r\n <!-- text th\u1EB3ng n\u1EB1m ngang -->\r\n <text\r\n *ngIf=\"e.ActionText\"\r\n class=\"edge-label\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.ActionText }}\r\n </text>\r\n\r\n <text\r\n *ngIf=\"e.allowBack && e.labelBack\"\r\n class=\"edge-label\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y + 14\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.labelBack }}\r\n </text>\r\n </ng-container>\r\n\r\n <!-- EDGE \u0110ANG HOVER (LU\u00D4N TR\u00CAN C\u00D9NG) -->\r\n <ng-container *ngFor=\"let e of hoverEdges; let i = index\">\r\n <path\r\n class=\"edge red\"\r\n [attr.id]=\"'edge-path-hover-' + i\"\r\n [attr.d]=\"buildPath(e)\"\r\n marker-end=\"url(#arrow-red)\"\r\n [attr.marker-start]=\"e.allowBack ? 'url(#arrow-red-start)' : ''\"\r\n ></path>\r\n\r\n <path\r\n class=\"edge-hit\"\r\n [attr.d]=\"buildPath(e)\"\r\n (mouseleave)=\"onMouseLeaveEdge(e)\"\r\n (click)=\"onClickEdge(e, $event)\"\r\n ></path>\r\n\r\n <!-- LABEL -->\r\n <!-- <text *ngIf=\"e.ActionText\" class=\"edge-label\" dy=\"-6\">\r\n <textPath [attr.href]=\"'#edge-path-hover-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.ActionText }}\r\n </textPath>\r\n </text>\r\n\r\n <text *ngIf=\"e.allowBack && e.labelBack\" class=\"edge-label\" dy=\"14\">\r\n <textPath [attr.href]=\"'#edge-path-hover-' + i\" startOffset=\"50%\" text-anchor=\"middle\">\r\n {{ e.labelBack }}\r\n </textPath>\r\n </text> -->\r\n\r\n <text\r\n *ngIf=\"e.ActionText\"\r\n class=\"edge-label\"\r\n style=\"font-weight: bold\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.ActionText }}\r\n </text>\r\n\r\n <text\r\n *ngIf=\"e.allowBack && e.labelBack\"\r\n class=\"edge-label\"\r\n style=\"font-weight: bold\"\r\n [attr.x]=\"getEdgeLabelPosition(e).x\"\r\n [attr.y]=\"getEdgeLabelPosition(e).y + 14\"\r\n [attr.text-anchor]=\"'middle'\"\r\n >\r\n {{ e.labelBack }}\r\n </text>\r\n </ng-container>\r\n\r\n <!-- preview -->\r\n <path\r\n *ngIf=\"connectingFrom\"\r\n class=\"edge\"\r\n [attr.d]=\"buildPreviewPath()\"\r\n stroke-dasharray=\"5,5\"\r\n marker-end=\"url(#arrow-blue)\"\r\n ></path>\r\n </g>\r\n </svg>\r\n\r\n <div\r\n *ngIf=\"isSelecting && selectStart && selectEnd\"\r\n class=\"selection-box\"\r\n [style.left.px]=\"Math.min(selectStart.x, selectEnd.x)\"\r\n [style.top.px]=\"Math.min(selectStart.y, selectEnd.y)\"\r\n [style.width.px]=\"Math.abs(selectEnd.x - selectStart.x)\"\r\n [style.height.px]=\"Math.abs(selectEnd.y - selectStart.y)\"\r\n ></div>\r\n\r\n <!-- lstStage -->\r\n @for (n of lstStage; track $index) {\r\n <!-- START NODE -->\r\n @if (n.StageType === \"_start_\") {\r\n <nz-card\r\n class=\"workflow-node workflow-node-start\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <nz-tag [nzColor]=\"'green'\"> START </nz-tag>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector RIGHT: output -->\r\n <div class=\"connector connector-right connector-start\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n } @else {\r\n <div\r\n class=\"connector connector-right connector-start reverse\"\r\n (click)=\"onClickConnector($event, n, 'right')\"\r\n ></div>\r\n }\r\n </nz-card>\r\n }\r\n <!-- END NODE -->\r\n @else if (n.StageType === \"_end_\") {\r\n <nz-card\r\n class=\"workflow-node workflow-node-end\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <nz-tag [nzColor]=\"'red'\"> END </nz-tag>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector LEFT: input -->\r\n <div class=\"connector connector-left connector-end\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n } @else {\r\n <div\r\n class=\"connector connector-left connector-end reverse\"\r\n (click)=\"onClickConnector($event, n, 'left')\"\r\n ></div>\r\n }\r\n </nz-card>\r\n } @else {\r\n <nz-card\r\n class=\"workflow-node\"\r\n [attr.data-id]=\"n.Code\"\r\n [class.selected]=\"n == selectedStage || n == hoverStage || lstSelectedStageId.has(n.WF_TemplateStage_Id)\"\r\n [style.left.px]=\"n.editorOption.x\"\r\n [style.top.px]=\"n.editorOption.y\"\r\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\r\n nzSize=\"small\"\r\n (mousedown)=\"onMouseDownNode($event, n)\"\r\n (click)=\"$event.stopPropagation(); onClickStage(n)\"\r\n >\r\n <div class=\"title\">{{ n.Code }}</div>\r\n\r\n <div>{{ n.Name }}</div>\r\n\r\n @if (!n.editorOption.isReverse) {\r\n <!-- connector RIGHT: output -->\r\n <div class=\"connector connector-right\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n\r\n <!-- connector LEFT: input -->\r\n <div class=\"connector connector-left\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n } @else {\r\n <div class=\"connector connector-right reverse\" (click)=\"onClickConnector($event, n, 'right')\"></div>\r\n <div class=\"connector connector-left reverse\" (click)=\"onClickConnector($event, n, 'left')\"></div>\r\n }\r\n </nz-card>\r\n }\r\n }\r\n\r\n <!-- POINTS -->\r\n @for (p of connectingPoints; track $index) {\r\n @if (p != draggingPoint) {\r\n <div\r\n class=\"waypoint\"\r\n [style.left.px]=\"p.x\"\r\n [style.top.px]=\"p.y\"\r\n (mousedown)=\"onmousedownPoint($event, p)\"\r\n (contextmenu)=\"onRightClickPoint($event, hoverAction!, $index)\"\r\n ></div>\r\n } @else {\r\n <div\r\n class=\"waypoint dragging\"\r\n [style.left.px]=\"p.x\"\r\n [style.top.px]=\"p.y\"\r\n (mousedown)=\"onmousedownPoint($event, p)\"\r\n ></div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n<!-- drawer TEMPLATE -->\r\n<nz-drawer\r\n [nzTitle]=\"drawTemplateTitle\"\r\n nzPlacement=\"right\"\r\n [nzWidth]=\"500\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"drawTemplateVisibel\"\r\n [nzFooter]=\"footerTplTemplate\"\r\n (nzOnClose)=\"drawTemplateVisibel = false\"\r\n>\r\n <ng-template #drawTemplateTitle> <nz-icon nzType=\"setting\"></nz-icon> Template </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <extend-select\r\n [label]=\"'Org'\"\r\n [lstItem]=\"lstOrg\"\r\n [valueField]=\"'App_Org_Id'\"\r\n [displayFields]=\"['Name', 'Code']\"\r\n [(_ngModel)]=\"template.App_Org_Id\"\r\n ></extend-select>\r\n <extend-input [label]=\"'Code'\" [(_ngModel)]=\"template.Code\"></extend-input>\r\n <extend-input [label]=\"'Name'\" [(_ngModel)]=\"template.Name\"></extend-input>\r\n <extend-select\r\n [label]=\"'Type'\"\r\n [lstItem]=\"template.lstTemplateType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.DocType\"\r\n ></extend-select>\r\n <extend-textarea [label]=\"'Desscription'\" [(_ngModel)]=\"template.Description\"></extend-textarea>\r\n <extend-select\r\n [label]=\"'Print template'\"\r\n [lstItem]=\"template.lstTemplatePrint\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.TemplatePrint\"\r\n ></extend-select>\r\n <extend-select\r\n [label]=\"'Apply to'\"\r\n [lstItem]=\"template.lstApplyTo\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"template.ApplyTo\"\r\n ></extend-select>\r\n\r\n <extend-checkbox [label]=\"'Active'\" [(_ngModel)]=\"template.IsActive\"></extend-checkbox>\r\n <extend-checkbox [label]=\"'Use Allow back'\" [(_ngModel)]=\"template.editorOption.AllowbackInUse\"></extend-checkbox>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Stage</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of getLstStage; track tag) {\r\n <div nz-col>\r\n <nz-tag (click)=\"hoverStage = tag\">\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Stage status</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstStageStatus; track tag) {\r\n <div nz-col>\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableStageStatus(tag) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleCloseStageStatus(tag)\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputStageStatusVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInputStageStatus()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action type\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputStageStatusElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Code\"\r\n [(ngModel)]=\"inputStageStatusCode\"\r\n (keydown.enter)=\"inputStageStatusNameElement.select()\"\r\n />\r\n <input\r\n #inputStageStatusNameElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Name\"\r\n [(ngModel)]=\"inputStageStatusName\"\r\n (blur)=\"handleInputStageStatusConfirm()\"\r\n (keydown.enter)=\"handleInputStageStatusConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Action type</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstActionType; track tag) {\r\n <div nz-col>\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableActionType(tag) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleCloseActionType(tag)\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputActionTypeVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInputActionType()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action type\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputActionTypeElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Code\"\r\n [(ngModel)]=\"inputActionTypeCode\"\r\n (keydown.enter)=\"inputActionTypeNameElement.select()\"\r\n />\r\n <input\r\n #inputActionTypeNameElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"Name\"\r\n [(ngModel)]=\"inputActionTypeName\"\r\n (blur)=\"handleInputActionTypeConfirm()\"\r\n (keydown.enter)=\"handleInputActionTypeConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> Action status</h3>\r\n\r\n <div nz-row [nzGutter]=\"[0, 5]\">\r\n @for (tag of template.lstActionStatus; track tag) {\r\n <div nz-col>\r\n @if (template.editingActionStatus != tag) {\r\n <nz-tag\r\n [nzMode]=\"checkRemoveableActionStatus(tag.Code) ? 'closeable' : 'default'\"\r\n (nzOnClose)=\"handleClose(tag.Code)\"\r\n (click)=\"template.editingActionStatus = checkRemoveableActionStatus(tag.Code) ? tag : undefined\"\r\n >\r\n {{ sliceTagName(tag.Code + (tag.Name ? \" - \" + tag.Name : \"\")) }}\r\n </nz-tag>\r\n } @else {\r\n <input\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n [appAutoFocus]=\"true\"\r\n [(ngModel)]=\"tag.Code\"\r\n (blur)=\"template.editingActionStatus = undefined\"\r\n (keydown.enter)=\"template.editingActionStatus = undefined\"\r\n /> \r\n }\r\n </div>\r\n }\r\n\r\n <div nz-col>\r\n @if (!inputVisible) {\r\n <nz-tag class=\"editable-tag\" nzNoAnimation (click)=\"showInput()\">\r\n <nz-icon nzType=\"plus\" />\r\n New Action status\r\n </nz-tag>\r\n } @else {\r\n <input\r\n #inputElement\r\n nz-input\r\n nzSize=\"small\"\r\n type=\"text\"\r\n style=\"width: 150px\"\r\n placeholder=\"+ New Action status\"\r\n [(ngModel)]=\"inputValue\"\r\n (blur)=\"handleInputConfirm()\"\r\n (keydown.enter)=\"handleInputConfirm()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #footerTplTemplate>\r\n <div nz-flex [nzGap]=\"6\" [nzJustify]=\"'end'\">\r\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button (click)=\"drawTemplateVisibel = false\">Close</button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- drawer STAGE -->\r\n<nz-drawer\r\n [nzTitle]=\"drawerTitleStage\"\r\n [nzPlacement]=\"selectedStage?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\r\n [nzVisible]=\"!!selectedStage\"\r\n [nzWidth]=\"'calc(50vw)'\"\r\n [nzClosable]=\"false\"\r\n [nzFooter]=\"footerTplNode\"\r\n (nzOnClose)=\"selectedStage = undefined\"\r\n>\r\n <ng-template #drawerTitleStage>\r\n <div nz-row nzJustify=\"space-between\">\r\n @if (selectedStage && selectedStage.editorOption) {\r\n @if (selectedStage.editorOption.drawerPosition == \"left\") {\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the right\"\r\n (click)=\"selectedStage.editorOption.drawerPosition = 'right'\"\r\n >\r\n <nz-icon nzType=\"double-right\"></nz-icon>\r\n </button>\r\n STAGE\r\n } @else {\r\n STAGE\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the left\"\r\n (click)=\"selectedStage.editorOption.drawerPosition = 'left'\"\r\n >\r\n <nz-icon nzType=\"double-left\"></nz-icon>\r\n </button>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <ng-container *ngIf=\"selectedStage\">\r\n <nz-radio-group [(ngModel)]=\"selectedStage.StageType\">\r\n <label nz-radio nzValue=\"_start_\">UI start</label>\r\n <label nz-radio nzValue=\"_end_\">UI end</label>\r\n <label nz-radio nzValue=\"start\">START</label>\r\n <label nz-radio nzValue=\"node\">NODE</label>\r\n <label nz-radio nzValue=\"end\">END</label>\r\n </nz-radio-group>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Code'\"\r\n [required]=\"true\"\r\n [(_ngModel)]=\"selectedStage.Code\"\r\n ></extend-input>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"16\"\r\n [label]=\"'Name'\"\r\n [required]=\"true\"\r\n [(_ngModel)]=\"selectedStage.Name\"\r\n ></extend-input>\r\n </div>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Sequence'\"\r\n [(_ngModel)]=\"selectedStage.SeqValue\"\r\n ></extend-input-number>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"16\"\r\n [label]=\"'Org implement'\"\r\n [lstItem]=\"lstOrg\"\r\n [valueField]=\"'App_Org_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedStage.App_Org_Id\"\r\n ></extend-select>\r\n </div>\r\n\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Number of Days'\"\r\n [precision]=\"1\"\r\n [(_ngModel)]=\"selectedStage.NumberDay\"\r\n ></extend-input-number>\r\n <extend-input-number\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Number of Person'\"\r\n [precision]=\"1\"\r\n [(_ngModel)]=\"selectedStage.NumberPerson\"\r\n ></extend-input-number>\r\n </div>\r\n\r\n @if (selectedStage.editorOption) {\r\n @if ([\"start\", \"node\", \"end\"].includes(selectedStage.StageType.toLowerCase())) {\r\n <extend-checkbox\r\n [label]=\"'Reverse'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedStage.editorOption.isReverse\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <extend-checkbox\r\n [label]=\"'Require user action'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedStage.IsRequireUser\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"16\">\r\n <h3 nz-col><nz-icon nzType=\"send\" nzTheme=\"outline\" /> List Action</h3>\r\n <div nz-col>\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"addAction()\">\r\n <nz-icon nzType=\"plus\"></nz-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <nz-table\r\n class=\"no-hover-color\"\r\n nzSize=\"small\"\r\n [nzData]=\"lstActionOfCurrentStage\"\r\n [nzShowPagination]=\"false\"\r\n [nzNoResult]=\"' '\"\r\n >\r\n <thead>\r\n <tr [hidden]=\"true\">\r\n <th nzWidth=\"40px\"></th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (action of lstActionOfCurrentStage; track $index) {\r\n <tr (click)=\"onclickaction(action)\">\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-left': action == hoverAction ? 'solid 4px orange' : '',\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n ({{ $index + 1 }})\r\n <nz-icon\r\n nzType=\"delete\"\r\n nzTheme=\"outline\"\r\n class=\"color-warn cursor-pointer icon-size-16\"\r\n (click)=\"$event.stopPropagation(); deleteAction(action)\"\r\n ></nz-icon>\r\n </td>\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\" class=\"has-floating-label floating-label\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"z-index: 2\">\r\n <label>Action status</label>\r\n </nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"action.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(action.ActionStatus)\"\r\n (blur)=\"onenterAotu(action.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"action.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(action)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"action.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"action.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(action)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.To_StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"action.DocProcessStatus\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Role</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstRole\"\r\n [valueField]=\"'App_Role_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstRoleId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>User</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstUser\"\r\n [valueField]=\"'App_User_Id'\"\r\n [displayFields]=\"['UserName', 'FullName']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstUserId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Email action</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailAction\"\r\n [valueField]=\"'ID'\"\r\n [displayField]=\"'Name'\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstEmailActionId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>Email template</div>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>\r\n <div nz-col nzSpan=\"1\"></div>\r\n <div nz-col nzSpan=\"23\" class=\"form-item-no-bottom\" style=\"font-weight: normal\">\r\n @for (actionRef of lstActionRefOf(action); track $index) {\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [labelSpan]=\"12\"\r\n [size]=\"'small'\"\r\n [label]=\"emailActionText(actionRef.To_WF_TemplateStageAction_Id)\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"actionRef.TemplateMail\"\r\n ></extend-select>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"8\">\r\n Action rule\r\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"actionRuleModalVisible = true\">\r\n <nz-icon nzType=\"export\" nzTheme=\"outline\" class=\"color-primary\" />\r\n </button>\r\n <button\r\n *ngIf=\"action.WF_TransitionRule_Id\"\r\n nz-button\r\n nzType=\"text\"\r\n nzSize=\"small\"\r\n (click)=\"deleteActionRule(action)\"\r\n >\r\n <nz-icon nzType=\"delete\" nzTheme=\"outline\" class=\"color-warn\" />\r\n </button>\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row nzJustify=\"end\">\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"addAction()\">\r\n <nz-icon nzType=\"plus\"></nz-icon>Add Action\r\n </button>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-template #footerTplNode>\r\n <div\r\n nz-flex\r\n [nzGap]=\"6\"\r\n [nzJustify]=\"\r\n selectedStage && selectedStage.editorOption && selectedStage.editorOption.drawerPosition == 'left'\r\n ? 'start'\r\n : 'end'\r\n \"\r\n >\r\n <button nz-button nzDanger nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button (click)=\"selectedStage = undefined\">Close</button>\r\n <button\r\n *ngIf=\"selectedStage && ['START', 'END'].indexOf(selectedStage.StageType) < 0\"\r\n nz-button\r\n nzDanger\r\n (click)=\"deleteStage()\"\r\n >\r\n Delete\r\n </button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- drawer TEMPLATE ACTION -->\r\n<nz-drawer\r\n [nzTitle]=\"drawerTitleTemplateAction\"\r\n [nzVisible]=\"drawTemplateActionVisibel\"\r\n [nzWidth]=\"'calc(50vw)'\"\r\n [nzClosable]=\"false\"\r\n [nzFooter]=\"footerTplTemplateAction\"\r\n (nzOnClose)=\"drawTemplateActionVisibel = false\"\r\n>\r\n <ng-template #drawerTitleTemplateAction>\r\n <div nz-row nzJustify=\"space-between\">Template action</div>\r\n </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <nz-table nzSize=\"small\" [nzData]=\"lstActionOfTemplate\" [nzShowPagination]=\"false\" [nzNoResult]=\"' '\">\r\n <thead>\r\n <tr [hidden]=\"true\">\r\n <th nzWidth=\"40px\"></th>\r\n <th></th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (action of lstActionOfTemplate; track $index) {\r\n <tr (click)=\"onclickaction(action)\">\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-left': action == hoverAction ? 'solid 4px orange' : '',\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n ({{ $index + 1 }})\r\n <nz-icon\r\n nzType=\"delete\"\r\n nzTheme=\"outline\"\r\n class=\"color-warn cursor-pointer icon-size-16\"\r\n (click)=\"$event.stopPropagation(); deleteAction(action)\"\r\n ></nz-icon>\r\n </td>\r\n <td\r\n style=\"border-bottom: solid 1px orange\"\r\n [ngStyle]=\"{\r\n 'border-top': $index == 0 ? 'solid 1px orange' : '',\r\n }\"\r\n >\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\" class=\"has-floating-label floating-label\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"z-index: 2\">\r\n <label>Action status</label>\r\n </nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"action.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(action.ActionStatus)\"\r\n (blur)=\"onenterAotu(action.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"action.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(action)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"action.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"action.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(action)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.To_StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"action.DocProcessStatus\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row class=\"text-bold\">Role</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstRole\"\r\n [valueField]=\"'App_Role_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstRoleId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row class=\"text-bold\">User</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstUser\"\r\n [valueField]=\"'App_User_Id'\"\r\n [displayFields]=\"['UserName', 'FullName']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstUserId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row class=\"text-bold\">Email action</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailAction\"\r\n [valueField]=\"'ID'\"\r\n [displayField]=\"'Name'\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"action._lstEmailActionId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(action)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <!-- Conditions -->\r\n <div nz-row nzGutter=\"32\" class=\"text-bold\">\r\n <div nz-col>Conditions</div>\r\n <div nz-col>\r\n <extend-checkbox label=\"Allway\" [(_ngModel)]=\"action.Conditions.Allway\"></extend-checkbox>\r\n </div>\r\n </div>\r\n <div nz-row class=\"form-item-no-bottom\">\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [label]=\"'Stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [multiple]=\"true\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"action.Conditions.LstStage\"\r\n (_ngModelChange)=\"onchangeNextStage(action)\"\r\n ></extend-select>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [multiple]=\"true\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"action.Conditions.LstDocProcessStatus\"\r\n ></extend-select>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [multiple]=\"true\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.Conditions.LstStageStatus\"\r\n ></extend-select>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [label]=\"'Action status'\"\r\n [lstItem]=\"template.lstActionStatus\"\r\n [multiple]=\"true\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"action.Conditions.LstActionStatus\"\r\n ></extend-select>\r\n </div>\r\n\r\n <box [height]=\"8\"></box>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>Email template</div>\r\n <div *ngIf=\"action._lstEmailActionId && action._lstEmailActionId.length\" nz-row>\r\n <div nz-col nzSpan=\"1\"></div>\r\n <div nz-col nzSpan=\"23\" class=\"form-item-no-bottom\" style=\"font-weight: normal\">\r\n @for (actionRef of lstActionRefOf(action); track $index) {\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [labelSpan]=\"12\"\r\n [size]=\"'small'\"\r\n [label]=\"emailActionText(actionRef.To_WF_TemplateStageAction_Id)\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"actionRef.TemplateMail\"\r\n ></extend-select>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"8\" class=\"text-bold\">\r\n Action rule\r\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"actionRuleModalVisible = true\">\r\n <nz-icon nzType=\"export\" nzTheme=\"outline\" class=\"color-primary\" />\r\n </button>\r\n <button\r\n *ngIf=\"action.WF_TransitionRule_Id\"\r\n nz-button\r\n nzType=\"text\"\r\n nzSize=\"small\"\r\n (click)=\"deleteActionRule(action)\"\r\n >\r\n <nz-icon nzType=\"delete\" nzTheme=\"outline\" class=\"color-warn\" />\r\n </button>\r\n </div>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row nzJustify=\"end\">\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"addTempldateAction()\">\r\n <nz-icon nzType=\"plus\"></nz-icon>Add Action\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #footerTplTemplateAction>\r\n <div\r\n nz-flex\r\n [nzGap]=\"6\"\r\n [nzJustify]=\"\r\n selectedStage && selectedStage.editorOption && selectedStage.editorOption.drawerPosition == 'left'\r\n ? 'start'\r\n : 'end'\r\n \"\r\n >\r\n <button nz-button nzDanger nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button (click)=\"selectedStage = undefined\">Close</button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- drawer ACTION -->\r\n<nz-drawer\r\n [nzTitle]=\"drawerTitleAction\"\r\n nzTitle=\"ACTION\"\r\n [nzPlacement]=\"selectedAction?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\r\n [nzClosable]=\"false\"\r\n [nzWidth]=\"750\"\r\n [nzVisible]=\"!!selectedAction\"\r\n [nzFooter]=\"footerTplAction\"\r\n (nzOnClose)=\"selectedAction = undefined\"\r\n>\r\n <ng-template #drawerTitleAction>\r\n <div nz-row nzJustify=\"space-between\">\r\n @if (selectedAction && selectedAction.editorOption) {\r\n @if (selectedAction.editorOption.drawerPosition == \"left\") {\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the right\"\r\n (click)=\"selectedAction.editorOption.drawerPosition = 'right'\"\r\n >\r\n <nz-icon nzType=\"double-right\"></nz-icon>\r\n </button>\r\n ACTION\r\n } @else {\r\n ACTION\r\n <button\r\n nz-button\r\n nzSize=\"small\"\r\n nz-tooltip=\"To the left\"\r\n (click)=\"selectedAction.editorOption.drawerPosition = 'left'\"\r\n >\r\n <nz-icon nzType=\"double-left\"></nz-icon>\r\n </button>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <ng-container *ngIf=\"selectedAction\">\r\n <div>\r\n <strong\r\n >{{ selectedAction.getFromStageCode(lstStage) }} -> {{ selectedAction.getToStageCode(lstStage) }}</strong\r\n >\r\n </div>\r\n <div>{{ selectedAction.getFromStageName(lstStage) }} -> {{ selectedAction.getToStageName(lstStage) }}</div>\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\" class=\"has-floating-label floating-label\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"z-index: 2\">\r\n <label>Action status</label>\r\n </nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"selectedAction.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(selectedAction.ActionStatus)\"\r\n (blur)=\"onenterAotu(selectedAction.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"selectedAction.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(selectedAction)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"selectedAction.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedAction.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"getlstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedAction.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(selectedAction)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedAction.To_StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Process status'\"\r\n [lstItem]=\"template.lstProcessStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ProcessStatus'\"\r\n [(_ngModel)]=\"selectedAction.DocProcessStatus\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Role</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstRole\"\r\n [valueField]=\"'App_Role_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstRoleId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>User</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstUser\"\r\n [valueField]=\"'App_User_Id'\"\r\n [displayFields]=\"['UserName', 'FullName']\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstUserId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row>Email action</div>\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailAction\"\r\n [valueField]=\"'ID'\"\r\n [displayField]=\"'Name'\"\r\n [multiple]=\"true\"\r\n [(_ngModel)]=\"selectedAction._lstEmailActionId\"\r\n (_ngModelChange)=\"onselectedRoleEmailUser(selectedAction)\"\r\n ></extend-select>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div *ngIf=\"selectedAction._lstEmailActionId && selectedAction._lstEmailActionId.length\" nz-row>\r\n Email template\r\n </div>\r\n <div *ngIf=\"selectedAction._lstEmailActionId && selectedAction._lstEmailActionId.length\" nz-row>\r\n <div nz-col nzSpan=\"1\"></div>\r\n <div nz-col nzSpan=\"23\" class=\"form-item-no-bottom\" style=\"font-weight: normal\">\r\n @for (actionRef of lstActionRefOf(selectedAction); track $index) {\r\n <div nz-row>\r\n <extend-select\r\n nz-col\r\n nzSpan=\"24\"\r\n [labelSpan]=\"12\"\r\n [size]=\"'small'\"\r\n [label]=\"emailActionText(actionRef.To_WF_TemplateStageAction_Id)\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"actionRef.TemplateMail\"\r\n ></extend-select>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"8\">\r\n Action rule\r\n <button nz-button nzType=\"text\" nzSize=\"small\" (click)=\"actionRuleModalVisible = true\">\r\n <nz-icon nzType=\"export\" nzTheme=\"outline\" class=\"color-primary\" />\r\n </button>\r\n <button\r\n *ngIf=\"selectedAction.WF_TransitionRule_Id\"\r\n nz-button\r\n nzType=\"text\"\r\n nzSize=\"small\"\r\n (click)=\"deleteActionRule(selectedAction)\"\r\n >\r\n <nz-icon nzType=\"delete\" nzTheme=\"outline\" class=\"color-warn\" />\r\n </button>\r\n </div>\r\n\r\n <!-- <box [height]=\"16\"></box> -->\r\n <nz-divider></nz-divider>\r\n\r\n @if (template.editorOption.AllowbackInUse) {\r\n <extend-checkbox\r\n [label]=\"'Allow back'\"\r\n [labelSpan]=\"0\"\r\n [(_ngModel)]=\"selectedAction.allowBack\"\r\n (_ngModelChange)=\"onchangeAllowBack(selectedAction)\"\r\n ></extend-checkbox>\r\n }\r\n\r\n <box [height]=\"16\"></box>\r\n\r\n @if (selectedAction.allowBack) {\r\n <div>\r\n <strong\r\n >{{ selectedAction.getToStageCode(lstStage) }} -> {{ selectedAction.getFromStageCode(lstStage) }}</strong\r\n >\r\n </div>\r\n <div>{{ selectedAction.getToStageName(lstStage) }} -> {{ selectedAction.getFromStageName(lstStage) }}</div>\r\n\r\n @if (selectedBackAction) {\r\n <div nz-row [nzGutter]=\"16\" class=\"form-item-no-bottom\">\r\n <div nz-col [nzSpan]=\"8\">\r\n <nz-form-item>\r\n <nz-form-label [nzSpan]=\"24\" style=\"height: 32px\">Action status</nz-form-label>\r\n <nz-form-control [nzSpan]=\"24\">\r\n <nz-input-group class=\"full-width\">\r\n <input\r\n nz-input\r\n [(ngModel)]=\"selectedBackAction.ActionStatus\"\r\n [nzAutocomplete]=\"auto\"\r\n (ngModelChange)=\"nzAutocompletechange($event, template.lstActionStatus)\"\r\n (click)=\"lstActionStatusFiltered = template.lstActionStatus\"\r\n (keyup.enter)=\"onenterAotu(selectedBackAction.ActionStatus)\"\r\n (blur)=\"onenterAotu(selectedBackAction.ActionStatus)\"\r\n />\r\n <nz-autocomplete #auto [compareWith]=\"compareFun\">\r\n @for (option of lstActionStatusFiltered; track $index) {\r\n <nz-auto-option [nzValue]=\"option.Code\" [nzLabel]=\"option.Code\">\r\n {{ option.Code }}\r\n <icon-delete\r\n *ngIf=\"checkRemoveableActionStatus(option.Code)\"\r\n style=\"float: right\"\r\n [size]=\"12\"\r\n (click)=\"handleClose(option.Code)\"\r\n ></icon-delete>\r\n </nz-auto-option>\r\n }\r\n </nz-autocomplete>\r\n </nz-input-group>\r\n </nz-form-control>\r\n </nz-form-item>\r\n </div>\r\n\r\n <extend-input\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action text'\"\r\n [(_ngModel)]=\"selectedBackAction.ActionText\"\r\n (_ngModelChange)=\"onchangeActionText(selectedBackAction)\"\r\n ></extend-input>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Action type'\"\r\n [lstItem]=\"template.lstActionType\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_ActionType'\"\r\n [(_ngModel)]=\"selectedBackAction.ActionType\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedBackAction.StageStatus\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage'\"\r\n [lstItem]=\"lstStage\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [(_ngModel)]=\"selectedBackAction.To_WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"onchangeNextStage(selectedBackAction)\"\r\n ></extend-select>\r\n\r\n <extend-select\r\n nz-col\r\n [nzSpan]=\"8\"\r\n [label]=\"'Next stage status'\"\r\n [lstItem]=\"template.lstStageStatus\"\r\n [valueField]=\"'Code'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [info]=\"'DomainCode: WF_TemplateStageAction_StageStatus'\"\r\n [(_ngModel)]=\"selectedBackAction.To_StageStatus\"\r\n ></extend-select>\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #footerTplAction>\r\n <div\r\n nz-flex\r\n [nzGap]=\"6\"\r\n [nzJustify]=\"selectedAction && selectedAction.editorOption.drawerPosition == 'left' ? 'start' : 'end'\"\r\n >\r\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\r\n <button nz-button nzDanger (click)=\"deleteAction(selectedAction!)\">Delete</button>\r\n <button nz-button (click)=\"selectedAction = undefined\">Close</button>\r\n </div>\r\n </ng-template>\r\n</nz-drawer>\r\n\r\n<!-- setting editor -->\r\n<nz-drawer\r\n [nzTitle]=\"drawSettingTitle\"\r\n nzPlacement=\"right\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"settingVisible\"\r\n (nzOnClose)=\"settingVisible = false\"\r\n>\r\n <ng-template #drawSettingTitle> <nz-icon nzType=\"setting\"></nz-icon> Editor </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <div class=\"form-item-no-bottom\">\r\n <extend-checkbox [label]=\"'Show grid'\" [labelSpan]=\"0\" [(_ngModel)]=\"wfcSetting.ShowGrid\"></extend-checkbox>\r\n\r\n <box [height]=\"16\"></box>\r\n </div>\r\n </ng-container>\r\n</nz-drawer>\r\n\r\n<!-- editor infomation -->\r\n<nz-drawer\r\n [nzTitle]=\"drawInfoTitle\"\r\n nzPlacement=\"right\"\r\n [nzClosable]=\"false\"\r\n [nzVisible]=\"infoVisible\"\r\n (nzOnClose)=\"infoVisible = false\"\r\n>\r\n <ng-template #drawInfoTitle> <nz-icon nzType=\"info-circle\"></nz-icon> Infomation </ng-template>\r\n <ng-container *nzDrawerContent>\r\n <p>1. C\u00E1c th\u00E0nh ph\u1EA7n: Stage or Node (stag, node quy tr\u00ECnh), Action or Connector (\u0111\u01B0\u1EDDng n\u1ED1i gi\u1EEFa c\u00E1c stage)</p>\r\n <p>2. Save \u0111\u1EC3 load c\u00E1c th\u00F4ng tin: Stage status, Action type</p>\r\n <p>\r\n 3. N\u1ED1i 2 node (t\u1EA1o connector t\u01B0\u01A1ng \u0111\u01B0\u01A1ng t\u1EA1o action):\r\n <br />- Click ch\u1EA5m cam t\u1EEB Node ngu\u1ED3n \u0111\u1EBFn ch\u1EA5m xanh c\u1EE7a Node \u0111\u00EDch (ho\u1EB7c click v\u00E0o Node \u0111\u00EDch), c\u00F3 th\u1EC3 click th\u00E0nh\r\n nhi\u1EC1u \u0111i\u1EC3m \u0111\u1EC3 t\u1EA1o \u0111\u01B0\u1EDDng n\u1ED1i cong<br />- Khi hover connector chuy\u1EC3n sang m\u1EA7u \u0111\u1ECF c\u00F3 th\u1EC3 click \u0111\u00FAp \u0111\u1EC3 th\u00EAm m\u1ED9t \u0111i\u1EC3m\r\n c\u1EE7a connector<br />- Khi hover l\u00EAn \u0111i\u1EC3m c\u1EE7a connector c\u00F3 th\u1EC3 di chuy\u1EC3n \u0111i\u1EC3m \u0111\u00F3 b\u1EB1ng c\u00E1ch nh\u1EA5n gi\u1EEF chu\u1ED9t v\u00E0 k\u00E9o th\u1EA3\r\n \u0111\u1EBFn v\u1ECB tr\u00ED m\u1EDBi<br />- Chu\u1ED9t ph\u1EA3i v\u00E0o \u0111i\u1EC3m n\u1ED1i connector \u0111\u1EC3 xo\u00E1 \u0111i\u1EC3m \u0111\u00F3\r\n </p>\r\n </ng-container>\r\n</nz-drawer>\r\n\r\n<!-- action rule modal -->\r\n<nz-modal\r\n [(nzVisible)]=\"actionRuleModalVisible\"\r\n [nzMaskClosable]=\"false\"\r\n [nzClosable]=\"false\"\r\n [nzKeyboard]=\"true\"\r\n [nzWidth]=\"'90vw'\"\r\n>\r\n <ng-container *nzModalTitle>\r\n ACTION RULE: [{{ selectedStage?.Code }}] {{ selectedStage?.Name }} > [{{ hoverAction?.ActionStatus }}]\r\n {{ hoverAction?.ActionText }}\r\n </ng-container>\r\n <ng-container *nzModalContent>\r\n @if (hoverAction && hoverAction.actionRule) {\r\n <div nz-row [nzGutter]=\"32\" class=\"form-item-no-bottom\">\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Code'\" [(_ngModel)]=\"hoverAction.actionRule.Code\"></extend-input>\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Name'\" [(_ngModel)]=\"hoverAction.actionRule.Name\"></extend-input>\r\n <extend-input nz-col nzSpan=\"12\" [label]=\"'Note'\" [(_ngModel)]=\"hoverAction.actionRule.Note\"></extend-input>\r\n <extend-checkbox\r\n nz-col\r\n nzSpan=\"12\"\r\n [label]=\"'IsActive'\"\r\n [(_ngModel)]=\"hoverAction.actionRule.IsActive\"\r\n ></extend-checkbox>\r\n </div>\r\n <box [height]=\"8\"></box>\r\n <div nz-row [nzGutter]=\"16\">\r\n <div nz-col nzSpan=\"24\">\r\n <nz-table nzSize=\"small\" [nzData]=\"hoverAction.actionRule.lstLine\" [nzShowPagination]=\"false\">\r\n <thead>\r\n <tr>\r\n <th [nzWidth]=\"'40px'\"><icon-add (click)=\"addActionRuleLine()\"></icon-add></th>\r\n <th [nzWidth]=\"'150px'\">\r\n Rule type\r\n <icon-info\r\n [tooltip]=\"'DomainCode: WF_RuleType (change-action-parent, change-action-child, execute-store )'\"\r\n ></icon-info>\r\n </th>\r\n <th>Template</th>\r\n <th>Template stage</th>\r\n <th>Template action</th>\r\n <th>Store to exec</th>\r\n <th>Email template</th>\r\n <th>Email to</th>\r\n <th [nzWidth]=\"'50px'\">Active</th>\r\n <th>Action</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (item of hoverAction.actionRule.lstLine; track $index) {\r\n <tr>\r\n <td><icon-delete (click)=\"deleteActionRuleLine(hoverAction.actionRule, item)\"></icon-delete></td>\r\n <td>\r\n <dic-domain-select\r\n [size]=\"'small'\"\r\n [DomainCode]=\"'WF_RuleType'\"\r\n [(_ngModel)]=\"item.RuleType\"\r\n ></dic-domain-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n #xxx\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstTemplateForRule(item)\"\r\n [valueField]=\"'WF_Template_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_Template_Id\"\r\n (_ngModelChange)=\"item.WF_TemplateStage_Id = 0; item.WF_TemplateStageAction_Id = 0\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n #yyy\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstStageForRule(xxx._ngModel)\"\r\n [valueField]=\"'WF_TemplateStage_Id'\"\r\n [displayFields]=\"['Code', 'Name']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_TemplateStage_Id\"\r\n (_ngModelChange)=\"item.WF_TemplateStageAction_Id = 0\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-select\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstActionForRule(yyy._ngModel)\"\r\n [valueField]=\"'WF_TemplateStageAction_Id'\"\r\n [displayFields]=\"['ActionStatus', 'ActionText']\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.WF_TemplateStageAction_Id\"\r\n ></extend-select>\r\n </td>\r\n <td>\r\n <extend-input [size]=\"'small'\" [(_ngModel)]=\"item.StoreToExec\"></extend-input>\r\n </td>\r\n <td>\r\n <extend-select\r\n [size]=\"'small'\"\r\n [lstItem]=\"lstEmailTemplate\"\r\n [valueField]=\"'App_MailTemplate_Id'\"\r\n [displayField]=\"'Code'\"\r\n [dropdownMatchSelectWidth]=\"false\"\r\n [(_ngModel)]=\"item.App_MailTemplate_Id\"\r\n ></extend-select>\r\n </td>\r\n <td class=\"form-item-no-bottom\">\r\n <extend-textarea [size]=\"'small'\" [minRows]=\"1\" [(_ngModel)]=\"item.EmailTo\"></extend-textarea>\r\n </td>\r\n <td class=\"text-center form-item-no-bottom\">\r\n <extend-checkbox [(_ngModel)]=\"item.IsActive\"></extend-checkbox>\r\n </td>\r\n <td>\r\n <button nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"checkAction(item)\">Check</button>\r\n </td>\r\n </tr>\r\n }\r\n </tbody>\r\n </nz-table>\r\n </div>\r\n </div>\r\n }\r\n </ng-container>\r\n <ng-container *nzModalFooter>\r\n <button nz-button nzType=\"primary\" (click)=\"checkAllAction()\">OK</button>\r\n </ng-container>\r\n</nz-modal>\r\n", styles: ["@charset \"UTF-8\";::ng-deep .workflow-wrapper{border:solid 1px lightgray;overflow:hidden;width:100%}.workflow-canvas{position:relative;background:#f0f2f5;cursor:default;overflow:hidden;outline:1px dashed rgba(0,0,0,.1)}.workflow-canvas .edges-layer{position:absolute;inset:0;width:100%;height:100%;z-index:1}.workflow-canvas .edges-layer path{stroke-width:2;fill:none}.canvas-content{transform-origin:0 0;width:100%;height:100%;transition:transform .05s linear}.canvas-content{outline:1px dashed red}.canvas-content.panning{cursor:grab}.canvas-content.panning:active{cursor:grabbing}.workflow-canvas.panning{cursor:grab}.workflow-canvas.panning:active{cursor:grabbing}.workflow-canvas.connecting,.workflow-canvas.connecting .workflow-node{cursor:crosshair}.workflow-node{position:absolute;width:160px;cursor:grab;-webkit-user-select:none;user-select:none;z-index:2}.workflow-node:active{cursor:grabbing}.workflow-node.connecting-source,.workflow-node.selected,.workflow-node:hover:not(.workflow-node-start,.workflow-node-end){outline:2px dashed #1890ff}.workflow-node .title{font-weight:600;margin-bottom:6px}.workflow-node-start{width:0px}.workflow-node-start.connecting-source,.workflow-node-start.selected,.workflow-node-start:hover{outline:unset}.workflow-node-start.connecting-source nz-tag,.workflow-node-start.selected nz-tag,.workflow-node-start:hover nz-tag{outline:2px dashed}.workflow-node-start nz-tag{position:relative;top:45px;right:35px}.workflow-node-end{width:0px}.workflow-node-end.connecting-source,.workflow-node-end.selected,.workflow-node-end:hover{outline:unset}.workflow-node-end.connecting-source nz-tag,.workflow-node-end.selected nz-tag,.workflow-node-end:hover nz-tag{outline:2px dashed}.workflow-node-end nz-tag{position:relative;top:45px;right:32px}.connector{position:absolute;top:39px;width:12px;height:12px;background:#1890ff;border-radius:50%;transform:translateY(-50%);cursor:crosshair;transition:box-shadow .15s ease-out,transform .15s ease-out}.connector:hover{box-shadow:0 0 0 3px #1890ff4d;transform:translateY(-50%) scale(1.15)}.connector-right{right:-8px;background:orange}.connector-right.reverse,.connector-left{left:-8px}.connector-left.reverse{left:unset;right:-8px}.connector-start{width:16px;height:16px;right:-8px;background:green;box-shadow:0 0 0 3px #1890ff4d}.connector-end{width:16px;height:16px;left:-8px;background:#000;box-shadow:0 0 0 3px #1890ff4d}.edge{cursor:pointer;stroke:#1890ff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2;fill:none;transition:stroke .15s ease}.edge-hit{stroke:transparent;stroke-width:18px!important;fill:none;cursor:pointer}.edge-hit:hover+.edge{stroke:#ff4d4f;stroke-width:2}.workflow-canvas.dragging-point .edge-hit{pointer-events:none}.edge:hover+.edge-label{fill:#1890ff;font-weight:500}.edge-label{font-size:12px;fill:#555;pointer-events:none;-webkit-user-select:none;user-select:none}.blue{stroke:#1890ff!important}.red{stroke:#ff4d4f!important;box-shadow:0 0 0 3px #1890ff4d!important}.workflow-svg{background:transparent;overflow:visible}.waypoint{position:absolute;width:10px;height:10px;background:#ff4d4f;border-radius:50%;transform:translate(-50%,-50%) scale(1);cursor:move;z-index:1;transition:transform .12s ease-out,background-color .12s ease-out,box-shadow .12s ease-out}.waypoint:hover{background:#ff7875;transform:translate(-50%,-50%) scale(1.25);box-shadow:0 0 0 4px #ff787559}.waypoint.dragging{transition:none;transform:translate(-50%,-50%) scale(1.15);pointer-events:none}.workflow-canvas.dragging-point svg{cursor:grabbing}.selection-box{position:absolute;border:1px dashed #1890ff;background:#1890ff1a;pointer-events:none}.toolbar{position:absolute;top:8px;left:8px;display:flex;gap:4px;padding:6px;background:#fff;border-radius:6px;box-shadow:0 2px 8px #00000026;z-index:100}.toolbar .divider{width:1px;background:#e5e5e5;margin:0 2px}nz-tag.selected{outline:2px dashed #1890ff}.grid-layer{position:absolute;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(rgba(0,0,0,.08) 1px,transparent 1px);background-size:20px 20px}.grid-layer{background-image:linear-gradient(to right,rgba(0,0,0,.06) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.06) 1px,transparent 1px);background-size:20px 20px}.editable-tag{background:#fff;border-style:dashed}::ng-deep .minimap{position:absolute;width:180px;height:125px;top:0;right:0;background-color:#eee;border:1px solid #aaa;opacity:.9;z-index:1}::ng-deep .minimap{position:absolute;width:200px;height:140px;top:8px;right:8px;background-color:#f8f9fa;border:1px solid #d9d9d9;border-radius:8px;box-shadow:0 4px 12px #0000001a;overflow:hidden;z-index:100;-webkit-user-select:none;user-select:none}::ng-deep .minimap-node{position:absolute;background-color:#bfbfbf;border-radius:2px}::ng-deep .minimap-node-round{position:absolute;background-color:#bfbfbf;border-radius:50%}::ng-deep .minimap-node-round-start{background-color:#52c41a}::ng-deep .minimap-node-round-end{background-color:#ff4d4f}::ng-deep .minimap-viewport{position:absolute;box-sizing:border-box;background-color:#1890ff26;border:1.5px solid #1890ff;border-radius:4px;z-index:2;cursor:grab;transition:none}::ng-deep .minimap-viewport.grabbing,::ng-deep .minimap-viewport:active{cursor:grabbing;background-color:#1890ff40}::ng-deep .has-floating-label.floating-label{position:relative;padding-top:14px}::ng-deep .has-floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:13px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .has-floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .has-floating-label .full-width{width:100%}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}\n"] }]
|
|
13471
13544
|
}], propDecorators: { lstOrg: [{
|
|
13472
13545
|
type: Input
|
|
13473
13546
|
}], lstRole: [{
|
|
@@ -13476,27 +13549,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
13476
13549
|
type: Input
|
|
13477
13550
|
}], lstEmailTemplate: [{
|
|
13478
13551
|
type: Input
|
|
13552
|
+
}], getdata: [{
|
|
13553
|
+
type: Output
|
|
13479
13554
|
}], onSave: [{
|
|
13480
|
-
type: Output
|
|
13481
|
-
args: ['onSave']
|
|
13555
|
+
type: Output
|
|
13482
13556
|
}], onDeleteStage: [{
|
|
13483
|
-
type: Output
|
|
13484
|
-
args: ['onDeleteStage']
|
|
13557
|
+
type: Output
|
|
13485
13558
|
}], onDeleteAction: [{
|
|
13486
|
-
type: Output
|
|
13487
|
-
args: ['onDeleteAction']
|
|
13559
|
+
type: Output
|
|
13488
13560
|
}], onDeleteRule: [{
|
|
13489
|
-
type: Output
|
|
13490
|
-
args: ['onDeleteRule']
|
|
13561
|
+
type: Output
|
|
13491
13562
|
}], onDeleteRuleLine: [{
|
|
13492
|
-
type: Output
|
|
13493
|
-
args: ['onDeleteRuleLine']
|
|
13563
|
+
type: Output
|
|
13494
13564
|
}], onCheckRule: [{
|
|
13495
|
-
type: Output
|
|
13496
|
-
args: ['onCheckRule']
|
|
13565
|
+
type: Output
|
|
13497
13566
|
}], onCheckAllRule: [{
|
|
13498
|
-
type: Output
|
|
13499
|
-
args: ['onCheckAllRule']
|
|
13567
|
+
type: Output
|
|
13500
13568
|
}], canvasRef: [{
|
|
13501
13569
|
type: ViewChild,
|
|
13502
13570
|
args: ['canvas', { static: true }]
|
|
@@ -14883,7 +14951,7 @@ class LayoutUser extends BaseComponent {
|
|
|
14883
14951
|
}
|
|
14884
14952
|
}
|
|
14885
14953
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LayoutUser, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
14886
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: LayoutUser, isStandalone: true, selector: "header-user", usesInheritance: true, ngImport: i0, template: "<button\n *ngIf=\"TokenStorage.getOrgName() && !isXSmall\"\n class=\"org-info\"\n [@fadeInOut]\n nz-button\n nzType=\"text\"\n nz-dropdown\n [nzDropdownMenu]=\"isOneUserMultiOrgs ? menuOrg : null\"\n [nzTrigger]=\"'click'\"\n style=\"height: var(--app-header-height); color: #ffffff\"\n>\n <nz-icon nzType=\"cluster\" nzTheme=\"outline\" />\n {{ TokenStorage.getOrgName() }}\n</button>\n\n<nz-dropdown-menu #menuOrg=\"nzDropdownMenu\">\n <ul nz-menu>\n @for (org of lstOrg; track $index) {\n <li *ngIf=\"$index > 0\" nz-menu-divider></li>\n <li nz-menu-item (click)=\"changeOrg(org)\">\n <nz-icon nzType=\"swap\" nzTheme=\"outline\" /> {{ org.Name }}\n </li>\n }\n </ul>\n</nz-dropdown-menu>\n\n<!-- N\u00DAT USER TR\u00CAN HEADER -->\n<button\n class=\"user-info\"\n nz-button\n nzType=\"text\"\n (click)=\"openUserDrawer()\"\n style=\"height: var(--app-header-height); color: #ffffff\"\n>\n <nz-icon nzType=\"user\" nzTheme=\"outline\" />\n {{ TokenStorage.getUserFullname() }}\n</button>\n\n<!-- ============================================== -->\n<!-- DRAWER G\u1ED8P PROFILE & T\u00C0I LI\u1EC6U -->\n<!-- ============================================== -->\n<nz-drawer\n [nzClosable]=\"true\"\n [nzVisible]=\"isUserDrawerVisible\"\n nzPlacement=\"right\"\n [nzTitle]=\"'T\u00E0i kho\u1EA3n: ' + TokenStorage.getUserFullname()\"\n [nzWidth]=\"500\"\n (nzOnClose)=\"closeUserDrawer()\"\n>\n <ng-container *nzDrawerContent>\n <!-- TH\u00D4NG TIN PH\u00D2NG BAN -->\n <div class=\"drawer-profile-header\">\n <div class=\"profile-avatar\">\n <nz-icon nzType=\"user\" nzTheme=\"outline\" />\n </div>\n <div class=\"profile-info\">\n <h4 class=\"profile-name\">{{ TokenStorage.getUserFullname() }}</h4>\n <p class=\"profile-org\">\n <nz-icon nzType=\"cluster\" nzTheme=\"outline\" />\n {{ TokenStorage.getOrgName() || \"Ch\u01B0a thu\u1ED9c \u0111\u01A1n v\u1ECB n\u00E0o\" }}\n </p>\n </div>\n <button nz-button nzType=\"primary\" nzDanger (click)=\"logout()\">{{ \"LOGOUT\" | translate }}</button>\n </div>\n\n <!-- TABS CH\u1EE8C N\u0102NG -->\n <nz-tabset nzSize=\"small\">\n <!-- TAB 1: C\u00C0I \u0110\u1EB6T GIAO DI\u1EC6N & B\u1EA2O M\u1EACT -->\n <nz-tab nzTitle=\"C\u00E0i \u0111\u1EB7t\">\n <div class=\"setting-container\">\n <div nz-row nzJustify=\"space-between\" nzAlign=\"middle\" class=\"setting-row\">\n <span style=\"font-weight: 500\">B\u1EA3o m\u1EADt t\u00E0i kho\u1EA3n</span>\n <button nz-button nzType=\"default\" (click)=\"openPasswordModal()\">\n <nz-icon nzType=\"lock\" /> \u0110\u1ED5i m\u1EADt kh\u1EA9u\n </button>\n </div>\n\n <nz-divider nzText=\"T\u00F9y ch\u1EC9nh giao di\u1EC7n\" nzOrientation=\"left\"></nz-divider>\n\n <div nz-row [nzGutter]=\"[16, 16]\">\n <div nz-col [nzSpan]=\"12\">\n <extend-checkbox\n [label]=\"'High contrast'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"isHighContrast\"\n (_ngModelChange)=\"onChangeHighContrast()\"\n ></extend-checkbox>\n </div>\n <div nz-col [nzSpan]=\"12\">\n <extend-checkbox\n [label]=\"'Dark Mode'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"isDarkMode\"\n (_ngModelChange)=\"onChangeDarkMode()\"\n ></extend-checkbox>\n </div>\n <div nz-col [nzSpan]=\"12\">\n <extend-input\n [label]=\"'Side width'\"\n [(_ngModel)]=\"sideWidth\"\n (_ngModelChange)=\"onChangeSideWidth()\"\n ></extend-input>\n </div>\n <!-- <div nz-col [nzSpan]=\"12\">\n <div style=\"margin-bottom: 5px\">Theme color:</div>\n <nz-color-picker\n nzShowText\n [ngModel]=\"\n profileService.userProfile[profileService.KEY_THEME_COLOR] ||\n profileService.themecf[profileService.KEY_THEME_COLOR] ||\n profileService.DEFAULT_THEME_COLOR\n \"\n (ngModelChange)=\"\n profileService.updateUserProfile(profileService.KEY_THEME_COLOR, $event); profileService.loadTheme()\n \"\n ></nz-color-picker>\n </div> -->\n <!-- <div nz-col [nzSpan]=\"12\">\n <div style=\"margin-bottom: 5px\">Theme menu color:</div>\n <nz-color-picker\n nzShowText\n [ngModel]=\"\n profileService.userProfile[profileService.KEY_THEME_MENU_COLOR] ||\n profileService.themecf[profileService.KEY_THEME_MENU_COLOR] ||\n profileService.DEFAULT_THEME_MENU_COLOR\n \"\n (ngModelChange)=\"\n profileService.updateUserProfile(profileService.KEY_THEME_MENU_COLOR, $event);\n profileService.loadTheme()\n \"\n ></nz-color-picker>\n </div> -->\n <!-- <div nz-col [nzSpan]=\"24\">\n <button nz-button nzType=\"default\" nzDanger nzBlock (click)=\"resetTheme()\">Reset Theme M\u1EB7c \u0111\u1ECBnh</button>\n </div> -->\n </div>\n </div>\n </nz-tab>\n\n <!-- TAB 2: T\u00C0I LI\u1EC6U HDSD -->\n <nz-tab nzTitle=\"T\u00E0i li\u1EC7u HDSD\">\n <nz-spin [nzSpinning]=\"loadingHDSD\">\n <nz-table [nzData]=\"hdsdData?.LstItem || []\" [nzBordered]=\"true\" [nzShowPagination]=\"false\" nzSize=\"small\">\n <thead>\n <tr>\n <th>N\u1ED9i dung</th>\n <th nzWidth=\"120px\">\u0110\u00EDnh k\u00E8m</th>\n <th nzWidth=\"100px\">C\u1EADp nh\u1EADt</th>\n </tr>\n </thead>\n <tbody>\n @for (row of hdsdData?.LstItem || []; track row.App_File_Id) {\n <tr>\n <td>{{ row.FileName || \"-\" }}</td>\n <td>\n @if (row.FilePath) {\n <a (click)=\"downloadHDSD(row)\"><nz-icon nzType=\"paper-clip\" /> T\u1EA3i v\u1EC1</a>\n } @else {\n -\n }\n </td>\n <td>{{ row.UpdateDate || row.CreateDate | date: \"dd/MM/yyyy\" }}</td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-spin>\n </nz-tab>\n </nz-tabset>\n </ng-container>\n</nz-drawer>\n\n<!-- ============================================== -->\n<!-- MODAL \u0110\u1ED4I M\u1EACT KH\u1EA8U -->\n<!-- ============================================== -->\n<nz-modal\n [(nzVisible)]=\"isPasswordModalVisible\"\n nzTitle=\"\u0110\u1ED5i m\u1EADt kh\u1EA9u\"\n [nzFooter]=\"null\"\n (nzOnCancel)=\"closePasswordModal()\"\n>\n <ng-container *nzModalContent>\n <form [formGroup]=\"passwordForm\" (ngSubmit)=\"submitPasswordChange()\" nz-form nzLayout=\"vertical\">\n <nz-form-item>\n <nz-form-label nzRequired>M\u1EADt kh\u1EA9u hi\u1EC7n t\u1EA1i</nz-form-label>\n <nz-form-control [nzErrorTip]=\"'B\u1EAFt bu\u1ED9c nh\u1EADp'\">\n <nz-input-group [nzSuffix]=\"CurrentPasswordVisible ? suffixShowCurrent : suffixHideCurrent\">\n <input nz-input type=\"{{ CurrentPasswordType }}\" formControlName=\"CurrentPassword\" />\n </nz-input-group>\n <ng-template #suffixShowCurrent\n ><nz-icon\n nzType=\"eye\"\n (click)=\"CurrentPasswordVisible = !CurrentPasswordVisible; CurrentPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideCurrent\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"CurrentPasswordVisible = !CurrentPasswordVisible; CurrentPasswordType = 'text'\"\n /></ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <nz-form-item>\n <nz-form-label nzRequired>M\u1EADt kh\u1EA9u m\u1EDBi</nz-form-label>\n <nz-form-control [nzErrorTip]=\"NewPasswordErrorTpl\">\n <nz-input-group [nzSuffix]=\"NewPasswordVisible ? suffixShowNew : suffixHideNew\">\n <input nz-input type=\"{{ NewPasswordType }}\" formControlName=\"NewPassword\" />\n </nz-input-group>\n <ng-template #suffixShowNew\n ><nz-icon nzType=\"eye\" (click)=\"NewPasswordVisible = !NewPasswordVisible; NewPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideNew\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"NewPasswordVisible = !NewPasswordVisible; NewPasswordType = 'text'\"\n /></ng-template>\n <ng-template #NewPasswordErrorTpl let-control>\n @if (control.errors?.[\"required\"]) {\n B\u1EAFt bu\u1ED9c nh\u1EADp\n }\n @if (control.errors?.[\"minlength\"]) {\n T\u1ED1i thi\u1EC3u 6 k\u00FD t\u1EF1\n }\n </ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <nz-form-item>\n <nz-form-label nzRequired>X\u00E1c nh\u1EADn m\u1EADt kh\u1EA9u m\u1EDBi</nz-form-label>\n <nz-form-control [nzErrorTip]=\"ConfirmPasswordErrorTpl\">\n <nz-input-group [nzSuffix]=\"ConfirmPasswordVisible ? suffixShowConfirm : suffixHideConfirm\">\n <input nz-input type=\"{{ ConfirmPasswordType }}\" formControlName=\"ConfirmPassword\" />\n </nz-input-group>\n <ng-template #suffixShowConfirm\n ><nz-icon\n nzType=\"eye\"\n (click)=\"ConfirmPasswordVisible = !ConfirmPasswordVisible; ConfirmPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideConfirm\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"ConfirmPasswordVisible = !ConfirmPasswordVisible; ConfirmPasswordType = 'text'\"\n /></ng-template>\n <ng-template #ConfirmPasswordErrorTpl let-control>\n @if (control.errors?.[\"required\"]) {\n B\u1EAFt bu\u1ED9c nh\u1EADp\n }\n @if (control.errors?.[\"passwordMismatch\"]) {\n M\u1EADt kh\u1EA9u kh\u00F4ng kh\u1EDBp\n }\n </ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <div nz-row nzJustify=\"end\">\n <button nz-button type=\"button\" (click)=\"closePasswordModal()\" style=\"margin-right: 8px\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\">L\u01B0u thay \u0111\u1ED5i</button>\n </div>\n </form>\n </ng-container>\n</nz-modal>\n", styles: ["@charset \"UTF-8\";.org-info,.user-info{font-weight:600}.user-info:hover,.org-info:hover{background-color:#ffffff26}.drawer-profile-header{display:flex;align-items:center;padding-bottom:20px;border-bottom:1px solid #f0f0f0;margin-bottom:10px}.drawer-profile-header .profile-avatar{width:50px;height:50px;border-radius:50%;background-color:#f0f5ff;color:#1890ff;display:flex;justify-content:center;align-items:center;font-size:24px;margin-right:15px}.drawer-profile-header .profile-info{flex:1;overflow:hidden}.drawer-profile-header .profile-info .profile-name{margin:0;font-size:16px;font-weight:600;color:#262626;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.drawer-profile-header .profile-info .profile-org{margin:4px 0 0;font-size:13px;color:#8c8c8c;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.drawer-profile-header .profile-info .profile-org i{margin-right:4px}.setting-container{padding:10px 0}.setting-container .setting-row{background:#fafafa;padding:12px 16px;border-radius:8px;margin-bottom:15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: NzLayoutModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i4$2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i4$2.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i4$2.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { kind: "directive", type: i5$3.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i5$3.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i5$3.NzDropdownButtonDirective, selector: "[nz-button][nz-dropdown]" }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$2.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzTreeModule }, { kind: "ngmodule", type: NzBackTopModule }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i3$6.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i3$6.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i6.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i6.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i6.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzSegmentedModule }, { kind: "ngmodule", type: NzBadgeModule }, { kind: "ngmodule", type: NzTabsModule }, { kind: "component", type: i1$6.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i1$6.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i4.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i4.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i4.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i4.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i4.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i4.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type: i15.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: i15.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i5.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i5.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzColorPickerModule }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "ngmodule", type: NzDividerModule }, { kind: "component", type: i17.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i2$3.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "component", type: ExtendCheckbox, selector: "extend-checkbox", inputs: ["label", "labelSpan", "labelFlex", "paddingTop", "disabled", "formData", "controlName", "valueType", "_ngModel"], outputs: ["_ngModelChange"] }, { kind: "component", type: ExtendInput, selector: "extend-input", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "inputClass", "labelSpan", "labelFlex", "inputFlex", "showClear", "disabled", "readOnly", "required", "noBottom", "selectModeType", "autocomplete", "autofocus", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "displayField", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "onclickClearIcon", "onenter"] }], animations: [fadeInOut] });
|
|
14954
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: LayoutUser, isStandalone: true, selector: "header-user", usesInheritance: true, ngImport: i0, template: "<button\n *ngIf=\"TokenStorage.getOrgName() && !isXSmall\"\n class=\"org-info\"\n [@fadeInOut]\n nz-button\n nzType=\"text\"\n nz-dropdown\n [nzDropdownMenu]=\"isOneUserMultiOrgs ? menuOrg : null\"\n [nzTrigger]=\"'click'\"\n style=\"height: var(--app-header-height); color: #ffffff\"\n>\n <nz-icon nzType=\"cluster\" nzTheme=\"outline\" />\n {{ TokenStorage.getOrgName() }}\n</button>\n\n<nz-dropdown-menu #menuOrg=\"nzDropdownMenu\">\n <ul nz-menu>\n @for (org of lstOrg; track $index) {\n <li *ngIf=\"$index > 0\" nz-menu-divider></li>\n <li nz-menu-item (click)=\"changeOrg(org)\">\n <nz-icon nzType=\"swap\" nzTheme=\"outline\" /> {{ org.Name }}\n </li>\n }\n </ul>\n</nz-dropdown-menu>\n\n<!-- N\u00DAT USER TR\u00CAN HEADER -->\n<button\n class=\"user-info\"\n nz-button\n nzType=\"text\"\n (click)=\"openUserDrawer()\"\n style=\"height: var(--app-header-height); color: #ffffff\"\n>\n <nz-icon nzType=\"user\" nzTheme=\"outline\" />\n {{ TokenStorage.getUserFullname() }}\n</button>\n\n<!-- ============================================== -->\n<!-- DRAWER G\u1ED8P PROFILE & T\u00C0I LI\u1EC6U -->\n<!-- ============================================== -->\n<nz-drawer\n [nzClosable]=\"true\"\n [nzVisible]=\"isUserDrawerVisible\"\n nzPlacement=\"right\"\n [nzTitle]=\"'T\u00E0i kho\u1EA3n: ' + TokenStorage.getUserFullname()\"\n [nzWidth]=\"500\"\n (nzOnClose)=\"closeUserDrawer()\"\n>\n <ng-container *nzDrawerContent>\n <!-- TH\u00D4NG TIN PH\u00D2NG BAN -->\n <div class=\"drawer-profile-header\">\n <div class=\"profile-avatar\">\n <nz-icon nzType=\"user\" nzTheme=\"outline\" />\n </div>\n <div class=\"profile-info\">\n <h4 class=\"profile-name\">{{ TokenStorage.getUserFullname() }}</h4>\n <p class=\"profile-org\">\n <nz-icon nzType=\"cluster\" nzTheme=\"outline\" />\n {{ TokenStorage.getOrgName() || \"Ch\u01B0a thu\u1ED9c \u0111\u01A1n v\u1ECB n\u00E0o\" }}\n </p>\n </div>\n <button nz-button nzType=\"primary\" nzDanger (click)=\"logout()\">{{ \"LOGOUT\" | translate }}</button>\n </div>\n\n <!-- TABS CH\u1EE8C N\u0102NG -->\n <nz-tabset nzSize=\"small\">\n <!-- TAB 1: C\u00C0I \u0110\u1EB6T GIAO DI\u1EC6N & B\u1EA2O M\u1EACT -->\n <nz-tab nzTitle=\"C\u00E0i \u0111\u1EB7t\">\n <div class=\"setting-container\">\n <div nz-row nzJustify=\"space-between\" nzAlign=\"middle\" class=\"setting-row\">\n <span style=\"font-weight: 500\">B\u1EA3o m\u1EADt t\u00E0i kho\u1EA3n</span>\n <button nz-button nzType=\"default\" (click)=\"openPasswordModal()\">\n <nz-icon nzType=\"lock\" /> \u0110\u1ED5i m\u1EADt kh\u1EA9u\n </button>\n </div>\n\n <nz-divider nzText=\"T\u00F9y ch\u1EC9nh giao di\u1EC7n\" nzOrientation=\"left\"></nz-divider>\n\n <div nz-row [nzGutter]=\"[16, 16]\">\n <div nz-col [nzSpan]=\"12\">\n <extend-checkbox\n [label]=\"'High contrast'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"isHighContrast\"\n (_ngModelChange)=\"onChangeHighContrast()\"\n ></extend-checkbox>\n </div>\n <div nz-col [nzSpan]=\"12\">\n <extend-checkbox\n [label]=\"'Dark Mode'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"isDarkMode\"\n (_ngModelChange)=\"onChangeDarkMode()\"\n ></extend-checkbox>\n </div>\n <div nz-col [nzSpan]=\"12\">\n <extend-input\n [label]=\"'Side width'\"\n [(_ngModel)]=\"sideWidth\"\n (_ngModelChange)=\"onChangeSideWidth()\"\n ></extend-input>\n </div>\n <!-- <div nz-col [nzSpan]=\"12\">\n <div style=\"margin-bottom: 5px\">Theme color:</div>\n <nz-color-picker\n nzShowText\n [ngModel]=\"\n profileService.userProfile[profileService.KEY_THEME_COLOR] ||\n profileService.themecf[profileService.KEY_THEME_COLOR] ||\n profileService.DEFAULT_THEME_COLOR\n \"\n (ngModelChange)=\"\n profileService.updateUserProfile(profileService.KEY_THEME_COLOR, $event); profileService.loadTheme()\n \"\n ></nz-color-picker>\n </div> -->\n <!-- <div nz-col [nzSpan]=\"12\">\n <div style=\"margin-bottom: 5px\">Theme menu color:</div>\n <nz-color-picker\n nzShowText\n [ngModel]=\"\n profileService.userProfile[profileService.KEY_THEME_MENU_COLOR] ||\n profileService.themecf[profileService.KEY_THEME_MENU_COLOR] ||\n profileService.DEFAULT_THEME_MENU_COLOR\n \"\n (ngModelChange)=\"\n profileService.updateUserProfile(profileService.KEY_THEME_MENU_COLOR, $event);\n profileService.loadTheme()\n \"\n ></nz-color-picker>\n </div> -->\n <!-- <div nz-col [nzSpan]=\"24\">\n <button nz-button nzType=\"default\" nzDanger nzBlock (click)=\"resetTheme()\">Reset Theme M\u1EB7c \u0111\u1ECBnh</button>\n </div> -->\n </div>\n </div>\n </nz-tab>\n\n <!-- TAB 2: T\u00C0I LI\u1EC6U HDSD -->\n <nz-tab nzTitle=\"T\u00E0i li\u1EC7u HDSD\">\n <nz-spin [nzSpinning]=\"loadingHDSD\">\n <nz-table [nzData]=\"hdsdData?.LstItem || []\" [nzBordered]=\"true\" [nzShowPagination]=\"false\" nzSize=\"small\">\n <thead>\n <tr>\n <th>N\u1ED9i dung</th>\n <th nzWidth=\"120px\">\u0110\u00EDnh k\u00E8m</th>\n <th nzWidth=\"100px\">C\u1EADp nh\u1EADt</th>\n </tr>\n </thead>\n <tbody>\n @for (row of hdsdData?.LstItem || []; track row.App_File_Id) {\n <tr>\n <td>{{ row.FileName || \"-\" }}</td>\n <td>\n <a (click)=\"downloadHDSD(row)\"><nz-icon nzType=\"paper-clip\" /> T\u1EA3i v\u1EC1</a>\n </td>\n <td>{{ row.UpdateDate || row.CreateDate | date: \"dd/MM/yyyy\" }}</td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-spin>\n </nz-tab>\n </nz-tabset>\n </ng-container>\n</nz-drawer>\n\n<!-- ============================================== -->\n<!-- MODAL \u0110\u1ED4I M\u1EACT KH\u1EA8U -->\n<!-- ============================================== -->\n<nz-modal\n [(nzVisible)]=\"isPasswordModalVisible\"\n nzTitle=\"\u0110\u1ED5i m\u1EADt kh\u1EA9u\"\n [nzFooter]=\"null\"\n (nzOnCancel)=\"closePasswordModal()\"\n>\n <ng-container *nzModalContent>\n <form [formGroup]=\"passwordForm\" (ngSubmit)=\"submitPasswordChange()\" nz-form nzLayout=\"vertical\">\n <nz-form-item>\n <nz-form-label nzRequired>M\u1EADt kh\u1EA9u hi\u1EC7n t\u1EA1i</nz-form-label>\n <nz-form-control [nzErrorTip]=\"'B\u1EAFt bu\u1ED9c nh\u1EADp'\">\n <nz-input-group [nzSuffix]=\"CurrentPasswordVisible ? suffixShowCurrent : suffixHideCurrent\">\n <input nz-input type=\"{{ CurrentPasswordType }}\" formControlName=\"CurrentPassword\" />\n </nz-input-group>\n <ng-template #suffixShowCurrent\n ><nz-icon\n nzType=\"eye\"\n (click)=\"CurrentPasswordVisible = !CurrentPasswordVisible; CurrentPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideCurrent\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"CurrentPasswordVisible = !CurrentPasswordVisible; CurrentPasswordType = 'text'\"\n /></ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <nz-form-item>\n <nz-form-label nzRequired>M\u1EADt kh\u1EA9u m\u1EDBi</nz-form-label>\n <nz-form-control [nzErrorTip]=\"NewPasswordErrorTpl\">\n <nz-input-group [nzSuffix]=\"NewPasswordVisible ? suffixShowNew : suffixHideNew\">\n <input nz-input type=\"{{ NewPasswordType }}\" formControlName=\"NewPassword\" />\n </nz-input-group>\n <ng-template #suffixShowNew\n ><nz-icon nzType=\"eye\" (click)=\"NewPasswordVisible = !NewPasswordVisible; NewPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideNew\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"NewPasswordVisible = !NewPasswordVisible; NewPasswordType = 'text'\"\n /></ng-template>\n <ng-template #NewPasswordErrorTpl let-control>\n @if (control.errors?.[\"required\"]) {\n B\u1EAFt bu\u1ED9c nh\u1EADp\n }\n @if (control.errors?.[\"minlength\"]) {\n T\u1ED1i thi\u1EC3u 6 k\u00FD t\u1EF1\n }\n </ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <nz-form-item>\n <nz-form-label nzRequired>X\u00E1c nh\u1EADn m\u1EADt kh\u1EA9u m\u1EDBi</nz-form-label>\n <nz-form-control [nzErrorTip]=\"ConfirmPasswordErrorTpl\">\n <nz-input-group [nzSuffix]=\"ConfirmPasswordVisible ? suffixShowConfirm : suffixHideConfirm\">\n <input nz-input type=\"{{ ConfirmPasswordType }}\" formControlName=\"ConfirmPassword\" />\n </nz-input-group>\n <ng-template #suffixShowConfirm\n ><nz-icon\n nzType=\"eye\"\n (click)=\"ConfirmPasswordVisible = !ConfirmPasswordVisible; ConfirmPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideConfirm\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"ConfirmPasswordVisible = !ConfirmPasswordVisible; ConfirmPasswordType = 'text'\"\n /></ng-template>\n <ng-template #ConfirmPasswordErrorTpl let-control>\n @if (control.errors?.[\"required\"]) {\n B\u1EAFt bu\u1ED9c nh\u1EADp\n }\n @if (control.errors?.[\"passwordMismatch\"]) {\n M\u1EADt kh\u1EA9u kh\u00F4ng kh\u1EDBp\n }\n </ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <div nz-row nzJustify=\"end\">\n <button nz-button type=\"button\" (click)=\"closePasswordModal()\" style=\"margin-right: 8px\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\">L\u01B0u thay \u0111\u1ED5i</button>\n </div>\n </form>\n </ng-container>\n</nz-modal>\n", styles: ["@charset \"UTF-8\";.org-info,.user-info{font-weight:600}.user-info:hover,.org-info:hover{background-color:#ffffff26}.drawer-profile-header{display:flex;align-items:center;padding-bottom:20px;border-bottom:1px solid #f0f0f0;margin-bottom:10px}.drawer-profile-header .profile-avatar{width:50px;height:50px;border-radius:50%;background-color:#f0f5ff;color:#1890ff;display:flex;justify-content:center;align-items:center;font-size:24px;margin-right:15px}.drawer-profile-header .profile-info{flex:1;overflow:hidden}.drawer-profile-header .profile-info .profile-name{margin:0;font-size:16px;font-weight:600;color:#262626;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.drawer-profile-header .profile-info .profile-org{margin:4px 0 0;font-size:13px;color:#8c8c8c;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.drawer-profile-header .profile-info .profile-org i{margin-right:4px}.setting-container{padding:10px 0}.setting-container .setting-row{background:#fafafa;padding:12px 16px;border-radius:8px;margin-bottom:15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: NzLayoutModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i4$2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i4$2.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i4$2.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { kind: "directive", type: i5$3.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i5$3.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i5$3.NzDropdownButtonDirective, selector: "[nz-button][nz-dropdown]" }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$2.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzTreeModule }, { kind: "ngmodule", type: NzBackTopModule }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i3$6.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i3$6.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i6.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i6.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "directive", type: i6.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { kind: "ngmodule", type: NzSegmentedModule }, { kind: "ngmodule", type: NzBadgeModule }, { kind: "ngmodule", type: NzTabsModule }, { kind: "component", type: i1$6.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: i1$6.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i4.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i4.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i4.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i4.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i4.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i4.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzModalModule }, { kind: "component", type: i15.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: i15.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i5.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i5.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzColorPickerModule }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "ngmodule", type: NzDividerModule }, { kind: "component", type: i17.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i2$3.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "component", type: ExtendCheckbox, selector: "extend-checkbox", inputs: ["label", "labelSpan", "labelFlex", "paddingTop", "disabled", "formData", "controlName", "valueType", "_ngModel"], outputs: ["_ngModelChange"] }, { kind: "component", type: ExtendInput, selector: "extend-input", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "inputClass", "labelSpan", "labelFlex", "inputFlex", "showClear", "disabled", "readOnly", "required", "noBottom", "selectModeType", "autocomplete", "autofocus", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "displayField", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "onclickClearIcon", "onenter"] }], animations: [fadeInOut] });
|
|
14887
14955
|
}
|
|
14888
14956
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LayoutUser, decorators: [{
|
|
14889
14957
|
type: Component,
|
|
@@ -14914,7 +14982,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
14914
14982
|
NzSpinModule,
|
|
14915
14983
|
ExtendCheckbox,
|
|
14916
14984
|
ExtendInput,
|
|
14917
|
-
], animations: [fadeInOut], template: "<button\n *ngIf=\"TokenStorage.getOrgName() && !isXSmall\"\n class=\"org-info\"\n [@fadeInOut]\n nz-button\n nzType=\"text\"\n nz-dropdown\n [nzDropdownMenu]=\"isOneUserMultiOrgs ? menuOrg : null\"\n [nzTrigger]=\"'click'\"\n style=\"height: var(--app-header-height); color: #ffffff\"\n>\n <nz-icon nzType=\"cluster\" nzTheme=\"outline\" />\n {{ TokenStorage.getOrgName() }}\n</button>\n\n<nz-dropdown-menu #menuOrg=\"nzDropdownMenu\">\n <ul nz-menu>\n @for (org of lstOrg; track $index) {\n <li *ngIf=\"$index > 0\" nz-menu-divider></li>\n <li nz-menu-item (click)=\"changeOrg(org)\">\n <nz-icon nzType=\"swap\" nzTheme=\"outline\" /> {{ org.Name }}\n </li>\n }\n </ul>\n</nz-dropdown-menu>\n\n<!-- N\u00DAT USER TR\u00CAN HEADER -->\n<button\n class=\"user-info\"\n nz-button\n nzType=\"text\"\n (click)=\"openUserDrawer()\"\n style=\"height: var(--app-header-height); color: #ffffff\"\n>\n <nz-icon nzType=\"user\" nzTheme=\"outline\" />\n {{ TokenStorage.getUserFullname() }}\n</button>\n\n<!-- ============================================== -->\n<!-- DRAWER G\u1ED8P PROFILE & T\u00C0I LI\u1EC6U -->\n<!-- ============================================== -->\n<nz-drawer\n [nzClosable]=\"true\"\n [nzVisible]=\"isUserDrawerVisible\"\n nzPlacement=\"right\"\n [nzTitle]=\"'T\u00E0i kho\u1EA3n: ' + TokenStorage.getUserFullname()\"\n [nzWidth]=\"500\"\n (nzOnClose)=\"closeUserDrawer()\"\n>\n <ng-container *nzDrawerContent>\n <!-- TH\u00D4NG TIN PH\u00D2NG BAN -->\n <div class=\"drawer-profile-header\">\n <div class=\"profile-avatar\">\n <nz-icon nzType=\"user\" nzTheme=\"outline\" />\n </div>\n <div class=\"profile-info\">\n <h4 class=\"profile-name\">{{ TokenStorage.getUserFullname() }}</h4>\n <p class=\"profile-org\">\n <nz-icon nzType=\"cluster\" nzTheme=\"outline\" />\n {{ TokenStorage.getOrgName() || \"Ch\u01B0a thu\u1ED9c \u0111\u01A1n v\u1ECB n\u00E0o\" }}\n </p>\n </div>\n <button nz-button nzType=\"primary\" nzDanger (click)=\"logout()\">{{ \"LOGOUT\" | translate }}</button>\n </div>\n\n <!-- TABS CH\u1EE8C N\u0102NG -->\n <nz-tabset nzSize=\"small\">\n <!-- TAB 1: C\u00C0I \u0110\u1EB6T GIAO DI\u1EC6N & B\u1EA2O M\u1EACT -->\n <nz-tab nzTitle=\"C\u00E0i \u0111\u1EB7t\">\n <div class=\"setting-container\">\n <div nz-row nzJustify=\"space-between\" nzAlign=\"middle\" class=\"setting-row\">\n <span style=\"font-weight: 500\">B\u1EA3o m\u1EADt t\u00E0i kho\u1EA3n</span>\n <button nz-button nzType=\"default\" (click)=\"openPasswordModal()\">\n <nz-icon nzType=\"lock\" /> \u0110\u1ED5i m\u1EADt kh\u1EA9u\n </button>\n </div>\n\n <nz-divider nzText=\"T\u00F9y ch\u1EC9nh giao di\u1EC7n\" nzOrientation=\"left\"></nz-divider>\n\n <div nz-row [nzGutter]=\"[16, 16]\">\n <div nz-col [nzSpan]=\"12\">\n <extend-checkbox\n [label]=\"'High contrast'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"isHighContrast\"\n (_ngModelChange)=\"onChangeHighContrast()\"\n ></extend-checkbox>\n </div>\n <div nz-col [nzSpan]=\"12\">\n <extend-checkbox\n [label]=\"'Dark Mode'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"isDarkMode\"\n (_ngModelChange)=\"onChangeDarkMode()\"\n ></extend-checkbox>\n </div>\n <div nz-col [nzSpan]=\"12\">\n <extend-input\n [label]=\"'Side width'\"\n [(_ngModel)]=\"sideWidth\"\n (_ngModelChange)=\"onChangeSideWidth()\"\n ></extend-input>\n </div>\n <!-- <div nz-col [nzSpan]=\"12\">\n <div style=\"margin-bottom: 5px\">Theme color:</div>\n <nz-color-picker\n nzShowText\n [ngModel]=\"\n profileService.userProfile[profileService.KEY_THEME_COLOR] ||\n profileService.themecf[profileService.KEY_THEME_COLOR] ||\n profileService.DEFAULT_THEME_COLOR\n \"\n (ngModelChange)=\"\n profileService.updateUserProfile(profileService.KEY_THEME_COLOR, $event); profileService.loadTheme()\n \"\n ></nz-color-picker>\n </div> -->\n <!-- <div nz-col [nzSpan]=\"12\">\n <div style=\"margin-bottom: 5px\">Theme menu color:</div>\n <nz-color-picker\n nzShowText\n [ngModel]=\"\n profileService.userProfile[profileService.KEY_THEME_MENU_COLOR] ||\n profileService.themecf[profileService.KEY_THEME_MENU_COLOR] ||\n profileService.DEFAULT_THEME_MENU_COLOR\n \"\n (ngModelChange)=\"\n profileService.updateUserProfile(profileService.KEY_THEME_MENU_COLOR, $event);\n profileService.loadTheme()\n \"\n ></nz-color-picker>\n </div> -->\n <!-- <div nz-col [nzSpan]=\"24\">\n <button nz-button nzType=\"default\" nzDanger nzBlock (click)=\"resetTheme()\">Reset Theme M\u1EB7c \u0111\u1ECBnh</button>\n </div> -->\n </div>\n </div>\n </nz-tab>\n\n <!-- TAB 2: T\u00C0I LI\u1EC6U HDSD -->\n <nz-tab nzTitle=\"T\u00E0i li\u1EC7u HDSD\">\n <nz-spin [nzSpinning]=\"loadingHDSD\">\n <nz-table [nzData]=\"hdsdData?.LstItem || []\" [nzBordered]=\"true\" [nzShowPagination]=\"false\" nzSize=\"small\">\n <thead>\n <tr>\n <th>N\u1ED9i dung</th>\n <th nzWidth=\"120px\">\u0110\u00EDnh k\u00E8m</th>\n <th nzWidth=\"100px\">C\u1EADp nh\u1EADt</th>\n </tr>\n </thead>\n <tbody>\n @for (row of hdsdData?.LstItem || []; track row.App_File_Id) {\n <tr>\n <td>{{ row.FileName || \"-\" }}</td>\n <td>\n @if (row.FilePath) {\n <a (click)=\"downloadHDSD(row)\"><nz-icon nzType=\"paper-clip\" /> T\u1EA3i v\u1EC1</a>\n } @else {\n -\n }\n </td>\n <td>{{ row.UpdateDate || row.CreateDate | date: \"dd/MM/yyyy\" }}</td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-spin>\n </nz-tab>\n </nz-tabset>\n </ng-container>\n</nz-drawer>\n\n<!-- ============================================== -->\n<!-- MODAL \u0110\u1ED4I M\u1EACT KH\u1EA8U -->\n<!-- ============================================== -->\n<nz-modal\n [(nzVisible)]=\"isPasswordModalVisible\"\n nzTitle=\"\u0110\u1ED5i m\u1EADt kh\u1EA9u\"\n [nzFooter]=\"null\"\n (nzOnCancel)=\"closePasswordModal()\"\n>\n <ng-container *nzModalContent>\n <form [formGroup]=\"passwordForm\" (ngSubmit)=\"submitPasswordChange()\" nz-form nzLayout=\"vertical\">\n <nz-form-item>\n <nz-form-label nzRequired>M\u1EADt kh\u1EA9u hi\u1EC7n t\u1EA1i</nz-form-label>\n <nz-form-control [nzErrorTip]=\"'B\u1EAFt bu\u1ED9c nh\u1EADp'\">\n <nz-input-group [nzSuffix]=\"CurrentPasswordVisible ? suffixShowCurrent : suffixHideCurrent\">\n <input nz-input type=\"{{ CurrentPasswordType }}\" formControlName=\"CurrentPassword\" />\n </nz-input-group>\n <ng-template #suffixShowCurrent\n ><nz-icon\n nzType=\"eye\"\n (click)=\"CurrentPasswordVisible = !CurrentPasswordVisible; CurrentPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideCurrent\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"CurrentPasswordVisible = !CurrentPasswordVisible; CurrentPasswordType = 'text'\"\n /></ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <nz-form-item>\n <nz-form-label nzRequired>M\u1EADt kh\u1EA9u m\u1EDBi</nz-form-label>\n <nz-form-control [nzErrorTip]=\"NewPasswordErrorTpl\">\n <nz-input-group [nzSuffix]=\"NewPasswordVisible ? suffixShowNew : suffixHideNew\">\n <input nz-input type=\"{{ NewPasswordType }}\" formControlName=\"NewPassword\" />\n </nz-input-group>\n <ng-template #suffixShowNew\n ><nz-icon nzType=\"eye\" (click)=\"NewPasswordVisible = !NewPasswordVisible; NewPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideNew\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"NewPasswordVisible = !NewPasswordVisible; NewPasswordType = 'text'\"\n /></ng-template>\n <ng-template #NewPasswordErrorTpl let-control>\n @if (control.errors?.[\"required\"]) {\n B\u1EAFt bu\u1ED9c nh\u1EADp\n }\n @if (control.errors?.[\"minlength\"]) {\n T\u1ED1i thi\u1EC3u 6 k\u00FD t\u1EF1\n }\n </ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <nz-form-item>\n <nz-form-label nzRequired>X\u00E1c nh\u1EADn m\u1EADt kh\u1EA9u m\u1EDBi</nz-form-label>\n <nz-form-control [nzErrorTip]=\"ConfirmPasswordErrorTpl\">\n <nz-input-group [nzSuffix]=\"ConfirmPasswordVisible ? suffixShowConfirm : suffixHideConfirm\">\n <input nz-input type=\"{{ ConfirmPasswordType }}\" formControlName=\"ConfirmPassword\" />\n </nz-input-group>\n <ng-template #suffixShowConfirm\n ><nz-icon\n nzType=\"eye\"\n (click)=\"ConfirmPasswordVisible = !ConfirmPasswordVisible; ConfirmPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideConfirm\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"ConfirmPasswordVisible = !ConfirmPasswordVisible; ConfirmPasswordType = 'text'\"\n /></ng-template>\n <ng-template #ConfirmPasswordErrorTpl let-control>\n @if (control.errors?.[\"required\"]) {\n B\u1EAFt bu\u1ED9c nh\u1EADp\n }\n @if (control.errors?.[\"passwordMismatch\"]) {\n M\u1EADt kh\u1EA9u kh\u00F4ng kh\u1EDBp\n }\n </ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <div nz-row nzJustify=\"end\">\n <button nz-button type=\"button\" (click)=\"closePasswordModal()\" style=\"margin-right: 8px\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\">L\u01B0u thay \u0111\u1ED5i</button>\n </div>\n </form>\n </ng-container>\n</nz-modal>\n", styles: ["@charset \"UTF-8\";.org-info,.user-info{font-weight:600}.user-info:hover,.org-info:hover{background-color:#ffffff26}.drawer-profile-header{display:flex;align-items:center;padding-bottom:20px;border-bottom:1px solid #f0f0f0;margin-bottom:10px}.drawer-profile-header .profile-avatar{width:50px;height:50px;border-radius:50%;background-color:#f0f5ff;color:#1890ff;display:flex;justify-content:center;align-items:center;font-size:24px;margin-right:15px}.drawer-profile-header .profile-info{flex:1;overflow:hidden}.drawer-profile-header .profile-info .profile-name{margin:0;font-size:16px;font-weight:600;color:#262626;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.drawer-profile-header .profile-info .profile-org{margin:4px 0 0;font-size:13px;color:#8c8c8c;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.drawer-profile-header .profile-info .profile-org i{margin-right:4px}.setting-container{padding:10px 0}.setting-container .setting-row{background:#fafafa;padding:12px 16px;border-radius:8px;margin-bottom:15px}\n"] }]
|
|
14985
|
+
], animations: [fadeInOut], template: "<button\n *ngIf=\"TokenStorage.getOrgName() && !isXSmall\"\n class=\"org-info\"\n [@fadeInOut]\n nz-button\n nzType=\"text\"\n nz-dropdown\n [nzDropdownMenu]=\"isOneUserMultiOrgs ? menuOrg : null\"\n [nzTrigger]=\"'click'\"\n style=\"height: var(--app-header-height); color: #ffffff\"\n>\n <nz-icon nzType=\"cluster\" nzTheme=\"outline\" />\n {{ TokenStorage.getOrgName() }}\n</button>\n\n<nz-dropdown-menu #menuOrg=\"nzDropdownMenu\">\n <ul nz-menu>\n @for (org of lstOrg; track $index) {\n <li *ngIf=\"$index > 0\" nz-menu-divider></li>\n <li nz-menu-item (click)=\"changeOrg(org)\">\n <nz-icon nzType=\"swap\" nzTheme=\"outline\" /> {{ org.Name }}\n </li>\n }\n </ul>\n</nz-dropdown-menu>\n\n<!-- N\u00DAT USER TR\u00CAN HEADER -->\n<button\n class=\"user-info\"\n nz-button\n nzType=\"text\"\n (click)=\"openUserDrawer()\"\n style=\"height: var(--app-header-height); color: #ffffff\"\n>\n <nz-icon nzType=\"user\" nzTheme=\"outline\" />\n {{ TokenStorage.getUserFullname() }}\n</button>\n\n<!-- ============================================== -->\n<!-- DRAWER G\u1ED8P PROFILE & T\u00C0I LI\u1EC6U -->\n<!-- ============================================== -->\n<nz-drawer\n [nzClosable]=\"true\"\n [nzVisible]=\"isUserDrawerVisible\"\n nzPlacement=\"right\"\n [nzTitle]=\"'T\u00E0i kho\u1EA3n: ' + TokenStorage.getUserFullname()\"\n [nzWidth]=\"500\"\n (nzOnClose)=\"closeUserDrawer()\"\n>\n <ng-container *nzDrawerContent>\n <!-- TH\u00D4NG TIN PH\u00D2NG BAN -->\n <div class=\"drawer-profile-header\">\n <div class=\"profile-avatar\">\n <nz-icon nzType=\"user\" nzTheme=\"outline\" />\n </div>\n <div class=\"profile-info\">\n <h4 class=\"profile-name\">{{ TokenStorage.getUserFullname() }}</h4>\n <p class=\"profile-org\">\n <nz-icon nzType=\"cluster\" nzTheme=\"outline\" />\n {{ TokenStorage.getOrgName() || \"Ch\u01B0a thu\u1ED9c \u0111\u01A1n v\u1ECB n\u00E0o\" }}\n </p>\n </div>\n <button nz-button nzType=\"primary\" nzDanger (click)=\"logout()\">{{ \"LOGOUT\" | translate }}</button>\n </div>\n\n <!-- TABS CH\u1EE8C N\u0102NG -->\n <nz-tabset nzSize=\"small\">\n <!-- TAB 1: C\u00C0I \u0110\u1EB6T GIAO DI\u1EC6N & B\u1EA2O M\u1EACT -->\n <nz-tab nzTitle=\"C\u00E0i \u0111\u1EB7t\">\n <div class=\"setting-container\">\n <div nz-row nzJustify=\"space-between\" nzAlign=\"middle\" class=\"setting-row\">\n <span style=\"font-weight: 500\">B\u1EA3o m\u1EADt t\u00E0i kho\u1EA3n</span>\n <button nz-button nzType=\"default\" (click)=\"openPasswordModal()\">\n <nz-icon nzType=\"lock\" /> \u0110\u1ED5i m\u1EADt kh\u1EA9u\n </button>\n </div>\n\n <nz-divider nzText=\"T\u00F9y ch\u1EC9nh giao di\u1EC7n\" nzOrientation=\"left\"></nz-divider>\n\n <div nz-row [nzGutter]=\"[16, 16]\">\n <div nz-col [nzSpan]=\"12\">\n <extend-checkbox\n [label]=\"'High contrast'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"isHighContrast\"\n (_ngModelChange)=\"onChangeHighContrast()\"\n ></extend-checkbox>\n </div>\n <div nz-col [nzSpan]=\"12\">\n <extend-checkbox\n [label]=\"'Dark Mode'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"isDarkMode\"\n (_ngModelChange)=\"onChangeDarkMode()\"\n ></extend-checkbox>\n </div>\n <div nz-col [nzSpan]=\"12\">\n <extend-input\n [label]=\"'Side width'\"\n [(_ngModel)]=\"sideWidth\"\n (_ngModelChange)=\"onChangeSideWidth()\"\n ></extend-input>\n </div>\n <!-- <div nz-col [nzSpan]=\"12\">\n <div style=\"margin-bottom: 5px\">Theme color:</div>\n <nz-color-picker\n nzShowText\n [ngModel]=\"\n profileService.userProfile[profileService.KEY_THEME_COLOR] ||\n profileService.themecf[profileService.KEY_THEME_COLOR] ||\n profileService.DEFAULT_THEME_COLOR\n \"\n (ngModelChange)=\"\n profileService.updateUserProfile(profileService.KEY_THEME_COLOR, $event); profileService.loadTheme()\n \"\n ></nz-color-picker>\n </div> -->\n <!-- <div nz-col [nzSpan]=\"12\">\n <div style=\"margin-bottom: 5px\">Theme menu color:</div>\n <nz-color-picker\n nzShowText\n [ngModel]=\"\n profileService.userProfile[profileService.KEY_THEME_MENU_COLOR] ||\n profileService.themecf[profileService.KEY_THEME_MENU_COLOR] ||\n profileService.DEFAULT_THEME_MENU_COLOR\n \"\n (ngModelChange)=\"\n profileService.updateUserProfile(profileService.KEY_THEME_MENU_COLOR, $event);\n profileService.loadTheme()\n \"\n ></nz-color-picker>\n </div> -->\n <!-- <div nz-col [nzSpan]=\"24\">\n <button nz-button nzType=\"default\" nzDanger nzBlock (click)=\"resetTheme()\">Reset Theme M\u1EB7c \u0111\u1ECBnh</button>\n </div> -->\n </div>\n </div>\n </nz-tab>\n\n <!-- TAB 2: T\u00C0I LI\u1EC6U HDSD -->\n <nz-tab nzTitle=\"T\u00E0i li\u1EC7u HDSD\">\n <nz-spin [nzSpinning]=\"loadingHDSD\">\n <nz-table [nzData]=\"hdsdData?.LstItem || []\" [nzBordered]=\"true\" [nzShowPagination]=\"false\" nzSize=\"small\">\n <thead>\n <tr>\n <th>N\u1ED9i dung</th>\n <th nzWidth=\"120px\">\u0110\u00EDnh k\u00E8m</th>\n <th nzWidth=\"100px\">C\u1EADp nh\u1EADt</th>\n </tr>\n </thead>\n <tbody>\n @for (row of hdsdData?.LstItem || []; track row.App_File_Id) {\n <tr>\n <td>{{ row.FileName || \"-\" }}</td>\n <td>\n <a (click)=\"downloadHDSD(row)\"><nz-icon nzType=\"paper-clip\" /> T\u1EA3i v\u1EC1</a>\n </td>\n <td>{{ row.UpdateDate || row.CreateDate | date: \"dd/MM/yyyy\" }}</td>\n </tr>\n }\n </tbody>\n </nz-table>\n </nz-spin>\n </nz-tab>\n </nz-tabset>\n </ng-container>\n</nz-drawer>\n\n<!-- ============================================== -->\n<!-- MODAL \u0110\u1ED4I M\u1EACT KH\u1EA8U -->\n<!-- ============================================== -->\n<nz-modal\n [(nzVisible)]=\"isPasswordModalVisible\"\n nzTitle=\"\u0110\u1ED5i m\u1EADt kh\u1EA9u\"\n [nzFooter]=\"null\"\n (nzOnCancel)=\"closePasswordModal()\"\n>\n <ng-container *nzModalContent>\n <form [formGroup]=\"passwordForm\" (ngSubmit)=\"submitPasswordChange()\" nz-form nzLayout=\"vertical\">\n <nz-form-item>\n <nz-form-label nzRequired>M\u1EADt kh\u1EA9u hi\u1EC7n t\u1EA1i</nz-form-label>\n <nz-form-control [nzErrorTip]=\"'B\u1EAFt bu\u1ED9c nh\u1EADp'\">\n <nz-input-group [nzSuffix]=\"CurrentPasswordVisible ? suffixShowCurrent : suffixHideCurrent\">\n <input nz-input type=\"{{ CurrentPasswordType }}\" formControlName=\"CurrentPassword\" />\n </nz-input-group>\n <ng-template #suffixShowCurrent\n ><nz-icon\n nzType=\"eye\"\n (click)=\"CurrentPasswordVisible = !CurrentPasswordVisible; CurrentPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideCurrent\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"CurrentPasswordVisible = !CurrentPasswordVisible; CurrentPasswordType = 'text'\"\n /></ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <nz-form-item>\n <nz-form-label nzRequired>M\u1EADt kh\u1EA9u m\u1EDBi</nz-form-label>\n <nz-form-control [nzErrorTip]=\"NewPasswordErrorTpl\">\n <nz-input-group [nzSuffix]=\"NewPasswordVisible ? suffixShowNew : suffixHideNew\">\n <input nz-input type=\"{{ NewPasswordType }}\" formControlName=\"NewPassword\" />\n </nz-input-group>\n <ng-template #suffixShowNew\n ><nz-icon nzType=\"eye\" (click)=\"NewPasswordVisible = !NewPasswordVisible; NewPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideNew\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"NewPasswordVisible = !NewPasswordVisible; NewPasswordType = 'text'\"\n /></ng-template>\n <ng-template #NewPasswordErrorTpl let-control>\n @if (control.errors?.[\"required\"]) {\n B\u1EAFt bu\u1ED9c nh\u1EADp\n }\n @if (control.errors?.[\"minlength\"]) {\n T\u1ED1i thi\u1EC3u 6 k\u00FD t\u1EF1\n }\n </ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <nz-form-item>\n <nz-form-label nzRequired>X\u00E1c nh\u1EADn m\u1EADt kh\u1EA9u m\u1EDBi</nz-form-label>\n <nz-form-control [nzErrorTip]=\"ConfirmPasswordErrorTpl\">\n <nz-input-group [nzSuffix]=\"ConfirmPasswordVisible ? suffixShowConfirm : suffixHideConfirm\">\n <input nz-input type=\"{{ ConfirmPasswordType }}\" formControlName=\"ConfirmPassword\" />\n </nz-input-group>\n <ng-template #suffixShowConfirm\n ><nz-icon\n nzType=\"eye\"\n (click)=\"ConfirmPasswordVisible = !ConfirmPasswordVisible; ConfirmPasswordType = 'password'\"\n /></ng-template>\n <ng-template #suffixHideConfirm\n ><nz-icon\n nzType=\"eye-invisible\"\n (click)=\"ConfirmPasswordVisible = !ConfirmPasswordVisible; ConfirmPasswordType = 'text'\"\n /></ng-template>\n <ng-template #ConfirmPasswordErrorTpl let-control>\n @if (control.errors?.[\"required\"]) {\n B\u1EAFt bu\u1ED9c nh\u1EADp\n }\n @if (control.errors?.[\"passwordMismatch\"]) {\n M\u1EADt kh\u1EA9u kh\u00F4ng kh\u1EDBp\n }\n </ng-template>\n </nz-form-control>\n </nz-form-item>\n\n <div nz-row nzJustify=\"end\">\n <button nz-button type=\"button\" (click)=\"closePasswordModal()\" style=\"margin-right: 8px\">H\u1EE7y</button>\n <button nz-button nzType=\"primary\">L\u01B0u thay \u0111\u1ED5i</button>\n </div>\n </form>\n </ng-container>\n</nz-modal>\n", styles: ["@charset \"UTF-8\";.org-info,.user-info{font-weight:600}.user-info:hover,.org-info:hover{background-color:#ffffff26}.drawer-profile-header{display:flex;align-items:center;padding-bottom:20px;border-bottom:1px solid #f0f0f0;margin-bottom:10px}.drawer-profile-header .profile-avatar{width:50px;height:50px;border-radius:50%;background-color:#f0f5ff;color:#1890ff;display:flex;justify-content:center;align-items:center;font-size:24px;margin-right:15px}.drawer-profile-header .profile-info{flex:1;overflow:hidden}.drawer-profile-header .profile-info .profile-name{margin:0;font-size:16px;font-weight:600;color:#262626;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.drawer-profile-header .profile-info .profile-org{margin:4px 0 0;font-size:13px;color:#8c8c8c;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.drawer-profile-header .profile-info .profile-org i{margin-right:4px}.setting-container{padding:10px 0}.setting-container .setting-row{background:#fafafa;padding:12px 16px;border-radius:8px;margin-bottom:15px}\n"] }]
|
|
14918
14986
|
}] });
|
|
14919
14987
|
|
|
14920
14988
|
class HeaderSearchComponent extends BaseOverlayComponent {
|
|
@@ -15869,6 +15937,7 @@ const URLs$4 = {
|
|
|
15869
15937
|
getUserActionByOrg: '/api/WF/Workflow/GetUserActionByOrg',
|
|
15870
15938
|
getWfTemplate: '/api/WF/Workflow/getWfTemplate',
|
|
15871
15939
|
getWfTemplateByCode: '/api/WF/Workflow/getWfTemplateByCode',
|
|
15940
|
+
getDataForRule: '/api/WF/Workflow/getDataForRule',
|
|
15872
15941
|
};
|
|
15873
15942
|
class WFService extends HTTPService {
|
|
15874
15943
|
cms = inject(CommonService);
|
|
@@ -15883,10 +15952,8 @@ class WFService extends HTTPService {
|
|
|
15883
15952
|
return this.getParams(AppGlobals.apiEndpoint + URLs$4.getWfData, params);
|
|
15884
15953
|
}
|
|
15885
15954
|
getDataForRule(templateId) {
|
|
15886
|
-
|
|
15887
|
-
|
|
15888
|
-
Params: [templateId],
|
|
15889
|
-
});
|
|
15955
|
+
const params = new HttpParams().append('templateId', templateId);
|
|
15956
|
+
return this.getParams(AppGlobals.apiEndpoint + URLs$4.getDataForRule, params);
|
|
15890
15957
|
}
|
|
15891
15958
|
checkRule(ruleLine, sourceActionId) {
|
|
15892
15959
|
const params = new HttpParams().append('sourceActionId', sourceActionId);
|
|
@@ -16720,11 +16787,11 @@ let WF_TemplateDetail$1 = class WF_TemplateDetail extends BaseComponent {
|
|
|
16720
16787
|
this.wfeditor.actionRuleModalVisible = false;
|
|
16721
16788
|
}
|
|
16722
16789
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_TemplateDetail, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
16723
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: WF_TemplateDetail, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "wfeditor", first: true, predicate: ["wfeditor"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"workflow-wrapper\" style=\"height: calc(100vh - 110px)\">\n <app-workflow-editor\n #wfeditor\n [lstOrg]=\"lstOrg\"\n [lstRole]=\"lstRole\"\n [lstUser]=\"lstUser\"\n [lstEmailTemplate]=\"lstEmailTemplate\"\n (onSave)=\"save($event)\"\n (onDeleteStage)=\"deleteStage($event)\"\n (onDeleteAction)=\"deleteAction($event)\"\n (onDeleteRule)=\"deleteRule($event)\"\n (onDeleteRuleLine)=\"deleteRuleLine($event)\"\n (onCheckRule)=\"onCheckRule($event)\"\n (onCheckAllRule)=\"onCheckAllRule($event)\"\n ></app-workflow-editor>\n</div>\n", styles: [".workflow-wrapper{position:relative}\n"], dependencies: [{ kind: "component", type: WorkflowEditorComponent, selector: "app-workflow-editor", inputs: ["lstOrg", "lstRole", "lstUser", "lstEmailTemplate"], outputs: ["onSave", "onDeleteStage", "onDeleteAction", "onDeleteRule", "onDeleteRuleLine", "onCheckRule", "onCheckAllRule"] }] });
|
|
16790
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: WF_TemplateDetail, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "wfeditor", first: true, predicate: ["wfeditor"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"workflow-wrapper\" style=\"height: calc(100vh - 110px)\">\n <app-workflow-editor\n #wfeditor\n [lstOrg]=\"lstOrg\"\n [lstRole]=\"lstRole\"\n [lstUser]=\"lstUser\"\n [lstEmailTemplate]=\"lstEmailTemplate\"\n (onSave)=\"save($event)\"\n (onDeleteStage)=\"deleteStage($event)\"\n (onDeleteAction)=\"deleteAction($event)\"\n (onDeleteRule)=\"deleteRule($event)\"\n (onDeleteRuleLine)=\"deleteRuleLine($event)\"\n (onCheckRule)=\"onCheckRule($event)\"\n (onCheckAllRule)=\"onCheckAllRule($event)\"\n (getdata)=\"getData()\"\n ></app-workflow-editor>\n</div>\n", styles: [".workflow-wrapper{position:relative}\n"], dependencies: [{ kind: "component", type: WorkflowEditorComponent, selector: "app-workflow-editor", inputs: ["lstOrg", "lstRole", "lstUser", "lstEmailTemplate"], outputs: ["getdata", "onSave", "onDeleteStage", "onDeleteAction", "onDeleteRule", "onDeleteRuleLine", "onCheckRule", "onCheckAllRule"] }] });
|
|
16724
16791
|
};
|
|
16725
16792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_TemplateDetail$1, decorators: [{
|
|
16726
16793
|
type: Component,
|
|
16727
|
-
args: [{ imports: [WorkflowEditorComponent], template: "<div class=\"workflow-wrapper\" style=\"height: calc(100vh - 110px)\">\n <app-workflow-editor\n #wfeditor\n [lstOrg]=\"lstOrg\"\n [lstRole]=\"lstRole\"\n [lstUser]=\"lstUser\"\n [lstEmailTemplate]=\"lstEmailTemplate\"\n (onSave)=\"save($event)\"\n (onDeleteStage)=\"deleteStage($event)\"\n (onDeleteAction)=\"deleteAction($event)\"\n (onDeleteRule)=\"deleteRule($event)\"\n (onDeleteRuleLine)=\"deleteRuleLine($event)\"\n (onCheckRule)=\"onCheckRule($event)\"\n (onCheckAllRule)=\"onCheckAllRule($event)\"\n ></app-workflow-editor>\n</div>\n", styles: [".workflow-wrapper{position:relative}\n"] }]
|
|
16794
|
+
args: [{ imports: [WorkflowEditorComponent], template: "<div class=\"workflow-wrapper\" style=\"height: calc(100vh - 110px)\">\n <app-workflow-editor\n #wfeditor\n [lstOrg]=\"lstOrg\"\n [lstRole]=\"lstRole\"\n [lstUser]=\"lstUser\"\n [lstEmailTemplate]=\"lstEmailTemplate\"\n (onSave)=\"save($event)\"\n (onDeleteStage)=\"deleteStage($event)\"\n (onDeleteAction)=\"deleteAction($event)\"\n (onDeleteRule)=\"deleteRule($event)\"\n (onDeleteRuleLine)=\"deleteRuleLine($event)\"\n (onCheckRule)=\"onCheckRule($event)\"\n (onCheckAllRule)=\"onCheckAllRule($event)\"\n (getdata)=\"getData()\"\n ></app-workflow-editor>\n</div>\n", styles: [".workflow-wrapper{position:relative}\n"] }]
|
|
16728
16795
|
}], propDecorators: { wfeditor: [{
|
|
16729
16796
|
type: ViewChild,
|
|
16730
16797
|
args: ['wfeditor']
|
|
@@ -17148,6 +17215,7 @@ const URLs$1 = {
|
|
|
17148
17215
|
getInforAction: '/api/wf/doc/GetInforAction',
|
|
17149
17216
|
getInforChangeUserByDocId: '/api/wf/doc/GetInforChangeUserByDocId',
|
|
17150
17217
|
getHistoryChangeAction: '/api/wf/doc/GetHistoryChangeAction',
|
|
17218
|
+
GetSwimlaneData: '/api/wf/doc/GetSwimlaneData',
|
|
17151
17219
|
changeUser: '/api/wf/doc/ChangeUser',
|
|
17152
17220
|
startDocProcess: '/api/wf/doc/startDocProcess',
|
|
17153
17221
|
changeAction: '/api/wf/doc/changeAction',
|
|
@@ -17190,6 +17258,10 @@ class WF_DocService extends HTTPService {
|
|
|
17190
17258
|
const params = new HttpParams().append('id', id);
|
|
17191
17259
|
return this.postParams(AppGlobals.apiEndpoint + URLs$1.getHistoryChangeAction, params);
|
|
17192
17260
|
}
|
|
17261
|
+
GetSwimlaneData(id) {
|
|
17262
|
+
const params = new HttpParams().append('id', id);
|
|
17263
|
+
return this.getParams(AppGlobals.apiEndpoint + URLs$1.GetSwimlaneData, params);
|
|
17264
|
+
}
|
|
17193
17265
|
changeUser(obj) {
|
|
17194
17266
|
return this.postData(AppGlobals.apiEndpoint + URLs$1.changeUser, obj);
|
|
17195
17267
|
}
|
|
@@ -17254,7 +17326,7 @@ class WF_DocListComponent extends BaseComponent {
|
|
|
17254
17326
|
this.getData();
|
|
17255
17327
|
}
|
|
17256
17328
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_DocListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
17257
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: WF_DocListComponent, isStandalone: true, selector: "wf-doc-list", usesInheritance: true, ngImport: i0, template: "<div nz-row [nzGutter]=\"[0, 8]\">\n <div nz-col nzSpan=\"24\">\n <div nz-flex nzJustify=\"end\">\n <div nz-flex nzGap=\"small\">\n <button-add (click)=\"edit()\"></button-add>\n <button-search (click)=\"search()\"></button-search>\n </div>\n </div>\n </div>\n <div nz-col nzSpan=\"24\">\n <nz-table\n #table\n [nzData]=\"this.data.LstItem || []\"\n [nzBordered]=\"true\"\n [nzSize]=\"'small'\"\n [nzShowPagination]=\"false\"\n [nzFrontPagination]=\"false\"\n [nzScroll]=\"{ x: 'auto', y: 'calc(100vh - 235px)' }\"\n >\n <ng-template #showTotalTpl let-total let-range=\"range\">\n {{ range[0] | number }} - {{ range[1] | number }} / {{ total | number }}\n </ng-template>\n <thead>\n <tr>\n <th nzWidth=\"50px\">#</th>\n <th>Template</th>\n <th>Stage</th>\n <th>Action</th>\n <th nzWidth=\"130px\">Created date</th>\n <th nzWidth=\"130px\">Created user</th>\n <th nzWidth=\"
|
|
17329
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: WF_DocListComponent, isStandalone: true, selector: "wf-doc-list", usesInheritance: true, ngImport: i0, template: "<div nz-row [nzGutter]=\"[0, 8]\">\n <div nz-col nzSpan=\"24\">\n <div nz-flex nzJustify=\"end\">\n <div nz-flex nzGap=\"small\">\n <button-add (click)=\"edit()\"></button-add>\n <button-search (click)=\"search()\"></button-search>\n </div>\n </div>\n </div>\n <div nz-col nzSpan=\"24\">\n <nz-table\n #table\n [nzData]=\"this.data.LstItem || []\"\n [nzBordered]=\"true\"\n [nzSize]=\"'small'\"\n [nzShowPagination]=\"false\"\n [nzFrontPagination]=\"false\"\n [nzScroll]=\"{ x: 'auto', y: 'calc(100vh - 235px)' }\"\n >\n <ng-template #showTotalTpl let-total let-range=\"range\">\n {{ range[0] | number }} - {{ range[1] | number }} / {{ total | number }}\n </ng-template>\n <thead>\n <tr>\n <th nzWidth=\"50px\">#</th>\n <th>Template</th>\n <th>Stage</th>\n <th>Action</th>\n <th nzWidth=\"130px\">Created date</th>\n <th nzWidth=\"130px\">Created user</th>\n <th nzWidth=\"130px\" nzRight>Thao t\u00E1c</th>\n </tr>\n <tr class=\"tr-search\" (keyup.enter)=\"search()\">\n <th></th>\n <th></th>\n <th>\n <!-- <extend-input size=\"small\"></extend-input> -->\n </th>\n <th></th>\n <th></th>\n <th></th>\n <th nzRight></th>\n </tr>\n </thead>\n <tbody>\n @for (row of table.data; track $index; let i = $index) {\n <tr>\n <td>{{ i + 1 + filter.PageIndex * filter.PageSize }}</td>\n <td>{{ row.TemplateName }}</td>\n <td>\n {{ row.StageName }}\n </td>\n <td>\n {{ row.ActionName }}\n </td>\n <td>{{ row.CreatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td>{{ row.CreatedUser }}</td>\n <td class=\"center\" nzRight>\n <icon-edit (click)=\"edit(row)\"></icon-edit>\n <nz-divider [nzType]=\"'vertical'\"></nz-divider>\n @if (row.InProcess) {\n <nz-icon\n class=\"cursor-pointer\"\n style=\"color: green\"\n nzType=\"node-expand\"\n nzTheme=\"outline\"\n (click)=\"goto('/workflow/doc-list/' + row.WF_DocInstance_Id + '/process')\"\n />\n <nz-divider [nzType]=\"'vertical'\"></nz-divider>\n <nz-icon\n class=\"cursor-pointer\"\n style=\"color: blue\"\n nzType=\"history\"\n nzTheme=\"outline\"\n (click)=\"goto('/workflow/doc-list/' + row.WF_DocInstance_Id + '/doc-swimlane')\"\n />\n <nz-divider [nzType]=\"'vertical'\"></nz-divider>\n }\n\n <icon-delete (click)=\"delete(row)\"></icon-delete>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </div>\n <div nz-col nzSpan=\"24\">\n <div nz-flex nzJustify=\"end\">\n <nz-pagination\n [nzSize]=\"'small'\"\n [nzPageIndex]=\"filter.PageIndex + 1\"\n [nzPageSize]=\"filter.PageSize\"\n [nzTotal]=\"data.TotalCount || 0\"\n [nzShowSizeChanger]=\"true\"\n [nzShowTotal]=\"showTotalTpl\"\n [nzPageSizeOptions]=\"AppGlobals.pageSizeOptions\"\n (nzPageIndexChange)=\"onQueryParamsChange($event - 1, filter.PageSize)\"\n (nzPageSizeChange)=\"onQueryParamsChange(filter.PageIndex, $event)\"\n >\n </nz-pagination>\n\n <ng-template #showTotalTpl let-total let-range=\"range\">\n {{ range[0] | number }} - {{ range[1] | number }} / {{ total | number }}\n </ng-template>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i4.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i4.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i4.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i4.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i4.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i4.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "directive", type: i4.NzCellFixedDirective, selector: "td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]", inputs: ["nzRight", "nzLeft", "colspan", "colSpan"] }, { kind: "ngmodule", type: NzPaginationModule }, { kind: "component", type: i5$2.NzPaginationComponent, selector: "nz-pagination", inputs: ["nzShowTotal", "nzItemRender", "nzSize", "nzPageSizeOptions", "nzShowSizeChanger", "nzShowQuickJumper", "nzSimple", "nzDisabled", "nzResponsive", "nzHideOnSinglePage", "nzTotal", "nzPageIndex", "nzPageSize"], outputs: ["nzPageSizeChange", "nzPageIndexChange"], exportAs: ["nzPagination"] }, { kind: "component", type: ButtonAdd, selector: "button-add", inputs: ["size"] }, { kind: "component", type: ButtonSearch, selector: "button-search", inputs: ["size"] }, { kind: "component", type: IconEdit, selector: "icon-edit", inputs: ["size"], outputs: ["click"] }, { kind: "component", type: IconDelete, selector: "icon-delete", inputs: ["size"], outputs: ["click"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }] });
|
|
17258
17330
|
}
|
|
17259
17331
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_DocListComponent, decorators: [{
|
|
17260
17332
|
type: Component,
|
|
@@ -17271,7 +17343,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
17271
17343
|
IconDelete,
|
|
17272
17344
|
ExtendInput,
|
|
17273
17345
|
NzIconModule,
|
|
17274
|
-
|
|
17346
|
+
NzDividerComponent,
|
|
17347
|
+
], template: "<div nz-row [nzGutter]=\"[0, 8]\">\n <div nz-col nzSpan=\"24\">\n <div nz-flex nzJustify=\"end\">\n <div nz-flex nzGap=\"small\">\n <button-add (click)=\"edit()\"></button-add>\n <button-search (click)=\"search()\"></button-search>\n </div>\n </div>\n </div>\n <div nz-col nzSpan=\"24\">\n <nz-table\n #table\n [nzData]=\"this.data.LstItem || []\"\n [nzBordered]=\"true\"\n [nzSize]=\"'small'\"\n [nzShowPagination]=\"false\"\n [nzFrontPagination]=\"false\"\n [nzScroll]=\"{ x: 'auto', y: 'calc(100vh - 235px)' }\"\n >\n <ng-template #showTotalTpl let-total let-range=\"range\">\n {{ range[0] | number }} - {{ range[1] | number }} / {{ total | number }}\n </ng-template>\n <thead>\n <tr>\n <th nzWidth=\"50px\">#</th>\n <th>Template</th>\n <th>Stage</th>\n <th>Action</th>\n <th nzWidth=\"130px\">Created date</th>\n <th nzWidth=\"130px\">Created user</th>\n <th nzWidth=\"130px\" nzRight>Thao t\u00E1c</th>\n </tr>\n <tr class=\"tr-search\" (keyup.enter)=\"search()\">\n <th></th>\n <th></th>\n <th>\n <!-- <extend-input size=\"small\"></extend-input> -->\n </th>\n <th></th>\n <th></th>\n <th></th>\n <th nzRight></th>\n </tr>\n </thead>\n <tbody>\n @for (row of table.data; track $index; let i = $index) {\n <tr>\n <td>{{ i + 1 + filter.PageIndex * filter.PageSize }}</td>\n <td>{{ row.TemplateName }}</td>\n <td>\n {{ row.StageName }}\n </td>\n <td>\n {{ row.ActionName }}\n </td>\n <td>{{ row.CreatedDate | date: \"dd/MM/yyyy HH:mm\" }}</td>\n <td>{{ row.CreatedUser }}</td>\n <td class=\"center\" nzRight>\n <icon-edit (click)=\"edit(row)\"></icon-edit>\n <nz-divider [nzType]=\"'vertical'\"></nz-divider>\n @if (row.InProcess) {\n <nz-icon\n class=\"cursor-pointer\"\n style=\"color: green\"\n nzType=\"node-expand\"\n nzTheme=\"outline\"\n (click)=\"goto('/workflow/doc-list/' + row.WF_DocInstance_Id + '/process')\"\n />\n <nz-divider [nzType]=\"'vertical'\"></nz-divider>\n <nz-icon\n class=\"cursor-pointer\"\n style=\"color: blue\"\n nzType=\"history\"\n nzTheme=\"outline\"\n (click)=\"goto('/workflow/doc-list/' + row.WF_DocInstance_Id + '/doc-swimlane')\"\n />\n <nz-divider [nzType]=\"'vertical'\"></nz-divider>\n }\n\n <icon-delete (click)=\"delete(row)\"></icon-delete>\n </td>\n </tr>\n }\n </tbody>\n </nz-table>\n </div>\n <div nz-col nzSpan=\"24\">\n <div nz-flex nzJustify=\"end\">\n <nz-pagination\n [nzSize]=\"'small'\"\n [nzPageIndex]=\"filter.PageIndex + 1\"\n [nzPageSize]=\"filter.PageSize\"\n [nzTotal]=\"data.TotalCount || 0\"\n [nzShowSizeChanger]=\"true\"\n [nzShowTotal]=\"showTotalTpl\"\n [nzPageSizeOptions]=\"AppGlobals.pageSizeOptions\"\n (nzPageIndexChange)=\"onQueryParamsChange($event - 1, filter.PageSize)\"\n (nzPageSizeChange)=\"onQueryParamsChange(filter.PageIndex, $event)\"\n >\n </nz-pagination>\n\n <ng-template #showTotalTpl let-total let-range=\"range\">\n {{ range[0] | number }} - {{ range[1] | number }} / {{ total | number }}\n </ng-template>\n </div>\n </div>\n</div>\n" }]
|
|
17275
17348
|
}] });
|
|
17276
17349
|
|
|
17277
17350
|
class WF_DocDetailComponent extends BaseComponent {
|
|
@@ -17503,7 +17576,7 @@ class WF_DocDetailComponent extends BaseComponent {
|
|
|
17503
17576
|
}
|
|
17504
17577
|
}
|
|
17505
17578
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_DocDetailComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
17506
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: WF_DocDetailComponent, isStandalone: true, selector: "wf-doc-detail", usesInheritance: true, ngImport: i0, template: "<div nz-row class=\"form-item-no-bottom\">\n <extend-select\n nz-col\n nzSpan=\"6\"\n label=\"Quy tr\u00ECnh nghi\u1EC7p v\u1EE5\"\n [required]=\"true\"\n [lstItem]=\"lstTemplate\"\n [valueField]=\"'WF_Template_Id'\"\n [displayField]=\"'Name'\"\n [(_ngModel)]=\"doc.WF_Template_Id\"\n (_ngModelChange)=\"getTemplate(doc.WF_Template_Id)\"\n >\n </extend-select>\n <div nz-col nzSpan=\"18\" style=\"padding-top: 14px\">\n <div nz-row nzJustify=\"end\">\n <div nz-flex nzGap=\"small\">\n <button *ngIf=\"doc.WF_DocInstance_Id\" nz-button nzType=\"primary\" (click)=\"startDocProcess()\">\n <nz-icon nzType=\"node-expand\" nzTheme=\"outline\" />Th\u1EF1c hi\u1EC7n quy tr\u00ECnh\n </button>\n <button-save (click)=\"save()\"></button-save>\n <button-back (click)=\"goto('/workflow/doc-list')\"></button-back>\n </div>\n </div>\n </div>\n</div>\n\n<box [height]=\"8\"></box>\n\n<nz-table class=\"table-wf\" nzSize=\"small\" [nzData]=\"wfTemplate.ListStage\" [nzShowPagination]=\"false\">\n <thead>\n <tr>\n <th>Giai \u0111o\u1EA1n th\u1EF1c hi\u1EC7n</th>\n <th>\u0110\u01A1n v\u1ECB ph\u1EE5 tr\u00E1ch</th>\n <th>Thao t\u00E1c</th>\n <th>Ng\u01B0\u1EDDi th\u1EF1c hi\u1EC7n</th>\n <th nzWidth=\"100px\">S\u1ED1 ng\u00E0y</th>\n <th nzWidth=\"130px\">Ng\u00E0y b\u1EAFt \u0111\u1EA7u</th>\n <th nzWidth=\"130px\">H\u1EA1n ho\u00E0n th\u00E0nh</th>\n </tr>\n </thead>\n <tbody class=\"no-odd-even\">\n @for (stage of wfTemplate.ListStage; track stage; let stageIndex = $index) {\n @for (action of stage.ListAction; track $index; let actionIndex = $index) {\n <tr>\n @if (actionIndex === 0) {\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- Giai \u0111o\u1EA1n th\u1EF1c hi\u1EC7n -->\n <input nz-input [name]=\"'stageName_' + stageIndex\" [value]=\"stage.Name || ''\" readonly />\n </td>\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- \u0110\u01A1n v\u1ECB ph\u1EE5 tr\u00E1ch -->\n <extend-select\n [lstItem]=\"lstOrgs\"\n [valueField]=\"'App_Org_Id'\"\n [displayField]=\"'Name'\"\n [dropdownMatchSelectWidth]=\"false\"\n [(_ngModel)]=\"stage.App_Org_Id\"\n (_ngModelChange)=\"onOrgChangeOrg($event, stage)\"\n ></extend-select>\n </td>\n }\n\n <td>\n <!-- Thao t\u00E1c -->\n <input\n nz-input\n [name]=\"'actionText_' + stageIndex + '_' + actionIndex\"\n [value]=\"action.ActionText || ''\"\n readonly\n />\n </td>\n <td>\n <!-- Ng\u01B0\u1EDDi th\u1EF1c hi\u1EC7n -->\n <nz-select\n [(ngModel)]=\"action.ListUserRoleSelectStr\"\n (ngModelChange)=\"onSelectChange($event, action, stage)\"\n [nzSize]=\"'default'\"\n nzMode=\"multiple\"\n style=\"width: 100%\"\n >\n @for (option of action.ListUserRole; track option.App_User_Id) {\n <nz-option [nzLabel]=\"option.FullName\" [nzValue]=\"option.App_User_Id\"></nz-option>\n }\n </nz-select>\n </td>\n\n @if (actionIndex === 0) {\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- S\u1ED1 ng\u00E0y -->\n <extend-input-number\n [min]=\"0\"\n [(_ngModel)]=\"stage.NumberDay\"\n (_ngModelChange)=\"onChangeNumberDay(stage, stageIndex, $event)\"\n ></extend-input-number>\n </td>\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- Ng\u00E0y b\u1EAFt \u0111\u1EA7u -->\n <nz-date-picker\n [name]=\"'startDate_' + stageIndex\"\n [(ngModel)]=\"stage.StartDate\"\n (ngModelChange)=\"onStartDateChange(stageIndex, $event)\"\n [nzFormat]=\"'dd/MM/yyyy'\"\n style=\"width: 100%\"\n >\n </nz-date-picker>\n </td>\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- H\u1EA1n ho\u00E0n th\u00E0nh -->\n <nz-date-picker\n disabled=\"true\"\n [name]=\"'endDate_' + stageIndex\"\n [(ngModel)]=\"stage.EndDate\"\n [nzFormat]=\"'dd/MM/yyyy'\"\n style=\"width: 100%\"\n >\n </nz-date-picker>\n </td>\n }\n </tr>\n } @empty {\n <!-- TR\u01AF\u1EDCNG H\u1EE2P NGO\u1EA0I L\u1EC6: Giai \u0111o\u1EA1n kh\u00F4ng c\u00F3 thao t\u00E1c n\u00E0o (\u0111\u1EC3 tr\u00E1nh b\u1EA3ng b\u1ECB l\u1ED7i/bi\u1EBFn m\u1EA5t) -->\n <tr>\n <td>\n <input nz-input [name]=\"'stageName_' + stageIndex\" [value]=\"stage.Name || ''\" readonly />\n </td>\n <td>\n <extend-select\n [lstItem]=\"lstOrgs\"\n [valueField]=\"'App_Org_Id'\"\n [displayField]=\"'Name'\"\n [(_ngModel)]=\"stage.App_Org_Id\"\n (_ngModelChange)=\"onOrgChangeOrg($event, stage)\"\n ></extend-select>\n </td>\n <td colspan=\"2\" style=\"text-align: center; color: #999\">Kh\u00F4ng c\u00F3 thao t\u00E1c</td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n }\n }\n </tbody>\n</nz-table>\n", styles: [".table-wf td{border-bottom:1px solid darkgray}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ExtendSelectComponent, selector: "extend-select", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "dropdownMatchSelectWidth", "labelSpan", "labelFlex", "disabled", "required", "noBottom", "multiple", "showSelectAll", "maxTagCount", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "lstItem", "displayField", "displayFields", "info", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "itemChange", "onFocus"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i4.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i4.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i4.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i4.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i4.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i4.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i6.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i13.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i13.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i5$1.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "component", type: NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "directive", type: i3$2.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "component", type: ButtonSave, selector: "button-save", inputs: ["size"] }, { kind: "component", type: ExtendInputNumber, selector: "extend-input-number", inputs: ["label", "placeHolder", "labelAlign", "floatingLabel", "hiddenUpDown", "labelSpan", "labelFlex", "inputFlex", "disabled", "required", "noBottom", "size", "min", "max", "precision", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "isSubmited", "separatorType", "formData", "controlName", "_ngModel"], outputs: ["_ngModelChange"] }, { kind: "component", type: ButtonBack, selector: "button-back", inputs: ["size"] }, { kind: "component", type: Box, selector: "box", inputs: ["display", "width", "height"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }] });
|
|
17579
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: WF_DocDetailComponent, isStandalone: true, selector: "wf-doc-detail", usesInheritance: true, ngImport: i0, template: "<div nz-row class=\"form-item-no-bottom\">\n <extend-select\n nz-col\n nzSpan=\"6\"\n label=\"Quy tr\u00ECnh nghi\u1EC7p v\u1EE5\"\n [required]=\"true\"\n [lstItem]=\"lstTemplate\"\n [valueField]=\"'WF_Template_Id'\"\n [displayFields]=\"['Code', 'Name']\"\n [(_ngModel)]=\"doc.WF_Template_Id\"\n (_ngModelChange)=\"getTemplate(doc.WF_Template_Id)\"\n >\n </extend-select>\n <div nz-col nzSpan=\"18\" style=\"padding-top: 14px\">\n <div nz-row nzJustify=\"end\">\n <div nz-flex nzGap=\"small\">\n <button *ngIf=\"doc.WF_DocInstance_Id\" nz-button nzType=\"primary\" (click)=\"startDocProcess()\">\n <nz-icon nzType=\"node-expand\" nzTheme=\"outline\" />Th\u1EF1c hi\u1EC7n quy tr\u00ECnh\n </button>\n <button-save (click)=\"save()\"></button-save>\n <button-back (click)=\"goto('/workflow/doc-list')\"></button-back>\n </div>\n </div>\n </div>\n</div>\n\n<box [height]=\"8\"></box>\n\n<nz-table class=\"table-wf no-hover-color\" nzSize=\"small\" [nzData]=\"wfTemplate.ListStage\" [nzShowPagination]=\"false\">\n <thead>\n <tr>\n <th>Giai \u0111o\u1EA1n th\u1EF1c hi\u1EC7n</th>\n <th>\u0110\u01A1n v\u1ECB ph\u1EE5 tr\u00E1ch</th>\n <th>Thao t\u00E1c</th>\n <th>Ng\u01B0\u1EDDi th\u1EF1c hi\u1EC7n</th>\n <th nzWidth=\"100px\">S\u1ED1 ng\u00E0y</th>\n <th nzWidth=\"130px\">Ng\u00E0y b\u1EAFt \u0111\u1EA7u</th>\n <th nzWidth=\"130px\">H\u1EA1n ho\u00E0n th\u00E0nh</th>\n </tr>\n </thead>\n <tbody class=\"no-odd-even\">\n @for (stage of wfTemplate.ListStage; track stage; let stageIndex = $index) {\n @for (action of stage.ListAction; track $index; let actionIndex = $index) {\n <tr>\n @if (actionIndex === 0) {\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- Giai \u0111o\u1EA1n th\u1EF1c hi\u1EC7n -->\n <input nz-input [name]=\"'stageName_' + stageIndex\" [value]=\"stage.Name || ''\" readonly />\n </td>\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- \u0110\u01A1n v\u1ECB ph\u1EE5 tr\u00E1ch -->\n <extend-select\n [lstItem]=\"lstOrgs\"\n [valueField]=\"'App_Org_Id'\"\n [displayField]=\"'Name'\"\n [dropdownMatchSelectWidth]=\"false\"\n [(_ngModel)]=\"stage.App_Org_Id\"\n (_ngModelChange)=\"onOrgChangeOrg($event, stage)\"\n ></extend-select>\n </td>\n }\n\n <td>\n <!-- Thao t\u00E1c -->\n <input\n nz-input\n [name]=\"'actionText_' + stageIndex + '_' + actionIndex\"\n [value]=\"action.ActionText || ''\"\n readonly\n />\n </td>\n <td>\n <!-- Ng\u01B0\u1EDDi th\u1EF1c hi\u1EC7n -->\n <nz-select\n [(ngModel)]=\"action.ListUserRoleSelectStr\"\n (ngModelChange)=\"onSelectChange($event, action, stage)\"\n [nzSize]=\"'default'\"\n nzMode=\"multiple\"\n style=\"width: 100%\"\n >\n @for (option of action.ListUserRole; track option.App_User_Id) {\n <nz-option [nzLabel]=\"option.FullName\" [nzValue]=\"option.App_User_Id\"></nz-option>\n }\n </nz-select>\n </td>\n\n @if (actionIndex === 0) {\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- S\u1ED1 ng\u00E0y -->\n <extend-input-number\n [min]=\"0\"\n [(_ngModel)]=\"stage.NumberDay\"\n (_ngModelChange)=\"onChangeNumberDay(stage, stageIndex, $event)\"\n ></extend-input-number>\n </td>\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- Ng\u00E0y b\u1EAFt \u0111\u1EA7u -->\n <nz-date-picker\n [name]=\"'startDate_' + stageIndex\"\n [(ngModel)]=\"stage.StartDate\"\n (ngModelChange)=\"onStartDateChange(stageIndex, $event)\"\n [nzFormat]=\"'dd/MM/yyyy'\"\n style=\"width: 100%\"\n >\n </nz-date-picker>\n </td>\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- H\u1EA1n ho\u00E0n th\u00E0nh -->\n <nz-date-picker\n disabled=\"true\"\n [name]=\"'endDate_' + stageIndex\"\n [(ngModel)]=\"stage.EndDate\"\n [nzFormat]=\"'dd/MM/yyyy'\"\n style=\"width: 100%\"\n >\n </nz-date-picker>\n </td>\n }\n </tr>\n } @empty {\n <!-- TR\u01AF\u1EDCNG H\u1EE2P NGO\u1EA0I L\u1EC6: Giai \u0111o\u1EA1n kh\u00F4ng c\u00F3 thao t\u00E1c n\u00E0o (\u0111\u1EC3 tr\u00E1nh b\u1EA3ng b\u1ECB l\u1ED7i/bi\u1EBFn m\u1EA5t) -->\n <tr>\n <td>\n <input nz-input [name]=\"'stageName_' + stageIndex\" [value]=\"stage.Name || ''\" readonly />\n </td>\n <td>\n <extend-select\n [lstItem]=\"lstOrgs\"\n [valueField]=\"'App_Org_Id'\"\n [displayField]=\"'Name'\"\n [(_ngModel)]=\"stage.App_Org_Id\"\n (_ngModelChange)=\"onOrgChangeOrg($event, stage)\"\n ></extend-select>\n </td>\n <td colspan=\"2\" style=\"text-align: center; color: #999\">Kh\u00F4ng c\u00F3 thao t\u00E1c</td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n }\n }\n </tbody>\n</nz-table>\n", styles: [".table-wf td{border-bottom:1px solid darkgray}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ExtendSelectComponent, selector: "extend-select", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "dropdownMatchSelectWidth", "labelSpan", "labelFlex", "disabled", "required", "noBottom", "multiple", "showSelectAll", "maxTagCount", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "lstItem", "displayField", "displayFields", "info", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "itemChange", "onFocus"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i4.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "directive", type: i4.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i4.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i4.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i4.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i4.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i6.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i13.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i13.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i5$1.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "component", type: NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "directive", type: i3$2.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "component", type: ButtonSave, selector: "button-save", inputs: ["size"] }, { kind: "component", type: ExtendInputNumber, selector: "extend-input-number", inputs: ["label", "placeHolder", "labelAlign", "floatingLabel", "hiddenUpDown", "labelSpan", "labelFlex", "inputFlex", "disabled", "required", "noBottom", "size", "min", "max", "precision", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "isSubmited", "separatorType", "formData", "controlName", "_ngModel"], outputs: ["_ngModelChange"] }, { kind: "component", type: ButtonBack, selector: "button-back", inputs: ["size"] }, { kind: "component", type: Box, selector: "box", inputs: ["display", "width", "height"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }] });
|
|
17507
17580
|
}
|
|
17508
17581
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_DocDetailComponent, decorators: [{
|
|
17509
17582
|
type: Component,
|
|
@@ -17524,7 +17597,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
17524
17597
|
ButtonBack,
|
|
17525
17598
|
Box,
|
|
17526
17599
|
NzIconModule,
|
|
17527
|
-
], template: "<div nz-row class=\"form-item-no-bottom\">\n <extend-select\n nz-col\n nzSpan=\"6\"\n label=\"Quy tr\u00ECnh nghi\u1EC7p v\u1EE5\"\n [required]=\"true\"\n [lstItem]=\"lstTemplate\"\n [valueField]=\"'WF_Template_Id'\"\n [
|
|
17600
|
+
], template: "<div nz-row class=\"form-item-no-bottom\">\n <extend-select\n nz-col\n nzSpan=\"6\"\n label=\"Quy tr\u00ECnh nghi\u1EC7p v\u1EE5\"\n [required]=\"true\"\n [lstItem]=\"lstTemplate\"\n [valueField]=\"'WF_Template_Id'\"\n [displayFields]=\"['Code', 'Name']\"\n [(_ngModel)]=\"doc.WF_Template_Id\"\n (_ngModelChange)=\"getTemplate(doc.WF_Template_Id)\"\n >\n </extend-select>\n <div nz-col nzSpan=\"18\" style=\"padding-top: 14px\">\n <div nz-row nzJustify=\"end\">\n <div nz-flex nzGap=\"small\">\n <button *ngIf=\"doc.WF_DocInstance_Id\" nz-button nzType=\"primary\" (click)=\"startDocProcess()\">\n <nz-icon nzType=\"node-expand\" nzTheme=\"outline\" />Th\u1EF1c hi\u1EC7n quy tr\u00ECnh\n </button>\n <button-save (click)=\"save()\"></button-save>\n <button-back (click)=\"goto('/workflow/doc-list')\"></button-back>\n </div>\n </div>\n </div>\n</div>\n\n<box [height]=\"8\"></box>\n\n<nz-table class=\"table-wf no-hover-color\" nzSize=\"small\" [nzData]=\"wfTemplate.ListStage\" [nzShowPagination]=\"false\">\n <thead>\n <tr>\n <th>Giai \u0111o\u1EA1n th\u1EF1c hi\u1EC7n</th>\n <th>\u0110\u01A1n v\u1ECB ph\u1EE5 tr\u00E1ch</th>\n <th>Thao t\u00E1c</th>\n <th>Ng\u01B0\u1EDDi th\u1EF1c hi\u1EC7n</th>\n <th nzWidth=\"100px\">S\u1ED1 ng\u00E0y</th>\n <th nzWidth=\"130px\">Ng\u00E0y b\u1EAFt \u0111\u1EA7u</th>\n <th nzWidth=\"130px\">H\u1EA1n ho\u00E0n th\u00E0nh</th>\n </tr>\n </thead>\n <tbody class=\"no-odd-even\">\n @for (stage of wfTemplate.ListStage; track stage; let stageIndex = $index) {\n @for (action of stage.ListAction; track $index; let actionIndex = $index) {\n <tr>\n @if (actionIndex === 0) {\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- Giai \u0111o\u1EA1n th\u1EF1c hi\u1EC7n -->\n <input nz-input [name]=\"'stageName_' + stageIndex\" [value]=\"stage.Name || ''\" readonly />\n </td>\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- \u0110\u01A1n v\u1ECB ph\u1EE5 tr\u00E1ch -->\n <extend-select\n [lstItem]=\"lstOrgs\"\n [valueField]=\"'App_Org_Id'\"\n [displayField]=\"'Name'\"\n [dropdownMatchSelectWidth]=\"false\"\n [(_ngModel)]=\"stage.App_Org_Id\"\n (_ngModelChange)=\"onOrgChangeOrg($event, stage)\"\n ></extend-select>\n </td>\n }\n\n <td>\n <!-- Thao t\u00E1c -->\n <input\n nz-input\n [name]=\"'actionText_' + stageIndex + '_' + actionIndex\"\n [value]=\"action.ActionText || ''\"\n readonly\n />\n </td>\n <td>\n <!-- Ng\u01B0\u1EDDi th\u1EF1c hi\u1EC7n -->\n <nz-select\n [(ngModel)]=\"action.ListUserRoleSelectStr\"\n (ngModelChange)=\"onSelectChange($event, action, stage)\"\n [nzSize]=\"'default'\"\n nzMode=\"multiple\"\n style=\"width: 100%\"\n >\n @for (option of action.ListUserRole; track option.App_User_Id) {\n <nz-option [nzLabel]=\"option.FullName\" [nzValue]=\"option.App_User_Id\"></nz-option>\n }\n </nz-select>\n </td>\n\n @if (actionIndex === 0) {\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- S\u1ED1 ng\u00E0y -->\n <extend-input-number\n [min]=\"0\"\n [(_ngModel)]=\"stage.NumberDay\"\n (_ngModelChange)=\"onChangeNumberDay(stage, stageIndex, $event)\"\n ></extend-input-number>\n </td>\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- Ng\u00E0y b\u1EAFt \u0111\u1EA7u -->\n <nz-date-picker\n [name]=\"'startDate_' + stageIndex\"\n [(ngModel)]=\"stage.StartDate\"\n (ngModelChange)=\"onStartDateChange(stageIndex, $event)\"\n [nzFormat]=\"'dd/MM/yyyy'\"\n style=\"width: 100%\"\n >\n </nz-date-picker>\n </td>\n <td [attr.rowspan]=\"stage.ListAction.length\">\n <!-- H\u1EA1n ho\u00E0n th\u00E0nh -->\n <nz-date-picker\n disabled=\"true\"\n [name]=\"'endDate_' + stageIndex\"\n [(ngModel)]=\"stage.EndDate\"\n [nzFormat]=\"'dd/MM/yyyy'\"\n style=\"width: 100%\"\n >\n </nz-date-picker>\n </td>\n }\n </tr>\n } @empty {\n <!-- TR\u01AF\u1EDCNG H\u1EE2P NGO\u1EA0I L\u1EC6: Giai \u0111o\u1EA1n kh\u00F4ng c\u00F3 thao t\u00E1c n\u00E0o (\u0111\u1EC3 tr\u00E1nh b\u1EA3ng b\u1ECB l\u1ED7i/bi\u1EBFn m\u1EA5t) -->\n <tr>\n <td>\n <input nz-input [name]=\"'stageName_' + stageIndex\" [value]=\"stage.Name || ''\" readonly />\n </td>\n <td>\n <extend-select\n [lstItem]=\"lstOrgs\"\n [valueField]=\"'App_Org_Id'\"\n [displayField]=\"'Name'\"\n [(_ngModel)]=\"stage.App_Org_Id\"\n (_ngModelChange)=\"onOrgChangeOrg($event, stage)\"\n ></extend-select>\n </td>\n <td colspan=\"2\" style=\"text-align: center; color: #999\">Kh\u00F4ng c\u00F3 thao t\u00E1c</td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n }\n }\n </tbody>\n</nz-table>\n", styles: [".table-wf td{border-bottom:1px solid darkgray}\n"] }]
|
|
17528
17601
|
}] });
|
|
17529
17602
|
|
|
17530
17603
|
class QuyTrinhXuLyComponent extends BaseComponent {
|
|
@@ -17917,7 +17990,7 @@ class WF_DocProcessComponent extends BaseComponent {
|
|
|
17917
17990
|
extraButtonsTemplate;
|
|
17918
17991
|
changeActionFn;
|
|
17919
17992
|
ngOnInit() {
|
|
17920
|
-
this.WF_DocInstance_Id = +this.getUrlParam('
|
|
17993
|
+
this.WF_DocInstance_Id = +this.getUrlParam('id');
|
|
17921
17994
|
this.getData();
|
|
17922
17995
|
}
|
|
17923
17996
|
updateBreadcrumb() {
|
|
@@ -17983,7 +18056,7 @@ class WF_DocProcessComponent extends BaseComponent {
|
|
|
17983
18056
|
}
|
|
17984
18057
|
}
|
|
17985
18058
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_DocProcessComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
17986
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: WF_DocProcessComponent, isStandalone: true, selector: "wf-doc-process", inputs: { extraButtonsTemplate: "extraButtonsTemplate", changeActionFn: ["changeAction", "changeActionFn"] }, viewQueries: [{ propertyName: "quyTrinhXuLy", first: true, predicate: ["quyTrinhXuLy"], descendants: true }, { propertyName: "thongTinThucHien", first: true, predicate: ["thongTinThucHien"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div nz-row nzGutter=\"\">\n <div nz-col nzSpan=\"4\">\n <app-quy-trinh-xu-ly #quyTrinhXuLy></app-quy-trinh-xu-ly>\n </div>\n <div nz-col nzSpan=\"15\">\n <nz-card nzTitle=\"N\u1ED9i dung\" nzSize=\"small\" [nzExtra]=\"btnTemplate\" style=\"min-height: calc(100vh - 100px)\">\n <ng-content>\n <nz-empty></nz-empty>\n </ng-content>\n </nz-card>\n </div>\n <div nz-col nzSpan=\"5\">\n <app-thong-tin-thuc-hien\n #thongTinThucHien\n [IsDisplayUser]=\"true\"\n (changeAction)=\"changeAction($event)\"\n ></app-thong-tin-thuc-hien>\n </div>\n</div>\n\n<ng-template #btnTemplate>\n <div style=\"display: flex; gap: 8px; align-items: center\">\n @if (extraButtonsTemplate) {\n <ng-container *ngTemplateOutlet=\"extraButtonsTemplate\"></ng-container>\n }\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "ngmodule", type: NzCardModule }, { kind: "component", type: i3$5.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: QuyTrinhXuLyComponent, selector: "app-quy-trinh-xu-ly" }, { kind: "component", type: ThongTinThucHienComponent, selector: "app-thong-tin-thuc-hien", inputs: ["IsDisplayUser"], outputs: ["action", "changeAction"] }, { kind: "component", type: NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }] });
|
|
18059
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: WF_DocProcessComponent, isStandalone: true, selector: "wf-doc-process", inputs: { extraButtonsTemplate: "extraButtonsTemplate", changeActionFn: ["changeAction", "changeActionFn"] }, viewQueries: [{ propertyName: "quyTrinhXuLy", first: true, predicate: ["quyTrinhXuLy"], descendants: true }, { propertyName: "thongTinThucHien", first: true, predicate: ["thongTinThucHien"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div nz-row nzGutter=\"\">\n <div nz-col nzSpan=\"4\">\n <app-quy-trinh-xu-ly #quyTrinhXuLy></app-quy-trinh-xu-ly>\n </div>\n <div nz-col nzSpan=\"15\">\n <nz-card nzTitle=\"N\u1ED9i dung\" nzSize=\"small\" [nzExtra]=\"btnTemplate\" style=\"min-height: calc(100vh - 100px)\">\n <ng-content>\n <nz-empty></nz-empty>\n </ng-content>\n </nz-card>\n </div>\n <div nz-col nzSpan=\"5\">\n <app-thong-tin-thuc-hien\n #thongTinThucHien\n [IsDisplayUser]=\"true\"\n (changeAction)=\"changeAction($event)\"\n ></app-thong-tin-thuc-hien>\n </div>\n</div>\n\n<ng-template #btnTemplate>\n <div style=\"display: flex; gap: 8px; align-items: center\">\n @if (extraButtonsTemplate) {\n <ng-container *ngTemplateOutlet=\"extraButtonsTemplate\"></ng-container>\n } @else {\n <button-back size=\"small\" (click)=\"goto('/workflow/doc-list')\"> </button-back>\n }\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "ngmodule", type: NzCardModule }, { kind: "component", type: i3$5.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: QuyTrinhXuLyComponent, selector: "app-quy-trinh-xu-ly" }, { kind: "component", type: ThongTinThucHienComponent, selector: "app-thong-tin-thuc-hien", inputs: ["IsDisplayUser"], outputs: ["action", "changeAction"] }, { kind: "component", type: NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }, { kind: "component", type: ButtonBack, selector: "button-back", inputs: ["size"] }] });
|
|
17987
18060
|
}
|
|
17988
18061
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_DocProcessComponent, decorators: [{
|
|
17989
18062
|
type: Component,
|
|
@@ -17996,7 +18069,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
17996
18069
|
QuyTrinhXuLyComponent,
|
|
17997
18070
|
ThongTinThucHienComponent,
|
|
17998
18071
|
NzEmptyComponent,
|
|
17999
|
-
|
|
18072
|
+
ButtonBack,
|
|
18073
|
+
], template: "<div nz-row nzGutter=\"\">\n <div nz-col nzSpan=\"4\">\n <app-quy-trinh-xu-ly #quyTrinhXuLy></app-quy-trinh-xu-ly>\n </div>\n <div nz-col nzSpan=\"15\">\n <nz-card nzTitle=\"N\u1ED9i dung\" nzSize=\"small\" [nzExtra]=\"btnTemplate\" style=\"min-height: calc(100vh - 100px)\">\n <ng-content>\n <nz-empty></nz-empty>\n </ng-content>\n </nz-card>\n </div>\n <div nz-col nzSpan=\"5\">\n <app-thong-tin-thuc-hien\n #thongTinThucHien\n [IsDisplayUser]=\"true\"\n (changeAction)=\"changeAction($event)\"\n ></app-thong-tin-thuc-hien>\n </div>\n</div>\n\n<ng-template #btnTemplate>\n <div style=\"display: flex; gap: 8px; align-items: center\">\n @if (extraButtonsTemplate) {\n <ng-container *ngTemplateOutlet=\"extraButtonsTemplate\"></ng-container>\n } @else {\n <button-back size=\"small\" (click)=\"goto('/workflow/doc-list')\"> </button-back>\n }\n </div>\n</ng-template>\n" }]
|
|
18000
18074
|
}], propDecorators: { quyTrinhXuLy: [{
|
|
18001
18075
|
type: ViewChild,
|
|
18002
18076
|
args: ['quyTrinhXuLy']
|
|
@@ -18347,6 +18421,7 @@ class WF_TemplateDetail extends BaseComponent {
|
|
|
18347
18421
|
lstActionRef = [];
|
|
18348
18422
|
wfeditor;
|
|
18349
18423
|
onSave = new EventEmitter();
|
|
18424
|
+
onDeleteRule = new EventEmitter();
|
|
18350
18425
|
ngOnInit() {
|
|
18351
18426
|
this.getMasterData();
|
|
18352
18427
|
}
|
|
@@ -18363,7 +18438,7 @@ class WF_TemplateDetail extends BaseComponent {
|
|
|
18363
18438
|
this.wfeditor.lstAllStage = this.lstAllStage;
|
|
18364
18439
|
this.wfeditor.lstAllAction = this.lstAllAction;
|
|
18365
18440
|
}, (err) => this.handleError(err));
|
|
18366
|
-
if (templateId
|
|
18441
|
+
if (templateId) {
|
|
18367
18442
|
this._wfService.getWfData(templateId).then((res) => {
|
|
18368
18443
|
if (res.Data) {
|
|
18369
18444
|
this.template = res.Data.Template || {};
|
|
@@ -18441,7 +18516,8 @@ class WF_TemplateDetail extends BaseComponent {
|
|
|
18441
18516
|
deleteRule(obj) {
|
|
18442
18517
|
this._wfService.deleteRule(obj.WF_TemplateStageAction_Id, obj.WF_TransitionRule_Id).then((res) => {
|
|
18443
18518
|
this.notiService.success();
|
|
18444
|
-
this.getData();
|
|
18519
|
+
this.getData(obj.WF_Template_Id);
|
|
18520
|
+
this.onDeleteRule.emit();
|
|
18445
18521
|
}, (err) => {
|
|
18446
18522
|
this.handleError(err);
|
|
18447
18523
|
this.getData();
|
|
@@ -18451,6 +18527,7 @@ class WF_TemplateDetail extends BaseComponent {
|
|
|
18451
18527
|
this._wfService.deleteRuleLine(ruleLineId).then((res) => {
|
|
18452
18528
|
this.notiService.success();
|
|
18453
18529
|
// this.getData();
|
|
18530
|
+
this.onDeleteRule.emit();
|
|
18454
18531
|
}, (err) => {
|
|
18455
18532
|
this.handleError(err);
|
|
18456
18533
|
this.getData();
|
|
@@ -18482,7 +18559,7 @@ class WF_TemplateDetail extends BaseComponent {
|
|
|
18482
18559
|
this.wfeditor.actionRuleModalVisible = false;
|
|
18483
18560
|
}
|
|
18484
18561
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_TemplateDetail, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
18485
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: WF_TemplateDetail, isStandalone: true, selector: "wf-template-detail", outputs: { onSave: "onSave" }, viewQueries: [{ propertyName: "wfeditor", first: true, predicate: ["wfeditor"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"workflow-wrapper\" style=\"height: calc(100vh - 160px)\">\n <app-workflow-editor\n #wfeditor\n [lstOrg]=\"lstOrg\"\n [lstRole]=\"lstRole\"\n [lstUser]=\"lstUser\"\n [lstEmailTemplate]=\"lstEmailTemplate\"\n (onSave)=\"save($event)\"\n (onDeleteStage)=\"deleteStage($event)\"\n (onDeleteAction)=\"deleteAction($event)\"\n (onDeleteRule)=\"deleteRule($event)\"\n (onDeleteRuleLine)=\"deleteRuleLine($event)\"\n (onCheckRule)=\"onCheckRule($event)\"\n (onCheckAllRule)=\"onCheckAllRule($event)\"\n ></app-workflow-editor>\n</div>\n", styles: [".workflow-wrapper{position:relative}\n"], dependencies: [{ kind: "component", type: WorkflowEditorComponent, selector: "app-workflow-editor", inputs: ["lstOrg", "lstRole", "lstUser", "lstEmailTemplate"], outputs: ["onSave", "onDeleteStage", "onDeleteAction", "onDeleteRule", "onDeleteRuleLine", "onCheckRule", "onCheckAllRule"] }] });
|
|
18562
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: WF_TemplateDetail, isStandalone: true, selector: "wf-template-detail", outputs: { onSave: "onSave", onDeleteRule: "onDeleteRule" }, viewQueries: [{ propertyName: "wfeditor", first: true, predicate: ["wfeditor"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"workflow-wrapper\" style=\"height: calc(100vh - 160px)\">\n <app-workflow-editor\n #wfeditor\n [lstOrg]=\"lstOrg\"\n [lstRole]=\"lstRole\"\n [lstUser]=\"lstUser\"\n [lstEmailTemplate]=\"lstEmailTemplate\"\n (onSave)=\"save($event)\"\n (onDeleteStage)=\"deleteStage($event)\"\n (onDeleteAction)=\"deleteAction($event)\"\n (onDeleteRule)=\"deleteRule($event)\"\n (onDeleteRuleLine)=\"deleteRuleLine($event)\"\n (onCheckRule)=\"onCheckRule($event)\"\n (onCheckAllRule)=\"onCheckAllRule($event)\"\n ></app-workflow-editor>\n</div>\n", styles: [".workflow-wrapper{position:relative}\n"], dependencies: [{ kind: "component", type: WorkflowEditorComponent, selector: "app-workflow-editor", inputs: ["lstOrg", "lstRole", "lstUser", "lstEmailTemplate"], outputs: ["getdata", "onSave", "onDeleteStage", "onDeleteAction", "onDeleteRule", "onDeleteRuleLine", "onCheckRule", "onCheckAllRule"] }] });
|
|
18486
18563
|
}
|
|
18487
18564
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_TemplateDetail, decorators: [{
|
|
18488
18565
|
type: Component,
|
|
@@ -18492,6 +18569,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
18492
18569
|
args: ['wfeditor']
|
|
18493
18570
|
}], onSave: [{
|
|
18494
18571
|
type: Output
|
|
18572
|
+
}], onDeleteRule: [{
|
|
18573
|
+
type: Output
|
|
18495
18574
|
}] } });
|
|
18496
18575
|
|
|
18497
18576
|
//#region MODELS
|
|
@@ -19688,22 +19767,45 @@ class WF_Template_CombineEditorComponent extends BaseComponent {
|
|
|
19688
19767
|
}
|
|
19689
19768
|
}
|
|
19690
19769
|
getDownstreamEdges(startEdge) {
|
|
19691
|
-
const
|
|
19770
|
+
const resultEdges = new Set();
|
|
19771
|
+
const visitedNodes = new Set();
|
|
19692
19772
|
const queue = [startEdge];
|
|
19773
|
+
if (startEdge.From_WF_Template_Id) {
|
|
19774
|
+
visitedNodes.add(startEdge.From_WF_Template_Id);
|
|
19775
|
+
}
|
|
19693
19776
|
while (queue.length > 0) {
|
|
19694
19777
|
const currentEdge = queue.shift();
|
|
19695
|
-
//
|
|
19696
|
-
if (!
|
|
19697
|
-
|
|
19698
|
-
|
|
19699
|
-
|
|
19700
|
-
|
|
19778
|
+
// Chống lặp chính edge đó
|
|
19779
|
+
if (!resultEdges.has(currentEdge)) {
|
|
19780
|
+
resultEdges.add(currentEdge);
|
|
19781
|
+
const targetNodeId = currentEdge.To_WF_Template_Id;
|
|
19782
|
+
if (targetNodeId) {
|
|
19783
|
+
if (!visitedNodes.has(targetNodeId)) {
|
|
19784
|
+
visitedNodes.add(targetNodeId);
|
|
19785
|
+
// Tìm các cạnh đi tiếp từ Node đích này
|
|
19786
|
+
const nextEdges = this.lstTemplateEdge.filter((e) => {
|
|
19787
|
+
if (e.From_WF_Template_Id !== targetNodeId)
|
|
19788
|
+
return false;
|
|
19789
|
+
if (currentEdge.To_WF_TemplateStageAction_Id) {
|
|
19790
|
+
return e.From_WF_TemplateStageAction_Id === currentEdge.To_WF_TemplateStageAction_Id;
|
|
19791
|
+
}
|
|
19792
|
+
if (currentEdge.To_WF_TemplateStage_Id) {
|
|
19793
|
+
return e.From_WF_TemplateStage_Id === currentEdge.To_WF_TemplateStage_Id;
|
|
19794
|
+
}
|
|
19795
|
+
if (e.From_WF_TemplateStage_Id || e.From_WF_TemplateStageAction_Id) {
|
|
19796
|
+
return false;
|
|
19797
|
+
}
|
|
19798
|
+
return true;
|
|
19799
|
+
});
|
|
19800
|
+
queue.push(...nextEdges);
|
|
19801
|
+
}
|
|
19802
|
+
}
|
|
19701
19803
|
}
|
|
19702
19804
|
}
|
|
19703
|
-
return Array.from(
|
|
19805
|
+
return Array.from(resultEdges);
|
|
19704
19806
|
}
|
|
19705
19807
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_Template_CombineEditorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
19706
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: WF_Template_CombineEditorComponent, isStandalone: true, selector: "app-workflow-combine-editor", inputs: { lstTemplateForSelect: "lstTemplateForSelect" }, outputs: { getdata: "getdata", onSave: "onSave", onDeleteTempldateNode: "onDeleteTempldateNode" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, static: true }, { propertyName: "svgRef", first: true, predicate: ["svg"], descendants: true, static: true }, { propertyName: "wftemplatedetail", first: true, predicate: ["wftemplatedetail"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n #canvas\n class=\"workflow-canvas\"\n [class.connecting]=\"!!connectingFrom\"\n [class.dragging-point]=\"!!draggingPoint\"\n style=\"width: 100%; height: 100%\"\n (mousedown)=\"onMouseDownCanvas($event)\"\n (mousemove)=\"onMouseMoveCanvas($event)\"\n (mouseup)=\"onMouseUpCanvas($event)\"\n (click)=\"onClickCanvas($event)\"\n (wheel)=\"onWheelCanvas($event)\"\n>\n <!-- TOOLBAR -->\n <div class=\"toolbar\" (mousedown)=\"$event.stopPropagation()\" (click)=\"$event.stopPropagation()\">\n <button nz-button nzSize=\"small\" nz-tooltip=\"Editor setting\" (click)=\"settingVisible = true\">\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n\n <button nz-button nzSize=\"small\" nz-tooltip=\"Infomation\" (click)=\"infoVisible = true\">\n <nz-icon nzType=\"info-circle\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button nz-button nzSize=\"small\" nz-tooltip=\"Global Setting\" (click)=\"drawTemplateVisibel = true\">\n <nz-icon nzType=\"setting\"></nz-icon> G\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button nz-button nzSize=\"small\" nzDanger [nzLoading]=\"!ready\" nz-tooltip=\"Save (Ctrl + S)\" (click)=\"save()\">\n <nz-icon nzType=\"save\"></nz-icon>\n </button>\n <button nz-button nzSize=\"small\" nz-tooltip=\"Th\u00EAm Template m\u1EDBi\" (click)=\"isModalVisible = true\">\n <nz-icon nzType=\"plus\" class=\"color-primary\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"isMoveMode ? 'primary' : 'default'\"\n nz-tooltip=\"Move mode\"\n (click)=\"isMoveMode = true\"\n >\n <nz-icon><img src=\"/assets/icon/hand-palm.png\" width=\"19\" height=\"19\" /></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!isMoveMode ? 'primary' : 'default'\"\n nz-tooltip=\"Select mode\"\n (click)=\"isMoveMode = false\"\n >\n <nz-icon><img src=\"/assets/icon/cursor.png\" width=\"19\" height=\"19\" /></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- UNDO / REDO -->\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n [disabled]=\"undoStack.length === 0\"\n nz-tooltip=\"Undo\"\n (click)=\"undo()\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n [disabled]=\"redoStack.length === 0\"\n nz-tooltip=\"Redo\"\n (click)=\"redo()\"\n >\n <nz-icon nzType=\"redo\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- ALIGN -->\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignLeft()\">\u27F8</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignCenter()\">\u2261</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignRight()\">\u27F9</button>\n <span class=\"divider\"></span>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignTop()\">\u21D1</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignMiddle()\">\u2550</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignBottom()\">\u21D3</button>\n <span class=\"divider\"></span>\n <!-- DISTRIBUTE -->\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 3\" (click)=\"distributeHorizontal()\">\n \u21C4\n </button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 3\" (click)=\"distributeVertical()\">\n \u21C5\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- ZOOM -->\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomOut()\" nz-tooltip=\"Zoom Out\">\n <nz-icon nzType=\"minus\"></nz-icon>\n </button>\n <span>{{ Math.round(zoom * 100) }}%</span>\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomIn()\" nz-tooltip=\"Zoom In\">\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n <span class=\"divider\"></span>\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"resetZoom()\" nz-tooltip=\"Reset Zoom (Ctrl+0)\">\n <nz-icon nzType=\"expand\"></nz-icon>\n </button>\n </div>\n\n <div\n class=\"canvas-content\"\n [class.panning]=\"isMoveMode\"\n [style.width.px]=\"getCanvasWidth()\"\n [style.height.px]=\"getCanvasHeight()\"\n [style.transform]=\"\n 'translate(' +\n templateCombine.editorOption.panX +\n 'px,' +\n templateCombine.editorOption.panY +\n 'px) scale(' +\n zoom +\n ')'\n \"\n >\n <!-- GRID -->\n <div *ngIf=\"wfcSetting.ShowGrid\" class=\"grid-layer\"></div>\n\n <!-- SVG EDGES -->\n <svg #svg class=\"edges-layer\" width=\"100%\" height=\"100%\" preserveAspectRatio=\"none\">\n <g>\n <!-- DEFS -->\n <defs>\n <filter id=\"edge-glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\n <feGaussianBlur stdDeviation=\"2\" result=\"blur\" />\n <feMerge>\n <feMergeNode in=\"blur\" />\n <feMergeNode in=\"SourceGraphic\" />\n </feMerge>\n </filter>\n\n <marker\n id=\"arrow-blue\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n refX=\"10\"\n refY=\"5\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path class=\"blue\" d=\"M0,0 L10,5 L0,10\"></path>\n </marker>\n <marker\n id=\"arrow-red\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n refX=\"10\"\n refY=\"5\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path class=\"red\" d=\"M0,0 L10,5 L0,10\"></path>\n </marker>\n </defs>\n\n <!-- EDGES B\u00CCNH TH\u01AF\u1EDCNG -->\n <ng-container *ngFor=\"let e of normalEdges; let i = index\">\n <path class=\"edge\" [attr.id]=\"'edge-path-' + i\" [attr.d]=\"buildPath(e)\" marker-end=\"url(#arrow-blue)\"></path>\n\n <path\n class=\"edge-hit\"\n [attr.d]=\"buildPath(e)\"\n (mouseenter)=\"onMouseEnterEdge(e)\"\n (mouseleave)=\"onMouseLeaveEdge(e)\"\n (click)=\"onClickEdge(e, $event)\"\n ></path>\n\n <!-- \u0110\u00E3 x\u00F3a *ngIf=\"e.RuleLineDetails?.length\" \u1EDF \u0111\u00E2y \u0111\u1EC3 text lu\u00F4n hi\u1EC7n -->\n <text\n class=\"edge-label\"\n style=\"fill: #1890ff; font-weight: 500\"\n [attr.x]=\"getEdgeLabelPosition(e).x\"\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\n [attr.text-anchor]=\"'middle'\"\n >\n {{ e.FromStage }} / {{ e.FromAction }} > {{ e.ToStage }} / {{ e.ToAction }}\n </text>\n </ng-container>\n\n <!-- EDGE \u0110ANG HOVER/SELECTED (HI\u1EC2N TH\u1ECA M\u00C0U \u0110\u1ECE) -->\n <ng-container *ngFor=\"let e of hoverEdges; let i = index\">\n <path\n class=\"edge red\"\n [attr.id]=\"'edge-path-hover-' + i\"\n [attr.d]=\"buildPath(e)\"\n marker-end=\"url(#arrow-red)\"\n ></path>\n\n <path\n class=\"edge-hit\"\n [attr.d]=\"buildPath(e)\"\n (mouseleave)=\"onMouseLeaveEdge(e)\"\n (click)=\"onClickEdge(e, $event)\"\n ></path>\n\n <text\n class=\"edge-label\"\n style=\"font-weight: bold; fill: red\"\n [attr.x]=\"getEdgeLabelPosition(e).x\"\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\n [attr.text-anchor]=\"'middle'\"\n >\n {{ e.FromStage }} / {{ e.FromAction }} > {{ e.ToStage }} / {{ e.ToAction }}\n </text>\n </ng-container>\n\n <!-- PREVIEW LINE (\u0110\u01AF\u1EDCNG N\u1ED0I \u0110ANG K\u00C9O) -->\n <path\n *ngIf=\"connectingFrom\"\n class=\"edge\"\n [attr.d]=\"buildPreviewPath()\"\n stroke-dasharray=\"5,5\"\n marker-end=\"url(#arrow-blue)\"\n ></path>\n </g>\n </svg>\n\n <!-- BOX V\u00D9NG CH\u1ECCN MULTI -->\n <div\n *ngIf=\"isSelecting && selectStart && selectEnd\"\n class=\"selection-box\"\n [style.left.px]=\"Math.min(selectStart.x, selectEnd.x)\"\n [style.top.px]=\"Math.min(selectStart.y, selectEnd.y)\"\n [style.width.px]=\"Math.abs(selectEnd.x - selectStart.x)\"\n [style.height.px]=\"Math.abs(selectEnd.y - selectStart.y)\"\n ></div>\n\n <!-- NODE (TEMPLATE) L\u1EDAP HI\u1EC2N TH\u1ECA TR\u00CAN C\u00D9NG -->\n @for (n of lstTemplateNode; track n.WF_Template_Id) {\n <nz-card\n class=\"workflow-node\"\n [attr.data-id]=\"n.Code\"\n [class.selected]=\"\n n == selectedTemplateNode || n == hoverTemplateNode || lstSelectedTemplateId.has(n.WF_Template_Id)\n \"\n [style.left.px]=\"n.editorOption.x\"\n [style.top.px]=\"n.editorOption.y\"\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\n nzSize=\"small\"\n (mousedown)=\"onMouseDownNode($event, n)\"\n (click)=\"$event.stopPropagation(); onClickNode(n)\"\n >\n <div class=\"title\" style=\"color: #1890ff; display: flex; justify-content: space-between; align-items: center\">\n <span>{{ n.Code }}</span>\n <nz-icon nzType=\"layout\" nzTheme=\"outline\"></nz-icon>\n </div>\n <div\n style=\"\n font-size: 12px;\n line-height: 1.2;\n font-weight: 500;\n height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n \"\n >\n {{ n.Name || \"Ch\u01B0a c\u00F3 t\u00EAn\" }}\n </div>\n <div style=\"font-size: 10px; color: gray; margin-top: 4px\">\n {{ n.DocType }}\n </div>\n\n <!-- CONNECTOR \u0110\u1EC2 K\u00C9O D\u00C2Y -->\n <div class=\"connector connector-right\" (click)=\"onClickConnector($event, n, 'right')\"></div>\n <div class=\"connector connector-left\" (click)=\"onClickConnector($event, n, 'left')\"></div>\n </nz-card>\n }\n\n <!-- C\u00C1C \u0110I\u1EC2M WAYPOINT \u0110\u1EC2 B\u1EBA CONG D\u00C2Y CHU\u1ED8T -->\n @for (p of connectingPoints; track $index) {\n @if (p != draggingPoint) {\n <div\n class=\"waypoint\"\n [style.left.px]=\"p.x\"\n [style.top.px]=\"p.y\"\n (mousedown)=\"onmousedownPoint($event, p)\"\n (contextmenu)=\"onRightClickPoint($event, hoverTemplateEdge!, $index)\"\n ></div>\n } @else {\n <div\n class=\"waypoint dragging\"\n [style.left.px]=\"p.x\"\n [style.top.px]=\"p.y\"\n (mousedown)=\"onmousedownPoint($event, p)\"\n ></div>\n }\n }\n </div>\n</div>\n\n<!-- ==============================================\n 1. DRAWER: GLOBAL TEMPLATE SETTINGS \n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawTemplateTitle\"\n nzPlacement=\"right\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzVisible]=\"drawTemplateVisibel\"\n [nzFooter]=\"footerTplTemplate\"\n (nzOnClose)=\"drawTemplateVisibel = false\"\n>\n <ng-template #drawTemplateTitle> <nz-icon nzType=\"global\"></nz-icon> Quy tr\u00ECnh ph\u1ED1i h\u1EE3p </ng-template>\n <ng-container *nzDrawerContent>\n <!-- Gi\u1EEF nguy\u00EAn c\u00E1c th\u00F4ng tin chung to\u00E0n c\u1EE5c c\u1EE7a b\u1EA1n \u1EDF \u0111\u00E2y -->\n\n <extend-input [label]=\"'Code'\" [(_ngModel)]=\"templateCombine.Code\"></extend-input>\n <extend-input [label]=\"'Name'\" [(_ngModel)]=\"templateCombine.Name\"></extend-input>\n <extend-textarea [label]=\"'Description'\" [(_ngModel)]=\"templateCombine.Description\"></extend-textarea>\n <extend-checkbox [label]=\"'Active'\" [(_ngModel)]=\"templateCombine.IsActive\"></extend-checkbox>\n </ng-container>\n\n <ng-template #footerTplTemplate>\n <div nz-flex [nzGap]=\"6\" [nzJustify]=\"'end'\">\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\n <button nz-button (click)=\"drawTemplateVisibel = false\">Close</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 2. DRAWER: NODE SETTINGS (CHI TI\u1EBET M\u1ED8T TEMPLATE)\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawerTitleNode\"\n [nzPlacement]=\"selectedTemplateNode?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\n [nzVisible]=\"!!selectedTemplateNode\"\n [nzWidth]=\"'90vw'\"\n [nzClosable]=\"false\"\n [nzFooter]=\"footerTplNode\"\n (nzOnClose)=\"selectedTemplateNode = undefined\"\n>\n <ng-template #drawerTitleNode>\n <div nz-row nzJustify=\"space-between\">\n <span style=\"font-weight: bold; color: #1890ff\"\n ><nz-icon nzType=\"layout\"></nz-icon> TEMPLATE NODE: [{{ selectedTemplateNode?.Code }}]\n {{ selectedTemplateNode?.Name }}</span\n >\n <button\n nz-button\n nzSize=\"small\"\n nz-tooltip=\"Chuy\u1EC3n v\u1ECB tr\u00ED Drawer\"\n (click)=\"\n selectedTemplateNode!.editorOption.drawerPosition =\n selectedTemplateNode!.editorOption.drawerPosition === 'left' ? 'right' : 'left'\n \"\n >\n <nz-icon nzType=\"swap\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <ng-container *ngIf=\"selectedTemplateNode\">\n <wf-template-detail #wftemplatedetail (onSave)=\"getdata.emit()\"></wf-template-detail>\n </ng-container>\n </ng-container>\n\n <ng-template #footerTplNode>\n <div\n nz-flex\n [nzGap]=\"6\"\n [nzJustify]=\"selectedTemplateNode?.editorOption?.drawerPosition == 'left' ? 'start' : 'end'\"\n >\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"wftemplatedetail.wfeditor.save()\">Save</button>\n <button nz-button (click)=\"selectedTemplateNode = undefined\">Close</button>\n <button nz-button nzDanger (click)=\"deleteTemplateNode()\">Delete Template node</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 3. DRAWER: EDGE SETTINGS (QU\u1EA2N L\u00DD QUY T\u1EAEC CHUY\u1EC2N TEMPLATE)\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawerTitleEdge\"\n [nzPlacement]=\"selectedTemplateEdge?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\n [nzClosable]=\"false\"\n [nzWidth]=\"'450px'\"\n [nzVisible]=\"!!selectedTemplateEdge\"\n [nzFooter]=\"footerTplEdge\"\n (nzOnClose)=\"selectedTemplateEdge = undefined\"\n>\n <ng-template #drawerTitleEdge>\n <div nz-row nzJustify=\"space-between\">\n <span style=\"font-weight: bold; color: #ff4d4f\"><nz-icon nzType=\"swap-right\"></nz-icon> TRANSITION RULES </span>\n <button\n nz-button\n nzSize=\"small\"\n nz-tooltip=\"Chuy\u1EC3n v\u1ECB tr\u00ED Drawer\"\n (click)=\"\n selectedTemplateEdge!.editorOption.drawerPosition =\n selectedTemplateEdge!.editorOption.drawerPosition === 'left' ? 'right' : 'left'\n \"\n >\n <nz-icon nzType=\"swap\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <ng-container *ngIf=\"selectedTemplateEdge\">\n <!-- Th\u00F4ng tin 2 \u0111\u1EA7u n\u1ED1i -->\n <div\n style=\"background: #fdf5f6; padding: 12px; border: 1px solid #ffa39e; border-radius: 6px; margin-bottom: 16px\"\n >\n <div style=\"font-size: 14px\">\n <strong style=\"display: inline-block; width: 70px; color: #555\">From:</strong>\n <span style=\"color: #1890ff; font-weight: 500\">\n [{{ getNode(selectedTemplateEdge.From_WF_Template_Id)?.Code }}]\n {{ getNode(selectedTemplateEdge.From_WF_Template_Id)?.Name }} > {{ selectedTemplateEdge.FromStage }} >\n {{ selectedTemplateEdge.FromAction }}\n </span>\n </div>\n <div style=\"font-size: 14px; margin-top: 8px\">\n <strong style=\"display: inline-block; width: 70px; color: #555\">Taget:</strong>\n <span style=\"color: #1890ff; font-weight: 500\">\n [{{ getNode(selectedTemplateEdge.To_WF_Template_Id)?.Code }}]\n {{ getNode(selectedTemplateEdge.To_WF_Template_Id)?.Name }} > {{ selectedTemplateEdge.ToStage }} >\n {{ selectedTemplateEdge.ToAction }}\n </span>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #footerTplEdge>\n <div\n nz-flex\n [nzGap]=\"6\"\n [nzJustify]=\"selectedTemplateEdge?.editorOption?.drawerPosition == 'left' ? 'start' : 'end'\"\n >\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save Rules</button>\n <button\n nz-button\n nzDanger\n (click)=\"\n lstTemplateEdge.splice(lstTemplateEdge.indexOf(selectedTemplateEdge!), 1); selectedTemplateEdge = undefined\n \"\n >\n Delete Transition\n </button>\n <button nz-button (click)=\"selectedTemplateEdge = undefined\">Close</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 4. EDITOR SETTING & INFO\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawSettingTitle\"\n nzPlacement=\"right\"\n [nzClosable]=\"false\"\n [nzVisible]=\"settingVisible\"\n (nzOnClose)=\"settingVisible = false\"\n>\n <ng-template #drawSettingTitle> <nz-icon nzType=\"setting\"></nz-icon> C\u00E0i \u0111\u1EB7t Editor </ng-template>\n <ng-container *nzDrawerContent>\n <div class=\"form-item-no-bottom\">\n <extend-checkbox\n [label]=\"'Hi\u1EC3n th\u1ECB L\u01B0\u1EDBi (Grid)'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"wfcSetting.ShowGrid\"\n ></extend-checkbox>\n </div>\n </ng-container>\n</nz-drawer>\n\n<nz-drawer\n [nzTitle]=\"drawInfoTitle\"\n nzPlacement=\"right\"\n [nzClosable]=\"false\"\n [nzVisible]=\"infoVisible\"\n (nzOnClose)=\"infoVisible = false\"\n>\n <ng-template #drawInfoTitle> <nz-icon nzType=\"info-circle\"></nz-icon> H\u01B0\u1EDBng d\u1EABn (Infomation) </ng-template>\n <ng-container *nzDrawerContent>\n <p>\n <strong>1. C\u00E1c th\u00E0nh ph\u1EA7n:</strong> C\u00E1c \u00F4 ch\u1EEF nh\u1EADt l\u00E0 Template (Quy tr\u00ECnh nh\u1ECF), c\u00E1c \u0111\u01B0\u1EDDng n\u1ED1i l\u00E0 Transition Rule\n (Quy t\u1EAFc chuy\u1EC3n quy tr\u00ECnh).\n </p>\n <p><strong>2. C\u00E1ch n\u1ED1i 2 Template:</strong></p>\n <ul>\n <li>Click ch\u1EA5m cam b\u00EAn ph\u1EA3i Template A, sau \u0111\u00F3 k\u00E9o v\u00E0 click v\u00E0o Template B \u0111\u1EC3 t\u1EA1o Rule n\u1ED1i.</li>\n <li>C\u00F3 th\u1EC3 click nhi\u1EC1u \u0111i\u1EC3m trong l\u00FAc k\u00E9o \u0111\u1EC3 b\u1EBB \u0111\u01B0\u1EDDng cong tu\u1EF3 \u00FD (Waypoint).</li>\n <li>Click \u0111\u00FAp v\u00E0o c\u1EA1nh (\u0111\u01B0\u1EDDng n\u1ED1i) \u0111ang c\u00F3 \u0111\u1EC3 t\u1EA1o th\u00EAm m\u1ED9t \u0111i\u1EC3m b\u1EBB cong m\u1EDBi.</li>\n <li>Gi\u1EEF v\u00E0 k\u00E9o \u0111i\u1EC3m b\u1EBB cong \u0111\u1EC3 tu\u1EF3 ch\u1EC9nh \u0111\u01B0\u1EDDng \u0111i. Chu\u1ED9t ph\u1EA3i v\u00E0o \u0111i\u1EC3m \u0111\u00F3 \u0111\u1EC3 x\u00F3a n\u00F3.</li>\n </ul>\n <p>\n <strong>3. Qu\u1EA3n l\u00FD Rule:</strong> Click v\u00E0o \u0111\u01B0\u1EDDng n\u1ED1i gi\u1EEFa 2 Node \u0111\u1EC3 c\u1EA5u h\u00ECnh c\u00E1c lu\u1ED3ng th\u1EF1c thi (Stored, Ph\u00E2n\n quy\u1EC1n, G\u1EEDi mail).\n </p>\n </ng-container>\n</nz-drawer>\n\n<nz-modal\n [(nzVisible)]=\"isModalVisible\"\n nzTitle=\"Add template node\"\n [nzWidth]=\"600\"\n (nzOnCancel)=\"isModalVisible = false\"\n (nzOnOk)=\"addTemplateNodes()\"\n nzOkText=\"Add\"\n nzOkDanger\n nzCancelText=\"Cancel\"\n nzMaskClosable=\"false\"\n>\n <ng-container *nzModalContent>\n <extend-select\n label=\"Template\"\n [lstItem]=\"lstTemplateForSelect\"\n [displayField]=\"'Name'\"\n [multiple]=\"true\"\n [(_ngModel)]=\"lstTemplateSelected\"\n ></extend-select>\n </ng-container>\n</nz-modal>\n", styles: ["@charset \"UTF-8\";::ng-deep .workflow-wrapper{border:solid 1px lightgray;overflow:hidden;width:100%}.workflow-canvas{position:relative;background:#f0f2f5;cursor:default;overflow:hidden;outline:1px dashed rgba(0,0,0,.1)}.workflow-canvas .edges-layer{position:absolute;inset:0;width:100%;height:100%;z-index:1}.workflow-canvas .edges-layer path{stroke-width:2;fill:none}.canvas-content{transform-origin:0 0;width:100%;height:100%;transition:transform .05s linear}.canvas-content{outline:1px dashed red}.canvas-content.panning{cursor:grab}.canvas-content.panning:active{cursor:grabbing}.workflow-canvas.panning{cursor:grab}.workflow-canvas.panning:active{cursor:grabbing}.workflow-canvas.connecting,.workflow-canvas.connecting .workflow-node{cursor:crosshair}.workflow-node{position:absolute;width:160px;cursor:grab;-webkit-user-select:none;user-select:none;z-index:2}.workflow-node:active{cursor:grabbing}.workflow-node.connecting-source,.workflow-node.selected,.workflow-node:hover:not(.workflow-node-start,.workflow-node-end){outline:2px dashed #1890ff}.workflow-node .title{font-weight:600;margin-bottom:6px}.workflow-node-start{width:0px}.workflow-node-start.connecting-source,.workflow-node-start.selected,.workflow-node-start:hover{outline:unset}.workflow-node-start.connecting-source nz-tag,.workflow-node-start.selected nz-tag,.workflow-node-start:hover nz-tag{outline:2px dashed}.workflow-node-start nz-tag{position:relative;top:45px;right:35px}.workflow-node-end{width:0px}.workflow-node-end.connecting-source,.workflow-node-end.selected,.workflow-node-end:hover{outline:unset}.workflow-node-end.connecting-source nz-tag,.workflow-node-end.selected nz-tag,.workflow-node-end:hover nz-tag{outline:2px dashed}.workflow-node-end nz-tag{position:relative;top:45px;right:32px}.connector{position:absolute;top:39px;width:12px;height:12px;background:#1890ff;border-radius:50%;transform:translateY(-50%);cursor:crosshair;transition:box-shadow .15s ease-out,transform .15s ease-out}.connector:hover{box-shadow:0 0 0 3px #1890ff4d;transform:translateY(-50%) scale(1.15)}.connector-right{right:-8px;background:orange}.connector-right.reverse,.connector-left{left:-8px}.connector-left.reverse{left:unset;right:-8px}.connector-start{width:16px;height:16px;right:-8px;background:green;box-shadow:0 0 0 3px #1890ff4d}.connector-end{width:16px;height:16px;left:-8px;background:#000;box-shadow:0 0 0 3px #1890ff4d}.edge{cursor:pointer;stroke:#1890ff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2;fill:none;transition:stroke .15s ease}.edge-hit{stroke:transparent;stroke-width:18px!important;fill:none;cursor:pointer}.edge-hit:hover+.edge{stroke:#ff4d4f;stroke-width:2}.workflow-canvas.dragging-point .edge-hit{pointer-events:none}.edge:hover+.edge-label{fill:#1890ff;font-weight:500}.edge-label{font-size:12px;fill:#555;pointer-events:none;-webkit-user-select:none;user-select:none}.blue{stroke:#1890ff!important}.red{stroke:#ff4d4f!important;box-shadow:0 0 0 3px #1890ff4d!important}.workflow-svg{background:transparent;overflow:visible}.waypoint{position:absolute;width:10px;height:10px;background:#ff4d4f;border-radius:50%;transform:translate(-50%,-50%) scale(1);cursor:move;z-index:1;transition:transform .12s ease-out,background-color .12s ease-out,box-shadow .12s ease-out}.waypoint:hover{background:#ff7875;transform:translate(-50%,-50%) scale(1.25);box-shadow:0 0 0 4px #ff787559}.waypoint.dragging{transition:none;transform:translate(-50%,-50%) scale(1.15);pointer-events:none}.workflow-canvas.dragging-point svg{cursor:grabbing}.selection-box{position:absolute;border:1px dashed #1890ff;background:#1890ff1a;pointer-events:none}.toolbar{position:absolute;top:8px;left:8px;display:flex;gap:4px;padding:6px;background:#fff;border-radius:6px;box-shadow:0 2px 8px #00000026;z-index:100}.toolbar .divider{width:1px;background:#e5e5e5;margin:0 2px}nz-tag.selected{outline:2px dashed #1890ff}.grid-layer{position:absolute;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(rgba(0,0,0,.08) 1px,transparent 1px);background-size:20px 20px}.grid-layer{background-image:linear-gradient(to right,rgba(0,0,0,.06) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.06) 1px,transparent 1px);background-size:20px 20px}.editable-tag{background:#fff;border-style:dashed}::ng-deep .minimap,.minimap-combine{position:absolute;width:180px;height:125px;top:0;right:0;background-color:#eee;border:1px solid #aaa;opacity:.9;z-index:1}::ng-deep .minimap{position:absolute;width:200px;height:140px;top:8px;right:8px;background-color:#f8f9fa;border:1px solid #d9d9d9;border-radius:8px;box-shadow:0 4px 12px #0000001a;overflow:hidden;z-index:100;-webkit-user-select:none;user-select:none}::ng-deep .minimap-node{position:absolute;background-color:#bfbfbf;border-radius:2px}::ng-deep .minimap-node-round{position:absolute;background-color:#bfbfbf;border-radius:50%}::ng-deep .minimap-node-round-start{background-color:#52c41a}::ng-deep .minimap-node-round-end{background-color:#ff4d4f}::ng-deep .minimap-viewport{position:absolute;box-sizing:border-box;background-color:#1890ff26;border:1.5px solid #1890ff;border-radius:4px;z-index:2;cursor:grab;transition:none}::ng-deep .minimap-viewport.grabbing,::ng-deep .minimap-viewport:active{cursor:grabbing;background-color:#1890ff40}::ng-deep .has-floating-label.floating-label{position:relative;padding-top:14px}::ng-deep .has-floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:13px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .has-floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .has-floating-label .full-width{width:100%}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: NzCardModule }, { kind: "component", type: i3$5.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i3$6.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i3$6.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "ngmodule", type: NzRadioModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: Box, selector: "box", inputs: ["display", "width", "height"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$2.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "component", type: ExtendInput, selector: "extend-input", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "inputClass", "labelSpan", "labelFlex", "inputFlex", "showClear", "disabled", "readOnly", "required", "noBottom", "selectModeType", "autocomplete", "autofocus", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "displayField", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "onclickClearIcon", "onenter"] }, { kind: "component", type: ExtendSelectComponent, selector: "extend-select", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "dropdownMatchSelectWidth", "labelSpan", "labelFlex", "disabled", "required", "noBottom", "multiple", "showSelectAll", "maxTagCount", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "lstItem", "displayField", "displayFields", "info", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "itemChange", "onFocus"] }, { kind: "component", type: ExtendCheckbox, selector: "extend-checkbox", inputs: ["label", "labelSpan", "labelFlex", "paddingTop", "disabled", "formData", "controlName", "valueType", "_ngModel"], outputs: ["_ngModelChange"] }, { kind: "component", type: ExtendTextArea, selector: "extend-textarea", inputs: ["label", "placeHolder", "labelAlign", "floatingLabel", "displayInline", "formItemNoButtom", "labelSpan", "labelFlex", "inputFlex", "disabled", "required", "noBottom", "selectModeType", "inputClass", "size", "isSubmited", "minRows", "maxRows", "lstItem", "displayField", "valueField", "formData", "controlName", "_ngModel", "isTouched", "inputErrorMessage", "errorMessages"], outputs: ["_ngModelChange"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "ngmodule", type: NzDividerModule }, { kind: "ngmodule", type: NzAutocompleteModule }, { kind: "component", type: NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "component", type: WF_TemplateDetail, selector: "wf-template-detail", outputs: ["onSave"] }] });
|
|
19808
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: WF_Template_CombineEditorComponent, isStandalone: true, selector: "app-workflow-combine-editor", inputs: { lstTemplateForSelect: "lstTemplateForSelect" }, outputs: { getdata: "getdata", onSave: "onSave", onDeleteTempldateNode: "onDeleteTempldateNode" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true, static: true }, { propertyName: "svgRef", first: true, predicate: ["svg"], descendants: true, static: true }, { propertyName: "wftemplatedetail", first: true, predicate: ["wftemplatedetail"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n #canvas\n class=\"workflow-canvas\"\n [class.connecting]=\"!!connectingFrom\"\n [class.dragging-point]=\"!!draggingPoint\"\n style=\"width: 100%; height: 100%\"\n (mousedown)=\"onMouseDownCanvas($event)\"\n (mousemove)=\"onMouseMoveCanvas($event)\"\n (mouseup)=\"onMouseUpCanvas($event)\"\n (click)=\"onClickCanvas($event)\"\n (wheel)=\"onWheelCanvas($event)\"\n>\n <!-- TOOLBAR -->\n <div class=\"toolbar\" (mousedown)=\"$event.stopPropagation()\" (click)=\"$event.stopPropagation()\">\n <button nz-button nzSize=\"small\" nz-tooltip=\"Editor setting\" (click)=\"settingVisible = true\">\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n\n <button nz-button nzSize=\"small\" nz-tooltip=\"Infomation\" (click)=\"infoVisible = true\">\n <nz-icon nzType=\"info-circle\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button nz-button nzSize=\"small\" nz-tooltip=\"Global Setting\" (click)=\"drawTemplateVisibel = true\">\n <nz-icon nzType=\"setting\"></nz-icon> G\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button nz-button nzSize=\"small\" nzDanger [nzLoading]=\"!ready\" nz-tooltip=\"Save (Ctrl + S)\" (click)=\"save()\">\n <nz-icon nzType=\"save\"></nz-icon>\n </button>\n <button nz-button nzSize=\"small\" [nzLoading]=\"!ready\" nz-tooltip=\"Reload\" (click)=\"getdata.emit()\">\n <nz-icon nzType=\"reload\" class=\"color-primary\"></nz-icon>\n </button>\n <button nz-button nzSize=\"small\" nz-tooltip=\"Th\u00EAm Template m\u1EDBi\" (click)=\"isModalVisible = true\">\n <nz-icon nzType=\"plus\" class=\"color-primary\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"isMoveMode ? 'primary' : 'default'\"\n nz-tooltip=\"Move mode\"\n (click)=\"isMoveMode = true\"\n >\n <nz-icon><img src=\"/assets/icon/hand-palm.png\" width=\"19\" height=\"19\" /></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!isMoveMode ? 'primary' : 'default'\"\n nz-tooltip=\"Select mode\"\n (click)=\"isMoveMode = false\"\n >\n <nz-icon><img src=\"/assets/icon/cursor.png\" width=\"19\" height=\"19\" /></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- UNDO / REDO -->\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n [disabled]=\"undoStack.length === 0\"\n nz-tooltip=\"Undo\"\n (click)=\"undo()\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n [disabled]=\"redoStack.length === 0\"\n nz-tooltip=\"Redo\"\n (click)=\"redo()\"\n >\n <nz-icon nzType=\"redo\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- ALIGN -->\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignLeft()\">\u27F8</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignCenter()\">\u2261</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignRight()\">\u27F9</button>\n <span class=\"divider\"></span>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignTop()\">\u21D1</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignMiddle()\">\u2550</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignBottom()\">\u21D3</button>\n <span class=\"divider\"></span>\n <!-- DISTRIBUTE -->\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 3\" (click)=\"distributeHorizontal()\">\n \u21C4\n </button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 3\" (click)=\"distributeVertical()\">\n \u21C5\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- ZOOM -->\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomOut()\" nz-tooltip=\"Zoom Out\">\n <nz-icon nzType=\"minus\"></nz-icon>\n </button>\n <span>{{ Math.round(zoom * 100) }}%</span>\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomIn()\" nz-tooltip=\"Zoom In\">\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n <span class=\"divider\"></span>\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"resetZoom()\" nz-tooltip=\"Reset Zoom (Ctrl+0)\">\n <nz-icon nzType=\"expand\"></nz-icon>\n </button>\n </div>\n\n <div\n class=\"canvas-content\"\n [class.panning]=\"isMoveMode\"\n [style.width.px]=\"getCanvasWidth()\"\n [style.height.px]=\"getCanvasHeight()\"\n [style.transform]=\"\n 'translate(' +\n templateCombine.editorOption.panX +\n 'px,' +\n templateCombine.editorOption.panY +\n 'px) scale(' +\n zoom +\n ')'\n \"\n >\n <!-- GRID -->\n <div *ngIf=\"wfcSetting.ShowGrid\" class=\"grid-layer\"></div>\n\n <!-- SVG EDGES -->\n <svg #svg class=\"edges-layer\" width=\"100%\" height=\"100%\" preserveAspectRatio=\"none\">\n <g>\n <!-- DEFS -->\n <defs>\n <filter id=\"edge-glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\n <feGaussianBlur stdDeviation=\"2\" result=\"blur\" />\n <feMerge>\n <feMergeNode in=\"blur\" />\n <feMergeNode in=\"SourceGraphic\" />\n </feMerge>\n </filter>\n\n <marker\n id=\"arrow-blue\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n refX=\"10\"\n refY=\"5\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path class=\"blue\" d=\"M0,0 L10,5 L0,10\"></path>\n </marker>\n <marker\n id=\"arrow-red\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n refX=\"10\"\n refY=\"5\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path class=\"red\" d=\"M0,0 L10,5 L0,10\"></path>\n </marker>\n </defs>\n\n <!-- EDGES B\u00CCNH TH\u01AF\u1EDCNG -->\n <ng-container *ngFor=\"let e of normalEdges; let i = index\">\n <path class=\"edge\" [attr.id]=\"'edge-path-' + i\" [attr.d]=\"buildPath(e)\" marker-end=\"url(#arrow-blue)\"></path>\n\n <path\n class=\"edge-hit\"\n [attr.d]=\"buildPath(e)\"\n (mouseenter)=\"onMouseEnterEdge(e)\"\n (mouseleave)=\"onMouseLeaveEdge(e)\"\n (click)=\"onClickEdge(e, $event)\"\n ></path>\n\n <!-- \u0110\u00E3 x\u00F3a *ngIf=\"e.RuleLineDetails?.length\" \u1EDF \u0111\u00E2y \u0111\u1EC3 text lu\u00F4n hi\u1EC7n -->\n <text\n class=\"edge-label\"\n style=\"fill: #1890ff; font-weight: 500\"\n [attr.x]=\"getEdgeLabelPosition(e).x\"\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\n [attr.text-anchor]=\"'middle'\"\n >\n {{ e.FromStage }} / {{ e.FromAction }} > {{ e.ToStage }} / {{ e.ToAction }}\n </text>\n </ng-container>\n\n <!-- EDGE \u0110ANG HOVER/SELECTED (HI\u1EC2N TH\u1ECA M\u00C0U \u0110\u1ECE) -->\n <ng-container *ngFor=\"let e of hoverEdges; let i = index\">\n <path\n class=\"edge red\"\n [attr.id]=\"'edge-path-hover-' + i\"\n [attr.d]=\"buildPath(e)\"\n marker-end=\"url(#arrow-red)\"\n ></path>\n\n <path\n class=\"edge-hit\"\n [attr.d]=\"buildPath(e)\"\n (mouseleave)=\"onMouseLeaveEdge(e)\"\n (click)=\"onClickEdge(e, $event)\"\n ></path>\n\n <text\n class=\"edge-label\"\n style=\"font-weight: bold; fill: red\"\n [attr.x]=\"getEdgeLabelPosition(e).x\"\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\n [attr.text-anchor]=\"'middle'\"\n >\n {{ e.FromStage }} / {{ e.FromAction }} > {{ e.ToStage }} / {{ e.ToAction }}\n </text>\n </ng-container>\n\n <!-- PREVIEW LINE (\u0110\u01AF\u1EDCNG N\u1ED0I \u0110ANG K\u00C9O) -->\n <path\n *ngIf=\"connectingFrom\"\n class=\"edge\"\n [attr.d]=\"buildPreviewPath()\"\n stroke-dasharray=\"5,5\"\n marker-end=\"url(#arrow-blue)\"\n ></path>\n </g>\n </svg>\n\n <!-- BOX V\u00D9NG CH\u1ECCN MULTI -->\n <div\n *ngIf=\"isSelecting && selectStart && selectEnd\"\n class=\"selection-box\"\n [style.left.px]=\"Math.min(selectStart.x, selectEnd.x)\"\n [style.top.px]=\"Math.min(selectStart.y, selectEnd.y)\"\n [style.width.px]=\"Math.abs(selectEnd.x - selectStart.x)\"\n [style.height.px]=\"Math.abs(selectEnd.y - selectStart.y)\"\n ></div>\n\n <!-- NODE (TEMPLATE) L\u1EDAP HI\u1EC2N TH\u1ECA TR\u00CAN C\u00D9NG -->\n @for (n of lstTemplateNode; track n.WF_Template_Id) {\n <nz-card\n class=\"workflow-node\"\n [attr.data-id]=\"n.Code\"\n [class.selected]=\"\n n == selectedTemplateNode || n == hoverTemplateNode || lstSelectedTemplateId.has(n.WF_Template_Id)\n \"\n [style.left.px]=\"n.editorOption.x\"\n [style.top.px]=\"n.editorOption.y\"\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\n nzSize=\"small\"\n (mousedown)=\"onMouseDownNode($event, n)\"\n (click)=\"$event.stopPropagation(); onClickNode(n)\"\n >\n <div class=\"title\" style=\"color: #1890ff; display: flex; justify-content: space-between; align-items: center\">\n <span>{{ n.Code }}</span>\n <nz-icon nzType=\"layout\" nzTheme=\"outline\"></nz-icon>\n </div>\n <div\n style=\"\n font-size: 12px;\n line-height: 1.2;\n font-weight: 500;\n height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n \"\n >\n {{ n.Name || \"Ch\u01B0a c\u00F3 t\u00EAn\" }}\n </div>\n <div style=\"font-size: 10px; color: gray; margin-top: 4px\">\n {{ n.DocType }}\n </div>\n\n <!-- CONNECTOR \u0110\u1EC2 K\u00C9O D\u00C2Y -->\n <div class=\"connector connector-right\" (click)=\"onClickConnector($event, n, 'right')\"></div>\n <div class=\"connector connector-left\" (click)=\"onClickConnector($event, n, 'left')\"></div>\n </nz-card>\n }\n\n <!-- C\u00C1C \u0110I\u1EC2M WAYPOINT \u0110\u1EC2 B\u1EBA CONG D\u00C2Y CHU\u1ED8T -->\n @for (p of connectingPoints; track $index) {\n @if (p != draggingPoint) {\n <div\n class=\"waypoint\"\n [style.left.px]=\"p.x\"\n [style.top.px]=\"p.y\"\n (mousedown)=\"onmousedownPoint($event, p)\"\n (contextmenu)=\"onRightClickPoint($event, hoverTemplateEdge!, $index)\"\n ></div>\n } @else {\n <div\n class=\"waypoint dragging\"\n [style.left.px]=\"p.x\"\n [style.top.px]=\"p.y\"\n (mousedown)=\"onmousedownPoint($event, p)\"\n ></div>\n }\n }\n </div>\n</div>\n\n<!-- ==============================================\n 1. DRAWER: GLOBAL TEMPLATE SETTINGS \n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawTemplateTitle\"\n nzPlacement=\"right\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzVisible]=\"drawTemplateVisibel\"\n [nzFooter]=\"footerTplTemplate\"\n (nzOnClose)=\"drawTemplateVisibel = false\"\n>\n <ng-template #drawTemplateTitle> <nz-icon nzType=\"global\"></nz-icon> Quy tr\u00ECnh ph\u1ED1i h\u1EE3p </ng-template>\n <ng-container *nzDrawerContent>\n <!-- Gi\u1EEF nguy\u00EAn c\u00E1c th\u00F4ng tin chung to\u00E0n c\u1EE5c c\u1EE7a b\u1EA1n \u1EDF \u0111\u00E2y -->\n\n <extend-input [label]=\"'Code'\" [(_ngModel)]=\"templateCombine.Code\"></extend-input>\n <extend-input [label]=\"'Name'\" [(_ngModel)]=\"templateCombine.Name\"></extend-input>\n <extend-textarea [label]=\"'Description'\" [(_ngModel)]=\"templateCombine.Description\"></extend-textarea>\n <extend-checkbox [label]=\"'Active'\" [(_ngModel)]=\"templateCombine.IsActive\"></extend-checkbox>\n </ng-container>\n\n <ng-template #footerTplTemplate>\n <div nz-flex [nzGap]=\"6\" [nzJustify]=\"'end'\">\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\n <button nz-button (click)=\"drawTemplateVisibel = false\">Close</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 2. DRAWER: NODE SETTINGS (CHI TI\u1EBET M\u1ED8T TEMPLATE)\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawerTitleNode\"\n [nzPlacement]=\"selectedTemplateNode?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\n [nzVisible]=\"!!selectedTemplateNode\"\n [nzWidth]=\"'90vw'\"\n [nzClosable]=\"false\"\n [nzFooter]=\"footerTplNode\"\n (nzOnClose)=\"selectedTemplateNode = undefined\"\n>\n <ng-template #drawerTitleNode>\n <div nz-row nzJustify=\"space-between\">\n <span style=\"font-weight: bold; color: #1890ff\"\n ><nz-icon nzType=\"layout\"></nz-icon> TEMPLATE NODE: [{{ selectedTemplateNode?.Code }}]\n {{ selectedTemplateNode?.Name }}</span\n >\n <button\n nz-button\n nzSize=\"small\"\n nz-tooltip=\"Chuy\u1EC3n v\u1ECB tr\u00ED Drawer\"\n (click)=\"\n selectedTemplateNode!.editorOption.drawerPosition =\n selectedTemplateNode!.editorOption.drawerPosition === 'left' ? 'right' : 'left'\n \"\n >\n <nz-icon nzType=\"swap\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <ng-container *ngIf=\"selectedTemplateNode\">\n <wf-template-detail\n #wftemplatedetail\n (onSave)=\"getdata.emit()\"\n (onDeleteRule)=\"getdata.emit()\"\n ></wf-template-detail>\n </ng-container>\n </ng-container>\n\n <ng-template #footerTplNode>\n <div\n nz-flex\n [nzGap]=\"6\"\n [nzJustify]=\"selectedTemplateNode?.editorOption?.drawerPosition == 'left' ? 'start' : 'end'\"\n >\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"wftemplatedetail.wfeditor.save()\">Save</button>\n <button nz-button (click)=\"selectedTemplateNode = undefined\">Close</button>\n <button nz-button nzDanger (click)=\"deleteTemplateNode()\">Delete Template node</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 3. DRAWER: EDGE SETTINGS (QU\u1EA2N L\u00DD QUY T\u1EAEC CHUY\u1EC2N TEMPLATE)\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawerTitleEdge\"\n [nzPlacement]=\"selectedTemplateEdge?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\n [nzClosable]=\"false\"\n [nzWidth]=\"'450px'\"\n [nzVisible]=\"!!selectedTemplateEdge\"\n [nzFooter]=\"footerTplEdge\"\n (nzOnClose)=\"selectedTemplateEdge = undefined\"\n>\n <ng-template #drawerTitleEdge>\n <div nz-row nzJustify=\"space-between\">\n <span style=\"font-weight: bold; color: #ff4d4f\"><nz-icon nzType=\"swap-right\"></nz-icon> TRANSITION RULES </span>\n <button\n nz-button\n nzSize=\"small\"\n nz-tooltip=\"Chuy\u1EC3n v\u1ECB tr\u00ED Drawer\"\n (click)=\"\n selectedTemplateEdge!.editorOption.drawerPosition =\n selectedTemplateEdge!.editorOption.drawerPosition === 'left' ? 'right' : 'left'\n \"\n >\n <nz-icon nzType=\"swap\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <ng-container *ngIf=\"selectedTemplateEdge\">\n <!-- Th\u00F4ng tin 2 \u0111\u1EA7u n\u1ED1i -->\n <div\n style=\"background: #fdf5f6; padding: 12px; border: 1px solid #ffa39e; border-radius: 6px; margin-bottom: 16px\"\n >\n <div style=\"font-size: 14px\">\n <strong style=\"display: inline-block; width: 70px; color: #555\">From:</strong>\n <span style=\"color: #1890ff; font-weight: 500\">\n [{{ getNode(selectedTemplateEdge.From_WF_Template_Id)?.Code }}]\n {{ getNode(selectedTemplateEdge.From_WF_Template_Id)?.Name }} > {{ selectedTemplateEdge.FromStage }} >\n {{ selectedTemplateEdge.FromAction }}\n </span>\n </div>\n <div style=\"font-size: 14px; margin-top: 8px\">\n <strong style=\"display: inline-block; width: 70px; color: #555\">Taget:</strong>\n <span style=\"color: #1890ff; font-weight: 500\">\n [{{ getNode(selectedTemplateEdge.To_WF_Template_Id)?.Code }}]\n {{ getNode(selectedTemplateEdge.To_WF_Template_Id)?.Name }} > {{ selectedTemplateEdge.ToStage }} >\n {{ selectedTemplateEdge.ToAction }}\n </span>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #footerTplEdge>\n <div\n nz-flex\n [nzGap]=\"6\"\n [nzJustify]=\"selectedTemplateEdge?.editorOption?.drawerPosition == 'left' ? 'start' : 'end'\"\n >\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save Rules</button>\n <button\n nz-button\n nzDanger\n (click)=\"\n lstTemplateEdge.splice(lstTemplateEdge.indexOf(selectedTemplateEdge!), 1); selectedTemplateEdge = undefined\n \"\n >\n Delete Transition\n </button>\n <button nz-button (click)=\"selectedTemplateEdge = undefined\">Close</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 4. EDITOR SETTING & INFO\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawSettingTitle\"\n nzPlacement=\"right\"\n [nzClosable]=\"false\"\n [nzVisible]=\"settingVisible\"\n (nzOnClose)=\"settingVisible = false\"\n>\n <ng-template #drawSettingTitle> <nz-icon nzType=\"setting\"></nz-icon> C\u00E0i \u0111\u1EB7t Editor </ng-template>\n <ng-container *nzDrawerContent>\n <div class=\"form-item-no-bottom\">\n <extend-checkbox\n [label]=\"'Hi\u1EC3n th\u1ECB L\u01B0\u1EDBi (Grid)'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"wfcSetting.ShowGrid\"\n ></extend-checkbox>\n </div>\n </ng-container>\n</nz-drawer>\n\n<nz-drawer\n [nzTitle]=\"drawInfoTitle\"\n nzPlacement=\"right\"\n [nzClosable]=\"false\"\n [nzVisible]=\"infoVisible\"\n (nzOnClose)=\"infoVisible = false\"\n>\n <ng-template #drawInfoTitle> <nz-icon nzType=\"info-circle\"></nz-icon> H\u01B0\u1EDBng d\u1EABn (Infomation) </ng-template>\n <ng-container *nzDrawerContent>\n <p>\n <strong>1. C\u00E1c th\u00E0nh ph\u1EA7n:</strong> C\u00E1c \u00F4 ch\u1EEF nh\u1EADt l\u00E0 Template (Quy tr\u00ECnh nh\u1ECF), c\u00E1c \u0111\u01B0\u1EDDng n\u1ED1i l\u00E0 Transition Rule\n (Quy t\u1EAFc chuy\u1EC3n quy tr\u00ECnh).\n </p>\n <p><strong>2. C\u00E1ch n\u1ED1i 2 Template:</strong></p>\n <ul>\n <li>Click ch\u1EA5m cam b\u00EAn ph\u1EA3i Template A, sau \u0111\u00F3 k\u00E9o v\u00E0 click v\u00E0o Template B \u0111\u1EC3 t\u1EA1o Rule n\u1ED1i.</li>\n <li>C\u00F3 th\u1EC3 click nhi\u1EC1u \u0111i\u1EC3m trong l\u00FAc k\u00E9o \u0111\u1EC3 b\u1EBB \u0111\u01B0\u1EDDng cong tu\u1EF3 \u00FD (Waypoint).</li>\n <li>Click \u0111\u00FAp v\u00E0o c\u1EA1nh (\u0111\u01B0\u1EDDng n\u1ED1i) \u0111ang c\u00F3 \u0111\u1EC3 t\u1EA1o th\u00EAm m\u1ED9t \u0111i\u1EC3m b\u1EBB cong m\u1EDBi.</li>\n <li>Gi\u1EEF v\u00E0 k\u00E9o \u0111i\u1EC3m b\u1EBB cong \u0111\u1EC3 tu\u1EF3 ch\u1EC9nh \u0111\u01B0\u1EDDng \u0111i. Chu\u1ED9t ph\u1EA3i v\u00E0o \u0111i\u1EC3m \u0111\u00F3 \u0111\u1EC3 x\u00F3a n\u00F3.</li>\n </ul>\n <p>\n <strong>3. Qu\u1EA3n l\u00FD Rule:</strong> Click v\u00E0o \u0111\u01B0\u1EDDng n\u1ED1i gi\u1EEFa 2 Node \u0111\u1EC3 c\u1EA5u h\u00ECnh c\u00E1c lu\u1ED3ng th\u1EF1c thi (Stored, Ph\u00E2n\n quy\u1EC1n, G\u1EEDi mail).\n </p>\n </ng-container>\n</nz-drawer>\n\n<nz-modal\n [(nzVisible)]=\"isModalVisible\"\n nzTitle=\"Add template node\"\n [nzWidth]=\"600\"\n (nzOnCancel)=\"isModalVisible = false\"\n (nzOnOk)=\"addTemplateNodes()\"\n nzOkText=\"Add\"\n nzOkDanger\n nzCancelText=\"Cancel\"\n nzMaskClosable=\"false\"\n>\n <ng-container *nzModalContent>\n <extend-select\n label=\"Template\"\n [lstItem]=\"lstTemplateForSelect\"\n [displayField]=\"'Name'\"\n [multiple]=\"true\"\n [(_ngModel)]=\"lstTemplateSelected\"\n ></extend-select>\n </ng-container>\n</nz-modal>\n", styles: ["@charset \"UTF-8\";::ng-deep .workflow-wrapper{border:solid 1px lightgray;overflow:hidden;width:100%}.workflow-canvas{position:relative;background:#f0f2f5;cursor:default;overflow:hidden;outline:1px dashed rgba(0,0,0,.1)}.workflow-canvas .edges-layer{position:absolute;inset:0;width:100%;height:100%;z-index:1}.workflow-canvas .edges-layer path{stroke-width:2;fill:none}.canvas-content{transform-origin:0 0;width:100%;height:100%;transition:transform .05s linear}.canvas-content{outline:1px dashed red}.canvas-content.panning{cursor:grab}.canvas-content.panning:active{cursor:grabbing}.workflow-canvas.panning{cursor:grab}.workflow-canvas.panning:active{cursor:grabbing}.workflow-canvas.connecting,.workflow-canvas.connecting .workflow-node{cursor:crosshair}.workflow-node{position:absolute;width:160px;cursor:grab;-webkit-user-select:none;user-select:none;z-index:2}.workflow-node:active{cursor:grabbing}.workflow-node.connecting-source,.workflow-node.selected,.workflow-node:hover:not(.workflow-node-start,.workflow-node-end){outline:2px dashed #1890ff}.workflow-node .title{font-weight:600;margin-bottom:6px}.workflow-node-start{width:0px}.workflow-node-start.connecting-source,.workflow-node-start.selected,.workflow-node-start:hover{outline:unset}.workflow-node-start.connecting-source nz-tag,.workflow-node-start.selected nz-tag,.workflow-node-start:hover nz-tag{outline:2px dashed}.workflow-node-start nz-tag{position:relative;top:45px;right:35px}.workflow-node-end{width:0px}.workflow-node-end.connecting-source,.workflow-node-end.selected,.workflow-node-end:hover{outline:unset}.workflow-node-end.connecting-source nz-tag,.workflow-node-end.selected nz-tag,.workflow-node-end:hover nz-tag{outline:2px dashed}.workflow-node-end nz-tag{position:relative;top:45px;right:32px}.connector{position:absolute;top:39px;width:12px;height:12px;background:#1890ff;border-radius:50%;transform:translateY(-50%);cursor:crosshair;transition:box-shadow .15s ease-out,transform .15s ease-out}.connector:hover{box-shadow:0 0 0 3px #1890ff4d;transform:translateY(-50%) scale(1.15)}.connector-right{right:-8px;background:orange}.connector-right.reverse,.connector-left{left:-8px}.connector-left.reverse{left:unset;right:-8px}.connector-start{width:16px;height:16px;right:-8px;background:green;box-shadow:0 0 0 3px #1890ff4d}.connector-end{width:16px;height:16px;left:-8px;background:#000;box-shadow:0 0 0 3px #1890ff4d}.edge{cursor:pointer;stroke:#1890ff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2;fill:none;transition:stroke .15s ease}.edge-hit{stroke:transparent;stroke-width:18px!important;fill:none;cursor:pointer}.edge-hit:hover+.edge{stroke:#ff4d4f;stroke-width:2}.workflow-canvas.dragging-point .edge-hit{pointer-events:none}.edge:hover+.edge-label{fill:#1890ff;font-weight:500}.edge-label{font-size:12px;fill:#555;pointer-events:none;-webkit-user-select:none;user-select:none}.blue{stroke:#1890ff!important}.red{stroke:#ff4d4f!important;box-shadow:0 0 0 3px #1890ff4d!important}.workflow-svg{background:transparent;overflow:visible}.waypoint{position:absolute;width:10px;height:10px;background:#ff4d4f;border-radius:50%;transform:translate(-50%,-50%) scale(1);cursor:move;z-index:1;transition:transform .12s ease-out,background-color .12s ease-out,box-shadow .12s ease-out}.waypoint:hover{background:#ff7875;transform:translate(-50%,-50%) scale(1.25);box-shadow:0 0 0 4px #ff787559}.waypoint.dragging{transition:none;transform:translate(-50%,-50%) scale(1.15);pointer-events:none}.workflow-canvas.dragging-point svg{cursor:grabbing}.selection-box{position:absolute;border:1px dashed #1890ff;background:#1890ff1a;pointer-events:none}.toolbar{position:absolute;top:8px;left:8px;display:flex;gap:4px;padding:6px;background:#fff;border-radius:6px;box-shadow:0 2px 8px #00000026;z-index:100}.toolbar .divider{width:1px;background:#e5e5e5;margin:0 2px}nz-tag.selected{outline:2px dashed #1890ff}.grid-layer{position:absolute;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(rgba(0,0,0,.08) 1px,transparent 1px);background-size:20px 20px}.grid-layer{background-image:linear-gradient(to right,rgba(0,0,0,.06) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.06) 1px,transparent 1px);background-size:20px 20px}.editable-tag{background:#fff;border-style:dashed}::ng-deep .minimap,.minimap-combine{position:absolute;width:180px;height:125px;top:0;right:0;background-color:#eee;border:1px solid #aaa;opacity:.9;z-index:1}::ng-deep .minimap{position:absolute;width:200px;height:140px;top:8px;right:8px;background-color:#f8f9fa;border:1px solid #d9d9d9;border-radius:8px;box-shadow:0 4px 12px #0000001a;overflow:hidden;z-index:100;-webkit-user-select:none;user-select:none}::ng-deep .minimap-node{position:absolute;background-color:#bfbfbf;border-radius:2px}::ng-deep .minimap-node-round{position:absolute;background-color:#bfbfbf;border-radius:50%}::ng-deep .minimap-node-round-start{background-color:#52c41a}::ng-deep .minimap-node-round-end{background-color:#ff4d4f}::ng-deep .minimap-viewport{position:absolute;box-sizing:border-box;background-color:#1890ff26;border:1.5px solid #1890ff;border-radius:4px;z-index:2;cursor:grab;transition:none}::ng-deep .minimap-viewport.grabbing,::ng-deep .minimap-viewport:active{cursor:grabbing;background-color:#1890ff40}::ng-deep .has-floating-label.floating-label{position:relative;padding-top:14px}::ng-deep .has-floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:13px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .has-floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .has-floating-label .full-width{width:100%}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: NzCardModule }, { kind: "component", type: i3$5.NzCardComponent, selector: "nz-card", inputs: ["nzBordered", "nzLoading", "nzHoverable", "nzBodyStyle", "nzCover", "nzActions", "nzType", "nzSize", "nzTitle", "nzExtra"], exportAs: ["nzCard"] }, { kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i3$6.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i3$6.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzTagModule }, { kind: "ngmodule", type: NzRadioModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1$2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: Box, selector: "box", inputs: ["display", "width", "height"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3$2.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i4$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "ngmodule", type: NzToolTipModule }, { kind: "directive", type: i8.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "component", type: ExtendInput, selector: "extend-input", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "inputClass", "labelSpan", "labelFlex", "inputFlex", "showClear", "disabled", "readOnly", "required", "noBottom", "selectModeType", "autocomplete", "autofocus", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "displayField", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "onclickClearIcon", "onenter"] }, { kind: "component", type: ExtendSelectComponent, selector: "extend-select", inputs: ["label", "floatingLabel", "placeHolder", "labelAlign", "dropdownMatchSelectWidth", "labelSpan", "labelFlex", "disabled", "required", "noBottom", "multiple", "showSelectAll", "maxTagCount", "inputWidth", "inputHeight", "borderBottomOnly", "displayInline", "size", "lstItem", "displayField", "displayFields", "info", "valueField", "formData", "controlName", "_ngModel", "isSubmited"], outputs: ["_ngModelChange", "itemChange", "onFocus"] }, { kind: "component", type: ExtendCheckbox, selector: "extend-checkbox", inputs: ["label", "labelSpan", "labelFlex", "paddingTop", "disabled", "formData", "controlName", "valueType", "_ngModel"], outputs: ["_ngModelChange"] }, { kind: "component", type: ExtendTextArea, selector: "extend-textarea", inputs: ["label", "placeHolder", "labelAlign", "floatingLabel", "displayInline", "formItemNoButtom", "labelSpan", "labelFlex", "inputFlex", "disabled", "required", "noBottom", "selectModeType", "inputClass", "size", "isSubmited", "minRows", "maxRows", "lstItem", "displayField", "valueField", "formData", "controlName", "_ngModel", "isTouched", "inputErrorMessage", "errorMessages"], outputs: ["_ngModelChange"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "ngmodule", type: NzGridModule }, { kind: "directive", type: i2$1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "ngmodule", type: NzFlexModule }, { kind: "directive", type: i3$3.NzFlexDirective, selector: "[nz-flex],nz-flex", inputs: ["nzVertical", "nzJustify", "nzAlign", "nzGap", "nzWrap", "nzFlex"], exportAs: ["nzFlex"] }, { kind: "ngmodule", type: NzTableModule }, { kind: "ngmodule", type: NzDividerModule }, { kind: "ngmodule", type: NzAutocompleteModule }, { kind: "component", type: NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzDraggable", "nzContent", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { kind: "directive", type: NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { kind: "component", type: WF_TemplateDetail, selector: "wf-template-detail", outputs: ["onSave", "onDeleteRule"] }] });
|
|
19707
19809
|
}
|
|
19708
19810
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WF_Template_CombineEditorComponent, decorators: [{
|
|
19709
19811
|
type: Component,
|
|
@@ -19731,7 +19833,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
19731
19833
|
NzModalComponent,
|
|
19732
19834
|
NzModalContentDirective,
|
|
19733
19835
|
WF_TemplateDetail,
|
|
19734
|
-
], selector: 'app-workflow-combine-editor', template: "<div\n #canvas\n class=\"workflow-canvas\"\n [class.connecting]=\"!!connectingFrom\"\n [class.dragging-point]=\"!!draggingPoint\"\n style=\"width: 100%; height: 100%\"\n (mousedown)=\"onMouseDownCanvas($event)\"\n (mousemove)=\"onMouseMoveCanvas($event)\"\n (mouseup)=\"onMouseUpCanvas($event)\"\n (click)=\"onClickCanvas($event)\"\n (wheel)=\"onWheelCanvas($event)\"\n>\n <!-- TOOLBAR -->\n <div class=\"toolbar\" (mousedown)=\"$event.stopPropagation()\" (click)=\"$event.stopPropagation()\">\n <button nz-button nzSize=\"small\" nz-tooltip=\"Editor setting\" (click)=\"settingVisible = true\">\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n\n <button nz-button nzSize=\"small\" nz-tooltip=\"Infomation\" (click)=\"infoVisible = true\">\n <nz-icon nzType=\"info-circle\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button nz-button nzSize=\"small\" nz-tooltip=\"Global Setting\" (click)=\"drawTemplateVisibel = true\">\n <nz-icon nzType=\"setting\"></nz-icon> G\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button nz-button nzSize=\"small\" nzDanger [nzLoading]=\"!ready\" nz-tooltip=\"Save (Ctrl + S)\" (click)=\"save()\">\n <nz-icon nzType=\"save\"></nz-icon>\n </button>\n <button nz-button nzSize=\"small\" nz-tooltip=\"Th\u00EAm Template m\u1EDBi\" (click)=\"isModalVisible = true\">\n <nz-icon nzType=\"plus\" class=\"color-primary\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"isMoveMode ? 'primary' : 'default'\"\n nz-tooltip=\"Move mode\"\n (click)=\"isMoveMode = true\"\n >\n <nz-icon><img src=\"/assets/icon/hand-palm.png\" width=\"19\" height=\"19\" /></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!isMoveMode ? 'primary' : 'default'\"\n nz-tooltip=\"Select mode\"\n (click)=\"isMoveMode = false\"\n >\n <nz-icon><img src=\"/assets/icon/cursor.png\" width=\"19\" height=\"19\" /></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- UNDO / REDO -->\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n [disabled]=\"undoStack.length === 0\"\n nz-tooltip=\"Undo\"\n (click)=\"undo()\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n [disabled]=\"redoStack.length === 0\"\n nz-tooltip=\"Redo\"\n (click)=\"redo()\"\n >\n <nz-icon nzType=\"redo\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- ALIGN -->\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignLeft()\">\u27F8</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignCenter()\">\u2261</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignRight()\">\u27F9</button>\n <span class=\"divider\"></span>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignTop()\">\u21D1</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignMiddle()\">\u2550</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignBottom()\">\u21D3</button>\n <span class=\"divider\"></span>\n <!-- DISTRIBUTE -->\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 3\" (click)=\"distributeHorizontal()\">\n \u21C4\n </button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 3\" (click)=\"distributeVertical()\">\n \u21C5\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- ZOOM -->\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomOut()\" nz-tooltip=\"Zoom Out\">\n <nz-icon nzType=\"minus\"></nz-icon>\n </button>\n <span>{{ Math.round(zoom * 100) }}%</span>\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomIn()\" nz-tooltip=\"Zoom In\">\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n <span class=\"divider\"></span>\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"resetZoom()\" nz-tooltip=\"Reset Zoom (Ctrl+0)\">\n <nz-icon nzType=\"expand\"></nz-icon>\n </button>\n </div>\n\n <div\n class=\"canvas-content\"\n [class.panning]=\"isMoveMode\"\n [style.width.px]=\"getCanvasWidth()\"\n [style.height.px]=\"getCanvasHeight()\"\n [style.transform]=\"\n 'translate(' +\n templateCombine.editorOption.panX +\n 'px,' +\n templateCombine.editorOption.panY +\n 'px) scale(' +\n zoom +\n ')'\n \"\n >\n <!-- GRID -->\n <div *ngIf=\"wfcSetting.ShowGrid\" class=\"grid-layer\"></div>\n\n <!-- SVG EDGES -->\n <svg #svg class=\"edges-layer\" width=\"100%\" height=\"100%\" preserveAspectRatio=\"none\">\n <g>\n <!-- DEFS -->\n <defs>\n <filter id=\"edge-glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\n <feGaussianBlur stdDeviation=\"2\" result=\"blur\" />\n <feMerge>\n <feMergeNode in=\"blur\" />\n <feMergeNode in=\"SourceGraphic\" />\n </feMerge>\n </filter>\n\n <marker\n id=\"arrow-blue\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n refX=\"10\"\n refY=\"5\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path class=\"blue\" d=\"M0,0 L10,5 L0,10\"></path>\n </marker>\n <marker\n id=\"arrow-red\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n refX=\"10\"\n refY=\"5\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path class=\"red\" d=\"M0,0 L10,5 L0,10\"></path>\n </marker>\n </defs>\n\n <!-- EDGES B\u00CCNH TH\u01AF\u1EDCNG -->\n <ng-container *ngFor=\"let e of normalEdges; let i = index\">\n <path class=\"edge\" [attr.id]=\"'edge-path-' + i\" [attr.d]=\"buildPath(e)\" marker-end=\"url(#arrow-blue)\"></path>\n\n <path\n class=\"edge-hit\"\n [attr.d]=\"buildPath(e)\"\n (mouseenter)=\"onMouseEnterEdge(e)\"\n (mouseleave)=\"onMouseLeaveEdge(e)\"\n (click)=\"onClickEdge(e, $event)\"\n ></path>\n\n <!-- \u0110\u00E3 x\u00F3a *ngIf=\"e.RuleLineDetails?.length\" \u1EDF \u0111\u00E2y \u0111\u1EC3 text lu\u00F4n hi\u1EC7n -->\n <text\n class=\"edge-label\"\n style=\"fill: #1890ff; font-weight: 500\"\n [attr.x]=\"getEdgeLabelPosition(e).x\"\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\n [attr.text-anchor]=\"'middle'\"\n >\n {{ e.FromStage }} / {{ e.FromAction }} > {{ e.ToStage }} / {{ e.ToAction }}\n </text>\n </ng-container>\n\n <!-- EDGE \u0110ANG HOVER/SELECTED (HI\u1EC2N TH\u1ECA M\u00C0U \u0110\u1ECE) -->\n <ng-container *ngFor=\"let e of hoverEdges; let i = index\">\n <path\n class=\"edge red\"\n [attr.id]=\"'edge-path-hover-' + i\"\n [attr.d]=\"buildPath(e)\"\n marker-end=\"url(#arrow-red)\"\n ></path>\n\n <path\n class=\"edge-hit\"\n [attr.d]=\"buildPath(e)\"\n (mouseleave)=\"onMouseLeaveEdge(e)\"\n (click)=\"onClickEdge(e, $event)\"\n ></path>\n\n <text\n class=\"edge-label\"\n style=\"font-weight: bold; fill: red\"\n [attr.x]=\"getEdgeLabelPosition(e).x\"\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\n [attr.text-anchor]=\"'middle'\"\n >\n {{ e.FromStage }} / {{ e.FromAction }} > {{ e.ToStage }} / {{ e.ToAction }}\n </text>\n </ng-container>\n\n <!-- PREVIEW LINE (\u0110\u01AF\u1EDCNG N\u1ED0I \u0110ANG K\u00C9O) -->\n <path\n *ngIf=\"connectingFrom\"\n class=\"edge\"\n [attr.d]=\"buildPreviewPath()\"\n stroke-dasharray=\"5,5\"\n marker-end=\"url(#arrow-blue)\"\n ></path>\n </g>\n </svg>\n\n <!-- BOX V\u00D9NG CH\u1ECCN MULTI -->\n <div\n *ngIf=\"isSelecting && selectStart && selectEnd\"\n class=\"selection-box\"\n [style.left.px]=\"Math.min(selectStart.x, selectEnd.x)\"\n [style.top.px]=\"Math.min(selectStart.y, selectEnd.y)\"\n [style.width.px]=\"Math.abs(selectEnd.x - selectStart.x)\"\n [style.height.px]=\"Math.abs(selectEnd.y - selectStart.y)\"\n ></div>\n\n <!-- NODE (TEMPLATE) L\u1EDAP HI\u1EC2N TH\u1ECA TR\u00CAN C\u00D9NG -->\n @for (n of lstTemplateNode; track n.WF_Template_Id) {\n <nz-card\n class=\"workflow-node\"\n [attr.data-id]=\"n.Code\"\n [class.selected]=\"\n n == selectedTemplateNode || n == hoverTemplateNode || lstSelectedTemplateId.has(n.WF_Template_Id)\n \"\n [style.left.px]=\"n.editorOption.x\"\n [style.top.px]=\"n.editorOption.y\"\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\n nzSize=\"small\"\n (mousedown)=\"onMouseDownNode($event, n)\"\n (click)=\"$event.stopPropagation(); onClickNode(n)\"\n >\n <div class=\"title\" style=\"color: #1890ff; display: flex; justify-content: space-between; align-items: center\">\n <span>{{ n.Code }}</span>\n <nz-icon nzType=\"layout\" nzTheme=\"outline\"></nz-icon>\n </div>\n <div\n style=\"\n font-size: 12px;\n line-height: 1.2;\n font-weight: 500;\n height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n \"\n >\n {{ n.Name || \"Ch\u01B0a c\u00F3 t\u00EAn\" }}\n </div>\n <div style=\"font-size: 10px; color: gray; margin-top: 4px\">\n {{ n.DocType }}\n </div>\n\n <!-- CONNECTOR \u0110\u1EC2 K\u00C9O D\u00C2Y -->\n <div class=\"connector connector-right\" (click)=\"onClickConnector($event, n, 'right')\"></div>\n <div class=\"connector connector-left\" (click)=\"onClickConnector($event, n, 'left')\"></div>\n </nz-card>\n }\n\n <!-- C\u00C1C \u0110I\u1EC2M WAYPOINT \u0110\u1EC2 B\u1EBA CONG D\u00C2Y CHU\u1ED8T -->\n @for (p of connectingPoints; track $index) {\n @if (p != draggingPoint) {\n <div\n class=\"waypoint\"\n [style.left.px]=\"p.x\"\n [style.top.px]=\"p.y\"\n (mousedown)=\"onmousedownPoint($event, p)\"\n (contextmenu)=\"onRightClickPoint($event, hoverTemplateEdge!, $index)\"\n ></div>\n } @else {\n <div\n class=\"waypoint dragging\"\n [style.left.px]=\"p.x\"\n [style.top.px]=\"p.y\"\n (mousedown)=\"onmousedownPoint($event, p)\"\n ></div>\n }\n }\n </div>\n</div>\n\n<!-- ==============================================\n 1. DRAWER: GLOBAL TEMPLATE SETTINGS \n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawTemplateTitle\"\n nzPlacement=\"right\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzVisible]=\"drawTemplateVisibel\"\n [nzFooter]=\"footerTplTemplate\"\n (nzOnClose)=\"drawTemplateVisibel = false\"\n>\n <ng-template #drawTemplateTitle> <nz-icon nzType=\"global\"></nz-icon> Quy tr\u00ECnh ph\u1ED1i h\u1EE3p </ng-template>\n <ng-container *nzDrawerContent>\n <!-- Gi\u1EEF nguy\u00EAn c\u00E1c th\u00F4ng tin chung to\u00E0n c\u1EE5c c\u1EE7a b\u1EA1n \u1EDF \u0111\u00E2y -->\n\n <extend-input [label]=\"'Code'\" [(_ngModel)]=\"templateCombine.Code\"></extend-input>\n <extend-input [label]=\"'Name'\" [(_ngModel)]=\"templateCombine.Name\"></extend-input>\n <extend-textarea [label]=\"'Description'\" [(_ngModel)]=\"templateCombine.Description\"></extend-textarea>\n <extend-checkbox [label]=\"'Active'\" [(_ngModel)]=\"templateCombine.IsActive\"></extend-checkbox>\n </ng-container>\n\n <ng-template #footerTplTemplate>\n <div nz-flex [nzGap]=\"6\" [nzJustify]=\"'end'\">\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\n <button nz-button (click)=\"drawTemplateVisibel = false\">Close</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 2. DRAWER: NODE SETTINGS (CHI TI\u1EBET M\u1ED8T TEMPLATE)\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawerTitleNode\"\n [nzPlacement]=\"selectedTemplateNode?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\n [nzVisible]=\"!!selectedTemplateNode\"\n [nzWidth]=\"'90vw'\"\n [nzClosable]=\"false\"\n [nzFooter]=\"footerTplNode\"\n (nzOnClose)=\"selectedTemplateNode = undefined\"\n>\n <ng-template #drawerTitleNode>\n <div nz-row nzJustify=\"space-between\">\n <span style=\"font-weight: bold; color: #1890ff\"\n ><nz-icon nzType=\"layout\"></nz-icon> TEMPLATE NODE: [{{ selectedTemplateNode?.Code }}]\n {{ selectedTemplateNode?.Name }}</span\n >\n <button\n nz-button\n nzSize=\"small\"\n nz-tooltip=\"Chuy\u1EC3n v\u1ECB tr\u00ED Drawer\"\n (click)=\"\n selectedTemplateNode!.editorOption.drawerPosition =\n selectedTemplateNode!.editorOption.drawerPosition === 'left' ? 'right' : 'left'\n \"\n >\n <nz-icon nzType=\"swap\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <ng-container *ngIf=\"selectedTemplateNode\">\n <wf-template-detail #wftemplatedetail (onSave)=\"getdata.emit()\"></wf-template-detail>\n </ng-container>\n </ng-container>\n\n <ng-template #footerTplNode>\n <div\n nz-flex\n [nzGap]=\"6\"\n [nzJustify]=\"selectedTemplateNode?.editorOption?.drawerPosition == 'left' ? 'start' : 'end'\"\n >\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"wftemplatedetail.wfeditor.save()\">Save</button>\n <button nz-button (click)=\"selectedTemplateNode = undefined\">Close</button>\n <button nz-button nzDanger (click)=\"deleteTemplateNode()\">Delete Template node</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 3. DRAWER: EDGE SETTINGS (QU\u1EA2N L\u00DD QUY T\u1EAEC CHUY\u1EC2N TEMPLATE)\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawerTitleEdge\"\n [nzPlacement]=\"selectedTemplateEdge?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\n [nzClosable]=\"false\"\n [nzWidth]=\"'450px'\"\n [nzVisible]=\"!!selectedTemplateEdge\"\n [nzFooter]=\"footerTplEdge\"\n (nzOnClose)=\"selectedTemplateEdge = undefined\"\n>\n <ng-template #drawerTitleEdge>\n <div nz-row nzJustify=\"space-between\">\n <span style=\"font-weight: bold; color: #ff4d4f\"><nz-icon nzType=\"swap-right\"></nz-icon> TRANSITION RULES </span>\n <button\n nz-button\n nzSize=\"small\"\n nz-tooltip=\"Chuy\u1EC3n v\u1ECB tr\u00ED Drawer\"\n (click)=\"\n selectedTemplateEdge!.editorOption.drawerPosition =\n selectedTemplateEdge!.editorOption.drawerPosition === 'left' ? 'right' : 'left'\n \"\n >\n <nz-icon nzType=\"swap\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <ng-container *ngIf=\"selectedTemplateEdge\">\n <!-- Th\u00F4ng tin 2 \u0111\u1EA7u n\u1ED1i -->\n <div\n style=\"background: #fdf5f6; padding: 12px; border: 1px solid #ffa39e; border-radius: 6px; margin-bottom: 16px\"\n >\n <div style=\"font-size: 14px\">\n <strong style=\"display: inline-block; width: 70px; color: #555\">From:</strong>\n <span style=\"color: #1890ff; font-weight: 500\">\n [{{ getNode(selectedTemplateEdge.From_WF_Template_Id)?.Code }}]\n {{ getNode(selectedTemplateEdge.From_WF_Template_Id)?.Name }} > {{ selectedTemplateEdge.FromStage }} >\n {{ selectedTemplateEdge.FromAction }}\n </span>\n </div>\n <div style=\"font-size: 14px; margin-top: 8px\">\n <strong style=\"display: inline-block; width: 70px; color: #555\">Taget:</strong>\n <span style=\"color: #1890ff; font-weight: 500\">\n [{{ getNode(selectedTemplateEdge.To_WF_Template_Id)?.Code }}]\n {{ getNode(selectedTemplateEdge.To_WF_Template_Id)?.Name }} > {{ selectedTemplateEdge.ToStage }} >\n {{ selectedTemplateEdge.ToAction }}\n </span>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #footerTplEdge>\n <div\n nz-flex\n [nzGap]=\"6\"\n [nzJustify]=\"selectedTemplateEdge?.editorOption?.drawerPosition == 'left' ? 'start' : 'end'\"\n >\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save Rules</button>\n <button\n nz-button\n nzDanger\n (click)=\"\n lstTemplateEdge.splice(lstTemplateEdge.indexOf(selectedTemplateEdge!), 1); selectedTemplateEdge = undefined\n \"\n >\n Delete Transition\n </button>\n <button nz-button (click)=\"selectedTemplateEdge = undefined\">Close</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 4. EDITOR SETTING & INFO\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawSettingTitle\"\n nzPlacement=\"right\"\n [nzClosable]=\"false\"\n [nzVisible]=\"settingVisible\"\n (nzOnClose)=\"settingVisible = false\"\n>\n <ng-template #drawSettingTitle> <nz-icon nzType=\"setting\"></nz-icon> C\u00E0i \u0111\u1EB7t Editor </ng-template>\n <ng-container *nzDrawerContent>\n <div class=\"form-item-no-bottom\">\n <extend-checkbox\n [label]=\"'Hi\u1EC3n th\u1ECB L\u01B0\u1EDBi (Grid)'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"wfcSetting.ShowGrid\"\n ></extend-checkbox>\n </div>\n </ng-container>\n</nz-drawer>\n\n<nz-drawer\n [nzTitle]=\"drawInfoTitle\"\n nzPlacement=\"right\"\n [nzClosable]=\"false\"\n [nzVisible]=\"infoVisible\"\n (nzOnClose)=\"infoVisible = false\"\n>\n <ng-template #drawInfoTitle> <nz-icon nzType=\"info-circle\"></nz-icon> H\u01B0\u1EDBng d\u1EABn (Infomation) </ng-template>\n <ng-container *nzDrawerContent>\n <p>\n <strong>1. C\u00E1c th\u00E0nh ph\u1EA7n:</strong> C\u00E1c \u00F4 ch\u1EEF nh\u1EADt l\u00E0 Template (Quy tr\u00ECnh nh\u1ECF), c\u00E1c \u0111\u01B0\u1EDDng n\u1ED1i l\u00E0 Transition Rule\n (Quy t\u1EAFc chuy\u1EC3n quy tr\u00ECnh).\n </p>\n <p><strong>2. C\u00E1ch n\u1ED1i 2 Template:</strong></p>\n <ul>\n <li>Click ch\u1EA5m cam b\u00EAn ph\u1EA3i Template A, sau \u0111\u00F3 k\u00E9o v\u00E0 click v\u00E0o Template B \u0111\u1EC3 t\u1EA1o Rule n\u1ED1i.</li>\n <li>C\u00F3 th\u1EC3 click nhi\u1EC1u \u0111i\u1EC3m trong l\u00FAc k\u00E9o \u0111\u1EC3 b\u1EBB \u0111\u01B0\u1EDDng cong tu\u1EF3 \u00FD (Waypoint).</li>\n <li>Click \u0111\u00FAp v\u00E0o c\u1EA1nh (\u0111\u01B0\u1EDDng n\u1ED1i) \u0111ang c\u00F3 \u0111\u1EC3 t\u1EA1o th\u00EAm m\u1ED9t \u0111i\u1EC3m b\u1EBB cong m\u1EDBi.</li>\n <li>Gi\u1EEF v\u00E0 k\u00E9o \u0111i\u1EC3m b\u1EBB cong \u0111\u1EC3 tu\u1EF3 ch\u1EC9nh \u0111\u01B0\u1EDDng \u0111i. Chu\u1ED9t ph\u1EA3i v\u00E0o \u0111i\u1EC3m \u0111\u00F3 \u0111\u1EC3 x\u00F3a n\u00F3.</li>\n </ul>\n <p>\n <strong>3. Qu\u1EA3n l\u00FD Rule:</strong> Click v\u00E0o \u0111\u01B0\u1EDDng n\u1ED1i gi\u1EEFa 2 Node \u0111\u1EC3 c\u1EA5u h\u00ECnh c\u00E1c lu\u1ED3ng th\u1EF1c thi (Stored, Ph\u00E2n\n quy\u1EC1n, G\u1EEDi mail).\n </p>\n </ng-container>\n</nz-drawer>\n\n<nz-modal\n [(nzVisible)]=\"isModalVisible\"\n nzTitle=\"Add template node\"\n [nzWidth]=\"600\"\n (nzOnCancel)=\"isModalVisible = false\"\n (nzOnOk)=\"addTemplateNodes()\"\n nzOkText=\"Add\"\n nzOkDanger\n nzCancelText=\"Cancel\"\n nzMaskClosable=\"false\"\n>\n <ng-container *nzModalContent>\n <extend-select\n label=\"Template\"\n [lstItem]=\"lstTemplateForSelect\"\n [displayField]=\"'Name'\"\n [multiple]=\"true\"\n [(_ngModel)]=\"lstTemplateSelected\"\n ></extend-select>\n </ng-container>\n</nz-modal>\n", styles: ["@charset \"UTF-8\";::ng-deep .workflow-wrapper{border:solid 1px lightgray;overflow:hidden;width:100%}.workflow-canvas{position:relative;background:#f0f2f5;cursor:default;overflow:hidden;outline:1px dashed rgba(0,0,0,.1)}.workflow-canvas .edges-layer{position:absolute;inset:0;width:100%;height:100%;z-index:1}.workflow-canvas .edges-layer path{stroke-width:2;fill:none}.canvas-content{transform-origin:0 0;width:100%;height:100%;transition:transform .05s linear}.canvas-content{outline:1px dashed red}.canvas-content.panning{cursor:grab}.canvas-content.panning:active{cursor:grabbing}.workflow-canvas.panning{cursor:grab}.workflow-canvas.panning:active{cursor:grabbing}.workflow-canvas.connecting,.workflow-canvas.connecting .workflow-node{cursor:crosshair}.workflow-node{position:absolute;width:160px;cursor:grab;-webkit-user-select:none;user-select:none;z-index:2}.workflow-node:active{cursor:grabbing}.workflow-node.connecting-source,.workflow-node.selected,.workflow-node:hover:not(.workflow-node-start,.workflow-node-end){outline:2px dashed #1890ff}.workflow-node .title{font-weight:600;margin-bottom:6px}.workflow-node-start{width:0px}.workflow-node-start.connecting-source,.workflow-node-start.selected,.workflow-node-start:hover{outline:unset}.workflow-node-start.connecting-source nz-tag,.workflow-node-start.selected nz-tag,.workflow-node-start:hover nz-tag{outline:2px dashed}.workflow-node-start nz-tag{position:relative;top:45px;right:35px}.workflow-node-end{width:0px}.workflow-node-end.connecting-source,.workflow-node-end.selected,.workflow-node-end:hover{outline:unset}.workflow-node-end.connecting-source nz-tag,.workflow-node-end.selected nz-tag,.workflow-node-end:hover nz-tag{outline:2px dashed}.workflow-node-end nz-tag{position:relative;top:45px;right:32px}.connector{position:absolute;top:39px;width:12px;height:12px;background:#1890ff;border-radius:50%;transform:translateY(-50%);cursor:crosshair;transition:box-shadow .15s ease-out,transform .15s ease-out}.connector:hover{box-shadow:0 0 0 3px #1890ff4d;transform:translateY(-50%) scale(1.15)}.connector-right{right:-8px;background:orange}.connector-right.reverse,.connector-left{left:-8px}.connector-left.reverse{left:unset;right:-8px}.connector-start{width:16px;height:16px;right:-8px;background:green;box-shadow:0 0 0 3px #1890ff4d}.connector-end{width:16px;height:16px;left:-8px;background:#000;box-shadow:0 0 0 3px #1890ff4d}.edge{cursor:pointer;stroke:#1890ff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2;fill:none;transition:stroke .15s ease}.edge-hit{stroke:transparent;stroke-width:18px!important;fill:none;cursor:pointer}.edge-hit:hover+.edge{stroke:#ff4d4f;stroke-width:2}.workflow-canvas.dragging-point .edge-hit{pointer-events:none}.edge:hover+.edge-label{fill:#1890ff;font-weight:500}.edge-label{font-size:12px;fill:#555;pointer-events:none;-webkit-user-select:none;user-select:none}.blue{stroke:#1890ff!important}.red{stroke:#ff4d4f!important;box-shadow:0 0 0 3px #1890ff4d!important}.workflow-svg{background:transparent;overflow:visible}.waypoint{position:absolute;width:10px;height:10px;background:#ff4d4f;border-radius:50%;transform:translate(-50%,-50%) scale(1);cursor:move;z-index:1;transition:transform .12s ease-out,background-color .12s ease-out,box-shadow .12s ease-out}.waypoint:hover{background:#ff7875;transform:translate(-50%,-50%) scale(1.25);box-shadow:0 0 0 4px #ff787559}.waypoint.dragging{transition:none;transform:translate(-50%,-50%) scale(1.15);pointer-events:none}.workflow-canvas.dragging-point svg{cursor:grabbing}.selection-box{position:absolute;border:1px dashed #1890ff;background:#1890ff1a;pointer-events:none}.toolbar{position:absolute;top:8px;left:8px;display:flex;gap:4px;padding:6px;background:#fff;border-radius:6px;box-shadow:0 2px 8px #00000026;z-index:100}.toolbar .divider{width:1px;background:#e5e5e5;margin:0 2px}nz-tag.selected{outline:2px dashed #1890ff}.grid-layer{position:absolute;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(rgba(0,0,0,.08) 1px,transparent 1px);background-size:20px 20px}.grid-layer{background-image:linear-gradient(to right,rgba(0,0,0,.06) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.06) 1px,transparent 1px);background-size:20px 20px}.editable-tag{background:#fff;border-style:dashed}::ng-deep .minimap,.minimap-combine{position:absolute;width:180px;height:125px;top:0;right:0;background-color:#eee;border:1px solid #aaa;opacity:.9;z-index:1}::ng-deep .minimap{position:absolute;width:200px;height:140px;top:8px;right:8px;background-color:#f8f9fa;border:1px solid #d9d9d9;border-radius:8px;box-shadow:0 4px 12px #0000001a;overflow:hidden;z-index:100;-webkit-user-select:none;user-select:none}::ng-deep .minimap-node{position:absolute;background-color:#bfbfbf;border-radius:2px}::ng-deep .minimap-node-round{position:absolute;background-color:#bfbfbf;border-radius:50%}::ng-deep .minimap-node-round-start{background-color:#52c41a}::ng-deep .minimap-node-round-end{background-color:#ff4d4f}::ng-deep .minimap-viewport{position:absolute;box-sizing:border-box;background-color:#1890ff26;border:1.5px solid #1890ff;border-radius:4px;z-index:2;cursor:grab;transition:none}::ng-deep .minimap-viewport.grabbing,::ng-deep .minimap-viewport:active{cursor:grabbing;background-color:#1890ff40}::ng-deep .has-floating-label.floating-label{position:relative;padding-top:14px}::ng-deep .has-floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:13px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .has-floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .has-floating-label .full-width{width:100%}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}\n"] }]
|
|
19836
|
+
], selector: 'app-workflow-combine-editor', template: "<div\n #canvas\n class=\"workflow-canvas\"\n [class.connecting]=\"!!connectingFrom\"\n [class.dragging-point]=\"!!draggingPoint\"\n style=\"width: 100%; height: 100%\"\n (mousedown)=\"onMouseDownCanvas($event)\"\n (mousemove)=\"onMouseMoveCanvas($event)\"\n (mouseup)=\"onMouseUpCanvas($event)\"\n (click)=\"onClickCanvas($event)\"\n (wheel)=\"onWheelCanvas($event)\"\n>\n <!-- TOOLBAR -->\n <div class=\"toolbar\" (mousedown)=\"$event.stopPropagation()\" (click)=\"$event.stopPropagation()\">\n <button nz-button nzSize=\"small\" nz-tooltip=\"Editor setting\" (click)=\"settingVisible = true\">\n <nz-icon nzType=\"setting\"></nz-icon>\n </button>\n\n <button nz-button nzSize=\"small\" nz-tooltip=\"Infomation\" (click)=\"infoVisible = true\">\n <nz-icon nzType=\"info-circle\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button nz-button nzSize=\"small\" nz-tooltip=\"Global Setting\" (click)=\"drawTemplateVisibel = true\">\n <nz-icon nzType=\"setting\"></nz-icon> G\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button nz-button nzSize=\"small\" nzDanger [nzLoading]=\"!ready\" nz-tooltip=\"Save (Ctrl + S)\" (click)=\"save()\">\n <nz-icon nzType=\"save\"></nz-icon>\n </button>\n <button nz-button nzSize=\"small\" [nzLoading]=\"!ready\" nz-tooltip=\"Reload\" (click)=\"getdata.emit()\">\n <nz-icon nzType=\"reload\" class=\"color-primary\"></nz-icon>\n </button>\n <button nz-button nzSize=\"small\" nz-tooltip=\"Th\u00EAm Template m\u1EDBi\" (click)=\"isModalVisible = true\">\n <nz-icon nzType=\"plus\" class=\"color-primary\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"isMoveMode ? 'primary' : 'default'\"\n nz-tooltip=\"Move mode\"\n (click)=\"isMoveMode = true\"\n >\n <nz-icon><img src=\"/assets/icon/hand-palm.png\" width=\"19\" height=\"19\" /></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n [nzType]=\"!isMoveMode ? 'primary' : 'default'\"\n nz-tooltip=\"Select mode\"\n (click)=\"isMoveMode = false\"\n >\n <nz-icon><img src=\"/assets/icon/cursor.png\" width=\"19\" height=\"19\" /></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- UNDO / REDO -->\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n [disabled]=\"undoStack.length === 0\"\n nz-tooltip=\"Undo\"\n (click)=\"undo()\"\n >\n <nz-icon nzType=\"undo\"></nz-icon>\n </button>\n <button\n nz-button\n nzSize=\"small\"\n nzType=\"default\"\n [disabled]=\"redoStack.length === 0\"\n nz-tooltip=\"Redo\"\n (click)=\"redo()\"\n >\n <nz-icon nzType=\"redo\"></nz-icon>\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- ALIGN -->\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignLeft()\">\u27F8</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignCenter()\">\u2261</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignRight()\">\u27F9</button>\n <span class=\"divider\"></span>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignTop()\">\u21D1</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignMiddle()\">\u2550</button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 2\" (click)=\"alignBottom()\">\u21D3</button>\n <span class=\"divider\"></span>\n <!-- DISTRIBUTE -->\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 3\" (click)=\"distributeHorizontal()\">\n \u21C4\n </button>\n <button nz-button nzSize=\"small\" [disabled]=\"lstSelectedTemplateId.size < 3\" (click)=\"distributeVertical()\">\n \u21C5\n </button>\n\n <box [width]=\"1\"></box>\n <span class=\"divider\"></span>\n <box [width]=\"1\"></box>\n\n <!-- ZOOM -->\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomOut()\" nz-tooltip=\"Zoom Out\">\n <nz-icon nzType=\"minus\"></nz-icon>\n </button>\n <span>{{ Math.round(zoom * 100) }}%</span>\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"zoomIn()\" nz-tooltip=\"Zoom In\">\n <nz-icon nzType=\"plus\"></nz-icon>\n </button>\n <span class=\"divider\"></span>\n <button nz-button nzSize=\"small\" nzType=\"default\" (click)=\"resetZoom()\" nz-tooltip=\"Reset Zoom (Ctrl+0)\">\n <nz-icon nzType=\"expand\"></nz-icon>\n </button>\n </div>\n\n <div\n class=\"canvas-content\"\n [class.panning]=\"isMoveMode\"\n [style.width.px]=\"getCanvasWidth()\"\n [style.height.px]=\"getCanvasHeight()\"\n [style.transform]=\"\n 'translate(' +\n templateCombine.editorOption.panX +\n 'px,' +\n templateCombine.editorOption.panY +\n 'px) scale(' +\n zoom +\n ')'\n \"\n >\n <!-- GRID -->\n <div *ngIf=\"wfcSetting.ShowGrid\" class=\"grid-layer\"></div>\n\n <!-- SVG EDGES -->\n <svg #svg class=\"edges-layer\" width=\"100%\" height=\"100%\" preserveAspectRatio=\"none\">\n <g>\n <!-- DEFS -->\n <defs>\n <filter id=\"edge-glow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\">\n <feGaussianBlur stdDeviation=\"2\" result=\"blur\" />\n <feMerge>\n <feMergeNode in=\"blur\" />\n <feMergeNode in=\"SourceGraphic\" />\n </feMerge>\n </filter>\n\n <marker\n id=\"arrow-blue\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n refX=\"10\"\n refY=\"5\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path class=\"blue\" d=\"M0,0 L10,5 L0,10\"></path>\n </marker>\n <marker\n id=\"arrow-red\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n refX=\"10\"\n refY=\"5\"\n orient=\"auto\"\n markerUnits=\"strokeWidth\"\n >\n <path class=\"red\" d=\"M0,0 L10,5 L0,10\"></path>\n </marker>\n </defs>\n\n <!-- EDGES B\u00CCNH TH\u01AF\u1EDCNG -->\n <ng-container *ngFor=\"let e of normalEdges; let i = index\">\n <path class=\"edge\" [attr.id]=\"'edge-path-' + i\" [attr.d]=\"buildPath(e)\" marker-end=\"url(#arrow-blue)\"></path>\n\n <path\n class=\"edge-hit\"\n [attr.d]=\"buildPath(e)\"\n (mouseenter)=\"onMouseEnterEdge(e)\"\n (mouseleave)=\"onMouseLeaveEdge(e)\"\n (click)=\"onClickEdge(e, $event)\"\n ></path>\n\n <!-- \u0110\u00E3 x\u00F3a *ngIf=\"e.RuleLineDetails?.length\" \u1EDF \u0111\u00E2y \u0111\u1EC3 text lu\u00F4n hi\u1EC7n -->\n <text\n class=\"edge-label\"\n style=\"fill: #1890ff; font-weight: 500\"\n [attr.x]=\"getEdgeLabelPosition(e).x\"\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\n [attr.text-anchor]=\"'middle'\"\n >\n {{ e.FromStage }} / {{ e.FromAction }} > {{ e.ToStage }} / {{ e.ToAction }}\n </text>\n </ng-container>\n\n <!-- EDGE \u0110ANG HOVER/SELECTED (HI\u1EC2N TH\u1ECA M\u00C0U \u0110\u1ECE) -->\n <ng-container *ngFor=\"let e of hoverEdges; let i = index\">\n <path\n class=\"edge red\"\n [attr.id]=\"'edge-path-hover-' + i\"\n [attr.d]=\"buildPath(e)\"\n marker-end=\"url(#arrow-red)\"\n ></path>\n\n <path\n class=\"edge-hit\"\n [attr.d]=\"buildPath(e)\"\n (mouseleave)=\"onMouseLeaveEdge(e)\"\n (click)=\"onClickEdge(e, $event)\"\n ></path>\n\n <text\n class=\"edge-label\"\n style=\"font-weight: bold; fill: red\"\n [attr.x]=\"getEdgeLabelPosition(e).x\"\n [attr.y]=\"getEdgeLabelPosition(e).y - 8\"\n [attr.text-anchor]=\"'middle'\"\n >\n {{ e.FromStage }} / {{ e.FromAction }} > {{ e.ToStage }} / {{ e.ToAction }}\n </text>\n </ng-container>\n\n <!-- PREVIEW LINE (\u0110\u01AF\u1EDCNG N\u1ED0I \u0110ANG K\u00C9O) -->\n <path\n *ngIf=\"connectingFrom\"\n class=\"edge\"\n [attr.d]=\"buildPreviewPath()\"\n stroke-dasharray=\"5,5\"\n marker-end=\"url(#arrow-blue)\"\n ></path>\n </g>\n </svg>\n\n <!-- BOX V\u00D9NG CH\u1ECCN MULTI -->\n <div\n *ngIf=\"isSelecting && selectStart && selectEnd\"\n class=\"selection-box\"\n [style.left.px]=\"Math.min(selectStart.x, selectEnd.x)\"\n [style.top.px]=\"Math.min(selectStart.y, selectEnd.y)\"\n [style.width.px]=\"Math.abs(selectEnd.x - selectStart.x)\"\n [style.height.px]=\"Math.abs(selectEnd.y - selectStart.y)\"\n ></div>\n\n <!-- NODE (TEMPLATE) L\u1EDAP HI\u1EC2N TH\u1ECA TR\u00CAN C\u00D9NG -->\n @for (n of lstTemplateNode; track n.WF_Template_Id) {\n <nz-card\n class=\"workflow-node\"\n [attr.data-id]=\"n.Code\"\n [class.selected]=\"\n n == selectedTemplateNode || n == hoverTemplateNode || lstSelectedTemplateId.has(n.WF_Template_Id)\n \"\n [style.left.px]=\"n.editorOption.x\"\n [style.top.px]=\"n.editorOption.y\"\n [class.connecting-source]=\"isConnectingFrom(n) || isDraggingFrom(n) || isSelectedNode(n)\"\n nzSize=\"small\"\n (mousedown)=\"onMouseDownNode($event, n)\"\n (click)=\"$event.stopPropagation(); onClickNode(n)\"\n >\n <div class=\"title\" style=\"color: #1890ff; display: flex; justify-content: space-between; align-items: center\">\n <span>{{ n.Code }}</span>\n <nz-icon nzType=\"layout\" nzTheme=\"outline\"></nz-icon>\n </div>\n <div\n style=\"\n font-size: 12px;\n line-height: 1.2;\n font-weight: 500;\n height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n \"\n >\n {{ n.Name || \"Ch\u01B0a c\u00F3 t\u00EAn\" }}\n </div>\n <div style=\"font-size: 10px; color: gray; margin-top: 4px\">\n {{ n.DocType }}\n </div>\n\n <!-- CONNECTOR \u0110\u1EC2 K\u00C9O D\u00C2Y -->\n <div class=\"connector connector-right\" (click)=\"onClickConnector($event, n, 'right')\"></div>\n <div class=\"connector connector-left\" (click)=\"onClickConnector($event, n, 'left')\"></div>\n </nz-card>\n }\n\n <!-- C\u00C1C \u0110I\u1EC2M WAYPOINT \u0110\u1EC2 B\u1EBA CONG D\u00C2Y CHU\u1ED8T -->\n @for (p of connectingPoints; track $index) {\n @if (p != draggingPoint) {\n <div\n class=\"waypoint\"\n [style.left.px]=\"p.x\"\n [style.top.px]=\"p.y\"\n (mousedown)=\"onmousedownPoint($event, p)\"\n (contextmenu)=\"onRightClickPoint($event, hoverTemplateEdge!, $index)\"\n ></div>\n } @else {\n <div\n class=\"waypoint dragging\"\n [style.left.px]=\"p.x\"\n [style.top.px]=\"p.y\"\n (mousedown)=\"onmousedownPoint($event, p)\"\n ></div>\n }\n }\n </div>\n</div>\n\n<!-- ==============================================\n 1. DRAWER: GLOBAL TEMPLATE SETTINGS \n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawTemplateTitle\"\n nzPlacement=\"right\"\n [nzWidth]=\"500\"\n [nzClosable]=\"false\"\n [nzVisible]=\"drawTemplateVisibel\"\n [nzFooter]=\"footerTplTemplate\"\n (nzOnClose)=\"drawTemplateVisibel = false\"\n>\n <ng-template #drawTemplateTitle> <nz-icon nzType=\"global\"></nz-icon> Quy tr\u00ECnh ph\u1ED1i h\u1EE3p </ng-template>\n <ng-container *nzDrawerContent>\n <!-- Gi\u1EEF nguy\u00EAn c\u00E1c th\u00F4ng tin chung to\u00E0n c\u1EE5c c\u1EE7a b\u1EA1n \u1EDF \u0111\u00E2y -->\n\n <extend-input [label]=\"'Code'\" [(_ngModel)]=\"templateCombine.Code\"></extend-input>\n <extend-input [label]=\"'Name'\" [(_ngModel)]=\"templateCombine.Name\"></extend-input>\n <extend-textarea [label]=\"'Description'\" [(_ngModel)]=\"templateCombine.Description\"></extend-textarea>\n <extend-checkbox [label]=\"'Active'\" [(_ngModel)]=\"templateCombine.IsActive\"></extend-checkbox>\n </ng-container>\n\n <ng-template #footerTplTemplate>\n <div nz-flex [nzGap]=\"6\" [nzJustify]=\"'end'\">\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save</button>\n <button nz-button (click)=\"drawTemplateVisibel = false\">Close</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 2. DRAWER: NODE SETTINGS (CHI TI\u1EBET M\u1ED8T TEMPLATE)\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawerTitleNode\"\n [nzPlacement]=\"selectedTemplateNode?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\n [nzVisible]=\"!!selectedTemplateNode\"\n [nzWidth]=\"'90vw'\"\n [nzClosable]=\"false\"\n [nzFooter]=\"footerTplNode\"\n (nzOnClose)=\"selectedTemplateNode = undefined\"\n>\n <ng-template #drawerTitleNode>\n <div nz-row nzJustify=\"space-between\">\n <span style=\"font-weight: bold; color: #1890ff\"\n ><nz-icon nzType=\"layout\"></nz-icon> TEMPLATE NODE: [{{ selectedTemplateNode?.Code }}]\n {{ selectedTemplateNode?.Name }}</span\n >\n <button\n nz-button\n nzSize=\"small\"\n nz-tooltip=\"Chuy\u1EC3n v\u1ECB tr\u00ED Drawer\"\n (click)=\"\n selectedTemplateNode!.editorOption.drawerPosition =\n selectedTemplateNode!.editorOption.drawerPosition === 'left' ? 'right' : 'left'\n \"\n >\n <nz-icon nzType=\"swap\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <ng-container *ngIf=\"selectedTemplateNode\">\n <wf-template-detail\n #wftemplatedetail\n (onSave)=\"getdata.emit()\"\n (onDeleteRule)=\"getdata.emit()\"\n ></wf-template-detail>\n </ng-container>\n </ng-container>\n\n <ng-template #footerTplNode>\n <div\n nz-flex\n [nzGap]=\"6\"\n [nzJustify]=\"selectedTemplateNode?.editorOption?.drawerPosition == 'left' ? 'start' : 'end'\"\n >\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"wftemplatedetail.wfeditor.save()\">Save</button>\n <button nz-button (click)=\"selectedTemplateNode = undefined\">Close</button>\n <button nz-button nzDanger (click)=\"deleteTemplateNode()\">Delete Template node</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 3. DRAWER: EDGE SETTINGS (QU\u1EA2N L\u00DD QUY T\u1EAEC CHUY\u1EC2N TEMPLATE)\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawerTitleEdge\"\n [nzPlacement]=\"selectedTemplateEdge?.editorOption?.drawerPosition == 'left' ? 'left' : 'right'\"\n [nzClosable]=\"false\"\n [nzWidth]=\"'450px'\"\n [nzVisible]=\"!!selectedTemplateEdge\"\n [nzFooter]=\"footerTplEdge\"\n (nzOnClose)=\"selectedTemplateEdge = undefined\"\n>\n <ng-template #drawerTitleEdge>\n <div nz-row nzJustify=\"space-between\">\n <span style=\"font-weight: bold; color: #ff4d4f\"><nz-icon nzType=\"swap-right\"></nz-icon> TRANSITION RULES </span>\n <button\n nz-button\n nzSize=\"small\"\n nz-tooltip=\"Chuy\u1EC3n v\u1ECB tr\u00ED Drawer\"\n (click)=\"\n selectedTemplateEdge!.editorOption.drawerPosition =\n selectedTemplateEdge!.editorOption.drawerPosition === 'left' ? 'right' : 'left'\n \"\n >\n <nz-icon nzType=\"swap\"></nz-icon>\n </button>\n </div>\n </ng-template>\n\n <ng-container *nzDrawerContent>\n <ng-container *ngIf=\"selectedTemplateEdge\">\n <!-- Th\u00F4ng tin 2 \u0111\u1EA7u n\u1ED1i -->\n <div\n style=\"background: #fdf5f6; padding: 12px; border: 1px solid #ffa39e; border-radius: 6px; margin-bottom: 16px\"\n >\n <div style=\"font-size: 14px\">\n <strong style=\"display: inline-block; width: 70px; color: #555\">From:</strong>\n <span style=\"color: #1890ff; font-weight: 500\">\n [{{ getNode(selectedTemplateEdge.From_WF_Template_Id)?.Code }}]\n {{ getNode(selectedTemplateEdge.From_WF_Template_Id)?.Name }} > {{ selectedTemplateEdge.FromStage }} >\n {{ selectedTemplateEdge.FromAction }}\n </span>\n </div>\n <div style=\"font-size: 14px; margin-top: 8px\">\n <strong style=\"display: inline-block; width: 70px; color: #555\">Taget:</strong>\n <span style=\"color: #1890ff; font-weight: 500\">\n [{{ getNode(selectedTemplateEdge.To_WF_Template_Id)?.Code }}]\n {{ getNode(selectedTemplateEdge.To_WF_Template_Id)?.Name }} > {{ selectedTemplateEdge.ToStage }} >\n {{ selectedTemplateEdge.ToAction }}\n </span>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #footerTplEdge>\n <div\n nz-flex\n [nzGap]=\"6\"\n [nzJustify]=\"selectedTemplateEdge?.editorOption?.drawerPosition == 'left' ? 'start' : 'end'\"\n >\n <button nz-button nzDanger [nzLoading]=\"!ready\" (click)=\"save()\">Save Rules</button>\n <button\n nz-button\n nzDanger\n (click)=\"\n lstTemplateEdge.splice(lstTemplateEdge.indexOf(selectedTemplateEdge!), 1); selectedTemplateEdge = undefined\n \"\n >\n Delete Transition\n </button>\n <button nz-button (click)=\"selectedTemplateEdge = undefined\">Close</button>\n </div>\n </ng-template>\n</nz-drawer>\n\n<!-- ==============================================\n 4. EDITOR SETTING & INFO\n=============================================== -->\n<nz-drawer\n [nzTitle]=\"drawSettingTitle\"\n nzPlacement=\"right\"\n [nzClosable]=\"false\"\n [nzVisible]=\"settingVisible\"\n (nzOnClose)=\"settingVisible = false\"\n>\n <ng-template #drawSettingTitle> <nz-icon nzType=\"setting\"></nz-icon> C\u00E0i \u0111\u1EB7t Editor </ng-template>\n <ng-container *nzDrawerContent>\n <div class=\"form-item-no-bottom\">\n <extend-checkbox\n [label]=\"'Hi\u1EC3n th\u1ECB L\u01B0\u1EDBi (Grid)'\"\n [labelSpan]=\"0\"\n [(_ngModel)]=\"wfcSetting.ShowGrid\"\n ></extend-checkbox>\n </div>\n </ng-container>\n</nz-drawer>\n\n<nz-drawer\n [nzTitle]=\"drawInfoTitle\"\n nzPlacement=\"right\"\n [nzClosable]=\"false\"\n [nzVisible]=\"infoVisible\"\n (nzOnClose)=\"infoVisible = false\"\n>\n <ng-template #drawInfoTitle> <nz-icon nzType=\"info-circle\"></nz-icon> H\u01B0\u1EDBng d\u1EABn (Infomation) </ng-template>\n <ng-container *nzDrawerContent>\n <p>\n <strong>1. C\u00E1c th\u00E0nh ph\u1EA7n:</strong> C\u00E1c \u00F4 ch\u1EEF nh\u1EADt l\u00E0 Template (Quy tr\u00ECnh nh\u1ECF), c\u00E1c \u0111\u01B0\u1EDDng n\u1ED1i l\u00E0 Transition Rule\n (Quy t\u1EAFc chuy\u1EC3n quy tr\u00ECnh).\n </p>\n <p><strong>2. C\u00E1ch n\u1ED1i 2 Template:</strong></p>\n <ul>\n <li>Click ch\u1EA5m cam b\u00EAn ph\u1EA3i Template A, sau \u0111\u00F3 k\u00E9o v\u00E0 click v\u00E0o Template B \u0111\u1EC3 t\u1EA1o Rule n\u1ED1i.</li>\n <li>C\u00F3 th\u1EC3 click nhi\u1EC1u \u0111i\u1EC3m trong l\u00FAc k\u00E9o \u0111\u1EC3 b\u1EBB \u0111\u01B0\u1EDDng cong tu\u1EF3 \u00FD (Waypoint).</li>\n <li>Click \u0111\u00FAp v\u00E0o c\u1EA1nh (\u0111\u01B0\u1EDDng n\u1ED1i) \u0111ang c\u00F3 \u0111\u1EC3 t\u1EA1o th\u00EAm m\u1ED9t \u0111i\u1EC3m b\u1EBB cong m\u1EDBi.</li>\n <li>Gi\u1EEF v\u00E0 k\u00E9o \u0111i\u1EC3m b\u1EBB cong \u0111\u1EC3 tu\u1EF3 ch\u1EC9nh \u0111\u01B0\u1EDDng \u0111i. Chu\u1ED9t ph\u1EA3i v\u00E0o \u0111i\u1EC3m \u0111\u00F3 \u0111\u1EC3 x\u00F3a n\u00F3.</li>\n </ul>\n <p>\n <strong>3. Qu\u1EA3n l\u00FD Rule:</strong> Click v\u00E0o \u0111\u01B0\u1EDDng n\u1ED1i gi\u1EEFa 2 Node \u0111\u1EC3 c\u1EA5u h\u00ECnh c\u00E1c lu\u1ED3ng th\u1EF1c thi (Stored, Ph\u00E2n\n quy\u1EC1n, G\u1EEDi mail).\n </p>\n </ng-container>\n</nz-drawer>\n\n<nz-modal\n [(nzVisible)]=\"isModalVisible\"\n nzTitle=\"Add template node\"\n [nzWidth]=\"600\"\n (nzOnCancel)=\"isModalVisible = false\"\n (nzOnOk)=\"addTemplateNodes()\"\n nzOkText=\"Add\"\n nzOkDanger\n nzCancelText=\"Cancel\"\n nzMaskClosable=\"false\"\n>\n <ng-container *nzModalContent>\n <extend-select\n label=\"Template\"\n [lstItem]=\"lstTemplateForSelect\"\n [displayField]=\"'Name'\"\n [multiple]=\"true\"\n [(_ngModel)]=\"lstTemplateSelected\"\n ></extend-select>\n </ng-container>\n</nz-modal>\n", styles: ["@charset \"UTF-8\";::ng-deep .workflow-wrapper{border:solid 1px lightgray;overflow:hidden;width:100%}.workflow-canvas{position:relative;background:#f0f2f5;cursor:default;overflow:hidden;outline:1px dashed rgba(0,0,0,.1)}.workflow-canvas .edges-layer{position:absolute;inset:0;width:100%;height:100%;z-index:1}.workflow-canvas .edges-layer path{stroke-width:2;fill:none}.canvas-content{transform-origin:0 0;width:100%;height:100%;transition:transform .05s linear}.canvas-content{outline:1px dashed red}.canvas-content.panning{cursor:grab}.canvas-content.panning:active{cursor:grabbing}.workflow-canvas.panning{cursor:grab}.workflow-canvas.panning:active{cursor:grabbing}.workflow-canvas.connecting,.workflow-canvas.connecting .workflow-node{cursor:crosshair}.workflow-node{position:absolute;width:160px;cursor:grab;-webkit-user-select:none;user-select:none;z-index:2}.workflow-node:active{cursor:grabbing}.workflow-node.connecting-source,.workflow-node.selected,.workflow-node:hover:not(.workflow-node-start,.workflow-node-end){outline:2px dashed #1890ff}.workflow-node .title{font-weight:600;margin-bottom:6px}.workflow-node-start{width:0px}.workflow-node-start.connecting-source,.workflow-node-start.selected,.workflow-node-start:hover{outline:unset}.workflow-node-start.connecting-source nz-tag,.workflow-node-start.selected nz-tag,.workflow-node-start:hover nz-tag{outline:2px dashed}.workflow-node-start nz-tag{position:relative;top:45px;right:35px}.workflow-node-end{width:0px}.workflow-node-end.connecting-source,.workflow-node-end.selected,.workflow-node-end:hover{outline:unset}.workflow-node-end.connecting-source nz-tag,.workflow-node-end.selected nz-tag,.workflow-node-end:hover nz-tag{outline:2px dashed}.workflow-node-end nz-tag{position:relative;top:45px;right:32px}.connector{position:absolute;top:39px;width:12px;height:12px;background:#1890ff;border-radius:50%;transform:translateY(-50%);cursor:crosshair;transition:box-shadow .15s ease-out,transform .15s ease-out}.connector:hover{box-shadow:0 0 0 3px #1890ff4d;transform:translateY(-50%) scale(1.15)}.connector-right{right:-8px;background:orange}.connector-right.reverse,.connector-left{left:-8px}.connector-left.reverse{left:unset;right:-8px}.connector-start{width:16px;height:16px;right:-8px;background:green;box-shadow:0 0 0 3px #1890ff4d}.connector-end{width:16px;height:16px;left:-8px;background:#000;box-shadow:0 0 0 3px #1890ff4d}.edge{cursor:pointer;stroke:#1890ff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2;fill:none;transition:stroke .15s ease}.edge-hit{stroke:transparent;stroke-width:18px!important;fill:none;cursor:pointer}.edge-hit:hover+.edge{stroke:#ff4d4f;stroke-width:2}.workflow-canvas.dragging-point .edge-hit{pointer-events:none}.edge:hover+.edge-label{fill:#1890ff;font-weight:500}.edge-label{font-size:12px;fill:#555;pointer-events:none;-webkit-user-select:none;user-select:none}.blue{stroke:#1890ff!important}.red{stroke:#ff4d4f!important;box-shadow:0 0 0 3px #1890ff4d!important}.workflow-svg{background:transparent;overflow:visible}.waypoint{position:absolute;width:10px;height:10px;background:#ff4d4f;border-radius:50%;transform:translate(-50%,-50%) scale(1);cursor:move;z-index:1;transition:transform .12s ease-out,background-color .12s ease-out,box-shadow .12s ease-out}.waypoint:hover{background:#ff7875;transform:translate(-50%,-50%) scale(1.25);box-shadow:0 0 0 4px #ff787559}.waypoint.dragging{transition:none;transform:translate(-50%,-50%) scale(1.15);pointer-events:none}.workflow-canvas.dragging-point svg{cursor:grabbing}.selection-box{position:absolute;border:1px dashed #1890ff;background:#1890ff1a;pointer-events:none}.toolbar{position:absolute;top:8px;left:8px;display:flex;gap:4px;padding:6px;background:#fff;border-radius:6px;box-shadow:0 2px 8px #00000026;z-index:100}.toolbar .divider{width:1px;background:#e5e5e5;margin:0 2px}nz-tag.selected{outline:2px dashed #1890ff}.grid-layer{position:absolute;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(rgba(0,0,0,.08) 1px,transparent 1px);background-size:20px 20px}.grid-layer{background-image:linear-gradient(to right,rgba(0,0,0,.06) 1px,transparent 1px),linear-gradient(to bottom,rgba(0,0,0,.06) 1px,transparent 1px);background-size:20px 20px}.editable-tag{background:#fff;border-style:dashed}::ng-deep .minimap,.minimap-combine{position:absolute;width:180px;height:125px;top:0;right:0;background-color:#eee;border:1px solid #aaa;opacity:.9;z-index:1}::ng-deep .minimap{position:absolute;width:200px;height:140px;top:8px;right:8px;background-color:#f8f9fa;border:1px solid #d9d9d9;border-radius:8px;box-shadow:0 4px 12px #0000001a;overflow:hidden;z-index:100;-webkit-user-select:none;user-select:none}::ng-deep .minimap-node{position:absolute;background-color:#bfbfbf;border-radius:2px}::ng-deep .minimap-node-round{position:absolute;background-color:#bfbfbf;border-radius:50%}::ng-deep .minimap-node-round-start{background-color:#52c41a}::ng-deep .minimap-node-round-end{background-color:#ff4d4f}::ng-deep .minimap-viewport{position:absolute;box-sizing:border-box;background-color:#1890ff26;border:1.5px solid #1890ff;border-radius:4px;z-index:2;cursor:grab;transition:none}::ng-deep .minimap-viewport.grabbing,::ng-deep .minimap-viewport:active{cursor:grabbing;background-color:#1890ff40}::ng-deep .has-floating-label.floating-label{position:relative;padding-top:14px}::ng-deep .has-floating-label nz-form-item nz-form-label{position:absolute;top:12px;left:13px;transform:translateY(-50%);background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 80%,#ffffff 80%);z-index:1;height:auto;line-height:normal;padding:0 4px}::ng-deep .has-floating-label nz-form-item nz-form-label label{font-size:12px;color:var(--darkgray, #565656);font-weight:700;height:auto;line-height:normal;padding:0;display:flex;align-items:center}::ng-deep .has-floating-label .full-width{width:100%}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label{background:linear-gradient(to bottom,var(--form-bg-color, #ffffff) 60%,#f5f5f5 50%)}.has-floating-label.floating-label nz-form-item:has(.ant-select-disabled) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(input[disabled]) nz-form-label label,.has-floating-label.floating-label nz-form-item:has(.ant-input-disabled) nz-form-label label{color:#bfbfbf}\n"] }]
|
|
19735
19837
|
}], propDecorators: { lstTemplateForSelect: [{
|
|
19736
19838
|
type: Input
|
|
19737
19839
|
}], getdata: [{
|
|
@@ -19821,9 +19923,231 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
19821
19923
|
args: ['wfeditor']
|
|
19822
19924
|
}] } });
|
|
19823
19925
|
|
|
19926
|
+
class WFDocSwimlaneComponent extends BaseComponent {
|
|
19927
|
+
service = inject(WF_DocService);
|
|
19928
|
+
hoveredLine = null;
|
|
19929
|
+
wrapperRef;
|
|
19930
|
+
data = { Lanes: [], Nodes: [], Links: [] };
|
|
19931
|
+
drawnLines = [];
|
|
19932
|
+
ngOnInit() {
|
|
19933
|
+
this.getdata();
|
|
19934
|
+
}
|
|
19935
|
+
ngAfterViewInit() { }
|
|
19936
|
+
onResize() {
|
|
19937
|
+
this.calculateLines();
|
|
19938
|
+
}
|
|
19939
|
+
getdata() {
|
|
19940
|
+
const id = this.getUrlParam('id');
|
|
19941
|
+
this.service.GetSwimlaneData(id).then((res) => {
|
|
19942
|
+
let rawData = res.Data;
|
|
19943
|
+
if (rawData.Links) {
|
|
19944
|
+
rawData.Links.sort((a, b) => (a.Sequence || 0) - (b.Sequence || 0));
|
|
19945
|
+
rawData.Links = this.groupLinks(rawData.Links);
|
|
19946
|
+
}
|
|
19947
|
+
this.data = rawData;
|
|
19948
|
+
setTimeout(() => this.calculateLines(), 200);
|
|
19949
|
+
});
|
|
19950
|
+
}
|
|
19951
|
+
groupLinks(links) {
|
|
19952
|
+
const groupedMap = new Map();
|
|
19953
|
+
links.forEach((link) => {
|
|
19954
|
+
// Tạo key duy nhất để gom nhóm (Gộp theo Nguồn + Đích + Tên + Loại nét đứt/liền)
|
|
19955
|
+
const key = `${link.SourceId}_${link.TargetId}_${link.Label}_${link.Type}`;
|
|
19956
|
+
if (groupedMap.has(key)) {
|
|
19957
|
+
const existingLink = groupedMap.get(key);
|
|
19958
|
+
// Nếu đã có, nối thêm số thứ tự bằng dấu phẩy (VD: "1" thành "1, 3")
|
|
19959
|
+
if (link.Sequence) {
|
|
19960
|
+
existingLink.SequenceLabel = existingLink.SequenceLabel
|
|
19961
|
+
? `${existingLink.SequenceLabel}, ${link.Sequence}`
|
|
19962
|
+
: `${link.Sequence}`;
|
|
19963
|
+
}
|
|
19964
|
+
}
|
|
19965
|
+
else {
|
|
19966
|
+
// Nếu chưa có, tạo mới và khởi tạo label
|
|
19967
|
+
groupedMap.set(key, {
|
|
19968
|
+
...link,
|
|
19969
|
+
SequenceLabel: link.Sequence ? `${link.Sequence}` : '',
|
|
19970
|
+
});
|
|
19971
|
+
}
|
|
19972
|
+
});
|
|
19973
|
+
return Array.from(groupedMap.values());
|
|
19974
|
+
}
|
|
19975
|
+
getNodesForLane(laneId) {
|
|
19976
|
+
return this.data.Nodes.filter((n) => n.LaneId === laneId);
|
|
19977
|
+
}
|
|
19978
|
+
calculateLines() {
|
|
19979
|
+
if (!this.wrapperRef || !this.data.Links)
|
|
19980
|
+
return;
|
|
19981
|
+
const wrapperRect = this.wrapperRef.nativeElement.getBoundingClientRect();
|
|
19982
|
+
// BƯỚC 1: Quét để đếm số lượng đường thẳng qua lại giữa 2 Node bất kỳ
|
|
19983
|
+
const pairRegistry = {};
|
|
19984
|
+
const pairCounter = {};
|
|
19985
|
+
const sourceInterRegistry = {};
|
|
19986
|
+
const sourceInterCounter = {};
|
|
19987
|
+
const laneSkipCounter = {};
|
|
19988
|
+
this.data.Links.forEach((link) => {
|
|
19989
|
+
// Sort ID để gom nhóm (A->B hay B->A đều tính chung là 1 cặp)
|
|
19990
|
+
const pairKey = [link.SourceId, link.TargetId].sort().join('|');
|
|
19991
|
+
pairRegistry[pairKey] = (pairRegistry[pairKey] || 0) + 1;
|
|
19992
|
+
if (link.Type === 'inter') {
|
|
19993
|
+
sourceInterRegistry[link.SourceId] = (sourceInterRegistry[link.SourceId] || 0) + 1;
|
|
19994
|
+
}
|
|
19995
|
+
});
|
|
19996
|
+
this.drawnLines = this.data.Links.map((link) => {
|
|
19997
|
+
const sourceEl = document.getElementById(`node-${link.SourceId}`);
|
|
19998
|
+
const targetEl = document.getElementById(`node-${link.TargetId}`);
|
|
19999
|
+
if (!sourceEl || !targetEl)
|
|
20000
|
+
return null;
|
|
20001
|
+
const sRect = sourceEl.getBoundingClientRect();
|
|
20002
|
+
const tRect = targetEl.getBoundingClientRect();
|
|
20003
|
+
const pairKey = [link.SourceId, link.TargetId].sort().join('|');
|
|
20004
|
+
const totalInPair = pairRegistry[pairKey];
|
|
20005
|
+
const currentIndex = pairCounter[pairKey] || 0;
|
|
20006
|
+
pairCounter[pairKey] = currentIndex + 1;
|
|
20007
|
+
let startX, startY, endX, endY, pathD, labelX, labelY;
|
|
20008
|
+
if (link.Type === 'intra') {
|
|
20009
|
+
// ==========================================
|
|
20010
|
+
// 1. CÁC ĐƯỜNG NỘI BỘ (INTRA) - Cùng luồng bơi
|
|
20011
|
+
// ==========================================
|
|
20012
|
+
const isForward = sRect.left <= tRect.left;
|
|
20013
|
+
const distance = isForward ? tRect.left - sRect.right : sRect.left - tRect.right;
|
|
20014
|
+
const isSelf = link.SourceId === link.TargetId;
|
|
20015
|
+
const isAdjacent = distance <= 200 && !isSelf;
|
|
20016
|
+
if (isSelf) {
|
|
20017
|
+
// 1.1 Tự trỏ về chính nó (Self-loop) -> Vòng cung trên đầu
|
|
20018
|
+
startX = sRect.left + sRect.width * 0.2 - wrapperRect.left;
|
|
20019
|
+
endX = sRect.left + sRect.width * 0.8 - wrapperRect.left;
|
|
20020
|
+
startY = sRect.top - wrapperRect.top;
|
|
20021
|
+
endY = sRect.top - wrapperRect.top;
|
|
20022
|
+
const curveHeight = 40 + currentIndex * 20;
|
|
20023
|
+
pathD = `M ${startX} ${startY} C ${startX} ${startY - curveHeight}, ${endX} ${endY - curveHeight}, ${endX} ${endY}`;
|
|
20024
|
+
labelX = sRect.left + sRect.width / 2 - wrapperRect.left;
|
|
20025
|
+
labelY = startY - curveHeight * 0.75 - 5;
|
|
20026
|
+
}
|
|
20027
|
+
else if (isAdjacent) {
|
|
20028
|
+
// 1.2 Hai node liền kề -> Kẻ ngang song song
|
|
20029
|
+
let yOffset = 0;
|
|
20030
|
+
if (totalInPair > 1) {
|
|
20031
|
+
const spacing = 26;
|
|
20032
|
+
const startOffset = -((totalInPair - 1) * spacing) / 2;
|
|
20033
|
+
yOffset = startOffset + currentIndex * spacing;
|
|
20034
|
+
}
|
|
20035
|
+
startY = sRect.top + sRect.height / 2 - wrapperRect.top + yOffset;
|
|
20036
|
+
endY = tRect.top + tRect.height / 2 - wrapperRect.top + yOffset;
|
|
20037
|
+
if (isForward) {
|
|
20038
|
+
startX = sRect.right - wrapperRect.left;
|
|
20039
|
+
endX = tRect.left - wrapperRect.left;
|
|
20040
|
+
}
|
|
20041
|
+
else {
|
|
20042
|
+
startX = sRect.left - wrapperRect.left;
|
|
20043
|
+
endX = tRect.right - wrapperRect.left;
|
|
20044
|
+
}
|
|
20045
|
+
pathD = `M ${startX} ${startY} L ${endX} ${endY}`;
|
|
20046
|
+
labelX = startX + (endX - startX) / 2;
|
|
20047
|
+
labelY = startY - 8;
|
|
20048
|
+
}
|
|
20049
|
+
else {
|
|
20050
|
+
// 1.3 Nhảy cóc (Skip Node) -> Vẽ đường vuông góc xếp lớp
|
|
20051
|
+
// Dịch nhẹ điểm neo X để tách các cột dọc
|
|
20052
|
+
const xOffset = isForward ? 15 : -15;
|
|
20053
|
+
startX = sRect.left + sRect.width / 2 - wrapperRect.left + xOffset;
|
|
20054
|
+
endX = tRect.left + tRect.width / 2 - wrapperRect.left + xOffset;
|
|
20055
|
+
// --- LOGIC XẾP LỚP MỚI ---
|
|
20056
|
+
// 1. Trích xuất ID của luồng bơi hiện tại (VD: từ "297-10221" cắt lấy "297")
|
|
20057
|
+
const laneId = link.SourceId.split('-')[0];
|
|
20058
|
+
// 2. Lấy thứ tự tầng bay của đường nhảy cóc này
|
|
20059
|
+
const currentSkipLevel = laneSkipCounter[laneId] || 0;
|
|
20060
|
+
laneSkipCounter[laneId] = currentSkipLevel + 1; // Tăng đếm lên 1 cho đường tiếp theo
|
|
20061
|
+
// 3. Tính độ cao: Base = 35px. Mỗi đường phát sinh sau sẽ tự động dâng cao thêm 22px
|
|
20062
|
+
let heightOffset = 35 + currentSkipLevel * 22;
|
|
20063
|
+
// Vòng lên trên đỉnh node
|
|
20064
|
+
startY = sRect.top - wrapperRect.top;
|
|
20065
|
+
endY = tRect.top - wrapperRect.top;
|
|
20066
|
+
const yLevel = startY - heightOffset;
|
|
20067
|
+
// M: Bắt đầu -> L: Đi thẳng lên -> L: Đi ngang -> L: Cắm thẳng xuống
|
|
20068
|
+
pathD = `M ${startX} ${startY} L ${startX} ${yLevel} L ${endX} ${yLevel} L ${endX} ${endY}`;
|
|
20069
|
+
labelX = startX + (endX - startX) / 2;
|
|
20070
|
+
labelY = yLevel - 8;
|
|
20071
|
+
}
|
|
20072
|
+
}
|
|
20073
|
+
else if (link.Type === 'inter') {
|
|
20074
|
+
// ==========================================
|
|
20075
|
+
// 2. MŨI TÊN CHÉO (INTER) - Giữa 2 luồng bơi
|
|
20076
|
+
// ==========================================
|
|
20077
|
+
const totalSource = sourceInterRegistry[link.SourceId];
|
|
20078
|
+
const currentSourceIdx = sourceInterCounter[link.SourceId] || 0;
|
|
20079
|
+
sourceInterCounter[link.SourceId] = currentSourceIdx + 1;
|
|
20080
|
+
let xOffset = 0;
|
|
20081
|
+
if (totalSource > 1) {
|
|
20082
|
+
const spacing = 80;
|
|
20083
|
+
xOffset = -((totalSource - 1) * spacing) / 2 + currentSourceIdx * spacing;
|
|
20084
|
+
}
|
|
20085
|
+
// Tọa độ X
|
|
20086
|
+
startX = sRect.left + sRect.width / 2 - wrapperRect.left + xOffset;
|
|
20087
|
+
endX = tRect.left + tRect.width / 2 - wrapperRect.left + xOffset;
|
|
20088
|
+
// THÊM LOGIC NHẬN DIỆN CHIỀU DỌC (Trên xuống hay Dưới lên)
|
|
20089
|
+
const isTargetBelow = tRect.top > sRect.top;
|
|
20090
|
+
if (isTargetBelow) {
|
|
20091
|
+
// Mũi tên đi XUỐNG: Xuất phát từ Đáy Source -> Cắm vào Đỉnh Target
|
|
20092
|
+
startY = sRect.bottom - wrapperRect.top;
|
|
20093
|
+
endY = tRect.top - wrapperRect.top;
|
|
20094
|
+
// Tọa độ Y ở khoảng giữa 2 luồng bơi để bẻ góc ngang
|
|
20095
|
+
const midY = startY + (endY - startY) / 2;
|
|
20096
|
+
// Vẽ đường vuông góc: Bắt đầu (M) -> Kéo thẳng xuống giữa (L) -> Kéo ngang sang đích (L) -> Cắm thẳng xuống đích (L)
|
|
20097
|
+
pathD = `M ${startX} ${startY} L ${startX} ${midY} L ${endX} ${midY} L ${endX} ${endY}`;
|
|
20098
|
+
// Chữ neo ở nửa trên, bám theo đoạn thẳng dọc
|
|
20099
|
+
labelY = startY + 40 + currentSourceIdx * 15;
|
|
20100
|
+
}
|
|
20101
|
+
else {
|
|
20102
|
+
// Mũi tên đi LÊN: Xuất phát từ Đỉnh Source -> Cắm vào Đáy Target
|
|
20103
|
+
startY = sRect.top - wrapperRect.top;
|
|
20104
|
+
endY = tRect.bottom - wrapperRect.top;
|
|
20105
|
+
// Tọa độ Y ở khoảng giữa 2 luồng bơi để bẻ góc ngang
|
|
20106
|
+
const midY = startY - (startY - endY) / 2;
|
|
20107
|
+
// Vẽ đường vuông góc: Bắt đầu (M) -> Kéo thẳng lên giữa (L) -> Kéo ngang sang đích (L) -> Cắm thẳng lên đích (L)
|
|
20108
|
+
pathD = `M ${startX} ${startY} L ${startX} ${midY} L ${endX} ${midY} L ${endX} ${endY}`;
|
|
20109
|
+
// Chữ neo ở nửa dưới (đẩy ngược lên), bám theo đoạn thẳng dọc
|
|
20110
|
+
labelY = startY - 40 - currentSourceIdx * 15;
|
|
20111
|
+
}
|
|
20112
|
+
labelX = startX; // Căn chữ nằm ngay trên trục dọc xuất phát
|
|
20113
|
+
}
|
|
20114
|
+
return { ...link, path: pathD, labelX, labelY };
|
|
20115
|
+
}).filter((line) => line !== null);
|
|
20116
|
+
}
|
|
20117
|
+
isLineRelated(line) {
|
|
20118
|
+
if (!this.hoveredLine)
|
|
20119
|
+
return false;
|
|
20120
|
+
// 1. Trùng khớp chính xác đường đang trỏ chuột
|
|
20121
|
+
if (this.hoveredLine === line)
|
|
20122
|
+
return true;
|
|
20123
|
+
// 2. Kiểm tra xem 2 đường có chia sẻ chung bất kỳ số Sequence nào không
|
|
20124
|
+
if (this.hoveredLine.SequenceLabel && line.SequenceLabel) {
|
|
20125
|
+
const hoveredSeqs = this.hoveredLine.SequenceLabel.split(',').map((s) => s.trim());
|
|
20126
|
+
const currentSeqs = line.SequenceLabel.split(',').map((s) => s.trim());
|
|
20127
|
+
// Trả về true nếu có ít nhất 1 số Sequence giống nhau
|
|
20128
|
+
return hoveredSeqs.some((seq) => currentSeqs.includes(seq));
|
|
20129
|
+
}
|
|
20130
|
+
return false;
|
|
20131
|
+
}
|
|
20132
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WFDocSwimlaneComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
20133
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: WFDocSwimlaneComponent, isStandalone: true, selector: "ng-component", inputs: { data: "data" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "wrapperRef", first: true, predicate: ["wrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<button-reload (click)=\"getdata()\"></button-reload>\n<div class=\"swimlane-wrapper\" #wrapper>\n <!-- LAYER 1: SVG D\u00F9ng \u0111\u1EC3 v\u1EBD c\u00E1c m\u0169i t\u00EAn n\u1ED1i gi\u1EEFa c\u00E1c th\u1EBB HTML -->\n <svg class=\"lines-layer\">\n <defs>\n <!-- C\u00E1c marker c\u0169 gi\u1EEF nguy\u00EAn -->\n <marker id=\"arrow-intra\" viewBox=\"0 0 10 10\" refX=\"10\" refY=\"5\" markerWidth=\"6\" markerHeight=\"6\" orient=\"auto\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"#5b8cff\" />\n </marker>\n <marker id=\"arrow-inter\" viewBox=\"0 0 10 10\" refX=\"10\" refY=\"5\" markerWidth=\"6\" markerHeight=\"6\" orient=\"auto\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"#fa8c16\" />\n </marker>\n\n <!-- TH\u00CAM: Marker m\u0169i t\u00EAn m\u00E0u \u0111\u1ECF khi Hover -->\n <marker id=\"arrow-hover\" viewBox=\"0 0 10 10\" refX=\"10\" refY=\"5\" markerWidth=\"6\" markerHeight=\"6\" orient=\"auto\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"#ff4d4f\" />\n </marker>\n </defs>\n\n <!-- TH\u00CAM: class, s\u1EF1 ki\u1EC7n mouseenter/leave v\u00E0 bi\u1EBFn is-hovered -->\n <g\n *ngFor=\"let line of drawnLines\"\n class=\"link-group\"\n [class.is-hovered]=\"isLineRelated(line)\"\n (mouseenter)=\"hoveredLine = line\"\n (mouseleave)=\"hoveredLine = null\"\n >\n <path [attr.d]=\"line.path\" class=\"ghost-path\"></path>\n\n <!-- G\u1ECDi isLineRelated(line) thay v\u00EC so s\u00E1nh c\u1EE9ng hoveredLine === line -->\n <path\n [attr.d]=\"line.path\"\n [class]=\"'link-' + line.Type\"\n [attr.marker-end]=\"isLineRelated(line) ? 'url(#arrow-hover)' : 'url(#arrow-' + line.Type + ')'\"\n ></path>\n\n <text *ngIf=\"line.Label\" [attr.x]=\"line.labelX\" [attr.y]=\"line.labelY\" class=\"link-label\" text-anchor=\"middle\">\n <tspan *ngIf=\"line.Sequence\" font-weight=\"bold\">{{ line.SequenceLabel }}.</tspan>\n {{ line.Label }}\n </text>\n </g>\n </svg>\n\n <!-- LAYER 2: C\u00E1c Lu\u1ED3ng b\u01A1i (Lanes) ch\u1EE9a c\u00E1c Stages (Nodes) -->\n <div class=\"lane\" *ngFor=\"let lane of data.Lanes\">\n <div class=\"lane-header\">\n <div class=\"lane-title\">{{ lane.Title }}</div>\n <div class=\"lane-subtitle\">{{ lane.Subtitle }}</div>\n </div>\n\n <div class=\"lane-body\">\n <div\n class=\"node-card\"\n *ngFor=\"let node of getNodesForLane(lane.Id)\"\n [id]=\"'node-' + node.Id\"\n [ngClass]=\"'status-' + node.Status\"\n >\n <div class=\"node-title\">{{ node.Title }}</div>\n <div class=\"node-subtitle\">{{ node.Subtitle }}</div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.swimlane-wrapper{position:relative;background-color:#f4f6f8;padding:80px 20px 60px;border-radius:8px;display:flex;flex-direction:column;gap:16px;overflow-x:auto;min-height:500px}.lines-layer{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:10}.lines-layer .link-group{pointer-events:auto;cursor:pointer}.lines-layer .link-group.is-hovered path[class^=link-]{stroke:#ff4d4f!important;stroke-width:2.5px}.lines-layer .link-group.is-hovered .link-label{fill:#ff4d4f!important}.lines-layer .ghost-path{fill:none;stroke:transparent;stroke-width:20px}.lines-layer path[class^=link-]{fill:none;stroke-width:2px;transition:all .2s ease}.lines-layer .link-intra{stroke:#5b8cff}.lines-layer .link-inter{stroke:#fa8c16;stroke-dasharray:6 4}.lines-layer .link-label{font-size:11px;fill:#555;font-weight:500;transition:all .2s ease}.lane{display:flex;background-color:#fff;border-radius:8px;border:1px solid #e2e8f0;box-shadow:0 1px 3px #0000000d;min-height:100px;position:relative;z-index:5}.lane-header{width:200px;padding:16px;border-right:1px solid #e2e8f0;background-color:#fafbfc;border-radius:8px 0 0 8px;display:flex;flex-direction:column;justify-content:center}.lane-header .lane-title{font-size:11px;color:#64748b;font-weight:600}.lane-header .lane-subtitle{font-size:13px;font-weight:700;color:#1e293b;margin-top:4px}.lane-body{flex:1;padding:24px 32px;display:flex;align-items:center;gap:150px}.node-card{min-width:130px;padding:12px;border-radius:6px;text-align:center;background:#fff;border:1.5px solid #d9d9d9;box-shadow:0 2px 4px #0000000d}.node-card .node-title{font-size:13px;font-weight:600;color:#1f2937}.node-card .node-subtitle{font-size:12px;color:#6b7280;margin-top:2px}.node-card.status-default{border-color:#d1d5db;background-color:#f3f4f6}.node-card.status-processing{border-color:#93c5fd;background-color:#eff6ff}.node-card.status-success{border-color:#6ee7b7;background-color:#ecfdf5;box-shadow:0 0 10px #34d39966}.node-card.status-warning{border-color:#fcd34d;background-color:#fffbeb}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonReload, selector: "button-reload", inputs: ["nzType", "size"] }] });
|
|
20134
|
+
}
|
|
20135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: WFDocSwimlaneComponent, decorators: [{
|
|
20136
|
+
type: Component,
|
|
20137
|
+
args: [{ imports: [CommonModule, ButtonReload], template: "<button-reload (click)=\"getdata()\"></button-reload>\n<div class=\"swimlane-wrapper\" #wrapper>\n <!-- LAYER 1: SVG D\u00F9ng \u0111\u1EC3 v\u1EBD c\u00E1c m\u0169i t\u00EAn n\u1ED1i gi\u1EEFa c\u00E1c th\u1EBB HTML -->\n <svg class=\"lines-layer\">\n <defs>\n <!-- C\u00E1c marker c\u0169 gi\u1EEF nguy\u00EAn -->\n <marker id=\"arrow-intra\" viewBox=\"0 0 10 10\" refX=\"10\" refY=\"5\" markerWidth=\"6\" markerHeight=\"6\" orient=\"auto\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"#5b8cff\" />\n </marker>\n <marker id=\"arrow-inter\" viewBox=\"0 0 10 10\" refX=\"10\" refY=\"5\" markerWidth=\"6\" markerHeight=\"6\" orient=\"auto\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"#fa8c16\" />\n </marker>\n\n <!-- TH\u00CAM: Marker m\u0169i t\u00EAn m\u00E0u \u0111\u1ECF khi Hover -->\n <marker id=\"arrow-hover\" viewBox=\"0 0 10 10\" refX=\"10\" refY=\"5\" markerWidth=\"6\" markerHeight=\"6\" orient=\"auto\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"#ff4d4f\" />\n </marker>\n </defs>\n\n <!-- TH\u00CAM: class, s\u1EF1 ki\u1EC7n mouseenter/leave v\u00E0 bi\u1EBFn is-hovered -->\n <g\n *ngFor=\"let line of drawnLines\"\n class=\"link-group\"\n [class.is-hovered]=\"isLineRelated(line)\"\n (mouseenter)=\"hoveredLine = line\"\n (mouseleave)=\"hoveredLine = null\"\n >\n <path [attr.d]=\"line.path\" class=\"ghost-path\"></path>\n\n <!-- G\u1ECDi isLineRelated(line) thay v\u00EC so s\u00E1nh c\u1EE9ng hoveredLine === line -->\n <path\n [attr.d]=\"line.path\"\n [class]=\"'link-' + line.Type\"\n [attr.marker-end]=\"isLineRelated(line) ? 'url(#arrow-hover)' : 'url(#arrow-' + line.Type + ')'\"\n ></path>\n\n <text *ngIf=\"line.Label\" [attr.x]=\"line.labelX\" [attr.y]=\"line.labelY\" class=\"link-label\" text-anchor=\"middle\">\n <tspan *ngIf=\"line.Sequence\" font-weight=\"bold\">{{ line.SequenceLabel }}.</tspan>\n {{ line.Label }}\n </text>\n </g>\n </svg>\n\n <!-- LAYER 2: C\u00E1c Lu\u1ED3ng b\u01A1i (Lanes) ch\u1EE9a c\u00E1c Stages (Nodes) -->\n <div class=\"lane\" *ngFor=\"let lane of data.Lanes\">\n <div class=\"lane-header\">\n <div class=\"lane-title\">{{ lane.Title }}</div>\n <div class=\"lane-subtitle\">{{ lane.Subtitle }}</div>\n </div>\n\n <div class=\"lane-body\">\n <div\n class=\"node-card\"\n *ngFor=\"let node of getNodesForLane(lane.Id)\"\n [id]=\"'node-' + node.Id\"\n [ngClass]=\"'status-' + node.Status\"\n >\n <div class=\"node-title\">{{ node.Title }}</div>\n <div class=\"node-subtitle\">{{ node.Subtitle }}</div>\n </div>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.swimlane-wrapper{position:relative;background-color:#f4f6f8;padding:80px 20px 60px;border-radius:8px;display:flex;flex-direction:column;gap:16px;overflow-x:auto;min-height:500px}.lines-layer{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:10}.lines-layer .link-group{pointer-events:auto;cursor:pointer}.lines-layer .link-group.is-hovered path[class^=link-]{stroke:#ff4d4f!important;stroke-width:2.5px}.lines-layer .link-group.is-hovered .link-label{fill:#ff4d4f!important}.lines-layer .ghost-path{fill:none;stroke:transparent;stroke-width:20px}.lines-layer path[class^=link-]{fill:none;stroke-width:2px;transition:all .2s ease}.lines-layer .link-intra{stroke:#5b8cff}.lines-layer .link-inter{stroke:#fa8c16;stroke-dasharray:6 4}.lines-layer .link-label{font-size:11px;fill:#555;font-weight:500;transition:all .2s ease}.lane{display:flex;background-color:#fff;border-radius:8px;border:1px solid #e2e8f0;box-shadow:0 1px 3px #0000000d;min-height:100px;position:relative;z-index:5}.lane-header{width:200px;padding:16px;border-right:1px solid #e2e8f0;background-color:#fafbfc;border-radius:8px 0 0 8px;display:flex;flex-direction:column;justify-content:center}.lane-header .lane-title{font-size:11px;color:#64748b;font-weight:600}.lane-header .lane-subtitle{font-size:13px;font-weight:700;color:#1e293b;margin-top:4px}.lane-body{flex:1;padding:24px 32px;display:flex;align-items:center;gap:150px}.node-card{min-width:130px;padding:12px;border-radius:6px;text-align:center;background:#fff;border:1.5px solid #d9d9d9;box-shadow:0 2px 4px #0000000d}.node-card .node-title{font-size:13px;font-weight:600;color:#1f2937}.node-card .node-subtitle{font-size:12px;color:#6b7280;margin-top:2px}.node-card.status-default{border-color:#d1d5db;background-color:#f3f4f6}.node-card.status-processing{border-color:#93c5fd;background-color:#eff6ff}.node-card.status-success{border-color:#6ee7b7;background-color:#ecfdf5;box-shadow:0 0 10px #34d39966}.node-card.status-warning{border-color:#fcd34d;background-color:#fffbeb}\n"] }]
|
|
20138
|
+
}], propDecorators: { wrapperRef: [{
|
|
20139
|
+
type: ViewChild,
|
|
20140
|
+
args: ['wrapper', { static: false }]
|
|
20141
|
+
}], data: [{
|
|
20142
|
+
type: Input
|
|
20143
|
+
}], onResize: [{
|
|
20144
|
+
type: HostListener,
|
|
20145
|
+
args: ['window:resize']
|
|
20146
|
+
}] } });
|
|
20147
|
+
|
|
19824
20148
|
/**
|
|
19825
20149
|
* Generated bundle index. Do not edit.
|
|
19826
20150
|
*/
|
|
19827
20151
|
|
|
19828
|
-
export { ABAC_RULES_TOKEN, ActionRule, ActionRuleLine, AnimatedDigitComponent, AppDataComponent, AppGlobals, AppStorage, App_Dic_Domain, App_Dic_DomainFilter, App_File, App_Menu$1 as App_Menu, App_Org, App_Role, App_Role_Menu_Ref, App_Setting, App_SettingFilter, App_User, AuthGuard, AuthService, AutoFocusDirective, BarGraphComponent, BaseComponent, BaseGuardChangeComponent, BaseOverlayComponent, Box, Breadcrumb, CacheListComponent, CheckModel, CommonService, ConfigComponent, CustomNotiComponent, CustomNotiService, DashcardComponent, DateInputParserDirective, DateTimeHelper, DicDomainListComponent, DicDomainPipe, DicDomainSelectComponent$1 as DicDomainSelectComponent, DicDomainService, DocTemplate, DoughnutGraphComponent, DownloadHelper, DurationFormatPipe, DynamicBuildFormComponent, ENUM_ResponseType, ExpandableSearchComponent, ExtendCheckbox, ExtendCheckbox3Value, ExtendDatePicker, ExtendDateRangePicker, ExtendInput, ExtendInputNumber, ExtendPaginationComponent, ExtendSelectComponent, ExtendTableComponent, ExtendTextArea, FileFilter, FileListComponent, FileService, FormatBytesPipe, GlobalSpinnerComponent, GridFilter, H3Icon, HTTPService, HasPermissionDirective, HasPermissionPipe, HeaderSearchComponent, HideIfErrorDirective, HighlightPipe, IconAdd, IconCheck, IconClose, IconCopy, IconDelete, IconEdit, IconInfo, IconSave, IconSearch, IconView, LayoutComponent, LayoutUser, LimitLettersPipe, LimitWordsPipe, LineGraphComponent, LoadingService, LogAppComponent, LogServerComponent, LogServerDetailComponent, Login1Component, Login2Component, LoginComponent, MailTemplateService, MenuDetailComponent, MenuFilter, MenuListComponent, MenuService, MonitorComponent, NoPermission, Nodata, NotiService, NotificationCenterComponent, NullIfEmptyDirective, NumberOnlyDirective, OrderOption, OrgDetailComponent, OrgFilter, OrgListComponent, OrgService, PagingData, PagingModel, PdfViewerComponent, PermissionComponent, PermissionService$1 as PermissionService, ReadMoreProComponent, RegisterComponent, RoleDetailComponent, RoleFilter, RoleListComponent, RoleService, RouteMonitorService, RptConfigDetail, RptConfigList, SequenceDetailComponent, SequenceListComponent, SessionManagerService, SettingListComponent, SettingService$1 as SettingService, SynologyComponent, TableHeader, ThemeService, TokenStorage, TranslateKey, URLs$j as URLs, UnsavedChangesGuard, UpperCaseFirsLetterEachWordDirective, UppercaseDirective, UppercaseFirstLetterDirective, UserDetailComponent, UserFilter, UserListComponent, UserProfileComponent, UserProfileService, UserService, VersionComponent, VscService, WF_DocDetailComponent, WF_DocListComponent, WF_DocProcessComponent, WF_TemplateActionRef$1 as WF_TemplateActionRef, WF_TemplateDetail$1 as WF_TemplateDetail, WF_TemplateList, WF_Template_CombineDetailComponent, WF_Template_CombineListComponent, WF_TransitionRule, WF_TransitionRuleLine$1 as WF_TransitionRuleLine, Workflow$1 as Workflow, WorkflowAction, WorkflowActionEditorOption, WorkflowActionRef, WorkflowEditorComponent, WorkflowEditorOption$1 as WorkflowEditorOption, WorkflowStage, WorkflowStageEditorOption, XLSXHelper, authInterceptor };
|
|
20152
|
+
export { ABAC_RULES_TOKEN, ActionRule, ActionRuleLine, AnimatedDigitComponent, AppDataComponent, AppGlobals, AppStorage, App_Dic_Domain, App_Dic_DomainFilter, App_File, App_Menu$1 as App_Menu, App_Org, App_Role, App_Role_Menu_Ref, App_Setting, App_SettingFilter, App_User, AuthGuard, AuthService, AutoFocusDirective, BarGraphComponent, BaseComponent, BaseGuardChangeComponent, BaseOverlayComponent, Box, Breadcrumb, CacheListComponent, CheckModel, CommonService, ConfigComponent, CustomNotiComponent, CustomNotiService, DashcardComponent, DateInputParserDirective, DateTimeHelper, DicDomainListComponent, DicDomainPipe, DicDomainSelectComponent$1 as DicDomainSelectComponent, DicDomainService, DocTemplate, DoughnutGraphComponent, DownloadHelper, DurationFormatPipe, DynamicBuildFormComponent, ENUM_ResponseType, ExpandableSearchComponent, ExtendCheckbox, ExtendCheckbox3Value, ExtendDatePicker, ExtendDateRangePicker, ExtendInput, ExtendInputNumber, ExtendPaginationComponent, ExtendSelectComponent, ExtendTableComponent, ExtendTextArea, FileFilter, FileListComponent, FileService, FormatBytesPipe, GlobalSpinnerComponent, GridFilter, H3Icon, HTTPService, HasPermissionDirective, HasPermissionPipe, HeaderSearchComponent, HideIfErrorDirective, HighlightPipe, IconAdd, IconCheck, IconClose, IconCopy, IconDelete, IconEdit, IconInfo, IconSave, IconSearch, IconView, LayoutComponent, LayoutUser, LimitLettersPipe, LimitWordsPipe, LineGraphComponent, LoadingService, LogAppComponent, LogServerComponent, LogServerDetailComponent, Login1Component, Login2Component, LoginComponent, MailTemplateService, MenuDetailComponent, MenuFilter, MenuListComponent, MenuService, MonitorComponent, NoPermission, Nodata, NotiService, NotificationCenterComponent, NullIfEmptyDirective, NumberOnlyDirective, OrderOption, OrgDetailComponent, OrgFilter, OrgListComponent, OrgService, PagingData, PagingModel, PdfViewerComponent, PermissionComponent, PermissionService$1 as PermissionService, ReadMoreProComponent, RegisterComponent, RoleDetailComponent, RoleFilter, RoleListComponent, RoleService, RouteMonitorService, RptConfigDetail, RptConfigList, SequenceDetailComponent, SequenceListComponent, SessionManagerService, SettingListComponent, SettingService$1 as SettingService, SynologyComponent, TableHeader, ThemeService, TokenStorage, TranslateKey, URLs$j as URLs, UnsavedChangesGuard, UpperCaseFirsLetterEachWordDirective, UppercaseDirective, UppercaseFirstLetterDirective, UserDetailComponent, UserFilter, UserListComponent, UserProfileComponent, UserProfileService, UserService, VersionComponent, VscService, WFDocSwimlaneComponent, WF_DocDetailComponent, WF_DocListComponent, WF_DocProcessComponent, WF_TemplateActionRef$1 as WF_TemplateActionRef, WF_TemplateDetail$1 as WF_TemplateDetail, WF_TemplateList, WF_Template_CombineDetailComponent, WF_Template_CombineListComponent, WF_TransitionRule, WF_TransitionRuleLine$1 as WF_TransitionRuleLine, Workflow$1 as Workflow, WorkflowAction, WorkflowActionEditorOption, WorkflowActionRef, WorkflowEditorComponent, WorkflowEditorOption$1 as WorkflowEditorOption, WorkflowStage, WorkflowStageEditorOption, XLSXHelper, authInterceptor };
|
|
19829
20153
|
//# sourceMappingURL=brggroup-share-lib.mjs.map
|