tnx-shared 5.0.76 → 5.0.77
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/bundles/tnx-shared.umd.js +1032 -892
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/base/data-form-base.d.ts +2 -2
- package/classes/base/data-form-base.d.ts.map +1 -1
- package/classes/base/data-list-base.d.ts +1 -3
- package/classes/base/data-list-base.d.ts.map +1 -1
- package/classes/constants.d.ts +0 -4
- package/classes/constants.d.ts.map +1 -1
- package/classes/form-schema.d.ts +25 -38
- package/classes/form-schema.d.ts.map +1 -1
- package/classes/public-function.d.ts +1 -1
- package/components/address/address.component.d.ts.map +1 -1
- package/components/address-new/address-new.component.d.ts +37 -0
- package/components/address-new/address-new.component.d.ts.map +1 -0
- package/components/address-new/address-new.component.ngfactory.d.ts.map +1 -0
- package/components/address-new/address-new.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/components/address-new/models/don-vi-hanh-chinh.d.ts +6 -0
- package/components/address-new/models/don-vi-hanh-chinh.d.ts.map +1 -0
- package/components/address-new/services/address.service.d.ts +8 -0
- package/components/address-new/services/address.service.d.ts.map +1 -0
- package/components/address-new/services/address.service.ngfactory.d.ts.map +1 -0
- package/components/autocomplete-picker/autocomplete-picker.component.d.ts +0 -1
- package/components/autocomplete-picker/autocomplete-picker.component.d.ts.map +1 -1
- package/components/common-app-component/common-app-component.d.ts +1 -4
- package/components/common-app-component/common-app-component.d.ts.map +1 -1
- package/components/crud/crud-form/crud-form.component.d.ts +2 -2
- package/components/crud/crud-form/crud-form.component.d.ts.map +1 -1
- package/components/crud/crud-list/crud-list.component.d.ts +1 -6
- package/components/crud/crud-list/crud-list.component.d.ts.map +1 -1
- package/components/entity-picker/entity-picker-dialog/components/entity-picker-data/entity-picker-data.component.d.ts.map +1 -1
- package/components/entity-picker/entity-picker-dialog/components/entity-picker-selected/entity-picker-selected.component.d.ts.map +1 -1
- package/components/file-explorer/file-manager/file-manager.component.d.ts +3 -0
- package/components/file-explorer/file-manager/file-manager.component.d.ts.map +1 -1
- package/components/file-explorer/services/download-link.service.d.ts +1 -0
- package/components/file-explorer/services/download-link.service.d.ts.map +1 -1
- package/components/file-explorer/services/file-explorer.service.d.ts +2 -0
- package/components/file-explorer/services/file-explorer.service.d.ts.map +1 -1
- package/components/file-explorer/services/file-object.service.d.ts +2 -0
- package/components/file-explorer/services/file-object.service.d.ts.map +1 -1
- package/components/file-explorer/signature-detail/signature-detail.component.d.ts +8 -0
- package/components/file-explorer/signature-detail/signature-detail.component.d.ts.map +1 -0
- package/components/file-explorer/signature-detail/signature-detail.component.ngfactory.d.ts.map +1 -0
- package/components/file-explorer/signature-detail/signature-detail.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/components/file-upload/file-upload.component.d.ts +3 -0
- package/components/file-upload/file-upload.component.d.ts.map +1 -1
- package/components/mask/mask.component.d.ts +0 -2
- package/components/mask/mask.component.d.ts.map +1 -1
- package/components/service-file-upload/service-file-upload.component.d.ts +3 -0
- package/components/service-file-upload/service-file-upload.component.d.ts.map +1 -1
- package/configs/component-context.constant.d.ts +0 -1
- package/configs/component-context.constant.d.ts.map +1 -1
- package/esm2015/classes/base/data-form-base.js +5 -5
- package/esm2015/classes/base/data-list-base.js +23 -48
- package/esm2015/classes/constants.js +1 -6
- package/esm2015/classes/form-schema.js +29 -34
- package/esm2015/components/address/address.component.js +10 -4
- package/esm2015/components/address-new/address-new.component.js +224 -0
- package/esm2015/components/address-new/models/don-vi-hanh-chinh.js +8 -0
- package/esm2015/components/address-new/services/address.service.js +25 -0
- package/esm2015/components/autocomplete-picker/autocomplete-picker.component.js +16 -72
- package/esm2015/components/common-app-component/app.menu.component.js +2 -2
- package/esm2015/components/common-app-component/common-app-component.js +3 -26
- package/esm2015/components/crud/crud-form/crud-form.component.js +11 -10
- package/esm2015/components/crud/crud-list/crud-list.component.js +6 -71
- package/esm2015/components/entity-picker/entity-picker-dialog/components/entity-picker-data/entity-picker-data.component.js +3 -29
- package/esm2015/components/entity-picker/entity-picker-dialog/components/entity-picker-selected/entity-picker-selected.component.js +3 -29
- package/esm2015/components/file-explorer/file-manager/file-manager.component.js +155 -14
- package/esm2015/components/file-explorer/services/download-link.service.js +4 -1
- package/esm2015/components/file-explorer/services/file-explorer.service.js +21 -7
- package/esm2015/components/file-explorer/services/file-object.service.js +18 -1
- package/esm2015/components/file-explorer/signature-detail/signature-detail.component.js +66 -0
- package/esm2015/components/file-upload/file-upload.component.js +34 -2
- package/esm2015/components/mask/mask.component.js +4 -8
- package/esm2015/components/service-file-upload/service-file-upload.component.js +32 -2
- package/esm2015/components/workflow/services/entity-workflow-history.service.js +3 -3
- package/esm2015/components/workflow/services/entity-workflow-setting.service.js +4 -4
- package/esm2015/configs/component-context.constant.js +2 -3
- package/esm2015/models/grid-info.js +1 -1
- package/esm2015/pipes/tn-date.pipe.js +2 -12
- package/esm2015/public-api.js +7 -3
- package/esm2015/services/base.service.js +1 -16
- package/esm2015/services/common.service.js +1 -9
- package/esm2015/services/crud.service.js +4 -23
- package/esm2015/services/menu.service.js +3 -6
- package/esm2015/services/notifier.service.js +2 -2
- package/esm2015/services/permission.service.js +2 -9
- package/esm2015/services/template-text-v4.service.js +1 -1
- package/esm2015/services/user-v5.service.js +1 -1
- package/esm2015/services/user.service.js +2 -8
- package/esm2015/tnx-shared.js +94 -94
- package/esm2015/tnx-shared.module.js +6 -2
- package/fesm2015/tnx-shared.js +693 -536
- package/fesm2015/tnx-shared.js.map +1 -1
- package/models/grid-info.d.ts +0 -1
- package/models/grid-info.d.ts.map +1 -1
- package/package.json +2 -2
- package/pipes/tn-date.pipe.d.ts +0 -2
- package/pipes/tn-date.pipe.d.ts.map +1 -1
- package/public-api.d.ts +6 -2
- package/public-api.d.ts.map +1 -1
- package/services/base.service.d.ts +0 -1
- package/services/base.service.d.ts.map +1 -1
- package/services/common.service.d.ts +0 -4
- package/services/common.service.d.ts.map +1 -1
- package/services/crud.service.d.ts.map +1 -1
- package/services/menu.service.d.ts +1 -1
- package/services/menu.service.d.ts.map +1 -1
- package/services/permission.service.d.ts +0 -1
- package/services/permission.service.d.ts.map +1 -1
- package/services/template-text-v4.service.d.ts.map +1 -1
- package/services/user.service.d.ts.map +1 -1
- package/tnx-shared.d.ts +93 -93
- package/tnx-shared.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
- package/tnx-shared.module.d.ts +3 -2
- package/tnx-shared.module.d.ts.map +1 -1
- package/tnx-shared.module.ngfactory.d.ts.map +1 -1
- package/components/file-explorer/models/file-settings.d.ts +0 -46
- package/components/file-explorer/models/file-settings.d.ts.map +0 -1
- package/esm2015/components/file-explorer/models/file-settings.js +0 -60
- package/esm2015/services/organization-base.service.js +0 -57
- package/services/organization-base.service.d.ts +0 -16
- package/services/organization-base.service.d.ts.map +0 -1
- package/services/organization-base.service.ngfactory.d.ts.map +0 -1
package/fesm2015/tnx-shared.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DatePipe, Location, DecimalPipe, CommonModule, registerLocaleData, APP_BASE_HREF } from '@angular/common';
|
|
2
|
-
import { InjectionToken, ɵɵdefineInjectable, ɵɵinject, Injectable, Optional, Inject, INJECTOR, Injector, Directive, Input, Component, EventEmitter, ElementRef, ViewChild, Output, ContentChildren, TemplateRef, ComponentFactoryResolver, ApplicationRef, ContentChild, ChangeDetectorRef, forwardRef, Renderer2, HostListener, isDevMode, ChangeDetectionStrategy, ViewEncapsulation, NgZone, Pipe,
|
|
2
|
+
import { InjectionToken, ɵɵdefineInjectable, ɵɵinject, Injectable, Optional, Inject, INJECTOR, Injector, Directive, Input, Component, EventEmitter, ElementRef, ViewChild, Output, ContentChildren, TemplateRef, ComponentFactoryResolver, ApplicationRef, ContentChild, ChangeDetectorRef, forwardRef, Renderer2, HostListener, isDevMode, ChangeDetectionStrategy, ViewEncapsulation, NgZone, Pipe, NgModule, LOCALE_ID, NgModuleFactory, Compiler } from '@angular/core';
|
|
3
3
|
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
4
|
import { TranslateService, TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
|
5
5
|
import { AngularSplitModule } from 'angular-split';
|
|
@@ -62,7 +62,7 @@ import { OAuthService, OAuthModule } from 'angular-oauth2-oidc';
|
|
|
62
62
|
import { MessageService, ConfirmationService, PrimeNGConfig } from 'tn-custom-primeng/api';
|
|
63
63
|
import { HttpClient, HttpHeaders, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
64
64
|
import { HubConnectionBuilder } from '@aspnet/signalr';
|
|
65
|
-
import { saveAs } from 'file-saver';
|
|
65
|
+
import FileSaver, { saveAs } from 'file-saver';
|
|
66
66
|
import * as printJS_ from 'print-js';
|
|
67
67
|
import * as JWT_ from 'jwt-decode';
|
|
68
68
|
import { DomSanitizer, Title, BrowserModule } from '@angular/platform-browser';
|
|
@@ -135,8 +135,7 @@ ComCtxConstants.ROOT = {
|
|
|
135
135
|
MENU_CHANGED: 'MENU_CHANGED',
|
|
136
136
|
ADVANCE_SEARCH_INIT_WITHOUT_UPDATE_ROUTER: 'ADVANCE_SEARCH_INIT_WITHOUT_UPDATE_ROUTER',
|
|
137
137
|
SHOW_WAIT_BOX: 'SHOW_WAIT_BOX',
|
|
138
|
-
SHOW_REJECT_CONFIRM: 'SHOW_REJECT_CONFIRM'
|
|
139
|
-
NEED_CLEAR_PERMISSION_CACHE: 'NEED_CLEAR_PERMISSION_CACHE'
|
|
138
|
+
SHOW_REJECT_CONFIRM: 'SHOW_REJECT_CONFIRM'
|
|
140
139
|
};
|
|
141
140
|
ComCtxConstants.ROOT_USMART = {
|
|
142
141
|
SHOW_CONFIG_DATA_DEFAULT: 'SHOW_CONFIG_DATA_DEFAULT',
|
|
@@ -609,7 +608,7 @@ class NotifierService {
|
|
|
609
608
|
showWarningByReponse(res) {
|
|
610
609
|
let message = res.message;
|
|
611
610
|
if (!message)
|
|
612
|
-
message =
|
|
611
|
+
message = res.error;
|
|
613
612
|
this.showWarning(message);
|
|
614
613
|
}
|
|
615
614
|
showBusinessError(message, key = '', header = 'Lỗi', life = this._timeOut) {
|
|
@@ -1950,14 +1949,6 @@ class CommonService {
|
|
|
1950
1949
|
errorDetail: err
|
|
1951
1950
|
};
|
|
1952
1951
|
}
|
|
1953
|
-
tryParseJson(data) {
|
|
1954
|
-
try {
|
|
1955
|
-
return { valid: true, value: JSON.parse(data) };
|
|
1956
|
-
}
|
|
1957
|
-
catch (e) {
|
|
1958
|
-
return { valid: false, value: data };
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
1952
|
}
|
|
1962
1953
|
CommonService.ɵprov = ɵɵdefineInjectable({ factory: function CommonService_Factory() { return new CommonService(ɵɵinject(ModuleConfigService)); }, token: CommonService, providedIn: "root" });
|
|
1963
1954
|
CommonService.decorators = [
|
|
@@ -2792,12 +2783,7 @@ var EnumWorkflowCoreCodeSettingKey;
|
|
|
2792
2783
|
EnumWorkflowCoreCodeSettingKey["MAC_DINH"] = "workflowCoreTrinhKy";
|
|
2793
2784
|
EnumWorkflowCoreCodeSettingKey["PHE_DUYET_2_BUOC"] = "workflowCoreTrinhKy2Buoc";
|
|
2794
2785
|
EnumWorkflowCoreCodeSettingKey["PHE_DUYET_3_BUOC"] = "workflowCoreTrinhKy3Buoc";
|
|
2795
|
-
})(EnumWorkflowCoreCodeSettingKey || (EnumWorkflowCoreCodeSettingKey = {}));
|
|
2796
|
-
var EnumCoreVersion;
|
|
2797
|
-
(function (EnumCoreVersion) {
|
|
2798
|
-
EnumCoreVersion["V4"] = "V4";
|
|
2799
|
-
EnumCoreVersion["V5"] = "V5";
|
|
2800
|
-
})(EnumCoreVersion || (EnumCoreVersion = {}));
|
|
2786
|
+
})(EnumWorkflowCoreCodeSettingKey || (EnumWorkflowCoreCodeSettingKey = {}));
|
|
2801
2787
|
|
|
2802
2788
|
class ModelSchema {
|
|
2803
2789
|
constructor(init) {
|
|
@@ -2871,7 +2857,6 @@ class CrudListSetting {
|
|
|
2871
2857
|
this.function = new CrudListCustomFunction();
|
|
2872
2858
|
this.popupHeader = '';
|
|
2873
2859
|
this.popupSize = new PopupSize();
|
|
2874
|
-
this.showMenuButtons = true;
|
|
2875
2860
|
this.getCustomDataTrinhKy = (rowData) => ({});
|
|
2876
2861
|
this.getLabelButtonTrinhKy = (rowData) => 'Trình ký';
|
|
2877
2862
|
this.checkReadyToTrinhKy = () => true;
|
|
@@ -3136,7 +3121,6 @@ class FormControlBaseWithService extends FormControlBase {
|
|
|
3136
3121
|
this.fieldPlus = ''; // Danh sách những trường bổ sung cần lấy thêm ngoài id, ten; Ví dụ ,ma
|
|
3137
3122
|
this.fieldValueParent = 'value'; // Trường sử dụng để lấy dữ liệu làm khóa từ bảng cha của item drop down được chọn
|
|
3138
3123
|
this.fireCallBackInside = true;
|
|
3139
|
-
this.coreVersion = EnumCoreVersion.V5;
|
|
3140
3124
|
this.funcCompare = (item, value) => item[this.valueField] == value;
|
|
3141
3125
|
for (const key in init) {
|
|
3142
3126
|
this[key] = init[key];
|
|
@@ -3181,7 +3165,6 @@ class MaskControlSchema extends TextControlSchema {
|
|
|
3181
3165
|
this.prefix = '';
|
|
3182
3166
|
this.suffix = '';
|
|
3183
3167
|
this.decimalPlaces = 2;
|
|
3184
|
-
this.thousandSeperator = '.';
|
|
3185
3168
|
for (const key in init) {
|
|
3186
3169
|
this[key] = init[key];
|
|
3187
3170
|
}
|
|
@@ -3325,6 +3308,8 @@ class FileManagerControlSchema extends FormControlBase {
|
|
|
3325
3308
|
this.mode = FileManagerMode.multiple;
|
|
3326
3309
|
this.layout = EnumFileLayout.LIST;
|
|
3327
3310
|
this.readonly = false;
|
|
3311
|
+
this.signonly = false;
|
|
3312
|
+
this.uploadOnly = false;
|
|
3328
3313
|
// Trường hợp ở trong form, dùng trường này để lấy
|
|
3329
3314
|
// entityKey từ model.data thay vì truyền vào entityKey
|
|
3330
3315
|
this.entityKeyField = 'id';
|
|
@@ -3552,6 +3537,31 @@ class AddressControlSchema extends FormControlBase {
|
|
|
3552
3537
|
}
|
|
3553
3538
|
}
|
|
3554
3539
|
}
|
|
3540
|
+
class AddressNewControlSchema extends FormControlBase {
|
|
3541
|
+
constructor(init) {
|
|
3542
|
+
super();
|
|
3543
|
+
this.hideNo = false;
|
|
3544
|
+
this.hideStreet = false;
|
|
3545
|
+
this.hideWard = false;
|
|
3546
|
+
this.hideDistrict = false;
|
|
3547
|
+
this.requiredNo = true;
|
|
3548
|
+
this.requiredStreet = true;
|
|
3549
|
+
this.requiredWard = true;
|
|
3550
|
+
this.requiredDistrict = true;
|
|
3551
|
+
this.requiredProvince = true;
|
|
3552
|
+
this.wardToProvince = true;
|
|
3553
|
+
this.noWidth = 1;
|
|
3554
|
+
this.streetWidth = 3;
|
|
3555
|
+
this.wardWidth = 3;
|
|
3556
|
+
this.districtWidth = 2;
|
|
3557
|
+
this.provinceWidth = 3;
|
|
3558
|
+
this.showInBox = false;
|
|
3559
|
+
this.hideHolder = true;
|
|
3560
|
+
for (const key in init) {
|
|
3561
|
+
this[key] = init[key];
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3555
3565
|
class VanBanPickerControlSchema extends FormControlBase {
|
|
3556
3566
|
constructor(init) {
|
|
3557
3567
|
super();
|
|
@@ -3826,7 +3836,6 @@ var DataType;
|
|
|
3826
3836
|
DataType["decimal"] = "decimal";
|
|
3827
3837
|
DataType["boolean"] = "boolean";
|
|
3828
3838
|
DataType["enum"] = "enum";
|
|
3829
|
-
DataType["currency"] = "currency";
|
|
3830
3839
|
})(DataType || (DataType = {}));
|
|
3831
3840
|
var ControlType;
|
|
3832
3841
|
(function (ControlType) {
|
|
@@ -3907,35 +3916,7 @@ var ExportAllMode;
|
|
|
3907
3916
|
(function (ExportAllMode) {
|
|
3908
3917
|
ExportAllMode[ExportAllMode["ManualGetData"] = 0] = "ManualGetData";
|
|
3909
3918
|
ExportAllMode[ExportAllMode["AutoGetData"] = 1] = "AutoGetData";
|
|
3910
|
-
})(ExportAllMode || (ExportAllMode = {}));
|
|
3911
|
-
var EventType;
|
|
3912
|
-
(function (EventType) {
|
|
3913
|
-
EventType["CHANGE"] = "change";
|
|
3914
|
-
EventType["ADJUST_VALUE"] = "adjustValue";
|
|
3915
|
-
EventType["MODEL_CHANGED"] = "modelChanged";
|
|
3916
|
-
EventType["FORM_READY"] = "formReady";
|
|
3917
|
-
EventType["ENTER"] = "enter";
|
|
3918
|
-
EventType["HIDE"] = "hide";
|
|
3919
|
-
EventType["ROW_REORDER"] = "rowReorder";
|
|
3920
|
-
EventType["BLUR"] = "blur";
|
|
3921
|
-
EventType["READY"] = "READY";
|
|
3922
|
-
EventType["DATASOURCE_LOADED"] = "dataSourceLoaded";
|
|
3923
|
-
EventType["CLICK"] = "click";
|
|
3924
|
-
EventType["AUTO_CORRECT"] = "autoCorrect";
|
|
3925
|
-
EventType["VALIDATE"] = "validate";
|
|
3926
|
-
EventType["INIT"] = "init";
|
|
3927
|
-
EventType["ADDING"] = "adding";
|
|
3928
|
-
EventType["ADDED"] = "added";
|
|
3929
|
-
EventType["DELETING"] = "deleting";
|
|
3930
|
-
EventType["DELETED"] = "deleted";
|
|
3931
|
-
EventType["SELECT"] = "select";
|
|
3932
|
-
EventType["TABLE_CHANGED"] = "tableChanged";
|
|
3933
|
-
EventType["SAVE"] = "save";
|
|
3934
|
-
EventType["MESSAGE"] = "message";
|
|
3935
|
-
EventType["ROW_FINISH_INIT"] = "rowFinishInit";
|
|
3936
|
-
EventType["TABLE_FINISH_INIT"] = "tableFinishInit";
|
|
3937
|
-
EventType["UPLOADED"] = "uploaded";
|
|
3938
|
-
})(EventType || (EventType = {}));
|
|
3919
|
+
})(ExportAllMode || (ExportAllMode = {}));
|
|
3939
3920
|
|
|
3940
3921
|
var WorkflowCoreStatusEnum;
|
|
3941
3922
|
(function (WorkflowCoreStatusEnum) {
|
|
@@ -5164,24 +5145,14 @@ class CrudService {
|
|
|
5164
5145
|
if (model.hasOwnProperty(sourceField)) {
|
|
5165
5146
|
valueFilter = model[sourceField];
|
|
5166
5147
|
if (canAccessSubField(valueFilter)) {
|
|
5167
|
-
|
|
5168
|
-
valueFilter = valueFilter.map(x => x[subField]);
|
|
5169
|
-
}
|
|
5170
|
-
else {
|
|
5171
|
-
valueFilter = valueFilter[subField];
|
|
5172
|
-
}
|
|
5148
|
+
valueFilter = valueFilter[subField];
|
|
5173
5149
|
}
|
|
5174
5150
|
}
|
|
5175
5151
|
else if (rootModel) {
|
|
5176
5152
|
if (rootModel.hasOwnProperty(sourceField)) {
|
|
5177
5153
|
valueFilter = rootModel[sourceField];
|
|
5178
5154
|
if (canAccessSubField(valueFilter)) {
|
|
5179
|
-
|
|
5180
|
-
valueFilter = valueFilter.map(x => x[subField]);
|
|
5181
|
-
}
|
|
5182
|
-
else {
|
|
5183
|
-
valueFilter = valueFilter[subField];
|
|
5184
|
-
}
|
|
5155
|
+
valueFilter = valueFilter[subField];
|
|
5185
5156
|
}
|
|
5186
5157
|
}
|
|
5187
5158
|
else {
|
|
@@ -5197,12 +5168,7 @@ class CrudService {
|
|
|
5197
5168
|
}
|
|
5198
5169
|
}
|
|
5199
5170
|
if (canAccessSubField(temp)) {
|
|
5200
|
-
|
|
5201
|
-
valueFilter = temp.map(x => x[subField]);
|
|
5202
|
-
}
|
|
5203
|
-
else {
|
|
5204
|
-
valueFilter = temp[subField];
|
|
5205
|
-
}
|
|
5171
|
+
valueFilter = temp[subField];
|
|
5206
5172
|
}
|
|
5207
5173
|
}
|
|
5208
5174
|
}
|
|
@@ -5215,9 +5181,6 @@ class CrudService {
|
|
|
5215
5181
|
valueFilter = tmpFilter.funcGetValue(valueFilter);
|
|
5216
5182
|
}
|
|
5217
5183
|
tmpFilter.value = JSON.stringify(valueFilter);
|
|
5218
|
-
if (tmpFilter.modifyValue) {
|
|
5219
|
-
valueFilter = tmpFilter.modifyValue(valueFilter);
|
|
5220
|
-
}
|
|
5221
5184
|
tmpFilter.filters = [];
|
|
5222
5185
|
if (filter.logic && filter.filters) {
|
|
5223
5186
|
filter.filters.forEach(f => this.deQuyReplaceValue(tmpFilter.filters, f, model, rootModel));
|
|
@@ -5322,7 +5285,6 @@ class CrudService {
|
|
|
5322
5285
|
});
|
|
5323
5286
|
}
|
|
5324
5287
|
mergeRefDataToDatasource(dataSource, schema, data) {
|
|
5325
|
-
data !== null && data !== void 0 ? data : (data = []);
|
|
5326
5288
|
const field = schema.field;
|
|
5327
5289
|
let funcGetLabel = item => item[schema.displayField] || item['label'];
|
|
5328
5290
|
if (schema.funcGetLabel) {
|
|
@@ -5598,21 +5560,6 @@ class BaseService {
|
|
|
5598
5560
|
});
|
|
5599
5561
|
return this.postGridInfo(apiUrl, gridInfo);
|
|
5600
5562
|
}
|
|
5601
|
-
getAllByFilter(filters, fields = '', sorts = [], plusUrl = '') {
|
|
5602
|
-
let apiUrl = this.apiGetAll;
|
|
5603
|
-
if (plusUrl != null && plusUrl != '')
|
|
5604
|
-
apiUrl += `/${plusUrl}`;
|
|
5605
|
-
const gridInfo = new GridInfo({
|
|
5606
|
-
fields,
|
|
5607
|
-
pageInfo: {
|
|
5608
|
-
page: 1,
|
|
5609
|
-
pageSize: 9999
|
|
5610
|
-
},
|
|
5611
|
-
sorts,
|
|
5612
|
-
filters: filters ? filters : []
|
|
5613
|
-
});
|
|
5614
|
-
return this.postGridInfo(apiUrl, gridInfo);
|
|
5615
|
-
}
|
|
5616
5563
|
getAllByGridInfo(gridInfo, plusUrl = '') {
|
|
5617
5564
|
let apiUrl = this.apiGetAll;
|
|
5618
5565
|
if (plusUrl != null && plusUrl != '')
|
|
@@ -6191,10 +6138,10 @@ class FileExplorerService {
|
|
|
6191
6138
|
return `${this._serviceUri}/DownloadLink/${hash}`;
|
|
6192
6139
|
}
|
|
6193
6140
|
getDownloadForSignUrl(hash) {
|
|
6194
|
-
return `${this._serviceUri}/
|
|
6141
|
+
return `${this._serviceUri}/DownloadLink/downloadforsign/${hash}`;
|
|
6195
6142
|
}
|
|
6196
6143
|
generateLinkDownload(model) {
|
|
6197
|
-
const svUrl = `${this._serviceUri}/
|
|
6144
|
+
const svUrl = `${this._serviceUri}/DownloadLink/GenerateDownloadLink`;
|
|
6198
6145
|
if (model.isFileVersion && !model.fileVersionId) {
|
|
6199
6146
|
model.fileVersionId = model.fileId;
|
|
6200
6147
|
}
|
|
@@ -6221,7 +6168,7 @@ class FileExplorerService {
|
|
|
6221
6168
|
this._http.get(url, { responseType: 'blob' })
|
|
6222
6169
|
.toPromise()
|
|
6223
6170
|
.then(rs => {
|
|
6224
|
-
saveAs(rs, fileName);
|
|
6171
|
+
FileSaver.saveAs(rs, fileName);
|
|
6225
6172
|
})
|
|
6226
6173
|
.catch(err => {
|
|
6227
6174
|
this._notifierService.showWarning('Lỗi tải file');
|
|
@@ -6371,13 +6318,13 @@ class FileExplorerService {
|
|
|
6371
6318
|
return regex.test(ext);
|
|
6372
6319
|
}
|
|
6373
6320
|
saveSignedFile(data) {
|
|
6374
|
-
return this._http.post(`${this._serviceUri}/
|
|
6321
|
+
return this._http.post(`${this._serviceUri}/KySoFile/SaveSignedFile`, data).toPromise();
|
|
6375
6322
|
}
|
|
6376
6323
|
getSignatureInfoByFileId(fileId) {
|
|
6377
|
-
return this._http.get(`${this._serviceUri}/
|
|
6324
|
+
return this._http.get(`${this._serviceUri}/KySoFile/GetListSignatureByFileId?fileId=${fileId}`).toPromise();
|
|
6378
6325
|
}
|
|
6379
6326
|
getSignatureInfoByFileVersionId(fileVersionId) {
|
|
6380
|
-
return this._http.get(`${this._serviceUri}/
|
|
6327
|
+
return this._http.get(`${this._serviceUri}/KySoFile/GetListSignatureByFileVersionId?fileVersionId=${fileVersionId}`).toPromise();
|
|
6381
6328
|
}
|
|
6382
6329
|
getUploadFileVersionApiUrl() {
|
|
6383
6330
|
return `${this._serviceUri}/FileVersion/SaveVersionOnEdit`;
|
|
@@ -6427,6 +6374,20 @@ class FileExplorerService {
|
|
|
6427
6374
|
const svUrl = `${this._serviceUri}/FileObject/CreateServiceFileAnonymous`;
|
|
6428
6375
|
return this._http.post(svUrl, serviceFileObjectDTO).pipe(catchError((err) => this.handleError(err))).toPromise();
|
|
6429
6376
|
}
|
|
6377
|
+
needConvertBeforeSign(fileName) {
|
|
6378
|
+
if (fileName.lastIndexOf('.') === -1) {
|
|
6379
|
+
return false;
|
|
6380
|
+
}
|
|
6381
|
+
const fileType = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase();
|
|
6382
|
+
if ((/(doc|docx|dot|dotm|dotx|xls|xlsx|ppt|pptx)$/i).test(fileType)) {
|
|
6383
|
+
return true;
|
|
6384
|
+
}
|
|
6385
|
+
return false;
|
|
6386
|
+
}
|
|
6387
|
+
changeFileExtension(fileName, newExtension) {
|
|
6388
|
+
const arr = fileName.split('.');
|
|
6389
|
+
return fileName.replace(`.${arr[arr.length - 1]}`, `.${newExtension}`);
|
|
6390
|
+
}
|
|
6430
6391
|
}
|
|
6431
6392
|
FileExplorerService.ɵprov = ɵɵdefineInjectable({ factory: function FileExplorerService_Factory() { return new FileExplorerService(ɵɵinject(HttpClient), ɵɵinject(ModuleConfigService), ɵɵinject(AuthenService), ɵɵinject(CommonService), ɵɵinject(ModuleConfigService), ɵɵinject(NotifierService)); }, token: FileExplorerService, providedIn: "root" });
|
|
6432
6393
|
FileExplorerService.decorators = [
|
|
@@ -6815,6 +6776,9 @@ class DownloadLinkService extends BaseService {
|
|
|
6815
6776
|
});
|
|
6816
6777
|
return promise;
|
|
6817
6778
|
}
|
|
6779
|
+
getDownloadForSignUrl(hash) {
|
|
6780
|
+
return `${this.serviceUri}/DownloadForSign/${hash}`;
|
|
6781
|
+
}
|
|
6818
6782
|
}
|
|
6819
6783
|
DownloadLinkService.ɵprov = ɵɵdefineInjectable({ factory: function DownloadLinkService_Factory() { return new DownloadLinkService(ɵɵinject(HttpClient), ɵɵinject(INJECTOR), ɵɵinject(ModuleConfigService), ɵɵinject(CrudService), ɵɵinject(NotifierService)); }, token: DownloadLinkService, providedIn: "root" });
|
|
6820
6784
|
DownloadLinkService.decorators = [
|
|
@@ -7615,7 +7579,6 @@ class UserService extends BaseService {
|
|
|
7615
7579
|
}
|
|
7616
7580
|
else {
|
|
7617
7581
|
this._applicationContext.getRootContext().replaySubscribeOnce(ComCtxConstants.ROOT.USER_READY, rs => {
|
|
7618
|
-
const firstTimeLogin = rs;
|
|
7619
7582
|
const accessToken = this._oauthService.getAccessToken();
|
|
7620
7583
|
const decoded = JWT.default(accessToken);
|
|
7621
7584
|
// Chuyển đổi sang dùng instanceId nếu đăng nhập bằng identityv4 nhưng phải sử dụng base userOrgv5
|
|
@@ -7657,12 +7620,7 @@ class UserService extends BaseService {
|
|
|
7657
7620
|
localStorage.setItem(this.CURRENT_USER_KEY, JSON.stringify(user));
|
|
7658
7621
|
}
|
|
7659
7622
|
this._applicationContext.getRootContext().data.currentUser = user;
|
|
7660
|
-
|
|
7661
|
-
this._applicationContext.getRootContext().fireEvent(ComCtxConstants.ROOT.NEED_CLEAR_PERMISSION_CACHE);
|
|
7662
|
-
}
|
|
7663
|
-
else {
|
|
7664
|
-
this._applicationContext.getRootContext().fireReplayEvent(ComCtxConstants.ROOT.USER_LOADED, true);
|
|
7665
|
-
}
|
|
7623
|
+
this._applicationContext.getRootContext().fireReplayEvent(ComCtxConstants.ROOT.USER_LOADED, true);
|
|
7666
7624
|
}, err => {
|
|
7667
7625
|
});
|
|
7668
7626
|
});
|
|
@@ -8182,12 +8140,9 @@ class PermissionService extends BaseService {
|
|
|
8182
8140
|
this.delayCheckPermissions = [];
|
|
8183
8141
|
this.ignoreAdmin = false;
|
|
8184
8142
|
this.appCode = null;
|
|
8185
|
-
if (_moduleConfigService.getConfig().environment.authenticationSettings.coreVersion == 'v4') {
|
|
8186
|
-
this.serviceUri = `${_moduleConfigService.getConfig().environment.apiDomain.authorizationEndpoint}/permission`;
|
|
8187
|
-
}
|
|
8188
8143
|
this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.authorizationEndpoint;
|
|
8189
|
-
this.appCode = this._moduleConfigService.getConfig().appCode;
|
|
8190
8144
|
this.ignoreAdmin = this._moduleConfigService.getConfig().environment.isIgnoreAdmin;
|
|
8145
|
+
this.appCode = this._moduleConfigService.getConfig().appCode;
|
|
8191
8146
|
}
|
|
8192
8147
|
/**
|
|
8193
8148
|
* Truyền vào danh sách permision cần check
|
|
@@ -8322,10 +8277,6 @@ class PermissionService extends BaseService {
|
|
|
8322
8277
|
}
|
|
8323
8278
|
});
|
|
8324
8279
|
}
|
|
8325
|
-
clearPermissionCache(lstModule) {
|
|
8326
|
-
const url = `${this.serviceUri}/ClearPermissionCache`;
|
|
8327
|
-
return this.defaultPost(url, lstModule);
|
|
8328
|
-
}
|
|
8329
8280
|
}
|
|
8330
8281
|
PermissionService.ɵprov = ɵɵdefineInjectable({ factory: function PermissionService_Factory() { return new PermissionService(ɵɵinject(HttpClient), ɵɵinject(INJECTOR), ɵɵinject(ModuleConfigService), ɵɵinject(UserService), ɵɵinject(OAuthService), ɵɵinject(ApplicationContextService)); }, token: PermissionService, providedIn: "root" });
|
|
8331
8282
|
PermissionService.decorators = [
|
|
@@ -9447,14 +9398,14 @@ class EntityWorkflowHistoryService extends BaseService {
|
|
|
9447
9398
|
if (service == undefined) {
|
|
9448
9399
|
(this._injector.get(NotifierService)).showWarning('Bạn chưa đăng ký base service cho entity workflow history');
|
|
9449
9400
|
}
|
|
9450
|
-
this.serviceUri = `${service.endPoint}
|
|
9401
|
+
this.serviceUri = `${service.endPoint}/EntityWorkflowHistory`;
|
|
9451
9402
|
}
|
|
9452
9403
|
getLastHistory(tableName, filters = []) {
|
|
9453
9404
|
const service = this.serviceManagers[tableName];
|
|
9454
9405
|
if (service == undefined) {
|
|
9455
9406
|
(this._injector.get(NotifierService)).showWarning('Bạn chưa đăng ký base service cho entity workflow history');
|
|
9456
9407
|
}
|
|
9457
|
-
const url = `${service.endPoint}
|
|
9408
|
+
const url = `${service.endPoint}/EntityWorkflowHistory/GetLastByFilter`;
|
|
9458
9409
|
const gridInfo = {
|
|
9459
9410
|
pageInfo: {
|
|
9460
9411
|
page: 1,
|
|
@@ -11605,10 +11556,6 @@ class CrudFormComponent extends ComponentBase {
|
|
|
11605
11556
|
});
|
|
11606
11557
|
this.onModelChanged.emit(event);
|
|
11607
11558
|
}
|
|
11608
|
-
else {
|
|
11609
|
-
this._rootNode = new ControlTreeNode(this._modelData, this.formControls);
|
|
11610
|
-
this._rootNode.setCrudForm(this);
|
|
11611
|
-
}
|
|
11612
11559
|
}
|
|
11613
11560
|
;
|
|
11614
11561
|
ngOnInit() {
|
|
@@ -11891,6 +11838,9 @@ class CrudFormComponent extends ComponentBase {
|
|
|
11891
11838
|
else if (schema instanceof AddressControlSchema) {
|
|
11892
11839
|
this.controlNeedCheckReady.push(schema);
|
|
11893
11840
|
}
|
|
11841
|
+
else if (schema instanceof AddressNewControlSchema) {
|
|
11842
|
+
this.controlNeedCheckReady.push(schema);
|
|
11843
|
+
}
|
|
11894
11844
|
else if (schema instanceof RadioButtonListControlSchema) {
|
|
11895
11845
|
schema.fireCallBackInside = false;
|
|
11896
11846
|
}
|
|
@@ -12365,6 +12315,8 @@ class CrudFormComponent extends ComponentBase {
|
|
|
12365
12315
|
return 'datetimerange';
|
|
12366
12316
|
if (control instanceof AddressControlSchema)
|
|
12367
12317
|
return 'address';
|
|
12318
|
+
if (control instanceof AddressNewControlSchema)
|
|
12319
|
+
return 'address-new';
|
|
12368
12320
|
if (control instanceof DropdownControlSchema)
|
|
12369
12321
|
return 'dropdown';
|
|
12370
12322
|
if (control instanceof EditorControlSchema)
|
|
@@ -12467,6 +12419,8 @@ class CrudFormComponent extends ComponentBase {
|
|
|
12467
12419
|
return 'fileManager';
|
|
12468
12420
|
if (control instanceof AddressControlSchema)
|
|
12469
12421
|
return 'address';
|
|
12422
|
+
if (control instanceof AddressNewControlSchema)
|
|
12423
|
+
return 'address-new';
|
|
12470
12424
|
if (control instanceof TextControlSchema
|
|
12471
12425
|
&& (control.dataFormat === 'money'
|
|
12472
12426
|
|| control.dataFormat === 'moneyint')) {
|
|
@@ -12532,9 +12486,6 @@ class CrudFormComponent extends ComponentBase {
|
|
|
12532
12486
|
if (eventType == 'hide') {
|
|
12533
12487
|
yield this.handleFieldValueChange(control, event, 'change', parentModel, parentPath, sourceNode, bubble);
|
|
12534
12488
|
}
|
|
12535
|
-
else if (control.bindingFilters && eventType == 'change') {
|
|
12536
|
-
yield this.handleFieldValueChange(control, event, 'change', parentModel, parentPath, sourceNode, bubble);
|
|
12537
|
-
}
|
|
12538
12489
|
}
|
|
12539
12490
|
else {
|
|
12540
12491
|
yield this.handleFieldValueChange(control, event, eventType, parentModel, parentPath, sourceNode, bubble);
|
|
@@ -12716,6 +12667,7 @@ class CrudFormComponent extends ComponentBase {
|
|
|
12716
12667
|
if (control instanceof DropdownControlSchema
|
|
12717
12668
|
|| control instanceof RadioButtonListControlSchema
|
|
12718
12669
|
|| control instanceof AddressControlSchema
|
|
12670
|
+
|| control instanceof AddressNewControlSchema
|
|
12719
12671
|
|| control instanceof FileManagerControlSchema) {
|
|
12720
12672
|
if (!force && !parentNode.model._status[control.field].ready) {
|
|
12721
12673
|
return true;
|
|
@@ -13314,7 +13266,7 @@ class CrudFormComponent extends ComponentBase {
|
|
|
13314
13266
|
CrudFormComponent.decorators = [
|
|
13315
13267
|
{ type: Component, args: [{
|
|
13316
13268
|
selector: 'crud-form',
|
|
13317
|
-
template: "<div [class]=\"_styleClass\" style=\"padding: 0.5rem 0.5rem 0\">\r\n <form #formElement autocomplete=\"off\" autocorrect=\"off\" spellcheck=\"false\"\r\n [class]=\"'p-grid form-group crud-form' + (formClass ? ' ' + formClass : '')\"\r\n (keydown.shift.tab)=\"preventBlur($event)\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\">\r\n <ng-container *ngFor=\"let control of setting.schema\">\r\n <ng-container *ngIf=\"!isViewMode\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: {control: control, data: _modelData, parentPath: '', path: control.field, showLabel: control.showLabel, mdWidth: control.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"isViewMode\">\r\n <ng-container\r\n *ngTemplateOutlet=\"labelValueViewMode; context: {control: control, data: _modelData, parentPath: '', path: control.field, showLabel: control.showLabel, mdWidth: control.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\r\n<ng-template #labelValueViewMode let-data=\"data\" let-control=\"control\" let-path=\"path\" let-parentPath=\"parentPath\"\r\n let-showLabel=\"showLabel\" let-mdWidth=\"mdWidth\">\r\n <div *ngIf=\"!checkHidden(control, data, path)\"\r\n class=\"p-col-{{control.gWidth}} p-md-{{mdWidth}} {{control.class}} type-{{control.dataType}} view-mode\"\r\n [class.not-show-in-box-holder]=\"control.showInBox === false\"\r\n [class.show-in-box-holder]=\"control.showInBox === true\" [ngStyle]=\"control.style\">\r\n <div class=\"label\" *ngIf=\"showLabel && control.label\">\r\n <label [pTooltip]=\"control.fullLabel\" tooltipPosition=\"top\">{{control.label}}<span *ngIf=\"control.required\"\r\n class=\"star-required\">*</span></label>\r\n <span *ngIf=\"control.description\" class=\"control-description\">({{control.description}})</span>\r\n </div>\r\n <ng-container *ngIf=\"data[control.field] === null || data[control.field] === undefined\">\r\n <span class=\"no-value\"></span>\r\n </ng-container>\r\n <ng-container *ngIf=\"!(data[control.field] === null || data[control.field] === undefined)\">\r\n <ng-container [ngSwitch]=\"control.dataType\">\r\n <ng-container *ngSwitchCase=\"'container'\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\" [class.not-show-in-box]=\"!control.showInBox\"\r\n [class.show-in-box]=\"control.showInBox\" [ngStyle]=\"control.boxStyle\">\r\n <ng-container *ngFor=\"let subControl of control.controls\">\r\n <ng-container\r\n *ngTemplateOutlet=\"labelValueViewMode; context: {control: subControl, data: data[control.field], showLabel: control.showLabel, mdWidth: control.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fileManager'\">\r\n <file-manager [control]=\"control\" [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\"\r\n [rootFolderName]=\"control.rootFolderName || control.label\" [layout]=\"control.layout\"\r\n [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\" [readonly]=\"true\">\r\n </file-manager>\r\n </ng-container>\r\n <span *ngSwitchCase=\"'fileUpload'\">\r\n <file-upload [(ngModel)]=\"data[control.field]\" [sharedFolderType]=\"control.sharedFolderType\"\r\n [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\" [readonly]=\"true\"\r\n [accept]=\"control.accept\">\r\n </file-upload>\r\n </span>\r\n <span *ngSwitchCase=\"'serviceFileUpload'\">\r\n <service-file-upload [(ngModel)]=\"data[control.field]\" [parentContext]=\"context\"\r\n [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\" [control]=\"control\">\r\n </service-file-upload>\r\n </span>\r\n <ng-container *ngSwitchCase=\"'label'\">\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"!control.ishtml\"\r\n [attr.label-index]=\"control.indexLabel\" [pTooltip]=\"control.title\" tooltipPosition=\"top\"\r\n tooltipStyleClass=\"wrap\" [escape]=\"false\" [for]=\"control.for\">{{control.text |\r\n translate}}</label>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | safeHtml\"\r\n [attr.label-index]=\"control.indexLabel\"></label>\r\n </ng-container>\r\n <span *ngSwitchCase=\"'text'\">\r\n {{data[control.field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'money'\">\r\n {{data[control.field] | number}} VN\u0110\r\n </span>\r\n <span *ngSwitchCase=\"'date'\">\r\n {{data[control.field] | date:'dd/MM/yyyy'}}\r\n </span>\r\n <span *ngSwitchCase=\"'datetime'\">\r\n {{_crudService.renderDateTime(data[control.field], control.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'user'\">\r\n {{data[control.field] | userFormat | async}}\r\n </span>\r\n <span *ngSwitchCase=\"'hasDataSource'\">\r\n <span *ngIf=\"!control.freeText\">\r\n {{getItemInArrayByValue(data._source[control.field] || control.dataSource,\r\n data[control.field], control)}}\r\n </span>\r\n <span *ngIf=\"control.freeText\">\r\n {{getItemInArrayByTextValue(data._source[control.field] || control.dataSource,\r\n data[control.field])}}\r\n </span>\r\n </span>\r\n <span *ngSwitchCase=\"'colorPicker'\" class=\"show-color-control\"\r\n [ngStyle]=\"{ backgroundColor: data[control.field]}\">\r\n </span>\r\n <ng-container *ngSwitchCase=\"'spanControl'\">\r\n <span *ngIf=\"!control.ishtml\">{{data[control.sourceField]}}</span>\r\n <span *ngIf=\"control.ishtml\" [innerHTML]=\"data[control.sourceField]\"></span>\r\n </ng-container>\r\n <span *ngSwitchCase=\"'colorControl'\" class=\"show-color-control\"\r\n [ngStyle]=\"{ backgroundColor: data[control.sourceField]}\">\r\n </span>\r\n <span *ngSwitchCase=\"'boolean'\">\r\n <i class=\"{{data[control.field] | booleanFormat}}\"></i>\r\n </span>\r\n <span *ngSwitchCase=\"'html'\">\r\n <div [innerHTML]=\"data[control.field]\" *ngIf=\"data[control.field]==null?'':data[control.field]\">\r\n </div>\r\n </span>\r\n <span *ngSwitchCase=\"'mask'\">\r\n <tn-mask [viewMode]=\"true\" [prefix]=\"control.prefix\" [suffix]=\"control.suffix\"\r\n [disabled]=\"checkDisabled(data, control)\" [decimalPlaces]=\"control.decimalPlaces\"\r\n [maskType]=\"control.maskType\" [thousandSeperator]=\"control.thousandSeperator\" [(ngModel)]=\"data[control.field]\" [min]=\"control.min\"\r\n [max]=\"control.max\">\r\n </tn-mask>\r\n </span>\r\n <span *ngSwitchCase=\"'address'\">\r\n <address-picker [control]=\"control\" [showSubLabel]=\"control.showSubLabel\" [viewMode]=\"true\"\r\n [(data)]=\"data[control.field]\">\r\n </address-picker>\r\n </span>\r\n <span *ngSwitchCase=\"'numberrange'\">\r\n <tn-number-picker-range [decimalPlaces]=\"control.decimalPlaces\" [maskType]=\"control.maskType\"\r\n [(ngModel)]=\"data[control.field]\" [min]=\"control.min\" [max]=\"control.max\">\r\n </tn-number-picker-range>\r\n </span>\r\n <span *ngSwitchCase=\"'string'\">{{data[control.field]}}</span>\r\n <span *ngSwitchCase=\"'button'\">\r\n </span>\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div [class]=\"control.class\">\r\n <tn-custom-scrollbar class=\"--has-border\" [showScrollHorizontal]=\"true\">\r\n <p-table [value]=\"data[control.field]\" [columns]=\"control.headerTemplate\"\r\n [responsive]=\"true\" class=\"new-table scr-table table-control\">\r\n <ng-template *ngIf=\"getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"getComponentByType(_prefixCustomHeader + control.field), context: {$implicit: control.headerTemplate, crudForm: this, containerSticky: containerSticky}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngIf=\"control.showNumber\" style=\"text-align: center; width: 2.5rem\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate\">\r\n <th *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [pTooltip]=\"subControl.fullLabel || subControl.label\"\r\n tooltipPosition=\"top\" [style.width]=\"subControl.width\"\r\n style=\"text-align: center;\">\r\n {{subControl.label}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-ri=\"rowIndex\">\r\n <tr>\r\n <td style=\"text-align: center; padding-left: 0; padding-right: 0;\"\r\n *ngIf=\"control.showNumber\" class=\"stt\">\r\n <span style=\"padding: 12px 5px; display: inline-block;\">{{ri+1}}</span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate; let i = index\">\r\n <td *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n class=\"control-inside\" [style]=\"subControl.style\">\r\n <span class=\"p-column-title\">{{subControl.label}}</span>\r\n <ng-container\r\n *ngTemplateOutlet=\"labelValueViewMode; context: getContextTd(subControl, rowData, ri, path)\">\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </tn-custom-scrollbar>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(control.viewModedataType)\"\r\n [ngTemplateOutletContext]=\"{data: data, control: control, isViewMode: true}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #customControl let-data=\"data\" let-control=\"control\" let-showLabel=\"showLabel\" let-mdWidth=\"mdWidth\"\r\n let-rowIndex=\"index\" let-path=\"path\" let-parentPath=\"parentPath\" let-tablePath=\"tablePath\">\r\n <div *ngIf=\"!checkHidden(control, data, path)\" id=\"{{path}}-holder\"\r\n class=\"p-col-{{control.gWidth}} p-md-{{mdWidth}} {{control.class}} crud-form-control type-{{control.dataType}}\"\r\n [class.error]=\"data._errors[control.field].length > 0\"\r\n [class.not-show-in-box-holder]=\"control.showInBox === false\"\r\n [class.show-in-box-holder]=\"control.showInBox === true\" [ngStyle]=\"control.style\">\r\n <div class=\"label\" *ngIf=\"showLabel\">\r\n <label *ngIf=\"control.label\" [pTooltip]=\"control.fullLabel\" tooltipPosition=\"top\">{{control.label}}\r\n <span *ngIf=\"control.required\" class=\"star-required\">*</span></label>\r\n <span *ngIf=\"control.description\" class=\"control-description\">({{control.description}})</span>\r\n </div>\r\n <ng-container [ngSwitch]=\"control.controlType\">\r\n <ng-container *ngSwitchCase=\"'label'\">\r\n <ng-container [ngTemplateOutlet]=\"labelControl\"\r\n [ngTemplateOutletContext]=\"{control: control, data: data}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'title'\">\r\n <label *ngIf=\"!control.ishtml\" [for]=\"control.for\">{{control.text | translate}}</label>\r\n <label *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | translate\"></label>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div class=\"p-inputgroup\" *ngIf=\"control.suffFix\">\r\n <input (focus)=\"onFocusTextControl($event)\" [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"data._status[control.field].disabled === true || (data._status[control.field].disabled === undefined && control.disabled) ? true : null\"\r\n pInputText [type]=\"control.dataFormat\" [(ngModel)]=\"data[control.field]\" [max]=\"control.max\"\r\n [min]=\"control.min\" [maxlength]=\"control.maxLength\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (key.enter)=\"handleFieldValueChange(control, $event, 'enter', data, parentPath)\" />\r\n <span class=\"p-inputgroup-addon\">({{control.suffFix}})</span>\r\n </div>\r\n <input *ngIf=\"!control.suffFix\" (focus)=\"onFocusTextControl($event)\" [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"data._status[control.field].disabled === true || (data._status[control.field].disabled === undefined && control.disabled) ? true : null\"\r\n pInputText [type]=\"control.dataFormat\" [(ngModel)]=\"data[control.field]\" [max]=\"control.max\"\r\n [min]=\"control.min\" [maxlength]=\"control.maxLength\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (key.enter)=\"handleFieldValueChange(control, $event, 'enter', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'template'\">\r\n <ng-container [ngTemplateOutlet]=\"control.template\"\r\n [ngTemplateOutletContext]=\"{$implicit: _rootNode, control: control, data: data, tablePath: tablePath, parentPath: parentPath, rowIndex: rowIndex, funcUpdateModel: updateModelFromExternal}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <tn-mask [prefix]=\"control.prefix\" [decimalPlaces]=\"control.decimalPlaces\" [suffix]=\"control.suffix\"\r\n [placeholder]=\"control.placeholder\" [disabled]=\"checkDisabled(data, control)\"\r\n [maskType]=\"control.maskType\" [min]=\"control.min\" [max]=\"control.max\" [thousandSeperator]=\"control.thousandSeperator\"\r\n [(ngModel)]=\"data[control.field]\" (onFocus)=\"onFocusTextControl($event)\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'numberrange'\">\r\n <tn-number-picker-range [decimalPlaces]=\"control.decimalPlaces\"\r\n [disabled]=\"checkDisabled(data, control)\" [maskType]=\"control.maskType\"\r\n [(ngModel)]=\"data[control.field]\" [min]=\"control.min\" [max]=\"control.max\"\r\n (search)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (blur)=\"handleFieldValueChange(control, $event, 'blur', data, parentPath)\">\r\n </tn-number-picker-range>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'money'\">\r\n <input currencyMask\r\n [attr.disabled]=\"data._status[control.field].disabled === true || (data._status[control.field].disabled === undefined && control.disabled) ? true : null\"\r\n pInputText type=\"tel\" [(ngModel)]=\"data[control.field]\"\r\n [options]=\"{prefix: '', thousands: '.', decimal: ',',precision:control.dataFormat === 'money'?0:0 }\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (focus)=\"onFocusTextControl($event)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'phoneOrfax'\">\r\n <input [placeholder]=\"control.dataFormat==='phone'?'(999) 999-9999':'999-999-9999'\"\r\n [attr.disabled]=\"data._status[control.field].disabled === true || (data._status[control.field].disabled === undefined && control.disabled) ? true : null\"\r\n type=\"tel\" pInputText [(ngModel)]=\"data[control.field]\" (focus)=\"onFocusTextControl($event)\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'textarea'\">\r\n <textarea pInputTextarea (focus)=\"onFocusTextControl($event)\" [rows]=\"control.rows ? control.rows : 5\"\r\n [attr.disabled]=\"data._status[control.field].disabled === true || (data._status[control.field].disabled === undefined && control.disabled) ? true : null\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></textarea>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'editor'\">\r\n <tn-tinymce [(ngModel)]=\"data[control.field]\"\r\n [required]=\"control.validators && control.validators.required\" [mode]=\"control.mode\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n [height]=\"control.height ? control.height : 250\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\">\r\n </tn-tinymce>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <datetime-picker [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </datetime-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n <app-autocomplete-datasource [control]=\"control\" [(ngModel)]=\"data[control.field]\"\r\n [suggestions]=\"data._source[control.field] || control.dataSource\"\r\n (onValueChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </app-autocomplete-datasource>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetimerange'\">\r\n <tn-datetime-picker-range [(ngModel)]=\"data[control.field]\" [disabled]=\"control.disabled\"\r\n [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-datetime-picker-range>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <dropdown [control]=\"control\" [dataSource]=\"getControlDataSource(control, data)\"\r\n [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleChangeDropdown(control, $event, 'change', data, parentPath)\"\r\n (onHideSmartEvent)=\"handleChangeDropdown(control, $event, 'hide', data, parentPath)\"\r\n (adjustValue)=\"handleAdjustValueDropdownEvent(control, parentPath)\"\r\n (onDataSourceLoaded)=\"handleDataSourceLoaded(control, parentPath, $event)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fileManager'\">\r\n <file-manager [control]=\"control\" [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\" [readonly]=\"control.disabled\"\r\n [rootFolderName]=\"control.rootFolderName || control.label\" [layout]=\"control.layout\"\r\n [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\"\r\n [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </file-manager>\r\n </ng-container>\r\n <span *ngSwitchCase=\"'fileUpload'\">\r\n <file-upload [(ngModel)]=\"data[control.field]\" [sharedFolderType]=\"control.sharedFolderType\"\r\n [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n [readonly]=\"control.readonly\" [accept]=\"control.accept\">\r\n </file-upload>\r\n </span>\r\n <span *ngSwitchCase=\"'serviceFileUpload'\">\r\n <service-file-upload [(ngModel)]=\"data[control.field]\" [parentContext]=\"context\"\r\n [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\" [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </service-file-upload>\r\n </span>\r\n <ng-container *ngSwitchCase=\"'user-picker'\">\r\n <user-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\" [multiple]=\"control.multiple\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </user-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <p-inputSwitch [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-inputSwitch>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <div [class]=\"control.class\" role=\"checkbox-alone\">\r\n <p-checkbox [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n [label]=\"!control.hiddenLabel ? control.checkboxLabel ? control.checkboxLabel : control.label : null\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" binary=\"true\">\r\n </p-checkbox>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <button type=\"button\" pButton [class]=\"control.btClass\" [icon]=\"control.icon\"\r\n [label]=\"control.label | translate\" [ngStyle]=\"control.btStyle\"\r\n (click)=\"handleButtonClick(control, $event, parentPath)\"></button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'container'\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\" [class.not-show-in-box]=\"!control.showInBox\"\r\n [class.show-in-box]=\"control.showInBox\" [ngStyle]=\"control.boxStyle\">\r\n <ng-container *ngFor=\"let subControl of control.controls\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: {control: subControl, data: data[control.field], parentPath: path, rowIndex: rowIndex, path: path + '.' + subControl.field, showLabel: subControl.showLabel, mdWidth: subControl.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkboxlist'\">\r\n <check-box-list [control]=\"control\" [dataSource]=\"data._source[control.field] || control.dataSource\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </check-box-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'radiobuttonlist'\">\r\n <radio-button-list [control]=\"control\" [dataSource]=\"control.dataSource\"\r\n [disabled]=\"checkDisabled(data, control)\" [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (adjustValue)=\"handleAdjustValueDropdownEvent(control, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\"\r\n (onDataSourceLoaded)=\"handleDataSourceLoaded(control, parentPath, $event)\">\r\n </radio-button-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'colorPicker'\">\r\n <tn-color-picker [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-color-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'spanControl'\">\r\n <span *ngIf=\"!control.ishtml\">{{data[control.field]}}</span>\r\n <span *ngIf=\"control.ishtml\" [innerHTML]=\"data[control.field]\"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'colorControl'\">\r\n <span class=\"show-color-control\" [ngStyle]=\"{ backgroundColor: data[control.sourceField]}\"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'address'\">\r\n <address-picker [control]=\"control\" [showSubLabel]=\"control.showSubLabel\"\r\n [disabled]=\"checkDisabled(data, control)\" [(data)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </address-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete-picker'\">\r\n <autocomplete-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [parentPath]=\"parentPath\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </autocomplete-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'entity-picker'\">\r\n <entity-picker [control]=\"control\" [children]=\"children\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </entity-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'cocautochuc'\">\r\n <cocautochuc-picker [control]=\"control\" [parentOrgId]=\"control.parentOrgId\"\r\n [disabled]=\"checkDisabled(data, control)\" [parentOrgCode]=\"control.parentOrgCode\"\r\n [filter]=\"control.filter\" [multiple]=\"control.multiple\" [required]=\"control.required\"\r\n [isUsingId]=\"control.isUsingId\" [disabledParentItem]=\"control.disabledParentItem\"\r\n [rootParentId]=\"control.rootParentId\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </cocautochuc-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'cocautochuc-picker'\">\r\n <cocautochuc-picker-list [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </cocautochuc-picker-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'vanban'\">\r\n <vanban-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </vanban-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'congviec'\">\r\n <div>\r\n <congviec-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </congviec-picker>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div [class]=\"control.class\">\r\n <tn-custom-scrollbar class=\"--has-border\" [showScrollHorizontal]=\"true\">\r\n <p-table [value]=\"data[control.field]\" [columns]=\"control.headerTemplate\" [responsive]=\"true\"\r\n class=\"new-table scr-table table-control\" [rowTrackBy]=\"trackByFuncId\"\r\n (onRowReorder)=\"handleRowOrdered(control, $event, 'rowReorder', data, parentPath)\">\r\n <ng-template *ngIf=\"getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"getComponentByType(_prefixCustomHeader + control.field), context: {$implicit: control.headerTemplate, crudForm: this, containerSticky: containerSticky}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-rowData let-columns>\r\n <tr>\r\n <th *ngIf=\"control.showNumber\" style=\"text-align: center; width: 2.5rem\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate\">\r\n <th *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [pTooltip]=\"subControl.fullLabel || subControl.label\" tooltipPosition=\"top\"\r\n [style.width]=\"subControl.width\" style=\"text-align: center;\">\r\n {{subControl.label}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"control.enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"control.showFunction\"\r\n [style.width]=\"getTableFunctionColumnWidth(control)\"\r\n class=\"table-function column-function\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-ri=\"rowIndex\">\r\n <tr [pReorderableRow]=\"ri\">\r\n <td style=\"text-align: center; padding-left: 0; padding-right: 0;\"\r\n *ngIf=\"control.showNumber\" class=\"stt\">\r\n <span style=\"padding: 12px 5px; display: inline-block;\">{{ri+1}}</span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate; let i = index\">\r\n <td *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [class.control-inside]=\"true\" [class]=\"subControl.class\">\r\n <span class=\"p-column-title\">{{subControl.label}}</span>\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: getContextTd(subControl, rowData, ri, path)\">\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n <td *ngIf=\"control.enableReorderRow\" class=\"no-padding center v-center\">\r\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\"\r\n pReorderableRowHandle></i>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <td style=\"text-align:center\" *ngIf=\"control.showFunction\" class=\"column-function\">\r\n <div class=\"p-toolbar-group-center button-group\">\r\n <button *ngIf=\"control.showSave\" [disabled]=\"rowData._disableSave\"\r\n type=\"button\" pButton class=\"p-button-text\" icon=\"pi pi-save\"\r\n [pTooltip]=\"'L\u01B0u' | translate\" tooltipPosition=\"top\"\r\n style=\"width: 2.143em;\" (click)=\"saveRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showEdit\" [disabled]=\"rowData._disableEdit\"\r\n type=\"button\" pButton class=\"p-button-text\" icon=\"pi pi-pencil\"\r\n [pTooltip]=\"'S\u1EEDa' | translate\" tooltipPosition=\"top\"\r\n style=\"width: 2.143em;\" (click)=\"editRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showDelete\" [disabled]=\"rowData._disableDelete\"\r\n type=\"button\" pButton class=\"p-button-text p-button-danger\"\r\n icon=\"pi pi-trash\" [pTooltip]=\"'X\u00F3a' | translate\" tooltipPosition=\"top\"\r\n style=\"width: 2.143em;\" (click)=\"deleteRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.rowButtons\" type=\"button\" pButton\r\n icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\"\r\n pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData, control)\"></button>\r\n <!-- <button *ngFor=\"let bt of control.rowButtons\" type=\"button\" pButton\r\n [class]=\"bt.class\" [icon]=\"bt.icon\" [pTooltip]=\"bt.label | translate\"\r\n tooltipPosition=\"top\" style=\"width: 2.143em;\"\r\n (click)=\"messageRow(ri, control, path)\"></button> -->\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"control.showFooter\" class=\"--table-schema-footer\">\r\n <button *ngIf=\"control.showAdd\" type=\"button\" pButton style=\"width:auto\" label=\"Th\u00EAm m\u1EDBi\"\r\n icon=\"pi pi-plus\" class=\"p-button-text\" (click)=\"addNewRow(control, path)\"></button>\r\n <span style=\"font-weight: normal;\">\r\n <p-checkbox label=\"M\u1EDF dialog\" [binary]=\"true\" [(ngModel)]=\"control.showEdit\">\r\n </p-checkbox>\r\n </span>\r\n <button *ngIf=\"control.enableAddMulti\" type=\"button\" pButton\r\n style=\"width:auto; margin-left:10px;\" label=\"Th\u00EAm nhi\u1EC1u\" icon=\"pi pi-clone\"\r\n class=\"p-button-text\" (click)=\"addMultiRow(control, 5, path)\"></button>\r\n <button *ngFor=\"let bt of control.footerButtons\" type=\"button\" pButton [class]=\"bt.class\"\r\n [icon]=\"bt.icon\" [label]=\"bt.label | translate\" style=\"width:auto; margin-left:10px;\"\r\n (click)=\"messageRow( -1, control, path)\"></button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(control.field)\"\r\n [ngTemplateOutletContext]=\"{crudForm: this, data: data, index: rowIndex, parentPath: parentPath, control: control, changeFunc: handleFieldValueChange}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"validation; context: {control: control, data: data}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #validation let-control=\"control\" let-data=\"data\">\r\n <ng-container *ngIf=\"data._errors[control.field].length > 0\">\r\n <div class=\"error-container\">\r\n <ng-container *ngFor=\"let error of data._errors[control.field]\">\r\n <div class=\"error-item\" *ngIf=\"error\">\r\n <ng-container [ngTemplateOutlet]=\"errorMessage\" [ngTemplateOutletContext]=\"{content: error}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #errorMessage let-content=\"content\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-ban\"></i>\r\n <span> {{content}}</span>\r\n </div>\r\n</ng-template>\r\n<ng-template #labelControl let-control=\"control\">\r\n <ng-container>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"!control.ishtml\" [attr.label-index]=\"control.indexLabel\"\r\n [pTooltip]=\"control.title\" tooltipPosition=\"top\" tooltipStyleClass=\"wrap\" [escape]=\"false\"\r\n [for]=\"control.for\">{{control.text | translate}}</label>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | safeHtml\"\r\n [attr.label-index]=\"control.indexLabel\"></label>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<tn-dialog *ngIf=\"tableFormShow\" #dialog [styleClass]=\"'address-form'\" [header]=\"tableFormTitle | translate\"\r\n [popupSize]=\"tableFormPopupSize\" (onHide)=\"tableFormShow = false\">\r\n <table-detail-form #formBase [parentSetting]=\"setting\" [schema]=\"tableFormSchema\" [data]=\"tableFormData\"\r\n (onSaved)=\"handleSavedTableRow($event)\" (onCancel)=\"tableFormShow = false\">\r\n </table-detail-form>\r\n</tn-dialog>\r\n",
|
|
13269
|
+
template: "<div [class]=\"_styleClass\" style=\"padding: 0.5rem 0.5rem 0\">\r\n <form #formElement autocomplete=\"off\" autocorrect=\"off\" spellcheck=\"false\"\r\n [class]=\"'p-grid form-group crud-form' + (formClass ? ' ' + formClass : '')\"\r\n (keydown.shift.tab)=\"preventBlur($event)\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\">\r\n <ng-container *ngFor=\"let control of setting.schema\">\r\n <ng-container *ngIf=\"!isViewMode\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: {control: control, data: _modelData, parentPath: '', path: control.field, showLabel: control.showLabel, mdWidth: control.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"isViewMode\">\r\n <ng-container\r\n *ngTemplateOutlet=\"labelValueViewMode; context: {control: control, data: _modelData, parentPath: '', path: control.field, showLabel: control.showLabel, mdWidth: control.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </form>\r\n</div>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\r\n<ng-template #labelValueViewMode let-data=\"data\" let-control=\"control\" let-path=\"path\" let-parentPath=\"parentPath\"\r\n let-showLabel=\"showLabel\" let-mdWidth=\"mdWidth\">\r\n <div *ngIf=\"!checkHidden(control, data, path)\"\r\n class=\"p-col-{{control.gWidth}} p-md-{{mdWidth}} {{control.class}} type-{{control.dataType}} view-mode\"\r\n [class.not-show-in-box-holder]=\"control.showInBox === false\"\r\n [class.show-in-box-holder]=\"control.showInBox === true\" [ngStyle]=\"control.style\">\r\n <div class=\"label\" *ngIf=\"showLabel && control.label\">\r\n <label [pTooltip]=\"control.fullLabel\" tooltipPosition=\"top\">{{control.label}}<span *ngIf=\"control.required\"\r\n class=\"star-required\">*</span></label>\r\n <span *ngIf=\"control.description\" class=\"control-description\">({{control.description}})</span>\r\n </div>\r\n <ng-container *ngIf=\"data[control.field] === null || data[control.field] === undefined\">\r\n <span class=\"no-value\"></span>\r\n </ng-container>\r\n <ng-container *ngIf=\"!(data[control.field] === null || data[control.field] === undefined)\">\r\n <ng-container [ngSwitch]=\"control.dataType\">\r\n <ng-container *ngSwitchCase=\"'container'\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\" [class.not-show-in-box]=\"!control.showInBox\"\r\n [class.show-in-box]=\"control.showInBox\" [ngStyle]=\"control.boxStyle\">\r\n <ng-container *ngFor=\"let subControl of control.controls\">\r\n <ng-container\r\n *ngTemplateOutlet=\"labelValueViewMode; context: {control: subControl, data: data[control.field], showLabel: control.showLabel, mdWidth: control.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fileManager'\">\r\n <file-manager [control]=\"control\" [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\"\r\n [rootFolderName]=\"control.rootFolderName || control.label\" [layout]=\"control.layout\"\r\n [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\" [readonly]=\"true\">\r\n </file-manager>\r\n </ng-container>\r\n <span *ngSwitchCase=\"'fileUpload'\">\r\n <file-upload [(ngModel)]=\"data[control.field]\" [sharedFolderType]=\"control.sharedFolderType\"\r\n [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\" [readonly]=\"true\"\r\n [accept]=\"control.accept\">\r\n </file-upload>\r\n </span>\r\n <span *ngSwitchCase=\"'serviceFileUpload'\">\r\n <service-file-upload [(ngModel)]=\"data[control.field]\" [parentContext]=\"context\"\r\n [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\" [control]=\"control\">\r\n </service-file-upload>\r\n </span>\r\n <ng-container *ngSwitchCase=\"'label'\">\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"!control.ishtml\"\r\n [attr.label-index]=\"control.indexLabel\" [pTooltip]=\"control.title\" tooltipPosition=\"top\"\r\n tooltipStyleClass=\"wrap\" [escape]=\"false\" [for]=\"control.for\">{{control.text |\r\n translate}}</label>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | safeHtml\"\r\n [attr.label-index]=\"control.indexLabel\"></label>\r\n </ng-container>\r\n <span *ngSwitchCase=\"'text'\">\r\n {{data[control.field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'money'\">\r\n {{data[control.field] | number}} VN\u0110\r\n </span>\r\n <span *ngSwitchCase=\"'date'\">\r\n {{data[control.field] | date:'dd/MM/yyyy'}}\r\n </span>\r\n <span *ngSwitchCase=\"'datetime'\">\r\n {{_crudService.renderDateTime(data[control.field], control.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'user'\">\r\n {{data[control.field] | userFormat | async}}\r\n </span>\r\n <span *ngSwitchCase=\"'hasDataSource'\">\r\n <span *ngIf=\"!control.freeText\">\r\n {{getItemInArrayByValue(data._source[control.field] || control.dataSource,\r\n data[control.field], control)}}\r\n </span>\r\n <span *ngIf=\"control.freeText\">\r\n {{getItemInArrayByTextValue(data._source[control.field] || control.dataSource,\r\n data[control.field])}}\r\n </span>\r\n </span>\r\n <span *ngSwitchCase=\"'colorPicker'\" class=\"show-color-control\"\r\n [ngStyle]=\"{ backgroundColor: data[control.field]}\">\r\n </span>\r\n <ng-container *ngSwitchCase=\"'spanControl'\">\r\n <span *ngIf=\"!control.ishtml\">{{data[control.sourceField]}}</span>\r\n <span *ngIf=\"control.ishtml\" [innerHTML]=\"data[control.sourceField]\"></span>\r\n </ng-container>\r\n <span *ngSwitchCase=\"'colorControl'\" class=\"show-color-control\"\r\n [ngStyle]=\"{ backgroundColor: data[control.sourceField]}\">\r\n </span>\r\n <span *ngSwitchCase=\"'boolean'\">\r\n <i class=\"{{data[control.field] | booleanFormat}}\"></i>\r\n </span>\r\n <span *ngSwitchCase=\"'html'\">\r\n <div [innerHTML]=\"data[control.field]\" *ngIf=\"data[control.field]==null?'':data[control.field]\">\r\n </div>\r\n </span>\r\n <span *ngSwitchCase=\"'mask'\">\r\n <tn-mask [viewMode]=\"true\" [prefix]=\"control.prefix\" [suffix]=\"control.suffix\"\r\n [disabled]=\"checkDisabled(data, control)\" [decimalPlaces]=\"control.decimalPlaces\"\r\n [maskType]=\"control.maskType\" [(ngModel)]=\"data[control.field]\" [min]=\"control.min\"\r\n [max]=\"control.max\">\r\n </tn-mask>\r\n </span>\r\n <span *ngSwitchCase=\"'address'\">\r\n <address-picker [control]=\"control\" [showSubLabel]=\"control.showSubLabel\" [viewMode]=\"true\"\r\n [(data)]=\"data[control.field]\">\r\n </address-picker>\r\n </span>\r\n <span *ngSwitchCase=\"'address-new'\">\r\n <address-new-picker [control]=\"control\" [showSubLabel]=\"control.showSubLabel\" [viewMode]=\"true\"\r\n [(data)]=\"data[control.field]\">\r\n </address-new-picker>\r\n </span>\r\n <span *ngSwitchCase=\"'numberrange'\">\r\n <tn-number-picker-range [decimalPlaces]=\"control.decimalPlaces\" [maskType]=\"control.maskType\"\r\n [(ngModel)]=\"data[control.field]\" [min]=\"control.min\" [max]=\"control.max\">\r\n </tn-number-picker-range>\r\n </span>\r\n <span *ngSwitchCase=\"'string'\">{{data[control.field]}}</span>\r\n <span *ngSwitchCase=\"'button'\">\r\n </span>\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div [class]=\"control.class\">\r\n <tn-custom-scrollbar class=\"--has-border\" [showScrollHorizontal]=\"true\">\r\n <p-table [value]=\"data[control.field]\" [columns]=\"control.headerTemplate\"\r\n [responsive]=\"true\" class=\"new-table scr-table table-control\">\r\n <ng-template *ngIf=\"getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"getComponentByType(_prefixCustomHeader + control.field), context: {$implicit: control.headerTemplate, crudForm: this, containerSticky: containerSticky}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngIf=\"control.showNumber\" style=\"text-align: center; width: 2.5rem\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate\">\r\n <th *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [pTooltip]=\"subControl.fullLabel || subControl.label\"\r\n tooltipPosition=\"top\" [style.width]=\"subControl.width\"\r\n style=\"text-align: center;\">\r\n {{subControl.label}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-ri=\"rowIndex\">\r\n <tr>\r\n <td style=\"text-align: center; padding-left: 0; padding-right: 0;\"\r\n *ngIf=\"control.showNumber\" class=\"stt\">\r\n <span style=\"padding: 12px 5px; display: inline-block;\">{{ri+1}}</span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate; let i = index\">\r\n <td *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n class=\"control-inside\" [style]=\"subControl.style\">\r\n <span class=\"p-column-title\">{{subControl.label}}</span>\r\n <ng-container\r\n *ngTemplateOutlet=\"labelValueViewMode; context: getContextTd(subControl, rowData, ri, path)\">\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </tn-custom-scrollbar>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(control.viewModedataType)\"\r\n [ngTemplateOutletContext]=\"{data: data, control: control, isViewMode: true}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #customControl let-data=\"data\" let-control=\"control\" let-showLabel=\"showLabel\" let-mdWidth=\"mdWidth\"\r\n let-rowIndex=\"index\" let-path=\"path\" let-parentPath=\"parentPath\" let-tablePath=\"tablePath\">\r\n <div *ngIf=\"!checkHidden(control, data, path)\" id=\"{{path}}-holder\"\r\n class=\"p-col-{{control.gWidth}} p-md-{{mdWidth}} {{control.class}} crud-form-control type-{{control.dataType}}\"\r\n [class.error]=\"data._errors[control.field].length > 0\"\r\n [class.not-show-in-box-holder]=\"control.showInBox === false\"\r\n [class.show-in-box-holder]=\"control.showInBox === true\" [ngStyle]=\"control.style\">\r\n <div class=\"label\" *ngIf=\"showLabel\">\r\n <label *ngIf=\"control.label\" [pTooltip]=\"control.fullLabel\" tooltipPosition=\"top\">{{control.label}}\r\n <span *ngIf=\"control.required\" class=\"star-required\">*</span></label>\r\n <span *ngIf=\"control.description\" class=\"control-description\">({{control.description}})</span>\r\n </div>\r\n <ng-container [ngSwitch]=\"control.controlType\">\r\n <ng-container *ngSwitchCase=\"'label'\">\r\n <ng-container [ngTemplateOutlet]=\"labelControl\"\r\n [ngTemplateOutletContext]=\"{control: control, data: data}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'title'\">\r\n <label *ngIf=\"!control.ishtml\" [for]=\"control.for\">{{control.text | translate}}</label>\r\n <label *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | translate\"></label>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div class=\"p-inputgroup\" *ngIf=\"control.suffFix\">\r\n <input (focus)=\"onFocusTextControl($event)\" [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"data._status[control.field].disabled === true || (data._status[control.field].disabled === undefined && control.disabled) ? true : null\"\r\n pInputText [type]=\"control.dataFormat\" [(ngModel)]=\"data[control.field]\" [max]=\"control.max\"\r\n [min]=\"control.min\" [maxlength]=\"control.maxLength\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (key.enter)=\"handleFieldValueChange(control, $event, 'enter', data, parentPath)\" />\r\n <span class=\"p-inputgroup-addon\">({{control.suffFix}})</span>\r\n </div>\r\n <input *ngIf=\"!control.suffFix\" (focus)=\"onFocusTextControl($event)\" [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"data._status[control.field].disabled === true || (data._status[control.field].disabled === undefined && control.disabled) ? true : null\"\r\n pInputText [type]=\"control.dataFormat\" [(ngModel)]=\"data[control.field]\" [max]=\"control.max\"\r\n [min]=\"control.min\" [maxlength]=\"control.maxLength\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (key.enter)=\"handleFieldValueChange(control, $event, 'enter', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'template'\">\r\n <ng-container [ngTemplateOutlet]=\"control.template\"\r\n [ngTemplateOutletContext]=\"{$implicit: _rootNode, control: control, data: data, tablePath: tablePath, parentPath: parentPath, rowIndex: rowIndex, funcUpdateModel: updateModelFromExternal}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'mask'\">\r\n <tn-mask [prefix]=\"control.prefix\" [decimalPlaces]=\"control.decimalPlaces\" [suffix]=\"control.suffix\"\r\n [placeholder]=\"control.placeholder\" [disabled]=\"checkDisabled(data, control)\"\r\n [maskType]=\"control.maskType\" [min]=\"control.min\" [max]=\"control.max\"\r\n [(ngModel)]=\"data[control.field]\" (onFocus)=\"onFocusTextControl($event)\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'numberrange'\">\r\n <tn-number-picker-range [decimalPlaces]=\"control.decimalPlaces\"\r\n [disabled]=\"checkDisabled(data, control)\" [maskType]=\"control.maskType\"\r\n [(ngModel)]=\"data[control.field]\" [min]=\"control.min\" [max]=\"control.max\"\r\n (search)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (blur)=\"handleFieldValueChange(control, $event, 'blur', data, parentPath)\">\r\n </tn-number-picker-range>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'money'\">\r\n <input currencyMask\r\n [attr.disabled]=\"data._status[control.field].disabled === true || (data._status[control.field].disabled === undefined && control.disabled) ? true : null\"\r\n pInputText type=\"tel\" [(ngModel)]=\"data[control.field]\"\r\n [options]=\"{prefix: '', thousands: '.', decimal: ',',precision:control.dataFormat === 'money'?0:0 }\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (focus)=\"onFocusTextControl($event)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'phoneOrfax'\">\r\n <input [placeholder]=\"control.dataFormat==='phone'?'(999) 999-9999':'999-999-9999'\"\r\n [attr.disabled]=\"data._status[control.field].disabled === true || (data._status[control.field].disabled === undefined && control.disabled) ? true : null\"\r\n type=\"tel\" pInputText [(ngModel)]=\"data[control.field]\" (focus)=\"onFocusTextControl($event)\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'textarea'\">\r\n <textarea pInputTextarea (focus)=\"onFocusTextControl($event)\" [rows]=\"control.rows ? control.rows : 5\"\r\n [attr.disabled]=\"data._status[control.field].disabled === true || (data._status[control.field].disabled === undefined && control.disabled) ? true : null\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></textarea>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'editor'\">\r\n <tn-tinymce [(ngModel)]=\"data[control.field]\"\r\n [required]=\"control.validators && control.validators.required\" [mode]=\"control.mode\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n [height]=\"control.height ? control.height : 250\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\">\r\n </tn-tinymce>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <datetime-picker [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </datetime-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete'\">\r\n <app-autocomplete-datasource [control]=\"control\" [(ngModel)]=\"data[control.field]\"\r\n [suggestions]=\"data._source[control.field] || control.dataSource\"\r\n (onValueChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </app-autocomplete-datasource>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetimerange'\">\r\n <tn-datetime-picker-range [(ngModel)]=\"data[control.field]\" [disabled]=\"control.disabled\"\r\n [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-datetime-picker-range>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <dropdown [control]=\"control\" [dataSource]=\"getControlDataSource(control, data)\"\r\n [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleChangeDropdown(control, $event, 'change', data, parentPath)\"\r\n (onHideSmartEvent)=\"handleChangeDropdown(control, $event, 'hide', data, parentPath)\"\r\n (adjustValue)=\"handleAdjustValueDropdownEvent(control, parentPath)\"\r\n (onDataSourceLoaded)=\"handleDataSourceLoaded(control, parentPath, $event)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </dropdown>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fileManager'\">\r\n <file-manager [control]=\"control\" [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\" [signonly]=\"control.signonly\"\r\n [readonly]=\"control.disabled\" [rootFolderName]=\"control.rootFolderName || control.label\"\r\n [layout]=\"control.layout\" [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\"\r\n [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </file-manager>\r\n </ng-container>\r\n <span *ngSwitchCase=\"'fileUpload'\">\r\n <file-upload [(ngModel)]=\"data[control.field]\" [sharedFolderType]=\"control.sharedFolderType\"\r\n [maxFileSize]=\"control.maxFileSize\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n [readonly]=\"control.readonly\" [accept]=\"control.accept\">\r\n </file-upload>\r\n </span>\r\n <span *ngSwitchCase=\"'serviceFileUpload'\">\r\n <service-file-upload [(ngModel)]=\"data[control.field]\" [parentContext]=\"context\"\r\n [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"data[control.entityKeyField]\" [control]=\"control\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </service-file-upload>\r\n </span>\r\n <ng-container *ngSwitchCase=\"'user-picker'\">\r\n <user-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\" [multiple]=\"control.multiple\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </user-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'switch'\">\r\n <p-inputSwitch [(ngModel)]=\"data[control.field]\" [disabled]=\"checkDisabled(data, control)\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-inputSwitch>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <div [class]=\"control.class\" role=\"checkbox-alone\">\r\n <p-checkbox [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n [label]=\"!control.hiddenLabel ? control.label : null\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" binary=\"true\">\r\n </p-checkbox>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <button type=\"button\" pButton [class]=\"control.btClass\" [icon]=\"control.icon\"\r\n [label]=\"control.label | translate\" [ngStyle]=\"control.btStyle\"\r\n (click)=\"handleButtonClick(control, $event, parentPath)\"></button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'container'\">\r\n <div class=\"p-grid p-col-12\" style=\"margin: 0\" [class.not-show-in-box]=\"!control.showInBox\"\r\n [class.show-in-box]=\"control.showInBox\" [ngStyle]=\"control.boxStyle\">\r\n <ng-container *ngFor=\"let subControl of control.controls\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: {control: subControl, data: data[control.field], parentPath: path, rowIndex: rowIndex, path: path + '.' + subControl.field, showLabel: subControl.showLabel, mdWidth: subControl.mdWidth}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'checkboxlist'\">\r\n <check-box-list [control]=\"control\" [dataSource]=\"data._source[control.field] || control.dataSource\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </check-box-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'radiobuttonlist'\">\r\n <radio-button-list [control]=\"control\" [dataSource]=\"control.dataSource\"\r\n [disabled]=\"checkDisabled(data, control)\" [(value)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (adjustValue)=\"handleAdjustValueDropdownEvent(control, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\"\r\n (onDataSourceLoaded)=\"handleDataSourceLoaded(control, parentPath, $event)\">\r\n </radio-button-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'colorPicker'\">\r\n <tn-color-picker [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-color-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'spanControl'\">\r\n <span *ngIf=\"!control.ishtml\">{{data[control.field]}}</span>\r\n <span *ngIf=\"control.ishtml\" [innerHTML]=\"data[control.field]\"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'colorControl'\">\r\n <span class=\"show-color-control\" [ngStyle]=\"{ backgroundColor: data[control.sourceField]}\"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'address'\">\r\n <address-picker [control]=\"control\" [showSubLabel]=\"control.showSubLabel\"\r\n [disabled]=\"checkDisabled(data, control)\" [(data)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </address-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'address-new'\">\r\n <address-new-picker [control]=\"control\" [showSubLabel]=\"control.showSubLabel\"\r\n [disabled]=\"checkDisabled(data, control)\" [(data)]=\"data[control.field]\"\r\n (onSelect)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleControlReadyEvent(control, parentPath)\">\r\n </address-new-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'autocomplete-picker'\">\r\n <autocomplete-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </autocomplete-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'entity-picker'\">\r\n <entity-picker [control]=\"control\" [children]=\"children\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </entity-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'cocautochuc'\">\r\n <cocautochuc-picker [control]=\"control\" [parentOrgId]=\"control.parentOrgId\"\r\n [disabled]=\"checkDisabled(data, control)\" [parentOrgCode]=\"control.parentOrgCode\"\r\n [filter]=\"control.filter\" [multiple]=\"control.multiple\" [required]=\"control.required\"\r\n [isUsingId]=\"control.isUsingId\" [disabledParentItem]=\"control.disabledParentItem\"\r\n [rootParentId]=\"control.rootParentId\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </cocautochuc-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'cocautochuc-picker'\">\r\n <cocautochuc-picker-list [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"\r\n (onReady)=\"handleReadyControlPicker(control, parentPath)\">\r\n </cocautochuc-picker-list>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'vanban'\">\r\n <vanban-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </vanban-picker>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'congviec'\">\r\n <div>\r\n <congviec-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </congviec-picker>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div [class]=\"control.class\">\r\n <tn-custom-scrollbar class=\"--has-border\" [showScrollHorizontal]=\"true\">\r\n <p-table [value]=\"data[control.field]\" [columns]=\"control.headerTemplate\" [responsive]=\"true\"\r\n class=\"new-table scr-table table-control\" [rowTrackBy]=\"trackByFuncId\"\r\n (onRowReorder)=\"handleRowOrdered(control, $event, 'rowReorder', data, parentPath)\">\r\n <ng-template *ngIf=\"getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"getComponentByType(_prefixCustomHeader + control.field), context: {$implicit: control.headerTemplate, crudForm: this, containerSticky: containerSticky}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!getComponentByType(_prefixCustomHeader + control.field)\"\r\n pTemplate=\"header\" let-rowData let-columns>\r\n <tr>\r\n <th *ngIf=\"control.showNumber\" style=\"text-align: center; width: 2.5rem\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate\">\r\n <th *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [pTooltip]=\"subControl.fullLabel || subControl.label\" tooltipPosition=\"top\"\r\n [style.width]=\"subControl.width\" style=\"text-align: center;\">\r\n {{subControl.label}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"control.enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"control.showFunction\"\r\n [style.width]=\"getTableFunctionColumnWidth(control)\"\r\n class=\"table-function column-function\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-ri=\"rowIndex\">\r\n <tr [pReorderableRow]=\"ri\">\r\n <td style=\"text-align: center; padding-left: 0; padding-right: 0;\"\r\n *ngIf=\"control.showNumber\" class=\"stt\">\r\n <span style=\"padding: 12px 5px; display: inline-block;\">{{ri+1}}</span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngFor=\"let subControl of control.rowTemplate; let i = index\">\r\n <td *ngIf=\"subControl && !subControl.hidden && subControl.visibleInList\"\r\n [class.control-inside]=\"true\" [class]=\"subControl.class\">\r\n <span class=\"p-column-title\">{{subControl.label}}</span>\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: getContextTd(subControl, rowData, ri, path)\">\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n <td *ngIf=\"control.enableReorderRow\" class=\"no-padding center v-center\">\r\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\"\r\n pReorderableRowHandle></i>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <td style=\"text-align:center\" *ngIf=\"control.showFunction\" class=\"column-function\">\r\n <div class=\"p-toolbar-group-center button-group\">\r\n <button *ngIf=\"control.showSave\" [disabled]=\"rowData._disableSave\"\r\n type=\"button\" pButton class=\"p-button-text\" icon=\"pi pi-save\"\r\n [pTooltip]=\"'L\u01B0u' | translate\" tooltipPosition=\"top\"\r\n style=\"width: 2.143em;\" (click)=\"saveRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showEdit\" [disabled]=\"rowData._disableEdit\"\r\n type=\"button\" pButton class=\"p-button-text\" icon=\"pi pi-pencil\"\r\n [pTooltip]=\"'S\u1EEDa' | translate\" tooltipPosition=\"top\"\r\n style=\"width: 2.143em;\" (click)=\"editRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showDelete\" [disabled]=\"rowData._disableDelete\"\r\n type=\"button\" pButton class=\"p-button-text p-button-danger\"\r\n icon=\"pi pi-trash\" [pTooltip]=\"'X\u00F3a' | translate\" tooltipPosition=\"top\"\r\n style=\"width: 2.143em;\" (click)=\"deleteRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.rowButtons\" type=\"button\" pButton\r\n icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\"\r\n pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData, control)\"></button>\r\n <!-- <button *ngFor=\"let bt of control.rowButtons\" type=\"button\" pButton\r\n [class]=\"bt.class\" [icon]=\"bt.icon\" [pTooltip]=\"bt.label | translate\"\r\n tooltipPosition=\"top\" style=\"width: 2.143em;\"\r\n (click)=\"messageRow(ri, control, path)\"></button> -->\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"control.showFooter\" class=\"--table-schema-footer\">\r\n <button *ngIf=\"control.showAdd\" type=\"button\" pButton style=\"width:auto\" label=\"Th\u00EAm m\u1EDBi\"\r\n icon=\"pi pi-plus\" class=\"p-button-text\" (click)=\"addNewRow(control, path)\"></button>\r\n <span style=\"font-weight: normal;\">\r\n <p-checkbox label=\"M\u1EDF dialog\" [binary]=\"true\" [(ngModel)]=\"control.showEdit\">\r\n </p-checkbox>\r\n </span>\r\n <button *ngIf=\"control.enableAddMulti\" type=\"button\" pButton\r\n style=\"width:auto; margin-left:10px;\" label=\"Th\u00EAm nhi\u1EC1u\" icon=\"pi pi-clone\"\r\n class=\"p-button-text\" (click)=\"addMultiRow(control, 5, path)\"></button>\r\n <button *ngFor=\"let bt of control.footerButtons\" type=\"button\" pButton [class]=\"bt.class\"\r\n [icon]=\"bt.icon\" [label]=\"bt.label | translate\" style=\"width:auto; margin-left:10px;\"\r\n (click)=\"messageRow( -1, control, path)\"></button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(control.field)\"\r\n [ngTemplateOutletContext]=\"{crudForm: this, data: data, index: rowIndex, parentPath: parentPath, control: control, changeFunc: handleFieldValueChange}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"validation; context: {control: control, data: data}\">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n<ng-template #validation let-control=\"control\" let-data=\"data\">\r\n <ng-container *ngIf=\"data._errors[control.field].length > 0\">\r\n <div class=\"error-container\">\r\n <ng-container *ngFor=\"let error of data._errors[control.field]\">\r\n <div class=\"error-item\" *ngIf=\"error\">\r\n <ng-container [ngTemplateOutlet]=\"errorMessage\" [ngTemplateOutletContext]=\"{content: error}\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #errorMessage let-content=\"content\">\r\n <div class=\"error-content\">\r\n <i class=\"pi pi-ban\"></i>\r\n <span> {{content}}</span>\r\n </div>\r\n</ng-template>\r\n<ng-template #labelControl let-control=\"control\">\r\n <ng-container>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"!control.ishtml\" [attr.label-index]=\"control.indexLabel\"\r\n [pTooltip]=\"control.title\" tooltipPosition=\"top\" tooltipStyleClass=\"wrap\" [escape]=\"false\"\r\n [for]=\"control.for\">{{control.text | translate}}</label>\r\n <label [class]=\"getLabelClass(control)\" *ngIf=\"control.ishtml\" [innerHTML]=\"control.text | safeHtml\"\r\n [attr.label-index]=\"control.indexLabel\"></label>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<tn-dialog *ngIf=\"tableFormShow\" #dialog [styleClass]=\"'address-form'\" [header]=\"tableFormTitle | translate\"\r\n [popupSize]=\"tableFormPopupSize\" (onHide)=\"tableFormShow = false\">\r\n <table-detail-form #formBase [parentSetting]=\"setting\" [schema]=\"tableFormSchema\" [data]=\"tableFormData\"\r\n (onSaved)=\"handleSavedTableRow($event)\" (onCancel)=\"tableFormShow = false\">\r\n </table-detail-form>\r\n</tn-dialog>",
|
|
13318
13270
|
providers: [ComponentContextService],
|
|
13319
13271
|
styles: [".label-only{font-weight:700;margin-bottom:1em}div.label{position:relative}div.label .star-required{color:red;padding-left:.2em;padding-top:.3em;position:absolute}div.type-container.not-show-in-box-holder{padding:0}.--table-schema-footer{align-items:center;background:#f8f9fa;border:1px solid #e9ecef;color:#495057;display:flex;font-weight:600;padding:.5em}::ng-deep .p-datatable .p-datatable-tbody tr td.control-inside,::ng-deep .p-datatable .p-datatable-tbody tr td.control-inside .show-in-box:not(.crud-form-control){padding:0}.show-in-box{border:1px solid #ced4da;border-radius:5px}.not-show-in-box{padding:0}.view-mode div.label{padding-bottom:3px}.view-mode div.label label{font-size:.85em;font-weight:700}.view-mode>span:not(:empty){display:inline-block;padding:5px 0;width:100%}.view-mode.type-table div.label+div{padding:5px 0}td>.view-mode{display:inline-block;padding:.25rem .5rem}td>.view-mode .view-mode{padding:0}.crud-form-control div[role=checkbox-alone]{margin-top:24px}.crud-form-control div[role=checkbox-alone].mg-top-0{margin-top:0}.crud-form-control .label+div[role=checkbox-alone]{margin-top:11px}.crud-form-control.type-table div[role=checkbox-alone]{margin-top:6px;text-align:center}.crud-form-control.type-table div[role=checkbox-alone].mg-top-0{margin-top:0}.crud-form-control.type-table div[role=checkbox-alone].align-left{text-align:left}.crud-form-control.type-title{border-bottom:1px solid #cfcfcf;color:#025ba7;font-size:1.2rem;font-weight:700;padding:10px 0 10px 5px;text-transform:uppercase}.crud-form-control.type-title>.label{margin-bottom:0}.control-description{color:#6c757d;font-size:.8rem;margin-bottom:5px;margin-left:10px}::ng-deep .crud-form-control .tn-check-box-list{margin-top:5px}::ng-deep .crud-form-control>div.label{font-size:.9em;height:1.15em;margin-bottom:5px}::ng-deep .crud-form-control>div.label+*{width:100%}::ng-deep .crud-form-control>.error-container .error-item{animation:shrink .1s;min-height:20px;overflow:visible;padding-top:5px}::ng-deep .crud-form-control>.error-container .error-item .error-content{animation:fadeIn .1s;color:red;display:flex;font-size:.9em;position:relative}::ng-deep .crud-form-control>.error-container .error-item .error-content i{display:flex;font-size:.9em;padding-top:1px}::ng-deep .crud-form-control>.error-container .error-item .error-content span{display:flex;padding-left:5px}::ng-deep .crud-form-control.no-label>div.label{display:none}::ng-deep .crud-form-control.error .p-dropdown,::ng-deep .crud-form-control.error .p-inputtext,::ng-deep .crud-form-control.error .p-multiselect,::ng-deep .crud-form-control.error .tn-dropdown,::ng-deep .crud-form-control.error input,::ng-deep .crud-form-control.error select,::ng-deep .crud-form-control.error textarea{border-color:#ff5722!important}::ng-deep .crud-form-control.error .p-autocomplete-multiple-container:not(.p-disabled).p-focus,::ng-deep .crud-form-control.error .p-inputtext:enabled:focus,::ng-deep .crud-form-control.error .tn-dropdown:not(.p-disabled).p-focus{box-shadow:0 0 0 .2rem #ffc4b3}::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-dropdown,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-inputtext,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-multiselect,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .tn-dropdown,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) input,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) select,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) textarea{border-color:#ced4da!important}::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-autocomplete-multiple-container:not(.p-disabled).p-focus,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-dropdown.tn-dropdown.p-focus,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-inputtext:enabled:focus{box-shadow:0 0 0 .2rem #a6d5fa}@keyframes fadeIn{0%{opacity:0;top:-25px}to{opacity:1;top:0}}@keyframes shrink{0%{height:0}to{height:20px}}@media screen and (min-width:40.063em){.label-right{padding-left:2em}}:host ::ng-deep .tox-tinymce{border:none;border-top:1px solid #ccc;overflow:unset}:host ::ng-deep .tox-tinymce .tox-editor-container{overflow:unset}:host ::ng-deep .tox-tinymce .tox-toolbar{border:1px solid #ccc;border-bottom:none}:host ::ng-deep .tox-tinymce .tox-edit-area{border:1px solid #ccc}:host ::ng-deep .tox-tinymce .tox-edit-area iframe{box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}:host ::ng-deep .tox-tinymce .tox-menubar{border:1px solid #ccc}:host ::ng-deep .tox .tox-edit-area.tinymce-focus{border:1px solid #66afe9;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 3px 0 #66afe9;transition:box-shadow .3s,border-color .3s;transition-delay:0s,0s;transition-duration:.3s,.3s;transition-property:box-shadow,border-color;transition-timing-function:ease,ease}:host ::ng-deep .rq .tox .tox-edit-area{border-left-color:#ff4c46}.no-value{font-size:.8em}:host ::ng-deep .table-schema-paging{display:block;margin-bottom:40px}"]
|
|
13320
13272
|
},] }
|
|
@@ -14231,7 +14183,7 @@ class DataFormBase extends ComponentBase {
|
|
|
14231
14183
|
this.onSaved.emit();
|
|
14232
14184
|
}
|
|
14233
14185
|
else {
|
|
14234
|
-
this.handleInsertError(
|
|
14186
|
+
this.handleInsertError();
|
|
14235
14187
|
}
|
|
14236
14188
|
}), error => {
|
|
14237
14189
|
if (!error.error.success && error.error.errorCheckExist) {
|
|
@@ -14246,7 +14198,7 @@ class DataFormBase extends ComponentBase {
|
|
|
14246
14198
|
getPromiseActionInsert() {
|
|
14247
14199
|
return this.setting.baseService.post(this.model.data, this.insertPlusUrl);
|
|
14248
14200
|
}
|
|
14249
|
-
handleInsertError(
|
|
14201
|
+
handleInsertError() {
|
|
14250
14202
|
}
|
|
14251
14203
|
onUpdate() {
|
|
14252
14204
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -14260,7 +14212,7 @@ class DataFormBase extends ComponentBase {
|
|
|
14260
14212
|
this.onSaved.emit();
|
|
14261
14213
|
}
|
|
14262
14214
|
else {
|
|
14263
|
-
this.handleUpdateError(
|
|
14215
|
+
this.handleUpdateError();
|
|
14264
14216
|
}
|
|
14265
14217
|
}), error => {
|
|
14266
14218
|
if (!error.error.success && error.error.errorCheckExist) {
|
|
@@ -14272,7 +14224,7 @@ class DataFormBase extends ComponentBase {
|
|
|
14272
14224
|
});
|
|
14273
14225
|
});
|
|
14274
14226
|
}
|
|
14275
|
-
handleUpdateError(
|
|
14227
|
+
handleUpdateError() {
|
|
14276
14228
|
}
|
|
14277
14229
|
getPromiseActionUpdate() {
|
|
14278
14230
|
return this.setting.baseService.put(this.model.data.id.toString(), this.model.data, this.updatePlusUrl);
|
|
@@ -14437,7 +14389,7 @@ class EntityWorkflowSettingService extends BaseService {
|
|
|
14437
14389
|
(this._injector.get(NotifierService)).showWarning('Bạn chưa đăng ký base service cho entity workflow setting');
|
|
14438
14390
|
}
|
|
14439
14391
|
return new Promise((resolve, reject) => {
|
|
14440
|
-
this.defaultPost(`${service.endPoint}
|
|
14392
|
+
this.defaultPost(`${service.endPoint}/EntityWorkflowSetting/GetSetting/${service.entityName}`, {})
|
|
14441
14393
|
.then(res => {
|
|
14442
14394
|
if (res.success) {
|
|
14443
14395
|
const itemSetting = res.data;
|
|
@@ -14522,11 +14474,11 @@ class EntityWorkflowSettingService extends BaseService {
|
|
|
14522
14474
|
}
|
|
14523
14475
|
saveSetting(settingKey, data) {
|
|
14524
14476
|
const service = this.serviceManagers[settingKey];
|
|
14525
|
-
return this.defaultPost(`${service.endPoint}
|
|
14477
|
+
return this.defaultPost(`${service.endPoint}/EntityWorkflowSetting/SaveSetting/${service.entityName}`, data);
|
|
14526
14478
|
}
|
|
14527
14479
|
removeSetting(settingKey) {
|
|
14528
14480
|
const service = this.serviceManagers[settingKey];
|
|
14529
|
-
return this.defaultPost(`${service.endPoint}
|
|
14481
|
+
return this.defaultPost(`${service.endPoint}/EntityWorkflowSetting/RemoveSetting/${service.entityName}`, {});
|
|
14530
14482
|
}
|
|
14531
14483
|
}
|
|
14532
14484
|
EntityWorkflowSettingService.decorators = [
|
|
@@ -15649,8 +15601,6 @@ class CrudListComponent extends ComponentBase {
|
|
|
15649
15601
|
});
|
|
15650
15602
|
this.sourceIcon = {};
|
|
15651
15603
|
this.stopCalculatingFunctionColumnWidth = false;
|
|
15652
|
-
this.FileUploadMode = FileUploadMode;
|
|
15653
|
-
this.eventType = EventType;
|
|
15654
15604
|
this._unSubscribeAll = new Subject();
|
|
15655
15605
|
this.handleSelectRow = (evt, data) => {
|
|
15656
15606
|
if (this.setting.hasCustomHandleClickRow) {
|
|
@@ -15828,65 +15778,6 @@ class CrudListComponent extends ComponentBase {
|
|
|
15828
15778
|
this.setting.pageSetting.page = 1;
|
|
15829
15779
|
this.getData();
|
|
15830
15780
|
};
|
|
15831
|
-
this.handleFieldValueChange = (control, event, rowData, type) => __awaiter(this, void 0, void 0, function* () {
|
|
15832
|
-
const eventData = {
|
|
15833
|
-
event,
|
|
15834
|
-
rowData,
|
|
15835
|
-
type
|
|
15836
|
-
};
|
|
15837
|
-
switch (type) {
|
|
15838
|
-
case EventType.CHANGE: {
|
|
15839
|
-
if (control.onChanged) {
|
|
15840
|
-
try {
|
|
15841
|
-
yield control.onChanged(eventData);
|
|
15842
|
-
}
|
|
15843
|
-
catch (_a) {
|
|
15844
|
-
}
|
|
15845
|
-
}
|
|
15846
|
-
break;
|
|
15847
|
-
}
|
|
15848
|
-
case EventType.INIT: {
|
|
15849
|
-
if (control.onInit) {
|
|
15850
|
-
try {
|
|
15851
|
-
yield control.onInit(eventData);
|
|
15852
|
-
}
|
|
15853
|
-
catch (_b) {
|
|
15854
|
-
}
|
|
15855
|
-
}
|
|
15856
|
-
break;
|
|
15857
|
-
}
|
|
15858
|
-
case EventType.DELETED: {
|
|
15859
|
-
if (control.onRemove) {
|
|
15860
|
-
try {
|
|
15861
|
-
yield control.onRemove(eventData);
|
|
15862
|
-
}
|
|
15863
|
-
catch (_c) {
|
|
15864
|
-
}
|
|
15865
|
-
}
|
|
15866
|
-
break;
|
|
15867
|
-
}
|
|
15868
|
-
case EventType.SELECT: {
|
|
15869
|
-
if (control.onSelected) {
|
|
15870
|
-
try {
|
|
15871
|
-
yield control.onSelected(eventData);
|
|
15872
|
-
}
|
|
15873
|
-
catch (_d) {
|
|
15874
|
-
}
|
|
15875
|
-
}
|
|
15876
|
-
break;
|
|
15877
|
-
}
|
|
15878
|
-
case EventType.UPLOADED: {
|
|
15879
|
-
if (control.onUploaded) {
|
|
15880
|
-
try {
|
|
15881
|
-
yield control.onUploaded(eventData);
|
|
15882
|
-
}
|
|
15883
|
-
catch (_e) {
|
|
15884
|
-
}
|
|
15885
|
-
}
|
|
15886
|
-
break;
|
|
15887
|
-
}
|
|
15888
|
-
}
|
|
15889
|
-
});
|
|
15890
15781
|
this._activatedRoute = this._injector.get(ActivatedRoute);
|
|
15891
15782
|
this._router = this._injector.get(Router);
|
|
15892
15783
|
this._customRouterService = this._injector.get(CustomRouterService);
|
|
@@ -17381,7 +17272,7 @@ class CrudListComponent extends ComponentBase {
|
|
|
17381
17272
|
return col.dataType == DataType.datetime || col.dataType == DataType.date || col.dataType == DataType.boolean || col.dataType == DataType.enum;
|
|
17382
17273
|
}
|
|
17383
17274
|
alignRightColumn(col) {
|
|
17384
|
-
return col.dataType == DataType.int || col.dataType == DataType.decimal
|
|
17275
|
+
return col.dataType == DataType.int || col.dataType == DataType.decimal;
|
|
17385
17276
|
}
|
|
17386
17277
|
ngOnDestroy() {
|
|
17387
17278
|
if (!this.disableKeypressControl) {
|
|
@@ -17477,7 +17368,7 @@ class CrudListComponent extends ComponentBase {
|
|
|
17477
17368
|
for (const col of colHasPipe) {
|
|
17478
17369
|
for (const item of dataSource) {
|
|
17479
17370
|
this.transform(col.pipe, col.asyncPipe, item[col.field]).then(rs => {
|
|
17480
|
-
item[`pipe__${col.field}`] = rs;
|
|
17371
|
+
item[`pipe__${col.field} `] = rs;
|
|
17481
17372
|
});
|
|
17482
17373
|
}
|
|
17483
17374
|
}
|
|
@@ -17899,18 +17790,14 @@ class CrudListComponent extends ComponentBase {
|
|
|
17899
17790
|
}
|
|
17900
17791
|
}, 20);
|
|
17901
17792
|
}
|
|
17902
|
-
getTooltip(tooltip, field) {
|
|
17903
|
-
const result = tooltip && tooltip[field] ? tooltip[field] : null;
|
|
17904
|
-
return result;
|
|
17905
|
-
}
|
|
17906
17793
|
}
|
|
17907
17794
|
CrudListComponent.decorators = [
|
|
17908
17795
|
{ type: Component, args: [{
|
|
17909
17796
|
// tslint:disable-next-line: component-selector
|
|
17910
17797
|
selector: 'crud-list',
|
|
17911
|
-
template: "<div #container class=\"custom-card card card-w-title flex-container-fit-child\" [attr.height-type]=\"setting.heightType\"\r\n [ngStyle]=\"_style\">\r\n <div class=\"ui-helper-clearfix crud-list-header-area\">\r\n <div *ngIf=\"searchCustom\" class=\"p-grid ui-fluid custom-p-col custom-search-area\">\r\n <div class=\"p-col-12 main-container-search\">\r\n <div class=\"p-grid main-container-search-inner\">\r\n <ng-container>\r\n <ng-container *ngTemplateOutlet=\"searchCustom; context: {$implicit: this}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!setting.hiddenHeader\" class=\"p-grid ui-fluid custom-p-col page-title-area\">\r\n <div *ngIf=\"!setting.hiddenPageTitle\" class=\"main-title\">\r\n <h1 *ngIf=\"!hasTemplate('customTitle')\">\r\n {{setting.title != null ? setting.title : 'Danh s\u00E1ch ' + setting.objectName}}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"hasTemplate('customTitle')\" [ngTemplateOutlet]=\"getTemplate('customTitle')\"\r\n [ngTemplateOutletContext]=\"{crudList: this}\">\r\n </ng-container>\r\n </div>\r\n\r\n <div *ngIf=\"!setting.hiddenPageSetting\" class=\"paginator-table\">\r\n <paging-next-back-only [model]=\"model\" [setting]=\"setting\" (onOldest)=\"onOldest($event)\"\r\n (onNext)=\"onNext($event)\" (onPrev)=\"onPrev($event)\" (onLatest)=\"onLatest($event)\"\r\n (onChangeLimitPage)=\"savePageSize()\">\r\n </paging-next-back-only>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"fit-content crud-list-body-area\">\r\n <div class=\"crud-list-body-area-inner\" style=\"overflow: unset;\">\r\n <div class=\"flex-container-fit-child\" style=\"overflow: unset;\">\r\n <div *ngIf=\"!setting.hiddenToolbar\" class=\"p-grid crudListToolbar\">\r\n <ng-container>\r\n <div *ngIf=\"!setting.hiddenButtons && hasTemplate('toolbar')\"\r\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\r\n class=\"p-col-12 button-group function-topbar custom-toolbar\">\r\n <ng-container\r\n [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('toolbar')\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!setting.hiddenButtons && !hasTemplate('toolbar')\"\r\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\r\n class=\"p-col-12 button-group function-topbar\">\r\n <button *ngIf=\"!hiddenAdd\" type=\"button\" pButton pRipple label=\"Th\u00EAm m\u1EDBi\" icon=\"pi pi-plus\"\r\n class=\"p-button-text\" (click)=\"add()\"></button>\r\n <button *ngIf=\"model.selectedItems.length > 0\" type=\"button\" pButton pRipple\r\n label=\"Xu\u1EA5t c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{model.selectedItems.length}})\" icon=\"fas fa-file-excel\"\r\n class=\"p-button-text p-button-success\" (click)=\"xuatCacMucDaChon()\"></button>\r\n <button *ngIf=\"!hiddenDelete && model.selectedItems.length > 0 && !disableMultipleDelete()\"\r\n type=\"button\" pButton pRipple\r\n label=\"{{ 'X\u00F3a' | translate }} ({{model.selectedItems.length}})\" icon=\"pi pi-trash\"\r\n class=\"p-button-text p-button-danger\" (click)=\"deleteMutiple()\"></button>\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('buttonAfterToolbar')\"\r\n [ngTemplateOutletContext]=\"{crudList: this}\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <div *ngIf=\"!setting.hiddenAdvanceSearch\" class=\"p-col-12 advance-search-container\"\r\n [ngClass]=\"setting.hiddenButtons ? 'p-md-12 p-lg-12' : 'p-md-5 p-lg-4'\">\r\n <advance-search #advanceSearch [parentSetting]=\"setting\" [searchInfo]=\"searchInfo\"\r\n [loading]=\"model.loading\" (onSearch)=\"handleSearchAdvs($event)\"\r\n (onInit)=\"handleInitAdvanceSearch($event)\">\r\n </advance-search>\r\n </div>\r\n </div>\r\n <div *ngIf=\"hasTemplate('topGrid')\" class=\"extend-content-top-grid\">\r\n <ng-container [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('topGrid')\"></ng-container>\r\n </div>\r\n <div class=\"container-table fit-content\" [class.--table-responsive]=\"responsive\">\r\n <div class=\"container-table-inner\">\r\n <ng-container *ngIf=\"!_groupField\">\r\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\r\n [showScrollHorizontal]=\"showScrollHorizontal\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\r\n <ng-container [ngTemplateOutlet]=\"hasTemplate('afterCrudList')\"></ng-container>\r\n </ng-container>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"!showScrollBar\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"_groupField\">\r\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\r\n [showScrollHorizontal]=\"showScrollHorizontal\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('afterCrudList')\"></ng-container>\r\n </ng-container>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"!showScrollBar\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"table-border-line --top\"></div>\r\n <div class=\"table-border-line --right\"></div>\r\n <div class=\"table-border-line --bottom\"></div>\r\n <div class=\"table-border-line --left\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<after-view-checked (loaded)=\"handleReady()\"></after-view-checked>\r\n<settings *ngIf=\"_showSettings && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\r\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveSettings($event)\"\r\n (onCancel)=\"_showSettings = false\">\r\n</settings>\r\n<settings-row *ngIf=\"_showSettingsRowColor && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\r\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveColorSettings($event)\"\r\n (onCancel)=\"_showSettingsRowColor = false\">\r\n</settings-row>\r\n<workflow-setting-dialog *ngIf=\"_showSettingsWorkflow && !setting.hiddenSettingWorkflow\" [parentSetting]=\"setting\"\r\n [parentContext]=\"context\" [parentModel]=\"model\" (onSaved)=\"onSaveWorkflowSettings($event)\"\r\n (onRemoved)=\"onRemoveWorkflowSettings($event)\" (onCancel)=\"_showSettingsWorkflow = false\"></workflow-setting-dialog>\r\n<entity-permission *ngIf=\"_showSettingsPermission && !setting.hiddenSettingPermission\" [parentSetting]=\"setting\"\r\n [parentContext]=\"context\" [parentModel]=\"model\" [searchInfo]=\"searchInfo\"\r\n (onCancel)=\"_showSettingsPermission = false\">\r\n</entity-permission>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\r\n<tn-dialog *ngIf=\"showFormWorkflow\" #dialog [header]=\"headerWorkflow | translate\" [popupSize]=\"popupSizeWorkflow\"\r\n [scrollBarStyleClass]=\"'fit-content'\" (onHide)=\"showFormWorkflow = false\">\r\n <div style=\"height: 100%\">\r\n <simple-workflow-form #formBase [baseService]=\"setting.baseService\" [item]=\"currentItem\"\r\n [action]=\"actionWorkflow\" (onInvalidWorkflow)=\"handleInvalidWF($event)\" (onSaved)=\"handleProcessedWorflow()\"\r\n (onCancel)=\"showFormWorkflow = false\">\r\n </simple-workflow-form>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"processWorkflowModel.showEditForm\" #dialog [header]=\"processWorkflowModel.header | translate\"\r\n [popupSize]=\"processWorkflowModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"processWorkflowModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <process-workflow-form #formBase [bussinessSetting]=\"setting\" [item]=\"currentItem\"\r\n [workflow]=\"processWorkflowModel.data.workflow\" [action]=\"processWorkflowModel.data.action\"\r\n (onSaved)=\"handleProcessedWorkflowBase()\" (onCancel)=\"processWorkflowModel.showEditForm = false\">\r\n </process-workflow-form>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"workflowHistoryModel.showEditForm\" #dialog [header]=\"workflowHistoryModel.header | translate\"\r\n [popupSize]=\"workflowHistoryModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"workflowHistoryModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <workflow-history-new #formBase [baseService]=\"setting.baseService\" [item]=\"currentItem\"\r\n [workflowSetting]=\"workflowHistoryModel.data.workflowSetting\"\r\n (onCancel)=\"workflowHistoryModel.showEditForm = false\">\r\n </workflow-history-new>\r\n </div>\r\n</tn-dialog>\r\n<workflow-history-dialog *ngIf=\"showHistoryWorkflow\" [baseService]=\"setting.baseService\" [item]=\"currentItem\"\r\n [workflowSetting]=\"setting.workflowSetting\" (onHide)=\"handleHideHistoryWorkflow()\">\r\n</workflow-history-dialog>\r\n<ng-template #tableGetGroupFieldFalse>\r\n <p-table #table [dataKey]=\"'id'\" [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\"\r\n [columns]=\"setting.cols\" [paginator]=\"false\" [value]=\"_dataSource\" (onSort)=\"onSort($event, table)\"\r\n [class]=\"_tableClass\" [responsive]=\"responsive\" [lazy]=\"lazy\" [loading]=\"model.loading\"\r\n [(selection)]=\"model.selectedItems\" (onRowReorder)=\"handleRowOrdered($event)\">\r\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-index=\"rowIndex\" let-expanded=\"expanded\">\r\n <ng-container\r\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: expanded, eventSelectRow: handleSelectRow, eventChecked: handleCheckRowData}\">\r\n </ng-container>\r\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\r\n (loaded)=\"handleTableRendered()\">\r\n </after-view-checked>\r\n </ng-template>\r\n <ng-template *ngIf=\"rowExpansion\" pTemplate=\"rowexpansion\" let-rowData let-expanded=\"expanded\">\r\n <ng-container\r\n *ngTemplateOutlet=\"rowExpansion; context: {rowData: rowData, expanded: expanded, getColSpanGroup: getColSpanGroup}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\r\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n </p-table>\r\n</ng-template>\r\n<ng-template #tableGetGroupFieldTrue>\r\n <p-table #tableGroup [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\" [columns]=\"setting.cols\"\r\n [paginator]=\"false\" [value]=\"_dataSource\" [metaKeySelection]=\"false\" (onSort)=\"onSort($event, tableGroup)\"\r\n [class]=\"_tableClass\" [customSort]=\"true\" [responsive]=\"responsive\" [lazy]=\"true\" [loading]=\"model.loading\"\r\n [(selection)]=\"model.selectedItems\" [expandedRowKeys]=\"model.expandedRowKeys\" [dataKey]=\"_groupField\">\r\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll_Group}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll_Group}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\" let-expanded=\"expanded\" let-columns=\"columns\">\r\n <tr *ngIf=\"rowGroupMetadata[rowData[_groupField]] && rowGroupMetadata[rowData[_groupField]].index == rowIndex\"\r\n class=\"p-widget-header group-row\" style=\"border: 0px; border-bottom: 1px solid #eee\">\r\n <td *ngIf=\"!setting.hiddenCheckbox\" class=\"center chkbox\" [class.sticky]=\"setting.stickyColumn\">\r\n <p-checkbox [(ngModel)]=\"rowGroupChecked[rowData[_groupField]]\" binary=\"true\"\r\n (onChange)=\"handleCheckRowGroup(rowData)\">\r\n </p-checkbox>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngIf=\"!rowGroup\">\r\n <td [colSpan]=\"getColSpanGroup()\" [class]=\"_classRowGroup\">\r\n <div class=\"container-row-group\">\r\n <a href=\"javascript:;\" [pRowToggler]=\"rowData\" class=\"container-row-group-toggle\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <i style=\"margin-right:5px\"\r\n [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\r\n <span class=\"content-row-group\">\r\n <ng-container *ngIf=\"!contentRowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"_contentRowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"contentRowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"contentRowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\r\n </ng-container>\r\n </ng-container>\r\n </span>\r\n </a>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"rowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroupRoot(rowData, expanded)\">\r\n </ng-container>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"rowexpansion\" let-columns=\"columns\" let-rowData let-index=\"rowIndex\">\r\n <ng-container\r\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: false, eventSelectRow: handleSelectRowGroup, eventChecked: handleCheckRowData_Group}\">\r\n </ng-container>\r\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\r\n (loaded)=\"handleTableRendered()\">\r\n </after-view-checked>\r\n </ng-template>\r\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\r\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n </p-table>\r\n <after-view-checked></after-view-checked>\r\n</ng-template>\r\n<ng-template #trHeader let-columns let-funcCheckAll=\"funcCheckAll\">\r\n <tr class=\"title-row\">\r\n <ng-container *ngIf=\"!setting.hiddenCheckbox\">\r\n <th [style.width]=\"widthCheckbox\" class=\"chkbox link-or-action cell-checkbox\"\r\n [class.sticky]=\"setting.stickyColumn\" style=\"z-index: 3 !important;\">\r\n <button *ngIf=\"!hasTemplate('headerCheckbox')\" type=\"button\" pButton pRipple icon=\"pi pi-refresh\"\r\n class=\"p-button-rounded p-button-text btnReload\" pTooltip=\"L\u00E0m m\u1EDBi d\u1EEF li\u1EC7u\" tooltipPosition=\"top\"\r\n [disabled]=\"model.loading\" (click)=\"reload()\"></button>\r\n <ng-container *ngIf=\"hasTemplate('headerCheckbox')\">\r\n <ng-container [ngTemplateOutletContext]=\"{crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('headerCheckbox')\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"!setting.hiddenOrderColumn\" [style.width]=\"widthOrderColumn\" class=\"stt nopad center\"\r\n [class.sticky]=\"setting.stickyColumn\" [class.hidden-checkbox]=\"setting.hiddenCheckbox\" style=\"z-index: 3 !important;\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"rowExpansion\" class=\"nopad row-expansion-toggle center\" style=\"width: 2.5rem\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <th *ngIf=\"col && col.visible && col.field!='function'\" [ngStyle]=\"col.extendData.headerStyle\"\r\n [pTooltip]=\"col.fullLabel\" tooltipStyleClass=\"unset-width\" [class]=\"col.extendData.headerClass\"\r\n [class.first-th]=\"i==0\" [escape]=\"false\" tooltipPosition=\"top\" [tnSortableColumn]=\"col.field\">\r\n <ng-container *ngTemplateOutlet=\"contentTh; context: {$implicit: col}\"></ng-container>\r\n <ng-container *ngIf=\"col.sort || col.sortClient\">\r\n <ng-container *ngTemplateOutlet=\"sortIcon; context: {field: col.field}\"></ng-container>\r\n </ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngTemplateOutlet=\"colFunctionHeader\"></ng-container>\r\n </tr>\r\n <ng-container *ngTemplateOutlet=\"rowHeaderFilter; context: {columns: columns, funcCheckAll: funcCheckAll}\">\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #rowHeaderFilter let-columns=\"columns\" let-funcCheckAll=\"funcCheckAll\">\r\n <tr class=\"filter-row\" *ngIf=\"!setting.hiddenFilterRow\">\r\n <th *ngIf=\"!setting.hiddenCheckbox\" class=\"chkbox nopad center\" style=\"z-index: 3 !important;\"\r\n [class.sticky]=\"setting.stickyColumn\" [class.tricheckbox-custom-false]=\"checkedAll === false\"\r\n [style.width]=\"widthCheckbox\">\r\n <p-triStateCheckbox [(ngModel)]=\"checkedAll\" binary=\"true\" (onChange)=\"funcCheckAll()\">\r\n </p-triStateCheckbox>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"!setting.hiddenOrderColumn\" class=\"stt center v-top\" style=\"z-index: 3 !important;\"\r\n [class.sticky]=\"setting.stickyColumn\" [class.hidden-checkbox]=\"setting.hiddenCheckbox\">\r\n <div *ngIf=\"!setting.hiddenSetting\" class=\"pick-color-row\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB m\u00E0u\"\r\n tooltipPosition=\"top\" (click)=\"showSettingRowColor()\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"rowExpansion\" class=\"nopad center row-expansion-toggle\" [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <th *ngIf=\"col.visible && col.field != 'function'\" class=\"cell-header-filter center\">\r\n <ng-container *ngIf=\"col.allowFilter\">\r\n <ng-container *ngIf=\"col.templateFilter\">\r\n <ng-container [ngTemplateOutlet]=\"col.templateFilter\"\r\n [ngTemplateOutletContext]=\"{col: col, filterData: filterData, onSearch: onSearch, onShowFilterDropdownPanel: onShowFilterDropdownPanel, onHideFilterDropdownPanel: onHideFilterDropdownPanel}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.templateFilter\" [ngSwitch]=\"col.controlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDropdown\"\r\n [ngTemplateOutletContext]=\"{col: col.rawColumn}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <ng-container *ngSwitchCase=\"'int'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'decimal'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <ng-container [ngTemplateOutlet]=\"filterBoolean\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fileUpload'\">\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"filterText\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"!setting.hiddenFunctionColumn\" class=\"center setting-cell column-function\"\r\n style=\"z-index: 3 !important;\" [class.sticky]=\"setting.stickyColumn\">\r\n <button *ngIf=\"!setting.hiddenSetting\" type=\"button\" pButton pRipple icon=\"pi pi-cog\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB\" tooltipPosition=\"top\"\r\n (click)=\"showSettings()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingPermission\" type=\"button\" pButton pRipple icon=\"pi pi-users\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"Ph\u00E2n quy\u1EC1n d\u1EEF li\u1EC7u\" tooltipPosition=\"left\"\r\n (click)=\"showSettingsPermission()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingWorkflow\" type=\"button\" pButton pRipple icon=\"pi pi-sitemap\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh quy tr\u00ECnh\" tooltipPosition=\"left\"\r\n (click)=\"showSettingsWorkflow()\"></button>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n</ng-template>\r\n<ng-template #colFunctionHeader>\r\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\r\n <th class=\"column-function\" style=\"z-index: 3 !important;\" [class.sticky]=\"setting.stickyColumn\"\r\n [style.width]=\"widthFunctionColumn || _widthFunctionColumn\">\r\n <div class=\"cell-header-function\">\r\n <span>{{'GRID.FUNCTION'| translate}}</span>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentTh let-col>\r\n <ng-container *ngIf=\"templateHeaderContent[col.field]\">\r\n <ng-container *ngTemplateOutlet=\"templateHeaderContent[col.field]\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!templateHeaderContent[col.field]\">\r\n {{col.label}}\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n</ng-template>\r\n<ng-template #trBody let-rowData let-columns=\"columns\" let-index=\"index\" let-expanded=\"expanded\"\r\n let-eventSelectRow=\"eventSelectRow\" let-eventChecked=\"eventChecked\">\r\n <tr class=\"table-row\" [tnReorderableRow]=\"index\" [attr.rowIndex]=\"index\"\r\n [ngClass]=\"mergeClassObj(rowData, { 'ui-state-highlight': rowData._checked })\" [pTooltip]=\"rowData.tooltip\"\r\n tooltipPosition=\"top\" [tooltipStyleClass]=\"rowData.tooltipClass\" [escape]=\"escape\"\r\n (click)=\"eventSelectRow($event, rowData)\">\r\n <ng-container *ngIf=\"!setting.hiddenCheckbox\">\r\n <td [style.width]=\"widthCheckbox\" class=\"chkbox link-or-action cell-checkbox\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngIf=\"!hasTemplate('checkbox')\">\r\n <p-checkbox [(ngModel)]=\"rowData._checked\" binary=\"true\" (onChange)=\"eventChecked(rowData)\">\r\n </p-checkbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('checkbox')\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('checkbox')\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n <td *ngIf=\"!setting.hiddenOrderColumn && (!rowData.hidden || !rowData.hidden[fieldOrder])\"\r\n [style.width]=\"widthOrderColumn\" class=\"stt\" style=\"text-align: center;\"\r\n [class.sticky]=\"setting.stickyColumn\" [class.hidden-checkbox]=\"setting.hiddenCheckbox\" [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldOrder]\"\r\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldOrder]\">\r\n <span class=\"row-card\" [ngStyle]=\"getBookmarkColor(rowData, columns)\"></span>\r\n {{rowData[fieldOrder]}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <td *ngIf=\"rowExpansion\" class=\"no-padding center row-expansion-toggle\" [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"iconToggleRowData; context: {rowData: rowData, expanded: expanded}\">\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container\r\n *ngTemplateOutlet=\"dynamicColBodys; context: {$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\r\n </ng-container>\r\n <td *ngIf=\"enableReorderRow\" class=\"no-padding center\">\r\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\" pReorderableRowHandle></i>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\r\n <td class=\"text-center column-function\" style=\"text-align: center;\" [class.sticky]=\"setting.stickyColumn\">\r\n <div *ngIf=\"hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('function')\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\r\n [ngTemplateOutlet]=\"getTemplate('buttonBefore')\"></ng-container>\r\n <button *ngIf=\"setting.showVersionButton\" type=\"button\" pButton pRipple icon=\"fas fa-history\"\r\n class=\"p-button-rounded p-button-success link-or-action\" pTooltip=\"Xem l\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\r\n tooltipPosition=\"top\" (click)=\"showListVersion(rowData)\"></button>\r\n <button *ngIf=\"!rowData.hiddenEdit\" type=\"button\" pButton pRipple [disabled]=\"disableEdit(rowData)\"\r\n pTooltip=\"{{'FORM.EDIT' | translate}}\" tooltipPosition=\"top\"\r\n class=\"p-button-rounded p-button-text p-button-info link-or-action\" icon=\"pi pi-pencil\"\r\n (click)=\"edit(rowData)\"></button>\r\n <button *ngIf=\"!rowData.hiddenDelete\" type=\"button\" pButton pRipple\r\n [disabled]=\"disableDelete(rowData)\" pTooltip=\"{{'FORM.DELETE' | translate}}\"\r\n tooltipPosition=\"top\" class=\"p-button-rounded p-button-text p-button-danger link-or-action\"\r\n icon=\"pi pi-trash\" (click)=\"delete(rowData)\"></button>\r\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\r\n [ngTemplateOutlet]=\"getTemplate('buttonAfter')\"></ng-container>\r\n <button *ngIf=\"setting.showMenuButtons && menuButtons\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\"\r\n tooltipPosition=\"top\" (click)=\"showContextMenu($event, rowData)\"></button>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n</ng-template>\r\n<ng-template #dynamicColBodys let-columns let-rowData=\"rowData\" let-index=\"index\" let-expanded=\"expanded\">\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <ng-container\r\n *ngTemplateOutlet=\"contentTd; context: {$implicit: rowData, col: col, index: index, i: i, expanded: expanded}\">\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentTd let-rowData let-col=\"col\" let-index=\"index\" let-expanded=\"expanded\" let-i=\"i\">\r\n <td *ngIf=\"col && col.visible && col.field != 'function' && (!rowData.hidden || !rowData.hidden[col.field])\"\r\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[col.field]\"\r\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[col.field]\" [ngStyle]=\"col.extendData.style\"\r\n [class]=\"col.cellClass\" [class.first-td]=\"i == 0\">\r\n <span *ngIf=\"col.pipe\">\r\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span>\r\n {{rowData['pipe__' + col.field]}}\r\n </span>\r\n <span *ngIf=\"!col.pipe\">\r\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span>\r\n <span *ngIf=\"setting.showEditLink && col.showEditLink\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\"\r\n class=\"link-or-action\">\r\n <a href=\"javascript:;\" (click)=\"view(rowData)\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\r\n </ng-container>\r\n </a>\r\n </span>\r\n <span *ngIf=\"!setting.showEditLink || !col.showEditLink\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\r\n </ng-container>\r\n </span>\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #contentCell let-col=\"col\" let-rowData=\"rowData\" let-rowIndex=\"rowIndex\" let-field=\"field\"\r\n let-expanded=\"expanded\">\r\n <ng-container *ngIf=\"col.template\">\r\n <ng-container [ngTemplateOutlet]=\"col.template\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded,this)\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.template\">\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <span *ngSwitchCase=\"'color'\" style=\"display:block;text-align:center;\">\r\n <div pTooltip=\"{{rowData[field]}}\" tooltipPosition=\"top\" [ngStyle]=\"{'background-color':rowData[field]}\"\r\n style=\"width:30px;height:30px;margin:0 auto;\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'icon'\" style=\"display:block;text-align:center;\">\r\n <i pTooltip=\"{{rowData[field]}}\" tooltipPosition=\"top\" style=\"text-align: center;\"\r\n [ngClass]=\"rowData[field]\"></i>\r\n </span>\r\n <span *ngSwitchCase=\"'date'\" pTooltip=\"{{rowData[field] | date:'dd/MM/yyyy'}}\" tooltipPosition=\"top\">\r\n {{_crudService.renderDate(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'datetime'\" pTooltip=\"{{rowData[field] | date:'dd/MM/yyyy HH:mm'}}\"\r\n tooltipPosition=\"top\">\r\n {{_crudService.renderDateTime(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'user'\" class=\"user\">\r\n {{rowData[field] | userFormat | async}}\r\n </span>\r\n <div *ngSwitchCase=\"'users'\" [innerHTML]=\"rowData[field] | usersFormat | async\">\r\n </div>\r\n <span *ngSwitchCase=\"'int'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'decimal'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'intWithoutMask'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'currency'\">\r\n {{rowData[field] | currency:\"VND\"}}\r\n </span>\r\n <span *ngSwitchCase=\"'boolean'\">\r\n <ng-container *ngIf=\"!col.useTriStateCheckbox\">\r\n <p-checkbox class=\"boolean-data-type\" binary=\"true\" [pTooltip]=\"getTooltip(rowData._tooltip, field)\"\r\n tooltipPosition=\"top\" [disabled]=\"col.disableCheckBox\" [(ngModel)]=\"rowData[field]\">\r\n </p-checkbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"col.useTriStateCheckbox\">\r\n <p-triStateCheckbox class=\"boolean-data-type\" binary=\"true\"\r\n [pTooltip]=\"getTooltip(rowData._tooltip, field)\" tooltipPosition=\"top\"\r\n [disabled]=\"col.disableCheckBox\" [(ngModel)]=\"rowData[field]\">\r\n </p-triStateCheckbox>\r\n </ng-container>\r\n </span>\r\n <span *ngSwitchCase=\"'html'\">\r\n <div *ngIf=\"rowData[field]==null?'':rowData[field]\" [innerHTML]=\"rowData[field] | safeHtml\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'metadataStatus'\">\r\n <span *ngIf=\"rowData['rejectReason']\" class=\"label-danger\" [pTooltip]=\"rowData['rejectReason']\"\r\n tooltipStyleClass=\"unset-width\" [escape]=\"false\" tooltipPosition=\"top\">T\u1EEB ch\u1ED1i</span>\r\n <span *ngIf=\"rowData[field] == '0' && !rowData['rejectReason']\" class=\"label-secondary\">Ch\u01B0a\r\n duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '1' && !rowData['rejectReason']\" class=\"label-warning\">Ch\u1EDD duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '2'\" class=\"label-primary\">\u0110\u00E3 duy\u1EC7t</span>\r\n </span>\r\n <ng-container *ngSwitchCase=\"'fileUpload'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"fileUploadColumn; context: {$implicit: rowData, field: col.field, fileSetting: col.fileSetting}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'fileManager'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"fileManagerColumn; context: {$implicit: rowData, field: col.field, fileSetting: col.fileSetting}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'string'\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"null\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(col.dataType)\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded, this)\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentCellString let-rowData let-field=\"field\">\r\n <span>\r\n <!-- __sv: Short Value -->\r\n <ng-container *ngIf=\"rowData[field + '__sv']\">\r\n <ng-container *ngIf=\"!rowData[field + '__showFull']\">\r\n {{rowData[field + '__sv']}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\" pTooltip=\"B\u1EA5m \u0111\u1EC3 xem th\u00EAm\"\r\n tooltipPosition=\"top\">[...]</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData[field + '__showFull']\">\r\n {{rowData[field]}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\">Thu g\u1ECDn</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!rowData[field + '__sv']\">\r\n {{rowData[field]}}\r\n </ng-container>\r\n </span>\r\n</ng-template>\r\n<ng-template #iconToggleRowGroup let-rowData=\"rowData\" let-expanded=\"expanded\">\r\n <a href=\"javascript:;\" (click)=\"handleToggleRow(rowData, $event)\">\r\n <i style=\"margin-right:5px\" [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\r\n </a>\r\n</ng-template>\r\n<ng-template #iconToggleRowData let-rowData=\"rowData\" let-expanded=\"expanded\">\r\n <button type=\"button\" pButton pRipple class=\"link-or-action p-button-text p-button-rounded p-button-plain\"\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n (click)=\"handleToggleRow(rowData, $event)\"></button>\r\n</ng-template>\r\n<ng-template #_contentRowGroup let-rowData=\"rowData\" let-groupCol=\"groupCol\" let-groupField=\"_groupField\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, col: groupCol, field: _groupField}\">\r\n </ng-container>\r\n <span> ({{rowGroupMetadata[rowData[_groupField]].size}})</span>\r\n</ng-template>\r\n<ng-template #entityWorkflowStatus let-rowData=\"rowData\">\r\n <div class=\"container-text-workflow\">\r\n <span class=\"content\">{{rowData.statusString ? rowData.statusString : rowData.strcurrentStateCode}}</span>\r\n <button *ngIf=\"!rowData.hiddenWorkflowAction\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"H\u00E0nh \u0111\u1ED9ng\" tooltipPosition=\"top\"\r\n (click)=\"showActionWorkflow($event, rowData)\"></button>\r\n </div>\r\n</ng-template>\r\n<ng-template #workflowCoreStatus let-rowData=\"rowData\">\r\n <div class=\"container-text-workflow\">\r\n <a class=\"content\" (click)=\"goToTask($event)\" href=\"javascript:;\">{{rowData.strworkflowCoreStatus}}</a>\r\n </div>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <!-- <span class=\"fix-sticky bottom\"></span> -->\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<ng-template #sortIcon let-field=\"field\">\r\n <i class=\"p-sortable-column-icon pi\" style=\"font-size: 0.8em;\"\r\n [ngClass]=\"{'pi-sort-amount-up-alt': field == _sortField && _sortDir === 1, 'pi-sort-amount-down': field == _sortField && _sortDir === -1, 'pi-sort-alt': field != _sortField || _sortDir === 0}\"></i>\r\n</ng-template>\r\n<ng-template #filterDropdown let-col=\"col\">\r\n <div #filterBox style=\"width: 100%; border-radius: 4px;\">\r\n <dropdown *ngIf=\"col && filterSchema.dropdown[col.field]\" [control]=\"filterSchema.dropdown[col.field]\"\r\n [dataSource]=\"filterSchema.dropdown[col.field].dataSource\" [(value)]=\"filterData[col.field]\"\r\n (onHideSmartEvent)=\"onSearch()\" (onShow)=\"onShowFilterDropdownPanel($event)\"\r\n (onHide)=\"onHideFilterDropdownPanel($event)\" (mousedown)=\"initFilterBoxFocus(filterBox)\"></dropdown>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterText let-col=\"col\">\r\n <div #filterBox class=\"text-filter filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <input pInputText type=\"text\" class=\"input-search\" [placeholder]=\"col.label\"\r\n [(ngModel)]=\"filterData[col.field]\" (change)=\"onSearch()\"\r\n (keyup.esc)=\"onClearSearch(filterBox, col.field)\">\r\n </div>\r\n <span [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] != null && filterData[col.field] !== ''}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearSearch(filterBox, col.field)\"\r\n tabindex=\"-1\"><i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterNumber let-col=\"col\">\r\n <div #filterBox class=\"number-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-number-picker-range #numberRange [maskType]=\"col.dataType\" [(ngModel)]=\"filterData[col.field]\"\r\n [min]=\"col.min\" [max]=\"col.max\" (change)=\"onSearch()\">\r\n </tn-number-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearNumberSearch(filterBox, numberRange)\"\r\n tabindex=\"-1\">\r\n <i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterDate let-col=\"col\">\r\n <div #filterBox class=\"date-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-datetime-picker-range #dateRange [control]=\"filterSchema.dateRange\"\r\n (onChanged)=\"onChangeDateTime($event, col.field)\">\r\n </tn-datetime-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\"\r\n (mousedown)=\"onClearDateSearch(filterBox, dateRange, col.field)\" tabindex=\"-1\"><i\r\n class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterBoolean let-col=\"col\">\r\n <div class=\"filter-boolean-box\">\r\n <p-selectButton\r\n [options]=\"[{value: true, label: 'C\u00F3', icon: 'pi pi-check'}, {value: false, label: 'Kh\u00F4ng', icon: 'pi pi-times'}]\"\r\n [multiple]=\"true\" [(ngModel)]=\"filterData[col.field]\" (onChange)=\"onChangeBoolean($event, col.field)\">\r\n <ng-template let-item>\r\n <i style=\"padding: 3px 0;\" [class]=\"item.icon\"></i>\r\n </ng-template>\r\n </p-selectButton>\r\n </div>\r\n</ng-template>\r\n<ng-template #fileUploadColumn let-field=\"field\" let-rowData let-fileSetting=\"fileSetting\">\r\n <file-upload *ngIf=\"fileSetting.control.mode == FileUploadMode.usingFileInstanceId\"\r\n [sharedFolderType]=\"fileSetting.control.sharedFolderType\" [readonly]=\"fileSetting.control.readonly\"\r\n [accept]=\"fileSetting.control.accept\" [(ngModel)]=\"rowData[field]\"\r\n (onChanged)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.CHANGE)\"\r\n (onInit)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.INIT)\"\r\n (onSelect)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.SELECT)\"\r\n (onRemove)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.DELETED)\">\r\n </file-upload>\r\n\r\n <service-file-upload *ngIf=\"fileSetting.control.mode == FileUploadMode.usingServiceFile\"\r\n [serviceCode]=\"fileSetting.control.serviceCode\" [parentContext]=\"context\" [entity]=\"fileSetting.control.entity\"\r\n [entityKey]=\"rowData[fileSetting.control.entityKeyField]\" [control]=\"fileSetting.control\"\r\n [(ngModel)]=\"rowData.field\"\r\n (onChanged)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.CHANGE)\"\r\n (onInit)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.INIT)\"\r\n (onSelect)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.SELECT)\"\r\n (onRemove)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.DELETED)\">\r\n </service-file-upload>\r\n</ng-template>\r\n<ng-template #fileManagerColumn let-rowData let-fileSetting=\"fileSetting\" let-field=\"field\">\r\n <file-manager [control]=\"fileSetting.control\" [serviceCode]=\"fileSetting.control.serviceCode\"\r\n [entity]=\"fileSetting.control.entity\" [entityKey]=\"rowData[fileSetting.control.entityKeyField]\"\r\n [readonly]=\"fileSetting.control.readonly\" [layout]=\"fileSetting.control.layout\"\r\n [fileDataService]=\"fileSetting.control.fileDataService\" [maxFileSize]=\"fileSetting.control.maxFileSize\"\r\n [(value)]=\"rowData[field]\"\r\n (onChanged)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.CHANGE)\"\r\n (onInit)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.INIT)\"\r\n (onSelect)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.SELECT)\"\r\n (onRemove)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.DELETED)\"\r\n (uploaded)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.UPLOADED)\">\r\n </file-manager>\r\n</ng-template>",
|
|
17798
|
+
template: "<div #container class=\"custom-card card card-w-title flex-container-fit-child\" [attr.height-type]=\"setting.heightType\"\r\n [ngStyle]=\"_style\">\r\n <div class=\"ui-helper-clearfix crud-list-header-area\">\r\n <div *ngIf=\"searchCustom\" class=\"p-grid ui-fluid custom-p-col custom-search-area\">\r\n <div class=\"p-col-12 main-container-search\">\r\n <div class=\"p-grid main-container-search-inner\">\r\n <ng-container>\r\n <ng-container *ngTemplateOutlet=\"searchCustom; context: {$implicit: this}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!setting.hiddenHeader\" class=\"p-grid ui-fluid custom-p-col page-title-area\">\r\n <div *ngIf=\"!setting.hiddenPageTitle\" class=\"main-title\">\r\n <h1 *ngIf=\"!hasTemplate('customTitle')\">\r\n {{setting.title != null ? setting.title : 'Danh s\u00E1ch ' + setting.objectName}}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"hasTemplate('customTitle')\" [ngTemplateOutlet]=\"getTemplate('customTitle')\"\r\n [ngTemplateOutletContext]=\"{crudList: this}\">\r\n </ng-container>\r\n </div>\r\n\r\n <div *ngIf=\"!setting.hiddenPageSetting\" class=\"paginator-table\">\r\n <paging-next-back-only [model]=\"model\" [setting]=\"setting\" (onOldest)=\"onOldest($event)\"\r\n (onNext)=\"onNext($event)\" (onPrev)=\"onPrev($event)\" (onLatest)=\"onLatest($event)\"\r\n (onChangeLimitPage)=\"savePageSize()\">\r\n </paging-next-back-only>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"fit-content crud-list-body-area\">\r\n <div class=\"crud-list-body-area-inner\" style=\"overflow: unset;\">\r\n <div class=\"flex-container-fit-child\" style=\"overflow: unset;\">\r\n <div *ngIf=\"!setting.hiddenToolbar\" class=\"p-grid crudListToolbar\">\r\n <ng-container>\r\n <div *ngIf=\"!setting.hiddenButtons && hasTemplate('toolbar')\"\r\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\r\n class=\"p-col-12 button-group function-topbar custom-toolbar\">\r\n <ng-container\r\n [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('toolbar')\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!setting.hiddenButtons && !hasTemplate('toolbar')\"\r\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\r\n class=\"p-col-12 button-group function-topbar\">\r\n <button *ngIf=\"!hiddenAdd\" type=\"button\" pButton pRipple label=\"Th\u00EAm m\u1EDBi\" icon=\"pi pi-plus\"\r\n class=\"p-button-text\" (click)=\"add()\"></button>\r\n <button *ngIf=\"model.selectedItems.length > 0\" type=\"button\" pButton pRipple\r\n label=\"Xu\u1EA5t c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{model.selectedItems.length}})\" icon=\"fas fa-file-excel\"\r\n class=\"p-button-text p-button-success\" (click)=\"xuatCacMucDaChon()\"></button>\r\n <button *ngIf=\"!hiddenDelete && model.selectedItems.length > 0 && !disableMultipleDelete()\"\r\n type=\"button\" pButton pRipple\r\n label=\"{{ 'X\u00F3a' | translate }} ({{model.selectedItems.length}})\" icon=\"pi pi-trash\"\r\n class=\"p-button-text p-button-danger\" (click)=\"deleteMutiple()\"></button>\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('buttonAfterToolbar')\"\r\n [ngTemplateOutletContext]=\"{crudList: this}\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <div *ngIf=\"!setting.hiddenAdvanceSearch\" class=\"p-col-12 advance-search-container\"\r\n [ngClass]=\"setting.hiddenButtons ? 'p-md-12 p-lg-12' : 'p-md-5 p-lg-4'\">\r\n <advance-search #advanceSearch [parentSetting]=\"setting\" [searchInfo]=\"searchInfo\"\r\n [loading]=\"model.loading\" (onSearch)=\"handleSearchAdvs($event)\"\r\n (onInit)=\"handleInitAdvanceSearch($event)\">\r\n </advance-search>\r\n </div>\r\n </div>\r\n <div *ngIf=\"hasTemplate('topGrid')\" class=\"extend-content-top-grid\">\r\n <ng-container [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('topGrid')\"></ng-container>\r\n </div>\r\n <div class=\"container-table fit-content\" [class.--table-responsive]=\"responsive\">\r\n <div class=\"container-table-inner\">\r\n <ng-container *ngIf=\"!_groupField\">\r\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\r\n [showScrollHorizontal]=\"showScrollHorizontal\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\r\n <ng-container [ngTemplateOutlet]=\"hasTemplate('afterCrudList')\"></ng-container>\r\n </ng-container>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"!showScrollBar\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"_groupField\">\r\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\r\n [showScrollHorizontal]=\"showScrollHorizontal\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('afterCrudList')\"></ng-container>\r\n </ng-container>\r\n </tn-custom-scrollbar>\r\n <div *ngIf=\"!showScrollBar\">\r\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"table-border-line --top\"></div>\r\n <div class=\"table-border-line --right\"></div>\r\n <div class=\"table-border-line --bottom\"></div>\r\n <div class=\"table-border-line --left\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<after-view-checked (loaded)=\"handleReady()\"></after-view-checked>\r\n<settings *ngIf=\"_showSettings && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\r\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveSettings($event)\"\r\n (onCancel)=\"_showSettings = false\">\r\n</settings>\r\n<settings-row *ngIf=\"_showSettingsRowColor && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\r\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveColorSettings($event)\"\r\n (onCancel)=\"_showSettingsRowColor = false\">\r\n</settings-row>\r\n<workflow-setting-dialog *ngIf=\"_showSettingsWorkflow && !setting.hiddenSettingWorkflow\" [parentSetting]=\"setting\"\r\n [parentContext]=\"context\" [parentModel]=\"model\" (onSaved)=\"onSaveWorkflowSettings($event)\"\r\n (onRemoved)=\"onRemoveWorkflowSettings($event)\" (onCancel)=\"_showSettingsWorkflow = false\"></workflow-setting-dialog>\r\n<entity-permission *ngIf=\"_showSettingsPermission && !setting.hiddenSettingPermission\" [parentSetting]=\"setting\"\r\n [parentContext]=\"context\" [parentModel]=\"model\" [searchInfo]=\"searchInfo\"\r\n (onCancel)=\"_showSettingsPermission = false\">\r\n</entity-permission>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\r\n<tn-dialog *ngIf=\"showFormWorkflow\" #dialog [header]=\"headerWorkflow | translate\" [popupSize]=\"popupSizeWorkflow\"\r\n [scrollBarStyleClass]=\"'fit-content'\" (onHide)=\"showFormWorkflow = false\">\r\n <div style=\"height: 100%\">\r\n <simple-workflow-form #formBase [baseService]=\"setting.baseService\" [item]=\"currentItem\"\r\n [action]=\"actionWorkflow\" (onInvalidWorkflow)=\"handleInvalidWF($event)\" (onSaved)=\"handleProcessedWorflow()\"\r\n (onCancel)=\"showFormWorkflow = false\">\r\n </simple-workflow-form>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"processWorkflowModel.showEditForm\" #dialog [header]=\"processWorkflowModel.header | translate\"\r\n [popupSize]=\"processWorkflowModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"processWorkflowModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <process-workflow-form #formBase [bussinessSetting]=\"setting\" [item]=\"currentItem\"\r\n [workflow]=\"processWorkflowModel.data.workflow\" [action]=\"processWorkflowModel.data.action\"\r\n (onSaved)=\"handleProcessedWorkflowBase()\" (onCancel)=\"processWorkflowModel.showEditForm = false\">\r\n </process-workflow-form>\r\n </div>\r\n</tn-dialog>\r\n<tn-dialog *ngIf=\"workflowHistoryModel.showEditForm\" #dialog [header]=\"workflowHistoryModel.header | translate\"\r\n [popupSize]=\"workflowHistoryModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\r\n (onHide)=\"workflowHistoryModel.showEditForm = false\">\r\n <div style=\"height: 100%\">\r\n <workflow-history-new #formBase [baseService]=\"setting.baseService\" [item]=\"currentItem\"\r\n [workflowSetting]=\"workflowHistoryModel.data.workflowSetting\"\r\n (onCancel)=\"workflowHistoryModel.showEditForm = false\">\r\n </workflow-history-new>\r\n </div>\r\n</tn-dialog>\r\n<workflow-history-dialog *ngIf=\"showHistoryWorkflow\" [baseService]=\"setting.baseService\" [item]=\"currentItem\"\r\n [workflowSetting]=\"setting.workflowSetting\" (onHide)=\"handleHideHistoryWorkflow()\">\r\n</workflow-history-dialog>\r\n<ng-template #tableGetGroupFieldFalse>\r\n <p-table #table [dataKey]=\"'id'\" [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\"\r\n [columns]=\"setting.cols\" [paginator]=\"false\" [value]=\"_dataSource\" (onSort)=\"onSort($event, table)\"\r\n [class]=\"_tableClass\" [responsive]=\"responsive\" [lazy]=\"lazy\" [loading]=\"model.loading\"\r\n [(selection)]=\"model.selectedItems\" (onRowReorder)=\"handleRowOrdered($event)\">\r\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-index=\"rowIndex\" let-expanded=\"expanded\">\r\n <ng-container\r\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: expanded, eventSelectRow: handleSelectRow, eventChecked: handleCheckRowData}\">\r\n </ng-container>\r\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\r\n (loaded)=\"handleTableRendered()\">\r\n </after-view-checked>\r\n </ng-template>\r\n <ng-template *ngIf=\"rowExpansion\" pTemplate=\"rowexpansion\" let-rowData let-expanded=\"expanded\">\r\n <ng-container\r\n *ngTemplateOutlet=\"rowExpansion; context: {rowData: rowData, expanded: expanded, getColSpanGroup: getColSpanGroup}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\r\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n </p-table>\r\n</ng-template>\r\n<ng-template #tableGetGroupFieldTrue>\r\n <p-table #tableGroup [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\" [columns]=\"setting.cols\"\r\n [paginator]=\"false\" [value]=\"_dataSource\" [metaKeySelection]=\"false\" (onSort)=\"onSort($event, tableGroup)\"\r\n [class]=\"_tableClass\" [customSort]=\"true\" [responsive]=\"responsive\" [lazy]=\"true\" [loading]=\"model.loading\"\r\n [(selection)]=\"model.selectedItems\" [expandedRowKeys]=\"model.expandedRowKeys\" [dataKey]=\"_groupField\">\r\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll_Group}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\r\n <ng-container\r\n *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll_Group}\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\" let-expanded=\"expanded\" let-columns=\"columns\">\r\n <tr *ngIf=\"rowGroupMetadata[rowData[_groupField]] && rowGroupMetadata[rowData[_groupField]].index == rowIndex\"\r\n class=\"p-widget-header group-row\" style=\"border: 0px; border-bottom: 1px solid #eee\">\r\n <td *ngIf=\"!setting.hiddenCheckbox\" class=\"center chkbox\" [class.sticky]=\"setting.stickyColumn\">\r\n <p-checkbox [(ngModel)]=\"rowGroupChecked[rowData[_groupField]]\" binary=\"true\"\r\n (onChange)=\"handleCheckRowGroup(rowData)\">\r\n </p-checkbox>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngIf=\"!rowGroup\">\r\n <td [colSpan]=\"getColSpanGroup()\" [class]=\"_classRowGroup\">\r\n <div class=\"container-row-group\">\r\n <a href=\"javascript:;\" [pRowToggler]=\"rowData\" class=\"container-row-group-toggle\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <i style=\"margin-right:5px\"\r\n [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\r\n <span class=\"content-row-group\">\r\n <ng-container *ngIf=\"!contentRowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"_contentRowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"contentRowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"contentRowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\r\n </ng-container>\r\n </ng-container>\r\n </span>\r\n </a>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowGroup\">\r\n <ng-container [ngTemplateOutlet]=\"rowGroup\"\r\n [ngTemplateOutletContext]=\"getContextRowGroupRoot(rowData, expanded)\">\r\n </ng-container>\r\n </ng-container>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"rowexpansion\" let-columns=\"columns\" let-rowData let-index=\"rowIndex\">\r\n <ng-container\r\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: false, eventSelectRow: handleSelectRowGroup, eventChecked: handleCheckRowData_Group}\">\r\n </ng-container>\r\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\r\n (loaded)=\"handleTableRendered()\">\r\n </after-view-checked>\r\n </ng-template>\r\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\r\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\r\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\r\n </ng-template>\r\n </p-table>\r\n <after-view-checked></after-view-checked>\r\n</ng-template>\r\n<ng-template #trHeader let-columns let-funcCheckAll=\"funcCheckAll\">\r\n <tr class=\"title-row\">\r\n <ng-container *ngIf=\"!setting.hiddenCheckbox\">\r\n <th [style.width]=\"widthCheckbox\" class=\"chkbox link-or-action cell-checkbox\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <button *ngIf=\"!hasTemplate('headerCheckbox')\" type=\"button\" pButton pRipple icon=\"pi pi-refresh\"\r\n class=\"p-button-rounded p-button-text btnReload\" pTooltip=\"L\u00E0m m\u1EDBi d\u1EEF li\u1EC7u\" tooltipPosition=\"top\"\r\n [disabled]=\"model.loading\" (click)=\"reload()\"></button>\r\n <ng-container *ngIf=\"hasTemplate('headerCheckbox')\">\r\n <ng-container [ngTemplateOutletContext]=\"{crudList: this}\"\r\n [ngTemplateOutlet]=\"getTemplate('headerCheckbox')\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"!setting.hiddenOrderColumn\" [style.width]=\"widthOrderColumn\" class=\"stt nopad center\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n {{ 'TT' |translate}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"rowExpansion\" class=\"nopad row-expansion-toggle center\" style=\"width: 2.5rem\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <th *ngIf=\"col && col.visible && col.field!='function'\" [ngStyle]=\"col.extendData.headerStyle\"\r\n [pTooltip]=\"col.fullLabel\" tooltipStyleClass=\"unset-width\" [class]=\"col.extendData.headerClass\"\r\n [class.first-th]=\"i==0\" [escape]=\"false\" tooltipPosition=\"top\" [tnSortableColumn]=\"col.field\">\r\n <ng-container *ngTemplateOutlet=\"contentTh; context: {$implicit: col}\"></ng-container>\r\n <ng-container *ngIf=\"col.sort || col.sortClient\">\r\n <ng-container *ngTemplateOutlet=\"sortIcon; context: {field: col.field}\"></ng-container>\r\n </ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngTemplateOutlet=\"colFunctionHeader\"></ng-container>\r\n </tr>\r\n <ng-container *ngTemplateOutlet=\"rowHeaderFilter; context: {columns: columns, funcCheckAll: funcCheckAll}\">\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #rowHeaderFilter let-columns=\"columns\" let-funcCheckAll=\"funcCheckAll\">\r\n <tr class=\"filter-row\" *ngIf=\"!setting.hiddenFilterRow\">\r\n <th *ngIf=\"!setting.hiddenCheckbox\" class=\"chkbox nopad center\" [class.sticky]=\"setting.stickyColumn\"\r\n [class.tricheckbox-custom-false]=\"checkedAll === false\" [style.width]=\"widthCheckbox\">\r\n <p-triStateCheckbox [(ngModel)]=\"checkedAll\" binary=\"true\" (onChange)=\"funcCheckAll()\">\r\n </p-triStateCheckbox>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"!setting.hiddenOrderColumn\" class=\"stt center v-top\" [class.sticky]=\"setting.stickyColumn\">\r\n <div *ngIf=\"!setting.hiddenSetting\" class=\"pick-color-row\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB m\u00E0u\"\r\n tooltipPosition=\"top\" (click)=\"showSettingRowColor()\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"rowExpansion\" class=\"nopad center row-expansion-toggle\" [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <th *ngIf=\"col.visible && col.field != 'function'\" class=\"cell-header-filter center\">\r\n <ng-container *ngIf=\"col.allowFilter\">\r\n <ng-container *ngIf=\"col.templateFilter\">\r\n <ng-container [ngTemplateOutlet]=\"col.templateFilter\"\r\n [ngTemplateOutletContext]=\"{col: col, filterData: filterData, onSearch: onSearch, onShowFilterDropdownPanel: onShowFilterDropdownPanel, onHideFilterDropdownPanel: onHideFilterDropdownPanel}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.templateFilter\" [ngSwitch]=\"col.controlType\">\r\n <ng-container *ngSwitchCase=\"'dropdown'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDropdown\"\r\n [ngTemplateOutletContext]=\"{col: col.rawColumn}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'number'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\" [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <ng-container *ngSwitchCase=\"'int'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'decimal'\">\r\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <ng-container [ngTemplateOutlet]=\"filterDate\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'boolean'\">\r\n <ng-container [ngTemplateOutlet]=\"filterBoolean\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"filterText\"\r\n [ngTemplateOutletContext]=\"{col: col}\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n <th *ngIf=\"!setting.hiddenFunctionColumn\" class=\"center setting-cell column-function\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <button *ngIf=\"!setting.hiddenSetting\" type=\"button\" pButton pRipple icon=\"pi pi-cog\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB\" tooltipPosition=\"top\"\r\n (click)=\"showSettings()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingPermission\" type=\"button\" pButton pRipple icon=\"pi pi-users\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"Ph\u00E2n quy\u1EC1n d\u1EEF li\u1EC7u\" tooltipPosition=\"left\"\r\n (click)=\"showSettingsPermission()\"></button>\r\n <button *ngIf=\"!setting.hiddenSettingWorkflow\" type=\"button\" pButton pRipple icon=\"pi pi-sitemap\"\r\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh quy tr\u00ECnh\" tooltipPosition=\"left\"\r\n (click)=\"showSettingsWorkflow()\"></button>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </tr>\r\n</ng-template>\r\n<ng-template #colFunctionHeader>\r\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\r\n <th class=\"column-function\" [class.sticky]=\"setting.stickyColumn\"\r\n [style.width]=\"widthFunctionColumn || _widthFunctionColumn\">\r\n <div class=\"cell-header-function\">\r\n <span>{{'GRID.FUNCTION'| translate}}</span>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </th>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentTh let-col>\r\n <ng-container *ngIf=\"templateHeaderContent[col.field]\">\r\n <ng-container *ngTemplateOutlet=\"templateHeaderContent[col.field]\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!templateHeaderContent[col.field]\">\r\n {{col.label}}\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n</ng-template>\r\n<ng-template #trBody let-rowData let-columns=\"columns\" let-index=\"index\" let-expanded=\"expanded\"\r\n let-eventSelectRow=\"eventSelectRow\" let-eventChecked=\"eventChecked\">\r\n <tr [tnReorderableRow]=\"index\" [attr.rowIndex]=\"index\"\r\n [ngClass]=\"mergeClassObj(rowData, { 'ui-state-highlight': rowData._checked })\" [pTooltip]=\"rowData.tooltip\"\r\n tooltipPosition=\"top\" [tooltipStyleClass]=\"rowData.tooltipClass\" [escape]=\"escape\"\r\n (click)=\"eventSelectRow($event, rowData)\">\r\n <ng-container *ngIf=\"!setting.hiddenCheckbox\">\r\n <td [style.width]=\"widthCheckbox\" class=\"chkbox link-or-action cell-checkbox\"\r\n [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngIf=\"!hasTemplate('checkbox')\">\r\n <p-checkbox [(ngModel)]=\"rowData._checked\" binary=\"true\" (onChange)=\"eventChecked(rowData)\">\r\n </p-checkbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"hasTemplate('checkbox')\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('checkbox')\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n <td *ngIf=\"!setting.hiddenOrderColumn && (!rowData.hidden || !rowData.hidden[fieldOrder])\"\r\n [style.width]=\"widthOrderColumn\" class=\"stt\" style=\"text-align: center;\"\r\n [class.sticky]=\"setting.stickyColumn\" [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldOrder]\"\r\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldOrder]\">\r\n <span class=\"row-card\" [ngStyle]=\"getBookmarkColor(rowData, columns)\"></span>\r\n {{rowData[fieldOrder]}}\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <td *ngIf=\"rowExpansion\" class=\"no-padding center row-expansion-toggle\" [class.sticky]=\"setting.stickyColumn\">\r\n <ng-container *ngTemplateOutlet=\"iconToggleRowData; context: {rowData: rowData, expanded: expanded}\">\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container\r\n *ngTemplateOutlet=\"dynamicColBodys; context: {$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\r\n </ng-container>\r\n <td *ngIf=\"enableReorderRow\" class=\"no-padding center\">\r\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\" pReorderableRowHandle></i>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\r\n <td class=\"text-center column-function\" style=\"text-align: center;\" [class.sticky]=\"setting.stickyColumn\">\r\n <div *ngIf=\"hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutlet]=\"getTemplate('function')\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\r\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\r\n [ngTemplateOutlet]=\"getTemplate('buttonBefore')\"></ng-container>\r\n <button *ngIf=\"setting.showVersionButton\" type=\"button\" pButton pRipple icon=\"fas fa-history\"\r\n class=\"p-button-rounded p-button-success link-or-action\" pTooltip=\"Xem l\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\"\r\n tooltipPosition=\"top\" (click)=\"showListVersion(rowData)\"></button>\r\n <button *ngIf=\"!rowData.hiddenEdit\" type=\"button\" pButton pRipple [disabled]=\"disableEdit(rowData)\"\r\n pTooltip=\"{{'FORM.EDIT' | translate}}\" tooltipPosition=\"top\"\r\n class=\"p-button-rounded p-button-text p-button-info link-or-action\" icon=\"pi pi-pencil\"\r\n (click)=\"edit(rowData)\"></button>\r\n <button *ngIf=\"!rowData.hiddenDelete\" type=\"button\" pButton pRipple\r\n [disabled]=\"disableDelete(rowData)\" pTooltip=\"{{'FORM.DELETE' | translate}}\"\r\n tooltipPosition=\"top\" class=\"p-button-rounded p-button-text p-button-danger link-or-action\"\r\n icon=\"pi pi-trash\" (click)=\"delete(rowData)\"></button>\r\n <button *ngIf=\"this.menuButtons\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\"\r\n tooltipPosition=\"top\" (click)=\"showContextMenu($event, rowData)\"></button>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n</ng-template>\r\n<ng-template #dynamicColBodys let-columns let-rowData=\"rowData\" let-index=\"index\" let-expanded=\"expanded\">\r\n <ng-container *ngFor=\"let col of columns; let i = index\">\r\n <ng-container\r\n *ngTemplateOutlet=\"contentTd; context: {$implicit: rowData, col: col, index: index, i: i, expanded: expanded}\">\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentTd let-rowData let-col=\"col\" let-index=\"index\" let-expanded=\"expanded\" let-i=\"i\">\r\n <td *ngIf=\"col && col.visible && col.field != 'function' && (!rowData.hidden || !rowData.hidden[col.field])\"\r\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[col.field]\"\r\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[col.field]\" [ngStyle]=\"col.extendData.style\"\r\n [class]=\"col.cellClass\" [class.first-td]=\"i == 0\">\r\n <span *ngIf=\"col.pipe\">\r\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span>\r\n {{rowData['pipe__' + col.field]}}\r\n </span>\r\n <span *ngIf=\"!col.pipe\">\r\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\r\n tooltipPosition=\"top\">{{col.label}}</span>\r\n <span *ngIf=\"setting.showEditLink && col.showEditLink\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\"\r\n class=\"link-or-action\">\r\n <a href=\"javascript:;\" (click)=\"view(rowData)\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\r\n </ng-container>\r\n </a>\r\n </span>\r\n <span *ngIf=\"!setting.showEditLink || !col.showEditLink\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\r\n </ng-container>\r\n </span>\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n</ng-template>\r\n<ng-template #contentCell let-col=\"col\" let-rowData=\"rowData\" let-rowIndex=\"rowIndex\" let-field=\"field\"\r\n let-expanded=\"expanded\">\r\n <ng-container *ngIf=\"col.template\">\r\n <ng-container [ngTemplateOutlet]=\"col.template\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded,this)\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!col.template\">\r\n <ng-container [ngSwitch]=\"col.dataType\">\r\n <span *ngSwitchCase=\"'color'\" style=\"display:block;text-align:center;\">\r\n <div pTooltip=\"{{rowData[field]}}\" tooltipPosition=\"top\" [ngStyle]=\"{'background-color':rowData[field]}\"\r\n style=\"width:30px;height:30px;margin:0 auto;\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'icon'\" style=\"display:block;text-align:center;\">\r\n <i pTooltip=\"{{rowData[field]}}\" tooltipPosition=\"top\" style=\"text-align: center;\"\r\n [ngClass]=\"rowData[field]\"></i>\r\n </span>\r\n <span *ngSwitchCase=\"'date'\" pTooltip=\"{{rowData[field] | date:'dd/MM/yyyy'}}\" tooltipPosition=\"top\">\r\n {{_crudService.renderDate(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'datetime'\" pTooltip=\"{{rowData[field] | date:'dd/MM/yyyy HH:mm'}}\"\r\n tooltipPosition=\"top\">\r\n {{_crudService.renderDateTime(rowData[field], col.format)}}\r\n </span>\r\n <span *ngSwitchCase=\"'user'\" class=\"user\">\r\n {{rowData[field] | userFormat | async}}\r\n </span>\r\n <div *ngSwitchCase=\"'users'\" [innerHTML]=\"rowData[field] | usersFormat | async\">\r\n </div>\r\n <span *ngSwitchCase=\"'int'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'decimal'\">\r\n {{rowData[field]}}\r\n </span>\r\n <span *ngSwitchCase=\"'boolean'\">\r\n <p-checkbox class=\"boolean-data-type\" [(ngModel)]=\"rowData[field]\" binary=\"true\"\r\n [disabled]=\"col.disableCheckBox\">\r\n </p-checkbox>\r\n </span>\r\n <span *ngSwitchCase=\"'html'\">\r\n <div *ngIf=\"rowData[field]==null?'':rowData[field]\" [innerHTML]=\"rowData[field] | safeHtml\"></div>\r\n </span>\r\n <span *ngSwitchCase=\"'metadataStatus'\">\r\n <span *ngIf=\"rowData['rejectReason']\" class=\"label-danger\" [pTooltip]=\"rowData['rejectReason']\"\r\n tooltipStyleClass=\"unset-width\" [escape]=\"false\" tooltipPosition=\"top\">T\u1EEB ch\u1ED1i</span>\r\n <span *ngIf=\"rowData[field] == '0' && !rowData['rejectReason']\" class=\"label-secondary\">Ch\u01B0a\r\n duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '1' && !rowData['rejectReason']\" class=\"label-warning\">Ch\u1EDD duy\u1EC7t</span>\r\n <span *ngIf=\"rowData[field] == '2'\" class=\"label-primary\">\u0110\u00E3 duy\u1EC7t</span>\r\n </span>\r\n <ng-container *ngSwitchCase=\"'string'\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"null\">\r\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container [ngTemplateOutlet]=\"getComponentByType(col.dataType)\"\r\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded, this)\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #contentCellString let-rowData let-field=\"field\">\r\n <span>\r\n <!-- __sv: Short Value -->\r\n <ng-container *ngIf=\"rowData[field + '__sv']\">\r\n <ng-container *ngIf=\"!rowData[field + '__showFull']\">\r\n {{rowData[field + '__sv']}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\" pTooltip=\"B\u1EA5m \u0111\u1EC3 xem th\u00EAm\"\r\n tooltipPosition=\"top\">[...]</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"rowData[field + '__showFull']\">\r\n {{rowData[field]}}\r\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\">Thu g\u1ECDn</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!rowData[field + '__sv']\">\r\n {{rowData[field]}}\r\n </ng-container>\r\n </span>\r\n</ng-template>\r\n<ng-template #iconToggleRowGroup let-rowData=\"rowData\" let-expanded=\"expanded\">\r\n <a href=\"javascript:;\" (click)=\"handleToggleRow(rowData, $event)\">\r\n <i style=\"margin-right:5px\" [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\r\n </a>\r\n</ng-template>\r\n<ng-template #iconToggleRowData let-rowData=\"rowData\" let-expanded=\"expanded\">\r\n <button type=\"button\" pButton pRipple class=\"link-or-action p-button-text p-button-rounded p-button-plain\"\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n (click)=\"handleToggleRow(rowData, $event)\"></button>\r\n</ng-template>\r\n<ng-template #_contentRowGroup let-rowData=\"rowData\" let-groupCol=\"groupCol\" let-groupField=\"_groupField\">\r\n <ng-container [ngTemplateOutlet]=\"contentCell\"\r\n [ngTemplateOutletContext]=\"{rowData: rowData, col: groupCol, field: _groupField}\">\r\n </ng-container>\r\n <span> ({{rowGroupMetadata[rowData[_groupField]].size}})</span>\r\n</ng-template>\r\n<ng-template #entityWorkflowStatus let-rowData=\"rowData\">\r\n <div class=\"container-text-workflow\">\r\n <span class=\"content\">{{rowData.statusString ? rowData.statusString : rowData.strcurrentStateCode}}</span>\r\n <button *ngIf=\"!rowData.hiddenWorkflowAction\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"H\u00E0nh \u0111\u1ED9ng\" tooltipPosition=\"top\"\r\n (click)=\"showActionWorkflow($event, rowData)\"></button>\r\n </div>\r\n</ng-template>\r\n<ng-template #workflowCoreStatus let-rowData=\"rowData\">\r\n <div class=\"container-text-workflow\">\r\n <a class=\"content\" (click)=\"goToTask($event)\" href=\"javascript:;\">{{rowData.strworkflowCoreStatus}}</a>\r\n </div>\r\n</ng-template>\r\n<ng-template #containerSticky>\r\n <span class=\"fix-sticky top\"></span>\r\n <span class=\"fix-sticky right\"></span>\r\n <!-- <span class=\"fix-sticky bottom\"></span> -->\r\n <span class=\"fix-sticky left\"></span>\r\n</ng-template>\r\n<ng-template #sortIcon let-field=\"field\">\r\n <i class=\"p-sortable-column-icon pi\" style=\"font-size: 0.8em;\"\r\n [ngClass]=\"{'pi-sort-amount-up-alt': field == _sortField && _sortDir === 1, 'pi-sort-amount-down': field == _sortField && _sortDir === -1, 'pi-sort-alt': field != _sortField || _sortDir === 0}\"></i>\r\n</ng-template>\r\n<ng-template #filterDropdown let-col=\"col\">\r\n <div #filterBox style=\"width: 100%; border-radius: 4px;\">\r\n <dropdown *ngIf=\"col && filterSchema.dropdown[col.field]\" [control]=\"filterSchema.dropdown[col.field]\"\r\n [dataSource]=\"filterSchema.dropdown[col.field].dataSource\" [(value)]=\"filterData[col.field]\"\r\n (onHideSmartEvent)=\"onSearch()\" (onShow)=\"onShowFilterDropdownPanel($event)\"\r\n (onHide)=\"onHideFilterDropdownPanel($event)\" (mousedown)=\"initFilterBoxFocus(filterBox)\"></dropdown>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterText let-col=\"col\">\r\n <div #filterBox class=\"text-filter filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <input pInputText type=\"text\" class=\"input-search\" [placeholder]=\"col.label\"\r\n [(ngModel)]=\"filterData[col.field]\" (change)=\"onSearch()\"\r\n (keyup.esc)=\"onClearSearch(filterBox, col.field)\">\r\n </div>\r\n <span [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] != null && filterData[col.field] !== ''}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearSearch(filterBox, col.field)\"\r\n tabindex=\"-1\"><i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterNumber let-col=\"col\">\r\n <div #filterBox class=\"number-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-number-picker-range #numberRange [maskType]=\"col.dataType\" [(ngModel)]=\"filterData[col.field]\"\r\n [min]=\"col.min\" [max]=\"col.max\" (change)=\"onSearch()\">\r\n </tn-number-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearNumberSearch(filterBox, numberRange)\"\r\n tabindex=\"-1\">\r\n <i class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterDate let-col=\"col\">\r\n <div #filterBox class=\"date-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\r\n <div tabindex=\"-1\">\r\n <tn-datetime-picker-range #dateRange [control]=\"filterSchema.dateRange\"\r\n (onChanged)=\"onChangeDateTime($event, col.field)\">\r\n </tn-datetime-picker-range>\r\n </div>\r\n <span\r\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\r\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\"\r\n (mousedown)=\"onClearDateSearch(filterBox, dateRange, col.field)\" tabindex=\"-1\"><i\r\n class=\"pi pi-filter-slash\"></i></span>\r\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\r\n </after-view-checked>\r\n </div>\r\n</ng-template>\r\n<ng-template #filterBoolean let-col=\"col\">\r\n <div class=\"filter-boolean-box\">\r\n <p-selectButton\r\n [options]=\"[{value: true, label: 'C\u00F3', icon: 'pi pi-check'}, {value: false, label: 'Kh\u00F4ng', icon: 'pi pi-times'}]\"\r\n [multiple]=\"true\" [(ngModel)]=\"filterData[col.field]\" (onChange)=\"onChangeBoolean($event, col.field)\">\r\n <ng-template let-item>\r\n <i style=\"padding: 3px 0;\" [class]=\"item.icon\"></i>\r\n </ng-template>\r\n </p-selectButton>\r\n </div>\r\n</ng-template>",
|
|
17912
17799
|
providers: [DecimalPipe, DatePipe],
|
|
17913
|
-
styles: [".container-table{display:flex;flex-direction:column;overflow:hidden}.container-table .container-table-inner{display:flex;height:auto;max-height:100%;min-height:60px;position:relative}.container-table-inner>tn-custom-scrollbar{width:100%}.cell-checkbox{text-align:center}.pick-color-row{border:1px solid #d1d1d1;border-radius:2px;bottom:0;cursor:pointer;display:flex;flex-wrap:wrap;height:1.4em;left:0;margin:auto;position:absolute;right:0;top:0;width:1.4em}.pick-color-row>div{background:#84d140;border:1px solid #fff;flex:0 0 50%}.pick-color-row>div:nth-child(2){background:#fc6868}.pick-color-row>div:nth-child(3){background:#fbc02d}.pick-color-row>div:nth-child(4){background:#7dc5ff}.cell-header-function{align-items:center;display:flex}.cell-header-function>span{flex:1 1;text-align:center}.cell-header-function button{height:24px;margin:0;padding:0;width:24px}.group-icon{color:#256aa2;font-weight:400}.group-icon i{font-size:.8em;margin-right:5px}.center{text-align:center!important}.row-card{height:100%;left:0;position:absolute;top:0;width:5px}.column-function{
|
|
17800
|
+
styles: [".container-table{display:flex;flex-direction:column;overflow:hidden}.container-table .container-table-inner{display:flex;height:auto;max-height:100%;min-height:60px;position:relative}.container-table-inner>tn-custom-scrollbar{width:100%}.cell-checkbox{text-align:center}.pick-color-row{border:1px solid #d1d1d1;border-radius:2px;bottom:0;cursor:pointer;display:flex;flex-wrap:wrap;height:1.4em;left:0;margin:auto;position:absolute;right:0;top:0;width:1.4em}.pick-color-row>div{background:#84d140;border:1px solid #fff;flex:0 0 50%}.pick-color-row>div:nth-child(2){background:#fc6868}.pick-color-row>div:nth-child(3){background:#fbc02d}.pick-color-row>div:nth-child(4){background:#7dc5ff}.cell-header-function{align-items:center;display:flex}.cell-header-function>span{flex:1 1;text-align:center}.cell-header-function button{height:24px;margin:0;padding:0;width:24px}.group-icon{color:#256aa2;font-weight:400}.group-icon i{font-size:.8em;margin-right:5px}.center{text-align:center!important}.row-card{height:100%;left:0;position:absolute;top:0;width:5px}.column-function{min-width:80px;padding:0}.custom-search-area{background-color:#f2f2f2;margin:-.5em -1em .5em;padding-left:.5em;padding-right:.5em}.main-container-search-inner{margin-bottom:-.5em}.filter-row>th:not(.sticky):not(.chkbox){padding:3px!important}.container-text-workflow{align-items:center;display:flex;justify-content:center}.container-text-workflow .link-or-action{color:#2196f3;cursor:pointer}.container-text-workflow .content{flex:1 1}.btnReload{height:2rem!important;left:50%;position:absolute;top:50%;transform:translate(-50%,calc(-50% - 1px));width:2rem}.toggle-showfull{color:#00f;cursor:pointer;font-size:.8rem;font-weight:700;white-space:nowrap}::ng-deep crud-list .advance-search-container{display:flex;justify-content:flex-end}::ng-deep crud-list advance-search{display:block;flex:1;max-width:400px}::ng-deep crud-list .main-container-search-inner .container-control>div{overflow:hidden}::ng-deep crud-list .ps__rail-x,::ng-deep crud-list .ps__rail-y{z-index:5}::ng-deep crud-list .p-datatable .p-datatable-thead>tr>th.cell-fixed-filter{z-index:999}::ng-deep crud-list .p-datatable .p-datatable-thead>tr>th.cell-fixed-filter .fixed-filter{min-width:200px;position:fixed;z-index:10}::ng-deep crud-list .p-datatable .p-datatable-thead>tr>th .container-icon-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}::ng-deep crud-list .check-all-custom{height:0;position:absolute;width:0}::ng-deep crud-list .cell-header-filter{position:relative}::ng-deep crud-list .cell-header-filter .tn-dropdown{height:32px}::ng-deep crud-list .cell-header-filter tn-mask .p-inputtext{width:100%}::ng-deep crud-list .cell-header-filter .filter-box{background-color:#fff;border-radius:3px;display:flex;min-width:0}::ng-deep crud-list .cell-header-filter .filter-box>div{border:1px solid #ced4da;border-radius:3px 0 0 3px;border-right:none;flex:1;outline:none;overflow:hidden}::ng-deep crud-list .cell-header-filter .filter-box>span{align-items:center;background:#f5f6f8;border:1px solid #ced4da;color:#6c757d;cursor:pointer;display:inline-flex;flex-basis:32px;height:32px;justify-content:center;min-width:unset;outline:none}::ng-deep crud-list .cell-header-filter .filter-box>span.action-clear{border-radius:0 3px 3px 0}::ng-deep crud-list .cell-header-filter .filter-box>span.action-clear.dirty{color:#008eff}::ng-deep crud-list .cell-header-filter .filter-box input{border:none;box-shadow:none!important;padding-left:5px;padding-right:5px}::ng-deep crud-list .cell-header-filter .filter-box:not(.no-transition){transition:min-width .1s}::ng-deep crud-list .cell-header-filter .filter-box.boolean-filter>div{flex:0 0 109px;width:109px}::ng-deep crud-list .cell-header-filter .p-multiselect-label.p-placeholder{padding-left:.5rem;padding-right:.5rem}::ng-deep crud-list .cell-header-filter.focus-within,::ng-deep crud-list .cell-header-filter:focus-within{z-index:10!important}::ng-deep crud-list .cell-header-filter.focus-within .filter-boolean-box .p-button,::ng-deep crud-list .cell-header-filter:focus-within .filter-boolean-box .p-button{z-index:10}::ng-deep crud-list .cell-header-filter.focus-within .filter-box>div,::ng-deep crud-list .cell-header-filter:focus-within .filter-box>div{border-color:#2196f3;box-shadow:0 0 0 .2rem #a6d5fa;z-index:0}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box{box-shadow:5px 0 15px 1px rgba(0,0,0,.27058823529411763);min-width:250px;position:absolute;top:calc(50% - 16px);z-index:2}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box>div,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box>div{border-color:#2196f3;box-shadow:0 0 0 .2rem #a6d5fa;flex:1;z-index:0}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box>span.action-clear,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box>span.action-clear{display:flex}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box.boolean-filter,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box.boolean-filter{min-width:140px}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box.boolean-filter>div,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box.boolean-filter>div{flex:0 0 109px;width:109px}::ng-deep crud-list .cell-header-filter.focus-within:nth-last-child(2) .short-filter-box,::ng-deep crud-list .cell-header-filter:focus-within:nth-last-child(2) .short-filter-box{left:50%;transform:translateX(-50%)}::ng-deep crud-list .cell-header-filter:last-child .filter-box{right:3px}::ng-deep crud-list .table-border-line{background-color:#eee;position:absolute;z-index:5}::ng-deep crud-list .table-border-line.--left,::ng-deep crud-list .table-border-line.--right{bottom:0;top:0;width:1px}::ng-deep crud-list .table-border-line.--bottom,::ng-deep crud-list .table-border-line.--top{height:1px;left:0;right:0}::ng-deep crud-list .table-border-line.--left{left:0}::ng-deep crud-list .table-border-line.--right{right:0}::ng-deep crud-list .table-border-line.--top{top:0}::ng-deep crud-list .table-border-line.--bottom{bottom:0}::ng-deep crud-list .filter-boolean-box{text-align:center}::ng-deep crud-list .filter-boolean-box .p-selectbutton{white-space:nowrap}::ng-deep crud-list .custom-search-area crud-form{width:100%}::ng-deep crud-list>p-contextmenu{display:none}@media (max-width:640px){::ng-deep crud-list .--table-responsive .p-datatable-wrapper{padding:1px}}"]
|
|
17914
17801
|
},] }
|
|
17915
17802
|
];
|
|
17916
17803
|
CrudListComponent.ctorParameters = () => [
|
|
@@ -18419,17 +18306,8 @@ class DataListBase extends ComponentBase {
|
|
|
18419
18306
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18420
18307
|
});
|
|
18421
18308
|
}
|
|
18422
|
-
validateEdit(rowData) {
|
|
18423
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
18424
|
-
return true;
|
|
18425
|
-
});
|
|
18426
|
-
}
|
|
18427
18309
|
_edit(rowData, scopeDataEdit = {}) {
|
|
18428
18310
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18429
|
-
const resultValidate = yield this.validateEdit(rowData);
|
|
18430
|
-
if (!resultValidate) {
|
|
18431
|
-
return;
|
|
18432
|
-
}
|
|
18433
18311
|
const flashShow = rowData[KeyFlashShow];
|
|
18434
18312
|
delete rowData[KeyFlashShow];
|
|
18435
18313
|
this.formModel.formState = FormState.EDIT;
|
|
@@ -18459,44 +18337,33 @@ class DataListBase extends ComponentBase {
|
|
|
18459
18337
|
getPromiseDeleteItem(rowData) {
|
|
18460
18338
|
return this.setting.baseService.delete(rowData.id);
|
|
18461
18339
|
}
|
|
18462
|
-
validateDelete(rowData) {
|
|
18463
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
18464
|
-
return true;
|
|
18465
|
-
});
|
|
18466
|
-
}
|
|
18467
18340
|
_delete(rowData) {
|
|
18468
|
-
|
|
18469
|
-
|
|
18470
|
-
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
if (!resultValidate) {
|
|
18341
|
+
if (rowData.__disableDelete) {
|
|
18342
|
+
return;
|
|
18343
|
+
}
|
|
18344
|
+
this._notifierService.showDeleteConfirm().then(rs => {
|
|
18345
|
+
if (!rs) {
|
|
18474
18346
|
return;
|
|
18475
18347
|
}
|
|
18476
|
-
this.
|
|
18477
|
-
|
|
18478
|
-
|
|
18479
|
-
|
|
18480
|
-
|
|
18481
|
-
|
|
18482
|
-
.then(response => {
|
|
18483
|
-
if (response.success) {
|
|
18484
|
-
if (this.setting.showVersionButton) {
|
|
18485
|
-
this.context.fireEvent(ComCtxConstants.COMMON.RELOAD_DATA_VERSION, {}, true);
|
|
18486
|
-
}
|
|
18487
|
-
else {
|
|
18488
|
-
this._triggerProcessData();
|
|
18489
|
-
}
|
|
18490
|
-
this._notifierService.showDeleteDataSuccess();
|
|
18348
|
+
if (this.setting.baseService) {
|
|
18349
|
+
this.getPromiseDeleteItem(rowData)
|
|
18350
|
+
.then(response => {
|
|
18351
|
+
if (response.success) {
|
|
18352
|
+
if (this.setting.showVersionButton) {
|
|
18353
|
+
this.context.fireEvent(ComCtxConstants.COMMON.RELOAD_DATA_VERSION, {}, true);
|
|
18491
18354
|
}
|
|
18492
18355
|
else {
|
|
18493
|
-
this.
|
|
18356
|
+
this._triggerProcessData();
|
|
18494
18357
|
}
|
|
18495
|
-
|
|
18496
|
-
|
|
18497
|
-
|
|
18498
|
-
|
|
18499
|
-
|
|
18358
|
+
this._notifierService.showDeleteDataSuccess();
|
|
18359
|
+
}
|
|
18360
|
+
else {
|
|
18361
|
+
this._notifierService.showWarningByReponse(response);
|
|
18362
|
+
}
|
|
18363
|
+
}, error => {
|
|
18364
|
+
this._notifierService.showDeleteDataError();
|
|
18365
|
+
});
|
|
18366
|
+
}
|
|
18500
18367
|
});
|
|
18501
18368
|
}
|
|
18502
18369
|
getPromiseDeleteItems(items) {
|
|
@@ -18805,11 +18672,7 @@ class DataListBase extends ComponentBase {
|
|
|
18805
18672
|
promise = schema.baseService.getDataDropdown(schema.groupCode, arrValue, this.createDropdownOptions(schema));
|
|
18806
18673
|
}
|
|
18807
18674
|
else {
|
|
18808
|
-
|
|
18809
|
-
if (schema.modifyFilter) {
|
|
18810
|
-
schema.modifyFilter(filters);
|
|
18811
|
-
}
|
|
18812
|
-
promise = schema.baseService.getDataDropdownByFilter(filters, this.createDropdownOptions(schema));
|
|
18675
|
+
promise = schema.baseService.getDataDropdownByFilter([this.newFilter(schema.valueField, Operator.in, arrValue)], this.createDropdownOptions(schema));
|
|
18813
18676
|
}
|
|
18814
18677
|
if (schema.order != null) {
|
|
18815
18678
|
const result = yield promise;
|
|
@@ -18851,7 +18714,6 @@ class DataListBase extends ComponentBase {
|
|
|
18851
18714
|
});
|
|
18852
18715
|
}
|
|
18853
18716
|
mergeRefDataToDatasource(dataSource, schema, data) {
|
|
18854
|
-
data !== null && data !== void 0 ? data : (data = []);
|
|
18855
18717
|
const field = schema.field;
|
|
18856
18718
|
let funcGetLabel = item => item[schema.displayField] || item['label'];
|
|
18857
18719
|
if (schema.funcGetLabel) {
|
|
@@ -19515,7 +19377,9 @@ class AddressComponent extends DataFormBase {
|
|
|
19515
19377
|
label: 'Tỉnh/Thành phố',
|
|
19516
19378
|
required: this.control.required && this.control.requiredProvince,
|
|
19517
19379
|
baseService: this._addressService,
|
|
19518
|
-
defaultFilters: [{ field: 'level', operator: Operator.equal, value: ENUM_DON_VI_HANH_CHINH.THANH_PHO.toString() }
|
|
19380
|
+
defaultFilters: [{ field: 'level', operator: Operator.equal, value: ENUM_DON_VI_HANH_CHINH.THANH_PHO.toString() },
|
|
19381
|
+
{ field: 'version', operator: Operator.equal, value: "-1" }
|
|
19382
|
+
],
|
|
19519
19383
|
valueField: 'id',
|
|
19520
19384
|
displayField: 'name',
|
|
19521
19385
|
fieldPlus: 'idRoot',
|
|
@@ -19531,7 +19395,9 @@ class AddressComponent extends DataFormBase {
|
|
|
19531
19395
|
label: 'Quận/Huyện',
|
|
19532
19396
|
required: this.control.required && this.control.requiredDistrict,
|
|
19533
19397
|
baseService: this._addressService,
|
|
19534
|
-
defaultFilters: [{ field: 'level', operator: Operator.equal, value: ENUM_DON_VI_HANH_CHINH.QUAN_HUYEN.toString() }
|
|
19398
|
+
defaultFilters: [{ field: 'level', operator: Operator.equal, value: ENUM_DON_VI_HANH_CHINH.QUAN_HUYEN.toString() },
|
|
19399
|
+
{ field: 'version', operator: Operator.equal, value: "-1" }
|
|
19400
|
+
],
|
|
19535
19401
|
bindingFilters: [{ field: 'parentId', operator: Operator.equal, sourceField: 'idProvince', subField: 'idRoot' }],
|
|
19536
19402
|
valueField: 'id',
|
|
19537
19403
|
displayField: 'name',
|
|
@@ -19546,7 +19412,9 @@ class AddressComponent extends DataFormBase {
|
|
|
19546
19412
|
label: 'Phường/Xã',
|
|
19547
19413
|
required: this.control.required && this.control.requiredWard,
|
|
19548
19414
|
baseService: this._addressService,
|
|
19549
|
-
defaultFilters: [{ field: 'level', operator: Operator.equal, value: ENUM_DON_VI_HANH_CHINH.PHUONG_XA.toString() }
|
|
19415
|
+
defaultFilters: [{ field: 'level', operator: Operator.equal, value: ENUM_DON_VI_HANH_CHINH.PHUONG_XA.toString() },
|
|
19416
|
+
{ field: 'version', operator: Operator.equal, value: "-1" }
|
|
19417
|
+
],
|
|
19550
19418
|
bindingFilters: [{ field: 'parentId', operator: Operator.equal, sourceField: 'idDistrict', subField: 'idRoot' }],
|
|
19551
19419
|
valueField: 'id',
|
|
19552
19420
|
displayField: 'name',
|
|
@@ -19681,6 +19549,246 @@ AddressComponent.propDecorators = {
|
|
|
19681
19549
|
onReady: [{ type: Output }]
|
|
19682
19550
|
};
|
|
19683
19551
|
|
|
19552
|
+
var ENUM_DON_VI_HANH_CHINH$1;
|
|
19553
|
+
(function (ENUM_DON_VI_HANH_CHINH) {
|
|
19554
|
+
ENUM_DON_VI_HANH_CHINH[ENUM_DON_VI_HANH_CHINH["THANH_PHO"] = 1] = "THANH_PHO";
|
|
19555
|
+
// QUAN_HUYEN = 2,
|
|
19556
|
+
ENUM_DON_VI_HANH_CHINH[ENUM_DON_VI_HANH_CHINH["PHUONG_XA"] = 2] = "PHUONG_XA";
|
|
19557
|
+
ENUM_DON_VI_HANH_CHINH[ENUM_DON_VI_HANH_CHINH["DUONG"] = 3] = "DUONG";
|
|
19558
|
+
})(ENUM_DON_VI_HANH_CHINH$1 || (ENUM_DON_VI_HANH_CHINH$1 = {}));
|
|
19559
|
+
|
|
19560
|
+
class AddressService$1 extends BaseService {
|
|
19561
|
+
constructor(http, injector, _moduleConfigService) {
|
|
19562
|
+
super(http, injector, `${_moduleConfigService.getConfig().environment.apiDomain.commonMasterDataEndpoint}/${_moduleConfigService.getConfig().environment.apiVersion}/Address`);
|
|
19563
|
+
this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.commonMasterDataEndpoint;
|
|
19564
|
+
}
|
|
19565
|
+
}
|
|
19566
|
+
AddressService$1.ɵprov = ɵɵdefineInjectable({ factory: function AddressService_Factory() { return new AddressService$1(ɵɵinject(HttpClient), ɵɵinject(INJECTOR), ɵɵinject(ModuleConfigService)); }, token: AddressService$1, providedIn: "root" });
|
|
19567
|
+
AddressService$1.decorators = [
|
|
19568
|
+
{ type: Injectable, args: [{
|
|
19569
|
+
providedIn: 'root'
|
|
19570
|
+
},] }
|
|
19571
|
+
];
|
|
19572
|
+
AddressService$1.ctorParameters = () => [
|
|
19573
|
+
{ type: HttpClient },
|
|
19574
|
+
{ type: Injector },
|
|
19575
|
+
{ type: ModuleConfigService }
|
|
19576
|
+
];
|
|
19577
|
+
|
|
19578
|
+
class AddressNewComponent extends DataFormBase {
|
|
19579
|
+
constructor(_injector, _addressService, _moduleConfigService, _deviceDetectorService) {
|
|
19580
|
+
super(_injector);
|
|
19581
|
+
this._injector = _injector;
|
|
19582
|
+
this._addressService = _addressService;
|
|
19583
|
+
this._moduleConfigService = _moduleConfigService;
|
|
19584
|
+
this._deviceDetectorService = _deviceDetectorService;
|
|
19585
|
+
this.viewMode = false;
|
|
19586
|
+
this._showSubLabel = true;
|
|
19587
|
+
this.readyToReload = false;
|
|
19588
|
+
this._readyStatus = {};
|
|
19589
|
+
this.onSelect = new EventEmitter();
|
|
19590
|
+
this.dataChange = new EventEmitter();
|
|
19591
|
+
this.onReady = new EventEmitter();
|
|
19592
|
+
this.doNotCheckBaseService = true;
|
|
19593
|
+
}
|
|
19594
|
+
set disabled(value) {
|
|
19595
|
+
this._disabled = value;
|
|
19596
|
+
this.setDisabledControl();
|
|
19597
|
+
}
|
|
19598
|
+
set data(value) {
|
|
19599
|
+
if (this._modelData != value && isLiteralObject(value))
|
|
19600
|
+
this._modelData = mergeJSON(this._modelData, value);
|
|
19601
|
+
else if (value == null)
|
|
19602
|
+
this._modelData = {};
|
|
19603
|
+
}
|
|
19604
|
+
;
|
|
19605
|
+
set showSubLabel(value) {
|
|
19606
|
+
this._showSubLabel = value;
|
|
19607
|
+
this.setShowLabel();
|
|
19608
|
+
}
|
|
19609
|
+
ngOnInit() {
|
|
19610
|
+
this.control._component = this;
|
|
19611
|
+
super.ngOnInit();
|
|
19612
|
+
// Nếu đã ẩn quận huyện thì phải ẩn luôn cả phường xã
|
|
19613
|
+
// Vì nếu không load dữ liệu sẽ không chuẩn
|
|
19614
|
+
// if (this.control.hideDistrict) {
|
|
19615
|
+
// this.control.hideWard = true;
|
|
19616
|
+
// }
|
|
19617
|
+
this.setting.schema = [
|
|
19618
|
+
new DropdownControlSchema({
|
|
19619
|
+
field: 'idProvince',
|
|
19620
|
+
label: 'Tỉnh/Thành phố',
|
|
19621
|
+
required: this.control.required && this.control.requiredProvince,
|
|
19622
|
+
baseService: this._addressService,
|
|
19623
|
+
defaultFilters: [{ field: 'level', operator: Operator.equal, value: ENUM_DON_VI_HANH_CHINH$1.THANH_PHO.toString() },
|
|
19624
|
+
{ field: 'version', operator: Operator.equal, value: "1" }],
|
|
19625
|
+
valueField: 'id',
|
|
19626
|
+
displayField: 'name',
|
|
19627
|
+
fieldPlus: 'idRoot',
|
|
19628
|
+
sortField: 'sort',
|
|
19629
|
+
mdWidth: this.control.provinceWidth,
|
|
19630
|
+
disabled: this._disabled,
|
|
19631
|
+
callbackDataFinish: (evt) => {
|
|
19632
|
+
this.readyToReload = true;
|
|
19633
|
+
}
|
|
19634
|
+
}),
|
|
19635
|
+
// new DropdownControlSchema({
|
|
19636
|
+
// field: 'idDistrict',
|
|
19637
|
+
// label: 'Quận/Huyện',
|
|
19638
|
+
// required: this.control.required && this.control.requiredDistrict,
|
|
19639
|
+
// baseService: this._addressService,
|
|
19640
|
+
// defaultFilters: [{ field: 'level', operator: Operator.equal, value: ENUM_DON_VI_HANH_CHINH.QUAN_HUYEN.toString() }],
|
|
19641
|
+
// bindingFilters: [{ field: 'parentId', operator: Operator.equal, sourceField: 'idProvince', subField: 'idRoot' }],
|
|
19642
|
+
// valueField: 'id',
|
|
19643
|
+
// displayField: 'name',
|
|
19644
|
+
// fieldPlus: 'idRoot',
|
|
19645
|
+
// sortField: 'sort',
|
|
19646
|
+
// mdWidth: this.control.districtWidth,
|
|
19647
|
+
// disabled: this._disabled,
|
|
19648
|
+
// hidden: this.control.hideDistrict
|
|
19649
|
+
// }),
|
|
19650
|
+
new DropdownControlSchema({
|
|
19651
|
+
field: 'idWard',
|
|
19652
|
+
label: 'Phường/Xã',
|
|
19653
|
+
required: this.control.required && this.control.requiredWard,
|
|
19654
|
+
baseService: this._addressService,
|
|
19655
|
+
defaultFilters: [{ field: 'level', operator: Operator.equal, value: ENUM_DON_VI_HANH_CHINH$1.PHUONG_XA.toString() },
|
|
19656
|
+
{ field: 'version', operator: Operator.equal, value: "1" }
|
|
19657
|
+
],
|
|
19658
|
+
bindingFilters: [{ field: 'parentId', operator: Operator.equal, sourceField: 'idProvince', subField: 'idRoot' }],
|
|
19659
|
+
valueField: 'id',
|
|
19660
|
+
displayField: 'name',
|
|
19661
|
+
fieldPlus: 'idRoot',
|
|
19662
|
+
sortField: 'sort',
|
|
19663
|
+
mdWidth: this.control.wardWidth,
|
|
19664
|
+
disabled: this._disabled,
|
|
19665
|
+
hidden: this.control.hideWard
|
|
19666
|
+
}),
|
|
19667
|
+
new TextControlSchema({
|
|
19668
|
+
field: 'street',
|
|
19669
|
+
label: 'Đường',
|
|
19670
|
+
required: this.control.required && this.control.requiredStreet,
|
|
19671
|
+
mdWidth: this.control.streetWidth,
|
|
19672
|
+
disabled: this._disabled,
|
|
19673
|
+
hidden: this.control.hideStreet
|
|
19674
|
+
}),
|
|
19675
|
+
new TextControlSchema({
|
|
19676
|
+
field: 'no',
|
|
19677
|
+
label: 'Số nhà',
|
|
19678
|
+
required: this.control.required && this.control.requiredNo,
|
|
19679
|
+
mdWidth: this.control.noWidth,
|
|
19680
|
+
disabled: this._disabled,
|
|
19681
|
+
hidden: this.control.hideNo
|
|
19682
|
+
})
|
|
19683
|
+
];
|
|
19684
|
+
if (this.viewMode) {
|
|
19685
|
+
this.getModelText();
|
|
19686
|
+
}
|
|
19687
|
+
}
|
|
19688
|
+
setDisabledControl() {
|
|
19689
|
+
const disabled = this._disabled ? true : null;
|
|
19690
|
+
this.setting.schema.forEach(ctrl => ctrl.disabled = disabled);
|
|
19691
|
+
}
|
|
19692
|
+
handleValueChange(evt) {
|
|
19693
|
+
this.dataChange.emit(this._modelData);
|
|
19694
|
+
this.onSelect.emit(this._modelData);
|
|
19695
|
+
}
|
|
19696
|
+
handleReady(field) {
|
|
19697
|
+
this._readyStatus[field] = true;
|
|
19698
|
+
if (this._readyStatus['idProvince']
|
|
19699
|
+
&& (this.control.hideDistrict || this._readyStatus['idDistrict'])
|
|
19700
|
+
&& (this.control.hideWard || this._readyStatus['idWard'])) {
|
|
19701
|
+
this.onReady.emit(this.control.field);
|
|
19702
|
+
}
|
|
19703
|
+
}
|
|
19704
|
+
setShowLabel() {
|
|
19705
|
+
}
|
|
19706
|
+
getModelText() {
|
|
19707
|
+
const values = [];
|
|
19708
|
+
if (this._modelData.idProvince)
|
|
19709
|
+
values.push(this._modelData.idProvince);
|
|
19710
|
+
if (!this.control.hideDistrict && this._modelData.idDistrict)
|
|
19711
|
+
values.push(this._modelData.idDistrict);
|
|
19712
|
+
if (!this.control.hideWard && this._modelData.idWard)
|
|
19713
|
+
values.push(this._modelData.idWard);
|
|
19714
|
+
if (values.length > 0) {
|
|
19715
|
+
const result = {
|
|
19716
|
+
province: '',
|
|
19717
|
+
district: '',
|
|
19718
|
+
ward: '',
|
|
19719
|
+
street: this._modelData.street,
|
|
19720
|
+
no: this._modelData.no
|
|
19721
|
+
};
|
|
19722
|
+
this._addressService.getAll([
|
|
19723
|
+
this.newFilter('id', Operator.in, values)
|
|
19724
|
+
], 'id,name').then(res => this.handleResponse(res, '', data => {
|
|
19725
|
+
if (this._modelData.idProvince) {
|
|
19726
|
+
const province = data.data.find(p => p.id == this._modelData.idProvince);
|
|
19727
|
+
if (province)
|
|
19728
|
+
result.province = province.name;
|
|
19729
|
+
}
|
|
19730
|
+
if (!this.control.hideDistrict && this._modelData.idDistrict) {
|
|
19731
|
+
const district = data.data.find(p => p.id == this._modelData.idDistrict);
|
|
19732
|
+
if (district)
|
|
19733
|
+
result.district = district.name;
|
|
19734
|
+
}
|
|
19735
|
+
if (!this.control.hideWard && this._modelData.idWard) {
|
|
19736
|
+
const ward = data.data.find(p => p.id == this._modelData.idWard);
|
|
19737
|
+
if (ward)
|
|
19738
|
+
result.ward = ward.name;
|
|
19739
|
+
}
|
|
19740
|
+
this.setModelText(result);
|
|
19741
|
+
}));
|
|
19742
|
+
}
|
|
19743
|
+
}
|
|
19744
|
+
setModelText(objAddress) {
|
|
19745
|
+
let str = ``;
|
|
19746
|
+
if (objAddress.no) {
|
|
19747
|
+
str += `, Số ${objAddress.no}`;
|
|
19748
|
+
}
|
|
19749
|
+
if (objAddress.street) {
|
|
19750
|
+
str += `, Đường ${objAddress.street}`;
|
|
19751
|
+
}
|
|
19752
|
+
if (!this.control.hideDistrict && objAddress.ward) {
|
|
19753
|
+
str += `, ${objAddress.ward}`;
|
|
19754
|
+
}
|
|
19755
|
+
if (!this.control.hideDistrict && objAddress.district) {
|
|
19756
|
+
str += `, ${objAddress.district}`;
|
|
19757
|
+
}
|
|
19758
|
+
if (objAddress.province) {
|
|
19759
|
+
str += `, ${objAddress.province}`;
|
|
19760
|
+
}
|
|
19761
|
+
if (str !== '') {
|
|
19762
|
+
str = str.substring(2).trim();
|
|
19763
|
+
}
|
|
19764
|
+
this.modelString = str;
|
|
19765
|
+
}
|
|
19766
|
+
}
|
|
19767
|
+
AddressNewComponent.decorators = [
|
|
19768
|
+
{ type: Component, args: [{
|
|
19769
|
+
selector: 'address-new-picker',
|
|
19770
|
+
template: "<ng-container *ngIf=\"!viewMode\">\r\n <div\r\n [ngStyle]=\"control.showInBox?{border: '1px solid #ced4da', 'borderRadius': '5px' }: { margin: '-0.5rem -1rem -1rem -1rem' }\">\r\n <crud-form #crudForm [(data)]=\"_modelData\" [setting]=\"setting\" [context]=\"context\" [autoFocus]=\"false\"\r\n (onFormReady)=\"_handleFormReady($event)\" (onChange)=\"handleValueChange($event)\"\r\n (onControlReady)=\"handleReady($event)\">\r\n </crud-form>\r\n </div>\r\n</ng-container>\r\n<ng-container *ngIf=\"viewMode\">\r\n {{modelString}}\r\n</ng-container>",
|
|
19771
|
+
styles: [".control-padding-fix{padding-left:0}@media (max-width:640px){::ng-deep address-new-picker>div{min-width:100%}}"]
|
|
19772
|
+
},] }
|
|
19773
|
+
];
|
|
19774
|
+
AddressNewComponent.ctorParameters = () => [
|
|
19775
|
+
{ type: Injector },
|
|
19776
|
+
{ type: AddressService$1 },
|
|
19777
|
+
{ type: ModuleConfigService },
|
|
19778
|
+
{ type: DeviceDetectorService }
|
|
19779
|
+
];
|
|
19780
|
+
AddressNewComponent.propDecorators = {
|
|
19781
|
+
crudForm: [{ type: ViewChild, args: [CrudFormComponent, { static: false },] }],
|
|
19782
|
+
control: [{ type: Input }],
|
|
19783
|
+
disabled: [{ type: Input }],
|
|
19784
|
+
viewMode: [{ type: Input }],
|
|
19785
|
+
data: [{ type: Input }],
|
|
19786
|
+
showSubLabel: [{ type: Input }],
|
|
19787
|
+
onSelect: [{ type: Output }],
|
|
19788
|
+
dataChange: [{ type: Output }],
|
|
19789
|
+
onReady: [{ type: Output }]
|
|
19790
|
+
};
|
|
19791
|
+
|
|
19684
19792
|
class AfterViewCheckedComponent extends ComponentBase {
|
|
19685
19793
|
constructor(injector) {
|
|
19686
19794
|
super(injector);
|
|
@@ -19918,12 +20026,7 @@ class AutoCompletePickerComponent extends ComponentBase {
|
|
|
19918
20026
|
}
|
|
19919
20027
|
buildFilterKeyword() {
|
|
19920
20028
|
if (this.fieldSearchText.length == 1) {
|
|
19921
|
-
|
|
19922
|
-
this.getFilterOnSearch = value => this.newFilterV4(this.control.displayField, Operator.contain, value.toString());
|
|
19923
|
-
}
|
|
19924
|
-
else {
|
|
19925
|
-
this.getFilterOnSearch = value => this.newFilter(this.control.displayField, Operator.contain, value);
|
|
19926
|
-
}
|
|
20029
|
+
this.getFilterOnSearch = value => this.newFilter(this.control.displayField, Operator.contain, value);
|
|
19927
20030
|
}
|
|
19928
20031
|
else {
|
|
19929
20032
|
this.getFilterOnSearch = value => {
|
|
@@ -19931,15 +20034,8 @@ class AutoCompletePickerComponent extends ComponentBase {
|
|
|
19931
20034
|
logic: 'or',
|
|
19932
20035
|
filters: []
|
|
19933
20036
|
});
|
|
19934
|
-
|
|
19935
|
-
|
|
19936
|
-
result.filters.push(this.newFilterV4(fieldSearch, Operator.contain, value.toString()));
|
|
19937
|
-
}
|
|
19938
|
-
}
|
|
19939
|
-
else {
|
|
19940
|
-
for (const fieldSearch of this.fieldSearchText) {
|
|
19941
|
-
result.filters.push(this.newFilter(fieldSearch, Operator.contain, value));
|
|
19942
|
-
}
|
|
20037
|
+
for (const fieldSearch of this.fieldSearchText) {
|
|
20038
|
+
result.filters.push(this.newFilter(fieldSearch, Operator.contain, value));
|
|
19943
20039
|
}
|
|
19944
20040
|
return result;
|
|
19945
20041
|
};
|
|
@@ -20001,28 +20097,15 @@ class AutoCompletePickerComponent extends ComponentBase {
|
|
|
20001
20097
|
}
|
|
20002
20098
|
getData() {
|
|
20003
20099
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20004
|
-
if (this.control.modifyInitSearchData) {
|
|
20005
|
-
yield this.control.modifyInitSearchData(this);
|
|
20006
|
-
}
|
|
20007
20100
|
const filters = [];
|
|
20008
20101
|
if (this.control.multiple) {
|
|
20009
20102
|
if (this.value && this.value.length > 0) {
|
|
20010
|
-
|
|
20011
|
-
filters.push(this.newFilterV4(this.control.valueField, Operator.notIn, this.value.join(',')));
|
|
20012
|
-
}
|
|
20013
|
-
else {
|
|
20014
|
-
filters.push(this.newFilter(this.control.valueField, Operator.notIn, this.value));
|
|
20015
|
-
}
|
|
20103
|
+
filters.push(this.newFilter(this.control.valueField, Operator.notIn, this.value));
|
|
20016
20104
|
}
|
|
20017
20105
|
}
|
|
20018
20106
|
else {
|
|
20019
20107
|
if (this.value) {
|
|
20020
|
-
|
|
20021
|
-
filters.push(this.newFilterV4(this.control.valueField, Operator.notEqual, this.value.toString()));
|
|
20022
|
-
}
|
|
20023
|
-
else {
|
|
20024
|
-
filters.push(this.newFilter(this.control.valueField, Operator.notEqual, this.value));
|
|
20025
|
-
}
|
|
20108
|
+
filters.push(this.newFilter(this.control.valueField, Operator.notEqual, this.value));
|
|
20026
20109
|
}
|
|
20027
20110
|
}
|
|
20028
20111
|
yield appendDefaultFilter(filters, this.control.defaultFilters);
|
|
@@ -20209,17 +20292,9 @@ class AutoCompletePickerComponent extends ComponentBase {
|
|
|
20209
20292
|
if (this.control.multiple) {
|
|
20210
20293
|
let dataSource = [];
|
|
20211
20294
|
if (this.value && this.value.length > 0) {
|
|
20212
|
-
|
|
20213
|
-
|
|
20214
|
-
|
|
20215
|
-
this.newFilterV4(this.control.valueField, Operator.in, this.value.join(','))
|
|
20216
|
-
];
|
|
20217
|
-
}
|
|
20218
|
-
else {
|
|
20219
|
-
filters = [
|
|
20220
|
-
this.newFilter(this.control.valueField, Operator.in, this.value)
|
|
20221
|
-
];
|
|
20222
|
-
}
|
|
20295
|
+
const filters = [
|
|
20296
|
+
this.newFilter(this.control.valueField, Operator.in, this.value)
|
|
20297
|
+
];
|
|
20223
20298
|
if (this.control.modifyFilter) {
|
|
20224
20299
|
const allow = yield this.control.modifyFilter(filters);
|
|
20225
20300
|
if (allow === false) {
|
|
@@ -20238,17 +20313,9 @@ class AutoCompletePickerComponent extends ComponentBase {
|
|
|
20238
20313
|
else {
|
|
20239
20314
|
let dataSource = [];
|
|
20240
20315
|
if (this.value) {
|
|
20241
|
-
|
|
20242
|
-
|
|
20243
|
-
|
|
20244
|
-
this.newFilterV4(this.control.valueField, Operator.equal, this.value.toString())
|
|
20245
|
-
];
|
|
20246
|
-
}
|
|
20247
|
-
else {
|
|
20248
|
-
filters = [
|
|
20249
|
-
this.newFilter(this.control.valueField, Operator.equal, this.value)
|
|
20250
|
-
];
|
|
20251
|
-
}
|
|
20316
|
+
const filters = [
|
|
20317
|
+
this.newFilter(this.control.valueField, Operator.equal, this.value)
|
|
20318
|
+
];
|
|
20252
20319
|
if (this.control.modifyFilter) {
|
|
20253
20320
|
const allow = yield this.control.modifyFilter(filters);
|
|
20254
20321
|
if (allow === false) {
|
|
@@ -20312,12 +20379,7 @@ class AutoCompletePickerComponent extends ComponentBase {
|
|
|
20312
20379
|
if (this.control.multiple) {
|
|
20313
20380
|
if (obj != null && obj.length > 0) {
|
|
20314
20381
|
const filters = [];
|
|
20315
|
-
|
|
20316
|
-
filters.push(this.newFilterV4(this.control.valueField, Operator.in, obj.join(',')));
|
|
20317
|
-
}
|
|
20318
|
-
else {
|
|
20319
|
-
filters.push(this.newFilter(this.control.valueField, Operator.in, obj));
|
|
20320
|
-
}
|
|
20382
|
+
filters.push(this.newFilter(this.control.valueField, Operator.in, obj));
|
|
20321
20383
|
if (this.control.modifyFilter) {
|
|
20322
20384
|
yield this.control.modifyFilter(filters);
|
|
20323
20385
|
}
|
|
@@ -20338,17 +20400,9 @@ class AutoCompletePickerComponent extends ComponentBase {
|
|
|
20338
20400
|
}
|
|
20339
20401
|
else {
|
|
20340
20402
|
if (obj != null) {
|
|
20341
|
-
|
|
20342
|
-
|
|
20343
|
-
|
|
20344
|
-
this.newFilterV4(this.control.valueField, Operator.equal, obj.toString())
|
|
20345
|
-
];
|
|
20346
|
-
}
|
|
20347
|
-
else {
|
|
20348
|
-
filters = [
|
|
20349
|
-
this.newFilter(this.control.valueField, Operator.equal, obj)
|
|
20350
|
-
];
|
|
20351
|
-
}
|
|
20403
|
+
const filters = [
|
|
20404
|
+
this.newFilter(this.control.valueField, Operator.equal, obj)
|
|
20405
|
+
];
|
|
20352
20406
|
if (this.control.modifyFilter) {
|
|
20353
20407
|
yield this.control.modifyFilter(filters);
|
|
20354
20408
|
}
|
|
@@ -20417,7 +20471,6 @@ AutoCompletePickerComponent.ctorParameters = () => [
|
|
|
20417
20471
|
AutoCompletePickerComponent.propDecorators = {
|
|
20418
20472
|
control: [{ type: Input }],
|
|
20419
20473
|
disabled: [{ type: Input }],
|
|
20420
|
-
parentPath: [{ type: Input }],
|
|
20421
20474
|
popupSize: [{ type: Input }],
|
|
20422
20475
|
onSelect: [{ type: Output }],
|
|
20423
20476
|
onUnSelect: [{ type: Output }],
|
|
@@ -20534,6 +20587,23 @@ class FileObjectService extends BaseService {
|
|
|
20534
20587
|
getScanFileUploadEndpoint(correlationId) {
|
|
20535
20588
|
return `${this.serviceCode}/CreateScannedFile/${correlationId}`;
|
|
20536
20589
|
}
|
|
20590
|
+
isTypeFileKySo(fileName) {
|
|
20591
|
+
let fileExtension = this.getFileExtension(fileName);
|
|
20592
|
+
if (fileExtension) {
|
|
20593
|
+
fileExtension = fileExtension.toLowerCase();
|
|
20594
|
+
if (fileExtension.indexOf('.') > -1) {
|
|
20595
|
+
const arr = fileExtension.split('.');
|
|
20596
|
+
fileExtension = arr[arr.length - 1];
|
|
20597
|
+
}
|
|
20598
|
+
if ((/(pdf|doc|docx|xls|xlsm|xlsx)$/i).test(fileExtension)) {
|
|
20599
|
+
return true;
|
|
20600
|
+
}
|
|
20601
|
+
}
|
|
20602
|
+
return false;
|
|
20603
|
+
}
|
|
20604
|
+
getPublicDownloadLinkByFileId(fileId) {
|
|
20605
|
+
return `${this.serviceUri}/public/${fileId}/download`;
|
|
20606
|
+
}
|
|
20537
20607
|
}
|
|
20538
20608
|
FileObjectService.ɵprov = ɵɵdefineInjectable({ factory: function FileObjectService_Factory() { return new FileObjectService(ɵɵinject(HttpClient), ɵɵinject(INJECTOR), ɵɵinject(ModuleConfigService)); }, token: FileObjectService, providedIn: "root" });
|
|
20539
20609
|
FileObjectService.decorators = [
|
|
@@ -21447,13 +21517,10 @@ class MenuService {
|
|
|
21447
21517
|
}
|
|
21448
21518
|
});
|
|
21449
21519
|
}
|
|
21450
|
-
renderMenuByAppCode(
|
|
21520
|
+
renderMenuByAppCode(appCode) {
|
|
21451
21521
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21452
21522
|
this._menuItems = [];
|
|
21453
|
-
|
|
21454
|
-
if (scopeName) {
|
|
21455
|
-
menuUrl = `assets/menus/${scopeName.toLocaleLowerCase()}/${appCode.toLocaleLowerCase()}.json`;
|
|
21456
|
-
}
|
|
21523
|
+
const menuUrl = `assets/menus/${appCode.toLocaleLowerCase()}.json`;
|
|
21457
21524
|
fetch(menuUrl).then((rs) => __awaiter(this, void 0, void 0, function* () {
|
|
21458
21525
|
const menu = JSON.parse(yield rs.text());
|
|
21459
21526
|
this.setMenuItems(menu);
|
|
@@ -21612,7 +21679,7 @@ class AppMenuComponent {
|
|
|
21612
21679
|
// Nếu là môi trường triển khai thì cộng thêm tiền tố phân hệ vào router link để có thể chuột phải mở tab mới
|
|
21613
21680
|
funcSetNewTabLink = link => `/${appCodeLowerCase}${link}`;
|
|
21614
21681
|
}
|
|
21615
|
-
this._menuService.renderMenuByAppCode(
|
|
21682
|
+
this._menuService.renderMenuByAppCode(appCode);
|
|
21616
21683
|
this.model = this._menuService.getMenuItems();
|
|
21617
21684
|
this._router.events.pipe(filter(event => event instanceof NavigationEnd))
|
|
21618
21685
|
.subscribe(event => {
|
|
@@ -23968,7 +24035,7 @@ ReportQueueComponent.propDecorators = {
|
|
|
23968
24035
|
};
|
|
23969
24036
|
|
|
23970
24037
|
class CommonAppComponentComponent {
|
|
23971
|
-
constructor(_globalService, _commonService, renderer, translate, _oauthService, _authenService, _userService, _router, _title, _signalRService, _storageUpdatedService, _customRouteService, _applicationContext, _componentContextService, _activatedRoute, _deviceDetectorService, _cd, _tnClientService, _coreConfigService, _notifierService, _entityMetadataService, _moduleConfigService, _translateService, _messageService, _confirmService, _menuService, _primengConfig, _storageService
|
|
24038
|
+
constructor(_globalService, _commonService, renderer, translate, _oauthService, _authenService, _userService, _router, _title, _signalRService, _storageUpdatedService, _customRouteService, _applicationContext, _componentContextService, _activatedRoute, _deviceDetectorService, _cd, _tnClientService, _coreConfigService, _notifierService, _entityMetadataService, _moduleConfigService, _translateService, _messageService, _confirmService, _menuService, _primengConfig, _storageService) {
|
|
23972
24039
|
this._globalService = _globalService;
|
|
23973
24040
|
this._commonService = _commonService;
|
|
23974
24041
|
this.renderer = renderer;
|
|
@@ -23997,7 +24064,6 @@ class CommonAppComponentComponent {
|
|
|
23997
24064
|
this._menuService = _menuService;
|
|
23998
24065
|
this._primengConfig = _primengConfig;
|
|
23999
24066
|
this._storageService = _storageService;
|
|
24000
|
-
this._permissionService = _permissionService;
|
|
24001
24067
|
this.showQuickNote = true;
|
|
24002
24068
|
this.allowAnonymous = false;
|
|
24003
24069
|
this._unsubscribeAll = new Subject();
|
|
@@ -24150,15 +24216,6 @@ class CommonAppComponentComponent {
|
|
|
24150
24216
|
root.data.allowAnonymous = this.allowAnonymous;
|
|
24151
24217
|
// get current User
|
|
24152
24218
|
this._userService.populateCurrentUser();
|
|
24153
|
-
this._componentContextService.subscribe(ComCtxConstants.ROOT.NEED_CLEAR_PERMISSION_CACHE, () => __awaiter(this, void 0, void 0, function* () {
|
|
24154
|
-
if (this.environment.authenticationSettings.coreVersion == 'v4') {
|
|
24155
|
-
const clear = yield this.clearPermissionCacheByModule();
|
|
24156
|
-
if (!clear.success) {
|
|
24157
|
-
this._notifierService.showWarning('Có vấn đề trong lúc clear cache quyền');
|
|
24158
|
-
}
|
|
24159
|
-
}
|
|
24160
|
-
this._applicationContext.getRootContext().fireReplayEvent(ComCtxConstants.ROOT.USER_LOADED);
|
|
24161
|
-
}));
|
|
24162
24219
|
this._componentContextService.subscribe(ComCtxConstants.ROOT.KEY_DOWN_ARROWLEFT, (e) => {
|
|
24163
24220
|
if (document.activeElement === this.cancelButton.nativeElement) {
|
|
24164
24221
|
this.okButton.nativeElement.focus();
|
|
@@ -24663,17 +24720,6 @@ class CommonAppComponentComponent {
|
|
|
24663
24720
|
}
|
|
24664
24721
|
}
|
|
24665
24722
|
}
|
|
24666
|
-
clearPermissionCacheByModule() {
|
|
24667
|
-
let appSwitcher = this._moduleConfigService.getConfig().environment.appMetadata.appSwitcher;
|
|
24668
|
-
if (!appSwitcher || !appSwitcher.length) {
|
|
24669
|
-
appSwitcher = [];
|
|
24670
|
-
}
|
|
24671
|
-
let lstModule = appSwitcher.map(x => x.code);
|
|
24672
|
-
if (!lstModule) {
|
|
24673
|
-
lstModule = [];
|
|
24674
|
-
}
|
|
24675
|
-
return this._permissionService.clearPermissionCache(lstModule);
|
|
24676
|
-
}
|
|
24677
24723
|
}
|
|
24678
24724
|
CommonAppComponentComponent.decorators = [
|
|
24679
24725
|
{ type: Component, args: [{
|
|
@@ -24711,8 +24757,7 @@ CommonAppComponentComponent.ctorParameters = () => [
|
|
|
24711
24757
|
{ type: ConfirmationService },
|
|
24712
24758
|
{ type: MenuService },
|
|
24713
24759
|
{ type: PrimeNGConfig },
|
|
24714
|
-
{ type: StorageService }
|
|
24715
|
-
{ type: PermissionService }
|
|
24760
|
+
{ type: StorageService }
|
|
24716
24761
|
];
|
|
24717
24762
|
CommonAppComponentComponent.propDecorators = {
|
|
24718
24763
|
okButton: [{ type: ViewChild, args: ['okButton',] }],
|
|
@@ -27126,39 +27171,14 @@ class EntityPickerDataComponent extends DataListBase {
|
|
|
27126
27171
|
modifyGridInfo(gridInfo) {
|
|
27127
27172
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27128
27173
|
gridInfo.fields = this.advanceData.fields;
|
|
27129
|
-
if (this.control.coreVersion == EnumCoreVersion.V4) {
|
|
27130
|
-
if (gridInfo.filters.length > 0) {
|
|
27131
|
-
for (const filter of gridInfo.filters) {
|
|
27132
|
-
const value = this._commonService.tryParseJson(filter.value);
|
|
27133
|
-
if (value.valid) {
|
|
27134
|
-
if (filter.operator == Operator.in) {
|
|
27135
|
-
filter.value = JSON.parse(filter.value).join(',');
|
|
27136
|
-
}
|
|
27137
|
-
else {
|
|
27138
|
-
filter.value = JSON.parse(filter.value).toString();
|
|
27139
|
-
}
|
|
27140
|
-
}
|
|
27141
|
-
}
|
|
27142
|
-
}
|
|
27143
|
-
}
|
|
27144
27174
|
if (this.control.multiple) {
|
|
27145
27175
|
if (this._value && this._value.length > 0) {
|
|
27146
|
-
|
|
27147
|
-
gridInfo.filters.push(this.newFilterV4(this.control.valueField, Operator.notIn, this._value.join(',')));
|
|
27148
|
-
}
|
|
27149
|
-
else {
|
|
27150
|
-
gridInfo.filters.push(this.newFilter(this.control.valueField, Operator.notIn, this._value));
|
|
27151
|
-
}
|
|
27176
|
+
gridInfo.filters.push(this.newFilter(this.control.valueField, Operator.notIn, this._value));
|
|
27152
27177
|
}
|
|
27153
27178
|
}
|
|
27154
27179
|
else {
|
|
27155
27180
|
if (this._value) {
|
|
27156
|
-
|
|
27157
|
-
gridInfo.filters.push(this.newFilterV4(this.control.valueField, Operator.notEqual, this._value.toString()));
|
|
27158
|
-
}
|
|
27159
|
-
else {
|
|
27160
|
-
gridInfo.filters.push(this.newFilter(this.control.valueField, Operator.notEqual, this._value));
|
|
27161
|
-
}
|
|
27181
|
+
gridInfo.filters.push(this.newFilter(this.control.valueField, Operator.notEqual, this._value));
|
|
27162
27182
|
}
|
|
27163
27183
|
}
|
|
27164
27184
|
yield appendDefaultFilter(gridInfo.filters, this.control.defaultFilters);
|
|
@@ -27307,29 +27327,9 @@ class EntityPickerSelectedComponent extends DataListBase {
|
|
|
27307
27327
|
modifyGridInfo(gridInfo) {
|
|
27308
27328
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27309
27329
|
gridInfo.fields = this.advanceData.fields;
|
|
27310
|
-
if (this.control.coreVersion == EnumCoreVersion.V4) {
|
|
27311
|
-
if (gridInfo.filters.length > 0) {
|
|
27312
|
-
for (const filter of gridInfo.filters) {
|
|
27313
|
-
const value = this._commonService.tryParseJson(filter.value);
|
|
27314
|
-
if (value.valid) {
|
|
27315
|
-
if (filter.operator == Operator.in) {
|
|
27316
|
-
filter.value = JSON.parse(filter.value).join(',');
|
|
27317
|
-
}
|
|
27318
|
-
else {
|
|
27319
|
-
filter.value = JSON.parse(filter.value).toString();
|
|
27320
|
-
}
|
|
27321
|
-
}
|
|
27322
|
-
}
|
|
27323
|
-
}
|
|
27324
|
-
}
|
|
27325
27330
|
if (this.control.multiple) {
|
|
27326
27331
|
if (this._value != null && this._value.length > 0) {
|
|
27327
|
-
|
|
27328
|
-
gridInfo.filters.push(this.newFilterV4(this.control.valueField, Operator.in, this._value.join(',')));
|
|
27329
|
-
}
|
|
27330
|
-
else {
|
|
27331
|
-
gridInfo.filters.push(this.newFilter(this.control.valueField, Operator.in, this._value));
|
|
27332
|
-
}
|
|
27332
|
+
gridInfo.filters.push(this.newFilter(this.control.valueField, Operator.in, this._value));
|
|
27333
27333
|
}
|
|
27334
27334
|
else {
|
|
27335
27335
|
return false;
|
|
@@ -27337,12 +27337,7 @@ class EntityPickerSelectedComponent extends DataListBase {
|
|
|
27337
27337
|
}
|
|
27338
27338
|
else {
|
|
27339
27339
|
if (this._value != null) {
|
|
27340
|
-
|
|
27341
|
-
gridInfo.filters.push(this.newFilterV4(this.control.valueField, Operator.in, this._value.toString()));
|
|
27342
|
-
}
|
|
27343
|
-
else {
|
|
27344
|
-
gridInfo.filters.push(this.newFilter(this.control.valueField, Operator.in, this._value));
|
|
27345
|
-
}
|
|
27340
|
+
gridInfo.filters.push(this.newFilter(this.control.valueField, Operator.in, this._value));
|
|
27346
27341
|
}
|
|
27347
27342
|
else {
|
|
27348
27343
|
return false;
|
|
@@ -28905,6 +28900,7 @@ class FileManagerComponent extends DataListBase {
|
|
|
28905
28900
|
this.invalidFileLimitMessageDetail = 'tối đa {0} file.';
|
|
28906
28901
|
this._hasLoadedSource = false;
|
|
28907
28902
|
this.readonly = false;
|
|
28903
|
+
this.signonly = false;
|
|
28908
28904
|
this.onReady = new EventEmitter();
|
|
28909
28905
|
this.entityKeyChange = new EventEmitter();
|
|
28910
28906
|
this.closePopup = new EventEmitter();
|
|
@@ -29025,7 +29021,24 @@ class FileManagerComponent extends DataListBase {
|
|
|
29025
29021
|
setDatasource(dataSource = []) {
|
|
29026
29022
|
this._dataSource = dataSource;
|
|
29027
29023
|
this._oldValue = this._value;
|
|
29028
|
-
|
|
29024
|
+
const value = [];
|
|
29025
|
+
dataSource.forEach(item => {
|
|
29026
|
+
value.push(item.id);
|
|
29027
|
+
if (item.name) {
|
|
29028
|
+
item.nameWithoutExtension = item.name;
|
|
29029
|
+
const index = item.name.lastIndexOf('.');
|
|
29030
|
+
if (index > -1) {
|
|
29031
|
+
item.nameWithoutExtension = item.name.substring(0, index);
|
|
29032
|
+
}
|
|
29033
|
+
if (item.extension) {
|
|
29034
|
+
item.extension = item.extension.toLowerCase();
|
|
29035
|
+
}
|
|
29036
|
+
item.tailFile = item.name.substring(index);
|
|
29037
|
+
item.tailFileUpper = item.tailFile.toUpperCase();
|
|
29038
|
+
item.isFile = item.fileExplorerItemType == FileExplorerItemType.File;
|
|
29039
|
+
}
|
|
29040
|
+
});
|
|
29041
|
+
this._value = value;
|
|
29029
29042
|
if (this._oldValue != null) {
|
|
29030
29043
|
if (JSON.stringify(this._oldValue) != JSON.stringify(this._value)) {
|
|
29031
29044
|
this.fireEventChange();
|
|
@@ -29145,6 +29158,10 @@ class FileManagerComponent extends DataListBase {
|
|
|
29145
29158
|
show: false,
|
|
29146
29159
|
formData: {}
|
|
29147
29160
|
};
|
|
29161
|
+
this.forms[this.formIds.signatureDetail] = {
|
|
29162
|
+
header: 'Thông tin chữ ký số',
|
|
29163
|
+
show: false,
|
|
29164
|
+
};
|
|
29148
29165
|
this.forms[this.formIds.fileVersionList] = {
|
|
29149
29166
|
header: 'Danh sách phiên bản',
|
|
29150
29167
|
show: false,
|
|
@@ -29190,13 +29207,13 @@ class FileManagerComponent extends DataListBase {
|
|
|
29190
29207
|
label: 'Xóa tệp tin', icon: 'far fa-trash-alt', command: () => {
|
|
29191
29208
|
this.deleteFile(item);
|
|
29192
29209
|
},
|
|
29193
|
-
visible: !this.readonly
|
|
29210
|
+
visible: !this.signonly && !this.readonly
|
|
29194
29211
|
},
|
|
29195
29212
|
{
|
|
29196
29213
|
label: 'Đổi tên', icon: 'fas fa-eraser', command: () => {
|
|
29197
29214
|
this.renameFile(item);
|
|
29198
29215
|
},
|
|
29199
|
-
visible: !this.readonly
|
|
29216
|
+
visible: !this.signonly && !this.readonly
|
|
29200
29217
|
}
|
|
29201
29218
|
];
|
|
29202
29219
|
}
|
|
@@ -29611,32 +29628,61 @@ class FileManagerComponent extends DataListBase {
|
|
|
29611
29628
|
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SIGN.
|
|
29612
29629
|
// TODO: Lưu ý xử lý trường double click vào nút
|
|
29613
29630
|
signFile(file) {
|
|
29614
|
-
this._notifierService.showConfirm('Bạn có chắc chắn muốn ký số văn bản này?').then(rs => {
|
|
29631
|
+
this._notifierService.showConfirm('Bạn có chắc chắn muốn ký số văn bản này?').then((rs) => __awaiter(this, void 0, void 0, function* () {
|
|
29615
29632
|
if (rs) {
|
|
29633
|
+
let sourceFileId = file.id;
|
|
29634
|
+
let sourceFile = file;
|
|
29635
|
+
// Ký số file word - cần convert sang pdf trước
|
|
29636
|
+
if (this._fileExplorerService.needConvertBeforeSign(file.name)) {
|
|
29637
|
+
// convert file before sign
|
|
29638
|
+
try {
|
|
29639
|
+
const rsConvert = yield this._fileExplorerService.convertDocumentToPdfAndSave({
|
|
29640
|
+
id: sourceFileId,
|
|
29641
|
+
name: this._fileExplorerService.changeFileExtension(file.name, 'pdf'),
|
|
29642
|
+
folderId: file.parentFolderId,
|
|
29643
|
+
ownerType: this._userService.getCurrentUser().userId.toString(),
|
|
29644
|
+
});
|
|
29645
|
+
if (!rsConvert || !rsConvert.success) {
|
|
29646
|
+
this._notifierService.showWarning(`Có lỗi xảy ra khi chuyển đổi tài liệu ${file.name} thành pdf để ký. Vui lòng thử lại sau`);
|
|
29647
|
+
return;
|
|
29648
|
+
}
|
|
29649
|
+
else {
|
|
29650
|
+
this._notifierService.showSuccess(`Chuyển đổi tài liệu ${file.name} thành pdf thành công`);
|
|
29651
|
+
sourceFileId = rsConvert.data;
|
|
29652
|
+
sourceFile = { id: sourceFileId };
|
|
29653
|
+
this._triggerProcessData();
|
|
29654
|
+
}
|
|
29655
|
+
}
|
|
29656
|
+
catch (e) {
|
|
29657
|
+
this._notifierService.showWarning(`Có lỗi xảy ra khi chuyển đổi tài liệu ${file.name} thành pdf để ký. Vui lòng thử lại sau`);
|
|
29658
|
+
return;
|
|
29659
|
+
}
|
|
29660
|
+
}
|
|
29616
29661
|
this._fileExplorerService.generateLinkDownload({
|
|
29617
|
-
fileId:
|
|
29662
|
+
fileId: sourceFileId,
|
|
29618
29663
|
}).then(rs => {
|
|
29619
|
-
const url = this.
|
|
29664
|
+
const url = this._downloadLinkService.getDownloadForSignUrl(rs.data);
|
|
29620
29665
|
const prms = {};
|
|
29621
|
-
prms['FileUploadHandler'] = `${this._moduleConfig.environment.apiDomain.fileEndpoint}/
|
|
29666
|
+
prms['FileUploadHandler'] = `${this._moduleConfig.environment.apiDomain.fileEndpoint}/${this._moduleConfig.environment.apiVersion}/KySoFile/SavePhysicalSignedFile`;
|
|
29622
29667
|
prms['SessionId'] = '';
|
|
29623
29668
|
prms['FileName'] = url;
|
|
29624
29669
|
// tslint:disable-next-line: variable-name
|
|
29625
29670
|
const json_prms = JSON.stringify(prms);
|
|
29626
|
-
|
|
29671
|
+
vgca_sign_approved(json_prms, (result) => {
|
|
29627
29672
|
const resultObj = JSON.parse(result);
|
|
29628
29673
|
if (resultObj.FileServer != '') {
|
|
29629
29674
|
this._fileExplorerService.saveSignedFile({
|
|
29630
|
-
sourceFile:
|
|
29631
|
-
tempFileId: resultObj.FileServer
|
|
29675
|
+
sourceFile: sourceFile,
|
|
29676
|
+
tempFileId: resultObj.FileServer,
|
|
29632
29677
|
}).then(rss => {
|
|
29678
|
+
this._triggerProcessData();
|
|
29633
29679
|
this._notifierService.showSuccess('Ký số thành công');
|
|
29634
29680
|
});
|
|
29635
29681
|
}
|
|
29636
29682
|
});
|
|
29637
29683
|
});
|
|
29638
29684
|
}
|
|
29639
|
-
});
|
|
29685
|
+
}));
|
|
29640
29686
|
}
|
|
29641
29687
|
shareFolder(file) {
|
|
29642
29688
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -29657,18 +29703,107 @@ class FileManagerComponent extends DataListBase {
|
|
|
29657
29703
|
}
|
|
29658
29704
|
viewListSign(e, signatures) {
|
|
29659
29705
|
e.stopPropagation();
|
|
29660
|
-
this.
|
|
29706
|
+
this.model.advanceData = signatures;
|
|
29661
29707
|
this.forms.signatureDetail.show = true;
|
|
29662
29708
|
}
|
|
29663
29709
|
onRowSelect(evt) {
|
|
29664
29710
|
this.onSelected.emit(this.model.selectedItems);
|
|
29665
29711
|
}
|
|
29712
|
+
signMultiple() {
|
|
29713
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29714
|
+
const selectedItems = this.model.selectedItems;
|
|
29715
|
+
const hasItems = selectedItems && selectedItems.length;
|
|
29716
|
+
if (hasItems) {
|
|
29717
|
+
if (selectedItems.length == 1) {
|
|
29718
|
+
this.signFile(selectedItems[0]);
|
|
29719
|
+
}
|
|
29720
|
+
else {
|
|
29721
|
+
this.signFileMultiple(selectedItems);
|
|
29722
|
+
}
|
|
29723
|
+
}
|
|
29724
|
+
});
|
|
29725
|
+
}
|
|
29726
|
+
signFileMultiple(lstFile) {
|
|
29727
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29728
|
+
const prms = {};
|
|
29729
|
+
prms['Files'] = [];
|
|
29730
|
+
prms['FileUploadHandler'] = `${this._moduleConfig.environment.apiDomain.fileEndpoint}/${this._moduleConfig.environment.apiVersion}/KySoFile/SavePhysicalSignedFile`;
|
|
29731
|
+
prms['SessionId'] = '';
|
|
29732
|
+
var rs = yield this._notifierService.showConfirm('Bạn có chắc chắn muốn ký số các văn bản này?');
|
|
29733
|
+
if (rs) {
|
|
29734
|
+
for (const file of lstFile) {
|
|
29735
|
+
if (!this._fileObjectService.isTypeFileKySo(file.name))
|
|
29736
|
+
continue;
|
|
29737
|
+
let sourceFileId = file.id;
|
|
29738
|
+
let sourceFile = file;
|
|
29739
|
+
if (this._fileExplorerService.needConvertBeforeSign(file.name)) {
|
|
29740
|
+
try {
|
|
29741
|
+
const rsConvert = yield this._fileExplorerService.convertDocumentToPdfAndSave({
|
|
29742
|
+
id: sourceFileId,
|
|
29743
|
+
name: this._fileExplorerService.changeFileExtension(file.name, 'pdf'),
|
|
29744
|
+
folderId: file.parentFolderId,
|
|
29745
|
+
ownerType: this._userService.getCurrentUser().userId.toString(),
|
|
29746
|
+
});
|
|
29747
|
+
if (!rsConvert || !rsConvert.success) {
|
|
29748
|
+
this._notifierService.showWarning(`Có lỗi xảy ra khi chuyển đổi tài liệu ${file.name} thành pdf để ký. Vui lòng thử lại sau`);
|
|
29749
|
+
continue;
|
|
29750
|
+
}
|
|
29751
|
+
else {
|
|
29752
|
+
const result = yield this._fileExplorerService.generateLinkDownload({ fileId: rsConvert.data });
|
|
29753
|
+
if (result.success) {
|
|
29754
|
+
const url = this._downloadLinkService.getDownloadForSignUrl(result.data);
|
|
29755
|
+
prms['Files'].push({
|
|
29756
|
+
"FileID": rsConvert.data,
|
|
29757
|
+
"FileName": this._fileExplorerService.changeFileExtension(file.name, 'pdf'),
|
|
29758
|
+
"URL": url,
|
|
29759
|
+
});
|
|
29760
|
+
}
|
|
29761
|
+
}
|
|
29762
|
+
}
|
|
29763
|
+
catch (e) {
|
|
29764
|
+
this._notifierService.showWarning(`Có lỗi xảy ra khi chuyển đổi tài liệu ${file.name} thành pdf để ký. Vui lòng thử lại sau`);
|
|
29765
|
+
continue;
|
|
29766
|
+
}
|
|
29767
|
+
}
|
|
29768
|
+
else {
|
|
29769
|
+
const result = yield this._fileExplorerService.generateLinkDownload({ fileId: sourceFileId });
|
|
29770
|
+
if (result.success) {
|
|
29771
|
+
const url = this._downloadLinkService.getDownloadForSignUrl(result.data);
|
|
29772
|
+
prms['Files'].push({
|
|
29773
|
+
"FileID": sourceFileId,
|
|
29774
|
+
"FileName": file.name,
|
|
29775
|
+
"URL": url,
|
|
29776
|
+
});
|
|
29777
|
+
}
|
|
29778
|
+
}
|
|
29779
|
+
}
|
|
29780
|
+
const json_prms = JSON.stringify(prms);
|
|
29781
|
+
vgca_sign_files(json_prms, (result) => {
|
|
29782
|
+
var _a;
|
|
29783
|
+
const resultObj = JSON.parse(result);
|
|
29784
|
+
if ((_a = resultObj.Files) === null || _a === void 0 ? void 0 : _a.length) {
|
|
29785
|
+
resultObj.Files.forEach((item) => __awaiter(this, void 0, void 0, function* () {
|
|
29786
|
+
this._fileExplorerService.saveSignedFile({
|
|
29787
|
+
sourceFile: { id: item.FileID },
|
|
29788
|
+
tempFileId: item.FileSignedURL,
|
|
29789
|
+
}).then(rss => {
|
|
29790
|
+
this._triggerProcessData();
|
|
29791
|
+
this._notifierService.showSuccess('Ký số thành công');
|
|
29792
|
+
});
|
|
29793
|
+
}));
|
|
29794
|
+
}
|
|
29795
|
+
;
|
|
29796
|
+
});
|
|
29797
|
+
}
|
|
29798
|
+
;
|
|
29799
|
+
});
|
|
29800
|
+
}
|
|
29666
29801
|
}
|
|
29667
29802
|
FileManagerComponent.decorators = [
|
|
29668
29803
|
{ type: Component, args: [{
|
|
29669
29804
|
// tslint:disable-next-line: component-selector
|
|
29670
29805
|
selector: 'file-manager',
|
|
29671
|
-
template: "<div *ngIf=\"layout == _layout.LIST\" class=\"full-layout\" [class.readonly]=\"readonly\">\r\n <div class=\"p-grid fm-toolbar\">\r\n <div class=\"fm-toolbar-path\">\r\n <p-breadcrumb class=\"customBreadCrumb\" [model]=\"data.breadcrumbs\"></p-breadcrumb>\r\n </div>\r\n <div *ngIf=\"!readonly && rootFolderId\" class=\"fm-toolbar-buttons\">\r\n <button *ngIf=\"!hiddenCreateFolder\" pButton type=\"button\" pTooltip=\"T\u1EA1o th\u01B0 m\u1EE5c\" tooltipPosition=\"top\"\r\n icon=\"pi pi-folder\" class=\"p-button-text p-button-rounded\" iconPos=\"left\" (click)=\"createFolder()\">\r\n </button>\r\n\r\n <button pButton icon=\"pi pi-cloud-upload\" pTooltip=\"T\u1EA3i l\u00EAn\" tooltipPosition=\"top\" type=\"button\"\r\n class=\"p-button-rounded p-button-text p-button-primary\" (click)=\"selectFile()\"></button>\r\n\r\n <button *ngIf=\"canSelect()\" class=\"p-button-rounded p-button-text p-button-success\" pButton type=\"button\"\r\n pTooltip=\"Di chuy\u1EC3n\" tooltipPosition=\"top\" icon=\"fas fa-arrows-alt\" iconPos=\"left\"\r\n (click)=\"moveExplorerItems()\">\r\n </button>\r\n\r\n <ng-container *ngIf=\"canSetMove()\">\r\n <button class=\"p-button-rounded p-button-text p-button-success\" pButton type=\"button\"\r\n pTooltip=\"\u0110\u1EB7t \u1EDF \u0111\u00E2y\" tooltipPosition=\"top\" icon=\"far fa-hand-paper\" iconPos=\"left\"\r\n (click)=\"setMoveExplorerItems()\">\r\n </button>\r\n\r\n <button icon=\"pi pi-undo\" pButton class=\"p-button-rounded p-button-text p-button-secondary\"\r\n type=\"button\" pTooltip=\"B\u1ECF qua\" tooltipPosition=\"top\" (click)=\"cancelMove()\">\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"hasSelect()\">\r\n <button class=\"p-button-rounded p-button-text p-button-secondary\" pButton type=\"button\"\r\n pTooltip=\"N\u00E9n & t\u1EA3i v\u1EC1\" tooltipPosition=\"top\" icon=\"fas fa-file-archive\" iconPos=\"left\"\r\n (click)=\"downloadMultiple()\">\r\n </button>\r\n\r\n <button pButton type=\"button\" pTooltip=\"{{ 'X\u00F3a' | translate }}\" tooltipPosition=\"top\"\r\n icon=\"pi pi-trash\" iconPos=\"left\" class=\"p-button-rounded p-button-text p-button-danger\"\r\n (click)=\"deleteMutiple(model.selectedItems)\"></button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"fm-grid\">\r\n <crud-list #crudList [model]=\"model\" [setting]=\"setting\" [dataSource]=\"_dataSource\"\r\n [disableKeypressControl]=\"true\" [showScrollBar]=\"false\" class=\"--auto-height-content --no-wrapper-padding\"\r\n (onReload)=\"_triggerProcessData($event)\" (onRowSelect)=\"onRowSelect($event)\">\r\n\r\n <ng-template #explorerItem let-rowData='rowData' let-col='col'>\r\n <span class=\"pull-left file-ex-icon\" [innerHTML]=\"rowData.name | fileIcon : !rowData.isFile\"\r\n (click)=\"openObject(rowData)\">\r\n </span>\r\n\r\n <span class=\"{{rowData.class}} file-ex-name\" (click)=\"openObject(rowData)\">\r\n {{rowData.name}}\r\n <div *ngIf=\"rowData.signatures\" class=\"pull-right signature\" pTooltip=\"Xem chi ti\u1EBFt k\u00FD s\u1ED1\"\r\n tooltipPosition=\"top\" (click)=\"viewListSign($event, rowData.signatures)\">\r\n <i class=\"fas fa-signature\"></i>\r\n </div>\r\n </span>\r\n </ng-template>\r\n\r\n <ng-template #fileSize let-rowData='rowData'>\r\n <div *ngIf=\"rowData.isFile\">{{rowData.fileSize | fileSize}}</div>\r\n </ng-template>\r\n\r\n <ng-template #function let-rowData=\"rowData\" let-crudList=\"crudList\">\r\n <div class=\"function-list\">\r\n <button class=\"p-button-rounded p-button-text\" pButton type=\"button\" tooltipPosition=\"top\"\r\n pTooltip=\"{{getButtonTooltip(rowData)}}\" icon=\"{{getButtonIcon(rowData)}}\"\r\n (click)=\"onButtonClick(rowData)\"></button>\r\n\r\n <ng-container *ngIf=\"!readonly\">\r\n <button class=\"p-button-danger p-button-rounded p-button-text\" pButton type=\"button\"\r\n pTooltip=\"X\u00F3a\" tooltipPosition=\"top\" icon=\"pi pi-trash\"\r\n (click)=\"deleteFile(rowData)\"></button>\r\n\r\n <button type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"Th\u00EAm\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData)\"></button>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n </crud-list>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"layout == _layout.SIMPLE\" class=\"not-full-layout\" [class.readonly]=\"readonly\">\r\n <div class=\"nfl-toolbar\">\r\n <button *ngIf=\"!readonly\" type=\"button\" pButton class=\"p-button-text p-button-info link-or-action\"\r\n icon=\"fas fa-cloud-upload-alt\" label=\"T\u1EA3i l\u00EAn\" (click)=\"selectFile()\"></button>\r\n </div>\r\n\r\n <div class=\"nfl-grid\">\r\n <div *ngFor=\"let rowData of _dataSource; index as i\" class=\"nfl-item\">\r\n <div class=\"nfl-no\">\r\n {{i + 1}}.\r\n </div>\r\n\r\n <div class=\"nfl-name\">\r\n <span class=\"pull-left file-ex-icon\" [innerHTML]=\"rowData.name | fileIcon\">\r\n </span>\r\n <a class=\"{{rowData.class}} file-ex-name\" (click)=\"openObject(rowData)\">\r\n <span>{{rowData.name}}</span>\r\n <div *ngIf=\"rowData.signatures\" class=\"signature\" pTooltip=\"Xem chi ti\u1EBFt k\u00FD s\u1ED1\"\r\n tooltipPosition=\"top\" (click)=\"viewListSign($event, rowData.signatures)\">\r\n <i class=\"fas fa-signature\"></i>\r\n </div>\r\n </a>\r\n </div>\r\n\r\n <div class=\"nfl-version\">\r\n v{{rowData.currentFileVersion}}\r\n </div>\r\n\r\n <div class=\"nfl-function\">\r\n <ng-container *ngIf=\"!readonly\">\r\n <button class=\"p-button-rounded p-button-text\" pButton type=\"button\" tooltipPosition=\"top\"\r\n pTooltip=\"{{getButtonTooltip(rowData)}}\" icon=\"{{getButtonIcon(rowData)}}\"\r\n (click)=\"onButtonClick(rowData)\"></button>\r\n\r\n <button class=\"p-button-danger p-button-rounded p-button-text\" pButton type=\"button\" pTooltip=\"X\u00F3a\"\r\n tooltipPosition=\"top\" icon=\"pi pi-trash\" (click)=\"deleteFile(rowData)\"></button>\r\n\r\n <button type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"Th\u00EAm\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData)\"></button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!_dataSource || !_dataSource.length\" class=\"nfl-no-item\">\r\n Ch\u01B0a c\u00F3 t\u00E0i li\u1EC7u \u0111\u01B0\u1EE3c t\u1EA3i l\u00EAn\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<p-fileUpload #fileControl [name]=\"fileInForm\" mode=\"basic\" [ngStyle]=\"{'display': 'none'}\" [chooseLabel]=\"chooseLabel\"\r\n [multiple]=\"control.multiple\" [url]=\"apiUploadUrl\" [maxFileSize]=\"maxFileSize\" auto=\"true\"\r\n [invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"invalidFileLimitMessageDetail\" (onProgress)=\"onUploadProgress($event)\"\r\n (onBeforeUpload)=\"onBeforeUpload($event)\" (onSelect)=\"handleSelectFile($event)\" (onUpload)=\"onUploaded($event)\">\r\n</p-fileUpload>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"data.itemsMenuFile\" styleClass=\"fm-contextMenu-panel\">\r\n</p-contextMenu>\r\n\r\n<!-- T\u1EA1o m\u1EDBi/ \u0111\u1ED5i t\u00EAn th\u01B0 m\u1EE5c -->\r\n<tn-dialog *ngIf=\"forms.createFolder.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"forms.createFolder.header | translate\" [popupSize]=\"forms[formIds.createFolder].popupSize\"\r\n (onHide)=\"onCancelForm(formIds.createFolder)\">\r\n <folder-form #formBase [parentModel]=\"model\" [parentContext]=\"context\"\r\n [model]=\"forms[formIds.createFolder].formData\" (onSaved)=\"onSavedForm(formIds.createFolder)\"\r\n (onCancel)=\"onCancelForm(formIds.createFolder)\">\r\n </folder-form>\r\n</tn-dialog>\r\n\r\n<!-- \u0110\u1ED5i t\u00EAn file -->\r\n<tn-dialog *ngIf=\"forms.renameFile.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"forms.renameFile.header | translate\" [popupSize]=\"forms[formIds.renameFile].popupSize\"\r\n (onHide)=\"onCancelForm(formIds.renameFile)\">\r\n <file-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"forms[formIds.renameFile].formData\"\r\n (onSaved)=\"onSavedForm(formIds.renameFile)\" (onCancel)=\"onCancelForm(formIds.renameFile)\">\r\n </file-form>\r\n</tn-dialog>\r\n\r\n<!-- Xem file tr\u1EF1c tuy\u1EBFn -->\r\n<file-viewer *ngIf=\"forms.fileViewer.show\" [parentModel]=\"model\" [parentContext]=\"context\"\r\n [model]=\"forms.fileViewer.formData\" [readonly]=\"readonly\" (onClose)=\"closeFileViewer()\">\r\n</file-viewer>\r\n\r\n<!-- Xem phi\u00EAn b\u1EA3n -->\r\n<tn-dialog *ngIf=\"forms.fileVersionList.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"forms.fileVersionList.header | translate\" [popupSize]=\"forms[formIds.fileVersionList].popupSize\"\r\n (onHide)=\"onCancelForm(formIds.fileVersionList)\">\r\n <file-version-list *ngIf=\"forms.fileVersionList.show\" [parentModel]=\"model\" [parentContext]=\"context\"\r\n [fileId]=\"forms[formIds.fileVersionList].fileId\" [readonly]=\"readonly\">\r\n </file-version-list>\r\n</tn-dialog>\r\n\r\n<!--<share-file *ngIf=\"forms.shareFile.show\" [parentDataModel]=\"model\" [parentDataContext]=\"context\"\r\n [model]=\"forms.shareFile.formData\">\r\n</share-file>\r\n\r\n<share-folder *ngIf=\"forms.shareFolder.show\" [parentDataModel]=\"model\" [parentDataContext]=\"context\"\r\n [model]=\"forms.shareFolder.formData\">\r\n</share-folder>\r\n\r\n<signature-detail *ngIf=\"forms.signatureDetail.show\" [parentDataModel]=\"model\" [parentDataContext]=\"context\"\r\n [model]=\"forms.signatureDetail.formData\">\r\n</signature-detail> -->",
|
|
29806
|
+
template: "<div *ngIf=\"layout == _layout.LIST\" class=\"full-layout\" [class.readonly]=\"readonly\">\r\n <div class=\"p-grid fm-toolbar\">\r\n <div class=\"fm-toolbar-path\">\r\n <p-breadcrumb class=\"customBreadCrumb\" [model]=\"data.breadcrumbs\"></p-breadcrumb>\r\n </div>\r\n <div *ngIf=\"!signonly&&!readonly && rootFolderId\" class=\"fm-toolbar-buttons\">\r\n <button *ngIf=\"!hiddenCreateFolder\" pButton type=\"button\" pTooltip=\"T\u1EA1o th\u01B0 m\u1EE5c\" tooltipPosition=\"top\"\r\n icon=\"pi pi-folder\" class=\"p-button-text p-button-rounded\" iconPos=\"left\" (click)=\"createFolder()\">\r\n </button>\r\n\r\n <button pButton icon=\"pi pi-cloud-upload\" pTooltip=\"T\u1EA3i l\u00EAn\" tooltipPosition=\"top\" type=\"button\"\r\n class=\"p-button-rounded p-button-text p-button-primary\" (click)=\"selectFile()\"></button>\r\n\r\n <button *ngIf=\"canSelect()\" class=\"p-button-rounded p-button-text p-button-success\" pButton type=\"button\"\r\n pTooltip=\"Di chuy\u1EC3n\" tooltipPosition=\"top\" icon=\"fas fa-arrows-alt\" iconPos=\"left\"\r\n (click)=\"moveExplorerItems()\">\r\n </button>\r\n\r\n <ng-container *ngIf=\"canSetMove()\">\r\n <button class=\"p-button-rounded p-button-text p-button-success\" pButton type=\"button\"\r\n pTooltip=\"\u0110\u1EB7t \u1EDF \u0111\u00E2y\" tooltipPosition=\"top\" icon=\"far fa-hand-paper\" iconPos=\"left\"\r\n (click)=\"setMoveExplorerItems()\">\r\n </button>\r\n\r\n <button icon=\"pi pi-undo\" pButton class=\"p-button-rounded p-button-text p-button-secondary\"\r\n type=\"button\" pTooltip=\"B\u1ECF qua\" tooltipPosition=\"top\" (click)=\"cancelMove()\">\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"hasSelect()\">\r\n <button class=\"p-button-rounded p-button-text p-button-secondary\" pButton type=\"button\"\r\n pTooltip=\"N\u00E9n & t\u1EA3i v\u1EC1\" tooltipPosition=\"top\" icon=\"fas fa-file-archive\" iconPos=\"left\"\r\n (click)=\"downloadMultiple()\">\r\n </button>\r\n <button *ngIf=\"!control.uploadOnly\" class=\"p-button-text p-button-success\" pButton type=\"button\"\r\n pTooltip=\"K\u00FD s\u1ED1 nhi\u1EC1u\" tooltipPosition=\"top\" icon=\"fas fa-signature\" iconPos=\"left\"\r\n label=\"K\u00FD s\u1ED1 nhi\u1EC1u\" (click)=\"signMultiple()\">\r\n </button>\r\n <button pButton type=\"button\" pTooltip=\"{{ 'X\u00F3a' | translate }}\" tooltipPosition=\"top\"\r\n icon=\"pi pi-trash\" iconPos=\"left\" class=\"p-button-rounded p-button-text p-button-danger\"\r\n (click)=\"deleteMutiple(model.selectedItems)\"></button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"fm-grid\">\r\n <crud-list #crudList [model]=\"model\" [setting]=\"setting\" [dataSource]=\"_dataSource\"\r\n [disableKeypressControl]=\"true\" [showScrollBar]=\"false\" class=\"--auto-height-content --no-wrapper-padding\"\r\n (onReload)=\"_triggerProcessData($event)\" (onRowSelect)=\"onRowSelect($event)\">\r\n\r\n <ng-template #explorerItem let-rowData='rowData' let-col='col'>\r\n <span class=\"pull-left file-ex-icon\" [innerHTML]=\"rowData.name | fileIcon : !rowData.isFile\"\r\n (click)=\"openObject(rowData)\">\r\n </span>\r\n\r\n <span class=\"{{rowData.class}} file-ex-name\" (click)=\"openObject(rowData)\">\r\n {{rowData.name}}\r\n <div *ngIf=\"rowData.signatures\" class=\"pull-right signature\" pTooltip=\"Xem chi ti\u1EBFt k\u00FD s\u1ED1\"\r\n tooltipPosition=\"top\" (click)=\"viewListSign($event, rowData.signatures)\">\r\n <i class=\"fas fa-signature\"></i>\r\n </div>\r\n </span>\r\n </ng-template>\r\n\r\n <ng-template #fileSize let-rowData='rowData'>\r\n <div *ngIf=\"rowData.isFile\">{{rowData.fileSize | fileSize}}</div>\r\n </ng-template>\r\n\r\n <ng-template #function let-rowData=\"rowData\" let-crudList=\"crudList\">\r\n <div class=\"function-list\">\r\n <ng-container *ngIf=\"!this.signonly&&!readonly\">\r\n <button class=\"p-button-rounded p-button-text\" pButton type=\"button\" tooltipPosition=\"top\"\r\n pTooltip=\"{{getButtonTooltip(rowData)}}\" icon=\"{{getButtonIcon(rowData)}}\"\r\n (click)=\"onButtonClick(rowData)\"></button>\r\n <button class=\"p-button-danger p-button-rounded p-button-text\" pButton type=\"button\"\r\n pTooltip=\"X\u00F3a\" tooltipPosition=\"top\" icon=\"pi pi-trash\"\r\n (click)=\"deleteFile(rowData)\"></button>\r\n </ng-container>\r\n <button type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"Th\u00EAm\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData)\"></button>\r\n </div>\r\n </ng-template>\r\n </crud-list>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"layout == _layout.SIMPLE\" class=\"not-full-layout\" [class.readonly]=\"readonly\">\r\n <div class=\"nfl-toolbar\">\r\n <button *ngIf=\"!readonly\" type=\"button\" pButton class=\"p-button-text p-button-info link-or-action\"\r\n icon=\"fas fa-cloud-upload-alt\" label=\"T\u1EA3i l\u00EAn\" (click)=\"selectFile()\"></button>\r\n </div>\r\n\r\n <div class=\"nfl-grid\">\r\n <div *ngFor=\"let rowData of _dataSource; index as i\" class=\"nfl-item\">\r\n <div class=\"nfl-no\">\r\n {{i + 1}}.\r\n </div>\r\n\r\n <div class=\"nfl-name\">\r\n <span class=\"pull-left file-ex-icon\" [innerHTML]=\"rowData.name | fileIcon\">\r\n </span>\r\n <a class=\"{{rowData.class}} file-ex-name\" (click)=\"openObject(rowData)\">\r\n <span>{{rowData.name}}</span>\r\n <div *ngIf=\"rowData.signatures\" class=\"signature\" pTooltip=\"Xem chi ti\u1EBFt k\u00FD s\u1ED1\"\r\n tooltipPosition=\"top\" (click)=\"viewListSign($event, rowData.signatures)\">\r\n <i class=\"fas fa-signature\"></i>\r\n </div>\r\n </a>\r\n </div>\r\n\r\n <div class=\"nfl-version\">\r\n v{{rowData.currentFileVersion}}\r\n </div>\r\n\r\n <div class=\"nfl-function\">\r\n <ng-container *ngIf=\"!readonly\">\r\n <button class=\"p-button-rounded p-button-text\" pButton type=\"button\" tooltipPosition=\"top\"\r\n pTooltip=\"{{getButtonTooltip(rowData)}}\" icon=\"{{getButtonIcon(rowData)}}\"\r\n (click)=\"onButtonClick(rowData)\"></button>\r\n\r\n <button class=\"p-button-danger p-button-rounded p-button-text\" pButton type=\"button\" pTooltip=\"X\u00F3a\"\r\n tooltipPosition=\"top\" icon=\"pi pi-trash\" (click)=\"deleteFile(rowData)\"></button>\r\n\r\n <button type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"Th\u00EAm\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event, rowData)\"></button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!_dataSource || !_dataSource.length\" class=\"nfl-no-item\">\r\n Ch\u01B0a c\u00F3 t\u00E0i li\u1EC7u \u0111\u01B0\u1EE3c t\u1EA3i l\u00EAn\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<p-fileUpload #fileControl [name]=\"fileInForm\" mode=\"basic\" [ngStyle]=\"{'display': 'none'}\" [chooseLabel]=\"chooseLabel\"\r\n [multiple]=\"control?control.multiple:false\" [url]=\"apiUploadUrl\" [maxFileSize]=\"maxFileSize\" auto=\"true\"\r\n [invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"invalidFileLimitMessageDetail\" (onProgress)=\"onUploadProgress($event)\"\r\n (onBeforeUpload)=\"onBeforeUpload($event)\" (onSelect)=\"handleSelectFile($event)\" (onUpload)=\"onUploaded($event)\">\r\n</p-fileUpload>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"data.itemsMenuFile\" styleClass=\"fm-contextMenu-panel\">\r\n</p-contextMenu>\r\n\r\n<!-- T\u1EA1o m\u1EDBi/ \u0111\u1ED5i t\u00EAn th\u01B0 m\u1EE5c -->\r\n<tn-dialog *ngIf=\"forms.createFolder.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"forms.createFolder.header | translate\" [popupSize]=\"forms[formIds.createFolder].popupSize\"\r\n (onHide)=\"onCancelForm(formIds.createFolder)\">\r\n <folder-form #formBase [parentModel]=\"model\" [parentContext]=\"context\"\r\n [model]=\"forms[formIds.createFolder].formData\" (onSaved)=\"onSavedForm(formIds.createFolder)\"\r\n (onCancel)=\"onCancelForm(formIds.createFolder)\">\r\n </folder-form>\r\n</tn-dialog>\r\n\r\n<!-- \u0110\u1ED5i t\u00EAn file -->\r\n<tn-dialog *ngIf=\"forms.renameFile.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"forms.renameFile.header | translate\" [popupSize]=\"forms[formIds.renameFile].popupSize\"\r\n (onHide)=\"onCancelForm(formIds.renameFile)\">\r\n <file-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"forms[formIds.renameFile].formData\"\r\n (onSaved)=\"onSavedForm(formIds.renameFile)\" (onCancel)=\"onCancelForm(formIds.renameFile)\">\r\n </file-form>\r\n</tn-dialog>\r\n\r\n<!-- Xem file tr\u1EF1c tuy\u1EBFn -->\r\n<file-viewer *ngIf=\"forms.fileViewer.show\" [parentModel]=\"model\" [parentContext]=\"context\"\r\n [model]=\"forms.fileViewer.formData\" [readonly]=\"readonly\" (onClose)=\"closeFileViewer()\">\r\n</file-viewer>\r\n\r\n<!-- Xem phi\u00EAn b\u1EA3n -->\r\n<tn-dialog *ngIf=\"forms.fileVersionList.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"forms.fileVersionList.header | translate\" [popupSize]=\"forms[formIds.fileVersionList].popupSize\"\r\n (onHide)=\"onCancelForm(formIds.fileVersionList)\">\r\n <file-version-list *ngIf=\"forms.fileVersionList.show\" [parentModel]=\"model\" [parentContext]=\"context\"\r\n [fileId]=\"forms[formIds.fileVersionList].fileId\" [readonly]=\"readonly\">\r\n </file-version-list>\r\n</tn-dialog>\r\n\r\n<!--<share-file *ngIf=\"forms.shareFile.show\" [parentDataModel]=\"model\" [parentDataContext]=\"context\"\r\n [model]=\"forms.shareFile.formData\">\r\n</share-file>\r\n\r\n<share-folder *ngIf=\"forms.shareFolder.show\" [parentDataModel]=\"model\" [parentDataContext]=\"context\"\r\n [model]=\"forms.shareFolder.formData\">\r\n</share-folder>-->\r\n\r\n<!-- Xem ch\u1EEF k\u00FD s\u1ED1 -->\r\n<tn-dialog *ngIf=\"forms.signatureDetail.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"forms.signatureDetail.header | translate\" [popupSize]=\"forms[formIds.signatureDetail].popupSize\"\r\n (onHide)=\"onCancelForm(formIds.signatureDetail)\">\r\n <signature-detail [parentModel]=\"model\" [parentContext]=\"context\">\r\n </signature-detail>\r\n</tn-dialog>",
|
|
29672
29807
|
providers: [
|
|
29673
29808
|
{
|
|
29674
29809
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -29718,6 +29853,7 @@ FileManagerComponent.propDecorators = {
|
|
|
29718
29853
|
entity: [{ type: Input }],
|
|
29719
29854
|
entityKey: [{ type: Input }],
|
|
29720
29855
|
readonly: [{ type: Input }],
|
|
29856
|
+
signonly: [{ type: Input }],
|
|
29721
29857
|
value: [{ type: Input }],
|
|
29722
29858
|
onReady: [{ type: Output }],
|
|
29723
29859
|
entityKeyChange: [{ type: Output }],
|
|
@@ -30549,6 +30685,12 @@ class FileUploadComponent extends ComponentBase {
|
|
|
30549
30685
|
this.hasFile = false;
|
|
30550
30686
|
this.showNoti = false;
|
|
30551
30687
|
this.notification = null;
|
|
30688
|
+
this.supportedExtensions = [
|
|
30689
|
+
'pdf',
|
|
30690
|
+
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp',
|
|
30691
|
+
'mp4', 'webm', 'ogg',
|
|
30692
|
+
'mp3', 'wav', 'aac' // Âm thanh
|
|
30693
|
+
];
|
|
30552
30694
|
}
|
|
30553
30695
|
writeValue(obj) {
|
|
30554
30696
|
this.fileId = obj;
|
|
@@ -30669,11 +30811,37 @@ class FileUploadComponent extends ComponentBase {
|
|
|
30669
30811
|
this._downloadLinkService.download(model);
|
|
30670
30812
|
}
|
|
30671
30813
|
}
|
|
30814
|
+
isViewableFile(url) {
|
|
30815
|
+
var _a;
|
|
30816
|
+
if (!url) {
|
|
30817
|
+
return false;
|
|
30818
|
+
}
|
|
30819
|
+
try {
|
|
30820
|
+
// Lấy phần mở rộng của file từ URL
|
|
30821
|
+
const extension = (_a = url.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
30822
|
+
return extension ? this.supportedExtensions.includes(extension) : false;
|
|
30823
|
+
}
|
|
30824
|
+
catch (error) {
|
|
30825
|
+
console.error('Lỗi khi kiểm tra đuôi file:', error);
|
|
30826
|
+
return false;
|
|
30827
|
+
}
|
|
30828
|
+
}
|
|
30829
|
+
onDownloadOrViewFile() {
|
|
30830
|
+
if (this.isViewableFile(this.selectedFileName)) {
|
|
30831
|
+
if (this.fileId) {
|
|
30832
|
+
const url = this._fileObjectService.getPublicDownloadLinkByFileId(this.fileId);
|
|
30833
|
+
window.open(url, '_blank');
|
|
30834
|
+
}
|
|
30835
|
+
}
|
|
30836
|
+
else {
|
|
30837
|
+
this.onDownloadFile();
|
|
30838
|
+
}
|
|
30839
|
+
}
|
|
30672
30840
|
}
|
|
30673
30841
|
FileUploadComponent.decorators = [
|
|
30674
30842
|
{ type: Component, args: [{
|
|
30675
30843
|
selector: 'file-upload',
|
|
30676
|
-
template: "<div class=\"file-upload\">\r\n <div class=\"fl-icon\">\r\n <i *ngIf=\"loading\" class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem\"></i>\r\n <i *ngIf=\"!loading\" class=\"pi pi-file-o\" style=\"font-size: 2rem\"></i>\r\n </div>\r\n\r\n <div class=\"fl-file-name\" (click)=\"
|
|
30844
|
+
template: "<div class=\"file-upload\">\r\n <div class=\"fl-icon\">\r\n <i *ngIf=\"loading\" class=\"pi pi-spin pi-spinner\" style=\"font-size: 2rem\"></i>\r\n <i *ngIf=\"!loading\" class=\"pi pi-file-o\" style=\"font-size: 2rem\"></i>\r\n </div>\r\n\r\n <div class=\"fl-file-name\" (click)=\"onDownloadOrViewFile()\">\r\n <span *ngIf=\"!showNoti\">{{selectedFileName}}</span>\r\n <span *ngIf=\"showNoti\"> {{notification}} </span>\r\n </div>\r\n\r\n <div class=\"fl-buttons\">\r\n <button *ngIf=\"!hasFile && !readonly\" pTooltip=\"Ch\u1ECDn file\" class=\"fl-choose\"\r\n class=\"link-or-action p-button-text p-button-rounded fl-choose\" tooltipPosition=\"top\" pButton type=\"button\"\r\n icon=\"pi pi-plus\" (click)=\"onOpenSelect()\"></button>\r\n\r\n <button *ngIf=\"hasFile && !readonly\" (click)=\"onRemoveFile()\"\r\n class=\"link-or-action p-button-text p-button-rounded p-button-danger fl-remove\" pTooltip=\"X\u00F3a file\"\r\n tooltipPosition=\"top\" pButton type=\"button\" icon=\"pi pi-trash\"></button>\r\n\r\n <button [disabled]=\"!menu || !menu.length\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"Th\u00EAm\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event)\"></button>\r\n </div>\r\n\r\n <div style=\"display: none;\">\r\n <p-fileUpload #file [accept]=\"accept\" [auto]=\"false\" class=\"file-upload\" mode=\"basic\"\r\n [chooseLabel]=\"chooseLabel\" name=\"file[]\" [maxFileSize]=\"maxFileSize\" accept=\"{{accept}}\"\r\n pTooltip=\"Ch\u1ECDn t\u1EEB m\u00E1y t\u00EDnh\" toolStipPosition=\"top\" multiple=\"single\"\r\n [invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"invalidFileLimitMessageDetail\" (onSelect)=\"onSelectFile($event)\"\r\n (onError)=\"handleError($event)\">\r\n </p-fileUpload>\r\n </div>\r\n\r\n</div>\r\n\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"menu\" styleClass=\"fm-contextMenu-panel\">\r\n</p-contextMenu>",
|
|
30677
30845
|
providers: [
|
|
30678
30846
|
{
|
|
30679
30847
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -30824,11 +30992,9 @@ class MaskComponent {
|
|
|
30824
30992
|
this.decimalPlaces = 2;
|
|
30825
30993
|
this.viewMode = false;
|
|
30826
30994
|
this.inputStyleClass = '';
|
|
30827
|
-
this.thousandSeperator = '.';
|
|
30828
30995
|
this.onFocus = new EventEmitter();
|
|
30829
30996
|
this.onBlur = new EventEmitter();
|
|
30830
30997
|
this.onChanged = new EventEmitter();
|
|
30831
|
-
this.locale = 'vi-VN';
|
|
30832
30998
|
}
|
|
30833
30999
|
set placeholder(value) {
|
|
30834
31000
|
if (value == null)
|
|
@@ -30836,11 +31002,10 @@ class MaskComponent {
|
|
|
30836
31002
|
this._placeholder = value;
|
|
30837
31003
|
}
|
|
30838
31004
|
ngOnInit() {
|
|
30839
|
-
this.locale = this.thousandSeperator == '.' ? 'vi-VN' : 'en-US';
|
|
30840
31005
|
}
|
|
30841
31006
|
writeValue(obj) {
|
|
30842
31007
|
if (obj) {
|
|
30843
|
-
this.model = this._numberPipe.transform(obj, '',
|
|
31008
|
+
this.model = this._numberPipe.transform(obj, '', 'vi-VN');
|
|
30844
31009
|
this.value = Number(this.model);
|
|
30845
31010
|
}
|
|
30846
31011
|
else if (obj === 0) {
|
|
@@ -30858,7 +31023,7 @@ class MaskComponent {
|
|
|
30858
31023
|
return 'separator.0';
|
|
30859
31024
|
}
|
|
30860
31025
|
getThousandSeperator() {
|
|
30861
|
-
return
|
|
31026
|
+
return '.';
|
|
30862
31027
|
}
|
|
30863
31028
|
handleFocus() {
|
|
30864
31029
|
this.onFocus.emit(this.value);
|
|
@@ -30890,7 +31055,7 @@ class MaskComponent {
|
|
|
30890
31055
|
}
|
|
30891
31056
|
}
|
|
30892
31057
|
numberToStringVN(number) {
|
|
30893
|
-
return this._numberPipe.transform(number, '',
|
|
31058
|
+
return this._numberPipe.transform(number, '', 'vi-VN');
|
|
30894
31059
|
}
|
|
30895
31060
|
registerOnChange(fn) {
|
|
30896
31061
|
this.onChange = fn;
|
|
@@ -30934,7 +31099,6 @@ MaskComponent.propDecorators = {
|
|
|
30934
31099
|
decimalPlaces: [{ type: Input }],
|
|
30935
31100
|
viewMode: [{ type: Input }],
|
|
30936
31101
|
inputStyleClass: [{ type: Input }],
|
|
30937
|
-
thousandSeperator: [{ type: Input }],
|
|
30938
31102
|
onFocus: [{ type: Output }],
|
|
30939
31103
|
onBlur: [{ type: Output }],
|
|
30940
31104
|
onChanged: [{ type: Output }]
|
|
@@ -31757,6 +31921,12 @@ class ServiceFileUploadComponent extends ComponentBase {
|
|
|
31757
31921
|
this.onRemove = new EventEmitter();
|
|
31758
31922
|
this.onChanged = new EventEmitter();
|
|
31759
31923
|
this.dataModel = {};
|
|
31924
|
+
this.supportedExtensions = [
|
|
31925
|
+
'pdf',
|
|
31926
|
+
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp',
|
|
31927
|
+
'mp4', 'webm', 'ogg',
|
|
31928
|
+
'mp3', 'wav', 'aac' // Âm thanh
|
|
31929
|
+
];
|
|
31760
31930
|
if (this._userService.isValidAccessToken()) {
|
|
31761
31931
|
this.userId = this._userService.getUserIdCombine();
|
|
31762
31932
|
}
|
|
@@ -32051,11 +32221,35 @@ class ServiceFileUploadComponent extends ComponentBase {
|
|
|
32051
32221
|
setDisabledState(isDisabled) {
|
|
32052
32222
|
this.isDisabled = isDisabled;
|
|
32053
32223
|
}
|
|
32224
|
+
isViewableFile(url) {
|
|
32225
|
+
var _a;
|
|
32226
|
+
if (!url) {
|
|
32227
|
+
return false;
|
|
32228
|
+
}
|
|
32229
|
+
try {
|
|
32230
|
+
// Lấy phần mở rộng của file từ URL
|
|
32231
|
+
const extension = (_a = url.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
32232
|
+
return extension ? this.supportedExtensions.includes(extension) : false;
|
|
32233
|
+
}
|
|
32234
|
+
catch (error) {
|
|
32235
|
+
console.error('Lỗi khi kiểm tra đuôi file:', error);
|
|
32236
|
+
return false;
|
|
32237
|
+
}
|
|
32238
|
+
}
|
|
32239
|
+
onDownloadOrViewFile() {
|
|
32240
|
+
if (this.isViewableFile(this.selectedFileName)) {
|
|
32241
|
+
const url = this._fileObjectService.getPublicDownloadLinkByFileId(this.fileId);
|
|
32242
|
+
window.open(url, '_blank');
|
|
32243
|
+
}
|
|
32244
|
+
else {
|
|
32245
|
+
this.onDownloadFile();
|
|
32246
|
+
}
|
|
32247
|
+
}
|
|
32054
32248
|
}
|
|
32055
32249
|
ServiceFileUploadComponent.decorators = [
|
|
32056
32250
|
{ type: Component, args: [{
|
|
32057
32251
|
selector: 'service-file-upload',
|
|
32058
|
-
template: "<div class=\"file-upload\">\r\n <div class=\"fl-icon\">\r\n <i *ngIf=\"loading\" class=\"pi pi-spin pi-spinner\"></i>\r\n <i *ngIf=\"!loading\" class=\"pi pi-file-o\"></i>\r\n </div>\r\n\r\n <div class=\"fl-file-name\" (click)=\"
|
|
32252
|
+
template: "<div class=\"file-upload\">\r\n <div class=\"fl-icon\">\r\n <i *ngIf=\"loading\" class=\"pi pi-spin pi-spinner\"></i>\r\n <i *ngIf=\"!loading\" class=\"pi pi-file-o\"></i>\r\n </div>\r\n\r\n <div class=\"fl-file-name\" (click)=\"onDownloadOrViewFile()\">\r\n <div>\r\n <ng-container *ngIf=\"!showNoti\">\r\n <span pTooltip=\"{{selectedFileName}}\">{{selectedFileNameShort}}</span>\r\n <span *ngIf=\"extension\">.{{extension}} </span>\r\n </ng-container>\r\n <span *ngIf=\"showNoti\"> {{notification}} </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"fl-buttons\">\r\n <button *ngIf=\"!hasFile && !readonly\" pTooltip=\"Ch\u1ECDn file\" class=\"fl-choose\"\r\n class=\"link-or-action p-button-text p-button-rounded fl-choose\" tooltipPosition=\"top\" pButton type=\"button\"\r\n icon=\"pi pi-plus\" (click)=\"onOpenSelect()\"></button>\r\n\r\n <button *ngIf=\"hasFile && !readonly\" (click)=\"onRemoveFile()\"\r\n class=\"link-or-action p-button-text p-button-rounded p-button-danger fl-remove\" pTooltip=\"X\u00F3a file\"\r\n tooltipPosition=\"top\" pButton type=\"button\" icon=\"pi pi-trash\"></button>\r\n\r\n <button [disabled]=\"!menu || !menu.length\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\r\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"Th\u00EAm\" tooltipPosition=\"top\"\r\n (click)=\"showContextMenu($event)\"></button>\r\n </div>\r\n\r\n <div style=\"display: none;\">\r\n <p-fileUpload #file [accept]=\"accept\" class=\"file-upload\" mode=\"basic\" [chooseLabel]=\"chooseLabel\" name=\"file[]\"\r\n [maxFileSize]=\"control.maxFileSize\" pTooltip=\"Ch\u1ECDn t\u1EEB m\u00E1y t\u00EDnh\" toolStipPosition=\"top\" multiple=\"single\"\r\n [invalidFileSizeMessageSummary]=\"control.invalidFileSizeMessageSummary\"\r\n [invalidFileSizeMessageDetail]=\"control.invalidFileSizeMessageDetail\"\r\n [invalidFileTypeMessageSummary]=\"control.invalidFileTypeMessageSummary\"\r\n [invalidFileTypeMessageDetail]=\"control.invalidFileTypeMessageDetail\"\r\n [invalidFileLimitMessageSummary]=\"control.invalidFileLimitMessageSummary\"\r\n [invalidFileLimitMessageDetail]=\"control.invalidFileLimitMessageDetail\" [accept]=\"accept\"\r\n (onSelect)=\"onSelectFile($event)\">\r\n </p-fileUpload>\r\n </div>\r\n\r\n</div>\r\n\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"menu\" styleClass=\"fm-contextMenu-panel\">\r\n</p-contextMenu>",
|
|
32059
32253
|
providers: [
|
|
32060
32254
|
{
|
|
32061
32255
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -40233,11 +40427,7 @@ SummaryPipe.decorators = [
|
|
|
40233
40427
|
},] }
|
|
40234
40428
|
];
|
|
40235
40429
|
|
|
40236
|
-
const moment$1 = moment_;
|
|
40237
40430
|
class TnDatePipe {
|
|
40238
|
-
constructor(format) {
|
|
40239
|
-
this.format = format;
|
|
40240
|
-
}
|
|
40241
40431
|
addZero(value) {
|
|
40242
40432
|
if (value < 10)
|
|
40243
40433
|
return `0${value}`;
|
|
@@ -40246,8 +40436,6 @@ class TnDatePipe {
|
|
|
40246
40436
|
transform(value, args) {
|
|
40247
40437
|
if (value == null)
|
|
40248
40438
|
return '';
|
|
40249
|
-
if (this.format)
|
|
40250
|
-
return moment$1(value).format(this.format);
|
|
40251
40439
|
let date = new Date(value);
|
|
40252
40440
|
return `${this.addZero(date.getHours())}:${this.addZero(date.getMinutes())}:${this.addZero(date.getSeconds())}, Ngày ${this.addZero(date.getDate())}/${this.addZero(date.getMonth() + 1)}/${date.getFullYear()}`;
|
|
40253
40441
|
}
|
|
@@ -40256,9 +40444,6 @@ TnDatePipe.decorators = [
|
|
|
40256
40444
|
{ type: Pipe, args: [{
|
|
40257
40445
|
name: 'tnDate'
|
|
40258
40446
|
},] }
|
|
40259
|
-
];
|
|
40260
|
-
TnDatePipe.ctorParameters = () => [
|
|
40261
|
-
{ type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] }] }
|
|
40262
40447
|
];
|
|
40263
40448
|
|
|
40264
40449
|
class UserFormatPipe {
|
|
@@ -40381,9 +40566,72 @@ UsersFormatPipe.ctorParameters = () => [
|
|
|
40381
40566
|
{ type: UserService }
|
|
40382
40567
|
];
|
|
40383
40568
|
|
|
40569
|
+
// fix for build prod
|
|
40570
|
+
const moment$1 = moment_;
|
|
40571
|
+
class SignatureDetailComponent extends ComponentBase {
|
|
40572
|
+
constructor(injector) {
|
|
40573
|
+
super(injector);
|
|
40574
|
+
}
|
|
40575
|
+
ngOnInit() {
|
|
40576
|
+
this.model.data = this.parentModel.advanceData;
|
|
40577
|
+
this.buildTree();
|
|
40578
|
+
}
|
|
40579
|
+
buildTree() {
|
|
40580
|
+
const nodes = [];
|
|
40581
|
+
for (const ind in this.model.data) {
|
|
40582
|
+
const item = this.model.data[ind];
|
|
40583
|
+
const childNodes = { expanded: true, children: [] };
|
|
40584
|
+
childNodes.label = `${item.reason}`;
|
|
40585
|
+
childNodes.expandedIcon = 'fas fa-signature';
|
|
40586
|
+
childNodes.collapsedIcon = 'fas fa-signature';
|
|
40587
|
+
childNodes.leaf = false;
|
|
40588
|
+
if (item.reason) {
|
|
40589
|
+
childNodes.children.push({
|
|
40590
|
+
label: 'Người ký: ' + item.certificate.subject.nameOfSigner,
|
|
40591
|
+
expandedIcon: 'fas fa-user-tag',
|
|
40592
|
+
collapsedIcon: 'fas fa-user-tag',
|
|
40593
|
+
leaf: true
|
|
40594
|
+
});
|
|
40595
|
+
}
|
|
40596
|
+
childNodes.children.push({
|
|
40597
|
+
label: 'Đơn vị: ' + item.certificate.subject.organizationUnit + ' - ' + item.certificate.subject.organization,
|
|
40598
|
+
expandedIcon: 'fas fa-building',
|
|
40599
|
+
collapsedIcon: 'fas fa-building',
|
|
40600
|
+
leaf: true
|
|
40601
|
+
});
|
|
40602
|
+
childNodes.children.push({
|
|
40603
|
+
label: 'Chứng thư cấp bởi: ' + item.certificate.issuerDN.nameOfIssuer,
|
|
40604
|
+
expandedIcon: 'fas fa-certificate',
|
|
40605
|
+
collapsedIcon: 'fas fa-certificate',
|
|
40606
|
+
leaf: true
|
|
40607
|
+
});
|
|
40608
|
+
childNodes.children.push({
|
|
40609
|
+
label: 'Thời gian ký: ' + moment$1(item.signDate).format('D/MM/Y hh:mm:ss Z'),
|
|
40610
|
+
expandedIcon: 'fas fa-clock',
|
|
40611
|
+
collapsedIcon: 'fas fa-clock',
|
|
40612
|
+
leaf: true
|
|
40613
|
+
});
|
|
40614
|
+
nodes.push(childNodes);
|
|
40615
|
+
}
|
|
40616
|
+
this.model.dataSource = nodes;
|
|
40617
|
+
}
|
|
40618
|
+
}
|
|
40619
|
+
SignatureDetailComponent.decorators = [
|
|
40620
|
+
{ type: Component, args: [{
|
|
40621
|
+
selector: 'signature-detail',
|
|
40622
|
+
template: "<div class=\"tree-signature\">\r\n <p-tree [value]=\"model.dataSource\" [filter]=\"true\" [emptyMessage]=\"'Kh\u00F4ng c\u00F3 ch\u1EEF k\u00FD'\" styleClass=\"signature-tree\">\r\n </p-tree>\r\n</div>",
|
|
40623
|
+
providers: [ComponentContextService],
|
|
40624
|
+
styles: [":host::ng-deep .signature-tree{border:none;width:100%}:host::ng-deep .signature-tree .ui-treenode-icon{color:#888;padding-right:10px}:host::ng-deep .signature-tree span.fas.fa-signature+span{font-weight:700}:host::ng-deep .signature-tree span.ui-treenode-icon.fas.fa-signature{color:#212529!important;padding-left:5px}:host::ng-deep .signature-tree span.ui-tree-toggler{color:#212529!important}"]
|
|
40625
|
+
},] }
|
|
40626
|
+
];
|
|
40627
|
+
SignatureDetailComponent.ctorParameters = () => [
|
|
40628
|
+
{ type: Injector }
|
|
40629
|
+
];
|
|
40630
|
+
|
|
40384
40631
|
function coreDeclaration() {
|
|
40385
40632
|
return [
|
|
40386
40633
|
AddressComponent,
|
|
40634
|
+
AddressNewComponent,
|
|
40387
40635
|
AfterViewCheckedComponent,
|
|
40388
40636
|
AdvanceSearchComponent,
|
|
40389
40637
|
AppRootMenuComponent,
|
|
@@ -40510,7 +40758,8 @@ function coreDeclaration() {
|
|
|
40510
40758
|
FilePickerDialogComponent,
|
|
40511
40759
|
AddNewsComponent,
|
|
40512
40760
|
CommonDashboardComponent,
|
|
40513
|
-
NotFoundComponent
|
|
40761
|
+
NotFoundComponent,
|
|
40762
|
+
SignatureDetailComponent
|
|
40514
40763
|
];
|
|
40515
40764
|
}
|
|
40516
40765
|
function coreModuleImport() {
|
|
@@ -41947,54 +42196,6 @@ AppListService.ctorParameters = () => [
|
|
|
41947
42196
|
{ type: ModuleConfigService }
|
|
41948
42197
|
];
|
|
41949
42198
|
|
|
41950
|
-
class OrganizationBaseService extends BaseService {
|
|
41951
|
-
constructor(http, injector, _moduleConfigService) {
|
|
41952
|
-
super(http, injector, `${_moduleConfigService.getConfig().environment.apiDomain.organizationEndpoint}/organization`);
|
|
41953
|
-
this.ORGANIZATION_INFO_KEY = 'organization_info';
|
|
41954
|
-
this.RETRY_COUNT = 0;
|
|
41955
|
-
this.REPLAY_COUNT = 10;
|
|
41956
|
-
this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.organizationEndpoint;
|
|
41957
|
-
this._moduleConfig = _moduleConfigService.getConfig();
|
|
41958
|
-
this.organizationEndpoint = `${this._moduleConfig.environment.apiDomain.organizationEndpoint}/organization/`;
|
|
41959
|
-
}
|
|
41960
|
-
getOrganizationInfo(organizationId) {
|
|
41961
|
-
const storageItem = localStorage.getItem(this.ORGANIZATION_INFO_KEY + "_" + organizationId);
|
|
41962
|
-
const organization = JSON.parse(storageItem);
|
|
41963
|
-
if (organization) {
|
|
41964
|
-
return new Promise((resolve, reject) => resolve(organization));
|
|
41965
|
-
}
|
|
41966
|
-
else {
|
|
41967
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
41968
|
-
if (organizationId == null) {
|
|
41969
|
-
reject({});
|
|
41970
|
-
}
|
|
41971
|
-
else {
|
|
41972
|
-
if (organizationId > 0) {
|
|
41973
|
-
const svUrl = `${this.serviceUri}/GetOrganizationInfo?id=${organizationId}`;
|
|
41974
|
-
const result = yield this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
41975
|
-
// save response to local storage here
|
|
41976
|
-
localStorage.setItem(this.ORGANIZATION_INFO_KEY + "_" + repsonse.data.id, JSON.stringify(repsonse.data));
|
|
41977
|
-
return repsonse.data;
|
|
41978
|
-
}, catchError((err) => this.handleError(err, this._injector)))).toPromise();
|
|
41979
|
-
resolve(result);
|
|
41980
|
-
}
|
|
41981
|
-
}
|
|
41982
|
-
}));
|
|
41983
|
-
}
|
|
41984
|
-
}
|
|
41985
|
-
}
|
|
41986
|
-
OrganizationBaseService.ɵprov = ɵɵdefineInjectable({ factory: function OrganizationBaseService_Factory() { return new OrganizationBaseService(ɵɵinject(HttpClient), ɵɵinject(INJECTOR), ɵɵinject(ModuleConfigService)); }, token: OrganizationBaseService, providedIn: "root" });
|
|
41987
|
-
OrganizationBaseService.decorators = [
|
|
41988
|
-
{ type: Injectable, args: [{
|
|
41989
|
-
providedIn: 'root'
|
|
41990
|
-
},] }
|
|
41991
|
-
];
|
|
41992
|
-
OrganizationBaseService.ctorParameters = () => [
|
|
41993
|
-
{ type: HttpClient },
|
|
41994
|
-
{ type: Injector },
|
|
41995
|
-
{ type: ModuleConfigService }
|
|
41996
|
-
];
|
|
41997
|
-
|
|
41998
42199
|
class ErrorType {
|
|
41999
42200
|
}
|
|
42000
42201
|
ErrorType.REQUIRED = 'required';
|
|
@@ -42101,64 +42302,20 @@ class TemplateTextItem {
|
|
|
42101
42302
|
class TemplateTextMany {
|
|
42102
42303
|
}
|
|
42103
42304
|
|
|
42104
|
-
class
|
|
42105
|
-
constructor(
|
|
42106
|
-
this.
|
|
42107
|
-
this.
|
|
42108
|
-
this.
|
|
42109
|
-
this.
|
|
42110
|
-
this.
|
|
42111
|
-
this.
|
|
42112
|
-
this.multiple = false;
|
|
42113
|
-
this.uploadOnly = false;
|
|
42114
|
-
this.useBreadcrumbs = true;
|
|
42115
|
-
this.useSignature = true;
|
|
42116
|
-
this.control = new FileUploadControlSchema();
|
|
42117
|
-
for (const key in init) {
|
|
42118
|
-
this[key] = init[key];
|
|
42119
|
-
}
|
|
42120
|
-
this.control = new FileUploadControlSchema({
|
|
42121
|
-
serviceCode: this.serviceCode,
|
|
42122
|
-
entity: this.entity,
|
|
42123
|
-
entityKeyField: this.entityKeyField,
|
|
42124
|
-
readonly: this.readonly,
|
|
42125
|
-
accept: this.accept,
|
|
42126
|
-
mode: this.mode,
|
|
42127
|
-
layout: this.layout,
|
|
42128
|
-
sharedFolderType: this.sharedFolderType,
|
|
42129
|
-
fileDataService: this.fileDataService,
|
|
42130
|
-
multiple: this.multiple,
|
|
42131
|
-
disabled: this.disabled
|
|
42132
|
-
});
|
|
42133
|
-
}
|
|
42134
|
-
}
|
|
42135
|
-
class FileManagerSetting {
|
|
42136
|
-
constructor(init) {
|
|
42137
|
-
this.mode = FileManagerMode.multiple;
|
|
42138
|
-
this.layout = EnumFileLayout.SIMPLE;
|
|
42139
|
-
this.readonly = true;
|
|
42140
|
-
this.inTaiLieu = false;
|
|
42141
|
-
this.inTaiLieuChung = false;
|
|
42142
|
-
this.copyToFolderId = '';
|
|
42143
|
-
this.entityKeyField = 'id';
|
|
42144
|
-
this.control = new FileManagerControlSchema();
|
|
42145
|
-
for (const key in init) {
|
|
42146
|
-
this[key] = init[key];
|
|
42147
|
-
}
|
|
42148
|
-
this.control = new FileManagerControlSchema({
|
|
42149
|
-
serviceCode: this.serviceCode,
|
|
42150
|
-
entity: this.entity,
|
|
42151
|
-
entityKeyField: this.entityKeyField,
|
|
42152
|
-
readonly: this.readonly,
|
|
42153
|
-
accept: this.accept,
|
|
42154
|
-
mode: this.mode,
|
|
42155
|
-
layout: this.layout,
|
|
42156
|
-
fileDataService: this.fileDataService,
|
|
42157
|
-
rootFolderName: this.rootFolderName
|
|
42158
|
-
});
|
|
42305
|
+
class ServiceRequestModel {
|
|
42306
|
+
constructor() {
|
|
42307
|
+
this.service = '';
|
|
42308
|
+
this.entityInstanceId = '';
|
|
42309
|
+
this.parent = null;
|
|
42310
|
+
this.serviceCode = '';
|
|
42311
|
+
this.entity = '';
|
|
42312
|
+
this.entityKey = '';
|
|
42159
42313
|
}
|
|
42160
42314
|
}
|
|
42161
42315
|
|
|
42316
|
+
class FileVersionDTO {
|
|
42317
|
+
}
|
|
42318
|
+
|
|
42162
42319
|
var PermissionBase;
|
|
42163
42320
|
(function (PermissionBase) {
|
|
42164
42321
|
PermissionBase[PermissionBase["READ"] = 1] = "READ";
|
|
@@ -42371,5 +42528,5 @@ DynamicComponentService.ctorParameters = () => [
|
|
|
42371
42528
|
* Generated bundle index. Do not edit.
|
|
42372
42529
|
*/
|
|
42373
42530
|
|
|
42374
|
-
export { AccessDeniedComponent, Action, AddressControlSchema, AddressService, AdvanceSearchData, AdvanceSearchSetting, AppComponentBase, AppListService, ApplicationContextService, ApprovalPipe, ArrayPair, AtLeastOneRowTableValidator, AuthenService, AuthorizeDirective, AutoCompleteControlSchema, AutoCompletePickerControlSchema, AutocompleteDatasourceComponent, AvatarUploaderComponent, BaseMenuService, BaseModule, BaseService, BooleanFormatPipe, ButtonControlSchema, CONFIG_CALENDAR_VIETNAMESE, CalculationEngineService, CanBoHoSoService, CellExcel, CheckBoxListControlSchema, CheckControlVisibleService, CheckDuplicateFieldsValidator, CheckDuplicateValidator, CheckboxControlSchema, ClientV5Service, CoCauToChucControlSchema, CoCauToChucPickerComponent, CoCauToChucPickerControlSchema, CoCauToChucService, ColorControlSchema, ColorPickerControlSchema, Column, ColumnSchemaBase, ColumnSetting, ColumnSettingDetail, ComCtxConstants, CommandType, CommonAppComponentComponent, CommonDashboardComponent, CommonErrorCode, CommonService, CompareValidator, ComponentBase, ComponentConstants, ComponentContextService, ConditionalBuilderService, CongViecPickerControlSchema, ContainerSchema, ControlTreeNode, ControlType, ConvertMoneyToWordPipe, CoreConfigService, CrudBase, CrudFormComponent, CrudFormCustomFunction, CrudFormData, CrudFormSetting, CrudListComponent, CrudListConfig, CrudListCustomFunction, CrudListData, CrudListHelper, CrudListSetting, CrudService, CustomControlSchema, CustomRouterService, DanhmucApiService, DataExcel, DataFormBase, DataListBase, DataSourceControlSchema, DataSourceStateType, DataSourceTargetType, DataSourceUserRule, DataSourceUserSender, DataSourceWorkflowCoreStatus, DataType, DateCompareValidator, DateTimeControlSchema, DateTimeRangeControlSchema, DbOrganizationOrganizationService, DbOrganizationPositionService, Deadline, DeadlineType, DhvinhGuardService, DialogModel, DomService, DownloadLinkService, DropdownComponent, DropdownControlSchema, DropdownOptions, DynamicComponentService, ENUM_DON_VI_HANH_CHINH, EXPLORER_TYPES, EXPORT_VERSION_V4, EXPORT_VERSION_V5, EditFileCommand, EditorControlSchema, EformService, EmailValidator, EntityMedataDataSetting, EntityMetadataService, EntityPickerColumn, EntityPickerControlSchema, EntityWorkflowType, EnumActionType, EnumControlPickerType, EnumCoreVersion, EnumFileLayout, EnumGetRefType, EnumStateType, EnumTargetType, EnumTypeSplash, EnumUserRule, EnumWFNhomTrangThai, EnumWorkflowCoreCodeSettingKey, ErrorType, EventData, EventType, ExactOneValueInTableValidator, ExportAllMode, ExportItem, ExportItemType, ExportItemsMode, ExportManyModel, ExportManyResultModel, ExportModel, ExportService, ExportWithoutTemplateModel, Extension, FILE_TYPES, FieldDefineIsWorkflowControl, FileDataService, FileExplorerService, FileManagerComponent, FileManagerControlSchema, FileManagerMode, FileManagerSetting, FileObjectService, FilePickerDialogComponent, FileUploadComponent, FileUploadControlSchema, FileUploadMode, FileUploadSetting, FileV4Service, Filter, FolderService, FormControlBase, FormControlBaseWithService, FormSchemaBase, FormSchemaBaseWithService, FormState, Gender, GenerateLinkDownloadDTO, GenericGuardService, GetRefDataSchema, GlobalService, GmailCorrector, GridInfo, GuardService, GuardSvService, HeightType, HighPerformanceService, HighlightPipe, HtmlFormatPipe, ImageService, KeyFieldGetRefType, KeyFlashShow, KeyValueComponent, KeyValueControlSchema, LabelSchema, LabelWFNhomTrangThai, LabelWorkflowCoreStatus, LengthValidator, ListHelperService, LoaiPhieuDeXuat, LocalCacheService, LowerCorrector, MA_THONG_BAO_PHAN_HE, ManagerType, MaskControlSchema, MasterDataItem, MasterDataPipe, MasterDataService, MenuService, MethodResult, ModelSchema, ModuleConfigService, MultiTranslateHttpLoader, MultipleReferenceDataFormatPipe, NodeService, NotFoundComponent, NotificationObjectType, NotificationService, NotifierService, NumberCompareValidator, NumberOnlyValidator, NumberRangeControlSchema, Operator, OrganizationBaseService, OrganizationFormatPipe, OrganizationNameFormatPipe, OrganizationPickerControlSchema, OrganizationService, OrganizationsFormatPipe, PageInfo, PageSetting, Pair, Pattern, PermissionBase, PermissionConstant, PermissionService, PermissionStorage, PermissionTypes, PermissionUtilsComponent, PersonalSetting, PhoneNumberValidator, PhoneValidator, PopupSize, PositionService, PrintService, PublicFunction, QueryBuilderComponent, QueryBuilderGroupComponent, QueryBuilderRuleComponent, QueryGroup, QueryRule, RadioButtonListControlSchema, RandomDataService, RefField, ReferenceDataFormatPipe, RequiredFieldsValidator, RequiredValidator, RowColorOption, RowExcel, SHARE_COMPONENT_ID, SHARE_EVENT, SafeHtmlPipe, SafeStylePipe, SafeUrlPipe, SameValueValidator, SchemaBase, SecurePipe, ServiceFileUploadComponent, SessionTypes, SharedFolderType, SignalRService, SimpleDicItem, SimpleDictionary, Sort, SortDirs, SpanControlSchema, SplashComponentComponent, StartupBusinessComponentBase, StateComponent, StateMachineTopic, StateMachinesConnectionMetadataComponent, StateMachinesDesignerComponent, StateMachinesService, StateMetadataComponent, Status, StatusAction, StatusGroup, StatusOption, StatusOrg, StatusUser, StorageService, StorageUpdatedService, StringFormatPipe, SummaryPipe, SwitchControlSchema, TBL_DM_COSODAOTAO_CONSTS, TBL_DM_PHONGHOC_CONSTS, TBL_KTX_NGUOITHUE_HOSO, TBL_TS_PHIEUDEXUAT, TBL_TS_TAISANCODINH_CONSTS, TableSchema, TemplateConstant, TemplateControlSchema, TemplateInstanceService, TemplateService, TemplateTextItem, TemplateTextMany, TemplateTextV4Service, TemplateType, TemplateV4Service, TenContainer, TextAlign, TextAreaControlSchema, TextControlSchema, TextControlSchemaWithService, TitleSchema, TnClientCommand, TnClientService, TnComponentConfig, TnCustomScrollbarComponent, TnDatePipe, TnReorderableColumnDirective, TnReorderableRowDirective, TnSortIcon, TnSortableColumnDirective, TnUser, TnxSharedModule, TopicReloadNotification, TrangThaiMasterData, TrangThais, TreeDataOption, TrimCorrector, TrimEndCorrector, TrimStartCorrector, TypeDanhMucAPI, UniqueFieldInTableValidator, UniqueNumberService, UpperCorrector, UserFormatPipe, UserGroupService, UserPickerControlSchema, UserService, UserV5Service, UsersFormatPipe, Validation, VanBanPickerControlSchema, VirtualBaseService, WorkflowConfigAdvance, WorkflowCoreStatusEnum, WorkflowFieldStateCode, WorkflowPermissionDetailService, WorkflowPickerComponent, WorkflowService, WorkflowSetting, WorkflowSettingNew, WrapPickerControlSchema, addDay, addZero, appendDefaultFilter, clearAll, clone, cloneOld, coreDeclaration, coreModuleImport, coreProvider, createJsPlumnInstance, createOrgPickerControl, createRolePickerControl, createUserGroupPickerControl, createUserPickerControl, dataSourceIcon$1 as dataSourceIcon, dateDiff, genQueryFromFilters, getDateFromStringDateVN, getDayOfWeek, getEnvironmentByName, getEnvironmentData, getListMenuByName, getMenuData, getMonday, getStringDate, getStringDateTime, getStringDateVN, getStringDateVNLocal, getTimeSpan, isArray, isBoolean, isDate, isFunction, isLiteralObject, isNumber, isObjectOld, isRegular, isSimpleType, isString, isValidDate, keyUserSurveyLocal, maximumPageSize, mergeJSON, mergeJSONOld, moduleConfigFunc, multipleSort, romanize, setMetadataConnection, translateStateMachine, ɵ0, ɵ1, ɵ10, ɵ2, ɵ3, ɵ4, ɵ5, ɵ6, ɵ7, ɵ8, ɵ9, AddressComponent as ɵa, DropdownService as ɵb, EntityPermissionComponent as ɵba, DM_ChucVuService as ɵbb, RoleService as ɵbc, EntityPermissionService as ɵbd, EquationEditorComponent as ɵbe, MaskComponent as ɵbf, NumberPickerRangeComponent as ɵbg, PagingNextBackOnlyComponent as ɵbh, RadioButtonListComponent as ɵbi, VanBanPickerComponent as ɵbj, VanBanDenService as ɵbk, VanBanDiService as ɵbl, VanBanPickerDialogComponent as ɵbm, VanbanDiPickerComponent as ɵbn, VanbanDenPickerComponent as ɵbo, CongViecPickerComponent as ɵbp, CongViecService as ɵbq, TaskWorkflowHistoriesService as ɵbr, SettingsComponent as ɵbs, SettingsRowComponent as ɵbt, SettingsWorkflowComponent as ɵbu, SettingsWorkflowNo1Component as ɵbv, SimpleWorkflowFormComponent as ɵbw, ProcessWorkflowFormComponent as ɵbx, WorkflowHistoryService as ɵby, ProcessWorkflowTargetComponent as ɵbz, EntityPickerService as ɵc, SplashComponentV1Component as ɵca, SplashComponentV2Component as ɵcb, StateMachinesConnectionReceiverComponent as ɵcc, StateMachinesConnectionReceiverUserComponent as ɵcd, StateMachinesConnectionReceiverDepartmentComponent as ɵce, StateMachinesConnectionReceiverGroupComponent as ɵcf, StateMachinesConnectionReceiverRoleComponent as ɵcg, StateMachinesConnectionSenderComponent as ɵch, StartWorkflowComponent as ɵci, WorkflowSettingsService as ɵcj, WorkflowSettingNewComponent as ɵck, DmLoaiCongViecService as ɵcl, TnDialogComponent as ɵcm, TnColorPickerComponent as ɵcn, TnTinymceComponent as ɵco, TnTabViewComponent as ɵcp, TableDetailFormComponent as ɵcq, FileIconPipe as ɵcr, FileSizePipe as ɵcs, QuickAddFormComponent as ɵct, PreventShiftTabDirective as ɵcu, UserPickerComponent as ɵcv, UserPickerBoxComponent as ɵcw, TnAppHelpComponent as ɵcx, PathNameService as ɵcy, HelperCurrentPageComponent as ɵcz, ExceptionHandlerService as ɵd, TnAppNotificationListComponent as ɵda, TnAppNotificationComponent as ɵdb, MyDriveService as ɵdc, FileVersionService as ɵdd, FileExplorerNewService as ɵde, FolderFormComponent as ɵdf, FileFormComponent as ɵdg, FileViewerComponent as ɵdh, FileVersionListComponent as ɵdi, WorkflowHistoryComponent as ɵdj, EntityWorkflowHistoryService as ɵdk, WorkflowHistoryDialogComponent as ɵdl, WorkflowHistoryNewComponent as ɵdm, WorkflowSettingComponent as ɵdn, EntityWorkflowSettingService as ɵdo, WorkflowSettingDialogComponent as ɵdp, QrCodeGeneratorComponent as ɵdq, AccessDeniedV1Component as ɵdr, AddNewsComponent as ɵds, ArticleService as ɵdt, NewsCategoryService as ɵdu, CheckReadyComponent as ɵdv, SendAccessTokenInterceptor as ɵdw, LogInterceptor as ɵdx, PermissionUtilsInterceptor as ɵdy, CanBo_HoSoService as ɵe, AfterViewCheckedComponent as ɵf, AdvanceSearchComponent as ɵg, AppRootMenuComponent as ɵh, AppTopBarComponent as ɵi, AppTopBarV1Component as ɵj, AppTopBarV2Component as ɵk, AppProfileComponent as ɵl, AppSubMenuComponent as ɵm, AppMenuComponent as ɵn, AutoCompletePickerComponent as ɵo, CheckBoxListComponent as ɵp, ReportQueueComponent as ɵq, CoCauToChucPickerListComponent as ɵr, DatetimePickerComponent as ɵs, DatetimePickerRangeComponent as ɵt, DynamicNodeComponent as ɵu, EntityPickerBoxComponent as ɵv, EntityPickerDataComponent as ɵw, EntityPickerSelectedComponent as ɵx, EntityPickerComponent as ɵy, EntityPickerDialogComponent as ɵz };
|
|
42531
|
+
export { AccessDeniedComponent, Action, AddressControlSchema, AddressNewControlSchema, AddressService, AdvanceSearchData, AdvanceSearchSetting, AppComponentBase, AppListService, ApplicationContextService, ApprovalPipe, ArrayPair, AtLeastOneRowTableValidator, AuthenService, AuthorizeDirective, AutoCompleteControlSchema, AutoCompletePickerControlSchema, AutocompleteDatasourceComponent, AvatarUploaderComponent, BaseMenuService, BaseModule, BaseService, BooleanFormatPipe, ButtonControlSchema, CONFIG_CALENDAR_VIETNAMESE, CalculationEngineService, CanBoHoSoService, CellExcel, CheckBoxListControlSchema, CheckControlVisibleService, CheckDuplicateFieldsValidator, CheckDuplicateValidator, CheckboxControlSchema, ClientV5Service, CoCauToChucControlSchema, CoCauToChucPickerComponent, CoCauToChucPickerControlSchema, CoCauToChucService, ColorControlSchema, ColorPickerControlSchema, Column, ColumnSchemaBase, ColumnSetting, ColumnSettingDetail, ComCtxConstants, CommandType, CommonAppComponentComponent, CommonDashboardComponent, CommonErrorCode, CommonService, CompareValidator, ComponentBase, ComponentConstants, ComponentContextService, ConditionalBuilderService, CongViecPickerControlSchema, ContainerSchema, ControlTreeNode, ControlType, ConvertMoneyToWordPipe, CoreConfigService, CrudBase, CrudFormComponent, CrudFormCustomFunction, CrudFormData, CrudFormSetting, CrudListComponent, CrudListConfig, CrudListCustomFunction, CrudListData, CrudListHelper, CrudListSetting, CrudService, CustomControlSchema, CustomRouterService, DanhmucApiService, DataExcel, DataFormBase, DataListBase, DataSourceControlSchema, DataSourceStateType, DataSourceTargetType, DataSourceUserRule, DataSourceUserSender, DataSourceWorkflowCoreStatus, DataType, DateCompareValidator, DateTimeControlSchema, DateTimeRangeControlSchema, DbOrganizationOrganizationService, DbOrganizationPositionService, Deadline, DeadlineType, DhvinhGuardService, DialogModel, DomService, DownloadLinkService, DropdownComponent, DropdownControlSchema, DropdownOptions, DynamicComponentService, ENUM_DON_VI_HANH_CHINH, EXPLORER_TYPES, EXPORT_VERSION_V4, EXPORT_VERSION_V5, EditFileCommand, EditorControlSchema, EformService, EmailValidator, EntityMedataDataSetting, EntityMetadataService, EntityPickerColumn, EntityPickerControlSchema, EntityWorkflowType, EnumActionType, EnumControlPickerType, EnumFileLayout, EnumGetRefType, EnumStateType, EnumTargetType, EnumTypeSplash, EnumUserRule, EnumWFNhomTrangThai, EnumWorkflowCoreCodeSettingKey, ErrorType, EventData, ExactOneValueInTableValidator, ExportAllMode, ExportItem, ExportItemType, ExportItemsMode, ExportManyModel, ExportManyResultModel, ExportModel, ExportService, ExportWithoutTemplateModel, Extension, FILE_TYPES, FieldDefineIsWorkflowControl, FileDataService, FileExplorerItem, FileExplorerItemType, FileExplorerNewService, FileExplorerService, FileManagerComponent, FileManagerControlSchema, FileManagerMode, FileObjectService, FilePickerDialogComponent, FileUploadComponent, FileUploadControlSchema, FileUploadMode, FileV4Service, FileVersionDTO, FileVersionService, Filter, FolderService, FormControlBase, FormControlBaseWithService, FormSchemaBase, FormSchemaBaseWithService, FormState, Gender, GenerateLinkDownloadDTO, GenericGuardService, GetRefDataSchema, GlobalService, GmailCorrector, GridInfo, GuardService, GuardSvService, HeightType, HighPerformanceService, HighlightPipe, HtmlFormatPipe, ImageService, KeyFieldGetRefType, KeyFlashShow, KeyValueComponent, KeyValueControlSchema, LabelSchema, LabelWFNhomTrangThai, LabelWorkflowCoreStatus, LengthValidator, ListHelperService, LoaiPhieuDeXuat, LocalCacheService, LowerCorrector, MA_THONG_BAO_PHAN_HE, ManagerType, MaskControlSchema, MasterDataItem, MasterDataPipe, MasterDataService, MenuService, MethodResult, ModelSchema, ModuleConfigService, MultiTranslateHttpLoader, MultipleReferenceDataFormatPipe, MyDriveService, NodeService, NotFoundComponent, NotificationObjectType, NotificationService, NotifierService, NumberCompareValidator, NumberOnlyValidator, NumberRangeControlSchema, Operator, OrganizationFormatPipe, OrganizationNameFormatPipe, OrganizationPickerControlSchema, OrganizationService, OrganizationsFormatPipe, PageInfo, PageSetting, Pair, Pattern, PermissionBase, PermissionConstant, PermissionService, PermissionStorage, PermissionTypes, PermissionUtilsComponent, PersonalSetting, PhoneNumberValidator, PhoneValidator, PopupSize, PositionService, PrintService, PublicFunction, QueryBuilderComponent, QueryBuilderGroupComponent, QueryBuilderRuleComponent, QueryGroup, QueryRule, RadioButtonListControlSchema, RandomDataService, RefField, ReferenceDataFormatPipe, RequiredFieldsValidator, RequiredValidator, RowColorOption, RowExcel, SHARE_COMPONENT_ID, SHARE_EVENT, SafeHtmlPipe, SafeStylePipe, SafeUrlPipe, SameValueValidator, SchemaBase, SecurePipe, ServiceFileUploadComponent, ServiceRequestModel, SessionTypes, SharedFolderType, SignalRService, SimpleDicItem, SimpleDictionary, Sort, SortDirs, SpanControlSchema, SplashComponentComponent, StartupBusinessComponentBase, StateComponent, StateMachineTopic, StateMachinesConnectionMetadataComponent, StateMachinesDesignerComponent, StateMachinesService, StateMetadataComponent, Status, StatusAction, StatusGroup, StatusOption, StatusOrg, StatusUser, StorageService, StorageUpdatedService, StringFormatPipe, SummaryPipe, SwitchControlSchema, TBL_DM_COSODAOTAO_CONSTS, TBL_DM_PHONGHOC_CONSTS, TBL_KTX_NGUOITHUE_HOSO, TBL_TS_PHIEUDEXUAT, TBL_TS_TAISANCODINH_CONSTS, TableSchema, TemplateConstant, TemplateControlSchema, TemplateInstanceService, TemplateService, TemplateTextItem, TemplateTextMany, TemplateTextV4Service, TemplateType, TemplateV4Service, TenContainer, TextAlign, TextAreaControlSchema, TextControlSchema, TextControlSchemaWithService, TitleSchema, TnClientCommand, TnClientService, TnComponentConfig, TnCustomScrollbarComponent, TnDatePipe, TnReorderableColumnDirective, TnReorderableRowDirective, TnSortIcon, TnSortableColumnDirective, TnUser, TnxSharedModule, TopicReloadNotification, TrangThaiMasterData, TrangThais, TreeDataOption, TrimCorrector, TrimEndCorrector, TrimStartCorrector, TypeDanhMucAPI, UniqueFieldInTableValidator, UniqueNumberService, UpperCorrector, UserFormatPipe, UserGroupService, UserPickerControlSchema, UserService, UserV5Service, UsersFormatPipe, Validation, VanBanPickerControlSchema, VirtualBaseService, WorkflowConfigAdvance, WorkflowCoreStatusEnum, WorkflowFieldStateCode, WorkflowPermissionDetailService, WorkflowPickerComponent, WorkflowService, WorkflowSetting, WorkflowSettingNew, WrapPickerControlSchema, addDay, addZero, appendDefaultFilter, clearAll, clone, cloneOld, coreDeclaration, coreModuleImport, coreProvider, createJsPlumnInstance, createOrgPickerControl, createRolePickerControl, createUserGroupPickerControl, createUserPickerControl, dataSourceIcon$1 as dataSourceIcon, dateDiff, genQueryFromFilters, getDateFromStringDateVN, getDayOfWeek, getEnvironmentByName, getEnvironmentData, getListMenuByName, getMenuData, getMonday, getStringDate, getStringDateTime, getStringDateVN, getStringDateVNLocal, getTimeSpan, isArray, isBoolean, isDate, isFunction, isLiteralObject, isNumber, isObjectOld, isRegular, isSimpleType, isString, isValidDate, keyUserSurveyLocal, maximumPageSize, mergeJSON, mergeJSONOld, moduleConfigFunc, multipleSort, romanize, setMetadataConnection, translateStateMachine, ɵ0, ɵ1, ɵ10, ɵ2, ɵ3, ɵ4, ɵ5, ɵ6, ɵ7, ɵ8, ɵ9, AddressComponent as ɵa, DropdownService as ɵb, EntityPickerComponent as ɵba, EntityPickerDialogComponent as ɵbb, EntityPermissionComponent as ɵbc, DM_ChucVuService as ɵbd, RoleService as ɵbe, EntityPermissionService as ɵbf, EquationEditorComponent as ɵbg, MaskComponent as ɵbh, NumberPickerRangeComponent as ɵbi, PagingNextBackOnlyComponent as ɵbj, RadioButtonListComponent as ɵbk, VanBanPickerComponent as ɵbl, VanBanDenService as ɵbm, VanBanDiService as ɵbn, VanBanPickerDialogComponent as ɵbo, VanbanDiPickerComponent as ɵbp, VanbanDenPickerComponent as ɵbq, CongViecPickerComponent as ɵbr, CongViecService as ɵbs, TaskWorkflowHistoriesService as ɵbt, SettingsComponent as ɵbu, SettingsRowComponent as ɵbv, SettingsWorkflowComponent as ɵbw, SettingsWorkflowNo1Component as ɵbx, SimpleWorkflowFormComponent as ɵby, ProcessWorkflowFormComponent as ɵbz, EntityPickerService as ɵc, WorkflowHistoryService as ɵca, ProcessWorkflowTargetComponent as ɵcb, SplashComponentV1Component as ɵcc, SplashComponentV2Component as ɵcd, StateMachinesConnectionReceiverComponent as ɵce, StateMachinesConnectionReceiverUserComponent as ɵcf, StateMachinesConnectionReceiverDepartmentComponent as ɵcg, StateMachinesConnectionReceiverGroupComponent as ɵch, StateMachinesConnectionReceiverRoleComponent as ɵci, StateMachinesConnectionSenderComponent as ɵcj, StartWorkflowComponent as ɵck, WorkflowSettingsService as ɵcl, WorkflowSettingNewComponent as ɵcm, DmLoaiCongViecService as ɵcn, TnDialogComponent as ɵco, TnColorPickerComponent as ɵcp, TnTinymceComponent as ɵcq, TnTabViewComponent as ɵcr, TableDetailFormComponent as ɵcs, FileIconPipe as ɵct, FileSizePipe as ɵcu, QuickAddFormComponent as ɵcv, PreventShiftTabDirective as ɵcw, UserPickerComponent as ɵcx, UserPickerBoxComponent as ɵcy, TnAppHelpComponent as ɵcz, ExceptionHandlerService as ɵd, PathNameService as ɵda, HelperCurrentPageComponent as ɵdb, TnAppNotificationListComponent as ɵdc, TnAppNotificationComponent as ɵdd, FolderFormComponent as ɵde, FileFormComponent as ɵdf, FileViewerComponent as ɵdg, FileVersionListComponent as ɵdh, WorkflowHistoryComponent as ɵdi, EntityWorkflowHistoryService as ɵdj, WorkflowHistoryDialogComponent as ɵdk, WorkflowHistoryNewComponent as ɵdl, WorkflowSettingComponent as ɵdm, EntityWorkflowSettingService as ɵdn, WorkflowSettingDialogComponent as ɵdo, QrCodeGeneratorComponent as ɵdp, AccessDeniedV1Component as ɵdq, AddNewsComponent as ɵdr, ArticleService as ɵds, NewsCategoryService as ɵdt, SignatureDetailComponent as ɵdu, CheckReadyComponent as ɵdv, SendAccessTokenInterceptor as ɵdw, LogInterceptor as ɵdx, PermissionUtilsInterceptor as ɵdy, CanBo_HoSoService as ɵe, AddressNewComponent as ɵf, AddressService$1 as ɵg, AfterViewCheckedComponent as ɵh, AdvanceSearchComponent as ɵi, AppRootMenuComponent as ɵj, AppTopBarComponent as ɵk, AppTopBarV1Component as ɵl, AppTopBarV2Component as ɵm, AppProfileComponent as ɵn, AppSubMenuComponent as ɵo, AppMenuComponent as ɵp, AutoCompletePickerComponent as ɵq, CheckBoxListComponent as ɵr, ReportQueueComponent as ɵs, CoCauToChucPickerListComponent as ɵt, DatetimePickerComponent as ɵu, DatetimePickerRangeComponent as ɵv, DynamicNodeComponent as ɵw, EntityPickerBoxComponent as ɵx, EntityPickerDataComponent as ɵy, EntityPickerSelectedComponent as ɵz };
|
|
42375
42532
|
//# sourceMappingURL=tnx-shared.js.map
|