tnx-shared 5.2.20 → 5.2.21
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/app-context/component-context.service.d.ts.map +1 -1
- package/classes/base/component-base.d.ts +1 -1
- package/classes/public-function.d.ts +3 -2
- package/classes/public-function.d.ts.map +1 -1
- package/components/chat/chat-box/chat-box.component.d.ts +1 -1
- package/components/dropdown/services/dropdown.service.d.ts.map +1 -1
- package/components/file-explorer/services/file-explorer-new.service.d.ts.map +1 -1
- package/components/file-explorer/services/file-explorer.service.d.ts.map +1 -1
- package/components/file-explorer/services/file-version.service.d.ts.map +1 -1
- package/components/file-explorer/services/folder.service.d.ts.map +1 -1
- package/components/file-explorer/services/ky-so-sim-signPDF.service.d.ts.map +1 -1
- package/components/file-explorer/services/my-drive.service.d.ts.map +1 -1
- package/components/tn-app-help/services/path-name.service.d.ts.map +1 -1
- package/congviec/congviec/services/congviec-dinhkem.service.d.ts.map +1 -1
- package/esm2020/app-context/component-context.service.mjs +4 -5
- package/esm2020/classes/base/component-base.mjs +2 -2
- package/esm2020/components/common-app-component/common-app-component.mjs +2 -2
- package/esm2020/components/crud/crud-form/crud-form.component.mjs +1 -1
- package/esm2020/components/dropdown/services/dropdown.service.mjs +5 -5
- package/esm2020/components/file-explorer/file-ky-so-sim/file-ky-so-sim.component.mjs +1 -1
- package/esm2020/components/file-explorer/file-manager/file-manager.component.mjs +2 -2
- package/esm2020/components/file-explorer/file-viewer/file-viewer.component.mjs +3 -3
- package/esm2020/components/file-explorer/services/file-explorer-new.service.mjs +39 -40
- package/esm2020/components/file-explorer/services/file-explorer.service.mjs +48 -51
- package/esm2020/components/file-explorer/services/file-version.service.mjs +5 -4
- package/esm2020/components/file-explorer/services/folder.service.mjs +3 -3
- package/esm2020/components/file-explorer/services/ky-so-sim-signPDF.service.mjs +3 -2
- package/esm2020/components/file-explorer/services/my-drive.service.mjs +34 -34
- package/esm2020/components/mask/mask.component.mjs +1 -1
- package/esm2020/components/number-picker-range/number-picker-range.component.mjs +1 -1
- package/esm2020/components/tn-app-help/services/path-name.service.mjs +4 -3
- package/esm2020/components/tn-tinymce/tn-tinymce.component.mjs +2 -2
- package/esm2020/components/user-picker/user-picker-box/user-picker-box.component.mjs +1 -1
- package/esm2020/components/workflow/workflow-history-new/workflow-history-new.component.mjs +1 -1
- package/esm2020/congviec/cauhinh-workflow/cauhinh-workflow.component.mjs +1 -1
- package/esm2020/congviec/congviec/services/congviec-dinhkem.service.mjs +5 -4
- package/esm2020/services/article.service.mjs +10 -13
- package/esm2020/services/base.service.mjs +36 -41
- package/esm2020/services/custom-router.service.mjs +4 -5
- package/esm2020/services/entity-picker.service.mjs +4 -3
- package/esm2020/services/file-object-v4.service.mjs +5 -7
- package/esm2020/services/high-performance.service.mjs +4 -3
- package/esm2020/services/master-data.service.mjs +23 -30
- package/esm2020/services/organization.service.mjs +18 -23
- package/esm2020/services/template-v4.service.mjs +3 -2
- package/esm2020/services/template.service.mjs +19 -27
- package/esm2020/services/templateinstance.service.mjs +22 -31
- package/esm2020/services/tn-client.service.mjs +3 -3
- package/esm2020/services/unique-number.service.mjs +4 -3
- package/esm2020/services/user-v5.service.mjs +31 -39
- package/esm2020/services/user.service.mjs +32 -40
- package/fesm2015/tnx-shared.mjs +334 -409
- package/fesm2015/tnx-shared.mjs.map +1 -1
- package/fesm2020/tnx-shared.mjs +334 -409
- package/fesm2020/tnx-shared.mjs.map +1 -1
- package/package.json +2 -2
- package/services/article.service.d.ts.map +1 -1
- package/services/base.service.d.ts.map +1 -1
- package/services/common.service.d.ts +2 -2
- package/services/custom-router.service.d.ts.map +1 -1
- package/services/entity-picker.service.d.ts.map +1 -1
- package/services/file-object-v4.service.d.ts.map +1 -1
- package/services/high-performance.service.d.ts.map +1 -1
- package/services/master-data.service.d.ts.map +1 -1
- package/services/organization.service.d.ts.map +1 -1
- package/services/template-v4.service.d.ts.map +1 -1
- package/services/template.service.d.ts.map +1 -1
- package/services/templateinstance.service.d.ts.map +1 -1
- package/services/unique-number.service.d.ts.map +1 -1
- package/services/user-v5.service.d.ts.map +1 -1
- package/services/user.service.d.ts.map +1 -1
package/fesm2015/tnx-shared.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, InjectionToken, Optional, Inject, Directive, Input, ChangeDetectorRef, ViewChild, EventEmitter, Component, Output, forwardRef, TemplateRef, ContentChild, ContentChildren, HostListener, ChangeDetectionStrategy, ViewEncapsulation, Pipe, LOCALE_ID, QueryList, isDevMode, NgModuleFactory, Compiler, NgModule } from '@angular/core';
|
|
3
|
-
import { Subject, ReplaySubject, forkJoin, from, combineLatest } from 'rxjs';
|
|
3
|
+
import { Subject, ReplaySubject, firstValueFrom, forkJoin, from, combineLatest } from 'rxjs';
|
|
4
4
|
import { takeUntil, catchError, shareReplay, retry, map, debounceTime, distinctUntilChanged, mergeMap, distinct, filter } from 'rxjs/operators';
|
|
5
5
|
import { __awaiter } from 'tslib';
|
|
6
6
|
import * as i5 from '@angular/common';
|
|
@@ -2412,12 +2412,12 @@ class ComponentContextService {
|
|
|
2412
2412
|
}
|
|
2413
2413
|
completeEvent(name) {
|
|
2414
2414
|
const subject = this.addSubject(name);
|
|
2415
|
-
subject.next();
|
|
2415
|
+
subject.next(1);
|
|
2416
2416
|
subject.complete();
|
|
2417
2417
|
}
|
|
2418
2418
|
completeReplayEvent(name) {
|
|
2419
2419
|
const subject = this.addReplaySubject(name);
|
|
2420
|
-
subject.next();
|
|
2420
|
+
subject.next(1);
|
|
2421
2421
|
subject.complete();
|
|
2422
2422
|
}
|
|
2423
2423
|
completeSubject(name) {
|
|
@@ -2550,7 +2550,6 @@ class ComponentContextService {
|
|
|
2550
2550
|
return this.setDataInternal(this.data, keyPath, value);
|
|
2551
2551
|
}
|
|
2552
2552
|
setDataInternal(obj, keyPath, data) {
|
|
2553
|
-
const root = this.root || this;
|
|
2554
2553
|
this._commonService.setValueByPath(obj, keyPath, data);
|
|
2555
2554
|
}
|
|
2556
2555
|
destroyContext() {
|
|
@@ -2560,7 +2559,7 @@ class ComponentContextService {
|
|
|
2560
2559
|
for (const key in this.replaySubjects) {
|
|
2561
2560
|
this.completeReplaySubject(key);
|
|
2562
2561
|
}
|
|
2563
|
-
this._unSubscribeAll.next();
|
|
2562
|
+
this._unSubscribeAll.next(1);
|
|
2564
2563
|
this._unSubscribeAll.complete();
|
|
2565
2564
|
this.data = {};
|
|
2566
2565
|
this.root.fireEvent(ComCtxConstants.ROOT.DESTROY_COMPONENT, this);
|
|
@@ -4804,9 +4803,8 @@ class MasterDataService {
|
|
|
4804
4803
|
}));
|
|
4805
4804
|
}
|
|
4806
4805
|
getDMChungDropdown(code) {
|
|
4807
|
-
return this._httpClient.get(`${this.singleCategoryEndpoint}/GetByFilterCodeAndNameByGroupCode/${code}`)
|
|
4808
|
-
.pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
|
|
4809
|
-
.toPromise();
|
|
4806
|
+
return firstValueFrom(this._httpClient.get(`${this.singleCategoryEndpoint}/GetByFilterCodeAndNameByGroupCode/${code}`)
|
|
4807
|
+
.pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
|
|
4810
4808
|
}
|
|
4811
4809
|
getItems(groupCode) {
|
|
4812
4810
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4854,18 +4852,16 @@ class MasterDataService {
|
|
|
4854
4852
|
}
|
|
4855
4853
|
dogetAddress(id, level = 1) {
|
|
4856
4854
|
const serviceUri = `${this.apiEndpoint}/CityCategory/GetByParentId/${id}?level=${level}`;
|
|
4857
|
-
return this._httpClient.get(serviceUri)
|
|
4858
|
-
.pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
|
|
4859
|
-
.toPromise();
|
|
4855
|
+
return firstValueFrom(this._httpClient.get(serviceUri)
|
|
4856
|
+
.pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
|
|
4860
4857
|
}
|
|
4861
4858
|
getItemDetailUnit(id) {
|
|
4862
4859
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
4863
4860
|
let itemData = new MasterDataItem();
|
|
4864
4861
|
if (!this.storage.getItem(`${this.administrativeUnitItem}${id}`)) {
|
|
4865
4862
|
const serviceUri = `${this.apiEndpoint}/CityCategory/GetByCode/${id}`;
|
|
4866
|
-
const result = yield this._httpClient.get(serviceUri)
|
|
4867
|
-
.pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
|
|
4868
|
-
.toPromise();
|
|
4863
|
+
const result = yield firstValueFrom(this._httpClient.get(serviceUri)
|
|
4864
|
+
.pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
|
|
4869
4865
|
this.storage.setItem(`${this.administrativeUnitItem}${id}`, JSON.stringify(result.data));
|
|
4870
4866
|
itemData = result.data;
|
|
4871
4867
|
}
|
|
@@ -4881,9 +4877,9 @@ class MasterDataService {
|
|
|
4881
4877
|
resolve({ data: {}, success: true });
|
|
4882
4878
|
});
|
|
4883
4879
|
// const serviceUri = `${this.apiEndpoint}/ConfigurationService/GetValueByCode?code=${code}`;
|
|
4884
|
-
// return this._httpClient.get<ResponseResult>(serviceUri)
|
|
4880
|
+
// return firstValueFrom(this._httpClient.get<ResponseResult>(serviceUri)
|
|
4885
4881
|
// .pipe(catchError((err: HttpErrorResponse) => this._commonService.handleError(err, this._injector)))
|
|
4886
|
-
//
|
|
4882
|
+
// );
|
|
4887
4883
|
}
|
|
4888
4884
|
doGetAll(groupCode) {
|
|
4889
4885
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4906,25 +4902,23 @@ class MasterDataService {
|
|
|
4906
4902
|
});
|
|
4907
4903
|
}
|
|
4908
4904
|
getData(uri, gridInfo) {
|
|
4909
|
-
return this._httpClient.post(uri, gridInfo)
|
|
4905
|
+
return firstValueFrom(this._httpClient.post(uri, gridInfo));
|
|
4910
4906
|
}
|
|
4911
4907
|
getGroupByCode(groupCode) {
|
|
4912
4908
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4913
4909
|
const uri = `${this.groupCategoryEndpoint}/getByCode/${groupCode}`;
|
|
4914
|
-
return this._httpClient.get(uri)
|
|
4910
|
+
return firstValueFrom(this._httpClient.get(uri));
|
|
4915
4911
|
});
|
|
4916
4912
|
}
|
|
4917
4913
|
addWorkDays(date, days, isDay = 1) {
|
|
4918
4914
|
const serviceUri = `${this.apiEndpoint}/HolidayCategory/GetDate?date=${date}&days=${days}&isDay=${isDay}`;
|
|
4919
|
-
return this._httpClient.get(serviceUri)
|
|
4920
|
-
.pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
|
|
4921
|
-
.toPromise();
|
|
4915
|
+
return firstValueFrom(this._httpClient.get(serviceUri)
|
|
4916
|
+
.pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
|
|
4922
4917
|
}
|
|
4923
4918
|
getDateByDuration(date, type, duration) {
|
|
4924
4919
|
const serviceUri = `${this.apiEndpoint}/HolidayCategory/getDateByDuration?date=${date}&type=${type}&duration=${duration}`;
|
|
4925
|
-
return this._httpClient.get(serviceUri)
|
|
4926
|
-
.pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
|
|
4927
|
-
.toPromise();
|
|
4920
|
+
return firstValueFrom(this._httpClient.get(serviceUri)
|
|
4921
|
+
.pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
|
|
4928
4922
|
}
|
|
4929
4923
|
getItemByCode(dataSource, code) {
|
|
4930
4924
|
return dataSource.find(x => x.code === code);
|
|
@@ -4990,21 +4984,18 @@ class MasterDataService {
|
|
|
4990
4984
|
}
|
|
4991
4985
|
getValueByCode(code) {
|
|
4992
4986
|
const url = `${this.singleCategoryEndpoint}/getValueByCode?code=${code}`;
|
|
4993
|
-
return this._httpClient.get(url)
|
|
4994
|
-
.pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
|
|
4995
|
-
.toPromise();
|
|
4987
|
+
return firstValueFrom(this._httpClient.get(url)
|
|
4988
|
+
.pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
|
|
4996
4989
|
}
|
|
4997
4990
|
getGroupItemByCode(code) {
|
|
4998
4991
|
const url = `${this.apiEndpoint}/GroupCategory/${code}`;
|
|
4999
|
-
return this._httpClient.get(url).pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
|
|
5000
|
-
.toPromise();
|
|
4992
|
+
return firstValueFrom(this._httpClient.get(url).pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
|
|
5001
4993
|
}
|
|
5002
4994
|
parseMathExpression(expression, decimalPlaces, forVietnamese = true) {
|
|
5003
4995
|
expression = encodeURIComponent(expression);
|
|
5004
4996
|
const url = `${this.apiEndpoint}/MathExpression/ParseMath?expression=${expression}&decimalPlaces=${decimalPlaces}&forVietnamese=${forVietnamese}`;
|
|
5005
|
-
return this._httpClient.get(url)
|
|
5006
|
-
.pipe(catchError((err) => this._commonService.handleError(err, this._injector)))
|
|
5007
|
-
.toPromise();
|
|
4997
|
+
return firstValueFrom(this._httpClient.get(url)
|
|
4998
|
+
.pipe(catchError((err) => this._commonService.handleError(err, this._injector))));
|
|
5008
4999
|
}
|
|
5009
5000
|
getByGridRequest(groupCode, gridInfo, plusUrl = '') {
|
|
5010
5001
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -5015,9 +5006,9 @@ class MasterDataService {
|
|
|
5015
5006
|
if (plusUrl != null && plusUrl != '') {
|
|
5016
5007
|
apiUrl += '/' + plusUrl;
|
|
5017
5008
|
}
|
|
5018
|
-
data = yield this._httpClient
|
|
5009
|
+
data = yield firstValueFrom(this._httpClient
|
|
5019
5010
|
.post(apiUrl, gridInfo)
|
|
5020
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
5011
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
5021
5012
|
this.storage.setItem(`${this.categoryPrefix}${groupCode}`, JSON.stringify(data.data));
|
|
5022
5013
|
}
|
|
5023
5014
|
else {
|
|
@@ -6054,8 +6045,8 @@ class BaseService {
|
|
|
6054
6045
|
apiUrl += `&`;
|
|
6055
6046
|
}
|
|
6056
6047
|
apiUrl += `_keySignalr=${topic}`;
|
|
6057
|
-
this._http.get(apiUrl)
|
|
6058
|
-
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)))
|
|
6048
|
+
firstValueFrom(this._http.get(apiUrl)
|
|
6049
|
+
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))))
|
|
6059
6050
|
.then(res => {
|
|
6060
6051
|
})
|
|
6061
6052
|
.catch(err => {
|
|
@@ -6085,8 +6076,8 @@ class BaseService {
|
|
|
6085
6076
|
apiUrl += `&`;
|
|
6086
6077
|
}
|
|
6087
6078
|
apiUrl += `_keySignalr=${topic}`;
|
|
6088
|
-
this._http.post(apiUrl, data)
|
|
6089
|
-
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)))
|
|
6079
|
+
firstValueFrom(this._http.post(apiUrl, data)
|
|
6080
|
+
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))))
|
|
6090
6081
|
.then(res => {
|
|
6091
6082
|
})
|
|
6092
6083
|
.catch(err => {
|
|
@@ -6465,94 +6456,88 @@ class BaseService {
|
|
|
6465
6456
|
}
|
|
6466
6457
|
post(item, plusUrl = '') {
|
|
6467
6458
|
const uri = plusUrl ? `${this.serviceUri}/${plusUrl}` : this.serviceUri;
|
|
6468
|
-
return this._http
|
|
6459
|
+
return firstValueFrom(this._http
|
|
6469
6460
|
.post(uri, item)
|
|
6470
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
6461
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
6471
6462
|
}
|
|
6472
6463
|
put(id, item, plusUrl = '') {
|
|
6473
6464
|
const url = plusUrl ? `${this.serviceUri}/${plusUrl}/${id}` : `${this.serviceUri}/${id}`;
|
|
6474
|
-
return this._http.put(url, item)
|
|
6465
|
+
return firstValueFrom(this._http.put(url, item));
|
|
6475
6466
|
}
|
|
6476
6467
|
delete(id) {
|
|
6477
6468
|
const url = `${this.serviceUri}/${id}`;
|
|
6478
|
-
return this._http.delete(url)
|
|
6469
|
+
return firstValueFrom(this._http.delete(url));
|
|
6479
6470
|
}
|
|
6480
6471
|
deleteById(id) {
|
|
6481
6472
|
const url = `${this.serviceUri}/${id}`;
|
|
6482
|
-
return this._http.delete(url).pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
6473
|
+
return firstValueFrom(this._http.delete(url).pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
6483
6474
|
}
|
|
6484
6475
|
deleteMany(lstId) {
|
|
6485
6476
|
const url = `${this.serviceUri}/DeleteManyAsync/${lstId}`;
|
|
6486
|
-
return this._http.delete(url)
|
|
6477
|
+
return firstValueFrom(this._http.delete(url));
|
|
6487
6478
|
}
|
|
6488
6479
|
defaultGet(apiUrl, options) {
|
|
6489
|
-
return this._http.get(apiUrl, options)
|
|
6490
|
-
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)))
|
|
6480
|
+
return firstValueFrom(this._http.get(apiUrl, options)
|
|
6481
|
+
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
|
|
6491
6482
|
}
|
|
6492
6483
|
getIgnoreClientCache(apiUrl) {
|
|
6493
6484
|
const options = {
|
|
6494
6485
|
headers: new HttpHeaders({ 'Cache-Control': 'no-cache' }),
|
|
6495
6486
|
};
|
|
6496
|
-
return this._http.get(apiUrl, options)
|
|
6497
|
-
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)))
|
|
6487
|
+
return firstValueFrom(this._http.get(apiUrl, options)
|
|
6488
|
+
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
|
|
6498
6489
|
}
|
|
6499
6490
|
defaultPost(apiUrl, data, options) {
|
|
6500
|
-
return this._http.post(apiUrl, data, options)
|
|
6501
|
-
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)))
|
|
6491
|
+
return firstValueFrom(this._http.post(apiUrl, data, options)
|
|
6492
|
+
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
|
|
6502
6493
|
}
|
|
6503
6494
|
defaultPut(apiUrl, data) {
|
|
6504
|
-
return this._http.put(apiUrl, data)
|
|
6505
|
-
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)))
|
|
6495
|
+
return firstValueFrom(this._http.put(apiUrl, data)
|
|
6496
|
+
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
|
|
6506
6497
|
}
|
|
6507
6498
|
defaultDelete(apiUrl) {
|
|
6508
|
-
return this._http.delete(apiUrl)
|
|
6509
|
-
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)))
|
|
6499
|
+
return firstValueFrom(this._http.delete(apiUrl)
|
|
6500
|
+
.pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
|
|
6510
6501
|
}
|
|
6511
6502
|
getEntityMetadata() {
|
|
6512
6503
|
const apiUrl = `${this.serviceUri}/GetEntityMetadata`;
|
|
6513
|
-
return this._http.get(apiUrl)
|
|
6514
|
-
.pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
6515
|
-
.toPromise();
|
|
6504
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
6505
|
+
.pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
6516
6506
|
}
|
|
6517
6507
|
saveEntityMetadata(data) {
|
|
6518
6508
|
const apiUrl = `${this.serviceUri}/SaveEntityMetadata`;
|
|
6519
|
-
return this._http.post(apiUrl, data)
|
|
6520
|
-
.pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
6521
|
-
.toPromise();
|
|
6509
|
+
return firstValueFrom(this._http.post(apiUrl, data)
|
|
6510
|
+
.pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
6522
6511
|
}
|
|
6523
6512
|
changeMetadataStatus(id, metadataType) {
|
|
6524
6513
|
const apiUrl = `${this.serviceUri}/changeMetadataStatus?id=${id}&metadataStatusType=${metadataType}`;
|
|
6525
|
-
return this._http.post(apiUrl, {}).pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
6526
|
-
.toPromise();
|
|
6514
|
+
return firstValueFrom(this._http.post(apiUrl, {}).pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
6527
6515
|
}
|
|
6528
6516
|
saveAndChangeMetadataStatus(id, metadataType, data) {
|
|
6529
6517
|
const apiUrl = `${this.serviceUri}/saveAndChangeMetadataStatus?id=${id}&metadataStatusType=${metadataType}`;
|
|
6530
|
-
return this._http.post(apiUrl, data).pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
6531
|
-
.toPromise();
|
|
6518
|
+
return firstValueFrom(this._http.post(apiUrl, data).pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
6532
6519
|
}
|
|
6533
6520
|
getEntityPermission() {
|
|
6534
6521
|
const apiUrl = `${this.serviceUri}/GetEntityPermission`;
|
|
6535
|
-
return this._http.get(apiUrl)
|
|
6536
|
-
.pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
6537
|
-
.toPromise();
|
|
6522
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
6523
|
+
.pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
6538
6524
|
}
|
|
6539
6525
|
saveEntityPermission(data) {
|
|
6540
6526
|
const apiUrl = `${this.serviceUri}/SaveEntityPermission`;
|
|
6541
|
-
return this._http.post(apiUrl, data)
|
|
6542
|
-
.pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
6543
|
-
.toPromise();
|
|
6527
|
+
return firstValueFrom(this._http.post(apiUrl, data)
|
|
6528
|
+
.pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
6544
6529
|
}
|
|
6545
6530
|
updateEntityPermission(id, item) {
|
|
6546
6531
|
const url = `${this.serviceUri}/UpdatEntityPermission/${id}`;
|
|
6547
|
-
return this._http.put(url, item)
|
|
6532
|
+
return firstValueFrom(this._http.put(url, item));
|
|
6548
6533
|
}
|
|
6549
6534
|
deleteEntityPermission(id) {
|
|
6550
6535
|
const url = `${this.serviceUri}/DeleteEntityPermission/${id}`;
|
|
6551
|
-
return this._http.delete(url)
|
|
6536
|
+
return firstValueFrom(this._http.delete(url));
|
|
6552
6537
|
}
|
|
6553
6538
|
getWfHistoryByEntityItem(id) {
|
|
6554
6539
|
const url = `${this.serviceUri}/GetWfHistoryByEntityItem/${id}`;
|
|
6555
|
-
return this._http.get(url)
|
|
6540
|
+
return firstValueFrom(this._http.get(url));
|
|
6556
6541
|
}
|
|
6557
6542
|
getDicStatusNhomTrangThai(statuses) {
|
|
6558
6543
|
const url = `${this.serviceUri}/GetDicStatusNhomTrangThai`;
|
|
@@ -6581,7 +6566,7 @@ class BaseService {
|
|
|
6581
6566
|
}
|
|
6582
6567
|
putWithPlusUrl(id, item, plusUrl) {
|
|
6583
6568
|
const url = `${this.serviceUri}/${id}/${plusUrl}`;
|
|
6584
|
-
return this._http.put(url, item)
|
|
6569
|
+
return firstValueFrom(this._http.put(url, item));
|
|
6585
6570
|
}
|
|
6586
6571
|
getByField(field, arrValue, getFields = '', sortField = null, sortDir = null) {
|
|
6587
6572
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -6896,88 +6881,85 @@ class FileExplorerService {
|
|
|
6896
6881
|
}
|
|
6897
6882
|
getMyFiles() {
|
|
6898
6883
|
const svUrl = `${this._serviceUri}/FileObject/GetMyFiles`;
|
|
6899
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
6884
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
6900
6885
|
}
|
|
6901
6886
|
getServiceFolderId(model) {
|
|
6902
6887
|
const svUrl = `${this._serviceUri}/Folder/GetServiceFolder?service=${model.service}&entity=${model.entity}&entityInstanceId=${model.entityInstanceId}`;
|
|
6903
|
-
return this._http.get(svUrl)
|
|
6904
|
-
.pipe(catchError((err) => this.handleError(err)))
|
|
6905
|
-
.toPromise();
|
|
6888
|
+
return firstValueFrom(this._http.get(svUrl)
|
|
6889
|
+
.pipe(catchError((err) => this.handleError(err))));
|
|
6906
6890
|
}
|
|
6907
6891
|
deleteServiceFolder(model) {
|
|
6908
6892
|
const svUrl = `${this._serviceUri}/Folder/DeleteServiceFolder?service=${model.service}&entity=${model.entity}&entityInstanceId=${model.entityInstanceId}`;
|
|
6909
|
-
return this._http.delete(svUrl)
|
|
6910
|
-
.pipe(catchError((err) => this.handleError(err)))
|
|
6911
|
-
.toPromise();
|
|
6893
|
+
return firstValueFrom(this._http.delete(svUrl)
|
|
6894
|
+
.pipe(catchError((err) => this.handleError(err))));
|
|
6912
6895
|
}
|
|
6913
6896
|
getByFolderId(folderId) {
|
|
6914
6897
|
if (folderId == '00000000-0000-0000-0000-000000000000') {
|
|
6915
6898
|
return Promise.reject({ status: 400 });
|
|
6916
6899
|
}
|
|
6917
6900
|
const svUrl = `${this._serviceUri}/File?folderId=${folderId}`;
|
|
6918
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
6901
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
6919
6902
|
}
|
|
6920
6903
|
getMyDrive(folderId) {
|
|
6921
6904
|
if (folderId == '00000000-0000-0000-0000-000000000000') {
|
|
6922
6905
|
return Promise.reject({ status: 400 });
|
|
6923
6906
|
}
|
|
6924
6907
|
const svUrl = `${this._serviceUri}/FileObject/GetMyDrive?folderId=${folderId}`;
|
|
6925
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
6908
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
6926
6909
|
}
|
|
6927
6910
|
getMyShare(userId) {
|
|
6928
6911
|
if (userId < 0) {
|
|
6929
6912
|
return Promise.reject({ status: 400 });
|
|
6930
6913
|
}
|
|
6931
6914
|
const svUrl = `${this._serviceUri}/Folder/GetMyShare?userId=${userId}`;
|
|
6932
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
6915
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
6933
6916
|
}
|
|
6934
6917
|
getMyShareToOther(ownerId) {
|
|
6935
6918
|
if (ownerId < 0) {
|
|
6936
6919
|
return Promise.reject({ status: 400 });
|
|
6937
6920
|
}
|
|
6938
6921
|
const svUrl = `${this._serviceUri}/Folder/GetMyShareToOther?ownerId=${ownerId}`;
|
|
6939
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
6922
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
6940
6923
|
}
|
|
6941
6924
|
getFolderTree(folderId) {
|
|
6942
6925
|
if (folderId == '00000000-0000-0000-0000-000000000000') {
|
|
6943
6926
|
return Promise.reject({ status: 400 });
|
|
6944
6927
|
}
|
|
6945
6928
|
const apiUrl = `${this._serviceUri}/FileObject/GetTree?folderId=${folderId}`;
|
|
6946
|
-
return this._http.get(apiUrl)
|
|
6947
|
-
.pipe(catchError((err) => this.handleError(err)))
|
|
6948
|
-
.toPromise();
|
|
6929
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
6930
|
+
.pipe(catchError((err) => this.handleError(err))));
|
|
6949
6931
|
}
|
|
6950
6932
|
copyFile(copyFileDto) {
|
|
6951
6933
|
const svUrl = `${this._serviceUri}/FileObject/CopyFile`;
|
|
6952
|
-
return this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err)))
|
|
6934
|
+
return firstValueFrom(this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err))));
|
|
6953
6935
|
}
|
|
6954
6936
|
convertDocumentToPdfAndSave(copyFileDto) {
|
|
6955
6937
|
const svUrl = `${this._serviceUri}/FileObject/ConvertDocumentToPdfAndSave`;
|
|
6956
|
-
return this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err)))
|
|
6938
|
+
return firstValueFrom(this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err))));
|
|
6957
6939
|
}
|
|
6958
6940
|
createNewFolder(folder) {
|
|
6959
6941
|
const svUrl = `${this._serviceUri}/Folder`;
|
|
6960
|
-
return this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err)))
|
|
6942
|
+
return firstValueFrom(this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err))));
|
|
6961
6943
|
}
|
|
6962
6944
|
deleteFolder(folderId) {
|
|
6963
6945
|
const svUrl = `${this._serviceUri}/Folder/${folderId}`;
|
|
6964
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
6946
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
6965
6947
|
}
|
|
6966
6948
|
deleteMultipleFolder(folderIds) {
|
|
6967
6949
|
const svUrl = `${this._serviceUri}/Folder/deleteMultipleFolder`;
|
|
6968
|
-
return this._http.post(svUrl, folderIds).pipe(catchError((err) => this.handleError(err)))
|
|
6950
|
+
return firstValueFrom(this._http.post(svUrl, folderIds).pipe(catchError((err) => this.handleError(err))));
|
|
6969
6951
|
}
|
|
6970
6952
|
renameFolder(folderId, newFolderName) {
|
|
6971
6953
|
const svUrl = `${this._serviceUri}/Folder/${folderId}/RenameFolder/${newFolderName}`;
|
|
6972
|
-
return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err)))
|
|
6954
|
+
return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
|
|
6973
6955
|
}
|
|
6974
6956
|
shareFolder(shareFolder) {
|
|
6975
6957
|
const svUrl = `${this._serviceUri}/Folder/ShareFolder`;
|
|
6976
|
-
return this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err)))
|
|
6958
|
+
return firstValueFrom(this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err))));
|
|
6977
6959
|
}
|
|
6978
6960
|
deleteShareFolder(folderId, objectId) {
|
|
6979
6961
|
const svUrl = `${this._serviceUri}/Folder/${folderId}/DeleteShareFolder/${objectId}`;
|
|
6980
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
6962
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
6981
6963
|
}
|
|
6982
6964
|
getUploadUrl() {
|
|
6983
6965
|
return `${this._serviceUri}/FileObject`;
|
|
@@ -6990,7 +6972,7 @@ class FileExplorerService {
|
|
|
6990
6972
|
}
|
|
6991
6973
|
getBinaryFileByFileId(fileId) {
|
|
6992
6974
|
return new Promise((resolve, reject) => {
|
|
6993
|
-
this._http.get(this.getFileDownloadUrl(fileId))
|
|
6975
|
+
firstValueFrom(this._http.get(this.getFileDownloadUrl(fileId))).then(rs => {
|
|
6994
6976
|
console.log(rs);
|
|
6995
6977
|
resolve(null);
|
|
6996
6978
|
}).catch(err => reject(err));
|
|
@@ -7001,7 +6983,7 @@ class FileExplorerService {
|
|
|
7001
6983
|
}
|
|
7002
6984
|
getFile(fileId) {
|
|
7003
6985
|
const svUrl = `${this._serviceUri}/FileObject/${fileId}`;
|
|
7004
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
6986
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
7005
6987
|
}
|
|
7006
6988
|
getBase64FromFileId(fileId, isFileVersion = false) {
|
|
7007
6989
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -7049,7 +7031,7 @@ class FileExplorerService {
|
|
|
7049
7031
|
if (model.isFileVersion && !model.fileVersionId) {
|
|
7050
7032
|
model.fileVersionId = model.fileId;
|
|
7051
7033
|
}
|
|
7052
|
-
return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err)))
|
|
7034
|
+
return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
|
|
7053
7035
|
}
|
|
7054
7036
|
downloadFile(fileId, isFileVersion = false, fileName) {
|
|
7055
7037
|
const model = new GenerateLinkDownloadDTO();
|
|
@@ -7069,8 +7051,7 @@ class FileExplorerService {
|
|
|
7069
7051
|
* Save file tải từ server với tên được truyền vào, cho phép lưu cả audio, video.
|
|
7070
7052
|
*/
|
|
7071
7053
|
saveWithFileName(url, fileName) {
|
|
7072
|
-
this._http.get(url, { responseType: 'blob' })
|
|
7073
|
-
.toPromise()
|
|
7054
|
+
firstValueFrom(this._http.get(url, { responseType: 'blob' }))
|
|
7074
7055
|
.then(rs => {
|
|
7075
7056
|
FileSaver.saveAs(rs, fileName);
|
|
7076
7057
|
})
|
|
@@ -7080,7 +7061,7 @@ class FileExplorerService {
|
|
|
7080
7061
|
}
|
|
7081
7062
|
generateLinkDownloadMultiple(model) {
|
|
7082
7063
|
const svUrl = `${this._serviceUri}/DownloadLink/GenerateDownloadMultipleLink`;
|
|
7083
|
-
return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err)))
|
|
7064
|
+
return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
|
|
7084
7065
|
}
|
|
7085
7066
|
downloadFolder(folderId) {
|
|
7086
7067
|
const model = new GenerateLinkDownloadDTO();
|
|
@@ -7091,52 +7072,52 @@ class FileExplorerService {
|
|
|
7091
7072
|
});
|
|
7092
7073
|
}
|
|
7093
7074
|
getBinaryFile(linkDownload) {
|
|
7094
|
-
return this._http.get(linkDownload)
|
|
7075
|
+
return firstValueFrom(this._http.get(linkDownload));
|
|
7095
7076
|
}
|
|
7096
7077
|
setMoveFileItem(moveFile) {
|
|
7097
7078
|
const svUrl = `${this._serviceUri}/FileObject/MoveFile`;
|
|
7098
|
-
return this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err)))
|
|
7079
|
+
return firstValueFrom(this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err))));
|
|
7099
7080
|
}
|
|
7100
7081
|
deleteFile(fileId) {
|
|
7101
7082
|
const svUrl = `${this._serviceUri}/FileObject/File/${fileId}`;
|
|
7102
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
7083
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
7103
7084
|
}
|
|
7104
7085
|
deleteMultipleFile(fileIds) {
|
|
7105
7086
|
const svUrl = `${this._serviceUri}/FileObject/deleteMultipleFile`;
|
|
7106
|
-
return this._http.post(svUrl, fileIds).pipe(catchError((err) => this.handleError(err)))
|
|
7087
|
+
return firstValueFrom(this._http.post(svUrl, fileIds).pipe(catchError((err) => this.handleError(err))));
|
|
7107
7088
|
}
|
|
7108
7089
|
renameFile(fileId, newFileName) {
|
|
7109
7090
|
const svUrl = `${this._serviceUri}/FileObject/${fileId}/RenameFile/${newFileName}`;
|
|
7110
|
-
return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err)))
|
|
7091
|
+
return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
|
|
7111
7092
|
}
|
|
7112
7093
|
shareFile(shareFile) {
|
|
7113
7094
|
const svUrl = `${this._serviceUri}/FileObject/ShareFile`;
|
|
7114
|
-
return this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err)))
|
|
7095
|
+
return firstValueFrom(this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err))));
|
|
7115
7096
|
}
|
|
7116
7097
|
deleteShareFile(fileId, objectId) {
|
|
7117
7098
|
const svUrl = `${this._serviceUri}/FileObject/${fileId}/DeleteShareFile/${objectId}`;
|
|
7118
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
7099
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
7119
7100
|
}
|
|
7120
7101
|
getSharedFiles(folderId) {
|
|
7121
7102
|
let svUrl = `${this._serviceUri}/FileObject/GetMySharedFiles`;
|
|
7122
7103
|
if (folderId) {
|
|
7123
7104
|
svUrl = `${svUrl}?folderId=${folderId}`;
|
|
7124
7105
|
}
|
|
7125
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
7106
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
7126
7107
|
}
|
|
7127
7108
|
getUserSharingByFile(fileId) {
|
|
7128
7109
|
let svUrl = `${this._serviceUri}/FileObject/GetUserSharingByFile`;
|
|
7129
7110
|
if (fileId) {
|
|
7130
7111
|
svUrl = `${svUrl}?fileId=${fileId}`;
|
|
7131
7112
|
}
|
|
7132
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
7113
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
7133
7114
|
}
|
|
7134
7115
|
getFolderId(userId) {
|
|
7135
7116
|
let svUrl = `${this._serviceUri}/Folder/GetFolderId`;
|
|
7136
7117
|
if (userId) {
|
|
7137
7118
|
svUrl = `${svUrl}?userId=${userId}`;
|
|
7138
7119
|
}
|
|
7139
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
7120
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
7140
7121
|
}
|
|
7141
7122
|
needConvertBeforeSign(fileName) {
|
|
7142
7123
|
if (fileName.lastIndexOf('.') === -1) {
|
|
@@ -7188,12 +7169,12 @@ class FileExplorerService {
|
|
|
7188
7169
|
convertToPdf(fileName, fileId, isFileVersion) {
|
|
7189
7170
|
return new Promise((resolve, reject) => {
|
|
7190
7171
|
const convertService = `${this._serviceUri}/Convert/ConvertDocumentToPdf`;
|
|
7191
|
-
this._http.post(convertService, {
|
|
7172
|
+
firstValueFrom(this._http.post(convertService, {
|
|
7192
7173
|
fileName,
|
|
7193
7174
|
fileId,
|
|
7194
7175
|
isFileVersion,
|
|
7195
7176
|
outputType: 0
|
|
7196
|
-
}, { responseType: 'blob' })
|
|
7177
|
+
}, { responseType: 'blob' })).then((rs) => {
|
|
7197
7178
|
const reader = new FileReader();
|
|
7198
7179
|
reader.addEventListener('load', () => {
|
|
7199
7180
|
resolve(reader.result);
|
|
@@ -7235,16 +7216,16 @@ class FileExplorerService {
|
|
|
7235
7216
|
return regex.test(ext);
|
|
7236
7217
|
}
|
|
7237
7218
|
saveSignedFile(data) {
|
|
7238
|
-
return this._http.post(`${this._serviceUri}/KySoFile/SaveSignedFile`, data)
|
|
7219
|
+
return firstValueFrom(this._http.post(`${this._serviceUri}/KySoFile/SaveSignedFile`, data));
|
|
7239
7220
|
}
|
|
7240
7221
|
kySimSaveSignedFile(data) {
|
|
7241
|
-
return this._http.post(`${this._serviceUri}/KySoFile/KySimSaveSignedFile`, data)
|
|
7222
|
+
return firstValueFrom(this._http.post(`${this._serviceUri}/KySoFile/KySimSaveSignedFile`, data));
|
|
7242
7223
|
}
|
|
7243
7224
|
getSignatureInfoByFileId(fileId) {
|
|
7244
|
-
return this._http.get(`${this._serviceUri}/KySoFile/GetListSignatureByFileId?fileId=${fileId}`)
|
|
7225
|
+
return firstValueFrom(this._http.get(`${this._serviceUri}/KySoFile/GetListSignatureByFileId?fileId=${fileId}`));
|
|
7245
7226
|
}
|
|
7246
7227
|
getSignatureInfoByFileVersionId(fileVersionId) {
|
|
7247
|
-
return this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileVersionId?fileVersionId=${fileVersionId}`)
|
|
7228
|
+
return firstValueFrom(this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileVersionId?fileVersionId=${fileVersionId}`));
|
|
7248
7229
|
}
|
|
7249
7230
|
getUploadFileVersionApiUrl() {
|
|
7250
7231
|
return `${this._serviceUri}/FileVersion/SaveVersionOnEdit`;
|
|
@@ -7258,8 +7239,8 @@ class FileExplorerService {
|
|
|
7258
7239
|
getImageFileBase64(fileId, extension = 'jpg', width = 0, height = 0) {
|
|
7259
7240
|
return new Promise((resolve, reject) => {
|
|
7260
7241
|
const url = `${this._serviceUri}/FileObject/getImageFileBase64?fileId=${fileId}&extension=${extension}&width=${width}&height=${height}`;
|
|
7261
|
-
this._http.get(url, { responseType: 'blob' })
|
|
7262
|
-
.
|
|
7242
|
+
firstValueFrom(this._http.get(url, { responseType: 'blob' }))
|
|
7243
|
+
.then(rs => {
|
|
7263
7244
|
const reader = new FileReader();
|
|
7264
7245
|
reader.addEventListener('load', () => {
|
|
7265
7246
|
resolve(reader.result);
|
|
@@ -7280,19 +7261,19 @@ class FileExplorerService {
|
|
|
7280
7261
|
*/
|
|
7281
7262
|
getSingleServiceFile(serviceRequestModel) {
|
|
7282
7263
|
const svUrl = `${this._serviceUri}/FileObject/GetSingleServiceFile`;
|
|
7283
|
-
return this._http.post(svUrl, serviceRequestModel).pipe(catchError((err) => this.handleError(err)))
|
|
7264
|
+
return firstValueFrom(this._http.post(svUrl, serviceRequestModel).pipe(catchError((err) => this.handleError(err))));
|
|
7284
7265
|
}
|
|
7285
7266
|
getServiceFileExplorer(serviceCode, entity, entityKey) {
|
|
7286
7267
|
const svUrl = `${this._serviceUri}/FileObject/GetServiceFileExplorer?serviceCode=${serviceCode}&entity=${entity}&entityKey=${entityKey}`;
|
|
7287
|
-
return this._http.get(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
7268
|
+
return firstValueFrom(this._http.get(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
7288
7269
|
}
|
|
7289
7270
|
createServiceFile(serviceFileObjectDTO) {
|
|
7290
7271
|
const svUrl = `${this._serviceUri}/FileObject/CreateServiceFile`;
|
|
7291
|
-
return this._http.post(svUrl, serviceFileObjectDTO).pipe(catchError((err) => this.handleError(err)))
|
|
7272
|
+
return firstValueFrom(this._http.post(svUrl, serviceFileObjectDTO).pipe(catchError((err) => this.handleError(err))));
|
|
7292
7273
|
}
|
|
7293
7274
|
createServiceFileAnonymous(serviceFileObjectDTO) {
|
|
7294
7275
|
const svUrl = `${this._serviceUri}/FileObject/CreateServiceFileAnonymous`;
|
|
7295
|
-
return this._http.post(svUrl, serviceFileObjectDTO).pipe(catchError((err) => this.handleError(err)))
|
|
7276
|
+
return firstValueFrom(this._http.post(svUrl, serviceFileObjectDTO).pipe(catchError((err) => this.handleError(err))));
|
|
7296
7277
|
}
|
|
7297
7278
|
}
|
|
7298
7279
|
FileExplorerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileExplorerService, deps: [{ token: i1$1.HttpClient }, { token: AuthenService }, { token: CommonService }, { token: EnvironmentService }, { token: NotifierService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -7324,8 +7305,7 @@ class FileV4Service {
|
|
|
7324
7305
|
}
|
|
7325
7306
|
generateLinkDownloadMultiple(model) {
|
|
7326
7307
|
const svUrl = `${this._serviceUri}/Download/GenerateDownloadMultipleLink`;
|
|
7327
|
-
return this._http.post(svUrl, model)
|
|
7328
|
-
.toPromise();
|
|
7308
|
+
return firstValueFrom(this._http.post(svUrl, model));
|
|
7329
7309
|
}
|
|
7330
7310
|
getAnonymousDownloadUrl(hash) {
|
|
7331
7311
|
return `${this._serviceUri}/Download/${hash}`;
|
|
@@ -7349,12 +7329,10 @@ class FileV4Service {
|
|
|
7349
7329
|
if (model.isFileVersion && !model.fileVersionId) {
|
|
7350
7330
|
model.fileVersionId = model.fileId;
|
|
7351
7331
|
}
|
|
7352
|
-
return this._http.post(svUrl, model)
|
|
7353
|
-
.toPromise();
|
|
7332
|
+
return firstValueFrom(this._http.post(svUrl, model));
|
|
7354
7333
|
}
|
|
7355
7334
|
saveWithFileName(url, fileName) {
|
|
7356
|
-
this._http.get(url, { responseType: 'blob' })
|
|
7357
|
-
.toPromise()
|
|
7335
|
+
firstValueFrom(this._http.get(url, { responseType: 'blob' }))
|
|
7358
7336
|
.then(rs => {
|
|
7359
7337
|
FileSaver.saveAs(rs, fileName);
|
|
7360
7338
|
})
|
|
@@ -7392,7 +7370,7 @@ class TemplateV4Service extends BaseService {
|
|
|
7392
7370
|
}
|
|
7393
7371
|
fillWordByTemplateCode(templateCode, data, fileName = 'TemplateWord.docx') {
|
|
7394
7372
|
const url = `${this.serviceUri}/fillWordByTemplateCodeMultiData/${templateCode}`;
|
|
7395
|
-
return this._http.post(url, data, { responseType: 'blob' })
|
|
7373
|
+
return firstValueFrom(this._http.post(url, data, { responseType: 'blob' }));
|
|
7396
7374
|
}
|
|
7397
7375
|
fillTemplateByCodeAndGetPdf(templateCode, data, onLoadingDataPdf = null, onEndLoadingDataPdf = null) {
|
|
7398
7376
|
const url = `${this.serviceUri}/fillWordByTemplateCode/${templateCode}?isPrint=true`;
|
|
@@ -7643,9 +7621,8 @@ class TemplateInstanceService {
|
|
|
7643
7621
|
exportCxExcelByCode(model) {
|
|
7644
7622
|
const url = `${this.serviceUri}/ExportCxExcelByCode`;
|
|
7645
7623
|
this.setFileInfo(model);
|
|
7646
|
-
return this._httpClient
|
|
7647
|
-
.post(url, model, { responseType: 'blob' })
|
|
7648
|
-
.toPromise()
|
|
7624
|
+
return firstValueFrom(this._httpClient
|
|
7625
|
+
.post(url, model, { responseType: 'blob' }))
|
|
7649
7626
|
.then(res => {
|
|
7650
7627
|
FileSaver.saveAs(res, this.getFullFileName(model.fileName || model.code));
|
|
7651
7628
|
}).catch((err) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -7664,9 +7641,8 @@ class TemplateInstanceService {
|
|
|
7664
7641
|
exportManyCxExcelByCode(model) {
|
|
7665
7642
|
const url = `${this.serviceUri}/ExportManyCxExcelByCode`;
|
|
7666
7643
|
this.setManyFileInfo(model);
|
|
7667
|
-
return this._httpClient
|
|
7668
|
-
.post(url, model)
|
|
7669
|
-
.toPromise()
|
|
7644
|
+
return firstValueFrom(this._httpClient
|
|
7645
|
+
.post(url, model))
|
|
7670
7646
|
.then(res => {
|
|
7671
7647
|
if (res.success) {
|
|
7672
7648
|
this._fileService.downloadFolder(res.data.folderId);
|
|
@@ -7698,9 +7674,8 @@ class TemplateInstanceService {
|
|
|
7698
7674
|
*/
|
|
7699
7675
|
exportCxExcel(model) {
|
|
7700
7676
|
const url = `${this.serviceUri}/ExportCxExcel`;
|
|
7701
|
-
return this._httpClient
|
|
7702
|
-
.post(url, model, { responseType: 'blob' })
|
|
7703
|
-
.toPromise()
|
|
7677
|
+
return firstValueFrom(this._httpClient
|
|
7678
|
+
.post(url, model, { responseType: 'blob' }))
|
|
7704
7679
|
.then(res => {
|
|
7705
7680
|
FileSaver.saveAs(res, this.getFullFileName(model.fileName || 'Export'));
|
|
7706
7681
|
}).catch((err) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -7723,8 +7698,7 @@ class TemplateInstanceService {
|
|
|
7723
7698
|
ExportCxExcelByCodeWithSignalR(model) {
|
|
7724
7699
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7725
7700
|
const url = `${this.serviceUri}/ExportCxExcelByCodeWithSignalR`;
|
|
7726
|
-
return this._httpClient.post(url, model)
|
|
7727
|
-
.toPromise();
|
|
7701
|
+
return firstValueFrom(this._httpClient.post(url, model));
|
|
7728
7702
|
});
|
|
7729
7703
|
}
|
|
7730
7704
|
/**
|
|
@@ -7734,9 +7708,8 @@ class TemplateInstanceService {
|
|
|
7734
7708
|
exportCxExcelByCodePromise(model) {
|
|
7735
7709
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7736
7710
|
const url = `${this.serviceUri}/ExportCxExcelByCode`;
|
|
7737
|
-
return this._httpClient
|
|
7738
|
-
.post(url, model, { responseType: 'blob' })
|
|
7739
|
-
.toPromise();
|
|
7711
|
+
return firstValueFrom(this._httpClient
|
|
7712
|
+
.post(url, model, { responseType: 'blob' }));
|
|
7740
7713
|
});
|
|
7741
7714
|
}
|
|
7742
7715
|
/**
|
|
@@ -7746,9 +7719,8 @@ class TemplateInstanceService {
|
|
|
7746
7719
|
exportCxExcelPromise(model) {
|
|
7747
7720
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7748
7721
|
const url = `${this.serviceUri}/ExportCxExcel`;
|
|
7749
|
-
return this._httpClient
|
|
7750
|
-
.post(url, model, { responseType: 'blob' })
|
|
7751
|
-
.toPromise();
|
|
7722
|
+
return firstValueFrom(this._httpClient
|
|
7723
|
+
.post(url, model, { responseType: 'blob' }));
|
|
7752
7724
|
});
|
|
7753
7725
|
}
|
|
7754
7726
|
/**
|
|
@@ -7758,9 +7730,8 @@ class TemplateInstanceService {
|
|
|
7758
7730
|
*/
|
|
7759
7731
|
fillTemplateByCodeAndGetPdf(templateCode, data) {
|
|
7760
7732
|
const url = `${this.serviceUri}/fillWordByTemplateCode/${templateCode}?isPrint=true`;
|
|
7761
|
-
return this._httpClient
|
|
7762
|
-
.post(url, data)
|
|
7763
|
-
.toPromise().then(res => {
|
|
7733
|
+
return firstValueFrom(this._httpClient
|
|
7734
|
+
.post(url, data)).then(res => {
|
|
7764
7735
|
if (res.data) {
|
|
7765
7736
|
this._printService.printBase64Pdf(res.data);
|
|
7766
7737
|
}
|
|
@@ -7773,9 +7744,8 @@ class TemplateInstanceService {
|
|
|
7773
7744
|
*/
|
|
7774
7745
|
fillTemplateByCode(templateCode, data, name = 'Export') {
|
|
7775
7746
|
const url = `${this.serviceUri}/fillWordByTemplateCode/${templateCode}?isPrint=false`;
|
|
7776
|
-
return this._httpClient
|
|
7777
|
-
.post(url, data, { responseType: 'blob' })
|
|
7778
|
-
.toPromise()
|
|
7747
|
+
return firstValueFrom(this._httpClient
|
|
7748
|
+
.post(url, data, { responseType: 'blob' }))
|
|
7779
7749
|
.then(res => {
|
|
7780
7750
|
FileSaver.saveAs(res, this.getFullFileName(name || 'Export', TemplateConstant.WORD_EXTENSION));
|
|
7781
7751
|
}).catch((err) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -7785,14 +7755,13 @@ class TemplateInstanceService {
|
|
|
7785
7755
|
}
|
|
7786
7756
|
laTexToBase64Image(laTex, font = 54) {
|
|
7787
7757
|
const api = `${this.serviceUri}/LatexToBase64`;
|
|
7788
|
-
return this._httpClient.post(api, { laTex, font })
|
|
7758
|
+
return firstValueFrom(this._httpClient.post(api, { laTex, font }));
|
|
7789
7759
|
}
|
|
7790
7760
|
_export(model) {
|
|
7791
7761
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7792
7762
|
const url = `${this.serviceUri}/export`;
|
|
7793
|
-
return this._httpClient
|
|
7794
|
-
.post(url, model)
|
|
7795
|
-
.toPromise();
|
|
7763
|
+
return firstValueFrom(this._httpClient
|
|
7764
|
+
.post(url, model));
|
|
7796
7765
|
});
|
|
7797
7766
|
}
|
|
7798
7767
|
/**
|
|
@@ -7819,9 +7788,8 @@ class TemplateInstanceService {
|
|
|
7819
7788
|
_exportNormal(model) {
|
|
7820
7789
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7821
7790
|
const url = `${this.serviceUri}/exportNormal`;
|
|
7822
|
-
return this._httpClient
|
|
7823
|
-
.post(url, model)
|
|
7824
|
-
.toPromise();
|
|
7791
|
+
return firstValueFrom(this._httpClient
|
|
7792
|
+
.post(url, model));
|
|
7825
7793
|
});
|
|
7826
7794
|
}
|
|
7827
7795
|
/**
|
|
@@ -7909,7 +7877,7 @@ class ComponentBase {
|
|
|
7909
7877
|
*/
|
|
7910
7878
|
ngOnDestroy() {
|
|
7911
7879
|
// Unsubscribe from all subscriptions
|
|
7912
|
-
this._unsubscribeAll.next();
|
|
7880
|
+
this._unsubscribeAll.next(1);
|
|
7913
7881
|
this._unsubscribeAll.complete();
|
|
7914
7882
|
if (this.model.componentSubs) {
|
|
7915
7883
|
for (const sub of this.model.componentSubs) {
|
|
@@ -9366,8 +9334,8 @@ class UserService extends BaseService {
|
|
|
9366
9334
|
}
|
|
9367
9335
|
getForAutoComplete(key) {
|
|
9368
9336
|
const apiUrl = `${this.serviceUri}/GetForAutoComplete?key=${key}`;
|
|
9369
|
-
return this._http.get(apiUrl)
|
|
9370
|
-
.pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector)))
|
|
9337
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
9338
|
+
.pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))));
|
|
9371
9339
|
}
|
|
9372
9340
|
populateCurrentUser() {
|
|
9373
9341
|
const storageItem = localStorage.getItem(this.CURRENT_USER_KEY);
|
|
@@ -9475,7 +9443,7 @@ class UserService extends BaseService {
|
|
|
9475
9443
|
}
|
|
9476
9444
|
getStaffInfo(userId) {
|
|
9477
9445
|
const url = `${this.serviceUri}/${userId}`;
|
|
9478
|
-
return this._http.get(url)
|
|
9446
|
+
return firstValueFrom(this._http.get(url)
|
|
9479
9447
|
.pipe(catchError((err) => this.handleError(err, this._injector)), map(rs => {
|
|
9480
9448
|
const op = {
|
|
9481
9449
|
fullName: rs.data ? rs.data.fullName : '',
|
|
@@ -9494,8 +9462,7 @@ class UserService extends BaseService {
|
|
|
9494
9462
|
}
|
|
9495
9463
|
}
|
|
9496
9464
|
return op;
|
|
9497
|
-
}))
|
|
9498
|
-
.toPromise();
|
|
9465
|
+
})));
|
|
9499
9466
|
}
|
|
9500
9467
|
getId() {
|
|
9501
9468
|
const storageItem = localStorage.getItem(this.CURRENT_USER_KEY);
|
|
@@ -9519,10 +9486,9 @@ class UserService extends BaseService {
|
|
|
9519
9486
|
}
|
|
9520
9487
|
registerOnline(formData) {
|
|
9521
9488
|
const apiUrl = `${this.serviceUri}/registerOnline`;
|
|
9522
|
-
return this._http
|
|
9489
|
+
return firstValueFrom(this._http
|
|
9523
9490
|
.post(apiUrl, formData)
|
|
9524
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
9525
|
-
.toPromise();
|
|
9491
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
9526
9492
|
}
|
|
9527
9493
|
getBasicUserInfo(userId) {
|
|
9528
9494
|
const storageItem = localStorage.getItem(this.USER_INFO_KEY + '_' + userId);
|
|
@@ -9541,11 +9507,11 @@ class UserService extends BaseService {
|
|
|
9541
9507
|
if (userId > 0) {
|
|
9542
9508
|
const svUrl = `${this.serviceUri}/GetBasicUserInfo?id=${userId}`;
|
|
9543
9509
|
try {
|
|
9544
|
-
const result = yield this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
9510
|
+
const result = yield firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
9545
9511
|
// save response to local storage here
|
|
9546
9512
|
localStorage.setItem(this.USER_INFO_KEY + '_' + repsonse.data.id, JSON.stringify(repsonse.data));
|
|
9547
9513
|
return repsonse.data;
|
|
9548
|
-
}, catchError((err) => this.handleError(err, this._injector))))
|
|
9514
|
+
}, catchError((err) => this.handleError(err, this._injector)))));
|
|
9549
9515
|
resolve(result);
|
|
9550
9516
|
}
|
|
9551
9517
|
catch (_a) {
|
|
@@ -9572,7 +9538,7 @@ class UserService extends BaseService {
|
|
|
9572
9538
|
else {
|
|
9573
9539
|
return new Promise((resolve, reject) => {
|
|
9574
9540
|
const svUrl = `${this.serviceUri}/GetBasicUsersInfo?userIds=${userIds}`;
|
|
9575
|
-
this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))
|
|
9541
|
+
firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))).then(success => {
|
|
9576
9542
|
resolve(success);
|
|
9577
9543
|
}).catch(err => {
|
|
9578
9544
|
resolve([]);
|
|
@@ -9600,11 +9566,11 @@ class UserService extends BaseService {
|
|
|
9600
9566
|
else {
|
|
9601
9567
|
if (userName != '') {
|
|
9602
9568
|
const svUrl = `${this.serviceUri}/GetBasicUserInfoByUserName?userName=${userName}`;
|
|
9603
|
-
this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
9569
|
+
firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
9604
9570
|
// save response to local storage here
|
|
9605
9571
|
localStorage.setItem(this.USER_INFO_KEY + '_' + repsonse.data.userName, JSON.stringify(repsonse.data));
|
|
9606
9572
|
return repsonse.data;
|
|
9607
|
-
}, catchError((err) => this.handleError(err, this._injector))))
|
|
9573
|
+
}, catchError((err) => this.handleError(err, this._injector))))).then(rss => {
|
|
9608
9574
|
resolve(rss);
|
|
9609
9575
|
}).catch(errr => {
|
|
9610
9576
|
resolve({});
|
|
@@ -9630,13 +9596,13 @@ class UserService extends BaseService {
|
|
|
9630
9596
|
}
|
|
9631
9597
|
else {
|
|
9632
9598
|
const svUrl = `${this.serviceUri}/GetBasicUsersInfoByUserNames?userNames=${userNames}`;
|
|
9633
|
-
return yield this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => {
|
|
9599
|
+
return yield firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => {
|
|
9634
9600
|
localStorage.setItem(this.USER_INFO_KEY + '_' + repsonse.data.map(x => {
|
|
9635
9601
|
if (x.userName)
|
|
9636
9602
|
return x.userName;
|
|
9637
9603
|
}), JSON.stringify(repsonse.data));
|
|
9638
9604
|
return repsonse.data;
|
|
9639
|
-
}))
|
|
9605
|
+
}))).catch(err => []);
|
|
9640
9606
|
}
|
|
9641
9607
|
});
|
|
9642
9608
|
}
|
|
@@ -9658,23 +9624,20 @@ class UserService extends BaseService {
|
|
|
9658
9624
|
return dataSource;
|
|
9659
9625
|
}
|
|
9660
9626
|
restorePassword(item) {
|
|
9661
|
-
return this._http.put(`${this.serviceUri}/restorePassword`, item)
|
|
9662
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
9663
|
-
.toPromise();
|
|
9627
|
+
return firstValueFrom(this._http.put(`${this.serviceUri}/restorePassword`, item)
|
|
9628
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
9664
9629
|
}
|
|
9665
9630
|
changePassword(userId, item) {
|
|
9666
9631
|
const apiUrl = `${this.serviceUri}/ChangePassword`;
|
|
9667
|
-
return this._http
|
|
9632
|
+
return firstValueFrom(this._http
|
|
9668
9633
|
.post(apiUrl, item)
|
|
9669
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
9670
|
-
.toPromise();
|
|
9634
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
9671
9635
|
}
|
|
9672
9636
|
resetPassword(item) {
|
|
9673
9637
|
const apiUrl = `${this.serviceUri}/resetPassword`;
|
|
9674
|
-
return this._http
|
|
9638
|
+
return firstValueFrom(this._http
|
|
9675
9639
|
.put(apiUrl, item)
|
|
9676
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
9677
|
-
.toPromise();
|
|
9640
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
9678
9641
|
}
|
|
9679
9642
|
GetsByManagerIdArrayId(id) {
|
|
9680
9643
|
const apiUrl = `${this.serviceUri}/GetLowerStaffsByUserId?userId=${id}`;
|
|
@@ -9682,17 +9645,15 @@ class UserService extends BaseService {
|
|
|
9682
9645
|
}
|
|
9683
9646
|
markAsAdmin(userId, isAdmin) {
|
|
9684
9647
|
const url = `${this.serviceUri}/markAsAdmin/${userId}/${isAdmin}`;
|
|
9685
|
-
return this._http
|
|
9648
|
+
return firstValueFrom(this._http
|
|
9686
9649
|
.put(url, isAdmin)
|
|
9687
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
9688
|
-
.toPromise();
|
|
9650
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
9689
9651
|
}
|
|
9690
9652
|
markAsRepresent(userId, isRepresent) {
|
|
9691
9653
|
const url = `${this.serviceUri}/markAsRepresent/${userId}/${isRepresent}`;
|
|
9692
|
-
return this._http
|
|
9654
|
+
return firstValueFrom(this._http
|
|
9693
9655
|
.put(url, isRepresent)
|
|
9694
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
9695
|
-
.toPromise();
|
|
9656
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
9696
9657
|
}
|
|
9697
9658
|
getsByOrganizationListId(pageOption, funGetName = '', optionParameter = '', defaultParameter = '') {
|
|
9698
9659
|
let queryString = `?key=${pageOption.query}`;
|
|
@@ -9748,17 +9709,15 @@ class UserService extends BaseService {
|
|
|
9748
9709
|
}
|
|
9749
9710
|
lockUser(item) {
|
|
9750
9711
|
const apiUrl = `${this.serviceUri}/lockUserAccount`;
|
|
9751
|
-
return this._http
|
|
9712
|
+
return firstValueFrom(this._http
|
|
9752
9713
|
.post(apiUrl, item)
|
|
9753
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
9754
|
-
.toPromise();
|
|
9714
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
9755
9715
|
}
|
|
9756
9716
|
unlockUser(item) {
|
|
9757
9717
|
const apiUrl = `${this.serviceUri}/unlockUserAccount`;
|
|
9758
|
-
return this._http
|
|
9718
|
+
return firstValueFrom(this._http
|
|
9759
9719
|
.post(apiUrl, item)
|
|
9760
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
9761
|
-
.toPromise();
|
|
9720
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
9762
9721
|
}
|
|
9763
9722
|
isSuperUser() {
|
|
9764
9723
|
return this._applicationContext.getRootContext().data.currentUser
|
|
@@ -9773,8 +9732,8 @@ class UserService extends BaseService {
|
|
|
9773
9732
|
}
|
|
9774
9733
|
getUsersByGroupCode(groupCode) {
|
|
9775
9734
|
const apiUrl = `${this.serviceUri}/GetUsersByGroupCode?groupCode=${groupCode}`;
|
|
9776
|
-
return this._http.get(apiUrl)
|
|
9777
|
-
.pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector)))
|
|
9735
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
9736
|
+
.pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))));
|
|
9778
9737
|
}
|
|
9779
9738
|
getServiceEndpoint() {
|
|
9780
9739
|
return `${this.serviceUri}`;
|
|
@@ -9820,7 +9779,7 @@ class UserService extends BaseService {
|
|
|
9820
9779
|
sorts: [],
|
|
9821
9780
|
filters: filters
|
|
9822
9781
|
});
|
|
9823
|
-
this._http.post(svUrl, gridInfo).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))
|
|
9782
|
+
firstValueFrom(this._http.post(svUrl, gridInfo).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))).then(success => {
|
|
9824
9783
|
resolve(success);
|
|
9825
9784
|
}).catch(err => {
|
|
9826
9785
|
resolve([]);
|
|
@@ -9886,11 +9845,11 @@ class OrganizationService extends BaseService {
|
|
|
9886
9845
|
else {
|
|
9887
9846
|
if (organizationId > 0) {
|
|
9888
9847
|
const svUrl = `${this.serviceUri}/GetOrganizationInfo?id=${organizationId}`;
|
|
9889
|
-
const result = yield this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
9848
|
+
const result = yield firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
9890
9849
|
// save response to local storage here
|
|
9891
9850
|
localStorage.setItem(this.ORGANIZATION_INFO_KEY + '_' + repsonse.data.id, JSON.stringify(repsonse.data));
|
|
9892
9851
|
return repsonse.data;
|
|
9893
|
-
}, catchError((err) => this.handleError(err, this._injector))))
|
|
9852
|
+
}, catchError((err) => this.handleError(err, this._injector)))));
|
|
9894
9853
|
resolve(result);
|
|
9895
9854
|
}
|
|
9896
9855
|
}
|
|
@@ -9910,29 +9869,27 @@ class OrganizationService extends BaseService {
|
|
|
9910
9869
|
if (parentId) {
|
|
9911
9870
|
svUrl += `&parentId=${parentId}`;
|
|
9912
9871
|
}
|
|
9913
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)))
|
|
9872
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
|
|
9914
9873
|
}
|
|
9915
9874
|
getById(id) {
|
|
9916
9875
|
const svUrl = `${this.serviceUri}/${id}`;
|
|
9917
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)))
|
|
9876
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector))));
|
|
9918
9877
|
}
|
|
9919
9878
|
getOrganizationTree(organizationCode) {
|
|
9920
9879
|
let apiUrl = `${this.serviceUri}/GetTree`;
|
|
9921
9880
|
if (organizationCode) {
|
|
9922
9881
|
apiUrl = `${apiUrl}?organizationCode=${organizationCode}`;
|
|
9923
9882
|
}
|
|
9924
|
-
return this._http.get(apiUrl)
|
|
9925
|
-
.pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
9926
|
-
.toPromise();
|
|
9883
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
9884
|
+
.pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
9927
9885
|
}
|
|
9928
9886
|
getMyTree(organizationCode) {
|
|
9929
9887
|
let apiUrl = `${this.serviceUri}/GetMyTree`;
|
|
9930
9888
|
if (organizationCode) {
|
|
9931
9889
|
apiUrl = `${apiUrl}?organizationCode=${organizationCode}`;
|
|
9932
9890
|
}
|
|
9933
|
-
return this._http.get(apiUrl)
|
|
9934
|
-
.pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
9935
|
-
.toPromise();
|
|
9891
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
9892
|
+
.pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
9936
9893
|
}
|
|
9937
9894
|
getOrganizationTreeTable(isIgnoreClientCache = false) {
|
|
9938
9895
|
const apiUrl = `${this.serviceUri}/GetTreeTable`;
|
|
@@ -9946,27 +9903,23 @@ class OrganizationService extends BaseService {
|
|
|
9946
9903
|
if (organizationCode) {
|
|
9947
9904
|
apiUrl = `${apiUrl}?parentCode=${organizationCode}`;
|
|
9948
9905
|
}
|
|
9949
|
-
return this._http.get(apiUrl)
|
|
9950
|
-
.pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
9951
|
-
.toPromise();
|
|
9906
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
9907
|
+
.pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
9952
9908
|
}
|
|
9953
9909
|
getManagerByOrgCode(organizationCode) {
|
|
9954
9910
|
const apiUrl = `${this.serviceUri}/GetManagerByOrgCode/${organizationCode}`;
|
|
9955
|
-
return this._http.get(apiUrl)
|
|
9956
|
-
.pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
9957
|
-
.toPromise();
|
|
9911
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
9912
|
+
.pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
9958
9913
|
}
|
|
9959
9914
|
getManagerByOrgId(organizationId) {
|
|
9960
9915
|
const apiUrl = `${this.serviceUri}/GetManagerByOrgId/${organizationId}`;
|
|
9961
|
-
return this._http.get(apiUrl)
|
|
9962
|
-
.pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
9963
|
-
.toPromise();
|
|
9916
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
9917
|
+
.pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
9964
9918
|
}
|
|
9965
9919
|
getOrganizationByParentId(parentId) {
|
|
9966
9920
|
const apiUrl = `${this.serviceUri}/GetByParentId?parentId=${parentId}`;
|
|
9967
|
-
return this._http.get(apiUrl)
|
|
9968
|
-
.pipe(catchError((err) => this.handleError(err, this._injector)))
|
|
9969
|
-
.toPromise();
|
|
9921
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
9922
|
+
.pipe(catchError((err) => this.handleError(err, this._injector))));
|
|
9970
9923
|
}
|
|
9971
9924
|
}
|
|
9972
9925
|
OrganizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: OrganizationService, deps: [{ token: i1$1.HttpClient }, { token: i0.Injector }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -11136,8 +11089,8 @@ class EntityPickerService extends BaseService {
|
|
|
11136
11089
|
return this.defaultGet(apiUrl);
|
|
11137
11090
|
}
|
|
11138
11091
|
getPaged(gridInfo, endpoint) {
|
|
11139
|
-
return this._http.post(endpoint, gridInfo)
|
|
11140
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
11092
|
+
return firstValueFrom(this._http.post(endpoint, gridInfo)
|
|
11093
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
11141
11094
|
}
|
|
11142
11095
|
getTeacherFullPickerTemplate(control) {
|
|
11143
11096
|
// TODO: Upgrade later
|
|
@@ -12094,7 +12047,7 @@ class CustomRouterService {
|
|
|
12094
12047
|
getLatestFragment() {
|
|
12095
12048
|
return new Promise((resolve) => {
|
|
12096
12049
|
if (this._unsubscribeAll) {
|
|
12097
|
-
this._unsubscribeAll.next();
|
|
12050
|
+
this._unsubscribeAll.next(1);
|
|
12098
12051
|
this._unsubscribeAll.complete();
|
|
12099
12052
|
}
|
|
12100
12053
|
this._activatedRoute.fragment
|
|
@@ -12107,7 +12060,7 @@ class CustomRouterService {
|
|
|
12107
12060
|
});
|
|
12108
12061
|
}
|
|
12109
12062
|
destroy() {
|
|
12110
|
-
this._unsubscribeAll.next();
|
|
12063
|
+
this._unsubscribeAll.next(1);
|
|
12111
12064
|
this._unsubscribeAll.complete();
|
|
12112
12065
|
}
|
|
12113
12066
|
getFragmentObject() {
|
|
@@ -12272,9 +12225,8 @@ class CustomRouterService {
|
|
|
12272
12225
|
}
|
|
12273
12226
|
tryParse(v) {
|
|
12274
12227
|
let n = null;
|
|
12275
|
-
if (v === null || v === undefined)
|
|
12228
|
+
if (v === null || v === undefined)
|
|
12276
12229
|
return null;
|
|
12277
|
-
}
|
|
12278
12230
|
if (v.indexOf('-') > 0) {
|
|
12279
12231
|
if (v.indexOf('T') > 0) {
|
|
12280
12232
|
n = new Date(v);
|
|
@@ -15473,7 +15425,7 @@ NumberPickerRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
15473
15425
|
useExisting: forwardRef(() => NumberPickerRangeComponent),
|
|
15474
15426
|
multi: true
|
|
15475
15427
|
}
|
|
15476
|
-
], ngImport: i0, template: "<div class=\"tn-number-picker-range\">\r\n <input type=\"text\" [placeholder]=\"'T\u1EEB'\" [attr.disabled]=\"disabled ? true : null\" [mask]=\"getMaskByType(maskType)\"\r\n [thousandSeparator]=\"getThousandSeperator()\" pInputText [(ngModel)]=\"model[0]\" (change)=\"onChanged($event)\"\r\n (focus)=\"onFocus($event, 0)\" />\r\n <span>-</span>\r\n <input type=\"text\" [placeholder]=\"'\u0110\u1EBFn'\" [attr.disabled]=\"disabled ? true : null\" [mask]=\"getMaskByType(maskType)\"\r\n [thousandSeparator]=\"getThousandSeperator()\" pInputText [(ngModel)]=\"model[1]\" (change)=\"onChanged($event)\"\r\n (focus)=\"onFocus($event, 1)\" />\r\n</div>", styles: [".tn-number-picker-range{display:flex}.tn-number-picker-range>span{flex:0 0 16px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .tn-number-picker-range .p-inputtext{flex:0 0 calc(50% - 8px);width:calc(50% - 8px)}\n"], dependencies: [{ kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i4$5.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime"] }] });
|
|
15428
|
+
], ngImport: i0, template: "<div class=\"tn-number-picker-range\">\r\n <input type=\"text\" [placeholder]=\"'T\u1EEB'\" [attr.disabled]=\"disabled ? true : null\" [mask]=\"getMaskByType(maskType)\"\r\n [thousandSeparator]=\"getThousandSeperator()\" pInputText [(ngModel)]=\"model[0]\" (change)=\"onChanged($event)\"\r\n (focus)=\"onFocus($event, 0)\" />\r\n <span>-</span>\r\n <input type=\"text\" [placeholder]=\"'\u0110\u1EBFn'\" [attr.disabled]=\"disabled ? true : null\" [mask]=\"getMaskByType(maskType)\"\r\n [thousandSeparator]=\"getThousandSeperator()\" pInputText [(ngModel)]=\"model[1]\" (change)=\"onChanged($event)\"\r\n (focus)=\"onFocus($event, 1)\" />\r\n</div>", styles: [".tn-number-picker-range{display:flex}.tn-number-picker-range>span{flex:0 0 16px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .tn-number-picker-range .p-inputtext{flex:0 0 calc(50% - 8px);width:calc(50% - 8px)}\n"], dependencies: [{ kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i4$5.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "triggerOnMaskChange"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }] });
|
|
15477
15429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: NumberPickerRangeComponent, decorators: [{
|
|
15478
15430
|
type: Component,
|
|
15479
15431
|
args: [{ selector: 'tn-number-picker-range', providers: [
|
|
@@ -15613,7 +15565,7 @@ MaskComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
|
|
|
15613
15565
|
multi: true
|
|
15614
15566
|
},
|
|
15615
15567
|
DecimalPipe
|
|
15616
|
-
], ngImport: i0, template: "<ng-container *ngIf=\"viewMode\">\r\n <div class=\"tn-mask-viewMode\">\r\n <span *ngIf=\"prefix\">{{prefix}}</span>\r\n <span>{{model}}</span> \r\n <span *ngIf=\"suffix\">({{suffix}})</span>\r\n </div>\r\n</ng-container>\r\n<ng-container *ngIf=\"!viewMode\">\r\n <div class=\"p-inputgroup\">\r\n <span *ngIf=\"prefix\" class=\"p-inputgroup-addon\">{{prefix}}</span>\r\n <input type=\"text\" pInputText [placeholder]=\"_placeholder\" [attr.disabled]=\"disabled ? true : null\"\r\n [mask]=\"getMaskByType(maskType)\" [thousandSeparator]=\"getThousandSeperator()\" [class]=\"inputStyleClass\"\r\n [(ngModel)]=\"model\" (focus)=\"handleFocus()\" (blur)=\"handleBlur()\" (change)=\"handleChangedValue()\" />\r\n <span *ngIf=\"suffix\" class=\"p-inputgroup-addon\">({{suffix}})</span>\r\n </div>\r\n</ng-container>", styles: [".tn-mask-viewMode>span{margin-right:3px}.tn-mask-viewMode>span:last-child{margin-right:0}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i4$5.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime"] }] });
|
|
15568
|
+
], ngImport: i0, template: "<ng-container *ngIf=\"viewMode\">\r\n <div class=\"tn-mask-viewMode\">\r\n <span *ngIf=\"prefix\">{{prefix}}</span>\r\n <span>{{model}}</span> \r\n <span *ngIf=\"suffix\">({{suffix}})</span>\r\n </div>\r\n</ng-container>\r\n<ng-container *ngIf=\"!viewMode\">\r\n <div class=\"p-inputgroup\">\r\n <span *ngIf=\"prefix\" class=\"p-inputgroup-addon\">{{prefix}}</span>\r\n <input type=\"text\" pInputText [placeholder]=\"_placeholder\" [attr.disabled]=\"disabled ? true : null\"\r\n [mask]=\"getMaskByType(maskType)\" [thousandSeparator]=\"getThousandSeperator()\" [class]=\"inputStyleClass\"\r\n [(ngModel)]=\"model\" (focus)=\"handleFocus()\" (blur)=\"handleBlur()\" (change)=\"handleChangedValue()\" />\r\n <span *ngIf=\"suffix\" class=\"p-inputgroup-addon\">({{suffix}})</span>\r\n </div>\r\n</ng-container>", styles: [".tn-mask-viewMode>span{margin-right:3px}.tn-mask-viewMode>span:last-child{margin-right:0}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i4$5.MaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "triggerOnMaskChange"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }] });
|
|
15617
15569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: MaskComponent, decorators: [{
|
|
15618
15570
|
type: Component,
|
|
15619
15571
|
args: [{ selector: 'tn-mask', providers: [
|
|
@@ -19527,7 +19479,7 @@ class DropdownService {
|
|
|
19527
19479
|
this._httpClient = _httpClient;
|
|
19528
19480
|
}
|
|
19529
19481
|
getDataSource(serviceUri) {
|
|
19530
|
-
return this._httpClient.get(serviceUri)
|
|
19482
|
+
return firstValueFrom(this._httpClient.get(serviceUri));
|
|
19531
19483
|
}
|
|
19532
19484
|
getPostDataSource(serviceUri, filters, options) {
|
|
19533
19485
|
return this.getDataDropdownByFilter(serviceUri, filters, options);
|
|
@@ -19536,9 +19488,8 @@ class DropdownService {
|
|
|
19536
19488
|
let apiUrl = serviceUri;
|
|
19537
19489
|
if (plusUrl != null && plusUrl != '')
|
|
19538
19490
|
apiUrl += "/" + plusUrl;
|
|
19539
|
-
return this._httpClient
|
|
19540
|
-
.post(apiUrl, gridInfo)
|
|
19541
|
-
.toPromise();
|
|
19491
|
+
return firstValueFrom(this._httpClient
|
|
19492
|
+
.post(apiUrl, gridInfo));
|
|
19542
19493
|
}
|
|
19543
19494
|
setDefaultValue(options) {
|
|
19544
19495
|
if (options.fieldPlus.length > 0 && !options.fieldPlus.startsWith(','))
|
|
@@ -21033,7 +20984,7 @@ class TemplateService {
|
|
|
21033
20984
|
}
|
|
21034
20985
|
laTexToBase64Image(laTex, font = 54) {
|
|
21035
20986
|
const api = `${this.serviceUri}/LatexToBase64`;
|
|
21036
|
-
return this._httpClient.post(api, { laTex, font })
|
|
20987
|
+
return firstValueFrom(this._httpClient.post(api, { laTex, font }));
|
|
21037
20988
|
}
|
|
21038
20989
|
/**
|
|
21039
20990
|
* Description: Xuất file sử dụng thư viện CX, xuất xong tự động mở popup để lưu file.
|
|
@@ -21041,9 +20992,8 @@ class TemplateService {
|
|
|
21041
20992
|
exportCxExcelByCode(model) {
|
|
21042
20993
|
const url = `${this.serviceUri}/ExportCxExcelByCode`;
|
|
21043
20994
|
this.setFileInfo(model);
|
|
21044
|
-
return this._httpClient
|
|
21045
|
-
.post(url, model, { responseType: 'blob' })
|
|
21046
|
-
.toPromise()
|
|
20995
|
+
return firstValueFrom(this._httpClient
|
|
20996
|
+
.post(url, model, { responseType: 'blob' }))
|
|
21047
20997
|
.then(res => {
|
|
21048
20998
|
FileSaver.saveAs(res, this.getFullFileName(model.fileName || model.code));
|
|
21049
20999
|
}).catch((err) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -21054,9 +21004,8 @@ class TemplateService {
|
|
|
21054
21004
|
exportManyCxExcelByCode(model) {
|
|
21055
21005
|
const url = `${this.serviceUri}/ExportManyCxExcelByCode`;
|
|
21056
21006
|
this.setManyFileInfo(model);
|
|
21057
|
-
return this._httpClient
|
|
21058
|
-
.post(url, model)
|
|
21059
|
-
.toPromise()
|
|
21007
|
+
return firstValueFrom(this._httpClient
|
|
21008
|
+
.post(url, model))
|
|
21060
21009
|
.then(res => {
|
|
21061
21010
|
if (res.success) {
|
|
21062
21011
|
this._fileService.downloadFolder(res.data.folderId);
|
|
@@ -21083,8 +21032,7 @@ class TemplateService {
|
|
|
21083
21032
|
ExportCxExcelByCodeWithSignalR(model) {
|
|
21084
21033
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21085
21034
|
const url = `${this.serviceUri}/ExportCxExcelByCodeWithSignalR`;
|
|
21086
|
-
return this._httpClient.post(url, model)
|
|
21087
|
-
.toPromise();
|
|
21035
|
+
return firstValueFrom(this._httpClient.post(url, model));
|
|
21088
21036
|
});
|
|
21089
21037
|
}
|
|
21090
21038
|
/**
|
|
@@ -21099,23 +21047,20 @@ class TemplateService {
|
|
|
21099
21047
|
ExportCxExcelByCodeWithHPS(model) {
|
|
21100
21048
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21101
21049
|
const url = `${this.serviceUri}/ExportWithHighPerformanceService`;
|
|
21102
|
-
return this._httpClient.post(url, model)
|
|
21103
|
-
.toPromise();
|
|
21050
|
+
return firstValueFrom(this._httpClient.post(url, model));
|
|
21104
21051
|
});
|
|
21105
21052
|
}
|
|
21106
21053
|
exportCxExcelByCodePromise(model) {
|
|
21107
21054
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21108
21055
|
const url = `${this.serviceUri}/ExportCxExcelByCode`;
|
|
21109
|
-
return this._httpClient
|
|
21110
|
-
.post(url, model, { responseType: 'blob' })
|
|
21111
|
-
.toPromise();
|
|
21056
|
+
return firstValueFrom(this._httpClient
|
|
21057
|
+
.post(url, model, { responseType: 'blob' }));
|
|
21112
21058
|
});
|
|
21113
21059
|
}
|
|
21114
21060
|
fillTemplateByCodeAndGetPdf(templateCode, data, onLoadingDataPdf = null, onEndLoadingDataPdf = null) {
|
|
21115
21061
|
const url = `${this.serviceUri}/fillWordByTemplateCode/${templateCode}?isPrint=true`;
|
|
21116
|
-
return this._httpClient
|
|
21117
|
-
.post(url, data)
|
|
21118
|
-
.toPromise().then(res => {
|
|
21062
|
+
return firstValueFrom(this._httpClient
|
|
21063
|
+
.post(url, data)).then(res => {
|
|
21119
21064
|
if (res.data) {
|
|
21120
21065
|
this._printService.printBase64Pdf(res.data, onLoadingDataPdf, onEndLoadingDataPdf);
|
|
21121
21066
|
}
|
|
@@ -21123,9 +21068,8 @@ class TemplateService {
|
|
|
21123
21068
|
}
|
|
21124
21069
|
fillWordByTemplateCodeMultiData(templateCode, data, onLoadingDataPdf = null, onEndLoadingDataPdf = null) {
|
|
21125
21070
|
const url = `${this.serviceUri}/fillWordByTemplateCodeMultiData/${templateCode}?isPrint=true`;
|
|
21126
|
-
return this._httpClient
|
|
21127
|
-
.post(url, data)
|
|
21128
|
-
.toPromise().then(res => {
|
|
21071
|
+
return firstValueFrom(this._httpClient
|
|
21072
|
+
.post(url, data)).then(res => {
|
|
21129
21073
|
if (res.data) {
|
|
21130
21074
|
this._printService.printBase64Pdf(res.data, onLoadingDataPdf, onEndLoadingDataPdf);
|
|
21131
21075
|
}
|
|
@@ -21150,9 +21094,8 @@ class TemplateService {
|
|
|
21150
21094
|
*/
|
|
21151
21095
|
exportCxExcel(model) {
|
|
21152
21096
|
const url = `${this.serviceUri}/ExportCxExcel`;
|
|
21153
|
-
return this._httpClient
|
|
21154
|
-
.post(url, model, { responseType: 'blob' })
|
|
21155
|
-
.toPromise()
|
|
21097
|
+
return firstValueFrom(this._httpClient
|
|
21098
|
+
.post(url, model, { responseType: 'blob' }))
|
|
21156
21099
|
.then(res => {
|
|
21157
21100
|
FileSaver.saveAs(res, this.getFullFileName(model.fileName || 'Export'));
|
|
21158
21101
|
}).catch((err) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -21163,9 +21106,8 @@ class TemplateService {
|
|
|
21163
21106
|
exportCxExcelPromise(model) {
|
|
21164
21107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21165
21108
|
const url = `${this.serviceUri}/ExportCxExcel`;
|
|
21166
|
-
return this._httpClient
|
|
21167
|
-
.post(url, model, { responseType: 'blob' })
|
|
21168
|
-
.toPromise();
|
|
21109
|
+
return firstValueFrom(this._httpClient
|
|
21110
|
+
.post(url, model, { responseType: 'blob' }));
|
|
21169
21111
|
});
|
|
21170
21112
|
}
|
|
21171
21113
|
}
|
|
@@ -21591,7 +21533,7 @@ class TnTinymceComponent extends ComponentBase {
|
|
|
21591
21533
|
return content;
|
|
21592
21534
|
}
|
|
21593
21535
|
handleBlur() {
|
|
21594
|
-
this.onBlur.next();
|
|
21536
|
+
this.onBlur.next(1);
|
|
21595
21537
|
}
|
|
21596
21538
|
onKeyDown(e, topic) {
|
|
21597
21539
|
this.keydown.next({ event: e, topic });
|
|
@@ -22026,8 +21968,8 @@ class UserV5Service extends BaseService {
|
|
|
22026
21968
|
}
|
|
22027
21969
|
getForAutoComplete(key) {
|
|
22028
21970
|
const apiUrl = `${this.serviceUri}/GetForAutoComplete?key=${key}`;
|
|
22029
|
-
return this._http.get(apiUrl)
|
|
22030
|
-
.pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector)))
|
|
21971
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
21972
|
+
.pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))));
|
|
22031
21973
|
}
|
|
22032
21974
|
populateCurrentUser() {
|
|
22033
21975
|
const storageItem = localStorage.getItem(this.CURRENT_USER_KEY);
|
|
@@ -22105,7 +22047,7 @@ class UserV5Service extends BaseService {
|
|
|
22105
22047
|
}
|
|
22106
22048
|
getStaffInfo(userId) {
|
|
22107
22049
|
const url = `${this.serviceUri}/${userId}`;
|
|
22108
|
-
return this._http.get(url)
|
|
22050
|
+
return firstValueFrom(this._http.get(url)
|
|
22109
22051
|
.pipe(catchError((err) => this.handleError(err, this._injector)), map(rs => {
|
|
22110
22052
|
const op = {
|
|
22111
22053
|
fullName: rs.data ? rs.data.fullName : '',
|
|
@@ -22124,8 +22066,7 @@ class UserV5Service extends BaseService {
|
|
|
22124
22066
|
}
|
|
22125
22067
|
}
|
|
22126
22068
|
return op;
|
|
22127
|
-
}))
|
|
22128
|
-
.toPromise();
|
|
22069
|
+
})));
|
|
22129
22070
|
}
|
|
22130
22071
|
getId() {
|
|
22131
22072
|
const storageItem = localStorage.getItem(this.CURRENT_USER_KEY);
|
|
@@ -22152,10 +22093,9 @@ class UserV5Service extends BaseService {
|
|
|
22152
22093
|
}
|
|
22153
22094
|
registerOnline(formData) {
|
|
22154
22095
|
const apiUrl = `${this.serviceUri}/registerOnline`;
|
|
22155
|
-
return this._http
|
|
22096
|
+
return firstValueFrom(this._http
|
|
22156
22097
|
.post(apiUrl, formData)
|
|
22157
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
22158
|
-
.toPromise();
|
|
22098
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
22159
22099
|
}
|
|
22160
22100
|
getBasicUserInfo(userId) {
|
|
22161
22101
|
const storageItem = localStorage.getItem(this.USER_INFO_KEY + '_' + userId);
|
|
@@ -22174,11 +22114,11 @@ class UserV5Service extends BaseService {
|
|
|
22174
22114
|
if (userId > 0) {
|
|
22175
22115
|
const svUrl = `${this.serviceUri}/GetBasicUserInfo?id=${userId}`;
|
|
22176
22116
|
try {
|
|
22177
|
-
const result = yield this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
22117
|
+
const result = yield firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
22178
22118
|
// save response to local storage here
|
|
22179
22119
|
localStorage.setItem(this.USER_INFO_KEY + '_' + repsonse.data.id, JSON.stringify(repsonse.data));
|
|
22180
22120
|
return repsonse.data;
|
|
22181
|
-
}, catchError((err) => this.handleError(err, this._injector))))
|
|
22121
|
+
}, catchError((err) => this.handleError(err, this._injector)))));
|
|
22182
22122
|
resolve(result);
|
|
22183
22123
|
}
|
|
22184
22124
|
catch (_a) {
|
|
@@ -22205,7 +22145,7 @@ class UserV5Service extends BaseService {
|
|
|
22205
22145
|
else {
|
|
22206
22146
|
return new Promise((resolve, reject) => {
|
|
22207
22147
|
const svUrl = `${this.serviceUri}/GetBasicUsersInfo?userIds=${userIds}`;
|
|
22208
|
-
this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))
|
|
22148
|
+
firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))).then(success => {
|
|
22209
22149
|
resolve(success);
|
|
22210
22150
|
}).catch(err => {
|
|
22211
22151
|
resolve([]);
|
|
@@ -22227,11 +22167,11 @@ class UserV5Service extends BaseService {
|
|
|
22227
22167
|
else {
|
|
22228
22168
|
if (userName != '') {
|
|
22229
22169
|
const svUrl = `${this.serviceUri}/GetBasicUserInfoByUserName?userName=${userName}`;
|
|
22230
|
-
this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
22170
|
+
firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), map(repsonse => {
|
|
22231
22171
|
// save response to local storage here
|
|
22232
22172
|
localStorage.setItem(this.USER_INFO_KEY + '_' + repsonse.data.userName, JSON.stringify(repsonse.data));
|
|
22233
22173
|
return repsonse.data;
|
|
22234
|
-
}, catchError((err) => this.handleError(err, this._injector))))
|
|
22174
|
+
}, catchError((err) => this.handleError(err, this._injector))))).then(rss => {
|
|
22235
22175
|
resolve(rss);
|
|
22236
22176
|
}).catch(errr => {
|
|
22237
22177
|
resolve({});
|
|
@@ -22251,7 +22191,7 @@ class UserV5Service extends BaseService {
|
|
|
22251
22191
|
else {
|
|
22252
22192
|
return new Promise((resolve, reject) => {
|
|
22253
22193
|
const svUrl = `${this.serviceUri}/GetBasicUsersInfoByUserName?userNames=${userNames}`;
|
|
22254
|
-
this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))
|
|
22194
|
+
firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))).then(success => {
|
|
22255
22195
|
resolve(success);
|
|
22256
22196
|
}).catch(err => {
|
|
22257
22197
|
resolve([]);
|
|
@@ -22277,23 +22217,20 @@ class UserV5Service extends BaseService {
|
|
|
22277
22217
|
return dataSource;
|
|
22278
22218
|
}
|
|
22279
22219
|
restorePassword(item) {
|
|
22280
|
-
return this._http.put(`${this.serviceUri}/restorePassword`, item)
|
|
22281
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
22282
|
-
.toPromise();
|
|
22220
|
+
return firstValueFrom(this._http.put(`${this.serviceUri}/restorePassword`, item)
|
|
22221
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
22283
22222
|
}
|
|
22284
22223
|
changePassword(userId, item) {
|
|
22285
22224
|
const apiUrl = `${this.serviceUri}/ChangePassword`;
|
|
22286
|
-
return this._http
|
|
22225
|
+
return firstValueFrom(this._http
|
|
22287
22226
|
.post(apiUrl, item)
|
|
22288
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
22289
|
-
.toPromise();
|
|
22227
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
22290
22228
|
}
|
|
22291
22229
|
resetPassword(item) {
|
|
22292
22230
|
const apiUrl = `${this.serviceUri}/resetPassword`;
|
|
22293
|
-
return this._http
|
|
22231
|
+
return firstValueFrom(this._http
|
|
22294
22232
|
.put(apiUrl, item)
|
|
22295
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
22296
|
-
.toPromise();
|
|
22233
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
22297
22234
|
}
|
|
22298
22235
|
resetPasswordAll() {
|
|
22299
22236
|
return this.defaultPost(`${this.serviceUri}/ResetPasswordAll`, {});
|
|
@@ -22309,17 +22246,15 @@ class UserV5Service extends BaseService {
|
|
|
22309
22246
|
}
|
|
22310
22247
|
markAsAdmin(userId, isAdmin) {
|
|
22311
22248
|
const url = `${this.serviceUri}/markAsAdmin/${userId}/${isAdmin}`;
|
|
22312
|
-
return this._http
|
|
22249
|
+
return firstValueFrom(this._http
|
|
22313
22250
|
.put(url, isAdmin)
|
|
22314
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
22315
|
-
.toPromise();
|
|
22251
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
22316
22252
|
}
|
|
22317
22253
|
markAsRepresent(userId, isRepresent) {
|
|
22318
22254
|
const url = `${this.serviceUri}/markAsRepresent/${userId}/${isRepresent}`;
|
|
22319
|
-
return this._http
|
|
22255
|
+
return firstValueFrom(this._http
|
|
22320
22256
|
.put(url, isRepresent)
|
|
22321
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
22322
|
-
.toPromise();
|
|
22257
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
22323
22258
|
}
|
|
22324
22259
|
getsByOrganizationListId(pageOption, funGetName = '', optionParameter = '', defaultParameter = '') {
|
|
22325
22260
|
let queryString = `?key=${pageOption.query}`;
|
|
@@ -22375,17 +22310,15 @@ class UserV5Service extends BaseService {
|
|
|
22375
22310
|
}
|
|
22376
22311
|
lockUser(item) {
|
|
22377
22312
|
const apiUrl = `${this.serviceUri}/lockUserAccount`;
|
|
22378
|
-
return this._http
|
|
22313
|
+
return firstValueFrom(this._http
|
|
22379
22314
|
.post(apiUrl, item)
|
|
22380
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
22381
|
-
.toPromise();
|
|
22315
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
22382
22316
|
}
|
|
22383
22317
|
unlockUser(item) {
|
|
22384
22318
|
const apiUrl = `${this.serviceUri}/unlockUserAccount`;
|
|
22385
|
-
return this._http
|
|
22319
|
+
return firstValueFrom(this._http
|
|
22386
22320
|
.post(apiUrl, item)
|
|
22387
|
-
.pipe(catchError(err => this.handleError(err, this._injector)))
|
|
22388
|
-
.toPromise();
|
|
22321
|
+
.pipe(catchError(err => this.handleError(err, this._injector))));
|
|
22389
22322
|
}
|
|
22390
22323
|
isSuperUser() {
|
|
22391
22324
|
return this._applicationContext.getRootContext().data.currentUser
|
|
@@ -22400,8 +22333,8 @@ class UserV5Service extends BaseService {
|
|
|
22400
22333
|
}
|
|
22401
22334
|
getUsersByGroupCode(groupCode) {
|
|
22402
22335
|
const apiUrl = `${this.serviceUri}/GetUsersByGroupCode?groupCode=${groupCode}`;
|
|
22403
|
-
return this._http.get(apiUrl)
|
|
22404
|
-
.pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector)))
|
|
22336
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
22337
|
+
.pipe(catchError((err) => this._exceptionHandlerService.handleError(err, this._injector))));
|
|
22405
22338
|
}
|
|
22406
22339
|
getServiceEndpoint() {
|
|
22407
22340
|
return `${this.serviceUri}`;
|
|
@@ -22447,7 +22380,7 @@ class UserV5Service extends BaseService {
|
|
|
22447
22380
|
sorts: [],
|
|
22448
22381
|
filters: filters
|
|
22449
22382
|
});
|
|
22450
|
-
this._http.post(svUrl, gridInfo).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))
|
|
22383
|
+
firstValueFrom(this._http.post(svUrl, gridInfo).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err, this._injector)), map(repsonse => repsonse.data))).then(success => {
|
|
22451
22384
|
resolve(success);
|
|
22452
22385
|
}).catch(err => {
|
|
22453
22386
|
resolve([]);
|
|
@@ -22634,7 +22567,7 @@ class UserPickerBoxComponent extends ComponentBase {
|
|
|
22634
22567
|
}
|
|
22635
22568
|
}
|
|
22636
22569
|
UserPickerBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: UserPickerBoxComponent, deps: [{ token: UserV5Service }, { token: i0.Injector }, { token: OrganizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
22637
|
-
UserPickerBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: UserPickerBoxComponent, selector: "user-picker-box", inputs: { multiple: "multiple", disabled: "disabled", enableCaching: "enableCaching", controlSetting: "controlSetting", parentSetting: "parentSetting", advanceData: "advanceData", control: "control", width: "width", height: "height", selectedValue: "selectedValue", readOnlyValues: "readOnlyValues" }, outputs: { onRowSelect: "onRowSelect", onChanged: "onChanged", onSelect: "onSelect", onUnSelect: "onUnSelect", onDone: "onDone" }, providers: [ComponentContextService], viewQueries: [{ propertyName: "entityPickerBox", first: true, predicate: ["entityPickerBox"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"p-grid p-m-0 tn-l-user-picker-box\">\r\n <as-split [unit]=\"'pixel'\">\r\n <as-split-area [size]=\"330\">\r\n <tn-custom-scrollbar>\r\n <p-tree [style]=\"{'width': '100%'}\" styleClass=\"tn-tree-beauty tree-organization-picker\"\r\n [value]=\"rootTreeNode\" filterPlaceholder=\"T\u00ECm \u0111\u01A1n v\u1ECB / ph\u00F2ng ban\" selectionMode=\"single\"\r\n [filter]=\"true\" [(selection)]=\"selectedTreeNode\" (onNodeExpand)=\"onNodeExpand($event)\"\r\n (onNodeSelect)=\"nodeSelect($event)\" [emptyMessage]=\"'Kh\u00F4ng t\u00ECm th\u1EA5y k\u1EBFt qu\u1EA3'\">\r\n <ng-template let-node pTemplate=\"default\">\r\n <span id=\"{{node.data}}\" class=\"custom-node\">{{node.label}}</span>\r\n </ng-template>\r\n </p-tree>\r\n </tn-custom-scrollbar>\r\n </as-split-area>\r\n <as-split-area [size]=\"0\">\r\n <entity-picker-box #entityPickerBox [control]=\"control\" [parentSetting]=\"parentSetting\"\r\n [advanceData]=\"advanceData\" [readOnlyValues]=\"readOnlyValues\" [selectedValue]=\"selectedValue\"\r\n (onChanged)=\"handleChangedEntity($event)\" (onSelect)=\"handleSelectEntity($event)\"\r\n (onUnSelect)=\"handleUnSelectEntity($event)\" (onDone)=\"handleDone($event)\"\r\n (onRowSelect)=\"handleRowSelect($event)\">\r\n </entity-picker-box>\r\n </as-split-area>\r\n </as-split>\r\n</div>\r\n<ng-template #buttonTemplate>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'Ch\u1ECDn'\"\r\n (click)=\"handleSelect($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"handleCancelDialog($event)\"></button>\r\n</ng-template>", styles: [".action-btn{border:1px solid #0a89bf;color:#0a89bf;background-color:#fff;font-size:16px;width:40px;cursor:pointer;text-align:center;margin:4px 2px}.content-all{display:flex;flex-direction:column}.content-top{padding:5px 0;overflow:hidden;flex-grow:1}.content-bottom{border-top:1px solid #ddd;padding:5px 0;overflow:hidden;flex:0 0 50%}.tn-l-button-group{padding-bottom:1em}.tn-l-button-group-picker{text-align:center;position:absolute;background:#fff;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10}.tn-l-user-picker-box{height:100%}.tn-l-left-sidebar-wrapper{height:100%;border-right:1px solid #aaa}.tn-l-left-sidebar-area{height:100%}.tn-l-right-content-wrapper{padding-bottom:0;padding-top:0;height:100%}@media (max-width: 640px){.entityPicker{height:auto}.tn-l-search-button-group{padding-bottom:1em}.tn-l-button-group-picker{position:static;top:auto;left:auto;transform:none;padding-bottom:5px}.tn-l-left-sidebar-wrapper{height:calc(100vh - 300px);border-right:unset;border-bottom:1px solid #aaa}}::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:hidden;padding:0}::ng-deep .user-picker-box-dialog .p-tree{padding:0;border:none}::ng-deep .user-picker-box-dialog .p-tree-wrapper{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container{position:sticky;top:0;z-index:4;padding:.5em;margin-bottom:0;background-color:#fff}::ng-deep .user-picker-box-dialog .p-tree-empty-message{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container .p-tree-filter-icon{right:1em}::ng-deep .user-picker-box-dialog .ps__rail-y{z-index:10}@media (max-width: 640px){::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:auto}::ng-deep .user-picker-box-dialog .tn-dialog-scrollbar>div{min-height:100%!important}::ng-deep .user-picker-box-dialog .tn-l-right-content-wrapper{padding:0}}\n"], dependencies: [{ kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration"], outputs: ["dragStart", "dragEnd", "gutterClick", "gutterDblClick"
|
|
22570
|
+
UserPickerBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: UserPickerBoxComponent, selector: "user-picker-box", inputs: { multiple: "multiple", disabled: "disabled", enableCaching: "enableCaching", controlSetting: "controlSetting", parentSetting: "parentSetting", advanceData: "advanceData", control: "control", width: "width", height: "height", selectedValue: "selectedValue", readOnlyValues: "readOnlyValues" }, outputs: { onRowSelect: "onRowSelect", onChanged: "onChanged", onSelect: "onSelect", onUnSelect: "onUnSelect", onDone: "onDone" }, providers: [ComponentContextService], viewQueries: [{ propertyName: "entityPickerBox", first: true, predicate: ["entityPickerBox"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"p-grid p-m-0 tn-l-user-picker-box\">\r\n <as-split [unit]=\"'pixel'\">\r\n <as-split-area [size]=\"330\">\r\n <tn-custom-scrollbar>\r\n <p-tree [style]=\"{'width': '100%'}\" styleClass=\"tn-tree-beauty tree-organization-picker\"\r\n [value]=\"rootTreeNode\" filterPlaceholder=\"T\u00ECm \u0111\u01A1n v\u1ECB / ph\u00F2ng ban\" selectionMode=\"single\"\r\n [filter]=\"true\" [(selection)]=\"selectedTreeNode\" (onNodeExpand)=\"onNodeExpand($event)\"\r\n (onNodeSelect)=\"nodeSelect($event)\" [emptyMessage]=\"'Kh\u00F4ng t\u00ECm th\u1EA5y k\u1EBFt qu\u1EA3'\">\r\n <ng-template let-node pTemplate=\"default\">\r\n <span id=\"{{node.data}}\" class=\"custom-node\">{{node.label}}</span>\r\n </ng-template>\r\n </p-tree>\r\n </tn-custom-scrollbar>\r\n </as-split-area>\r\n <as-split-area [size]=\"0\">\r\n <entity-picker-box #entityPickerBox [control]=\"control\" [parentSetting]=\"parentSetting\"\r\n [advanceData]=\"advanceData\" [readOnlyValues]=\"readOnlyValues\" [selectedValue]=\"selectedValue\"\r\n (onChanged)=\"handleChangedEntity($event)\" (onSelect)=\"handleSelectEntity($event)\"\r\n (onUnSelect)=\"handleUnSelectEntity($event)\" (onDone)=\"handleDone($event)\"\r\n (onRowSelect)=\"handleRowSelect($event)\">\r\n </entity-picker-box>\r\n </as-split-area>\r\n </as-split>\r\n</div>\r\n<ng-template #buttonTemplate>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'Ch\u1ECDn'\"\r\n (click)=\"handleSelect($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"handleCancelDialog($event)\"></button>\r\n</ng-template>", styles: [".action-btn{border:1px solid #0a89bf;color:#0a89bf;background-color:#fff;font-size:16px;width:40px;cursor:pointer;text-align:center;margin:4px 2px}.content-all{display:flex;flex-direction:column}.content-top{padding:5px 0;overflow:hidden;flex-grow:1}.content-bottom{border-top:1px solid #ddd;padding:5px 0;overflow:hidden;flex:0 0 50%}.tn-l-button-group{padding-bottom:1em}.tn-l-button-group-picker{text-align:center;position:absolute;background:#fff;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10}.tn-l-user-picker-box{height:100%}.tn-l-left-sidebar-wrapper{height:100%;border-right:1px solid #aaa}.tn-l-left-sidebar-area{height:100%}.tn-l-right-content-wrapper{padding-bottom:0;padding-top:0;height:100%}@media (max-width: 640px){.entityPicker{height:auto}.tn-l-search-button-group{padding-bottom:1em}.tn-l-button-group-picker{position:static;top:auto;left:auto;transform:none;padding-bottom:5px}.tn-l-left-sidebar-wrapper{height:calc(100vh - 300px);border-right:unset;border-bottom:1px solid #aaa}}::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:hidden;padding:0}::ng-deep .user-picker-box-dialog .p-tree{padding:0;border:none}::ng-deep .user-picker-box-dialog .p-tree-wrapper{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container{position:sticky;top:0;z-index:4;padding:.5em;margin-bottom:0;background-color:#fff}::ng-deep .user-picker-box-dialog .p-tree-empty-message{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container .p-tree-filter-icon{right:1em}::ng-deep .user-picker-box-dialog .ps__rail-y{z-index:10}@media (max-width: 640px){::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:auto}::ng-deep .user-picker-box-dialog .tn-dialog-scrollbar>div{min-height:100%!important}::ng-deep .user-picker-box-dialog .tn-l-right-content-wrapper{padding:0}}\n"], dependencies: [{ kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration", "gutterClickDeltaPx", "gutterAriaLabel"], outputs: ["transitionEnd", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"], exportAs: ["asSplit"] }, { kind: "directive", type: i4$8.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "label", "icon"] }, { kind: "component", type: i6$1.Tree, selector: "p-tree", inputs: ["layout", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loadingIcon", "emptyMessage", "filterBy", "filterMode", "indentation", "trackBy", "selection", "value", "selectionMode", "style", "styleClass", "contextMenu", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "loading", "ariaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterPlaceholder", "filterLocale", "scrollHeight", "virtualScroll", "virtualNodeHeight", "minBufferPx", "maxBufferPx"], outputs: ["selectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDrop", "onFilter"] }, { kind: "component", type: EntityPickerBoxComponent, selector: "entity-picker-box", inputs: ["parentSetting", "advanceData", "control", "width", "height", "readOnlyValues", "selectedValue"], outputs: ["onContentLeftInit", "onContentRightInit", "onRowSelect", "onChanged", "onSelect", "onUnSelect", "onDone"] }, { kind: "component", type: TnCustomScrollbarComponent, selector: "tn-custom-scrollbar", inputs: ["style", "useDefaultScrollBar", "autoMode", "class", "config", "whiteBackGround", "showScrollHorizontal"], outputs: ["scrollY", "scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollYReachEnd", "scrollYReachStart", "scrollXReachEnd", "scrollXReachStart"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
22638
22571
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: UserPickerBoxComponent, decorators: [{
|
|
22639
22572
|
type: Component,
|
|
22640
22573
|
args: [{ selector: 'user-picker-box', providers: [ComponentContextService], template: "<div class=\"p-grid p-m-0 tn-l-user-picker-box\">\r\n <as-split [unit]=\"'pixel'\">\r\n <as-split-area [size]=\"330\">\r\n <tn-custom-scrollbar>\r\n <p-tree [style]=\"{'width': '100%'}\" styleClass=\"tn-tree-beauty tree-organization-picker\"\r\n [value]=\"rootTreeNode\" filterPlaceholder=\"T\u00ECm \u0111\u01A1n v\u1ECB / ph\u00F2ng ban\" selectionMode=\"single\"\r\n [filter]=\"true\" [(selection)]=\"selectedTreeNode\" (onNodeExpand)=\"onNodeExpand($event)\"\r\n (onNodeSelect)=\"nodeSelect($event)\" [emptyMessage]=\"'Kh\u00F4ng t\u00ECm th\u1EA5y k\u1EBFt qu\u1EA3'\">\r\n <ng-template let-node pTemplate=\"default\">\r\n <span id=\"{{node.data}}\" class=\"custom-node\">{{node.label}}</span>\r\n </ng-template>\r\n </p-tree>\r\n </tn-custom-scrollbar>\r\n </as-split-area>\r\n <as-split-area [size]=\"0\">\r\n <entity-picker-box #entityPickerBox [control]=\"control\" [parentSetting]=\"parentSetting\"\r\n [advanceData]=\"advanceData\" [readOnlyValues]=\"readOnlyValues\" [selectedValue]=\"selectedValue\"\r\n (onChanged)=\"handleChangedEntity($event)\" (onSelect)=\"handleSelectEntity($event)\"\r\n (onUnSelect)=\"handleUnSelectEntity($event)\" (onDone)=\"handleDone($event)\"\r\n (onRowSelect)=\"handleRowSelect($event)\">\r\n </entity-picker-box>\r\n </as-split-area>\r\n </as-split>\r\n</div>\r\n<ng-template #buttonTemplate>\r\n <button type=\"button\" pButton icon=\"pi pi-save\" class=\"p-button-text\" [label]=\"'Ch\u1ECDn'\"\r\n (click)=\"handleSelect($event)\"></button>\r\n <button type=\"button\" pButton icon=\"pi pi-replay\" class=\"p-button-text p-button-secondary\"\r\n [label]=\"'FORM.CANCEL' | translate\" preventTab (click)=\"handleCancelDialog($event)\"></button>\r\n</ng-template>", styles: [".action-btn{border:1px solid #0a89bf;color:#0a89bf;background-color:#fff;font-size:16px;width:40px;cursor:pointer;text-align:center;margin:4px 2px}.content-all{display:flex;flex-direction:column}.content-top{padding:5px 0;overflow:hidden;flex-grow:1}.content-bottom{border-top:1px solid #ddd;padding:5px 0;overflow:hidden;flex:0 0 50%}.tn-l-button-group{padding-bottom:1em}.tn-l-button-group-picker{text-align:center;position:absolute;background:#fff;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10}.tn-l-user-picker-box{height:100%}.tn-l-left-sidebar-wrapper{height:100%;border-right:1px solid #aaa}.tn-l-left-sidebar-area{height:100%}.tn-l-right-content-wrapper{padding-bottom:0;padding-top:0;height:100%}@media (max-width: 640px){.entityPicker{height:auto}.tn-l-search-button-group{padding-bottom:1em}.tn-l-button-group-picker{position:static;top:auto;left:auto;transform:none;padding-bottom:5px}.tn-l-left-sidebar-wrapper{height:calc(100vh - 300px);border-right:unset;border-bottom:1px solid #aaa}}::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:hidden;padding:0}::ng-deep .user-picker-box-dialog .p-tree{padding:0;border:none}::ng-deep .user-picker-box-dialog .p-tree-wrapper{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container{position:sticky;top:0;z-index:4;padding:.5em;margin-bottom:0;background-color:#fff}::ng-deep .user-picker-box-dialog .p-tree-empty-message{padding:.5rem}::ng-deep .user-picker-box-dialog .p-tree .p-tree-filter-container .p-tree-filter-icon{right:1em}::ng-deep .user-picker-box-dialog .ps__rail-y{z-index:10}@media (max-width: 640px){::ng-deep .user-picker-box-dialog .p-dialog-content{overflow:auto}::ng-deep .user-picker-box-dialog .tn-dialog-scrollbar>div{min-height:100%!important}::ng-deep .user-picker-box-dialog .tn-l-right-content-wrapper{padding:0}}\n"] }]
|
|
@@ -25350,7 +25283,7 @@ class CrudFormComponent extends ComponentBase {
|
|
|
25350
25283
|
}
|
|
25351
25284
|
}
|
|
25352
25285
|
CrudFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CrudFormComponent, deps: [{ token: i0.Injector }, { token: CommonService }, { token: CrudService }, { token: i1.TranslateService }, { token: i1$3.DeviceDetectorService }, { token: EnvironmentService }, { token: ComponentService }, { token: i2$2.DomSanitizer }, { token: EntityPickerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
25353
|
-
CrudFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: CrudFormComponent, selector: "crud-form", inputs: { setting: "setting", context: "context", filesUploaded: "filesUploaded", isViewMode: "isViewMode", disableKeypressControl: "disableKeypressControl", disableCaching: "disableCaching", styleClass: "styleClass", formId: "formId", formClass: "formClass", autoFocus: "autoFocus", trapFocus: "trapFocus", data: "data", formState: "formState" }, outputs: { onFormReady: "onFormReady", onControlReady: "onControlReady", onAllControlReady: "onAllControlReady", onModelChanged: "onModelChanged", dataChange: "dataChange", onChange: "onChange", onAfterTrinhKy: "onAfterTrinhKy" }, providers: [ComponentContextService], queries: [{ propertyName: "children", predicate: TemplateRef }], viewQueries: [{ propertyName: "formElement", first: true, predicate: ["formElement"], descendants: true }, { propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"_styleClass\">\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\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 </div>\r\n </form>\r\n</div>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\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\" let-groupKey=\"groupKey\">\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 [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText\r\n [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\" [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText [type]=\"control.dataFormat\"\r\n [(ngModel)]=\"data[control.field]\" [max]=\"control.max\" [min]=\"control.min\"\r\n [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=\"'reference-text'\">\r\n <reference-textbox [control]=\"control\" [value]=\"data[control.field]\"></reference-textbox>\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]\"\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 [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText type=\"tel\"\r\n [(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 </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]=\"checkDisabled(data, control) ? true : null\" type=\"tel\" pInputText\r\n [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'textarea'\">\r\n <textarea pInputTextarea [rows]=\"control.rows ? control.rows : 5\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" [(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 *ngIf=\"!checkDisabled(data, control)\" [(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\" [languageCode]=\"control.languageCode\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\">\r\n </tn-tinymce>\r\n <div *ngIf=\"checkDisabled(data, control)\" class=\"html-box\"\r\n [innerHTML]=\"data[control.field] ? (data[control.field] | safeHtml) : ''\">\r\n </div>\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormFileManagerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <file-manager [control]=\"control\" [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"control.entityKey ? control.entityKey : data[control.entityKeyField]\"\r\n [readonly]=\"control.disabled\" [layout]=\"control.layout\" [maxFileSize]=\"control.maxFileSize\"\r\n [inTaiLieu]=\"control.inTaiLieu\" [inTaiLieuChung]=\"control.inTaiLieuChung\"\r\n [copyToFolderId]=\"control.copyToFolderId\"\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]\" (onSelected)=\"control.onSelected($event)\"\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormServiceFileUploadComponent']; context: {\r\n $implicit: data, control: control, parentContext: context, parentPath: parentPath, \r\n checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\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 [readOnlyValues]=\"data[control.field + '_readOnly']\" [(ngModel)]=\"data[control.field]\"\r\n [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 <!-- <tn-checkbox [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></tn-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]\" [disabled]=\"checkDisabled(data, control)\"\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormAddressComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\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\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(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\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormVanBanPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <vanban-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\" [readOnly]=\"control.readOnly\"\r\n [loaiVanBan]=\"control.loaiVanBan\"\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormCongViecPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\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=\"'percent'\">\r\n <div>\r\n <tn-mask [suffix]=\"'%'\" [placeholder]=\"control.placeholder\" [maskType]=\"'int'\" [min]=\"0\" [max]=\"100\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n <p-slider [step]=\"1\" [min]=\"0\" [max]=\"100\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onSlideEnd)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-slider>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'common-picker'\">\r\n <common-picker [control]=\"control\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\"\r\n [groupKey]=\"groupKey\" [valueInGroup]=\"model[control.field]\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event,'change', data, parentPath);\">\r\n </common-picker>\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 class=\"new-table scr-table table-control\" [value]=\"data[control.field]\"\r\n [columns]=\"control.headerTemplate\" [responsive]=\"true\" [scrollable]=\"false\"\r\n [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: 5%\">\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=\"text-align: center;\" [style.width]=\"subControl.width\">\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\" [style.width]=\"control.widthFunctionColumn\"\r\n class=\"table-function column-function\">\r\n <div class=\"cell-header-function\"><span>Ch\u1EE9c n\u0103ng</span></div>\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 class=\"stt\" style=\"text-align: center; vertical-align: inherit\">\r\n <span>\r\n {{ri + 1}}\r\n </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 [ngStyle]=\"{'text-align': getTextAlign(subControl.textAlign), 'vertical-align': 'inherit'}\">\r\n <span class=\"p-column-title\">{{subControl.label}}</span>\r\n <ng-template [ngIf]=\"getControlType(subControl) != 'column'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: getContextTd(subControl, rowData, ri, path)\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template [ngIf]=\"getControlType(subControl) == 'column'\">\r\n <span>{{_modelData[control.field][ri][subControl.field]}}</span>\r\n </ng-template>\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 *ngIf=\"control.showFunction\" style=\"text-align: center\"\r\n class=\"column-function text-center\">\r\n <div *ngIf=\"!control.rowButtonTemplate\"\r\n 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 p-button-rounded\"\r\n icon=\"pi pi-save\" [pTooltip]=\"'L\u01B0u' | translate\" tooltipPosition=\"top\"\r\n (click)=\"saveRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showEdit\" [disabled]=\"rowData._disableEdit\"\r\n type=\"button\" pButton class=\"p-button-text p-button-rounded\"\r\n icon=\"pi pi-pencil\" [pTooltip]=\"'S\u1EEDa' | translate\" tooltipPosition=\"top\"\r\n (click)=\"editRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showDelete\" [disabled]=\"rowData._disableDelete\"\r\n type=\"button\" pButton\r\n class=\"p-button-text p-button-danger p-button-rounded\"\r\n icon=\"pi pi-trash\" [pTooltip]=\"'X\u00F3a' | translate\" tooltipPosition=\"top\"\r\n (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 </div>\r\n <div *ngIf=\"control.rowButtonTemplate\"\r\n class=\"p-toolbar-group-center button-group\">\r\n <ng-container\r\n *ngTemplateOutlet=\"control.rowButtonTemplate; context: {rowData: _modelData[control.field][ri], rowIndex: ri, path: path, control: control}\">\r\n </ng-container>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template *ngIf=\"control.summaryTemplate\" pTemplate=\"summary\" let-rowData>\r\n <ng-container *ngTemplateOutlet=\"control.summaryTemplate; context: {rowData: rowData}\">\r\n </ng-container>\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 *ngIf=\"control.showDialog\" 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)\" [ngTemplateOutletContext]=\"{\r\n crudForm: this, data: data, index: rowIndex, parentPath: parentPath, control: control, changeFunc: handleFieldValueChange\r\n }\">\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormTableDetailForm']; context: {\r\n $implicit: tableFormSchema, parentSetting: setting, data: tableFormData, onSaved: handleSavedTableRow, onCancel: handleCancelEditTableRow,\r\n onInit: handleInitTableDetailForm\r\n }\"></ng-container>\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 <ng-template #footer>\r\n <ng-container *ngTemplateOutlet=\"tableFormFooterTemplate\"></ng-container>\r\n </ng-template>\r\n</tn-dialog>", styles: [".label-only{font-weight:700;margin-bottom:1em}div.label{position:relative}div.label .star-required{color:red;position:absolute;padding-left:.2em;padding-top:.3em}div.type-container.not-show-in-box-holder{padding:0}.--table-schema-footer{display:flex;align-items:center;font-weight:600;padding:.5em;border-width:0 1px 1px;background:#f8f9fa;color:#495057;border:1px solid #e9ecef}.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-weight:700;font-size:.85em}.view-mode>span:not(:empty){display:inline-block;width:100%;padding:5px 0}.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{font-size:1.2rem;font-weight:700;color:#025ba7;border-bottom:1px solid #cfcfcf;text-transform:uppercase;padding:5px;margin-bottom:5px}.crud-form-control.type-title>.label{margin-bottom:0}.control-description{font-size:.8rem;color:#6c757d;margin-bottom:5px;margin-left:10px}.cell-header-function{display:flex;align-items:center}.cell-header-function>span{text-align:center;flex:1 1}.cell-header-function button{width:24px;height:24px;padding:0;margin:0}::ng-deep .crud-form-control .tn-check-box-list{margin-top:5px}::ng-deep .crud-form-control>div.label{margin-bottom:5px;font-size:.9em;height:1.15em}::ng-deep .crud-form-control>div.label+*{width:100%}::ng-deep .crud-form-control>.error-container .error-item{overflow:visible;animation:shrink .1s;min-height:20px;padding-top:5px}::ng-deep .crud-form-control>.error-container .error-item .error-content{display:flex;position:relative;color:red;font-size:.9em;animation:fadeIn .1s}::ng-deep .crud-form-control>.error-container .error-item .error-content i{font-size:.9em;display:flex;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 select,::ng-deep .crud-form-control.error textarea,::ng-deep .crud-form-control.error input,::ng-deep .crud-form-control.error .p-inputtext,::ng-deep .crud-form-control.error .p-dropdown,::ng-deep .crud-form-control.error .p-multiselect,::ng-deep .crud-form-control.error .tn-dropdown{border-color:#ff5722!important}::ng-deep .crud-form-control.error .tn-dropdown:not(.p-disabled).p-focus,::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{box-shadow:0 0 0 .2rem #ffc4b3}::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,::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) .p-inputtext,::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-multiselect,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .tn-dropdown{border-color:#ced4da!important}::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,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-autocomplete-multiple-container:not(.p-disabled).p-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}}::ng-deep crud-form .crud-form-container{padding:.5rem .5rem 0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside{padding:0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside .show-in-box:not(.crud-form-control){padding:0}::ng-deep crud-form base-congviec-form crud-form>.crud-form-container{padding:0}: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 #00000013}: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 #00000013,0 0 3px #66afe9;transition:box-shadow .3s,border-color .3s;transition-property:box-shadow,border-color;transition-duration:.3s,.3s;transition-timing-function:ease,ease;transition-delay:0s,0s}:host ::ng-deep .rq .tox .tox-edit-area{border-left-color:#ff4c46}.no-value{font-size:.8em}:host ::ng-deep .table-schema-paging{margin-bottom:40px;display:block}\n"], dependencies: [{ kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "label", "icon"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: i7.ContextMenu, selector: "p-contextMenu", inputs: ["autoZIndex", "baseZIndex", "triggerEvent", "model", "global", "target", "style", "styleClass", "appendTo"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i13.Table, selector: "p-table", inputs: ["pageLinks", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "contextMenuSelectionMode", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "filterDelay", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "virtualScrollDelay", "virtualRowHeight", "columnResizeMode", "loadingIcon", "showLoader", "stateStorage", "editMode", "totalRecords", "value", "columns", "first", "rows", "sortField", "sortOrder", "multiSortMeta", "selection", "contextMenuSelection", "frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "rowsPerPageOptions", "paginatorDropdownAppendTo", "showCurrentPageReport", "showJumpToPageDropdown", "selectionMode", "dataKey", "metaKeySelection", "globalFilterFields", "filterLocale", "scrollable", "scrollHeight", "virtualScroll", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "reorderableColumns", "loading", "rowHover", "customSort", "autoLayout", "exportFunction", "stateKey", "minBufferPx", "maxBufferPx"], outputs: ["selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i13.ReorderableRowHandle, selector: "[pReorderableRowHandle]", inputs: ["pReorderableRowHandle"] }, { kind: "directive", type: i13.ReorderableRow, selector: "[pReorderableRow]", inputs: ["pReorderableRow", "pReorderableRowDisabled"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i5$2.Checkbox, selector: "p-checkbox", inputs: ["checkboxIcon", "disabled", "value", "name", "binary", "label", "ariaLabelledBy", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "readonly", "required"], outputs: ["onChange"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i5$4.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "component", type: i19.InputSwitch, selector: "p-inputSwitch", inputs: ["disabled", "style", "styleClass", "tabindex", "inputId", "name", "readonly", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "component", type: i20.Slider, selector: "p-slider", inputs: ["min", "max", "orientation", "tabindex", "disabled", "animate", "step", "range", "style", "styleClass", "ariaLabelledBy"], outputs: ["onChange", "onSlideEnd"] }, { kind: "directive", type: i21.CurrencyMaskDirective, selector: "[currencyMask]", inputs: ["options", "max", "min"] }, { kind: "component", type: AutoCompletePickerComponent, selector: "autocomplete-picker", inputs: ["control", "groupKey", "valueInGroup", "disabled", "popupSize", "readOnlyValues"], outputs: ["onSelect", "onUnSelect", "onChanged", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: CheckBoxListComponent, selector: "check-box-list", inputs: ["styleClass", "control", "dataSource", "disabled"], outputs: ["onSelect", "onReady"] }, { kind: "component", type: CommonPickerComponent, selector: "common-picker", inputs: ["control", "extraData", "disabled", "groupKey", "valueInGroup"], outputs: ["onSelect", "onUnSelect", "onChanged", "onBlur"] }, { kind: "component", type: CoCauToChucPickerListComponent, selector: "cocautochuc-picker-list", inputs: ["control", "disabled", "readOnlyValues"], outputs: ["onChanged", "onSelect", "onUnSelect", "onClear", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: DatetimePickerComponent, selector: "datetime-picker", inputs: ["control", "disabled"], outputs: ["onSelect", "onChanged", "onFocus", "onBlur", "onClose"] }, { kind: "component", type: DatetimePickerRangeComponent, selector: "tn-datetime-picker-range", inputs: ["control", "disabled"], outputs: ["onClose", "onChanged"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["showClear", "disableDisplayFieldServerSearch", "filter", "control", "defaultLabel", "appendTo", "dataSource", "value", "itemSelectedStyleClass"], outputs: ["onChanged", "onCollapse", "onExpand", "onDropdownClick", "onShow", "onShowSmartEvent", "onHide", "onHideSmartEvent", "onFocus", "onBlur", "onReady", "onDataSourceLoaded", "valueChange", "adjustValue"] }, { kind: "component", type: EntityPickerComponent, selector: "entity-picker", inputs: ["control", "disabled", "readOnly", "children"], outputs: ["onSelect", "onUnSelect", "onChanged"] }, { kind: "component", type: FileUploadComponent, selector: "file-upload", inputs: ["chooseLabel", "readonly", "accept", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageSummary", "invalidFileLimitMessageDetail", "sharedFolderType"], outputs: ["onSelect", "onRemove", "onChanged"] }, { kind: "component", type: MaskComponent, selector: "tn-mask", inputs: ["maskType", "placeholder", "disabled", "suffix", "prefix", "min", "max", "decimalPlaces", "viewMode", "inputStyleClass"], outputs: ["onFocus", "onBlur", "onChanged"] }, { kind: "component", type: NumberPickerRangeComponent, selector: "tn-number-picker-range", inputs: ["readonly", "maskType", "placeholder", "disabled", "suffix", "prefix", "min", "max", "decimalPlaces"], outputs: ["focus", "enterSmart", "enter", "blur", "change"] }, { kind: "component", type: RadioButtonListComponent, selector: "radio-button-list", inputs: ["control", "dataSource", "value", "disabled"], outputs: ["valueChange", "onChanged", "onDataSourceLoaded", "adjustValue", "onReady"] }, { kind: "component", type: ReferenceTextBoxComponent, selector: "reference-textbox", inputs: ["control", "value"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: TnColorPickerComponent, selector: "tn-color-picker", inputs: ["disabled", "appendTo"], outputs: ["change"] }, { kind: "component", type: TnCustomScrollbarComponent, selector: "tn-custom-scrollbar", inputs: ["style", "useDefaultScrollBar", "autoMode", "class", "config", "whiteBackGround", "showScrollHorizontal"], outputs: ["scrollY", "scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollYReachEnd", "scrollYReachStart", "scrollXReachEnd", "scrollXReachStart"] }, { kind: "component", type: TnTinymceComponent, selector: "tn-tinymce", inputs: ["mode", "disabled", "required", "height", "field", "languageCode"], outputs: ["keydown", "onBlur", "onChanged"] }, { kind: "component", type: CoCauToChucPickerComponent, selector: "cocautochuc-picker", inputs: ["control", "autoDisplayFirst", "multiple", "required", "readonly", "limit", "filter", "isUsingId", "parentOrgId", "parentOrgCode", "showClear", "disabledParentItem", "rootParentId"], outputs: ["onChanged"] }, { kind: "component", type: UserPickerComponent, selector: "user-picker", inputs: ["control", "popupSize", "multiple", "disabled", "readOnlyValues"], outputs: ["onSelect", "onUnSelect", "onChanged", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: AutocompleteDatasourceComponent, selector: "app-autocomplete-datasource", inputs: ["suggestions", "control"], outputs: ["onValueChanged"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
25286
|
+
CrudFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: CrudFormComponent, selector: "crud-form", inputs: { setting: "setting", context: "context", filesUploaded: "filesUploaded", isViewMode: "isViewMode", disableKeypressControl: "disableKeypressControl", disableCaching: "disableCaching", styleClass: "styleClass", formId: "formId", formClass: "formClass", autoFocus: "autoFocus", trapFocus: "trapFocus", data: "data", formState: "formState" }, outputs: { onFormReady: "onFormReady", onControlReady: "onControlReady", onAllControlReady: "onAllControlReady", onModelChanged: "onModelChanged", dataChange: "dataChange", onChange: "onChange", onAfterTrinhKy: "onAfterTrinhKy" }, providers: [ComponentContextService], queries: [{ propertyName: "children", predicate: TemplateRef }], viewQueries: [{ propertyName: "formElement", first: true, predicate: ["formElement"], descendants: true }, { propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"_styleClass\">\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\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 </div>\r\n </form>\r\n</div>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\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\" let-groupKey=\"groupKey\">\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 [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText\r\n [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\" [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText [type]=\"control.dataFormat\"\r\n [(ngModel)]=\"data[control.field]\" [max]=\"control.max\" [min]=\"control.min\"\r\n [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=\"'reference-text'\">\r\n <reference-textbox [control]=\"control\" [value]=\"data[control.field]\"></reference-textbox>\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]\"\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 [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText type=\"tel\"\r\n [(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 </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]=\"checkDisabled(data, control) ? true : null\" type=\"tel\" pInputText\r\n [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'textarea'\">\r\n <textarea pInputTextarea [rows]=\"control.rows ? control.rows : 5\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" [(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 *ngIf=\"!checkDisabled(data, control)\" [(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\" [languageCode]=\"control.languageCode\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\">\r\n </tn-tinymce>\r\n <div *ngIf=\"checkDisabled(data, control)\" class=\"html-box\"\r\n [innerHTML]=\"data[control.field] ? (data[control.field] | safeHtml) : ''\">\r\n </div>\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormFileManagerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <file-manager [control]=\"control\" [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"control.entityKey ? control.entityKey : data[control.entityKeyField]\"\r\n [readonly]=\"control.disabled\" [layout]=\"control.layout\" [maxFileSize]=\"control.maxFileSize\"\r\n [inTaiLieu]=\"control.inTaiLieu\" [inTaiLieuChung]=\"control.inTaiLieuChung\"\r\n [copyToFolderId]=\"control.copyToFolderId\"\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]\" (onSelected)=\"control.onSelected($event)\"\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormServiceFileUploadComponent']; context: {\r\n $implicit: data, control: control, parentContext: context, parentPath: parentPath, \r\n checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\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 [readOnlyValues]=\"data[control.field + '_readOnly']\" [(ngModel)]=\"data[control.field]\"\r\n [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 <!-- <tn-checkbox [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></tn-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]\" [disabled]=\"checkDisabled(data, control)\"\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormAddressComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\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\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(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\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormVanBanPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <vanban-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\" [readOnly]=\"control.readOnly\"\r\n [loaiVanBan]=\"control.loaiVanBan\"\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormCongViecPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\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=\"'percent'\">\r\n <div>\r\n <tn-mask [suffix]=\"'%'\" [placeholder]=\"control.placeholder\" [maskType]=\"'int'\" [min]=\"0\" [max]=\"100\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n <p-slider [step]=\"1\" [min]=\"0\" [max]=\"100\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onSlideEnd)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-slider>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'common-picker'\">\r\n <common-picker [control]=\"control\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\"\r\n [groupKey]=\"groupKey\" [valueInGroup]=\"model[control.field]\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event,'change', data, parentPath);\">\r\n </common-picker>\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 class=\"new-table scr-table table-control\" [value]=\"data[control.field]\"\r\n [columns]=\"control.headerTemplate\" [responsive]=\"true\" [scrollable]=\"false\"\r\n [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: 5%\">\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=\"text-align: center;\" [style.width]=\"subControl.width\">\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\" [style.width]=\"control.widthFunctionColumn\"\r\n class=\"table-function column-function\">\r\n <div class=\"cell-header-function\"><span>Ch\u1EE9c n\u0103ng</span></div>\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 class=\"stt\" style=\"text-align: center; vertical-align: inherit\">\r\n <span>\r\n {{ri + 1}}\r\n </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 [ngStyle]=\"{'text-align': getTextAlign(subControl.textAlign), 'vertical-align': 'inherit'}\">\r\n <span class=\"p-column-title\">{{subControl.label}}</span>\r\n <ng-template [ngIf]=\"getControlType(subControl) != 'column'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: getContextTd(subControl, rowData, ri, path)\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template [ngIf]=\"getControlType(subControl) == 'column'\">\r\n <span>{{_modelData[control.field][ri][subControl.field]}}</span>\r\n </ng-template>\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 *ngIf=\"control.showFunction\" style=\"text-align: center\"\r\n class=\"column-function text-center\">\r\n <div *ngIf=\"!control.rowButtonTemplate\"\r\n 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 p-button-rounded\"\r\n icon=\"pi pi-save\" [pTooltip]=\"'L\u01B0u' | translate\" tooltipPosition=\"top\"\r\n (click)=\"saveRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showEdit\" [disabled]=\"rowData._disableEdit\"\r\n type=\"button\" pButton class=\"p-button-text p-button-rounded\"\r\n icon=\"pi pi-pencil\" [pTooltip]=\"'S\u1EEDa' | translate\" tooltipPosition=\"top\"\r\n (click)=\"editRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showDelete\" [disabled]=\"rowData._disableDelete\"\r\n type=\"button\" pButton\r\n class=\"p-button-text p-button-danger p-button-rounded\"\r\n icon=\"pi pi-trash\" [pTooltip]=\"'X\u00F3a' | translate\" tooltipPosition=\"top\"\r\n (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 </div>\r\n <div *ngIf=\"control.rowButtonTemplate\"\r\n class=\"p-toolbar-group-center button-group\">\r\n <ng-container\r\n *ngTemplateOutlet=\"control.rowButtonTemplate; context: {rowData: _modelData[control.field][ri], rowIndex: ri, path: path, control: control}\">\r\n </ng-container>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template *ngIf=\"control.summaryTemplate\" pTemplate=\"summary\" let-rowData>\r\n <ng-container *ngTemplateOutlet=\"control.summaryTemplate; context: {rowData: rowData}\">\r\n </ng-container>\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 *ngIf=\"control.showDialog\" 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)\" [ngTemplateOutletContext]=\"{\r\n crudForm: this, data: data, index: rowIndex, parentPath: parentPath, control: control, changeFunc: handleFieldValueChange\r\n }\">\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormTableDetailForm']; context: {\r\n $implicit: tableFormSchema, parentSetting: setting, data: tableFormData, onSaved: handleSavedTableRow, onCancel: handleCancelEditTableRow,\r\n onInit: handleInitTableDetailForm\r\n }\"></ng-container>\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 <ng-template #footer>\r\n <ng-container *ngTemplateOutlet=\"tableFormFooterTemplate\"></ng-container>\r\n </ng-template>\r\n</tn-dialog>", styles: [".label-only{font-weight:700;margin-bottom:1em}div.label{position:relative}div.label .star-required{color:red;position:absolute;padding-left:.2em;padding-top:.3em}div.type-container.not-show-in-box-holder{padding:0}.--table-schema-footer{display:flex;align-items:center;font-weight:600;padding:.5em;border-width:0 1px 1px;background:#f8f9fa;color:#495057;border:1px solid #e9ecef}.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-weight:700;font-size:.85em}.view-mode>span:not(:empty){display:inline-block;width:100%;padding:5px 0}.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{font-size:1.2rem;font-weight:700;color:#025ba7;border-bottom:1px solid #cfcfcf;text-transform:uppercase;padding:5px;margin-bottom:5px}.crud-form-control.type-title>.label{margin-bottom:0}.control-description{font-size:.8rem;color:#6c757d;margin-bottom:5px;margin-left:10px}.cell-header-function{display:flex;align-items:center}.cell-header-function>span{text-align:center;flex:1 1}.cell-header-function button{width:24px;height:24px;padding:0;margin:0}::ng-deep .crud-form-control .tn-check-box-list{margin-top:5px}::ng-deep .crud-form-control>div.label{margin-bottom:5px;font-size:.9em;height:1.15em}::ng-deep .crud-form-control>div.label+*{width:100%}::ng-deep .crud-form-control>.error-container .error-item{overflow:visible;animation:shrink .1s;min-height:20px;padding-top:5px}::ng-deep .crud-form-control>.error-container .error-item .error-content{display:flex;position:relative;color:red;font-size:.9em;animation:fadeIn .1s}::ng-deep .crud-form-control>.error-container .error-item .error-content i{font-size:.9em;display:flex;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 select,::ng-deep .crud-form-control.error textarea,::ng-deep .crud-form-control.error input,::ng-deep .crud-form-control.error .p-inputtext,::ng-deep .crud-form-control.error .p-dropdown,::ng-deep .crud-form-control.error .p-multiselect,::ng-deep .crud-form-control.error .tn-dropdown{border-color:#ff5722!important}::ng-deep .crud-form-control.error .tn-dropdown:not(.p-disabled).p-focus,::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{box-shadow:0 0 0 .2rem #ffc4b3}::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,::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) .p-inputtext,::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-multiselect,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .tn-dropdown{border-color:#ced4da!important}::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,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-autocomplete-multiple-container:not(.p-disabled).p-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}}::ng-deep crud-form .crud-form-container{padding:.5rem .5rem 0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside{padding:0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside .show-in-box:not(.crud-form-control){padding:0}::ng-deep crud-form base-congviec-form crud-form>.crud-form-container{padding:0}: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 #00000013}: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 #00000013,0 0 3px #66afe9;transition:box-shadow .3s,border-color .3s;transition-property:box-shadow,border-color;transition-duration:.3s,.3s;transition-timing-function:ease,ease;transition-delay:0s,0s}:host ::ng-deep .rq .tox .tox-edit-area{border-left-color:#ff4c46}.no-value{font-size:.8em}:host ::ng-deep .table-schema-paging{margin-bottom:40px;display:block}\n"], dependencies: [{ kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "label", "icon"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: i7.ContextMenu, selector: "p-contextMenu", inputs: ["autoZIndex", "baseZIndex", "triggerEvent", "model", "global", "target", "style", "styleClass", "appendTo"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i13.Table, selector: "p-table", inputs: ["pageLinks", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "contextMenuSelectionMode", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "filterDelay", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "virtualScrollDelay", "virtualRowHeight", "columnResizeMode", "loadingIcon", "showLoader", "stateStorage", "editMode", "totalRecords", "value", "columns", "first", "rows", "sortField", "sortOrder", "multiSortMeta", "selection", "contextMenuSelection", "frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "rowsPerPageOptions", "paginatorDropdownAppendTo", "showCurrentPageReport", "showJumpToPageDropdown", "selectionMode", "dataKey", "metaKeySelection", "globalFilterFields", "filterLocale", "scrollable", "scrollHeight", "virtualScroll", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "reorderableColumns", "loading", "rowHover", "customSort", "autoLayout", "exportFunction", "stateKey", "minBufferPx", "maxBufferPx"], outputs: ["selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i13.ReorderableRowHandle, selector: "[pReorderableRowHandle]", inputs: ["pReorderableRowHandle"] }, { kind: "directive", type: i13.ReorderableRow, selector: "[pReorderableRow]", inputs: ["pReorderableRow", "pReorderableRowDisabled"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i5$2.Checkbox, selector: "p-checkbox", inputs: ["checkboxIcon", "disabled", "value", "name", "binary", "label", "ariaLabelledBy", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "readonly", "required"], outputs: ["onChange"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]" }, { kind: "directive", type: i5$4.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "component", type: i19.InputSwitch, selector: "p-inputSwitch", inputs: ["disabled", "style", "styleClass", "tabindex", "inputId", "name", "readonly", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "component", type: i20.Slider, selector: "p-slider", inputs: ["min", "max", "orientation", "tabindex", "disabled", "animate", "step", "range", "style", "styleClass", "ariaLabelledBy"], outputs: ["onChange", "onSlideEnd"] }, { kind: "directive", type: i21.CurrencyMaskDirective, selector: "[currencyMask]", inputs: ["max", "min", "options"] }, { kind: "component", type: AutoCompletePickerComponent, selector: "autocomplete-picker", inputs: ["control", "groupKey", "valueInGroup", "disabled", "popupSize", "readOnlyValues"], outputs: ["onSelect", "onUnSelect", "onChanged", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: CheckBoxListComponent, selector: "check-box-list", inputs: ["styleClass", "control", "dataSource", "disabled"], outputs: ["onSelect", "onReady"] }, { kind: "component", type: CommonPickerComponent, selector: "common-picker", inputs: ["control", "extraData", "disabled", "groupKey", "valueInGroup"], outputs: ["onSelect", "onUnSelect", "onChanged", "onBlur"] }, { kind: "component", type: CoCauToChucPickerListComponent, selector: "cocautochuc-picker-list", inputs: ["control", "disabled", "readOnlyValues"], outputs: ["onChanged", "onSelect", "onUnSelect", "onClear", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: DatetimePickerComponent, selector: "datetime-picker", inputs: ["control", "disabled"], outputs: ["onSelect", "onChanged", "onFocus", "onBlur", "onClose"] }, { kind: "component", type: DatetimePickerRangeComponent, selector: "tn-datetime-picker-range", inputs: ["control", "disabled"], outputs: ["onClose", "onChanged"] }, { kind: "component", type: DropdownComponent, selector: "dropdown", inputs: ["showClear", "disableDisplayFieldServerSearch", "filter", "control", "defaultLabel", "appendTo", "dataSource", "value", "itemSelectedStyleClass"], outputs: ["onChanged", "onCollapse", "onExpand", "onDropdownClick", "onShow", "onShowSmartEvent", "onHide", "onHideSmartEvent", "onFocus", "onBlur", "onReady", "onDataSourceLoaded", "valueChange", "adjustValue"] }, { kind: "component", type: EntityPickerComponent, selector: "entity-picker", inputs: ["control", "disabled", "readOnly", "children"], outputs: ["onSelect", "onUnSelect", "onChanged"] }, { kind: "component", type: FileUploadComponent, selector: "file-upload", inputs: ["chooseLabel", "readonly", "accept", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageSummary", "invalidFileLimitMessageDetail", "sharedFolderType"], outputs: ["onSelect", "onRemove", "onChanged"] }, { kind: "component", type: MaskComponent, selector: "tn-mask", inputs: ["maskType", "placeholder", "disabled", "suffix", "prefix", "min", "max", "decimalPlaces", "viewMode", "inputStyleClass"], outputs: ["onFocus", "onBlur", "onChanged"] }, { kind: "component", type: NumberPickerRangeComponent, selector: "tn-number-picker-range", inputs: ["readonly", "maskType", "placeholder", "disabled", "suffix", "prefix", "min", "max", "decimalPlaces"], outputs: ["focus", "enterSmart", "enter", "blur", "change"] }, { kind: "component", type: RadioButtonListComponent, selector: "radio-button-list", inputs: ["control", "dataSource", "value", "disabled"], outputs: ["valueChange", "onChanged", "onDataSourceLoaded", "adjustValue", "onReady"] }, { kind: "component", type: ReferenceTextBoxComponent, selector: "reference-textbox", inputs: ["control", "value"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: TnColorPickerComponent, selector: "tn-color-picker", inputs: ["disabled", "appendTo"], outputs: ["change"] }, { kind: "component", type: TnCustomScrollbarComponent, selector: "tn-custom-scrollbar", inputs: ["style", "useDefaultScrollBar", "autoMode", "class", "config", "whiteBackGround", "showScrollHorizontal"], outputs: ["scrollY", "scrollUp", "scrollDown", "scrollLeft", "scrollRight", "scrollYReachEnd", "scrollYReachStart", "scrollXReachEnd", "scrollXReachStart"] }, { kind: "component", type: TnTinymceComponent, selector: "tn-tinymce", inputs: ["mode", "disabled", "required", "height", "field", "languageCode"], outputs: ["keydown", "onBlur", "onChanged"] }, { kind: "component", type: CoCauToChucPickerComponent, selector: "cocautochuc-picker", inputs: ["control", "autoDisplayFirst", "multiple", "required", "readonly", "limit", "filter", "isUsingId", "parentOrgId", "parentOrgCode", "showClear", "disabledParentItem", "rootParentId"], outputs: ["onChanged"] }, { kind: "component", type: UserPickerComponent, selector: "user-picker", inputs: ["control", "popupSize", "multiple", "disabled", "readOnlyValues"], outputs: ["onSelect", "onUnSelect", "onChanged", "onFocus", "onBlur", "onReady"] }, { kind: "component", type: AutocompleteDatasourceComponent, selector: "app-autocomplete-datasource", inputs: ["suggestions", "control"], outputs: ["onValueChanged"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
25354
25287
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: CrudFormComponent, decorators: [{
|
|
25355
25288
|
type: Component,
|
|
25356
25289
|
args: [{ selector: 'crud-form', providers: [ComponentContextService], template: "<div [class]=\"_styleClass\">\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\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 </div>\r\n </form>\r\n</div>\r\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [model]=\"buttonContexts\">\r\n</p-contextMenu>\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\" let-groupKey=\"groupKey\">\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 [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText\r\n [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\" [placeholder]=\"control.placeholder\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText [type]=\"control.dataFormat\"\r\n [(ngModel)]=\"data[control.field]\" [max]=\"control.max\" [min]=\"control.min\"\r\n [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=\"'reference-text'\">\r\n <reference-textbox [control]=\"control\" [value]=\"data[control.field]\"></reference-textbox>\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]\"\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 [attr.disabled]=\"checkDisabled(data, control) ? true : null\" pInputText type=\"tel\"\r\n [(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 </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]=\"checkDisabled(data, control) ? true : null\" type=\"tel\" pInputText\r\n [(ngModel)]=\"data[control.field]\"\r\n (change)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\" />\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'textarea'\">\r\n <textarea pInputTextarea [rows]=\"control.rows ? control.rows : 5\"\r\n [attr.disabled]=\"checkDisabled(data, control) ? true : null\" [(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 *ngIf=\"!checkDisabled(data, control)\" [(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\" [languageCode]=\"control.languageCode\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\">\r\n </tn-tinymce>\r\n <div *ngIf=\"checkDisabled(data, control)\" class=\"html-box\"\r\n [innerHTML]=\"data[control.field] ? (data[control.field] | safeHtml) : ''\">\r\n </div>\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormFileManagerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <file-manager [control]=\"control\" [serviceCode]=\"control.serviceCode\" [entity]=\"control.entity\"\r\n [entityKey]=\"control.entityKey ? control.entityKey : data[control.entityKeyField]\"\r\n [readonly]=\"control.disabled\" [layout]=\"control.layout\" [maxFileSize]=\"control.maxFileSize\"\r\n [inTaiLieu]=\"control.inTaiLieu\" [inTaiLieuChung]=\"control.inTaiLieuChung\"\r\n [copyToFolderId]=\"control.copyToFolderId\"\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]\" (onSelected)=\"control.onSelected($event)\"\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormServiceFileUploadComponent']; context: {\r\n $implicit: data, control: control, parentContext: context, parentPath: parentPath, \r\n checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\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 [readOnlyValues]=\"data[control.field + '_readOnly']\" [(ngModel)]=\"data[control.field]\"\r\n [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 <!-- <tn-checkbox [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onChange)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\"></tn-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]\" [disabled]=\"checkDisabled(data, control)\"\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormAddressComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\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\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(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\" [readOnlyValues]=\"data[control.field + '_readOnly']\"\r\n [(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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormVanBanPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\r\n <!-- <vanban-picker [control]=\"control\" [disabled]=\"checkDisabled(data, control)\"\r\n [required]=\"control.required\" [(ngModel)]=\"data[control.field]\" [readOnly]=\"control.readOnly\"\r\n [loaiVanBan]=\"control.loaiVanBan\"\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormCongViecPickerComponent']; context: {\r\n $implicit: data, control: control, parentPath: parentPath, checkDisabled: checkDisabled, handleFieldValueChange: handleFieldValueChange,\r\n handleControlReadyEvent: handleControlReadyEvent\r\n }\"></ng-container>\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=\"'percent'\">\r\n <div>\r\n <tn-mask [suffix]=\"'%'\" [placeholder]=\"control.placeholder\" [maskType]=\"'int'\" [min]=\"0\" [max]=\"100\"\r\n [disabled]=\"checkDisabled(data, control)\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </tn-mask>\r\n <p-slider [step]=\"1\" [min]=\"0\" [max]=\"100\" [disabled]=\"checkDisabled(data, control)\"\r\n [(ngModel)]=\"data[control.field]\"\r\n (onSlideEnd)=\"handleFieldValueChange(control, $event, 'change', data, parentPath)\">\r\n </p-slider>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'common-picker'\">\r\n <common-picker [control]=\"control\"\r\n [disabled]=\"control.disabled || (control.disableCheck && control.disableCheck(model))\"\r\n [groupKey]=\"groupKey\" [valueInGroup]=\"model[control.field]\" [(ngModel)]=\"data[control.field]\"\r\n (onChanged)=\"handleFieldValueChange(control, $event,'change', data, parentPath);\">\r\n </common-picker>\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 class=\"new-table scr-table table-control\" [value]=\"data[control.field]\"\r\n [columns]=\"control.headerTemplate\" [responsive]=\"true\" [scrollable]=\"false\"\r\n [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: 5%\">\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=\"text-align: center;\" [style.width]=\"subControl.width\">\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\" [style.width]=\"control.widthFunctionColumn\"\r\n class=\"table-function column-function\">\r\n <div class=\"cell-header-function\"><span>Ch\u1EE9c n\u0103ng</span></div>\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 class=\"stt\" style=\"text-align: center; vertical-align: inherit\">\r\n <span>\r\n {{ri + 1}}\r\n </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 [ngStyle]=\"{'text-align': getTextAlign(subControl.textAlign), 'vertical-align': 'inherit'}\">\r\n <span class=\"p-column-title\">{{subControl.label}}</span>\r\n <ng-template [ngIf]=\"getControlType(subControl) != 'column'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"customControl; context: getContextTd(subControl, rowData, ri, path)\">\r\n </ng-container>\r\n </ng-template>\r\n <ng-template [ngIf]=\"getControlType(subControl) == 'column'\">\r\n <span>{{_modelData[control.field][ri][subControl.field]}}</span>\r\n </ng-template>\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 *ngIf=\"control.showFunction\" style=\"text-align: center\"\r\n class=\"column-function text-center\">\r\n <div *ngIf=\"!control.rowButtonTemplate\"\r\n 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 p-button-rounded\"\r\n icon=\"pi pi-save\" [pTooltip]=\"'L\u01B0u' | translate\" tooltipPosition=\"top\"\r\n (click)=\"saveRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showEdit\" [disabled]=\"rowData._disableEdit\"\r\n type=\"button\" pButton class=\"p-button-text p-button-rounded\"\r\n icon=\"pi pi-pencil\" [pTooltip]=\"'S\u1EEDa' | translate\" tooltipPosition=\"top\"\r\n (click)=\"editRow(ri, control, path)\"></button>\r\n <button *ngIf=\"control.showDelete\" [disabled]=\"rowData._disableDelete\"\r\n type=\"button\" pButton\r\n class=\"p-button-text p-button-danger p-button-rounded\"\r\n icon=\"pi pi-trash\" [pTooltip]=\"'X\u00F3a' | translate\" tooltipPosition=\"top\"\r\n (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 </div>\r\n <div *ngIf=\"control.rowButtonTemplate\"\r\n class=\"p-toolbar-group-center button-group\">\r\n <ng-container\r\n *ngTemplateOutlet=\"control.rowButtonTemplate; context: {rowData: _modelData[control.field][ri], rowIndex: ri, path: path, control: control}\">\r\n </ng-container>\r\n </div>\r\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template *ngIf=\"control.summaryTemplate\" pTemplate=\"summary\" let-rowData>\r\n <ng-container *ngTemplateOutlet=\"control.summaryTemplate; context: {rowData: rowData}\">\r\n </ng-container>\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 *ngIf=\"control.showDialog\" 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)\" [ngTemplateOutletContext]=\"{\r\n crudForm: this, data: data, index: rowIndex, parentPath: parentPath, control: control, changeFunc: handleFieldValueChange\r\n }\">\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 <ng-container *ngTemplateOutlet=\"customTemplate['crudFormTableDetailForm']; context: {\r\n $implicit: tableFormSchema, parentSetting: setting, data: tableFormData, onSaved: handleSavedTableRow, onCancel: handleCancelEditTableRow,\r\n onInit: handleInitTableDetailForm\r\n }\"></ng-container>\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 <ng-template #footer>\r\n <ng-container *ngTemplateOutlet=\"tableFormFooterTemplate\"></ng-container>\r\n </ng-template>\r\n</tn-dialog>", styles: [".label-only{font-weight:700;margin-bottom:1em}div.label{position:relative}div.label .star-required{color:red;position:absolute;padding-left:.2em;padding-top:.3em}div.type-container.not-show-in-box-holder{padding:0}.--table-schema-footer{display:flex;align-items:center;font-weight:600;padding:.5em;border-width:0 1px 1px;background:#f8f9fa;color:#495057;border:1px solid #e9ecef}.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-weight:700;font-size:.85em}.view-mode>span:not(:empty){display:inline-block;width:100%;padding:5px 0}.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{font-size:1.2rem;font-weight:700;color:#025ba7;border-bottom:1px solid #cfcfcf;text-transform:uppercase;padding:5px;margin-bottom:5px}.crud-form-control.type-title>.label{margin-bottom:0}.control-description{font-size:.8rem;color:#6c757d;margin-bottom:5px;margin-left:10px}.cell-header-function{display:flex;align-items:center}.cell-header-function>span{text-align:center;flex:1 1}.cell-header-function button{width:24px;height:24px;padding:0;margin:0}::ng-deep .crud-form-control .tn-check-box-list{margin-top:5px}::ng-deep .crud-form-control>div.label{margin-bottom:5px;font-size:.9em;height:1.15em}::ng-deep .crud-form-control>div.label+*{width:100%}::ng-deep .crud-form-control>.error-container .error-item{overflow:visible;animation:shrink .1s;min-height:20px;padding-top:5px}::ng-deep .crud-form-control>.error-container .error-item .error-content{display:flex;position:relative;color:red;font-size:.9em;animation:fadeIn .1s}::ng-deep .crud-form-control>.error-container .error-item .error-content i{font-size:.9em;display:flex;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 select,::ng-deep .crud-form-control.error textarea,::ng-deep .crud-form-control.error input,::ng-deep .crud-form-control.error .p-inputtext,::ng-deep .crud-form-control.error .p-dropdown,::ng-deep .crud-form-control.error .p-multiselect,::ng-deep .crud-form-control.error .tn-dropdown{border-color:#ff5722!important}::ng-deep .crud-form-control.error .tn-dropdown:not(.p-disabled).p-focus,::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{box-shadow:0 0 0 .2rem #ffc4b3}::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,::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) .p-inputtext,::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-multiselect,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .tn-dropdown{border-color:#ced4da!important}::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,::ng-deep .crud-form-control.error div.crud-form-control:not(.error) .p-autocomplete-multiple-container:not(.p-disabled).p-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}}::ng-deep crud-form .crud-form-container{padding:.5rem .5rem 0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside{padding:0}::ng-deep crud-form .p-datatable .p-datatable-tbody tr td.control-inside .show-in-box:not(.crud-form-control){padding:0}::ng-deep crud-form base-congviec-form crud-form>.crud-form-container{padding:0}: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 #00000013}: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 #00000013,0 0 3px #66afe9;transition:box-shadow .3s,border-color .3s;transition-property:box-shadow,border-color;transition-duration:.3s,.3s;transition-timing-function:ease,ease;transition-delay:0s,0s}:host ::ng-deep .rq .tox .tox-edit-area{border-left-color:#ff4c46}.no-value{font-size:.8em}:host ::ng-deep .table-schema-paging{margin-bottom:40px;display:block}\n"] }]
|
|
@@ -27961,24 +27894,20 @@ class ArticleService extends BaseService {
|
|
|
27961
27894
|
return this.defaultGet(apiUrl);
|
|
27962
27895
|
}
|
|
27963
27896
|
createWithFormData(formData) {
|
|
27964
|
-
return this._http
|
|
27965
|
-
.post(`${this.serviceUri}/CreateWithFormData`, formData)
|
|
27966
|
-
.toPromise();
|
|
27897
|
+
return firstValueFrom(this._http
|
|
27898
|
+
.post(`${this.serviceUri}/CreateWithFormData`, formData));
|
|
27967
27899
|
}
|
|
27968
27900
|
updateWithFormData(id, formData) {
|
|
27969
|
-
return this._http
|
|
27970
|
-
.post(`${this.serviceUri}/UpdateWithFormData/${id}`, formData)
|
|
27971
|
-
.toPromise();
|
|
27901
|
+
return firstValueFrom(this._http
|
|
27902
|
+
.post(`${this.serviceUri}/UpdateWithFormData/${id}`, formData));
|
|
27972
27903
|
}
|
|
27973
27904
|
updateStatusItem(formData) {
|
|
27974
|
-
return this._http
|
|
27975
|
-
.post(`${this.serviceUri}/UpdateStatusItem`, formData)
|
|
27976
|
-
.toPromise();
|
|
27905
|
+
return firstValueFrom(this._http
|
|
27906
|
+
.post(`${this.serviceUri}/UpdateStatusItem`, formData));
|
|
27977
27907
|
}
|
|
27978
27908
|
updateStatusItemMultiple(formData) {
|
|
27979
|
-
return this._http
|
|
27980
|
-
.post(`${this.serviceUri}/UpdateStatusItemMultiple`, formData)
|
|
27981
|
-
.toPromise();
|
|
27909
|
+
return firstValueFrom(this._http
|
|
27910
|
+
.post(`${this.serviceUri}/UpdateStatusItemMultiple`, formData));
|
|
27982
27911
|
}
|
|
27983
27912
|
getArtileByStatus(statusView, key, offset, limit, sortField, isAsc = null, isIgnoreCache = false) {
|
|
27984
27913
|
let queryString = `/GetByFilterLanguage?statusView=${statusView}`;
|
|
@@ -29159,7 +29088,7 @@ class CongviecDinhkemService extends BaseService {
|
|
|
29159
29088
|
}
|
|
29160
29089
|
themDinhKemNghiepVu(taskId, data) {
|
|
29161
29090
|
const url = `${this.serviceUri}/ThemDinhKem/${taskId}`;
|
|
29162
|
-
return this._http.post(url, data)
|
|
29091
|
+
return firstValueFrom(this._http.post(url, data));
|
|
29163
29092
|
}
|
|
29164
29093
|
getDetailItem(serviceCode, entity, entityKey, fieldDisplay) {
|
|
29165
29094
|
const serviceCodeEndpoint = this._environmentService.getHttpServiceEndpointWithVersion(serviceCode);
|
|
@@ -29175,7 +29104,7 @@ class CongviecDinhkemService extends BaseService {
|
|
|
29175
29104
|
filters: [this.newFilter('id', Operator.equal, entityKey)],
|
|
29176
29105
|
sorts: []
|
|
29177
29106
|
});
|
|
29178
|
-
return this._http.post(uri, gridInfo)
|
|
29107
|
+
return firstValueFrom(this._http.post(uri, gridInfo));
|
|
29179
29108
|
}
|
|
29180
29109
|
getDetailItems(dicGrouped) {
|
|
29181
29110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -29211,7 +29140,7 @@ class CongviecDinhkemService extends BaseService {
|
|
|
29211
29140
|
sorts: []
|
|
29212
29141
|
});
|
|
29213
29142
|
try {
|
|
29214
|
-
const data = yield (this._http.post(uri, gridInfo)
|
|
29143
|
+
const data = yield (firstValueFrom(this._http.post(uri, gridInfo)));
|
|
29215
29144
|
if (data.success && data.data && data.data.length) {
|
|
29216
29145
|
data.data.forEach(itemDetail => {
|
|
29217
29146
|
result[serviceCode][entity][itemDetail.id] = itemDetail[dataByEntity.fieldHienThi];
|
|
@@ -29254,8 +29183,7 @@ class FolderService extends BaseService {
|
|
|
29254
29183
|
this.serviceUri = `${this.endPoint}/Folder`;
|
|
29255
29184
|
}
|
|
29256
29185
|
testGrpcTrace() {
|
|
29257
|
-
return this._http.get(`${this.endPoint}/TraceTest/TestGrpcTrace`)
|
|
29258
|
-
.toPromise();
|
|
29186
|
+
return firstValueFrom(this._http.get(`${this.endPoint}/TraceTest/TestGrpcTrace`));
|
|
29259
29187
|
}
|
|
29260
29188
|
copyMultipleFolder(idsFolder, targetFolderId) {
|
|
29261
29189
|
const url = `${this.serviceUri}/CopyMultipleFolder`;
|
|
@@ -29441,18 +29369,18 @@ class MyDriveService extends BaseService {
|
|
|
29441
29369
|
return Promise.reject({ status: 400 });
|
|
29442
29370
|
}
|
|
29443
29371
|
const svUrl = `${this._serviceUri}/File/GetFileExplorerById?fileId=${fileId}`;
|
|
29444
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29372
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29445
29373
|
}
|
|
29446
29374
|
getMyFiles() {
|
|
29447
29375
|
const svUrl = `${this._serviceUri}/File/GetMyFiles`;
|
|
29448
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29376
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29449
29377
|
}
|
|
29450
29378
|
getByFolderId(folderId) {
|
|
29451
29379
|
if (folderId == '00000000-0000-0000-0000-000000000000') {
|
|
29452
29380
|
return Promise.reject({ status: 400 });
|
|
29453
29381
|
}
|
|
29454
29382
|
const svUrl = `${this._serviceUri}/File?folderId=${folderId}`;
|
|
29455
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29383
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29456
29384
|
}
|
|
29457
29385
|
getMyShare(userId) {
|
|
29458
29386
|
if (userId < 0) {
|
|
@@ -29460,7 +29388,7 @@ class MyDriveService extends BaseService {
|
|
|
29460
29388
|
}
|
|
29461
29389
|
// const svUrl = `${this._serviceUri}/Folder/GetMyShare?userId=${userId}`;
|
|
29462
29390
|
const svUrl = `${this._serviceUri}/File/GetMyShare?userId=${userId}`;
|
|
29463
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29391
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29464
29392
|
}
|
|
29465
29393
|
getMyShareToOther(ownerId) {
|
|
29466
29394
|
if (ownerId < 0) {
|
|
@@ -29468,51 +29396,50 @@ class MyDriveService extends BaseService {
|
|
|
29468
29396
|
}
|
|
29469
29397
|
// const svUrl = `${this._serviceUri}/Folder/GetMyShareToOther?ownerId=${ownerId}`;
|
|
29470
29398
|
const svUrl = `${this._serviceUri}/File/GetMyShareToOther?ownerId=${ownerId}`;
|
|
29471
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29399
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29472
29400
|
}
|
|
29473
29401
|
getFolderTree(folderId) {
|
|
29474
29402
|
if (folderId == '00000000-0000-0000-0000-000000000000') {
|
|
29475
29403
|
return Promise.reject({ status: 400 });
|
|
29476
29404
|
}
|
|
29477
29405
|
const apiUrl = `${this._serviceUri}/File/GetTree?folderId=${folderId}`;
|
|
29478
|
-
return this._http.get(apiUrl)
|
|
29479
|
-
.pipe(catchError((err) => this.handleError(err)))
|
|
29480
|
-
.toPromise();
|
|
29406
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
29407
|
+
.pipe(catchError((err) => this.handleError(err))));
|
|
29481
29408
|
}
|
|
29482
29409
|
getShareToOtherByFolderId(folderId, objectId) {
|
|
29483
29410
|
if (folderId == '00000000-0000-0000-0000-000000000000') {
|
|
29484
29411
|
return Promise.reject({ status: 400 });
|
|
29485
29412
|
}
|
|
29486
29413
|
const svUrl = `${this._serviceUri}/File/GetFileExplorerShareToOther?folderId=${folderId}&objectId=${objectId}`;
|
|
29487
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29414
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29488
29415
|
}
|
|
29489
29416
|
createNewFolder(folder) {
|
|
29490
29417
|
const svUrl = `${this._serviceUri}/Folder`;
|
|
29491
|
-
return this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err)))
|
|
29418
|
+
return firstValueFrom(this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err))));
|
|
29492
29419
|
}
|
|
29493
29420
|
deleteFolder(folderId) {
|
|
29494
29421
|
const svUrl = `${this._serviceUri}/Folder/${folderId}`;
|
|
29495
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29422
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
29496
29423
|
}
|
|
29497
29424
|
deleteMultipleFolder(folderIds) {
|
|
29498
29425
|
const svUrl = `${this._serviceUri}/Folder/deleteMultipleFolder`;
|
|
29499
|
-
return this._http.post(svUrl, folderIds).pipe(catchError((err) => this.handleError(err)))
|
|
29426
|
+
return firstValueFrom(this._http.post(svUrl, folderIds).pipe(catchError((err) => this.handleError(err))));
|
|
29500
29427
|
}
|
|
29501
29428
|
renameFolder(folderId, newFolderName) {
|
|
29502
29429
|
const svUrl = `${this._serviceUri}/Folder/${folderId}/RenameFolder/${newFolderName}`;
|
|
29503
|
-
return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err)))
|
|
29430
|
+
return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
|
|
29504
29431
|
}
|
|
29505
29432
|
shareFolder(shareFolder) {
|
|
29506
29433
|
const svUrl = `${this._serviceUri}/Folder/ShareFolder`;
|
|
29507
|
-
return this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err)))
|
|
29434
|
+
return firstValueFrom(this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err))));
|
|
29508
29435
|
}
|
|
29509
29436
|
deleteShareFolder(folderId, objectId) {
|
|
29510
29437
|
const svUrl = `${this._serviceUri}/Folder/${folderId}/DeleteUserShareFolder/${objectId}`;
|
|
29511
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29438
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
29512
29439
|
}
|
|
29513
29440
|
deleteShareFolderToOther(folderId, ownerId) {
|
|
29514
29441
|
const svUrl = `${this._serviceUri}/Folder/${folderId}/DeleteShareFolder/${ownerId}`;
|
|
29515
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29442
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
29516
29443
|
}
|
|
29517
29444
|
getUploadUrl() {
|
|
29518
29445
|
return `${this._serviceUri}/File`;
|
|
@@ -29522,7 +29449,7 @@ class MyDriveService extends BaseService {
|
|
|
29522
29449
|
}
|
|
29523
29450
|
getFile(fileId) {
|
|
29524
29451
|
const svUrl = `${this._serviceUri}/File/${fileId}`;
|
|
29525
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29452
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29526
29453
|
}
|
|
29527
29454
|
getFileVersionDownloadUrl(fileVersionId) {
|
|
29528
29455
|
return `${this._serviceUri}/FileVersion/${fileVersionId}/download`;
|
|
@@ -29535,7 +29462,7 @@ class MyDriveService extends BaseService {
|
|
|
29535
29462
|
if (model.isFileVersion && !model.fileVersionId) {
|
|
29536
29463
|
model.fileVersionId = model.fileId;
|
|
29537
29464
|
}
|
|
29538
|
-
return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err)))
|
|
29465
|
+
return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
|
|
29539
29466
|
}
|
|
29540
29467
|
downloadFile(fileId, isFileVersion = false) {
|
|
29541
29468
|
const model = new GenerateLinkDownloadDTO();
|
|
@@ -29548,63 +29475,63 @@ class MyDriveService extends BaseService {
|
|
|
29548
29475
|
}
|
|
29549
29476
|
generateLinkDownloadMultiple(model) {
|
|
29550
29477
|
const svUrl = `${this._serviceUri}/Download/GenerateDownloadMultipleLink`;
|
|
29551
|
-
return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err)))
|
|
29478
|
+
return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
|
|
29552
29479
|
}
|
|
29553
29480
|
getBinaryFile(linkDownload) {
|
|
29554
|
-
return this._http.get(linkDownload)
|
|
29481
|
+
return firstValueFrom(this._http.get(linkDownload));
|
|
29555
29482
|
}
|
|
29556
29483
|
setMoveFileItem(moveFile) {
|
|
29557
29484
|
const svUrl = `${this._serviceUri}/File/MoveFile`;
|
|
29558
|
-
return this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err)))
|
|
29485
|
+
return firstValueFrom(this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err))));
|
|
29559
29486
|
}
|
|
29560
29487
|
deleteFile(fileId) {
|
|
29561
29488
|
const svUrl = `${this._serviceUri}/File/${fileId}`;
|
|
29562
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29489
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
29563
29490
|
}
|
|
29564
29491
|
deleteMultipleFile(fileIds) {
|
|
29565
29492
|
const svUrl = `${this._serviceUri}/File/deleteMultipleFile`;
|
|
29566
|
-
return this._http.post(svUrl, fileIds).pipe(catchError((err) => this.handleError(err)))
|
|
29493
|
+
return firstValueFrom(this._http.post(svUrl, fileIds).pipe(catchError((err) => this.handleError(err))));
|
|
29567
29494
|
}
|
|
29568
29495
|
deleteFileVersion(fileVersionId) {
|
|
29569
29496
|
const svUrl = `${this._serviceUri}/FileVersion/${fileVersionId}`;
|
|
29570
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29497
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
29571
29498
|
}
|
|
29572
29499
|
renameFile(fileId, newFileName) {
|
|
29573
29500
|
const svUrl = `${this._serviceUri}/File/${fileId}/RenameFile/${newFileName}`;
|
|
29574
|
-
return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err)))
|
|
29501
|
+
return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
|
|
29575
29502
|
}
|
|
29576
29503
|
shareFile(shareFile) {
|
|
29577
29504
|
const svUrl = `${this._serviceUri}/File/ShareFile`;
|
|
29578
|
-
return this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err)))
|
|
29505
|
+
return firstValueFrom(this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err))));
|
|
29579
29506
|
}
|
|
29580
29507
|
deleteShareFile(fileId, objectId) {
|
|
29581
29508
|
const svUrl = `${this._serviceUri}/File/${fileId}/DeleteUserShareFile/${objectId}`;
|
|
29582
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29509
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
29583
29510
|
}
|
|
29584
29511
|
deleteShareFileToOther(fileId, ownerId) {
|
|
29585
29512
|
const svUrl = `${this._serviceUri}/File/${fileId}/DeleteShareFile/${ownerId}`;
|
|
29586
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29513
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
29587
29514
|
}
|
|
29588
29515
|
getSharedFiles(folderId) {
|
|
29589
29516
|
let svUrl = `${this._serviceUri}/File/GetMySharedFiles`;
|
|
29590
29517
|
if (folderId) {
|
|
29591
29518
|
svUrl = `${svUrl}?folderId=${folderId}`;
|
|
29592
29519
|
}
|
|
29593
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29520
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29594
29521
|
}
|
|
29595
29522
|
getUserSharingByFile(fileId) {
|
|
29596
29523
|
let svUrl = `${this._serviceUri}/File/GetUserSharingByFile`;
|
|
29597
29524
|
if (fileId) {
|
|
29598
29525
|
svUrl = `${svUrl}?fileId=${fileId}`;
|
|
29599
29526
|
}
|
|
29600
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29527
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29601
29528
|
}
|
|
29602
29529
|
getFolderId(userId) {
|
|
29603
29530
|
let svUrl = `${this._serviceUri}/Folder/GetFolderId`;
|
|
29604
29531
|
if (userId) {
|
|
29605
29532
|
svUrl = `${svUrl}?userId=${userId}`;
|
|
29606
29533
|
}
|
|
29607
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29534
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29608
29535
|
}
|
|
29609
29536
|
isSupportedViewOnline(fileName) {
|
|
29610
29537
|
// file không có đuổi -> loại
|
|
@@ -29655,7 +29582,7 @@ class MyDriveService extends BaseService {
|
|
|
29655
29582
|
'title': fileName,
|
|
29656
29583
|
'url': downloadUrl
|
|
29657
29584
|
};
|
|
29658
|
-
this._http.post(service, input)
|
|
29585
|
+
firstValueFrom(this._http.post(service, input)).then((rsConvert) => {
|
|
29659
29586
|
resolve(rsConvert.fileUrl);
|
|
29660
29587
|
}, err => {
|
|
29661
29588
|
reject(null);
|
|
@@ -29666,7 +29593,7 @@ class MyDriveService extends BaseService {
|
|
|
29666
29593
|
});
|
|
29667
29594
|
}
|
|
29668
29595
|
print(fileUrl) {
|
|
29669
|
-
// this._http.get(fileUrl)
|
|
29596
|
+
// firstValueFrom(this._http.get(fileUrl)).then((rs: any) => {
|
|
29670
29597
|
// const pdfBlob = new Blob([rs], { type: "application/pdf" });
|
|
29671
29598
|
// const url = URL.createObjectURL(pdfBlob);
|
|
29672
29599
|
// printJS(url);
|
|
@@ -29763,7 +29690,7 @@ class TnClientService {
|
|
|
29763
29690
|
if (connetionState) {
|
|
29764
29691
|
// send command
|
|
29765
29692
|
command.sourceConnectionId = this._connection.id;
|
|
29766
|
-
const status = yield this._connection.status
|
|
29693
|
+
const status = yield firstValueFrom(this._connection.status);
|
|
29767
29694
|
console.log('status connection signalr', status);
|
|
29768
29695
|
this._connection.invoke('SendCommand', command);
|
|
29769
29696
|
resolve();
|
|
@@ -29808,7 +29735,7 @@ class FileVersionService extends BaseService {
|
|
|
29808
29735
|
}
|
|
29809
29736
|
getListFileVersions(fileId) {
|
|
29810
29737
|
const svUrl = `${this.serviceUri}/GetFileVersionsByFileId/${fileId}`;
|
|
29811
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29738
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29812
29739
|
}
|
|
29813
29740
|
createNewMinorVersion(fileInstanceId, fileVersionInstanceId, isFileVersion) {
|
|
29814
29741
|
const svUrl = `${this.serviceUri}/CreateNewMinorVersion`;
|
|
@@ -29835,7 +29762,7 @@ class FileVersionService extends BaseService {
|
|
|
29835
29762
|
}
|
|
29836
29763
|
getNextMajorVersion(fileId) {
|
|
29837
29764
|
const svUrl = `${this.serviceUri}/GetNextMajorVersion/${fileId}`;
|
|
29838
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29765
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29839
29766
|
}
|
|
29840
29767
|
setVersionToMajor(fileVersionInstanceId) {
|
|
29841
29768
|
const svUrl = `${this.serviceUri}/SetVersionToMajor`;
|
|
@@ -29844,7 +29771,7 @@ class FileVersionService extends BaseService {
|
|
|
29844
29771
|
}
|
|
29845
29772
|
deleteFileVersion(fileVersionId) {
|
|
29846
29773
|
const svUrl = `${this.serviceUri}/Delete/${fileVersionId}`;
|
|
29847
|
-
return this._http.delete(svUrl)
|
|
29774
|
+
return firstValueFrom(this._http.delete(svUrl));
|
|
29848
29775
|
}
|
|
29849
29776
|
handleError(error) {
|
|
29850
29777
|
if (error.status === 401) {
|
|
@@ -29875,72 +29802,71 @@ class FileExplorerNewService extends BaseService {
|
|
|
29875
29802
|
}
|
|
29876
29803
|
getMyFiles() {
|
|
29877
29804
|
const svUrl = `${this._serviceUri}/File/GetMyFiles`;
|
|
29878
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29805
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29879
29806
|
}
|
|
29880
29807
|
getByFolderId(folderId) {
|
|
29881
29808
|
if (folderId == '00000000-0000-0000-0000-000000000000') {
|
|
29882
29809
|
return Promise.reject({ status: 400 });
|
|
29883
29810
|
}
|
|
29884
29811
|
const svUrl = `${this._serviceUri}/File?folderId=${folderId}`;
|
|
29885
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29812
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29886
29813
|
}
|
|
29887
29814
|
getMyDrive(folderId) {
|
|
29888
29815
|
if (folderId == '00000000-0000-0000-0000-000000000000') {
|
|
29889
29816
|
return Promise.reject({ status: 400 });
|
|
29890
29817
|
}
|
|
29891
29818
|
const svUrl = `${this._serviceUri}/File/GetMyDrive?folderId=${folderId}`;
|
|
29892
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29819
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29893
29820
|
}
|
|
29894
29821
|
getMyShare(userId) {
|
|
29895
29822
|
if (userId < 0) {
|
|
29896
29823
|
return Promise.reject({ status: 400 });
|
|
29897
29824
|
}
|
|
29898
29825
|
const svUrl = `${this._serviceUri}/Folder/GetMyShare?userId=${userId}`;
|
|
29899
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29826
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29900
29827
|
}
|
|
29901
29828
|
getMyShareToOther(ownerId) {
|
|
29902
29829
|
if (ownerId < 0) {
|
|
29903
29830
|
return Promise.reject({ status: 400 });
|
|
29904
29831
|
}
|
|
29905
29832
|
const svUrl = `${this._serviceUri}/Folder/GetMyShareToOther?ownerId=${ownerId}`;
|
|
29906
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29833
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29907
29834
|
}
|
|
29908
29835
|
getFolderTree(folderId) {
|
|
29909
29836
|
if (folderId == '00000000-0000-0000-0000-000000000000') {
|
|
29910
29837
|
return Promise.reject({ status: 400 });
|
|
29911
29838
|
}
|
|
29912
29839
|
const apiUrl = `${this._serviceUri}/File/GetTree?folderId=${folderId}`;
|
|
29913
|
-
return this._http.get(apiUrl)
|
|
29914
|
-
.pipe(catchError((err) => this.handleError(err)))
|
|
29915
|
-
.toPromise();
|
|
29840
|
+
return firstValueFrom(this._http.get(apiUrl)
|
|
29841
|
+
.pipe(catchError((err) => this.handleError(err))));
|
|
29916
29842
|
}
|
|
29917
29843
|
copyFile(copyFileDto) {
|
|
29918
29844
|
const svUrl = `${this._serviceUri}/File/CopyFile`;
|
|
29919
|
-
return this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err)))
|
|
29845
|
+
return firstValueFrom(this._http.post(svUrl, copyFileDto).pipe(catchError((err) => this.handleError(err))));
|
|
29920
29846
|
}
|
|
29921
29847
|
createNewFolder(folder) {
|
|
29922
29848
|
const svUrl = `${this._serviceUri}/Folder`;
|
|
29923
|
-
return this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err)))
|
|
29849
|
+
return firstValueFrom(this._http.post(svUrl, folder).pipe(catchError((err) => this.handleError(err))));
|
|
29924
29850
|
}
|
|
29925
29851
|
deleteFolder(folderId) {
|
|
29926
29852
|
const svUrl = `${this._serviceUri}/Folder/${folderId}`;
|
|
29927
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29853
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
29928
29854
|
}
|
|
29929
29855
|
deleteMultipleFolder(folderIds) {
|
|
29930
29856
|
const svUrl = `${this._serviceUri}/Folder/deleteMultipleFolder/${folderIds}`;
|
|
29931
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29857
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
29932
29858
|
}
|
|
29933
29859
|
renameFolder(folderId, newFolderName) {
|
|
29934
29860
|
const svUrl = `${this._serviceUri}/Folder/${folderId}/RenameFolder/${newFolderName}`;
|
|
29935
|
-
return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err)))
|
|
29861
|
+
return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
|
|
29936
29862
|
}
|
|
29937
29863
|
shareFolder(shareFolder) {
|
|
29938
29864
|
const svUrl = `${this._serviceUri}/Folder/ShareFolder`;
|
|
29939
|
-
return this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err)))
|
|
29865
|
+
return firstValueFrom(this._http.post(svUrl, shareFolder).pipe(catchError((err) => this.handleError(err))));
|
|
29940
29866
|
}
|
|
29941
29867
|
deleteShareFolder(folderId, objectId) {
|
|
29942
29868
|
const svUrl = `${this._serviceUri}/Folder/${folderId}/DeleteShareFolder/${objectId}`;
|
|
29943
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29869
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
29944
29870
|
}
|
|
29945
29871
|
getUploadUrl() {
|
|
29946
29872
|
return `${this._serviceUri}/File`;
|
|
@@ -29950,7 +29876,7 @@ class FileExplorerNewService extends BaseService {
|
|
|
29950
29876
|
}
|
|
29951
29877
|
getBinaryFileByFileId(fileId) {
|
|
29952
29878
|
return new Promise((resolve, reject) => {
|
|
29953
|
-
this._http.get(this.getFileDownloadUrl(fileId))
|
|
29879
|
+
firstValueFrom(this._http.get(this.getFileDownloadUrl(fileId))).then(rs => {
|
|
29954
29880
|
console.log(rs);
|
|
29955
29881
|
resolve(null);
|
|
29956
29882
|
}).catch(err => reject(err));
|
|
@@ -29961,7 +29887,7 @@ class FileExplorerNewService extends BaseService {
|
|
|
29961
29887
|
}
|
|
29962
29888
|
getFile(fileId) {
|
|
29963
29889
|
const svUrl = `${this._serviceUri}/File/${fileId}`;
|
|
29964
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29890
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
29965
29891
|
}
|
|
29966
29892
|
getFileVersionDownloadUrl(fileVersionId) {
|
|
29967
29893
|
return `${this._serviceUri}/FileVersion/${fileVersionId}/download`;
|
|
@@ -29974,7 +29900,7 @@ class FileExplorerNewService extends BaseService {
|
|
|
29974
29900
|
if (model.isFileVersion && !model.fileVersionId) {
|
|
29975
29901
|
model.fileVersionId = model.fileId;
|
|
29976
29902
|
}
|
|
29977
|
-
return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err)))
|
|
29903
|
+
return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
|
|
29978
29904
|
}
|
|
29979
29905
|
downloadFile(fileId, isFileVersion = false) {
|
|
29980
29906
|
const model = new GenerateLinkDownloadDTO();
|
|
@@ -29987,59 +29913,59 @@ class FileExplorerNewService extends BaseService {
|
|
|
29987
29913
|
}
|
|
29988
29914
|
generateLinkDownloadMultiple(model) {
|
|
29989
29915
|
const svUrl = `${this._serviceUri}/Download/GenerateDownloadMultipleLink`;
|
|
29990
|
-
return this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err)))
|
|
29916
|
+
return firstValueFrom(this._http.post(svUrl, model).pipe(catchError((err) => this.handleError(err))));
|
|
29991
29917
|
}
|
|
29992
29918
|
getBinaryFile(linkDownload) {
|
|
29993
|
-
return this._http.get(linkDownload)
|
|
29919
|
+
return firstValueFrom(this._http.get(linkDownload));
|
|
29994
29920
|
}
|
|
29995
29921
|
setMoveFileItem(moveFile) {
|
|
29996
29922
|
const svUrl = `${this._serviceUri}/File/MoveFile`;
|
|
29997
|
-
return this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err)))
|
|
29923
|
+
return firstValueFrom(this._http.post(svUrl, moveFile).pipe(catchError((err) => this.handleError(err))));
|
|
29998
29924
|
}
|
|
29999
29925
|
deleteFile(fileId) {
|
|
30000
29926
|
const svUrl = `${this._serviceUri}/File/${fileId}`;
|
|
30001
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29927
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
30002
29928
|
}
|
|
30003
29929
|
deleteMultipleFile(fileIds) {
|
|
30004
29930
|
const svUrl = `${this._serviceUri}/File/deleteMultipleFile/${fileIds}`;
|
|
30005
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29931
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
30006
29932
|
}
|
|
30007
29933
|
deleteFileVersion(fileVersionId) {
|
|
30008
29934
|
const svUrl = `${this._serviceUri}/FileVersion/${fileVersionId}`;
|
|
30009
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29935
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
30010
29936
|
}
|
|
30011
29937
|
renameFile(fileId, newFileName) {
|
|
30012
29938
|
const svUrl = `${this._serviceUri}/File/${fileId}/RenameFile/${newFileName}`;
|
|
30013
|
-
return this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err)))
|
|
29939
|
+
return firstValueFrom(this._http.patch(svUrl, {}).pipe(catchError((err) => this.handleError(err))));
|
|
30014
29940
|
}
|
|
30015
29941
|
shareFile(shareFile) {
|
|
30016
29942
|
const svUrl = `${this._serviceUri}/File/ShareFile`;
|
|
30017
|
-
return this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err)))
|
|
29943
|
+
return firstValueFrom(this._http.post(svUrl, shareFile).pipe(catchError((err) => this.handleError(err))));
|
|
30018
29944
|
}
|
|
30019
29945
|
deleteShareFile(fileId, objectId) {
|
|
30020
29946
|
const svUrl = `${this._serviceUri}/File/${fileId}/DeleteShareFile/${objectId}`;
|
|
30021
|
-
return this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err)))
|
|
29947
|
+
return firstValueFrom(this._http.delete(svUrl).pipe(catchError((err) => this.handleError(err))));
|
|
30022
29948
|
}
|
|
30023
29949
|
getSharedFiles(folderId) {
|
|
30024
29950
|
let svUrl = `${this._serviceUri}/File/GetMySharedFiles`;
|
|
30025
29951
|
if (folderId) {
|
|
30026
29952
|
svUrl = `${svUrl}?folderId=${folderId}`;
|
|
30027
29953
|
}
|
|
30028
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29954
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
30029
29955
|
}
|
|
30030
29956
|
getUserSharingByFile(fileId) {
|
|
30031
29957
|
let svUrl = `${this._serviceUri}/File/GetUserSharingByFile`;
|
|
30032
29958
|
if (fileId) {
|
|
30033
29959
|
svUrl = `${svUrl}?fileId=${fileId}`;
|
|
30034
29960
|
}
|
|
30035
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29961
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
30036
29962
|
}
|
|
30037
29963
|
getFolderId(userId) {
|
|
30038
29964
|
let svUrl = `${this._serviceUri}/Folder/GetFolderId`;
|
|
30039
29965
|
if (userId) {
|
|
30040
29966
|
svUrl = `${svUrl}?userId=${userId}`;
|
|
30041
29967
|
}
|
|
30042
|
-
return this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err)))
|
|
29968
|
+
return firstValueFrom(this._http.get(svUrl).pipe(shareReplay(this.REPLAY_COUNT), retry(this.RETRY_COUNT), catchError((err) => this.handleError(err))));
|
|
30043
29969
|
}
|
|
30044
29970
|
isSupportedViewOnline(fileName) {
|
|
30045
29971
|
// file không có đuổi -> loại
|
|
@@ -30090,7 +30016,7 @@ class FileExplorerNewService extends BaseService {
|
|
|
30090
30016
|
'title': fileName,
|
|
30091
30017
|
'url': downloadUrl
|
|
30092
30018
|
};
|
|
30093
|
-
this._http.post(service, input)
|
|
30019
|
+
firstValueFrom(this._http.post(service, input)).then((rsConvert) => {
|
|
30094
30020
|
resolve(rsConvert.fileUrl);
|
|
30095
30021
|
}, err => {
|
|
30096
30022
|
reject(null);
|
|
@@ -30121,19 +30047,19 @@ class FileExplorerNewService extends BaseService {
|
|
|
30121
30047
|
return fileExtArr[fileExtArr.length - 1].toLowerCase() === 'pdf';
|
|
30122
30048
|
}
|
|
30123
30049
|
saveSignedFile(data) {
|
|
30124
|
-
return this._http.post(`${this._serviceUri}/Signature/SaveSignedFile`, data)
|
|
30050
|
+
return firstValueFrom(this._http.post(`${this._serviceUri}/Signature/SaveSignedFile`, data));
|
|
30125
30051
|
}
|
|
30126
30052
|
getSignatureInfoByFileId(fileId) {
|
|
30127
|
-
return this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileId?fileId=${fileId}`)
|
|
30053
|
+
return firstValueFrom(this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileId?fileId=${fileId}`));
|
|
30128
30054
|
}
|
|
30129
30055
|
getSignatureInfoByFileVersionId(fileVersionId) {
|
|
30130
|
-
return this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileVersionId?fileVersionId=${fileVersionId}`)
|
|
30056
|
+
return firstValueFrom(this._http.get(`${this._serviceUri}/Signature/GetListSignatureByFileVersionId?fileVersionId=${fileVersionId}`));
|
|
30131
30057
|
}
|
|
30132
30058
|
getImageFileBase64(fileId, extension = 'jpg', width = 0, height = 0) {
|
|
30133
30059
|
return new Promise((resolve, reject) => {
|
|
30134
30060
|
const url = `${this._serviceUri}/File/getImageFileBase64?fileId=${fileId}&extension=${extension}&width=${width}&height=${height}`;
|
|
30135
|
-
this._http.get(url, { responseType: 'blob' })
|
|
30136
|
-
.
|
|
30061
|
+
firstValueFrom(this._http.get(url, { responseType: 'blob' }))
|
|
30062
|
+
.then(rs => {
|
|
30137
30063
|
const reader = new FileReader();
|
|
30138
30064
|
reader.addEventListener('load', () => {
|
|
30139
30065
|
resolve(reader.result);
|
|
@@ -30151,9 +30077,8 @@ class FileExplorerNewService extends BaseService {
|
|
|
30151
30077
|
}
|
|
30152
30078
|
getServiceFileExplorer(model) {
|
|
30153
30079
|
const svUrl = `${this._serviceUri}/File/GetServiceFileExplorer?service=${model.service}&entity=${model.entity}&entityInstanceId=${model.entityInstanceId}`;
|
|
30154
|
-
return this._http.get(svUrl)
|
|
30155
|
-
.pipe(catchError((err) => this.handleError(err)))
|
|
30156
|
-
.toPromise();
|
|
30080
|
+
return firstValueFrom(this._http.get(svUrl)
|
|
30081
|
+
.pipe(catchError((err) => this.handleError(err))));
|
|
30157
30082
|
}
|
|
30158
30083
|
}
|
|
30159
30084
|
FileExplorerNewService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileExplorerNewService, deps: [{ token: i1$1.HttpClient }, { token: i0.Injector }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -30521,7 +30446,7 @@ class FileViewerComponent extends ComponentBase {
|
|
|
30521
30446
|
|| event.target.classList.contains('iv-image-view')) {
|
|
30522
30447
|
this.model.activeTopbarItem = false;
|
|
30523
30448
|
this.show = false;
|
|
30524
|
-
this.onClose.next();
|
|
30449
|
+
this.onClose.next(1);
|
|
30525
30450
|
}
|
|
30526
30451
|
}
|
|
30527
30452
|
print() {
|
|
@@ -30627,7 +30552,7 @@ class FileViewerComponent extends ComponentBase {
|
|
|
30627
30552
|
}
|
|
30628
30553
|
}
|
|
30629
30554
|
FileViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileViewerComponent, deps: [{ token: EnvironmentService }, { token: i0.ElementRef }, { token: AuthenService }, { token: FileExplorerService }, { token: i2.MessageService }, { token: i1.TranslateService }, { token: NotifierService }, { token: i2.ConfirmationService }, { token: TnClientService }, { token: FileVersionService }, { token: CustomRouterService }, { token: i1$3.DeviceDetectorService }, { token: FileObjectService }, { token: DownloadLinkService }, { token: FolderService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
30630
|
-
FileViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: FileViewerComponent, selector: "file-viewer", inputs: { model: "model", readonly: "readonly", showPrint: "showPrint", showDownload: "showDownload", showDelete: "showDelete" }, outputs: { onClose: "onClose", onRename: "onRename", onDelete: "onDelete" }, providers: [ComponentContextService], viewQueries: [{ propertyName: "sidebar", first: true, predicate: ["sidebar"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<p-sidebar #sidebar [showCloseIcon]=\"false\" [fullScreen]=\"true\" [appendTo]=\"'body'\"\r\n [styleClass]=\"getStyleClassByDocumentType(data.fileType)\" [(visible)]=\"show\">\r\n <ng-container *ngIf=\"data.fileType == fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\" style=\"margin: 0px auto;\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <!-- UD-2450 - TuDN -->\r\n <!-- <a *ngIf=\"_deviceDetectorService.isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\"\r\n tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a> -->\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <!-- End UD-2450 - TuDN -->\r\n <a *ngIf=\"!_deviceDetectorService.isDesktop() && !readonly\" pTooltip=\"\u0110\u1ED5i t\u00EAn\"\r\n tooltipPosition=\"bottom\" (click)=\"renameFile()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\"><i\r\n class=\"fas fa-eraser\"></i></a>\r\n <a *ngIf=\"showDelete && !readonly\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"far fa-trash-alt\"></i></a>\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\"\r\n *ngIf=\"!readonly && _deviceDetectorService.isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\"> <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"_deviceDetectorService.isDesktop()\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\"><i class=\"fas fa-pen-square\"></i>S\u1EEDa\r\n file\r\n tr\u1EF1c\r\n tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"far fa-trash-alt\"></i>X\u00F3a\r\n t\u1EC7p\r\n tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n </div>\r\n <ngx-extended-pdf-viewer [src]=\"model.fileUrl\" useBrowserLocale=\"true\" height=\"calc(100vh - 50px)\"\r\n [enablePinchOnMobile]=\"true\" [filenameForDownload]=\"data.fileName\" [language]=\"'vi-VN'\"\r\n [showBookmarkButton]=\"false\" [showHandToolButton]=\"false\" [showOpenFileButton]=\"false\"\r\n [showUnverifiedSignatures]=\"true\">\r\n </ngx-extended-pdf-viewer>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"data.fileType != fileTypes.IMAGE && data.fileType != fileTypes.VIDEO && data.fileType != fileTypes.AUDIO && data.fileType != fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\" tooltipPosition=\"bottom\"\r\n placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a>\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!readonly && showDelete && isDesktop()\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a *ngIf=\"!readonly && isDesktop()\" pTooltip=\"S\u1EEDa file tr\u1EF1c tuy\u1EBFn\" (click)=\"editFile()\"\r\n placeholder=\"Bottom\" class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\">\r\n <i class=\"fas fa-pen-square\"></i></a>\r\n\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\" *ngIf=\"!isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\">\r\n <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\">\r\n <i class=\"fas fa-pen-square\"></i>S\u1EEDa file tr\u1EF1c tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly && showDelete\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"pi pi-trash\"></i>X\u00F3a\r\n t\u1EC7p tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n [class.view-file-text]=\"isFileType(fileTypes.TEXT)\"\r\n [class.view-file-spreadsheet]=\"isFileType(fileTypes.SPREADSHEET)\"\r\n [class.view-file-presentation]=\"isFileType(fileTypes.PRESENTATION)\">\r\n <div id=\"file-viewer\"></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.IMAGE && model.images.length > 0\">\r\n <div class=\"image-container\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <img *ngIf=\"model.images && model.images.length\" src=\"{{model.images[0]}}\" alt=\"Ch\u01B0a c\u00F3 \u1EA3nh\">\r\n </div>\r\n <!-- <app-image-viewer [showPDFOnlyLabel]=\"false\" [showPDFOnlyOption]=\"false\" [fullscreen]=\"false\"\r\n [images]=\"model.images\" [primaryColor]=\"'#3192e1'\" [idContainer]=\"'image-view-list'\"\r\n (mousedown)=\"closeSidebar($event)\" id=\"fileViewerHolder\" [loadOnInit]=\"true\">\r\n </app-image-viewer>\r\n <a style=\"color: white;\" (click)=\"closeSidebar(null)\" class=\"mobile-image-viewer-close\">\r\n <i class=\"far fa-times-circle\"></i></a> -->\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.VIDEO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i>\r\n </a>\r\n <a *ngIf=\"!isReadonly && !isDesktop()\" (click)=\"renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n <a *ngIf=\"!readonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n style=\"width: 80%; margin: auto; height: 100%; border-radius: 0px;\">\r\n <video width=\"100%\" height=\"100%\" style=\"margin-top: 50px;\" autoplay controls src=\"{{model.fileUrl}}\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 m\u1EDF video.\r\n </video>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.AUDIO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" (mousedown)=\"closeSidebar($event)\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!isReadonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n <audio controls autoplay src=\"{{model.fileUrl}}\"\r\n style=\"margin: auto;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 ph\u00E1t audio. </audio>\r\n </div>\r\n </ng-container>\r\n\r\n</p-sidebar>\r\n\r\n<tn-dialog *ngIf=\"renameFileForm.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"renameFileForm.header | translate\" [popupSize]=\"renameFileForm.popupSize\" (onHide)=\"onCancelRenameFile()\">\r\n <file-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"renameFileForm.formData\"\r\n (onSaved)=\"onSavedRenameFile()\" (onCancel)=\"onCancelRenameFile()\">\r\n </file-form>\r\n</tn-dialog>", styles: ["::ng-deep .pdf-container ngx-extended-pdf-viewer #outerContainer{top:51px}.view-file{height:92vh}.dialog-material{display:block;border-radius:4px;box-sizing:border-box;overflow:hidden;outline:0;min-height:inherit;max-height:inherit;width:50vw}.dialog-material{width:100%}.dialog-material.view-file-text{width:85%;margin:0 auto}.dialog-material.view-file-text.mobile{width:100%;margin:0 auto}.header-dialog-material{display:flex;flex-direction:row;justify-content:space-between;padding:5px 15px;box-sizing:border-box;outline:0;height:50px;line-height:50px;background:#3192e1;position:absolute;pointer-events:auto;left:0;right:0;top:0;width:auto}.header-dialog-material .flex-item{line-height:40px}.header-dialog-material .flex-item .cursor-pointer{cursor:pointer;display:inline-block;padding:0 15px}.header-dialog-material .flex-item .cursor-pointer.submenu{position:relative}.header-dialog-material .flex-item .cursor-pointer.submenu ul{display:flex;position:absolute;top:25px;right:0px;align-content:flex-end;flex-direction:column;width:230px;border-radius:2px;padding:5px 0;background:#fff;box-shadow:0 6px 12px #0000002d;z-index:1}.header-dialog-material .flex-item .cursor-pointer.submenu ul li{padding:0}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a{padding:0 0 0 5px;line-height:40px}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a:hover{background:#f5f5f5}.header-dialog-material ul:before{top:-8px;right:8px;left:auto;width:0px;height:0px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:10px solid #ffffff;content:\" \";position:absolute}.mat-dialog-content{display:block;margin:0;padding:0;max-height:100vh;max-width:50vw;overflow:auto;-webkit-overflow-scrolling:touch}::ng-deep .cdk-overlay-container{position:fixed;z-index:1000;background:rgba(0,0,0,.7)!important}::ng-deep .cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}::ng-deep .mat-dialog-container{display:block;padding:0!important}::ng-deep .cdk-overlay-pane{max-height:100%}.button-link:hover{transition:background-color .1s,opacity .1s;background-image:none;background-color:#ffffff40}.file-row-action i{margin-right:5px;width:40px;text-align:center}.file-row-action{line-height:34px;width:100%;display:block;color:#212529}.layout-menu li a{border:none;text-align:left}.layout-menu li a i:first-child{color:#666;font-size:1em}.footer-page{position:absolute;left:50%;margin-right:-50%;transform:translate(-50%);border-radius:3px;bottom:12px;z-index:3;overflow:hidden}.footer-page-label{border-right:1px solid rgba(255,255,255,.2);display:inline-block;font-size:13px;line-height:44px;height:44px;vertical-align:middle;background:#000000}.footer-page-label-page{display:inline-block;margin-left:12px;vertical-align:middle;background:rgba(0,0,0,.75);color:#fff}.footer-page-label-numberpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}.footer-page-label-space{display:inline-block;margin-left:12px;vertical-align:middle;color:#fff}.footer-page-label-totalpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}::ng-deep p-table .ui-table-tbody>tr>td{overflow:unset}::ng-deep .ui-sidebar-left.ui-sidebar-active{padding-top:55px;background:rgba(0,0,0,.4);border:0}::ng-deep .layout-wrapper .layout-menu-container{border-radius:unset}::ng-deep .p-sidebar{padding:0!important;background-color:#000}::ng-deep .image-container{display:flex;justify-content:center;background-color:#000}::ng-deep .image-container .image-container-toolbar{display:flex;justify-content:flex-end}::ng-deep .image-container>img{height:calc(100ch - 50px)!important;max-height:100%!important;margin-top:50px}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: i16$1.Sidebar, selector: "p-sidebar", inputs: ["position", "blockScroll", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "visible", "fullScreen", "appendTo", "style", "styleClass", "ariaCloseLabel"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i17.NgxExtendedPdfViewerComponent, selector: "ngx-extended-pdf-viewer", inputs: ["enableDragAndDrop", "formData", "pageViewMode", "scrollMode", "authorization", "httpHeaders", "contextMenuAllowed", "enablePrint", "delayFirstView", "logLevel", "enablePinchOnMobile", "minifiedJSLibraries", "printResolution", "useBrowserLocale", "backgroundColor", "filenameForDownload", "ignoreKeyboard", "ignoreKeys", "acceptKeys", "imageResourcesPath", "localeFolderPath", "language", "listenToURL", "nameddest", "password", "showUnverifiedSignatures", "sidebarVisible", "showFindButton", "showPagingButtons", "showZoomButtons", "showPresentationModeButton", "showOpenFileButton", "showPrintButton", "showDownloadButton", "showBookmarkButton", "theme", "showToolbar", "showSecondaryToolbarButton", "showRotateButton", "handTool", "showHandToolButton", "showScrollingButton", "showSpreadButton", "showPropertiesButton", "showBorders", "pageLabel", "textLayer", "zoom", "zoomLevels", "maxZoom", "minZoom", "_mobileFriendlyZoom", "src", "base64Src", "height", "showSidebarButton", "page", "mobileFriendlyZoom", "customFindbarInputArea", "customToolbar", "customFindbar", "customFindbarButtons", "customSecondaryToolbar", "customSidebar", "customThumbnail", "customFreeFloatingBar", "rotation", "startTabindex", "spread"], outputs: ["formDataChange", "progress", "srcChange", "scrollModeChange", "afterPrint", "beforePrint", "currentZoomFactor", "rotationChange", "sidebarVisibleChange", "handToolChange", "spreadChange", "thumbnailDrawn", "pageChange", "pageLabelChange", "pagesLoaded", "pageRender", "pageRendered", "pdfDownloaded", "pdfLoaded", "pdfLoadingFailed", "textLayerRendered", "updateFindMatchesCount", "updateFindState", "zoomChange"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: FileFormComponent, selector: "file-form" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
30555
|
+
FileViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: FileViewerComponent, selector: "file-viewer", inputs: { model: "model", readonly: "readonly", showPrint: "showPrint", showDownload: "showDownload", showDelete: "showDelete" }, outputs: { onClose: "onClose", onRename: "onRename", onDelete: "onDelete" }, providers: [ComponentContextService], viewQueries: [{ propertyName: "sidebar", first: true, predicate: ["sidebar"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<p-sidebar #sidebar [showCloseIcon]=\"false\" [fullScreen]=\"true\" [appendTo]=\"'body'\"\r\n [styleClass]=\"getStyleClassByDocumentType(data.fileType)\" [(visible)]=\"show\">\r\n <ng-container *ngIf=\"data.fileType == fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\" style=\"margin: 0px auto;\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <!-- UD-2450 - TuDN -->\r\n <!-- <a *ngIf=\"_deviceDetectorService.isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\"\r\n tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a> -->\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <!-- End UD-2450 - TuDN -->\r\n <a *ngIf=\"!_deviceDetectorService.isDesktop() && !readonly\" pTooltip=\"\u0110\u1ED5i t\u00EAn\"\r\n tooltipPosition=\"bottom\" (click)=\"renameFile()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\"><i\r\n class=\"fas fa-eraser\"></i></a>\r\n <a *ngIf=\"showDelete && !readonly\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"far fa-trash-alt\"></i></a>\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\"\r\n *ngIf=\"!readonly && _deviceDetectorService.isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\"> <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"_deviceDetectorService.isDesktop()\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\"><i class=\"fas fa-pen-square\"></i>S\u1EEDa\r\n file\r\n tr\u1EF1c\r\n tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"far fa-trash-alt\"></i>X\u00F3a\r\n t\u1EC7p\r\n tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n </div>\r\n <ngx-extended-pdf-viewer [src]=\"model.fileUrl\" useBrowserLocale=\"true\" height=\"calc(100vh - 50px)\"\r\n [enablePinchOnMobile]=\"true\" [filenameForDownload]=\"data.fileName\" [language]=\"'vi-VN'\"\r\n [showBookmarkButton]=\"false\" [showHandToolButton]=\"false\" [showOpenFileButton]=\"false\"\r\n [showUnverifiedSignatures]=\"true\">\r\n </ngx-extended-pdf-viewer>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"data.fileType != fileTypes.IMAGE && data.fileType != fileTypes.VIDEO && data.fileType != fileTypes.AUDIO && data.fileType != fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\" tooltipPosition=\"bottom\"\r\n placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a>\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!readonly && showDelete && isDesktop()\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a *ngIf=\"!readonly && isDesktop()\" pTooltip=\"S\u1EEDa file tr\u1EF1c tuy\u1EBFn\" (click)=\"editFile()\"\r\n placeholder=\"Bottom\" class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\">\r\n <i class=\"fas fa-pen-square\"></i></a>\r\n\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\" *ngIf=\"!isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\">\r\n <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\">\r\n <i class=\"fas fa-pen-square\"></i>S\u1EEDa file tr\u1EF1c tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly && showDelete\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"pi pi-trash\"></i>X\u00F3a\r\n t\u1EC7p tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n [class.view-file-text]=\"isFileType(fileTypes.TEXT)\"\r\n [class.view-file-spreadsheet]=\"isFileType(fileTypes.SPREADSHEET)\"\r\n [class.view-file-presentation]=\"isFileType(fileTypes.PRESENTATION)\">\r\n <div id=\"file-viewer\"></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.IMAGE && model.images.length > 0\">\r\n <div class=\"image-container\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <img *ngIf=\"model.images && model.images.length\" src=\"{{model.images[0]}}\" alt=\"Ch\u01B0a c\u00F3 \u1EA3nh\">\r\n </div>\r\n <!-- <app-image-viewer [showPDFOnlyLabel]=\"false\" [showPDFOnlyOption]=\"false\" [fullscreen]=\"false\"\r\n [images]=\"model.images\" [primaryColor]=\"'#3192e1'\" [idContainer]=\"'image-view-list'\"\r\n (mousedown)=\"closeSidebar($event)\" id=\"fileViewerHolder\" [loadOnInit]=\"true\">\r\n </app-image-viewer>\r\n <a style=\"color: white;\" (click)=\"closeSidebar(null)\" class=\"mobile-image-viewer-close\">\r\n <i class=\"far fa-times-circle\"></i></a> -->\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.VIDEO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i>\r\n </a>\r\n <a *ngIf=\"!isReadonly && !isDesktop()\" (click)=\"renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n <a *ngIf=\"!readonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n style=\"width: 80%; margin: auto; height: 100%; border-radius: 0px;\">\r\n <video width=\"100%\" height=\"100%\" style=\"margin-top: 50px;\" autoplay controls src=\"{{model.fileUrl}}\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 m\u1EDF video.\r\n </video>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.AUDIO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" (mousedown)=\"closeSidebar($event)\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!isReadonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n <audio controls autoplay src=\"{{model.fileUrl}}\"\r\n style=\"margin: auto;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 ph\u00E1t audio. </audio>\r\n </div>\r\n </ng-container>\r\n\r\n</p-sidebar>\r\n\r\n<tn-dialog *ngIf=\"renameFileForm.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"renameFileForm.header | translate\" [popupSize]=\"renameFileForm.popupSize\" (onHide)=\"onCancelRenameFile()\">\r\n <file-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"renameFileForm.formData\"\r\n (onSaved)=\"onSavedRenameFile()\" (onCancel)=\"onCancelRenameFile()\">\r\n </file-form>\r\n</tn-dialog>", styles: ["::ng-deep .pdf-container ngx-extended-pdf-viewer #outerContainer{top:51px}.view-file{height:92vh}.dialog-material{display:block;border-radius:4px;box-sizing:border-box;overflow:hidden;outline:0;min-height:inherit;max-height:inherit;width:50vw}.dialog-material{width:100%}.dialog-material.view-file-text{width:85%;margin:0 auto}.dialog-material.view-file-text.mobile{width:100%;margin:0 auto}.header-dialog-material{display:flex;flex-direction:row;justify-content:space-between;padding:5px 15px;box-sizing:border-box;outline:0;height:50px;line-height:50px;background:#3192e1;position:absolute;pointer-events:auto;left:0;right:0;top:0;width:auto}.header-dialog-material .flex-item{line-height:40px}.header-dialog-material .flex-item .cursor-pointer{cursor:pointer;display:inline-block;padding:0 15px}.header-dialog-material .flex-item .cursor-pointer.submenu{position:relative}.header-dialog-material .flex-item .cursor-pointer.submenu ul{display:flex;position:absolute;top:25px;right:0px;align-content:flex-end;flex-direction:column;width:230px;border-radius:2px;padding:5px 0;background:#fff;box-shadow:0 6px 12px #0000002d;z-index:1}.header-dialog-material .flex-item .cursor-pointer.submenu ul li{padding:0}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a{padding:0 0 0 5px;line-height:40px}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a:hover{background:#f5f5f5}.header-dialog-material ul:before{top:-8px;right:8px;left:auto;width:0px;height:0px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:10px solid #ffffff;content:\" \";position:absolute}.mat-dialog-content{display:block;margin:0;padding:0;max-height:100vh;max-width:50vw;overflow:auto;-webkit-overflow-scrolling:touch}::ng-deep .cdk-overlay-container{position:fixed;z-index:1000;background:rgba(0,0,0,.7)!important}::ng-deep .cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}::ng-deep .mat-dialog-container{display:block;padding:0!important}::ng-deep .cdk-overlay-pane{max-height:100%}.button-link:hover{transition:background-color .1s,opacity .1s;background-image:none;background-color:#ffffff40}.file-row-action i{margin-right:5px;width:40px;text-align:center}.file-row-action{line-height:34px;width:100%;display:block;color:#212529}.layout-menu li a{border:none;text-align:left}.layout-menu li a i:first-child{color:#666;font-size:1em}.footer-page{position:absolute;left:50%;margin-right:-50%;transform:translate(-50%);border-radius:3px;bottom:12px;z-index:3;overflow:hidden}.footer-page-label{border-right:1px solid rgba(255,255,255,.2);display:inline-block;font-size:13px;line-height:44px;height:44px;vertical-align:middle;background:#000000}.footer-page-label-page{display:inline-block;margin-left:12px;vertical-align:middle;background:rgba(0,0,0,.75);color:#fff}.footer-page-label-numberpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}.footer-page-label-space{display:inline-block;margin-left:12px;vertical-align:middle;color:#fff}.footer-page-label-totalpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}::ng-deep p-table .ui-table-tbody>tr>td{overflow:unset}::ng-deep .ui-sidebar-left.ui-sidebar-active{padding-top:55px;background:rgba(0,0,0,.4);border:0}::ng-deep .layout-wrapper .layout-menu-container{border-radius:unset}::ng-deep .p-sidebar{padding:0!important;background-color:#000}::ng-deep .image-container{display:flex;justify-content:center;background-color:#000}::ng-deep .image-container .image-container-toolbar{display:flex;justify-content:flex-end}::ng-deep .image-container>img{height:calc(100ch - 50px)!important;max-height:100%!important;margin-top:50px}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: i16$1.Sidebar, selector: "p-sidebar", inputs: ["position", "blockScroll", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "visible", "fullScreen", "appendTo", "style", "styleClass", "ariaCloseLabel"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: i17.NgxExtendedPdfViewerComponent, selector: "ngx-extended-pdf-viewer", inputs: ["customFindbarInputArea", "customToolbar", "customFindbar", "customFindbarButtons", "customPdfViewer", "customSecondaryToolbar", "customSidebar", "customThumbnail", "customFreeFloatingBar", "showFreeFloatingBar", "enableDragAndDrop", "formData", "pageViewMode", "scrollMode", "authorization", "httpHeaders", "contextMenuAllowed", "enablePrint", "delayFirstView", "logLevel", "enablePinchOnMobile", "minifiedJSLibraries", "printResolution", "rotation", "src", "base64Src", "minHeight", "height", "useBrowserLocale", "forceUsingLegacyES5", "backgroundColor", "pdfBackground", "pdfBackgroundColorToReplace", "filenameForDownload", "ignoreKeyboard", "ignoreKeys", "acceptKeys", "imageResourcesPath", "localeFolderPath", "language", "listenToURL", "nameddest", "password", "showUnverifiedSignatures", "startTabindex", "showSidebarButton", "sidebarVisible", "showFindButton", "showFindHighlightAll", "showFindMatchCase", "showFindCurrentPageOnly", "showFindPageRange", "showFindEntireWord", "showFindEntirePhrase", "showFindIgnoreAccents", "showFindFuzzySearch", "showFindResultsCount", "showFindMessages", "showPagingButtons", "showZoomButtons", "showPresentationModeButton", "showOpenFileButton", "showPrintButton", "showDownloadButton", "showBookmarkButton", "theme", "formTheme", "showToolbar", "showSecondaryToolbarButton", "showRotateButton", "handTool", "showHandToolButton", "showScrollingButton", "showSpreadButton", "showPropertiesButton", "showBorders", "spread", "page", "pageLabel", "textLayer", "zoom", "zoomLevels", "maxZoom", "minZoom", "_mobileFriendlyZoom", "wheelAction", "mobileFriendlyZoom"], outputs: ["formDataChange", "progress", "srcChange", "scrollModeChange", "afterPrint", "beforePrint", "currentZoomFactor", "rotationChange", "sidebarVisibleChange", "handToolChange", "spreadChange", "thumbnailDrawn", "pageChange", "pageLabelChange", "pagesLoaded", "pageRender", "pageRendered", "pdfDownloaded", "pdfLoaded", "pdfLoadingStarts", "pdfLoadingFailed", "textLayerRendered", "updateFindMatchesCount", "updateFindState", "zoomChange"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: FileFormComponent, selector: "file-form" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
30631
30556
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileViewerComponent, decorators: [{
|
|
30632
30557
|
type: Component,
|
|
30633
30558
|
args: [{ selector: 'file-viewer', providers: [ComponentContextService], template: "<p-sidebar #sidebar [showCloseIcon]=\"false\" [fullScreen]=\"true\" [appendTo]=\"'body'\"\r\n [styleClass]=\"getStyleClassByDocumentType(data.fileType)\" [(visible)]=\"show\">\r\n <ng-container *ngIf=\"data.fileType == fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\" style=\"margin: 0px auto;\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <!-- UD-2450 - TuDN -->\r\n <!-- <a *ngIf=\"_deviceDetectorService.isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\"\r\n tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a> -->\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <!-- End UD-2450 - TuDN -->\r\n <a *ngIf=\"!_deviceDetectorService.isDesktop() && !readonly\" pTooltip=\"\u0110\u1ED5i t\u00EAn\"\r\n tooltipPosition=\"bottom\" (click)=\"renameFile()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\"><i\r\n class=\"fas fa-eraser\"></i></a>\r\n <a *ngIf=\"showDelete && !readonly\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"far fa-trash-alt\"></i></a>\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\"\r\n *ngIf=\"!readonly && _deviceDetectorService.isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\"> <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"_deviceDetectorService.isDesktop()\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\"><i class=\"fas fa-pen-square\"></i>S\u1EEDa\r\n file\r\n tr\u1EF1c\r\n tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"far fa-trash-alt\"></i>X\u00F3a\r\n t\u1EC7p\r\n tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n </div>\r\n <ngx-extended-pdf-viewer [src]=\"model.fileUrl\" useBrowserLocale=\"true\" height=\"calc(100vh - 50px)\"\r\n [enablePinchOnMobile]=\"true\" [filenameForDownload]=\"data.fileName\" [language]=\"'vi-VN'\"\r\n [showBookmarkButton]=\"false\" [showHandToolButton]=\"false\" [showOpenFileButton]=\"false\"\r\n [showUnverifiedSignatures]=\"true\">\r\n </ngx-extended-pdf-viewer>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"data.fileType != fileTypes.IMAGE && data.fileType != fileTypes.VIDEO && data.fileType != fileTypes.AUDIO && data.fileType != fileTypes.PDF\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop() && showPrint\" pTooltip=\"In t\u00E0i li\u1EC7u\" tooltipPosition=\"bottom\"\r\n placeholder=\"Bottom\" style=\"color: white;\" (click)=\"print()\"\r\n class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-print\"></i></a>\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!readonly && showDelete && isDesktop()\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a *ngIf=\"!readonly && isDesktop()\" pTooltip=\"S\u1EEDa file tr\u1EF1c tuy\u1EBFn\" (click)=\"editFile()\"\r\n placeholder=\"Bottom\" class=\"cursor-pointer button-link btn btn-secondary\" style=\"color: white;\">\r\n <i class=\"fas fa-pen-square\"></i></a>\r\n\r\n <a (click)=\"onTopbarItemClick($event)\" role=\"menuitem\" style=\"color: white;\" *ngIf=\"!isDesktop()\"\r\n class=\"cursor-pointer button-link btn btn-secondary submenu\">\r\n <i class=\"fas fa-ellipsis-v\"></i>\r\n <ul class=\"layout-menu fadeInDown\" *ngIf=\"model.activeTopbarItem\">\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"editFile()\" class=\"file-row-action\">\r\n <i class=\"fas fa-pen-square\"></i>S\u1EEDa file tr\u1EF1c tuy\u1EBFn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"renameFile()\" class=\"file-row-action\"><i class=\"fas fa-eraser\"></i>\u0110\u1ED5i\r\n t\u00EAn</a>\r\n </li>\r\n <li *ngIf=\"!isReadonly && showDelete\" role=\"menuitem\" class=\"cursor-pointer\">\r\n <a (click)=\"deleteFile()\" class=\"file-row-action\"><i class=\"pi pi-trash\"></i>X\u00F3a\r\n t\u1EC7p tin</a>\r\n </li>\r\n </ul>\r\n </a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n [class.view-file-text]=\"isFileType(fileTypes.TEXT)\"\r\n [class.view-file-spreadsheet]=\"isFileType(fileTypes.SPREADSHEET)\"\r\n [class.view-file-presentation]=\"isFileType(fileTypes.PRESENTATION)\">\r\n <div id=\"file-viewer\"></div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.IMAGE && model.images.length > 0\">\r\n <div class=\"image-container\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <img *ngIf=\"model.images && model.images.length\" src=\"{{model.images[0]}}\" alt=\"Ch\u01B0a c\u00F3 \u1EA3nh\">\r\n </div>\r\n <!-- <app-image-viewer [showPDFOnlyLabel]=\"false\" [showPDFOnlyOption]=\"false\" [fullscreen]=\"false\"\r\n [images]=\"model.images\" [primaryColor]=\"'#3192e1'\" [idContainer]=\"'image-view-list'\"\r\n (mousedown)=\"closeSidebar($event)\" id=\"fileViewerHolder\" [loadOnInit]=\"true\">\r\n </app-image-viewer>\r\n <a style=\"color: white;\" (click)=\"closeSidebar(null)\" class=\"mobile-image-viewer-close\">\r\n <i class=\"far fa-times-circle\"></i></a> -->\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.VIDEO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i>\r\n </a>\r\n <a *ngIf=\"!isReadonly && !isDesktop()\" (click)=\"renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n <a *ngIf=\"!readonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-material\" [class.view-file]=\"true\" [class.mobile]=\"!isDesktop()\"\r\n style=\"width: 80%; margin: auto; height: 100%; border-radius: 0px;\">\r\n <video width=\"100%\" height=\"100%\" style=\"margin-top: 50px;\" autoplay controls src=\"{{model.fileUrl}}\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 m\u1EDF video.\r\n </video>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"data.fileType == fileTypes.AUDIO\">\r\n <div id=\"fileViewerHolder\" class=\"file-viewer-holder\" (mousedown)=\"closeSidebar($event)\" style=\"height: 100%;\">\r\n <div #headerdialogmaterial class=\"header-dialog-material\">\r\n <div class=\"flex-item\">\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"isDesktop()\" (click)=\"!isReadonly && renameFile()\" style=\"color: white;\"\r\n class=\"btn btn-secondary\">\r\n <i class=\"fas fa-file-alt\"></i><span class=\"cursor-pointer\">\r\n {{ data.name }}\r\n </span>\r\n </a>\r\n </div>\r\n <div class=\"flex-item\">\r\n <a *ngIf=\"showDownload\" pTooltip=\"T\u1EA3i xu\u1ED1ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\"\r\n style=\"color: white;\" (click)=\"download()\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-download\"></i></a>\r\n <a *ngIf=\"!isReadonly && showDelete\" pTooltip=\"X\u00F3a t\u1EC7p tin\" tooltipPosition=\"bottom\"\r\n (click)=\"deleteFile()\" class=\"cursor-pointer button-link btn btn-secondary\"\r\n style=\"color: white;\"><i class=\"pi pi-trash\"></i></a>\r\n <a pTooltip=\"\u0110\u00F3ng\" tooltipPosition=\"bottom\" placeholder=\"Bottom\" style=\"color: white;\"\r\n (click)=\"closeSidebar(null)\" class=\"cursor-pointer button-link btn btn-secondary\">\r\n <i class=\"fas fa-times\"></i></a>\r\n </div>\r\n </div>\r\n <audio controls autoplay src=\"{{model.fileUrl}}\"\r\n style=\"margin: auto;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);\">\r\n Tr\u00ECnh duy\u1EC7t kh\u00F4ng h\u1ED7 tr\u1EE3 ph\u00E1t audio. </audio>\r\n </div>\r\n </ng-container>\r\n\r\n</p-sidebar>\r\n\r\n<tn-dialog *ngIf=\"renameFileForm.show\" #dialog [styleClass]=\"'address-form'\"\r\n [header]=\"renameFileForm.header | translate\" [popupSize]=\"renameFileForm.popupSize\" (onHide)=\"onCancelRenameFile()\">\r\n <file-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [model]=\"renameFileForm.formData\"\r\n (onSaved)=\"onSavedRenameFile()\" (onCancel)=\"onCancelRenameFile()\">\r\n </file-form>\r\n</tn-dialog>", styles: ["::ng-deep .pdf-container ngx-extended-pdf-viewer #outerContainer{top:51px}.view-file{height:92vh}.dialog-material{display:block;border-radius:4px;box-sizing:border-box;overflow:hidden;outline:0;min-height:inherit;max-height:inherit;width:50vw}.dialog-material{width:100%}.dialog-material.view-file-text{width:85%;margin:0 auto}.dialog-material.view-file-text.mobile{width:100%;margin:0 auto}.header-dialog-material{display:flex;flex-direction:row;justify-content:space-between;padding:5px 15px;box-sizing:border-box;outline:0;height:50px;line-height:50px;background:#3192e1;position:absolute;pointer-events:auto;left:0;right:0;top:0;width:auto}.header-dialog-material .flex-item{line-height:40px}.header-dialog-material .flex-item .cursor-pointer{cursor:pointer;display:inline-block;padding:0 15px}.header-dialog-material .flex-item .cursor-pointer.submenu{position:relative}.header-dialog-material .flex-item .cursor-pointer.submenu ul{display:flex;position:absolute;top:25px;right:0px;align-content:flex-end;flex-direction:column;width:230px;border-radius:2px;padding:5px 0;background:#fff;box-shadow:0 6px 12px #0000002d;z-index:1}.header-dialog-material .flex-item .cursor-pointer.submenu ul li{padding:0}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a{padding:0 0 0 5px;line-height:40px}.header-dialog-material .flex-item .cursor-pointer.submenu ul li a:hover{background:#f5f5f5}.header-dialog-material ul:before{top:-8px;right:8px;left:auto;width:0px;height:0px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:10px solid #ffffff;content:\" \";position:absolute}.mat-dialog-content{display:block;margin:0;padding:0;max-height:100vh;max-width:50vw;overflow:auto;-webkit-overflow-scrolling:touch}::ng-deep .cdk-overlay-container{position:fixed;z-index:1000;background:rgba(0,0,0,.7)!important}::ng-deep .cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}::ng-deep .mat-dialog-container{display:block;padding:0!important}::ng-deep .cdk-overlay-pane{max-height:100%}.button-link:hover{transition:background-color .1s,opacity .1s;background-image:none;background-color:#ffffff40}.file-row-action i{margin-right:5px;width:40px;text-align:center}.file-row-action{line-height:34px;width:100%;display:block;color:#212529}.layout-menu li a{border:none;text-align:left}.layout-menu li a i:first-child{color:#666;font-size:1em}.footer-page{position:absolute;left:50%;margin-right:-50%;transform:translate(-50%);border-radius:3px;bottom:12px;z-index:3;overflow:hidden}.footer-page-label{border-right:1px solid rgba(255,255,255,.2);display:inline-block;font-size:13px;line-height:44px;height:44px;vertical-align:middle;background:#000000}.footer-page-label-page{display:inline-block;margin-left:12px;vertical-align:middle;background:rgba(0,0,0,.75);color:#fff}.footer-page-label-numberpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}.footer-page-label-space{display:inline-block;margin-left:12px;vertical-align:middle;color:#fff}.footer-page-label-totalpage{display:inline-block;text-align:center;vertical-align:middle;width:48px;color:#fff}::ng-deep p-table .ui-table-tbody>tr>td{overflow:unset}::ng-deep .ui-sidebar-left.ui-sidebar-active{padding-top:55px;background:rgba(0,0,0,.4);border:0}::ng-deep .layout-wrapper .layout-menu-container{border-radius:unset}::ng-deep .p-sidebar{padding:0!important;background-color:#000}::ng-deep .image-container{display:flex;justify-content:center;background-color:#000}::ng-deep .image-container .image-container-toolbar{display:flex;justify-content:flex-end}::ng-deep .image-container>img{height:calc(100ch - 50px)!important;max-height:100%!important;margin-top:50px}\n"] }]
|
|
@@ -31043,7 +30968,7 @@ class KySoSimSignPDFService extends BaseService {
|
|
|
31043
30968
|
// Ký số có chọn vị trí ký bằng sim
|
|
31044
30969
|
signLoc(data) {
|
|
31045
30970
|
const apiUrl = `${this.serviceUri}/SignLoc`;
|
|
31046
|
-
return this._http.post(apiUrl, data)
|
|
30971
|
+
return firstValueFrom(this._http.post(apiUrl, data));
|
|
31047
30972
|
}
|
|
31048
30973
|
}
|
|
31049
30974
|
KySoSimSignPDFService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: KySoSimSignPDFService, deps: [{ token: i1$1.HttpClient }, { token: i0.Injector }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -31416,7 +31341,7 @@ class FileKySoSimComponent extends ComponentBase {
|
|
|
31416
31341
|
}
|
|
31417
31342
|
}
|
|
31418
31343
|
FileKySoSimComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileKySoSimComponent, deps: [{ token: i0.Injector }, { token: DomService }, { token: FileExplorerService }, { token: UserService }, { token: NotifierService }, { token: KySoSimSignPDFService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
31419
|
-
FileKySoSimComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: FileKySoSimComponent, selector: "app-file-ky-so-sim", providers: [ComponentContextService], viewQueries: [{ propertyName: "signContainer", first: true, predicate: ["signContainer"], descendants: true }, { propertyName: "extendedPdfViewer", first: true, predicate: ["extendedPdfViewer"], descendants: true }, { propertyName: "imgSignImage", first: true, predicate: ["signImage"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"isLoading\" class=\"div-loading\">\r\n <div class=\"div-loading-image\">\r\n <p-progressSpinner [style]=\"{width: '50px', height: '50px'}\" styleClass=\"custom-spinner\" strokeWidth=\"8\"\r\n fill=\"#EEEEEE\" animationDuration=\".5s\"></p-progressSpinner>\r\n </div>\r\n</div>\r\n<div style=\"text-align: center;\">\r\n <!-- -->\r\n <ngx-extended-pdf-viewer #extendedPdfViewer pageViewMode=\"single\" useBrowserLocale=\"true\"\r\n height=\"calc(100vh - 100px)\" [src]=\"model.pdfAsDataUri\" [showToolbar]=\"true\" [showSidebarButton]=\"false\"\r\n [showFindButton]=\"false\" [showPagingButtons]=\"true\" [showZoomButtons]=\"false\"\r\n [showPresentationModeButton]=\"false\" [showOpenFileButton]=\"false\" [showPrintButton]=\"false\"\r\n [showDownloadButton]=\"false\" [showBookmarkButton]=\"false\" [showSecondaryToolbarButton]=\"false\"\r\n [showRotateButton]=\"false\" [showHandToolButton]=\"false\" [showScrollingButton]=\"false\" [showSpreadButton]=\"false\"\r\n [showPropertiesButton]=\"false\" [enablePinchOnMobile]=\"true\" [showUnverifiedSignatures]=\"true\"\r\n [filenameForDownload]=\"'file1.pdf'\" [zoom]=\"100\" [language]=\"'vi-VN'\" [handTool]=\"false\"\r\n [(page)]=\"myState.currentPage\" (currentZoomFactor)=\"onPDFZoom($event)\" (pagesLoaded)=\"pagesLoaded($event)\">\r\n </ngx-extended-pdf-viewer>\r\n <div #signContainer id=\"signContainer\" class=\"sign-container\" (window:resize)=\"onResize($event)\">\r\n <img #signImage *ngIf=\"model.kySimDataChuKy.signImageAsDataUri != null\" id=\"signImage\"\r\n [src]=\"model.kySimDataChuKy.signImageAsDataUri\" />\r\n <span *ngIf=\"model.kySimDataChuKy.signImageAsDataUri == null\">\r\n <i class=\"fas fa-signature\"></i> Ch\u1ECDn v\u1ECB tr\u00ED k\u00FD\r\n </span>\r\n <div class=\"resize top-left\"></div>\r\n <div class=\"resize bottom-right\"></div>\r\n </div>\r\n</div>\r\n<tn-dialog *ngIf=\"forms.danhSachChuKy.show\" #dialog [styleClass]=\"'address-form'\" [useDefaultScrollBar]=\"true\"\r\n [header]=\"forms.danhSachChuKy.header | translate\" [popupSize]=\"forms.danhSachChuKy.popupSize\" [showFooter]=\"true\"\r\n (onHide)=\"forms.danhSachChuKy.show=false\">\r\n <app-ky-so-sim-danh-sach-chu-ky [formData]=\"forms.danhSachChuKy\" [parentModel]=\"model\" [parentContext]=\"context\">\r\n </app-ky-so-sim-danh-sach-chu-ky>\r\n</tn-dialog>", styles: [".sign-container{display:none;position:absolute;z-index:1;top:10px;left:0;touch-action:none;-webkit-user-select:none;user-select:none;background:rgba(33,150,243,.1490196078);border:2px dashed #2196f3}.sign-container span{font-size:20px;color:#555;padding:10px 20px 10px 10px;display:block;font-style:italic;font-weight:700}.sign-container img{width:100%;height:100%}.resize{display:inline-block;position:absolute;width:16px;height:16px;border-radius:50%;border:1px solid #ffffff;background:#2196f3;box-shadow:1px 1px 3px 1px #00000040}.top-left{top:-8px;left:-8px}.bottom-right{bottom:-8px;right:-8px}.div-loading{width:100%;height:100%;top:0px;left:0px;position:fixed;display:block;z-index:99;background:rgba(0,0,0,.4509803922)}.div-loading-image{position:absolute;top:50%;left:50%;z-index:100}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i17.NgxExtendedPdfViewerComponent, selector: "ngx-extended-pdf-viewer", inputs: ["enableDragAndDrop", "formData", "pageViewMode", "scrollMode", "authorization", "httpHeaders", "contextMenuAllowed", "enablePrint", "delayFirstView", "logLevel", "enablePinchOnMobile", "minifiedJSLibraries", "printResolution", "useBrowserLocale", "backgroundColor", "filenameForDownload", "ignoreKeyboard", "ignoreKeys", "acceptKeys", "imageResourcesPath", "localeFolderPath", "language", "listenToURL", "nameddest", "password", "showUnverifiedSignatures", "
|
|
31344
|
+
FileKySoSimComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: FileKySoSimComponent, selector: "app-file-ky-so-sim", providers: [ComponentContextService], viewQueries: [{ propertyName: "signContainer", first: true, predicate: ["signContainer"], descendants: true }, { propertyName: "extendedPdfViewer", first: true, predicate: ["extendedPdfViewer"], descendants: true }, { propertyName: "imgSignImage", first: true, predicate: ["signImage"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"isLoading\" class=\"div-loading\">\r\n <div class=\"div-loading-image\">\r\n <p-progressSpinner [style]=\"{width: '50px', height: '50px'}\" styleClass=\"custom-spinner\" strokeWidth=\"8\"\r\n fill=\"#EEEEEE\" animationDuration=\".5s\"></p-progressSpinner>\r\n </div>\r\n</div>\r\n<div style=\"text-align: center;\">\r\n <!-- -->\r\n <ngx-extended-pdf-viewer #extendedPdfViewer pageViewMode=\"single\" useBrowserLocale=\"true\"\r\n height=\"calc(100vh - 100px)\" [src]=\"model.pdfAsDataUri\" [showToolbar]=\"true\" [showSidebarButton]=\"false\"\r\n [showFindButton]=\"false\" [showPagingButtons]=\"true\" [showZoomButtons]=\"false\"\r\n [showPresentationModeButton]=\"false\" [showOpenFileButton]=\"false\" [showPrintButton]=\"false\"\r\n [showDownloadButton]=\"false\" [showBookmarkButton]=\"false\" [showSecondaryToolbarButton]=\"false\"\r\n [showRotateButton]=\"false\" [showHandToolButton]=\"false\" [showScrollingButton]=\"false\" [showSpreadButton]=\"false\"\r\n [showPropertiesButton]=\"false\" [enablePinchOnMobile]=\"true\" [showUnverifiedSignatures]=\"true\"\r\n [filenameForDownload]=\"'file1.pdf'\" [zoom]=\"100\" [language]=\"'vi-VN'\" [handTool]=\"false\"\r\n [(page)]=\"myState.currentPage\" (currentZoomFactor)=\"onPDFZoom($event)\" (pagesLoaded)=\"pagesLoaded($event)\">\r\n </ngx-extended-pdf-viewer>\r\n <div #signContainer id=\"signContainer\" class=\"sign-container\" (window:resize)=\"onResize($event)\">\r\n <img #signImage *ngIf=\"model.kySimDataChuKy.signImageAsDataUri != null\" id=\"signImage\"\r\n [src]=\"model.kySimDataChuKy.signImageAsDataUri\" />\r\n <span *ngIf=\"model.kySimDataChuKy.signImageAsDataUri == null\">\r\n <i class=\"fas fa-signature\"></i> Ch\u1ECDn v\u1ECB tr\u00ED k\u00FD\r\n </span>\r\n <div class=\"resize top-left\"></div>\r\n <div class=\"resize bottom-right\"></div>\r\n </div>\r\n</div>\r\n<tn-dialog *ngIf=\"forms.danhSachChuKy.show\" #dialog [styleClass]=\"'address-form'\" [useDefaultScrollBar]=\"true\"\r\n [header]=\"forms.danhSachChuKy.header | translate\" [popupSize]=\"forms.danhSachChuKy.popupSize\" [showFooter]=\"true\"\r\n (onHide)=\"forms.danhSachChuKy.show=false\">\r\n <app-ky-so-sim-danh-sach-chu-ky [formData]=\"forms.danhSachChuKy\" [parentModel]=\"model\" [parentContext]=\"context\">\r\n </app-ky-so-sim-danh-sach-chu-ky>\r\n</tn-dialog>", styles: [".sign-container{display:none;position:absolute;z-index:1;top:10px;left:0;touch-action:none;-webkit-user-select:none;user-select:none;background:rgba(33,150,243,.1490196078);border:2px dashed #2196f3}.sign-container span{font-size:20px;color:#555;padding:10px 20px 10px 10px;display:block;font-style:italic;font-weight:700}.sign-container img{width:100%;height:100%}.resize{display:inline-block;position:absolute;width:16px;height:16px;border-radius:50%;border:1px solid #ffffff;background:#2196f3;box-shadow:1px 1px 3px 1px #00000040}.top-left{top:-8px;left:-8px}.bottom-right{bottom:-8px;right:-8px}.div-loading{width:100%;height:100%;top:0px;left:0px;position:fixed;display:block;z-index:99;background:rgba(0,0,0,.4509803922)}.div-loading-image{position:absolute;top:50%;left:50%;z-index:100}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i17.NgxExtendedPdfViewerComponent, selector: "ngx-extended-pdf-viewer", inputs: ["customFindbarInputArea", "customToolbar", "customFindbar", "customFindbarButtons", "customPdfViewer", "customSecondaryToolbar", "customSidebar", "customThumbnail", "customFreeFloatingBar", "showFreeFloatingBar", "enableDragAndDrop", "formData", "pageViewMode", "scrollMode", "authorization", "httpHeaders", "contextMenuAllowed", "enablePrint", "delayFirstView", "logLevel", "enablePinchOnMobile", "minifiedJSLibraries", "printResolution", "rotation", "src", "base64Src", "minHeight", "height", "useBrowserLocale", "forceUsingLegacyES5", "backgroundColor", "pdfBackground", "pdfBackgroundColorToReplace", "filenameForDownload", "ignoreKeyboard", "ignoreKeys", "acceptKeys", "imageResourcesPath", "localeFolderPath", "language", "listenToURL", "nameddest", "password", "showUnverifiedSignatures", "startTabindex", "showSidebarButton", "sidebarVisible", "showFindButton", "showFindHighlightAll", "showFindMatchCase", "showFindCurrentPageOnly", "showFindPageRange", "showFindEntireWord", "showFindEntirePhrase", "showFindIgnoreAccents", "showFindFuzzySearch", "showFindResultsCount", "showFindMessages", "showPagingButtons", "showZoomButtons", "showPresentationModeButton", "showOpenFileButton", "showPrintButton", "showDownloadButton", "showBookmarkButton", "theme", "formTheme", "showToolbar", "showSecondaryToolbarButton", "showRotateButton", "handTool", "showHandToolButton", "showScrollingButton", "showSpreadButton", "showPropertiesButton", "showBorders", "spread", "page", "pageLabel", "textLayer", "zoom", "zoomLevels", "maxZoom", "minZoom", "_mobileFriendlyZoom", "wheelAction", "mobileFriendlyZoom"], outputs: ["formDataChange", "progress", "srcChange", "scrollModeChange", "afterPrint", "beforePrint", "currentZoomFactor", "rotationChange", "sidebarVisibleChange", "handToolChange", "spreadChange", "thumbnailDrawn", "pageChange", "pageLabelChange", "pagesLoaded", "pageRender", "pageRendered", "pdfDownloaded", "pdfLoaded", "pdfLoadingStarts", "pdfLoadingFailed", "textLayerRendered", "updateFindMatchesCount", "updateFindState", "zoomChange"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["strokeWidth", "fill", "animationDuration", "style", "styleClass"] }, { kind: "component", type: TnDialogComponent, selector: "tn-dialog", inputs: ["maskClass", "styleClass", "scrollBarStyleClass", "useDefaultScrollBar", "visible", "disabledButton", "modal", "header", "popupSize", "closeOnEscape", "showFooter", "positionTop", "minY", "hiddenSave", "maximizable"], outputs: ["onSave", "onCancel", "onShow", "onHide"] }, { kind: "component", type: KySoSimDanhSachChuKyComponent, selector: "app-ky-so-sim-danh-sach-chu-ky", inputs: ["formData"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
31420
31345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FileKySoSimComponent, decorators: [{
|
|
31421
31346
|
type: Component,
|
|
31422
31347
|
args: [{ selector: 'app-file-ky-so-sim', providers: [ComponentContextService], template: "<div *ngIf=\"isLoading\" class=\"div-loading\">\r\n <div class=\"div-loading-image\">\r\n <p-progressSpinner [style]=\"{width: '50px', height: '50px'}\" styleClass=\"custom-spinner\" strokeWidth=\"8\"\r\n fill=\"#EEEEEE\" animationDuration=\".5s\"></p-progressSpinner>\r\n </div>\r\n</div>\r\n<div style=\"text-align: center;\">\r\n <!-- -->\r\n <ngx-extended-pdf-viewer #extendedPdfViewer pageViewMode=\"single\" useBrowserLocale=\"true\"\r\n height=\"calc(100vh - 100px)\" [src]=\"model.pdfAsDataUri\" [showToolbar]=\"true\" [showSidebarButton]=\"false\"\r\n [showFindButton]=\"false\" [showPagingButtons]=\"true\" [showZoomButtons]=\"false\"\r\n [showPresentationModeButton]=\"false\" [showOpenFileButton]=\"false\" [showPrintButton]=\"false\"\r\n [showDownloadButton]=\"false\" [showBookmarkButton]=\"false\" [showSecondaryToolbarButton]=\"false\"\r\n [showRotateButton]=\"false\" [showHandToolButton]=\"false\" [showScrollingButton]=\"false\" [showSpreadButton]=\"false\"\r\n [showPropertiesButton]=\"false\" [enablePinchOnMobile]=\"true\" [showUnverifiedSignatures]=\"true\"\r\n [filenameForDownload]=\"'file1.pdf'\" [zoom]=\"100\" [language]=\"'vi-VN'\" [handTool]=\"false\"\r\n [(page)]=\"myState.currentPage\" (currentZoomFactor)=\"onPDFZoom($event)\" (pagesLoaded)=\"pagesLoaded($event)\">\r\n </ngx-extended-pdf-viewer>\r\n <div #signContainer id=\"signContainer\" class=\"sign-container\" (window:resize)=\"onResize($event)\">\r\n <img #signImage *ngIf=\"model.kySimDataChuKy.signImageAsDataUri != null\" id=\"signImage\"\r\n [src]=\"model.kySimDataChuKy.signImageAsDataUri\" />\r\n <span *ngIf=\"model.kySimDataChuKy.signImageAsDataUri == null\">\r\n <i class=\"fas fa-signature\"></i> Ch\u1ECDn v\u1ECB tr\u00ED k\u00FD\r\n </span>\r\n <div class=\"resize top-left\"></div>\r\n <div class=\"resize bottom-right\"></div>\r\n </div>\r\n</div>\r\n<tn-dialog *ngIf=\"forms.danhSachChuKy.show\" #dialog [styleClass]=\"'address-form'\" [useDefaultScrollBar]=\"true\"\r\n [header]=\"forms.danhSachChuKy.header | translate\" [popupSize]=\"forms.danhSachChuKy.popupSize\" [showFooter]=\"true\"\r\n (onHide)=\"forms.danhSachChuKy.show=false\">\r\n <app-ky-so-sim-danh-sach-chu-ky [formData]=\"forms.danhSachChuKy\" [parentModel]=\"model\" [parentContext]=\"context\">\r\n </app-ky-so-sim-danh-sach-chu-ky>\r\n</tn-dialog>", styles: [".sign-container{display:none;position:absolute;z-index:1;top:10px;left:0;touch-action:none;-webkit-user-select:none;user-select:none;background:rgba(33,150,243,.1490196078);border:2px dashed #2196f3}.sign-container span{font-size:20px;color:#555;padding:10px 20px 10px 10px;display:block;font-style:italic;font-weight:700}.sign-container img{width:100%;height:100%}.resize{display:inline-block;position:absolute;width:16px;height:16px;border-radius:50%;border:1px solid #ffffff;background:#2196f3;box-shadow:1px 1px 3px 1px #00000040}.top-left{top:-8px;left:-8px}.bottom-right{bottom:-8px;right:-8px}.div-loading{width:100%;height:100%;top:0px;left:0px;position:fixed;display:block;z-index:99;background:rgba(0,0,0,.4509803922)}.div-loading-image{position:absolute;top:50%;left:50%;z-index:100}\n"] }]
|
|
@@ -32205,7 +32130,7 @@ class FileManagerComponent extends DataListBase {
|
|
|
32205
32130
|
});
|
|
32206
32131
|
}
|
|
32207
32132
|
ngOnDestroy() {
|
|
32208
|
-
this._unsubcribleAll.next();
|
|
32133
|
+
this._unsubcribleAll.next(1);
|
|
32209
32134
|
this._unsubcribleAll.complete();
|
|
32210
32135
|
if (this.fileDataService) {
|
|
32211
32136
|
this.fileDataService.unregister(this);
|
|
@@ -36748,7 +36673,7 @@ class WorkflowHistoryNewComponent extends DataListBase {
|
|
|
36748
36673
|
}
|
|
36749
36674
|
}
|
|
36750
36675
|
WorkflowHistoryNewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: WorkflowHistoryNewComponent, deps: [{ token: i0.Injector }, { token: WorkflowHistoryService }, { token: CoCauToChucOldService }, { token: UserGroupRealService }, { token: DmChucVuService }, { token: FileDataService }], target: i0.ɵɵFactoryTarget.Component });
|
|
36751
|
-
WorkflowHistoryNewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: WorkflowHistoryNewComponent, selector: "workflow-history-new", inputs: { businessSetting: "businessSetting", isRelativeForm: "isRelativeForm", tableName: "tableName", item: "item", workflowSetting: "workflowSetting" }, providers: [ComponentContextService], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 100%\">\r\n <as-split direction=\"vertical\">\r\n <as-split-area [size]=\"40\">\r\n <div class=\"state-designer-container\">\r\n <div>\r\n S\u01A1 \u0111\u1ED3 quy tr\u00ECnh {{workflowTitle}}\r\n </div>\r\n <div>\r\n <statemachines-designer *ngIf=\"!waitToDetach && readyToRaw\" [data]=\"machinesData\"\r\n [currentConnection]=\"currentConnection\" [jsPlumbOption]=\"jsPlumbOption\" [viewOnly]=\"true\">\r\n </statemachines-designer>\r\n <after-view-checked *ngIf=\"waitToDetach\" (loaded)=\"waitToDetach = false\"></after-view-checked>\r\n </div>\r\n </div>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <crud-list-simple *ngIf=\"model.ready\" #crudList [model]=\"model\" [setting]=\"setting\"\r\n [dataSource]=\"model.dataSource\" (onReload)=\"_triggerProcessData($event)\" (onAdd)=\"_add($event)\"\r\n (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\r\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_handleReloaded($event)\">\r\n <ng-template #note let-rowData=\"rowData\">\r\n <div *ngIf=\"rowData.note==null?'':rowData.note\" [innerHTML]=\"rowData.note | safeHtml\"></div>\r\n </ng-template>\r\n <ng-template #receiver let-rowData=\"rowData\">\r\n <div *ngIf=\"!rowData.notInMainThread\" class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserIds}}</div>\r\n <div *ngIf=\"rowData.strdonViIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViIds}}</div>\r\n <div *ngIf=\"rowData.strgroupIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupIds}}</div>\r\n <div *ngIf=\"rowData.strroleIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleIds}}</div>\r\n </div>\r\n <div *ngIf=\"rowData.notInMainThread\">\r\n <div *ngFor=\"let changedField of rowData.jsonModelChange\">\r\n {{changedField.field}},\r\n {{changedField.valueOld}} => {{changedField.valueNew}}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #receiverView let-rowData=\"rowData\">\r\n <div class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserViewIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserViewIds}}</div>\r\n <div *ngIf=\"rowData.strdonViViewIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViViewIds}}</div>\r\n <div *ngIf=\"rowData.strgroupViewIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupViewIds}}</div>\r\n <div *ngIf=\"rowData.strroleViewIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleViewIds}}</div>\r\n </div>\r\n </ng-template>\r\n <ng-template #fileDinhKem let-rowData=\"rowData\">\r\n <file-manager [fileDataService]=\"fileDataService\"\r\n [serviceCode]=\"_workflowHistoryService.serviceCode\"\r\n [entity]=\"_workflowHistoryService.entityName\" [entityKey]=\"rowData.id\"\r\n [layout]=\"layoutFile.SIMPLE\" [readonly]=\"true\">\r\n </file-manager>\r\n </ng-template>\r\n <ng-template #function let-rowData=\"rowData\">\r\n <button *ngIf=\"rowData.status == enumWorkflowHistoryStatus.IN_MAIN_THREAD\" pButton\r\n icon=\"pi pi-replay\" class=\"p-button-text p-button-rounded link-or-action\"\r\n pTooltip=\"Thu h\u1ED3i v\u1EC1 b\u01B0\u1EDBc n\u00E0y\" tooltipPosition=\"top\"\r\n (click)=\"rollbackByHistory(rowData)\"></button>\r\n </ng-template>\r\n </crud-list-simple>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".state-designer-container{height:100%;display:flex;flex-direction:column}.state-designer-container>div:first-child{position:absolute;left:.5em;top:.5em;font-weight:700;font-size:.9em;padding:.5em 0}.state-designer-container>div:last-child{flex:1 1;overflow:auto}.container-receiver div{margin-bottom:10px}.container-receiver div:last-child{margin-bottom:0}::ng-deep workflow-history-new tr.recalled{opacity:.5}\n"], dependencies: [{ kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration"], outputs: ["dragStart", "dragEnd", "gutterClick", "gutterDblClick"
|
|
36676
|
+
WorkflowHistoryNewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: WorkflowHistoryNewComponent, selector: "workflow-history-new", inputs: { businessSetting: "businessSetting", isRelativeForm: "isRelativeForm", tableName: "tableName", item: "item", workflowSetting: "workflowSetting" }, providers: [ComponentContextService], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 100%\">\r\n <as-split direction=\"vertical\">\r\n <as-split-area [size]=\"40\">\r\n <div class=\"state-designer-container\">\r\n <div>\r\n S\u01A1 \u0111\u1ED3 quy tr\u00ECnh {{workflowTitle}}\r\n </div>\r\n <div>\r\n <statemachines-designer *ngIf=\"!waitToDetach && readyToRaw\" [data]=\"machinesData\"\r\n [currentConnection]=\"currentConnection\" [jsPlumbOption]=\"jsPlumbOption\" [viewOnly]=\"true\">\r\n </statemachines-designer>\r\n <after-view-checked *ngIf=\"waitToDetach\" (loaded)=\"waitToDetach = false\"></after-view-checked>\r\n </div>\r\n </div>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <crud-list-simple *ngIf=\"model.ready\" #crudList [model]=\"model\" [setting]=\"setting\"\r\n [dataSource]=\"model.dataSource\" (onReload)=\"_triggerProcessData($event)\" (onAdd)=\"_add($event)\"\r\n (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\r\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_handleReloaded($event)\">\r\n <ng-template #note let-rowData=\"rowData\">\r\n <div *ngIf=\"rowData.note==null?'':rowData.note\" [innerHTML]=\"rowData.note | safeHtml\"></div>\r\n </ng-template>\r\n <ng-template #receiver let-rowData=\"rowData\">\r\n <div *ngIf=\"!rowData.notInMainThread\" class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserIds}}</div>\r\n <div *ngIf=\"rowData.strdonViIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViIds}}</div>\r\n <div *ngIf=\"rowData.strgroupIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupIds}}</div>\r\n <div *ngIf=\"rowData.strroleIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleIds}}</div>\r\n </div>\r\n <div *ngIf=\"rowData.notInMainThread\">\r\n <div *ngFor=\"let changedField of rowData.jsonModelChange\">\r\n {{changedField.field}},\r\n {{changedField.valueOld}} => {{changedField.valueNew}}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #receiverView let-rowData=\"rowData\">\r\n <div class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserViewIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserViewIds}}</div>\r\n <div *ngIf=\"rowData.strdonViViewIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViViewIds}}</div>\r\n <div *ngIf=\"rowData.strgroupViewIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupViewIds}}</div>\r\n <div *ngIf=\"rowData.strroleViewIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleViewIds}}</div>\r\n </div>\r\n </ng-template>\r\n <ng-template #fileDinhKem let-rowData=\"rowData\">\r\n <file-manager [fileDataService]=\"fileDataService\"\r\n [serviceCode]=\"_workflowHistoryService.serviceCode\"\r\n [entity]=\"_workflowHistoryService.entityName\" [entityKey]=\"rowData.id\"\r\n [layout]=\"layoutFile.SIMPLE\" [readonly]=\"true\">\r\n </file-manager>\r\n </ng-template>\r\n <ng-template #function let-rowData=\"rowData\">\r\n <button *ngIf=\"rowData.status == enumWorkflowHistoryStatus.IN_MAIN_THREAD\" pButton\r\n icon=\"pi pi-replay\" class=\"p-button-text p-button-rounded link-or-action\"\r\n pTooltip=\"Thu h\u1ED3i v\u1EC1 b\u01B0\u1EDBc n\u00E0y\" tooltipPosition=\"top\"\r\n (click)=\"rollbackByHistory(rowData)\"></button>\r\n </ng-template>\r\n </crud-list-simple>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".state-designer-container{height:100%;display:flex;flex-direction:column}.state-designer-container>div:first-child{position:absolute;left:.5em;top:.5em;font-weight:700;font-size:.9em;padding:.5em 0}.state-designer-container>div:last-child{flex:1 1;overflow:auto}.container-receiver div{margin-bottom:10px}.container-receiver div:last-child{margin-bottom:0}::ng-deep workflow-history-new tr.recalled{opacity:.5}\n"], dependencies: [{ kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration", "gutterClickDeltaPx", "gutterAriaLabel"], outputs: ["transitionEnd", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"], exportAs: ["asSplit"] }, { kind: "directive", type: i4$8.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "label", "icon"] }, { kind: "directive", type: i5$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "tooltipZIndex", "escape", "tooltipDisabled", "pTooltip", "positionStyle", "tooltipStyleClass", "showDelay", "hideDelay", "life"] }, { kind: "component", type: AfterViewCheckedComponent, selector: "after-view-checked", inputs: ["renderKey"], outputs: ["loaded", "loading", "unloading", "reRender"] }, { kind: "component", type: CrudListSimpleComponent, selector: "crud-list-simple", inputs: ["model", "setting", "fileName", "lazy", "widthCheckbox", "widthOrderColumn", "widthFunctionColumn", "classRowGroup", "showScrollBar", "pTableScrollable", "pTableScrollHeight", "responsive", "showScrollHorizontal", "showRadio", "hiddenAdd", "hiddenDelete", "hiddenDeleteMultiple", "hiddenEdit", "hiddenView", "escape", "enableReorderRow", "templates", "menuButtons", "showMenuButtons", "fieldOrder", "style", "tableClass", "dataSource", "filter_default", "expandedSearch"], outputs: ["onRowSelect", "onReordered", "onCheckAll", "onReload", "onReloaded", "onReady", "onContentInit", "onAdd", "onEdit", "onView", "onDelete", "onDeleteMultiple", "onInvalidWorkflow", "onAfterTrinhKy", "onStartedWorkflow", "onProcessedWorkflow", "onRollbackedWorkflow", "onChangedStatusWorkflow", "onViewWorkflow", "onPermissionShare", "onPermission", "onCreatedSearchInfo"] }, { kind: "component", type: StateMachinesDesignerComponent, selector: "statemachines-designer", inputs: ["useScrollBar", "viewOnly", "data", "currentConnection", "containerId", "jsPlumbOption"] }, { kind: "component", type: FileManagerComponent, selector: "file-manager", inputs: ["control", "fileDataService", "layout", "hiddenCreateFolder", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageSummary", "invalidFileLimitMessageDetail", "dataType", "rootFolderName", "serviceCode", "entity", "entityKey", "readonly", "inTaiLieu", "inTaiLieuChung", "copyToFolderId", "value", "multipleCheckWhenClickRow"], outputs: ["onReady", "entityKeyChange", "closePopup", "valueChange", "onChanged", "onSelected"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] });
|
|
36752
36677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: WorkflowHistoryNewComponent, decorators: [{
|
|
36753
36678
|
type: Component,
|
|
36754
36679
|
args: [{ selector: 'workflow-history-new', providers: [ComponentContextService], template: "<div style=\"height: 100%\">\r\n <as-split direction=\"vertical\">\r\n <as-split-area [size]=\"40\">\r\n <div class=\"state-designer-container\">\r\n <div>\r\n S\u01A1 \u0111\u1ED3 quy tr\u00ECnh {{workflowTitle}}\r\n </div>\r\n <div>\r\n <statemachines-designer *ngIf=\"!waitToDetach && readyToRaw\" [data]=\"machinesData\"\r\n [currentConnection]=\"currentConnection\" [jsPlumbOption]=\"jsPlumbOption\" [viewOnly]=\"true\">\r\n </statemachines-designer>\r\n <after-view-checked *ngIf=\"waitToDetach\" (loaded)=\"waitToDetach = false\"></after-view-checked>\r\n </div>\r\n </div>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <crud-list-simple *ngIf=\"model.ready\" #crudList [model]=\"model\" [setting]=\"setting\"\r\n [dataSource]=\"model.dataSource\" (onReload)=\"_triggerProcessData($event)\" (onAdd)=\"_add($event)\"\r\n (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\r\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_handleReloaded($event)\">\r\n <ng-template #note let-rowData=\"rowData\">\r\n <div *ngIf=\"rowData.note==null?'':rowData.note\" [innerHTML]=\"rowData.note | safeHtml\"></div>\r\n </ng-template>\r\n <ng-template #receiver let-rowData=\"rowData\">\r\n <div *ngIf=\"!rowData.notInMainThread\" class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserIds}}</div>\r\n <div *ngIf=\"rowData.strdonViIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViIds}}</div>\r\n <div *ngIf=\"rowData.strgroupIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupIds}}</div>\r\n <div *ngIf=\"rowData.strroleIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleIds}}</div>\r\n </div>\r\n <div *ngIf=\"rowData.notInMainThread\">\r\n <div *ngFor=\"let changedField of rowData.jsonModelChange\">\r\n {{changedField.field}},\r\n {{changedField.valueOld}} => {{changedField.valueNew}}\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #receiverView let-rowData=\"rowData\">\r\n <div class=\"container-receiver\">\r\n <div *ngIf=\"rowData.struserViewIds\"><b>C\u00E1n b\u1ED9: </b>{{rowData.struserViewIds}}</div>\r\n <div *ngIf=\"rowData.strdonViViewIds\"><b>\u0110\u01A1n v\u1ECB: </b>{{rowData.strdonViViewIds}}</div>\r\n <div *ngIf=\"rowData.strgroupViewIds\"><b>Nh\u00F3m: </b>{{rowData.strgroupViewIds}}</div>\r\n <div *ngIf=\"rowData.strroleViewIds\"><b>Ch\u1EE9c v\u1EE5: </b>{{rowData.strroleViewIds}}</div>\r\n </div>\r\n </ng-template>\r\n <ng-template #fileDinhKem let-rowData=\"rowData\">\r\n <file-manager [fileDataService]=\"fileDataService\"\r\n [serviceCode]=\"_workflowHistoryService.serviceCode\"\r\n [entity]=\"_workflowHistoryService.entityName\" [entityKey]=\"rowData.id\"\r\n [layout]=\"layoutFile.SIMPLE\" [readonly]=\"true\">\r\n </file-manager>\r\n </ng-template>\r\n <ng-template #function let-rowData=\"rowData\">\r\n <button *ngIf=\"rowData.status == enumWorkflowHistoryStatus.IN_MAIN_THREAD\" pButton\r\n icon=\"pi pi-replay\" class=\"p-button-text p-button-rounded link-or-action\"\r\n pTooltip=\"Thu h\u1ED3i v\u1EC1 b\u01B0\u1EDBc n\u00E0y\" tooltipPosition=\"top\"\r\n (click)=\"rollbackByHistory(rowData)\"></button>\r\n </ng-template>\r\n </crud-list-simple>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".state-designer-container{height:100%;display:flex;flex-direction:column}.state-designer-container>div:first-child{position:absolute;left:.5em;top:.5em;font-weight:700;font-size:.9em;padding:.5em 0}.state-designer-container>div:last-child{flex:1 1;overflow:auto}.container-receiver div{margin-bottom:10px}.container-receiver div:last-child{margin-bottom:0}::ng-deep workflow-history-new tr.recalled{opacity:.5}\n"] }]
|
|
@@ -40426,11 +40351,11 @@ class PathNameService extends BaseService {
|
|
|
40426
40351
|
}
|
|
40427
40352
|
getByPathName(pathName) {
|
|
40428
40353
|
const uri = `${this.serviceUri}/GetSimplePathNamesByUrl?url=${pathName}`;
|
|
40429
|
-
return this._httpClient.get(uri)
|
|
40354
|
+
return firstValueFrom(this._httpClient.get(uri));
|
|
40430
40355
|
}
|
|
40431
40356
|
checkPathNameHasGuide(pathName) {
|
|
40432
40357
|
const uri = `${this.serviceUri}/CheckPathNameHasGuide?pathName=${pathName}`;
|
|
40433
|
-
return this._httpClient.get(uri)
|
|
40358
|
+
return firstValueFrom(this._httpClient.get(uri));
|
|
40434
40359
|
}
|
|
40435
40360
|
}
|
|
40436
40361
|
PathNameService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: PathNameService, deps: [{ token: i1$1.HttpClient }, { token: i0.Injector }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -42521,7 +42446,7 @@ class HighPerformanceService {
|
|
|
42521
42446
|
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
|
|
42522
42447
|
const highPerformanceEndpoint = `${this.serviceUri}/HighPerformance/DoWork?returnSequenceNumber=${returnSequenceNumber}`;
|
|
42523
42448
|
try {
|
|
42524
|
-
const rs = yield this._httpClient.post(highPerformanceEndpoint, model)
|
|
42449
|
+
const rs = yield firstValueFrom(this._httpClient.post(highPerformanceEndpoint, model));
|
|
42525
42450
|
if (rs.success) {
|
|
42526
42451
|
resolve(rs.data);
|
|
42527
42452
|
}
|
|
@@ -42535,7 +42460,7 @@ class HighPerformanceService {
|
|
|
42535
42460
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42536
42461
|
try {
|
|
42537
42462
|
const highPerformanceEndpoint = `${this.serviceUri}/HighPerformance/CancelWork?queueName=${queueName}&uniqueKey=${uniqueKey}`;
|
|
42538
|
-
const rs = yield this._httpClient.post(highPerformanceEndpoint, {})
|
|
42463
|
+
const rs = yield firstValueFrom(this._httpClient.post(highPerformanceEndpoint, {}));
|
|
42539
42464
|
if (rs.success) {
|
|
42540
42465
|
return rs.data;
|
|
42541
42466
|
}
|
|
@@ -46415,7 +46340,7 @@ class CommonAppComponentComponent {
|
|
|
46415
46340
|
// tslint:disable-next-line: use-life-cycle-interface
|
|
46416
46341
|
ngOnDestroy() {
|
|
46417
46342
|
// Unsubscribe from all subscriptions
|
|
46418
|
-
this._unsubscribeAll.next();
|
|
46343
|
+
this._unsubscribeAll.next(1);
|
|
46419
46344
|
this._unsubscribeAll.complete();
|
|
46420
46345
|
this._componentContextService.fireEvent(ComCtxConstants.ROOT.DESTROY_TASK_DETAIL_COMPONENT);
|
|
46421
46346
|
}
|
|
@@ -49037,7 +48962,7 @@ class BaseCauHinhWorkflowComponent extends DataListBase {
|
|
|
49037
48962
|
}
|
|
49038
48963
|
}
|
|
49039
48964
|
BaseCauHinhWorkflowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BaseCauHinhWorkflowComponent, deps: [{ token: i0.Injector }, { token: DmLoaiCongViecService }, { token: CauHinhWorkflowService }], target: i0.ɵɵFactoryTarget.Component });
|
|
49040
|
-
BaseCauHinhWorkflowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: BaseCauHinhWorkflowComponent, selector: "base-cauhinh-workflow", providers: [ComponentContextService], usesInheritance: true, ngImport: i0, template: "<div class=\"tn-main-content\">\r\n <as-split>\r\n <as-split-area [size]=\"40\">\r\n <base-dm-loai-congviec [inCauHinhWorkflow]=\"true\" (onRowSelect)=\"handleSelectLoaiCongViec($event)\">\r\n </base-dm-loai-congviec>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <base-cauhinh-workflow-detail [isDetail]=\"true\" [itemLoaiCongViec]=\"itemLoaiCongViec\">\r\n </base-cauhinh-workflow-detail>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".container-task-info .percent-done{position:relative;border-radius:2px;background-color:#f0f0f0;height:5px;margin-top:5px;overflow:hidden}.container-task-info .percent-done .detail{position:absolute;left:0;top:0;height:5px;border-radius:2px;font-size:13px;text-align:center;color:#fff}\n"], dependencies: [{ kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration"], outputs: ["dragStart", "dragEnd", "gutterClick", "gutterDblClick"
|
|
48965
|
+
BaseCauHinhWorkflowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: BaseCauHinhWorkflowComponent, selector: "base-cauhinh-workflow", providers: [ComponentContextService], usesInheritance: true, ngImport: i0, template: "<div class=\"tn-main-content\">\r\n <as-split>\r\n <as-split-area [size]=\"40\">\r\n <base-dm-loai-congviec [inCauHinhWorkflow]=\"true\" (onRowSelect)=\"handleSelectLoaiCongViec($event)\">\r\n </base-dm-loai-congviec>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <base-cauhinh-workflow-detail [isDetail]=\"true\" [itemLoaiCongViec]=\"itemLoaiCongViec\">\r\n </base-cauhinh-workflow-detail>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".container-task-info .percent-done{position:relative;border-radius:2px;background-color:#f0f0f0;height:5px;margin-top:5px;overflow:hidden}.container-task-info .percent-done .detail{position:absolute;left:0;top:0;height:5px;border-radius:2px;font-size:13px;text-align:center;color:#fff}\n"], dependencies: [{ kind: "component", type: i4$8.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration", "gutterClickDeltaPx", "gutterAriaLabel"], outputs: ["transitionEnd", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"], exportAs: ["asSplit"] }, { kind: "directive", type: i4$8.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "component", type: BaseCauHinhWorkflowDetailComponent, selector: "base-cauhinh-workflow-detail", inputs: ["isDetail", "itemLoaiCongViec"] }, { kind: "component", type: BaseDmLoaiCongViecComponent, selector: "base-dm-loai-congviec", inputs: ["inCauHinhWorkflow"], outputs: ["onRowSelect"] }] });
|
|
49041
48966
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BaseCauHinhWorkflowComponent, decorators: [{
|
|
49042
48967
|
type: Component,
|
|
49043
48968
|
args: [{ selector: 'base-cauhinh-workflow', providers: [ComponentContextService], template: "<div class=\"tn-main-content\">\r\n <as-split>\r\n <as-split-area [size]=\"40\">\r\n <base-dm-loai-congviec [inCauHinhWorkflow]=\"true\" (onRowSelect)=\"handleSelectLoaiCongViec($event)\">\r\n </base-dm-loai-congviec>\r\n </as-split-area>\r\n <as-split-area [size]=\"60\">\r\n <div style=\"height: 100%\">\r\n <base-cauhinh-workflow-detail [isDetail]=\"true\" [itemLoaiCongViec]=\"itemLoaiCongViec\">\r\n </base-cauhinh-workflow-detail>\r\n </div>\r\n </as-split-area>\r\n </as-split>\r\n</div>", styles: [".container-task-info .percent-done{position:relative;border-radius:2px;background-color:#f0f0f0;height:5px;margin-top:5px;overflow:hidden}.container-task-info .percent-done .detail{position:absolute;left:0;top:0;height:5px;border-radius:2px;font-size:13px;text-align:center;color:#fff}\n"] }]
|
|
@@ -51043,10 +50968,10 @@ class UniqueNumberService {
|
|
|
51043
50968
|
this.serviceUri = this.endPoint;
|
|
51044
50969
|
}
|
|
51045
50970
|
getUniqueNumber(code) {
|
|
51046
|
-
return this._http.get(`${this.serviceUri}/Main/GetUniqueNumber/${code}`)
|
|
50971
|
+
return firstValueFrom(this._http.get(`${this.serviceUri}/Main/GetUniqueNumber/${code}`));
|
|
51047
50972
|
}
|
|
51048
50973
|
confirmUniqueNumber(code, number) {
|
|
51049
|
-
return this._http.get(`${this.serviceUri}/Main/ConfirmUniqueNumber/${code}/${number}`)
|
|
50974
|
+
return firstValueFrom(this._http.get(`${this.serviceUri}/Main/ConfirmUniqueNumber/${code}/${number}`));
|
|
51050
50975
|
}
|
|
51051
50976
|
}
|
|
51052
50977
|
UniqueNumberService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: UniqueNumberService, deps: [{ token: i1$1.HttpClient }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|