tnx-shared 5.3.145 → 5.3.146

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.
@@ -32385,6 +32385,703 @@
32385
32385
  { type: UserService }
32386
32386
  ]; };
32387
32387
 
32388
+ var HighPerformanceService = /** @class */ (function () {
32389
+ function HighPerformanceService(_signalrService, _commonService, _httpClient, _moduleConfigService) {
32390
+ this._signalrService = _signalrService;
32391
+ this._commonService = _commonService;
32392
+ this._httpClient = _httpClient;
32393
+ this._moduleConfigService = _moduleConfigService;
32394
+ }
32395
+ HighPerformanceService.prototype.createProcess = function (queueName, callBackOnMessage, data, returnSequenceNumber) {
32396
+ var _this = this;
32397
+ if (callBackOnMessage === void 0) { callBackOnMessage = null; }
32398
+ if (data === void 0) { data = null; }
32399
+ if (returnSequenceNumber === void 0) { returnSequenceNumber = false; }
32400
+ var internalClientKey = this._commonService.guid();
32401
+ var model = {
32402
+ queueName: queueName,
32403
+ data: data,
32404
+ clientKey: internalClientKey
32405
+ };
32406
+ this._signalrService.start(null, internalClientKey, function (data) {
32407
+ if (callBackOnMessage) {
32408
+ callBackOnMessage(data);
32409
+ }
32410
+ _this._signalrService.unSubscribeViewCode(null, internalClientKey);
32411
+ });
32412
+ return new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
32413
+ var highPerformanceEndpoint, rs, _a_1;
32414
+ return __generator(this, function (_b) {
32415
+ switch (_b.label) {
32416
+ case 0:
32417
+ this.env = this._moduleConfigService.getConfig().environment;
32418
+ highPerformanceEndpoint = this.env.apiDomain.highPerformanceEndpoint + "/HighPerformance/DoWork?returnSequenceNumber=" + returnSequenceNumber;
32419
+ _b.label = 1;
32420
+ case 1:
32421
+ _b.trys.push([1, 3, , 4]);
32422
+ return [4 /*yield*/, this._httpClient.post(highPerformanceEndpoint, model).toPromise()];
32423
+ case 2:
32424
+ rs = _b.sent();
32425
+ if (rs.success) {
32426
+ resolve(rs.data);
32427
+ }
32428
+ return [3 /*break*/, 4];
32429
+ case 3:
32430
+ _a_1 = _b.sent();
32431
+ return [3 /*break*/, 4];
32432
+ case 4:
32433
+ resolve(null);
32434
+ return [2 /*return*/];
32435
+ }
32436
+ });
32437
+ }); });
32438
+ };
32439
+ HighPerformanceService.prototype.cancelProcess = function (queueName, uniqueKey) {
32440
+ return __awaiter(this, void 0, void 0, function () {
32441
+ var highPerformanceEndpoint, rs, _a_2;
32442
+ return __generator(this, function (_b) {
32443
+ switch (_b.label) {
32444
+ case 0:
32445
+ _b.trys.push([0, 2, , 3]);
32446
+ highPerformanceEndpoint = this.env.apiDomain.highPerformanceEndpoint + "/HighPerformance/CancelWork?queueName=" + queueName + "&uniqueKey=" + uniqueKey;
32447
+ return [4 /*yield*/, this._httpClient.post(highPerformanceEndpoint, {}).toPromise()];
32448
+ case 1:
32449
+ rs = _b.sent();
32450
+ if (rs.success) {
32451
+ return [2 /*return*/, rs.data];
32452
+ }
32453
+ return [3 /*break*/, 3];
32454
+ case 2:
32455
+ _a_2 = _b.sent();
32456
+ return [3 /*break*/, 3];
32457
+ case 3: return [2 /*return*/, false];
32458
+ }
32459
+ });
32460
+ });
32461
+ };
32462
+ return HighPerformanceService;
32463
+ }());
32464
+ HighPerformanceService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function HighPerformanceService_Factory() { return new HighPerformanceService(i0__namespace.ɵɵinject(SignalRService), i0__namespace.ɵɵinject(CommonService), i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(ModuleConfigService)); }, token: HighPerformanceService, providedIn: "root" });
32465
+ HighPerformanceService.decorators = [
32466
+ { type: i0.Injectable, args: [{
32467
+ providedIn: 'root'
32468
+ },] }
32469
+ ];
32470
+ HighPerformanceService.ctorParameters = function () { return [
32471
+ { type: SignalRService },
32472
+ { type: CommonService },
32473
+ { type: i1$1.HttpClient },
32474
+ { type: ModuleConfigService }
32475
+ ]; };
32476
+
32477
+ var TemplateService = /** @class */ (function () {
32478
+ function TemplateService(_moduleConfigService, _httpClient, _printService, _fileService, _notifierService, _crudService, _commonService) {
32479
+ this._httpClient = _httpClient;
32480
+ this._printService = _printService;
32481
+ this._fileService = _fileService;
32482
+ this._notifierService = _notifierService;
32483
+ this._crudService = _crudService;
32484
+ this._commonService = _commonService;
32485
+ this._moduleConfig = _moduleConfigService.getConfig();
32486
+ this.environment = this._moduleConfig.environment;
32487
+ this.serviceUri = this.environment.apiDomain.templateEndpoint + "/template";
32488
+ }
32489
+ TemplateService.prototype.laTexToBase64Image = function (laTex, font) {
32490
+ if (font === void 0) { font = 54; }
32491
+ var api = this.serviceUri + "/LatexToBase64";
32492
+ return this._httpClient.post(api, { laTex: laTex, font: font }).toPromise();
32493
+ };
32494
+ /**
32495
+ * Description: Xuất file sử dụng thư viện CX, xuất xong tự động mở popup để lưu file.
32496
+ */
32497
+ TemplateService.prototype.exportCxExcelByCode = function (model) {
32498
+ var _this = this;
32499
+ var url = this.serviceUri + "/ExportCxExcelByCode";
32500
+ this.setFileInfo(model);
32501
+ return this._httpClient
32502
+ .post(url, model, { responseType: 'blob' })
32503
+ .toPromise()
32504
+ .then(function (res) {
32505
+ FileSaver__namespace.saveAs(res, _this.getFullFileName(model.fileName || model.code));
32506
+ }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
32507
+ var errorText;
32508
+ return __generator(this, function (_a) {
32509
+ switch (_a.label) {
32510
+ case 0: return [4 /*yield*/, err.error.text()];
32511
+ case 1:
32512
+ errorText = _a.sent();
32513
+ this._crudService.processErrorResponse(JSON.parse(errorText || ''));
32514
+ return [2 /*return*/];
32515
+ }
32516
+ });
32517
+ }); });
32518
+ };
32519
+ TemplateService.prototype.exportManyCxExcelByCode = function (model) {
32520
+ var _this = this;
32521
+ var url = this.serviceUri + "/ExportManyCxExcelByCode";
32522
+ this.setManyFileInfo(model);
32523
+ return this._httpClient
32524
+ .post(url, model)
32525
+ .toPromise()
32526
+ .then(function (res) {
32527
+ if (res.success) {
32528
+ _this._fileService.downloadFolder(res.data.folderId);
32529
+ }
32530
+ else {
32531
+ _this._crudService.processErrorResponse(res);
32532
+ }
32533
+ }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
32534
+ var errorText;
32535
+ return __generator(this, function (_a) {
32536
+ switch (_a.label) {
32537
+ case 0: return [4 /*yield*/, err.error.text()];
32538
+ case 1:
32539
+ errorText = _a.sent();
32540
+ this._crudService.processErrorResponse(JSON.parse(errorText || ''));
32541
+ return [2 /*return*/];
32542
+ }
32543
+ });
32544
+ }); });
32545
+ };
32546
+ TemplateService.prototype.getFullFileName = function (fileName, extension) {
32547
+ if (extension === void 0) { extension = TemplateConstant.EXCEL_EXTENSION; }
32548
+ return "" + fileName + extension;
32549
+ };
32550
+ /**
32551
+ * Description: Export sử dung ClosedXml.Report (Cx) với signalR, sử dụng cho file dữ liệu lớn.
32552
+ * Param: model chứa
32553
+ * - code : code của template cấu hình bên Quản trị > Biểu mẫu > Biểu mẫu excel.
32554
+ * - data : object chứa dữ liệu đã chuyền thành dạng json.
32555
+ * - fileName: tên file sau khi export.
32556
+ * - topic: guid dùng để subscribe.
32557
+ */
32558
+ TemplateService.prototype.ExportCxExcelByCodeWithSignalR = function (model) {
32559
+ return __awaiter(this, void 0, void 0, function () {
32560
+ var url;
32561
+ return __generator(this, function (_a) {
32562
+ url = this.serviceUri + "/ExportCxExcelByCodeWithSignalR";
32563
+ return [2 /*return*/, this._httpClient.post(url, model)
32564
+ .toPromise()];
32565
+ });
32566
+ });
32567
+ };
32568
+ /**
32569
+ * Description: Export sử dung ClosedXml.Report (Cx) với HighPerformanceService, sử dụng cho file dữ liệu lớn.
32570
+ * Param: model chứa
32571
+ * - code : code của template cấu hình bên Quản trị > Biểu mẫu > Biểu mẫu excel.
32572
+ * - data : object chứa dữ liệu đã chuyền thành dạng json.
32573
+ * - fileName: tên file sau khi export.
32574
+ * - queueName: queue của topic.
32575
+ * - uniqueKey: unique key cho task.
32576
+ */
32577
+ TemplateService.prototype.ExportCxExcelByCodeWithHPS = function (model) {
32578
+ return __awaiter(this, void 0, void 0, function () {
32579
+ var url;
32580
+ return __generator(this, function (_a) {
32581
+ url = this.serviceUri + "/ExportWithHighPerformanceService";
32582
+ return [2 /*return*/, this._httpClient.post(url, model)
32583
+ .toPromise()];
32584
+ });
32585
+ });
32586
+ };
32587
+ TemplateService.prototype.exportCxExcelByCodePromise = function (model) {
32588
+ return __awaiter(this, void 0, void 0, function () {
32589
+ var url;
32590
+ return __generator(this, function (_a) {
32591
+ url = this.serviceUri + "/ExportCxExcelByCode";
32592
+ return [2 /*return*/, this._httpClient
32593
+ .post(url, model, { responseType: 'blob' })
32594
+ .toPromise()];
32595
+ });
32596
+ });
32597
+ };
32598
+ TemplateService.prototype.fillTemplateByCodeAndGetPdf = function (templateCode, data, onLoadingDataPdf, onEndLoadingDataPdf) {
32599
+ var _this = this;
32600
+ if (onLoadingDataPdf === void 0) { onLoadingDataPdf = null; }
32601
+ if (onEndLoadingDataPdf === void 0) { onEndLoadingDataPdf = null; }
32602
+ var url = this.serviceUri + "/fillWordByTemplateCode/" + templateCode + "?isPrint=true";
32603
+ return this._httpClient
32604
+ .post(url, data)
32605
+ .toPromise().then(function (res) {
32606
+ if (res.data) {
32607
+ _this._printService.printBase64Pdf(res.data, onLoadingDataPdf, onEndLoadingDataPdf);
32608
+ }
32609
+ });
32610
+ };
32611
+ TemplateService.prototype.fillWordByTemplateCodeMultiData = function (templateCode, data, onLoadingDataPdf, onEndLoadingDataPdf) {
32612
+ var _this = this;
32613
+ if (onLoadingDataPdf === void 0) { onLoadingDataPdf = null; }
32614
+ if (onEndLoadingDataPdf === void 0) { onEndLoadingDataPdf = null; }
32615
+ var url = this.serviceUri + "/fillWordByTemplateCodeMultiData/" + templateCode + "?isPrint=true";
32616
+ return this._httpClient
32617
+ .post(url, data)
32618
+ .toPromise().then(function (res) {
32619
+ if (res.data) {
32620
+ _this._printService.printBase64Pdf(res.data, onLoadingDataPdf, onEndLoadingDataPdf);
32621
+ }
32622
+ });
32623
+ };
32624
+ TemplateService.prototype.setFileInfo = function (model) {
32625
+ model.data = model.data ? model.data : JSON.stringify(model.dataObject);
32626
+ delete model.dataObject;
32627
+ };
32628
+ TemplateService.prototype.setManyFileInfo = function (manyModel) {
32629
+ var _this = this;
32630
+ var hasModel = manyModel && manyModel.lstFileInfo && manyModel.lstFileInfo.length;
32631
+ if (!hasModel) {
32632
+ return;
32633
+ }
32634
+ manyModel.lstFileInfo.forEach(function (fileInfo) {
32635
+ _this.setFileInfo(fileInfo);
32636
+ fileInfo.fileName = fileInfo.fileName + "_" + _this._commonService.guid() + "." + TemplateConstant.EXCEL_EXTENSION;
32637
+ });
32638
+ };
32639
+ /**
32640
+ * Export dữ liệu không dùng template.
32641
+ */
32642
+ TemplateService.prototype.exportCxExcel = function (model) {
32643
+ var _this = this;
32644
+ var url = this.serviceUri + "/ExportCxExcel";
32645
+ return this._httpClient
32646
+ .post(url, model, { responseType: 'blob' })
32647
+ .toPromise()
32648
+ .then(function (res) {
32649
+ FileSaver__namespace.saveAs(res, _this.getFullFileName(model.fileName || 'Export'));
32650
+ }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
32651
+ var errorText;
32652
+ return __generator(this, function (_a) {
32653
+ switch (_a.label) {
32654
+ case 0: return [4 /*yield*/, err.error.text()];
32655
+ case 1:
32656
+ errorText = _a.sent();
32657
+ this._crudService.processErrorResponse(JSON.parse(errorText || ''));
32658
+ return [2 /*return*/];
32659
+ }
32660
+ });
32661
+ }); });
32662
+ };
32663
+ TemplateService.prototype.exportCxExcelPromise = function (model) {
32664
+ return __awaiter(this, void 0, void 0, function () {
32665
+ var url;
32666
+ return __generator(this, function (_a) {
32667
+ url = this.serviceUri + "/ExportCxExcel";
32668
+ return [2 /*return*/, this._httpClient
32669
+ .post(url, model, { responseType: 'blob' })
32670
+ .toPromise()];
32671
+ });
32672
+ });
32673
+ };
32674
+ return TemplateService;
32675
+ }());
32676
+ TemplateService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TemplateService_Factory() { return new TemplateService(i0__namespace.ɵɵinject(ModuleConfigService), i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(PrintService), i0__namespace.ɵɵinject(FileExplorerService), i0__namespace.ɵɵinject(NotifierService), i0__namespace.ɵɵinject(CrudService), i0__namespace.ɵɵinject(CommonService)); }, token: TemplateService, providedIn: "root" });
32677
+ TemplateService.decorators = [
32678
+ { type: i0.Injectable, args: [{
32679
+ providedIn: 'root'
32680
+ },] }
32681
+ ];
32682
+ TemplateService.ctorParameters = function () { return [
32683
+ { type: ModuleConfigService },
32684
+ { type: i1$1.HttpClient },
32685
+ { type: PrintService },
32686
+ { type: FileExplorerService },
32687
+ { type: NotifierService },
32688
+ { type: CrudService },
32689
+ { type: CommonService }
32690
+ ]; };
32691
+
32692
+ var JobItem = /** @class */ (function () {
32693
+ function JobItem(code, data, fileName, status) {
32694
+ if (fileName === void 0) { fileName = 'BaoCao'; }
32695
+ if (status === void 0) { status = REPORT_QUEUE_CONSTANT.statuses.Waiting; }
32696
+ // Loại export.
32697
+ this._type = JobTypes.SingnalR;
32698
+ this._code = code;
32699
+ var datepipe = new i3.DatePipe('en-US');
32700
+ var formattedDate = datepipe.transform(new Date(), 'ddMMyyyy_hhmmss');
32701
+ this._fileName = fileName + "_" + formattedDate + TemplateConstant.EXCEL_EXTENSION;
32702
+ this._data = data || {};
32703
+ this._status = status;
32704
+ }
32705
+ return JobItem;
32706
+ }());
32707
+ var REPORT_QUEUE_CONSTANT = /** @class */ (function () {
32708
+ function REPORT_QUEUE_CONSTANT() {
32709
+ }
32710
+ return REPORT_QUEUE_CONSTANT;
32711
+ }());
32712
+ REPORT_QUEUE_CONSTANT.statuses = {
32713
+ Waiting: 1,
32714
+ Exporting: 2,
32715
+ Success: 3,
32716
+ Error: 4,
32717
+ Downloaded: 5
32718
+ };
32719
+ REPORT_QUEUE_CONSTANT.dicStatus = new SimpleDictionary([
32720
+ new SimpleDicItem(REPORT_QUEUE_CONSTANT.statuses.Waiting, 'Chờ để xử lý'),
32721
+ new SimpleDicItem(REPORT_QUEUE_CONSTANT.statuses.Exporting, 'Đang xử lý'),
32722
+ new SimpleDicItem(REPORT_QUEUE_CONSTANT.statuses.Success, 'Tải xuống'),
32723
+ new SimpleDicItem(REPORT_QUEUE_CONSTANT.statuses.Error, 'Xuất file chưa thành công'),
32724
+ new SimpleDicItem(REPORT_QUEUE_CONSTANT.statuses.Downloaded, 'Đã tải'),
32725
+ ]);
32726
+ var JobTypes;
32727
+ (function (JobTypes) {
32728
+ JobTypes[JobTypes["Normal"] = 1] = "Normal";
32729
+ JobTypes[JobTypes["SingnalR"] = 2] = "SingnalR";
32730
+ JobTypes[JobTypes["Many"] = 3] = "Many"; // Export nhiều file cùng một lúc và nén vào file zip, mỗi file có thể là các loại biểu mẫu khác nhau.
32731
+ })(JobTypes || (JobTypes = {}));
32732
+ var ExportJob = /** @class */ (function () {
32733
+ function ExportJob(templateCode, // code template cấu hình bên quản trị
32734
+ dataPromise, // promise dùng để lấy dữ liệu, trả về dạng ResponseResult
32735
+ fileName, // tên của file được lưu
32736
+ rootName, // tên thuộc tính của lst dữ liệu ngoài cùng
32737
+ cb, // dùng để xử lý dữ liệu sau khi lấy xong
32738
+ type // Loại export.
32739
+ ) {
32740
+ if (rootName === void 0) { rootName = ''; }
32741
+ if (cb === void 0) { cb = null; }
32742
+ if (type === void 0) { type = JobTypes.Normal; }
32743
+ this.templateCode = templateCode;
32744
+ this.dataPromise = dataPromise;
32745
+ this.fileName = fileName;
32746
+ this.rootName = rootName;
32747
+ this.cb = cb;
32748
+ this.type = type;
32749
+ }
32750
+ return ExportJob;
32751
+ }());
32752
+
32753
+ var ReportQueueComponent = /** @class */ (function () {
32754
+ function ReportQueueComponent(_notifierService, _commonService, _fileService, _tempateService, _signalRService, _highPerformanceService, _crudService) {
32755
+ this._notifierService = _notifierService;
32756
+ this._commonService = _commonService;
32757
+ this._fileService = _fileService;
32758
+ this._tempateService = _tempateService;
32759
+ this._signalRService = _signalRService;
32760
+ this._highPerformanceService = _highPerformanceService;
32761
+ this._crudService = _crudService;
32762
+ this.name = 'reportQueue';
32763
+ this.header = 'Xuất báo cáo';
32764
+ this.autoDownload = false;
32765
+ this.maxNameLength = 40;
32766
+ this.expand = true;
32767
+ this.queueName = 'REPORT_QUEUE';
32768
+ this.hub = 'CommonHub';
32769
+ this.dicStatus = REPORT_QUEUE_CONSTANT.dicStatus;
32770
+ this.statuses = REPORT_QUEUE_CONSTANT.statuses;
32771
+ this._queue = [];
32772
+ this.maxHeight = 200;
32773
+ this.itemHeight = 50;
32774
+ this.popupHeight = this.itemHeight;
32775
+ }
32776
+ ReportQueueComponent.prototype.ngOnInit = function () {
32777
+ if (this.parentDataModel && this.name) {
32778
+ this.parentDataModel[this.name] = this;
32779
+ }
32780
+ };
32781
+ ReportQueueComponent.prototype.toggleExpand = function () {
32782
+ this.expand = !this.expand;
32783
+ };
32784
+ /**
32785
+ * Thêm job vào để thực hiện
32786
+ */
32787
+ ReportQueueComponent.prototype.addJob = function (exportJob) {
32788
+ return __awaiter(this, void 0, void 0, function () {
32789
+ var foundIndex, job, rsData;
32790
+ var _this = this;
32791
+ return __generator(this, function (_a) {
32792
+ switch (_a.label) {
32793
+ case 0:
32794
+ foundIndex = this._queue.findIndex(function (job) { return job._code == exportJob.templateCode && job._status == _this.statuses.Exporting; });
32795
+ if (foundIndex !== -1) {
32796
+ this._notifierService.showWarning("File cùng loại đang được xử lý, thử lại sau khi xử lý xong!");
32797
+ return [2 /*return*/];
32798
+ }
32799
+ job = new JobItem(exportJob.templateCode, {}, exportJob.fileName || exportJob.templateCode, this.statuses.Exporting);
32800
+ this._queue.push(job);
32801
+ this.updatePopupHeight();
32802
+ setTimeout(function () {
32803
+ _this.scrollbar.scrollToBottom();
32804
+ }, 100);
32805
+ return [4 /*yield*/, exportJob.dataPromise];
32806
+ case 1:
32807
+ rsData = _a.sent();
32808
+ if (rsData.data == null) {
32809
+ job._status = this.statuses.Error;
32810
+ return [2 /*return*/, this._crudService.processErrorResponse(rsData)];
32811
+ }
32812
+ if (exportJob.cb) {
32813
+ job._data = exportJob.cb(rsData.data);
32814
+ }
32815
+ else if (exportJob.rootName) {
32816
+ job._data[exportJob.rootName] = rsData.data;
32817
+ }
32818
+ else {
32819
+ job._data = rsData.data;
32820
+ }
32821
+ switch (exportJob.type) {
32822
+ case JobTypes.Normal:
32823
+ this.Export(job);
32824
+ break;
32825
+ case JobTypes.SingnalR:
32826
+ this.ExportWithSignalR(job);
32827
+ break;
32828
+ case JobTypes.Many:
32829
+ break;
32830
+ }
32831
+ return [2 /*return*/];
32832
+ }
32833
+ });
32834
+ });
32835
+ };
32836
+ /**
32837
+ * Thêm job vào để thực hiện
32838
+ * - templateCode: code template cấu hình bên quản trị
32839
+ * - data: dữ liệu export
32840
+ * - fileName: tên của file được lưu
32841
+ * - useSignalR: thay vì gọi request và chờ đến khi thực hiện xong
32842
+ * trả về binaryFile thì tạo tiến trình riêng để export, và dùng signalR thông
32843
+ * báo kết quả export, trả về fileId để tải.
32844
+ */
32845
+ ReportQueueComponent.prototype.addJobWithData = function (templateCode, data, fileName, useSignalR) {
32846
+ if (useSignalR === void 0) { useSignalR = false; }
32847
+ return __awaiter(this, void 0, void 0, function () {
32848
+ var foundIndex, job;
32849
+ var _this = this;
32850
+ return __generator(this, function (_a) {
32851
+ foundIndex = this._queue.findIndex(function (job) { return job._code == templateCode && job._status == _this.statuses.Exporting; });
32852
+ if (foundIndex !== -1) {
32853
+ this._notifierService.showWarning("File cùng loại đang được xử lý, thử lại sau khi xử lý xong!");
32854
+ return [2 /*return*/];
32855
+ }
32856
+ job = new JobItem(templateCode, data, fileName || templateCode, this.statuses.Exporting);
32857
+ this._queue.push(job);
32858
+ if (useSignalR) {
32859
+ this.ExportWithSignalR(job);
32860
+ }
32861
+ else {
32862
+ this.Export(job);
32863
+ }
32864
+ return [2 /*return*/];
32865
+ });
32866
+ });
32867
+ };
32868
+ ReportQueueComponent.prototype.Export = function (job) {
32869
+ return __awaiter(this, void 0, void 0, function () {
32870
+ var _this = this;
32871
+ return __generator(this, function (_a) {
32872
+ this._tempateService.exportCxExcelByCodePromise({ code: job._code, data: JSON.stringify(job._data), fileName: job._fileName })
32873
+ .then(function (file) {
32874
+ job._status = _this.statuses.Success;
32875
+ job._binaryFile = file;
32876
+ if (_this.autoDownload) {
32877
+ _this.download(job);
32878
+ }
32879
+ }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
32880
+ var errorText;
32881
+ return __generator(this, function (_a) {
32882
+ switch (_a.label) {
32883
+ case 0:
32884
+ job._status = this.statuses.Error;
32885
+ return [4 /*yield*/, err.error.text()];
32886
+ case 1:
32887
+ errorText = _a.sent();
32888
+ this._crudService.processErrorResponse(JSON.parse(errorText || ''));
32889
+ return [2 /*return*/];
32890
+ }
32891
+ });
32892
+ }); });
32893
+ return [2 /*return*/];
32894
+ });
32895
+ });
32896
+ };
32897
+ ReportQueueComponent.prototype.ExportWithSignalR = function (job) {
32898
+ return __awaiter(this, void 0, void 0, function () {
32899
+ var topic;
32900
+ var _this = this;
32901
+ return __generator(this, function (_a) {
32902
+ topic = this._commonService.guid();
32903
+ job._uniqueKey = topic;
32904
+ this._signalRService.start(this.hub, topic, function (message) {
32905
+ var rs = JSON.parse(message);
32906
+ if (rs.success) {
32907
+ job._status = _this.statuses.Success;
32908
+ job._fileId = rs.data;
32909
+ if (_this.autoDownload) {
32910
+ _this.download(job);
32911
+ }
32912
+ }
32913
+ else {
32914
+ job._status = _this.statuses.Error;
32915
+ _this._crudService.processErrorResponse(rs);
32916
+ }
32917
+ });
32918
+ this._tempateService.ExportCxExcelByCodeWithSignalR({ code: job._code, data: JSON.stringify(job._data), fileName: job._fileName, topic: topic })
32919
+ .then(function (rs) {
32920
+ if (!rs.success) {
32921
+ job._status = _this.statuses.Error;
32922
+ _this._crudService.processErrorResponse(rs);
32923
+ }
32924
+ }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
32925
+ return __generator(this, function (_a) {
32926
+ job._status = this.statuses.Error;
32927
+ this._crudService.processErrorResponse(err.error);
32928
+ return [2 /*return*/];
32929
+ });
32930
+ }); });
32931
+ ;
32932
+ return [2 /*return*/];
32933
+ });
32934
+ });
32935
+ };
32936
+ ReportQueueComponent.prototype.ExportCxExcelByCodeWithHPS = function (job) {
32937
+ return __awaiter(this, void 0, void 0, function () {
32938
+ var _this = this;
32939
+ return __generator(this, function (_a) {
32940
+ this._highPerformanceService.createProcess(this.queueName, function (arrMessage) {
32941
+ var message = arrMessage.pop();
32942
+ var rs = JSON.parse(message);
32943
+ if (rs.success) {
32944
+ job._status = _this.statuses.Success;
32945
+ job._fileId = rs.data;
32946
+ if (_this.autoDownload) {
32947
+ _this._fileService.downloadFile(job._fileId);
32948
+ job._status = _this.statuses.Downloaded;
32949
+ job._fileId = null;
32950
+ }
32951
+ }
32952
+ else {
32953
+ job._status = _this.statuses.Error;
32954
+ _this._crudService.processErrorResponse(rs);
32955
+ }
32956
+ }).then(function (rs) {
32957
+ job._uniqueKey = rs;
32958
+ _this._tempateService.ExportCxExcelByCodeWithHPS({
32959
+ code: job._code,
32960
+ data: JSON.stringify(job._data),
32961
+ fileName: job._fileName,
32962
+ topic: _this.queueName,
32963
+ uniqueKey: job._uniqueKey
32964
+ }).then(function (rs) {
32965
+ if (!rs.success) {
32966
+ job._status = _this.statuses.Error;
32967
+ _this._crudService.processErrorResponse(rs);
32968
+ }
32969
+ }, function (err) {
32970
+ job._status = _this.statuses.Error;
32971
+ console.log("Lỗi gọi api server export");
32972
+ });
32973
+ }, function (err) {
32974
+ job._status = _this.statuses.Error;
32975
+ console.log("Lỗi gọi HPS service :(");
32976
+ });
32977
+ return [2 /*return*/];
32978
+ });
32979
+ });
32980
+ };
32981
+ ReportQueueComponent.prototype.download = function (job) {
32982
+ if (job._status == this.statuses.Downloaded) {
32983
+ return;
32984
+ }
32985
+ if (job._fileId) {
32986
+ this._fileService.downloadFile(job._fileId, false, job._fileName);
32987
+ }
32988
+ else if (job._binaryFile) {
32989
+ FileSaver__namespace.saveAs(job._binaryFile, job._fileName);
32990
+ }
32991
+ job._status = this.statuses.Downloaded;
32992
+ job._binaryFile = null;
32993
+ job._fileId = null;
32994
+ };
32995
+ ReportQueueComponent.prototype.showQueue = function () {
32996
+ var show = this._queue && this._queue.length > 0;
32997
+ return show;
32998
+ };
32999
+ ReportQueueComponent.prototype.getName = function (job) {
33000
+ var name = job._fileName.length > this.maxNameLength ? job._fileName.substr(0, this.maxNameLength - 10) + "[...]" + TemplateConstant.EXCEL_EXTENSION : job._fileName;
33001
+ return name;
33002
+ };
33003
+ ReportQueueComponent.prototype.cancelJob = function (job) {
33004
+ var _this = this;
33005
+ var foundIndex = this._queue.findIndex(function (j) { return j._code == job._code; });
33006
+ if (foundIndex == -1) {
33007
+ return;
33008
+ }
33009
+ var foundJob = this._queue[foundIndex];
33010
+ if (foundJob._status == this.statuses.Exporting) {
33011
+ this._notifierService
33012
+ .showConfirm('File này đang được xử lý. Bạn có muốn dừng lại?', 'Hủy xuất file')
33013
+ .then(function (rs) {
33014
+ if (!rs) {
33015
+ return;
33016
+ }
33017
+ var needUnsubscribe = foundJob._type == JobTypes.SingnalR && foundJob._uniqueKey;
33018
+ if (needUnsubscribe) {
33019
+ _this._signalRService.unSubscribeViewCode(foundJob._uniqueKey, _this.hub);
33020
+ }
33021
+ _this._queue.splice(foundIndex, 1);
33022
+ _this.updatePopupHeight();
33023
+ });
33024
+ }
33025
+ else if (foundJob._status != this.statuses.Exporting) {
33026
+ this._queue.splice(foundIndex, 1);
33027
+ this.updatePopupHeight();
33028
+ }
33029
+ };
33030
+ ReportQueueComponent.prototype.close = function () {
33031
+ var _this = this;
33032
+ var hasExporting = this._queue && this._queue.filter(function (item) { return item._status == _this.statuses.Exporting; }).length > 0;
33033
+ if (hasExporting) {
33034
+ this._notifierService
33035
+ .showConfirm('Có file đang được xử lý. Bạn có muốn dừng lại?', 'Hủy xuất file')
33036
+ .then(function (rs) {
33037
+ if (!rs) {
33038
+ return;
33039
+ }
33040
+ var needUnsubscribe = false;
33041
+ _this._queue.forEach(function (job) {
33042
+ needUnsubscribe = job._type == JobTypes.SingnalR && job._uniqueKey;
33043
+ if (needUnsubscribe) {
33044
+ _this._signalRService.unSubscribeViewCode(job._uniqueKey, _this.hub);
33045
+ }
33046
+ });
33047
+ _this._queue = [];
33048
+ _this.updatePopupHeight();
33049
+ });
33050
+ }
33051
+ else {
33052
+ this._queue = [];
33053
+ }
33054
+ };
33055
+ ReportQueueComponent.prototype.updatePopupHeight = function () {
33056
+ var height = (this._queue || []).length * this.itemHeight;
33057
+ this.popupHeight = height > this.maxHeight ? this.maxHeight : height;
33058
+ };
33059
+ return ReportQueueComponent;
33060
+ }());
33061
+ ReportQueueComponent.decorators = [
33062
+ { type: i0.Component, args: [{
33063
+ selector: 'report-queue',
33064
+ template: "<div class=\"rq-container\" *ngIf=\"showQueue()\">\n <div class=\"rq-header\">\n <div>{{header | translate}}</div>\n <div>\n\n <p-checkbox [(ngModel)]=\"autoDownload\" binary=\"true\" pTooltip=\"T\u1EF1 \u0111\u1ED9ng t\u1EA3i\" tooltipPosition=\"left\">\n </p-checkbox>\n\n <a href=\"javascript:;\" (click)=\"toggleExpand()\" pTooltip=\"{{expand ? 'Thu g\u1ECDn' : 'M\u1EDF r\u1ED9ng'}}\"\n tooltipPosition=\"left\">\n <i class=\"fas\" [ngClass]=\"{'fa-compress' : expand, 'fa-expand': !expand}\"></i>\n </a>\n\n <a href=\"javascript:;\" (click)=\"close()\" pTooltip=\"\u0110\u00F3ng\">\n <i class=\"fas fa-times\"></i>\n </a>\n </div>\n </div>\n <div class=\"rq-body\" *ngIf=\"expand\">\n <tn-custom-scrollbar [style]=\"{'height.px': popupHeight}\" #scrollbar>\n <div class=\"re-job\" *ngFor=\"let job of _queue\">\n <div class=\"re-job-title\">\n <div>{{getName(job)}}</div>\n <div>\n <a href=\"javascript:;\" (click)=\"cancelJob(job)\">\n <i class=\"fas fa-times\"></i>\n </a>\n </div>\n </div>\n <div class=\"re-job-result\"\n [ngClass]=\"{'job-success': job._status == statuses.Success, 'job-error': job._status == statuses.Error, 'job-exporting' : job._status == statuses.Exporting, 'job-downloaded': job._status == statuses.Downloaded}\">\n <span *ngIf=\"job._status != statuses.Success && job._status != statuses.Exporting\">\n {{dicStatus.get(job._status) | translate}}\n </span>\n\n <span *ngIf=\"job._status == statuses.Exporting\">\n <div class=\"loader\"></div>\n {{dicStatus.get(job._status) | translate}}\n </span>\n\n <a href=\"javascript:;\" (click)=\"download(job)\" class=\"job-success\"\n *ngIf=\"job._status == statuses.Success\">\n <i class=\"fas fa-download\"></i> {{dicStatus.get(job._status) | translate}}\n </a>\n </div>\n </div>\n </tn-custom-scrollbar>\n </div>\n</div>\n",
33065
+ styles: ["::ng-deep .rq-container{width:350px;border:1px solid #3192e1;border-radius:3px;background-color:#fff}::ng-deep .rq-container .rq-header{background-color:#3192e1;padding:5px 10px;display:flex;border-radius:3px 3px 0 0;color:#fff;font-weight:400;font-size:15px}::ng-deep .rq-container .rq-header>div:first-child{flex-grow:1}::ng-deep .rq-container .rq-header>div:last-child>a{font-weight:200;margin-left:10px;color:#fff}::ng-deep .rq-container .rq-header>div:last-child>a>i{font-size:13px}::ng-deep .rq-container .rq-header>div:last-child .ui-chkbox-box{width:14px;height:14px;margin-top:-2px}::ng-deep .rq-container .rq-header>div:last-child .ui-chkbox-icon{font-size:13px;line-height:13px}::ng-deep .rq-container .rq-body .re-job{padding:6px 10px;display:flex;flex-direction:column}::ng-deep .rq-container .rq-body .re-job:first-child{padding-top:6px}::ng-deep .rq-container .rq-body .re-job .re-job-title{display:flex;font-size:13px}::ng-deep .rq-container .rq-body .re-job .re-job-title>div:first-child{flex-grow:1;padding-bottom:3px}::ng-deep .rq-container .rq-body .re-job .re-job-title>div a{color:#3192e1}::ng-deep .rq-container .rq-body .re-job .re-job-result{font-size:11px}::ng-deep .rq-container .rq-body .re-job .re-job-result>span{display:flex;align-items:center;height:20px}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-exporting{color:#3192e1}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-exporting>span>div{margin-right:5px}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-success{color:#1ab91a}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-success>a>i{margin-right:2px}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-error{color:#e95353}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-downloaded{color:#b2b2b2}::ng-deep .loader{border-radius:50%;border:2px solid #bcdbf5;border-top-color:#3192e1;width:12px;height:12px;animation:spin 1s linear infinite;display:inline-block}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}:host{position:absolute;bottom:1px;right:2px;z-index:1000}"]
33066
+ },] }
33067
+ ];
33068
+ ReportQueueComponent.ctorParameters = function () { return [
33069
+ { type: NotifierService },
33070
+ { type: CommonService },
33071
+ { type: FileExplorerService },
33072
+ { type: TemplateService },
33073
+ { type: SignalRService },
33074
+ { type: HighPerformanceService },
33075
+ { type: CrudService }
33076
+ ]; };
33077
+ ReportQueueComponent.propDecorators = {
33078
+ parentDataModel: [{ type: i0.Input }],
33079
+ name: [{ type: i0.Input }],
33080
+ header: [{ type: i0.Input }],
33081
+ autoDownload: [{ type: i0.Input }],
33082
+ scrollbar: [{ type: i0.ViewChild, args: ['scrollbar',] }]
33083
+ };
33084
+
32388
33085
  var CommonAppComponentComponent = /** @class */ (function () {
32389
33086
  function CommonAppComponentComponent(document, _globalService, _commonService, renderer, translate, _oauthService, _authenService, _userService, _router, _title, _signalRService, _storageUpdatedService, _applicationContext, _componentContextService, _activatedRoute, _deviceDetectorService, _cd, _tnClientService, _coreConfigService, _notifierService, _entityMetadataService, _moduleConfigService, _menuService, _primengConfig, _storageService, _permissionService, _userOnlineDetailsService, _customizeUiService) {
32390
33087
  var _this = this;
@@ -32421,7 +33118,6 @@
32421
33118
  this.allowAnonymous = false;
32422
33119
  this.autoRenderMenu = true;
32423
33120
  this.onUserLoaded = new i0.EventEmitter();
32424
- // routerOutlet: TemplateRef<any>;
32425
33121
  this._unsubscribeAll = new rxjs.Subject();
32426
33122
  // rootVersionDeploy = '1.3';
32427
33123
  this.currentRoute = '';
@@ -32721,8 +33417,8 @@
32721
33417
  CommonAppComponentComponent.prototype.ngAfterViewInit = function () {
32722
33418
  this._cd.detach();
32723
33419
  this.detectChanges();
32724
- // const root = this._applicationContext.getRootContext();
32725
- // root.reportQueue = this.reportQueue;
33420
+ var root = this._applicationContext.getRootContext();
33421
+ root.reportQueue = this.reportQueue;
32726
33422
  this.menuModel = this._menuService.getMenuItems();
32727
33423
  };
32728
33424
  CommonAppComponentComponent.prototype.defaultRedirect = function () {
@@ -33049,7 +33745,7 @@
33049
33745
  CommonAppComponentComponent.decorators = [
33050
33746
  { type: i0.Component, args: [{
33051
33747
  selector: 'common-app-component',
33052
- template: "<ng-container *ngIf=\"!pageLoaded\">\n <ng-container [ngSwitch]=\"layoutLoadingPage\">\n <ng-container *ngSwitchDefault>\n <loading-page-v1></loading-page-v1>\n </ng-container>\n </ng-container>\n</ng-container>\n\n\n<div *ngIf=\"pageLoaded\" [style.display]=\"pageLoaded ? '' : 'none'\" class=\"layout-wrapper\"\n (click)=\"_commonService.onLayoutClick()\" [ngClass]=\"{'menu-layout-static': !_commonService.isOverlay(),\n 'menu-layout-overlay': _commonService.isOverlay(),\n 'layout-menu-overlay-active': _commonService.overlayMenuActive,\n 'menu-layout-horizontal': _commonService.isHorizontal(),\n 'menu-layout-slim': _commonService.isSlim(),\n 'layout-menu-static-desktop-inactive': _commonService.staticMenuDesktopInactive,\n 'layout-menu-static-desktop-active': !_commonService.staticMenuDesktopInactive,\n 'layout-menu-static-mobile-inactive': !_commonService.staticMenuMobileActive,\n 'layout-menu-static-mobile-active': _commonService.staticMenuMobileActive,\n 'layout-menu-static-inactive': _commonService.staticMenuDesktopInactive,\n 'layout-menu-static-active': _commonService.staticMenuMobileActive,\n 'show-menu-icon-inactive': showMenuIconInactive}\">\n\n <app-topbar *ngIf=\"_globalService.getHeaderState()\"></app-topbar>\n\n <div *ngIf=\"_globalService.getMenuState()\" class=\"layout-menu-container\"\n [ngClass]=\"{'layout-menu-dark':_commonService.darkMenu}\" (click)=\"_commonService.onMenuClick($event)\">\n <app-root-menu></app-root-menu>\n <div class=\"layout-menu-block\">\n <tn-custom-scrollbar #scrollbar [style]=\"{'padding-top': '16px'}\">\n <app-inline-profile *ngIf=\"_commonService.profileMode == 'inline' &&!_commonService.isHorizontal()\">\n </app-inline-profile>\n <ng-container *ngIf=\"!showMenuIconInactive\">\n <app-menu [autoRenderMenu]=\"autoRenderMenu\" [reset]=\"_commonService.resetMenu\"\n (onMenuActive)=\"handleMenuActive($event)\"></app-menu>\n </ng-container>\n <ng-container *ngIf=\"showMenuIconInactive\">\n <app-menu-v2 [autoRenderMenu]=\"autoRenderMenu\" [reset]=\"_commonService.resetMenu\"\n (onMenuActive)=\"handleMenuActive($event)\"></app-menu-v2>\n </ng-container>\n </tn-custom-scrollbar>\n </div>\n <div class=\"search-area layout-menu-search-area\">\n <p-autoComplete class=\"search-input\" field=\"label\" [style]=\"{'width':'100%'}\" [suggestions]=\"searchMenuResult\"\n (completeMethod)=\"onSearchMenu($event)\" [autoHighlight]=\"true\" [placeholder]=\"'T\u00ECm ki\u1EBFm ch\u1EE9c n\u0103ng' | translate\"\n [delay]=\"200\" [scrollHeight]=\"'400px'\" [readonly]=\"!(menuModel && menuModel.length)\"\n [(ngModel)]=\"searchMenuInput\" (onSelect)=\"onSelectMenuSuggestion($event)\" (onFocus)=\"searchIconClick()\">\n <ng-template let-item pTemplate=\"item\">\n <div innerHTML=\"{{ item.label | highlight : searchMenuInput}}\"></div>\n </ng-template>\n </p-autoComplete>\n <span class=\"icon-search\" (click)=\"searchIconClick()\"><i class=\"pi pi-search\"></i></span>\n </div>\n </div>\n\n <div [class]=\"'layout-main'\" [ngClass]=\"{'no-header': _globalService.getHeaderState() ? false : true}\">\n <router-outlet></router-outlet>\n </div>\n\n <div class=\"layout-mask\"></div>\n\n <!-- <report-queue [header]=\"'Xu\u1EA5t d\u1EEF li\u1EC7u'\">\n </report-queue> -->\n</div>\n<div class=\"waiting-box\" [class.show]=\"waiting\">\n <div class=\"overlay\"></div>\n <div class=\"content-loading\">\n <div class=\"lds-ellipsis\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n <div class=\"message-loading\">\n <span *ngFor=\"let x of messageWaiting\">{{x}}</span>\n </div>\n </div>\n</div>\n<p-toast [position]=\"'top-right'\" [autoZIndex]=\"true\"></p-toast>\n<p-confirmDialog #cd [closable]=\"false\">\n <p-footer>\n <button #okButton type=\"button\" pButton icon=\"pi pi-check\" class=\"p-button-rounded p-button-text\" label=\"\u0110\u1ED3ng \u00FD\"\n (keydown.shift.tab)=\"focusTrap($event, false)\" (click)=\"cd.accept()\"></button>\n <button *ngIf=\"showRejectConfirm\" #cancelButton type=\"button\" pButton\n class=\"p-button-rounded p-button-text p-button-secondary\" icon=\"pi pi-times\" label=\"B\u1ECF qua\"\n (keydown.tab)=\"focusTrap($event, true)\" (click)=\"cd.reject()\"></button>\n </p-footer>\n</p-confirmDialog>\n<!-- <user-action-manager></user-action-manager> -->\n<permission-utils *ngIf=\"rootData.showPermissionUtils\"></permission-utils>\n<ng-template #abc>\n <div>1</div>\n</ng-template>\n<ng-template #def>\n <div>2</div>\n</ng-template>\n",
33748
+ template: "<ng-container *ngIf=\"!pageLoaded\">\n <ng-container [ngSwitch]=\"layoutLoadingPage\">\n <ng-container *ngSwitchDefault>\n <loading-page-v1></loading-page-v1>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<div *ngIf=\"pageLoaded\" [style.display]=\"pageLoaded ? '' : 'none'\" class=\"layout-wrapper\"\n (click)=\"_commonService.onLayoutClick()\" [ngClass]=\"{'menu-layout-static': !_commonService.isOverlay(),\n 'menu-layout-overlay': _commonService.isOverlay(),\n 'layout-menu-overlay-active': _commonService.overlayMenuActive,\n 'menu-layout-horizontal': _commonService.isHorizontal(),\n 'menu-layout-slim': _commonService.isSlim(),\n 'layout-menu-static-desktop-inactive': _commonService.staticMenuDesktopInactive,\n 'layout-menu-static-desktop-active': !_commonService.staticMenuDesktopInactive,\n 'layout-menu-static-mobile-inactive': !_commonService.staticMenuMobileActive,\n 'layout-menu-static-mobile-active': _commonService.staticMenuMobileActive,\n 'layout-menu-static-inactive': _commonService.staticMenuDesktopInactive,\n 'layout-menu-static-active': _commonService.staticMenuMobileActive,\n 'show-menu-icon-inactive': showMenuIconInactive}\">\n\n <app-topbar *ngIf=\"_globalService.getHeaderState()\"></app-topbar>\n\n <div *ngIf=\"_globalService.getMenuState()\" class=\"layout-menu-container\"\n [ngClass]=\"{'layout-menu-dark':_commonService.darkMenu}\" (click)=\"_commonService.onMenuClick($event)\">\n <app-root-menu></app-root-menu>\n <div class=\"layout-menu-block\">\n <tn-custom-scrollbar #scrollbar [style]=\"{'padding-top': '16px'}\">\n <app-inline-profile *ngIf=\"_commonService.profileMode == 'inline' &&!_commonService.isHorizontal()\">\n </app-inline-profile>\n <ng-container *ngIf=\"!showMenuIconInactive\">\n <app-menu [autoRenderMenu]=\"autoRenderMenu\" [reset]=\"_commonService.resetMenu\"\n (onMenuActive)=\"handleMenuActive($event)\"></app-menu>\n </ng-container>\n <ng-container *ngIf=\"showMenuIconInactive\">\n <app-menu-v2 [autoRenderMenu]=\"autoRenderMenu\" [reset]=\"_commonService.resetMenu\"\n (onMenuActive)=\"handleMenuActive($event)\"></app-menu-v2>\n </ng-container>\n </tn-custom-scrollbar>\n </div>\n <div class=\"search-area layout-menu-search-area\">\n <p-autoComplete class=\"search-input\" field=\"label\" [style]=\"{'width':'100%'}\"\n [suggestions]=\"searchMenuResult\" (completeMethod)=\"onSearchMenu($event)\" [autoHighlight]=\"true\"\n [placeholder]=\"'T\u00ECm ki\u1EBFm ch\u1EE9c n\u0103ng' | translate\" [delay]=\"200\" [scrollHeight]=\"'400px'\"\n [readonly]=\"!(menuModel && menuModel.length)\" [(ngModel)]=\"searchMenuInput\"\n (onSelect)=\"onSelectMenuSuggestion($event)\" (onFocus)=\"searchIconClick()\">\n <ng-template let-item pTemplate=\"item\">\n <div innerHTML=\"{{ item.label | highlight : searchMenuInput}}\"></div>\n </ng-template>\n </p-autoComplete>\n <span class=\"icon-search\" (click)=\"searchIconClick()\"><i class=\"pi pi-search\"></i></span>\n </div>\n </div>\n\n <div [class]=\"'layout-main'\" [ngClass]=\"{'no-header': _globalService.getHeaderState() ? false : true}\">\n <router-outlet></router-outlet>\n </div>\n\n <div class=\"layout-mask\"></div>\n\n <report-queue [header]=\"'Xu\u1EA5t d\u1EEF li\u1EC7u'\">\n </report-queue>\n</div>\n<div class=\"waiting-box\" [class.show]=\"waiting\">\n <div class=\"overlay\"></div>\n <div class=\"content-loading\">\n <div class=\"lds-ellipsis\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n <div class=\"message-loading\">\n <span *ngFor=\"let x of messageWaiting\">{{x}}</span>\n </div>\n </div>\n</div>\n<p-toast [position]=\"'top-right'\" [autoZIndex]=\"true\"></p-toast>\n<p-confirmDialog #cd [closable]=\"false\">\n <p-footer>\n <button #okButton type=\"button\" pButton icon=\"pi pi-check\" class=\"p-button-rounded p-button-text\"\n [label]=\"cd.acceptButtonLabel\" (keydown.shift.tab)=\"focusTrap($event, false)\"\n (click)=\"cd.accept()\"></button>\n <button *ngIf=\"showRejectConfirm\" #cancelButton type=\"button\" pButton\n class=\"p-button-rounded p-button-text p-button-secondary\" icon=\"pi pi-times\" [label]=\"cd.rejectButtonLabel\"\n (keydown.tab)=\"focusTrap($event, true)\" (click)=\"cd.reject()\"></button>\n </p-footer>\n</p-confirmDialog>\n<!-- <user-action-manager></user-action-manager> -->\n<permission-utils *ngIf=\"rootData.showPermissionUtils\"></permission-utils>\n<ng-template #abc>\n <div>1</div>\n</ng-template>\n<ng-template #def>\n <div>2</div>\n</ng-template>\n",
33053
33749
  providers: [ComponentContextService, EntityMetadataService],
33054
33750
  styles: [".layout-menu-search-area{position:relative}.icon-search{background-color:transparent;box-shadow:none;position:absolute;right:0;top:0;color:#888;width:30px;font-size:14px;height:100%;display:flex;align-items:center;justify-content:center}.layout-menu-static-inactive .search-area{margin-left:-303px}.layout-menu-container{overflow:hidden;display:flex;flex-direction:column;top:60px;bottom:0;height:auto}.layout-menu-block{display:flex;overflow:hidden;flex:1}.layout-menu-block>tn-custom-scrollbar{width:100%}::ng-deep .layout-menu-search-area .ui-inputtext{width:calc(100% + 1px);border-radius:0;border-color:#dadada;padding-right:40px}::ng-deep .layout-menu-search-area .ui-inputtext:not(:focus){box-shadow:none}::ng-deep .layout-menu-search-area input{width:100%;border-radius:0;border-left:0;border-right:0}::ng-deep .layout-menu-search-area .p-autocomplete-panel{max-width:100%}::ng-deep .layout-menu-search-area .p-autocomplete-item{white-space:normal}::ng-deep .layout-menu-search-area .p-autocomplete-item mark{background-color:var(--tn-primary-color);padding:0;color:#fff;border-radius:0}.waiting-box{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;display:none}.waiting-box .overlay{background-color:red;background-color:hsla(0,0%,42.7%,.5019607843137255);width:100%;height:100%}.waiting-box .content-loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);text-align:center}.waiting-box .content-loading .lds-ellipsis{display:inline-block;position:relative;width:80px;height:60px}.waiting-box .content-loading .lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#fff;animation-timing-function:cubic-bezier(0,1,1,0)}.waiting-box .content-loading .lds-ellipsis div:first-child{left:8px;animation:lds-ellipsis1 .6s infinite}.waiting-box .content-loading .lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 .6s infinite}.waiting-box .content-loading .lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 .6s infinite}.waiting-box .content-loading .lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 .6s infinite}.waiting-box .message-loading{font-size:1.75em}.waiting-box .message-loading span{color:#fff;animation:message-opacity 1s infinite;margin-right:1px}.waiting-box .message-loading span:last-child{margin-right:0}.waiting-box .message-loading span:nth-child(16n+1){animation-delay:0;animation-delay:0s}.waiting-box .message-loading span:nth-child(16n+2){animation-delay:.1s}.waiting-box .message-loading span:nth-child(16n+3){animation-delay:.2s}.waiting-box .message-loading span:nth-child(16n+4){animation-delay:.3s}.waiting-box .message-loading span:nth-child(16n+5){animation-delay:.4s}.waiting-box .message-loading span:nth-child(16n+6){animation-delay:.5s}.waiting-box .message-loading span:nth-child(16n+7){animation-delay:.6s}.waiting-box .message-loading span:nth-child(16n+8){animation-delay:.7s}.waiting-box .message-loading span:nth-child(16n+9){animation-delay:.8s}.waiting-box .message-loading span:nth-child(16n+10){animation-delay:.9s}.waiting-box .message-loading span:nth-child(16n+11){animation-delay:1s}.waiting-box .message-loading span:nth-child(16n+12){animation-delay:1.1s}.waiting-box .message-loading span:nth-child(16n+13){animation-delay:1.2s}.waiting-box .message-loading span:nth-child(16n+14){animation-delay:1.3s}.waiting-box .message-loading span:nth-child(16n+15){animation-delay:1.4s}.waiting-box .message-loading span:nth-child(16n+16){animation-delay:1.5s}.waiting-box.show{display:block}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu-container .rootMenu,::ng-deep common-app-component .show-menu-icon-inactive .layout-menu-container .rootMenu>.icon,::ng-deep common-app-component .show-menu-icon-inactive .layout-menu-container .rootMenu>label,::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li .active-menuitem-2,::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li a,::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li a .menu-icon{transition:all .3s}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li a i.menuitem-toggle-icon{transition:all .2s}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li{min-height:3.1em;position:relative}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li a{position:relative}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li a .menu-icon{position:absolute;left:0;top:0;bottom:0;display:flex;align-items:center;background-color:#fff}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li a .menu-label{margin-left:40px}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li i[level=\"1\"]:first-child{flex:0 0 40px}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li ul li a .menu-icon{padding-left:30px}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li ul li a .menu-icon i{margin-right:0!important}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li ul li ul li a .menu-icon{padding-left:30px}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li ul li ul li a .menu-icon i{margin-right:0!important}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li ul li ul ul li a .menu-icon{padding-left:30px}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li ul li ul ul li a .menu-icon i{margin-right:0!important}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li ul li ul ul ul li a .menu-icon{padding-left:30px}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li ul li ul ul ul li a .menu-icon i{margin-right:0!important}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li ul li ul ul ul ul li a .menu-icon{padding-left:30px}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li ul li ul ul ul ul li a .menu-icon i{margin-right:0!important}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu>.active-menuitem>.active-menuitem-routerlink>span.menu-icon:first-child{background-color:#e8e8e8!important}::ng-deep common-app-component .show-menu-icon-inactive .layout-menu li a:hover .menu-icon{background-color:#f4f4f4}@media (min-width:1025px){::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container{margin-left:-245px!important}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container .rootMenu>.icon{left:245px}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container:hover{margin-left:0!important}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container:hover .layout-menu li a .menu-icon,::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container:hover .rootMenu>.icon{left:0}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container:hover .layout-menu li ul li a .menu-icon{padding-left:30px;left:0}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container:hover .layout-menu li ul li ul li a .menu-icon{padding-left:45px;left:0}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container:hover .layout-menu li ul li ul ul li a .menu-icon{padding-left:60px;left:0}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container:hover .layout-menu li ul li ul ul ul li a .menu-icon{padding-left:75px;left:0}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container:hover .layout-menu li ul li ul ul ul ul li a .menu-icon{padding-left:90px;left:0}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container:hover i.menuitem-toggle-icon{visibility:visible}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu-container:hover~.layout-main{margin-left:285px!important}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-main{margin-left:40px!important}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu li a .menu-icon{left:245px;padding-left:0}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu li a .menu-icon i{flex:0 0 40px}::ng-deep common-app-component .show-menu-icon-inactive.layout-menu-static-inactive .layout-menu li a i.menuitem-toggle-icon{visibility:hidden}}::ng-deep common-app-component .show-menu-icon-inactive .tn-l-left-menu-toggle{padding:13px}::ng-deep common-app-component .show-menu-icon-inactive .ripplelink>span>i{padding:0 10px!important}::ng-deep common-app-component .show-menu-icon-inactive .ripplelink>span>i .menuitem-toggle-icon{margin-left:10px!important}::ng-deep common-app-component .show-menu-icon-inactive .icon-search{width:38px}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}@keyframes message-opacity{0%{opacity:1}50%{opacity:.5}to{opacity:1}}"]
33055
33751
  },] }
@@ -33087,6 +33783,7 @@
33087
33783
  CommonAppComponentComponent.propDecorators = {
33088
33784
  okButton: [{ type: i0.ViewChild, args: ['okButton',] }],
33089
33785
  cancelButton: [{ type: i0.ViewChild, args: ['cancelButton',] }],
33786
+ reportQueue: [{ type: i0.ViewChild, args: [ReportQueueComponent,] }],
33090
33787
  scrollBarMenu: [{ type: i0.ViewChild, args: ['scrollbar',] }],
33091
33788
  children: [{ type: i0.ViewChildren, args: [i0.TemplateRef,] }],
33092
33789
  showQuickNote: [{ type: i0.Input }],
@@ -45519,95 +46216,6 @@
45519
46216
  { type: NotifierService }
45520
46217
  ]; };
45521
46218
 
45522
- var HighPerformanceService = /** @class */ (function () {
45523
- function HighPerformanceService(_signalrService, _commonService, _httpClient, _moduleConfigService) {
45524
- this._signalrService = _signalrService;
45525
- this._commonService = _commonService;
45526
- this._httpClient = _httpClient;
45527
- this._moduleConfigService = _moduleConfigService;
45528
- }
45529
- HighPerformanceService.prototype.createProcess = function (queueName, callBackOnMessage, data, returnSequenceNumber) {
45530
- var _this = this;
45531
- if (callBackOnMessage === void 0) { callBackOnMessage = null; }
45532
- if (data === void 0) { data = null; }
45533
- if (returnSequenceNumber === void 0) { returnSequenceNumber = false; }
45534
- var internalClientKey = this._commonService.guid();
45535
- var model = {
45536
- queueName: queueName,
45537
- data: data,
45538
- clientKey: internalClientKey
45539
- };
45540
- this._signalrService.start(null, internalClientKey, function (data) {
45541
- if (callBackOnMessage) {
45542
- callBackOnMessage(data);
45543
- }
45544
- _this._signalrService.unSubscribeViewCode(null, internalClientKey);
45545
- });
45546
- return new Promise(function (resolve) { return __awaiter(_this, void 0, void 0, function () {
45547
- var highPerformanceEndpoint, rs, _a_1;
45548
- return __generator(this, function (_b) {
45549
- switch (_b.label) {
45550
- case 0:
45551
- this.env = this._moduleConfigService.getConfig().environment;
45552
- highPerformanceEndpoint = this.env.apiDomain.highPerformanceEndpoint + "/HighPerformance/DoWork?returnSequenceNumber=" + returnSequenceNumber;
45553
- _b.label = 1;
45554
- case 1:
45555
- _b.trys.push([1, 3, , 4]);
45556
- return [4 /*yield*/, this._httpClient.post(highPerformanceEndpoint, model).toPromise()];
45557
- case 2:
45558
- rs = _b.sent();
45559
- if (rs.success) {
45560
- resolve(rs.data);
45561
- }
45562
- return [3 /*break*/, 4];
45563
- case 3:
45564
- _a_1 = _b.sent();
45565
- return [3 /*break*/, 4];
45566
- case 4:
45567
- resolve(null);
45568
- return [2 /*return*/];
45569
- }
45570
- });
45571
- }); });
45572
- };
45573
- HighPerformanceService.prototype.cancelProcess = function (queueName, uniqueKey) {
45574
- return __awaiter(this, void 0, void 0, function () {
45575
- var highPerformanceEndpoint, rs, _a_2;
45576
- return __generator(this, function (_b) {
45577
- switch (_b.label) {
45578
- case 0:
45579
- _b.trys.push([0, 2, , 3]);
45580
- highPerformanceEndpoint = this.env.apiDomain.highPerformanceEndpoint + "/HighPerformance/CancelWork?queueName=" + queueName + "&uniqueKey=" + uniqueKey;
45581
- return [4 /*yield*/, this._httpClient.post(highPerformanceEndpoint, {}).toPromise()];
45582
- case 1:
45583
- rs = _b.sent();
45584
- if (rs.success) {
45585
- return [2 /*return*/, rs.data];
45586
- }
45587
- return [3 /*break*/, 3];
45588
- case 2:
45589
- _a_2 = _b.sent();
45590
- return [3 /*break*/, 3];
45591
- case 3: return [2 /*return*/, false];
45592
- }
45593
- });
45594
- });
45595
- };
45596
- return HighPerformanceService;
45597
- }());
45598
- HighPerformanceService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function HighPerformanceService_Factory() { return new HighPerformanceService(i0__namespace.ɵɵinject(SignalRService), i0__namespace.ɵɵinject(CommonService), i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(ModuleConfigService)); }, token: HighPerformanceService, providedIn: "root" });
45599
- HighPerformanceService.decorators = [
45600
- { type: i0.Injectable, args: [{
45601
- providedIn: 'root'
45602
- },] }
45603
- ];
45604
- HighPerformanceService.ctorParameters = function () { return [
45605
- { type: SignalRService },
45606
- { type: CommonService },
45607
- { type: i1$1.HttpClient },
45608
- { type: ModuleConfigService }
45609
- ]; };
45610
-
45611
46219
  var ImageService = /** @class */ (function () {
45612
46220
  function ImageService(_moduleConfigService) {
45613
46221
  this._moduleConfigService = _moduleConfigService;
@@ -45830,221 +46438,6 @@
45830
46438
  { type: i0.Injector }
45831
46439
  ]; };
45832
46440
 
45833
- var TemplateService = /** @class */ (function () {
45834
- function TemplateService(_moduleConfigService, _httpClient, _printService, _fileService, _notifierService, _crudService, _commonService) {
45835
- this._httpClient = _httpClient;
45836
- this._printService = _printService;
45837
- this._fileService = _fileService;
45838
- this._notifierService = _notifierService;
45839
- this._crudService = _crudService;
45840
- this._commonService = _commonService;
45841
- this._moduleConfig = _moduleConfigService.getConfig();
45842
- this.environment = this._moduleConfig.environment;
45843
- this.serviceUri = this.environment.apiDomain.templateEndpoint + "/template";
45844
- }
45845
- TemplateService.prototype.laTexToBase64Image = function (laTex, font) {
45846
- if (font === void 0) { font = 54; }
45847
- var api = this.serviceUri + "/LatexToBase64";
45848
- return this._httpClient.post(api, { laTex: laTex, font: font }).toPromise();
45849
- };
45850
- /**
45851
- * Description: Xuất file sử dụng thư viện CX, xuất xong tự động mở popup để lưu file.
45852
- */
45853
- TemplateService.prototype.exportCxExcelByCode = function (model) {
45854
- var _this = this;
45855
- var url = this.serviceUri + "/ExportCxExcelByCode";
45856
- this.setFileInfo(model);
45857
- return this._httpClient
45858
- .post(url, model, { responseType: 'blob' })
45859
- .toPromise()
45860
- .then(function (res) {
45861
- FileSaver__namespace.saveAs(res, _this.getFullFileName(model.fileName || model.code));
45862
- }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
45863
- var errorText;
45864
- return __generator(this, function (_a) {
45865
- switch (_a.label) {
45866
- case 0: return [4 /*yield*/, err.error.text()];
45867
- case 1:
45868
- errorText = _a.sent();
45869
- this._crudService.processErrorResponse(JSON.parse(errorText || ''));
45870
- return [2 /*return*/];
45871
- }
45872
- });
45873
- }); });
45874
- };
45875
- TemplateService.prototype.exportManyCxExcelByCode = function (model) {
45876
- var _this = this;
45877
- var url = this.serviceUri + "/ExportManyCxExcelByCode";
45878
- this.setManyFileInfo(model);
45879
- return this._httpClient
45880
- .post(url, model)
45881
- .toPromise()
45882
- .then(function (res) {
45883
- if (res.success) {
45884
- _this._fileService.downloadFolder(res.data.folderId);
45885
- }
45886
- else {
45887
- _this._crudService.processErrorResponse(res);
45888
- }
45889
- }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
45890
- var errorText;
45891
- return __generator(this, function (_a) {
45892
- switch (_a.label) {
45893
- case 0: return [4 /*yield*/, err.error.text()];
45894
- case 1:
45895
- errorText = _a.sent();
45896
- this._crudService.processErrorResponse(JSON.parse(errorText || ''));
45897
- return [2 /*return*/];
45898
- }
45899
- });
45900
- }); });
45901
- };
45902
- TemplateService.prototype.getFullFileName = function (fileName, extension) {
45903
- if (extension === void 0) { extension = TemplateConstant.EXCEL_EXTENSION; }
45904
- return "" + fileName + extension;
45905
- };
45906
- /**
45907
- * Description: Export sử dung ClosedXml.Report (Cx) với signalR, sử dụng cho file dữ liệu lớn.
45908
- * Param: model chứa
45909
- * - code : code của template cấu hình bên Quản trị > Biểu mẫu > Biểu mẫu excel.
45910
- * - data : object chứa dữ liệu đã chuyền thành dạng json.
45911
- * - fileName: tên file sau khi export.
45912
- * - topic: guid dùng để subscribe.
45913
- */
45914
- TemplateService.prototype.ExportCxExcelByCodeWithSignalR = function (model) {
45915
- return __awaiter(this, void 0, void 0, function () {
45916
- var url;
45917
- return __generator(this, function (_a) {
45918
- url = this.serviceUri + "/ExportCxExcelByCodeWithSignalR";
45919
- return [2 /*return*/, this._httpClient.post(url, model)
45920
- .toPromise()];
45921
- });
45922
- });
45923
- };
45924
- /**
45925
- * Description: Export sử dung ClosedXml.Report (Cx) với HighPerformanceService, sử dụng cho file dữ liệu lớn.
45926
- * Param: model chứa
45927
- * - code : code của template cấu hình bên Quản trị > Biểu mẫu > Biểu mẫu excel.
45928
- * - data : object chứa dữ liệu đã chuyền thành dạng json.
45929
- * - fileName: tên file sau khi export.
45930
- * - queueName: queue của topic.
45931
- * - uniqueKey: unique key cho task.
45932
- */
45933
- TemplateService.prototype.ExportCxExcelByCodeWithHPS = function (model) {
45934
- return __awaiter(this, void 0, void 0, function () {
45935
- var url;
45936
- return __generator(this, function (_a) {
45937
- url = this.serviceUri + "/ExportWithHighPerformanceService";
45938
- return [2 /*return*/, this._httpClient.post(url, model)
45939
- .toPromise()];
45940
- });
45941
- });
45942
- };
45943
- TemplateService.prototype.exportCxExcelByCodePromise = function (model) {
45944
- return __awaiter(this, void 0, void 0, function () {
45945
- var url;
45946
- return __generator(this, function (_a) {
45947
- url = this.serviceUri + "/ExportCxExcelByCode";
45948
- return [2 /*return*/, this._httpClient
45949
- .post(url, model, { responseType: 'blob' })
45950
- .toPromise()];
45951
- });
45952
- });
45953
- };
45954
- TemplateService.prototype.fillTemplateByCodeAndGetPdf = function (templateCode, data, onLoadingDataPdf, onEndLoadingDataPdf) {
45955
- var _this = this;
45956
- if (onLoadingDataPdf === void 0) { onLoadingDataPdf = null; }
45957
- if (onEndLoadingDataPdf === void 0) { onEndLoadingDataPdf = null; }
45958
- var url = this.serviceUri + "/fillWordByTemplateCode/" + templateCode + "?isPrint=true";
45959
- return this._httpClient
45960
- .post(url, data)
45961
- .toPromise().then(function (res) {
45962
- if (res.data) {
45963
- _this._printService.printBase64Pdf(res.data, onLoadingDataPdf, onEndLoadingDataPdf);
45964
- }
45965
- });
45966
- };
45967
- TemplateService.prototype.fillWordByTemplateCodeMultiData = function (templateCode, data, onLoadingDataPdf, onEndLoadingDataPdf) {
45968
- var _this = this;
45969
- if (onLoadingDataPdf === void 0) { onLoadingDataPdf = null; }
45970
- if (onEndLoadingDataPdf === void 0) { onEndLoadingDataPdf = null; }
45971
- var url = this.serviceUri + "/fillWordByTemplateCodeMultiData/" + templateCode + "?isPrint=true";
45972
- return this._httpClient
45973
- .post(url, data)
45974
- .toPromise().then(function (res) {
45975
- if (res.data) {
45976
- _this._printService.printBase64Pdf(res.data, onLoadingDataPdf, onEndLoadingDataPdf);
45977
- }
45978
- });
45979
- };
45980
- TemplateService.prototype.setFileInfo = function (model) {
45981
- model.data = model.data ? model.data : JSON.stringify(model.dataObject);
45982
- delete model.dataObject;
45983
- };
45984
- TemplateService.prototype.setManyFileInfo = function (manyModel) {
45985
- var _this = this;
45986
- var hasModel = manyModel && manyModel.lstFileInfo && manyModel.lstFileInfo.length;
45987
- if (!hasModel) {
45988
- return;
45989
- }
45990
- manyModel.lstFileInfo.forEach(function (fileInfo) {
45991
- _this.setFileInfo(fileInfo);
45992
- fileInfo.fileName = fileInfo.fileName + "_" + _this._commonService.guid() + "." + TemplateConstant.EXCEL_EXTENSION;
45993
- });
45994
- };
45995
- /**
45996
- * Export dữ liệu không dùng template.
45997
- */
45998
- TemplateService.prototype.exportCxExcel = function (model) {
45999
- var _this = this;
46000
- var url = this.serviceUri + "/ExportCxExcel";
46001
- return this._httpClient
46002
- .post(url, model, { responseType: 'blob' })
46003
- .toPromise()
46004
- .then(function (res) {
46005
- FileSaver__namespace.saveAs(res, _this.getFullFileName(model.fileName || 'Export'));
46006
- }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
46007
- var errorText;
46008
- return __generator(this, function (_a) {
46009
- switch (_a.label) {
46010
- case 0: return [4 /*yield*/, err.error.text()];
46011
- case 1:
46012
- errorText = _a.sent();
46013
- this._crudService.processErrorResponse(JSON.parse(errorText || ''));
46014
- return [2 /*return*/];
46015
- }
46016
- });
46017
- }); });
46018
- };
46019
- TemplateService.prototype.exportCxExcelPromise = function (model) {
46020
- return __awaiter(this, void 0, void 0, function () {
46021
- var url;
46022
- return __generator(this, function (_a) {
46023
- url = this.serviceUri + "/ExportCxExcel";
46024
- return [2 /*return*/, this._httpClient
46025
- .post(url, model, { responseType: 'blob' })
46026
- .toPromise()];
46027
- });
46028
- });
46029
- };
46030
- return TemplateService;
46031
- }());
46032
- TemplateService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TemplateService_Factory() { return new TemplateService(i0__namespace.ɵɵinject(ModuleConfigService), i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(PrintService), i0__namespace.ɵɵinject(FileExplorerService), i0__namespace.ɵɵinject(NotifierService), i0__namespace.ɵɵinject(CrudService), i0__namespace.ɵɵinject(CommonService)); }, token: TemplateService, providedIn: "root" });
46033
- TemplateService.decorators = [
46034
- { type: i0.Injectable, args: [{
46035
- providedIn: 'root'
46036
- },] }
46037
- ];
46038
- TemplateService.ctorParameters = function () { return [
46039
- { type: ModuleConfigService },
46040
- { type: i1$1.HttpClient },
46041
- { type: PrintService },
46042
- { type: FileExplorerService },
46043
- { type: NotifierService },
46044
- { type: CrudService },
46045
- { type: CommonService }
46046
- ]; };
46047
-
46048
46441
  var UniqueNumberService = /** @class */ (function () {
46049
46442
  function UniqueNumberService(_http, _moduleConfigService) {
46050
46443
  this._http = _http;
@@ -54094,399 +54487,6 @@
54094
54487
  onInit: [{ type: i0.Output }]
54095
54488
  };
54096
54489
 
54097
- var JobItem = /** @class */ (function () {
54098
- function JobItem(code, data, fileName, status) {
54099
- if (fileName === void 0) { fileName = 'BaoCao'; }
54100
- if (status === void 0) { status = REPORT_QUEUE_CONSTANT.statuses.Waiting; }
54101
- // Loại export.
54102
- this._type = JobTypes.SingnalR;
54103
- this._code = code;
54104
- var datepipe = new i3.DatePipe('en-US');
54105
- var formattedDate = datepipe.transform(new Date(), 'ddMMyyyy_hhmmss');
54106
- this._fileName = fileName + "_" + formattedDate + TemplateConstant.EXCEL_EXTENSION;
54107
- this._data = data || {};
54108
- this._status = status;
54109
- }
54110
- return JobItem;
54111
- }());
54112
- var REPORT_QUEUE_CONSTANT = /** @class */ (function () {
54113
- function REPORT_QUEUE_CONSTANT() {
54114
- }
54115
- return REPORT_QUEUE_CONSTANT;
54116
- }());
54117
- REPORT_QUEUE_CONSTANT.statuses = {
54118
- Waiting: 1,
54119
- Exporting: 2,
54120
- Success: 3,
54121
- Error: 4,
54122
- Downloaded: 5
54123
- };
54124
- REPORT_QUEUE_CONSTANT.dicStatus = new SimpleDictionary([
54125
- new SimpleDicItem(REPORT_QUEUE_CONSTANT.statuses.Waiting, 'Chờ để xử lý'),
54126
- new SimpleDicItem(REPORT_QUEUE_CONSTANT.statuses.Exporting, 'Đang xử lý'),
54127
- new SimpleDicItem(REPORT_QUEUE_CONSTANT.statuses.Success, 'Tải xuống'),
54128
- new SimpleDicItem(REPORT_QUEUE_CONSTANT.statuses.Error, 'Xuất file chưa thành công'),
54129
- new SimpleDicItem(REPORT_QUEUE_CONSTANT.statuses.Downloaded, 'Đã tải'),
54130
- ]);
54131
- var JobTypes;
54132
- (function (JobTypes) {
54133
- JobTypes[JobTypes["Normal"] = 1] = "Normal";
54134
- JobTypes[JobTypes["SingnalR"] = 2] = "SingnalR";
54135
- JobTypes[JobTypes["Many"] = 3] = "Many"; // Export nhiều file cùng một lúc và nén vào file zip, mỗi file có thể là các loại biểu mẫu khác nhau.
54136
- })(JobTypes || (JobTypes = {}));
54137
- var ExportJob = /** @class */ (function () {
54138
- function ExportJob(templateCode, // code template cấu hình bên quản trị
54139
- dataPromise, // promise dùng để lấy dữ liệu, trả về dạng ResponseResult
54140
- fileName, // tên của file được lưu
54141
- rootName, // tên thuộc tính của lst dữ liệu ngoài cùng
54142
- cb, // dùng để xử lý dữ liệu sau khi lấy xong
54143
- type // Loại export.
54144
- ) {
54145
- if (rootName === void 0) { rootName = ''; }
54146
- if (cb === void 0) { cb = null; }
54147
- if (type === void 0) { type = JobTypes.Normal; }
54148
- this.templateCode = templateCode;
54149
- this.dataPromise = dataPromise;
54150
- this.fileName = fileName;
54151
- this.rootName = rootName;
54152
- this.cb = cb;
54153
- this.type = type;
54154
- }
54155
- return ExportJob;
54156
- }());
54157
-
54158
- var ReportQueueComponent = /** @class */ (function () {
54159
- function ReportQueueComponent(_notifierService, _commonService, _fileService, _tempateService, _signalRService, _highPerformanceService, _crudService) {
54160
- this._notifierService = _notifierService;
54161
- this._commonService = _commonService;
54162
- this._fileService = _fileService;
54163
- this._tempateService = _tempateService;
54164
- this._signalRService = _signalRService;
54165
- this._highPerformanceService = _highPerformanceService;
54166
- this._crudService = _crudService;
54167
- this.name = 'reportQueue';
54168
- this.header = 'Xuất báo cáo';
54169
- this.autoDownload = false;
54170
- this.maxNameLength = 40;
54171
- this.expand = true;
54172
- this.queueName = 'REPORT_QUEUE';
54173
- this.hub = 'CommonHub';
54174
- this.dicStatus = REPORT_QUEUE_CONSTANT.dicStatus;
54175
- this.statuses = REPORT_QUEUE_CONSTANT.statuses;
54176
- this._queue = [];
54177
- this.maxHeight = 200;
54178
- this.itemHeight = 50;
54179
- this.popupHeight = this.itemHeight;
54180
- }
54181
- ReportQueueComponent.prototype.ngOnInit = function () {
54182
- if (this.parentDataModel && this.name) {
54183
- this.parentDataModel[this.name] = this;
54184
- }
54185
- };
54186
- ReportQueueComponent.prototype.toggleExpand = function () {
54187
- this.expand = !this.expand;
54188
- };
54189
- /**
54190
- * Thêm job vào để thực hiện
54191
- */
54192
- ReportQueueComponent.prototype.addJob = function (exportJob) {
54193
- return __awaiter(this, void 0, void 0, function () {
54194
- var foundIndex, job, rsData;
54195
- var _this = this;
54196
- return __generator(this, function (_a) {
54197
- switch (_a.label) {
54198
- case 0:
54199
- foundIndex = this._queue.findIndex(function (job) { return job._code == exportJob.templateCode && job._status == _this.statuses.Exporting; });
54200
- if (foundIndex !== -1) {
54201
- this._notifierService.showWarning("File cùng loại đang được xử lý, thử lại sau khi xử lý xong!");
54202
- return [2 /*return*/];
54203
- }
54204
- job = new JobItem(exportJob.templateCode, {}, exportJob.fileName || exportJob.templateCode, this.statuses.Exporting);
54205
- this._queue.push(job);
54206
- this.updatePopupHeight();
54207
- setTimeout(function () {
54208
- _this.scrollbar.scrollToBottom();
54209
- }, 100);
54210
- return [4 /*yield*/, exportJob.dataPromise];
54211
- case 1:
54212
- rsData = _a.sent();
54213
- if (rsData.data == null) {
54214
- job._status = this.statuses.Error;
54215
- return [2 /*return*/, this._crudService.processErrorResponse(rsData)];
54216
- }
54217
- if (exportJob.cb) {
54218
- job._data = exportJob.cb(rsData.data);
54219
- }
54220
- else if (exportJob.rootName) {
54221
- job._data[exportJob.rootName] = rsData.data;
54222
- }
54223
- else {
54224
- job._data = rsData.data;
54225
- }
54226
- switch (exportJob.type) {
54227
- case JobTypes.Normal:
54228
- this.Export(job);
54229
- break;
54230
- case JobTypes.SingnalR:
54231
- this.ExportWithSignalR(job);
54232
- break;
54233
- case JobTypes.Many:
54234
- break;
54235
- }
54236
- return [2 /*return*/];
54237
- }
54238
- });
54239
- });
54240
- };
54241
- /**
54242
- * Thêm job vào để thực hiện
54243
- * - templateCode: code template cấu hình bên quản trị
54244
- * - data: dữ liệu export
54245
- * - fileName: tên của file được lưu
54246
- * - useSignalR: thay vì gọi request và chờ đến khi thực hiện xong
54247
- * trả về binaryFile thì tạo tiến trình riêng để export, và dùng signalR thông
54248
- * báo kết quả export, trả về fileId để tải.
54249
- */
54250
- ReportQueueComponent.prototype.addJobWithData = function (templateCode, data, fileName, useSignalR) {
54251
- if (useSignalR === void 0) { useSignalR = false; }
54252
- return __awaiter(this, void 0, void 0, function () {
54253
- var foundIndex, job;
54254
- var _this = this;
54255
- return __generator(this, function (_a) {
54256
- foundIndex = this._queue.findIndex(function (job) { return job._code == templateCode && job._status == _this.statuses.Exporting; });
54257
- if (foundIndex !== -1) {
54258
- this._notifierService.showWarning("File cùng loại đang được xử lý, thử lại sau khi xử lý xong!");
54259
- return [2 /*return*/];
54260
- }
54261
- job = new JobItem(templateCode, data, fileName || templateCode, this.statuses.Exporting);
54262
- this._queue.push(job);
54263
- if (useSignalR) {
54264
- this.ExportWithSignalR(job);
54265
- }
54266
- else {
54267
- this.Export(job);
54268
- }
54269
- return [2 /*return*/];
54270
- });
54271
- });
54272
- };
54273
- ReportQueueComponent.prototype.Export = function (job) {
54274
- return __awaiter(this, void 0, void 0, function () {
54275
- var _this = this;
54276
- return __generator(this, function (_a) {
54277
- this._tempateService.exportCxExcelByCodePromise({ code: job._code, data: JSON.stringify(job._data), fileName: job._fileName })
54278
- .then(function (file) {
54279
- job._status = _this.statuses.Success;
54280
- job._binaryFile = file;
54281
- if (_this.autoDownload) {
54282
- _this.download(job);
54283
- }
54284
- }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
54285
- var errorText;
54286
- return __generator(this, function (_a) {
54287
- switch (_a.label) {
54288
- case 0:
54289
- job._status = this.statuses.Error;
54290
- return [4 /*yield*/, err.error.text()];
54291
- case 1:
54292
- errorText = _a.sent();
54293
- this._crudService.processErrorResponse(JSON.parse(errorText || ''));
54294
- return [2 /*return*/];
54295
- }
54296
- });
54297
- }); });
54298
- return [2 /*return*/];
54299
- });
54300
- });
54301
- };
54302
- ReportQueueComponent.prototype.ExportWithSignalR = function (job) {
54303
- return __awaiter(this, void 0, void 0, function () {
54304
- var topic;
54305
- var _this = this;
54306
- return __generator(this, function (_a) {
54307
- topic = this._commonService.guid();
54308
- job._uniqueKey = topic;
54309
- this._signalRService.start(this.hub, topic, function (message) {
54310
- var rs = JSON.parse(message);
54311
- if (rs.success) {
54312
- job._status = _this.statuses.Success;
54313
- job._fileId = rs.data;
54314
- if (_this.autoDownload) {
54315
- _this.download(job);
54316
- }
54317
- }
54318
- else {
54319
- job._status = _this.statuses.Error;
54320
- _this._crudService.processErrorResponse(rs);
54321
- }
54322
- });
54323
- this._tempateService.ExportCxExcelByCodeWithSignalR({ code: job._code, data: JSON.stringify(job._data), fileName: job._fileName, topic: topic })
54324
- .then(function (rs) {
54325
- if (!rs.success) {
54326
- job._status = _this.statuses.Error;
54327
- _this._crudService.processErrorResponse(rs);
54328
- }
54329
- }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
54330
- return __generator(this, function (_a) {
54331
- job._status = this.statuses.Error;
54332
- this._crudService.processErrorResponse(err.error);
54333
- return [2 /*return*/];
54334
- });
54335
- }); });
54336
- ;
54337
- return [2 /*return*/];
54338
- });
54339
- });
54340
- };
54341
- ReportQueueComponent.prototype.ExportCxExcelByCodeWithHPS = function (job) {
54342
- return __awaiter(this, void 0, void 0, function () {
54343
- var _this = this;
54344
- return __generator(this, function (_a) {
54345
- this._highPerformanceService.createProcess(this.queueName, function (arrMessage) {
54346
- var message = arrMessage.pop();
54347
- var rs = JSON.parse(message);
54348
- if (rs.success) {
54349
- job._status = _this.statuses.Success;
54350
- job._fileId = rs.data;
54351
- if (_this.autoDownload) {
54352
- _this._fileService.downloadFile(job._fileId);
54353
- job._status = _this.statuses.Downloaded;
54354
- job._fileId = null;
54355
- }
54356
- }
54357
- else {
54358
- job._status = _this.statuses.Error;
54359
- _this._crudService.processErrorResponse(rs);
54360
- }
54361
- }).then(function (rs) {
54362
- job._uniqueKey = rs;
54363
- _this._tempateService.ExportCxExcelByCodeWithHPS({
54364
- code: job._code,
54365
- data: JSON.stringify(job._data),
54366
- fileName: job._fileName,
54367
- topic: _this.queueName,
54368
- uniqueKey: job._uniqueKey
54369
- }).then(function (rs) {
54370
- if (!rs.success) {
54371
- job._status = _this.statuses.Error;
54372
- _this._crudService.processErrorResponse(rs);
54373
- }
54374
- }, function (err) {
54375
- job._status = _this.statuses.Error;
54376
- console.log("Lỗi gọi api server export");
54377
- });
54378
- }, function (err) {
54379
- job._status = _this.statuses.Error;
54380
- console.log("Lỗi gọi HPS service :(");
54381
- });
54382
- return [2 /*return*/];
54383
- });
54384
- });
54385
- };
54386
- ReportQueueComponent.prototype.download = function (job) {
54387
- if (job._status == this.statuses.Downloaded) {
54388
- return;
54389
- }
54390
- if (job._fileId) {
54391
- this._fileService.downloadFile(job._fileId, false, job._fileName);
54392
- }
54393
- else if (job._binaryFile) {
54394
- FileSaver__namespace.saveAs(job._binaryFile, job._fileName);
54395
- }
54396
- job._status = this.statuses.Downloaded;
54397
- job._binaryFile = null;
54398
- job._fileId = null;
54399
- };
54400
- ReportQueueComponent.prototype.showQueue = function () {
54401
- var show = this._queue && this._queue.length > 0;
54402
- return show;
54403
- };
54404
- ReportQueueComponent.prototype.getName = function (job) {
54405
- var name = job._fileName.length > this.maxNameLength ? job._fileName.substr(0, this.maxNameLength - 10) + "[...]" + TemplateConstant.EXCEL_EXTENSION : job._fileName;
54406
- return name;
54407
- };
54408
- ReportQueueComponent.prototype.cancelJob = function (job) {
54409
- var _this = this;
54410
- var foundIndex = this._queue.findIndex(function (j) { return j._code == job._code; });
54411
- if (foundIndex == -1) {
54412
- return;
54413
- }
54414
- var foundJob = this._queue[foundIndex];
54415
- if (foundJob._status == this.statuses.Exporting) {
54416
- this._notifierService
54417
- .showConfirm('File này đang được xử lý. Bạn có muốn dừng lại?', 'Hủy xuất file')
54418
- .then(function (rs) {
54419
- if (!rs) {
54420
- return;
54421
- }
54422
- var needUnsubscribe = foundJob._type == JobTypes.SingnalR && foundJob._uniqueKey;
54423
- if (needUnsubscribe) {
54424
- _this._signalRService.unSubscribeViewCode(foundJob._uniqueKey, _this.hub);
54425
- }
54426
- _this._queue.splice(foundIndex, 1);
54427
- _this.updatePopupHeight();
54428
- });
54429
- }
54430
- else if (foundJob._status != this.statuses.Exporting) {
54431
- this._queue.splice(foundIndex, 1);
54432
- this.updatePopupHeight();
54433
- }
54434
- };
54435
- ReportQueueComponent.prototype.close = function () {
54436
- var _this = this;
54437
- var hasExporting = this._queue && this._queue.filter(function (item) { return item._status == _this.statuses.Exporting; }).length > 0;
54438
- if (hasExporting) {
54439
- this._notifierService
54440
- .showConfirm('Có file đang được xử lý. Bạn có muốn dừng lại?', 'Hủy xuất file')
54441
- .then(function (rs) {
54442
- if (!rs) {
54443
- return;
54444
- }
54445
- var needUnsubscribe = false;
54446
- _this._queue.forEach(function (job) {
54447
- needUnsubscribe = job._type == JobTypes.SingnalR && job._uniqueKey;
54448
- if (needUnsubscribe) {
54449
- _this._signalRService.unSubscribeViewCode(job._uniqueKey, _this.hub);
54450
- }
54451
- });
54452
- _this._queue = [];
54453
- _this.updatePopupHeight();
54454
- });
54455
- }
54456
- else {
54457
- this._queue = [];
54458
- }
54459
- };
54460
- ReportQueueComponent.prototype.updatePopupHeight = function () {
54461
- var height = (this._queue || []).length * this.itemHeight;
54462
- this.popupHeight = height > this.maxHeight ? this.maxHeight : height;
54463
- };
54464
- return ReportQueueComponent;
54465
- }());
54466
- ReportQueueComponent.decorators = [
54467
- { type: i0.Component, args: [{
54468
- selector: 'report-queue',
54469
- template: "<div class=\"rq-container\" *ngIf=\"showQueue()\">\n <div class=\"rq-header\">\n <div>{{header | translate}}</div>\n <div>\n\n <p-checkbox [(ngModel)]=\"autoDownload\" binary=\"true\" pTooltip=\"T\u1EF1 \u0111\u1ED9ng t\u1EA3i\" tooltipPosition=\"left\">\n </p-checkbox>\n\n <a href=\"javascript:;\" (click)=\"toggleExpand()\" pTooltip=\"{{expand ? 'Thu g\u1ECDn' : 'M\u1EDF r\u1ED9ng'}}\"\n tooltipPosition=\"left\">\n <i class=\"fas\" [ngClass]=\"{'fa-compress' : expand, 'fa-expand': !expand}\"></i>\n </a>\n\n <a href=\"javascript:;\" (click)=\"close()\" pTooltip=\"\u0110\u00F3ng\">\n <i class=\"fas fa-times\"></i>\n </a>\n </div>\n </div>\n <div class=\"rq-body\" *ngIf=\"expand\">\n <tn-custom-scrollbar [style]=\"{'height.px': popupHeight}\" #scrollbar>\n <div class=\"re-job\" *ngFor=\"let job of _queue\">\n <div class=\"re-job-title\">\n <div>{{getName(job)}}</div>\n <div>\n <a href=\"javascript:;\" (click)=\"cancelJob(job)\">\n <i class=\"fas fa-times\"></i>\n </a>\n </div>\n </div>\n <div class=\"re-job-result\"\n [ngClass]=\"{'job-success': job._status == statuses.Success, 'job-error': job._status == statuses.Error, 'job-exporting' : job._status == statuses.Exporting, 'job-downloaded': job._status == statuses.Downloaded}\">\n <span *ngIf=\"job._status != statuses.Success && job._status != statuses.Exporting\">\n {{dicStatus.get(job._status) | translate}}\n </span>\n\n <span *ngIf=\"job._status == statuses.Exporting\">\n <div class=\"loader\"></div>\n {{dicStatus.get(job._status) | translate}}\n </span>\n\n <a href=\"javascript:;\" (click)=\"download(job)\" class=\"job-success\"\n *ngIf=\"job._status == statuses.Success\">\n <i class=\"fas fa-download\"></i> {{dicStatus.get(job._status) | translate}}\n </a>\n </div>\n </div>\n </tn-custom-scrollbar>\n </div>\n</div>\n",
54470
- styles: ["::ng-deep .rq-container{width:350px;border:1px solid #3192e1;border-radius:3px;background-color:#fff}::ng-deep .rq-container .rq-header{background-color:#3192e1;padding:5px 10px;display:flex;border-radius:3px 3px 0 0;color:#fff;font-weight:400;font-size:15px}::ng-deep .rq-container .rq-header>div:first-child{flex-grow:1}::ng-deep .rq-container .rq-header>div:last-child>a{font-weight:200;margin-left:10px;color:#fff}::ng-deep .rq-container .rq-header>div:last-child>a>i{font-size:13px}::ng-deep .rq-container .rq-header>div:last-child .ui-chkbox-box{width:14px;height:14px;margin-top:-2px}::ng-deep .rq-container .rq-header>div:last-child .ui-chkbox-icon{font-size:13px;line-height:13px}::ng-deep .rq-container .rq-body .re-job{padding:6px 10px;display:flex;flex-direction:column}::ng-deep .rq-container .rq-body .re-job:first-child{padding-top:6px}::ng-deep .rq-container .rq-body .re-job .re-job-title{display:flex;font-size:13px}::ng-deep .rq-container .rq-body .re-job .re-job-title>div:first-child{flex-grow:1;padding-bottom:3px}::ng-deep .rq-container .rq-body .re-job .re-job-title>div a{color:#3192e1}::ng-deep .rq-container .rq-body .re-job .re-job-result{font-size:11px}::ng-deep .rq-container .rq-body .re-job .re-job-result>span{display:flex;align-items:center;height:20px}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-exporting{color:#3192e1}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-exporting>span>div{margin-right:5px}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-success{color:#1ab91a}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-success>a>i{margin-right:2px}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-error{color:#e95353}::ng-deep .rq-container .rq-body .re-job .re-job-result.job-downloaded{color:#b2b2b2}::ng-deep .loader{border-radius:50%;border:2px solid #bcdbf5;border-top-color:#3192e1;width:12px;height:12px;animation:spin 1s linear infinite;display:inline-block}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}:host{position:absolute;bottom:1px;right:2px;z-index:1000}"]
54471
- },] }
54472
- ];
54473
- ReportQueueComponent.ctorParameters = function () { return [
54474
- { type: NotifierService },
54475
- { type: CommonService },
54476
- { type: FileExplorerService },
54477
- { type: TemplateService },
54478
- { type: SignalRService },
54479
- { type: HighPerformanceService },
54480
- { type: CrudService }
54481
- ]; };
54482
- ReportQueueComponent.propDecorators = {
54483
- parentDataModel: [{ type: i0.Input }],
54484
- name: [{ type: i0.Input }],
54485
- header: [{ type: i0.Input }],
54486
- autoDownload: [{ type: i0.Input }],
54487
- scrollbar: [{ type: i0.ViewChild, args: ['scrollbar',] }]
54488
- };
54489
-
54490
54490
  var SettingsRowComponent = /** @class */ (function (_super) {
54491
54491
  __extends(SettingsRowComponent, _super);
54492
54492
  function SettingsRowComponent(_injector, _domService, _userService) {
@@ -65872,50 +65872,50 @@
65872
65872
  exports["ɵ9"] = ɵ9;
65873
65873
  exports["ɵa"] = LoggerService;
65874
65874
  exports["ɵb"] = DropdownService;
65875
- exports["ɵba"] = ProcessWorkflowFormComponent;
65876
- exports["ɵbb"] = CongViecDinhKemService;
65877
- exports["ɵbc"] = CongViecThayDoiService;
65878
- exports["ɵbd"] = AddressComponent;
65879
- exports["ɵbe"] = AfterViewCheckedComponent;
65880
- exports["ɵbf"] = AdvanceSearchComponent;
65881
- exports["ɵbg"] = AutoCompletePickerComponent;
65882
- exports["ɵbh"] = ImageUploaderComponent;
65883
- exports["ɵbi"] = CheckBoxListComponent;
65884
- exports["ɵbj"] = CoCauToChucPickerListComponent;
65885
- exports["ɵbk"] = CoCauToChucPickerListNewComponent;
65886
- exports["ɵbl"] = FormBuilderComponent;
65887
- exports["ɵbm"] = BaseCongViecTestComponent;
65888
- exports["ɵbn"] = BaseCauHinhWorkflowDetailComponent;
65889
- exports["ɵbo"] = BaseDmLoaiCongViecFormComponent;
65890
- exports["ɵbp"] = BaseDmLinhVucCongViecFormComponent;
65891
- exports["ɵbq"] = BaseDmPriorityFormComponent;
65892
- exports["ɵbr"] = BaseCongviecDinhkemComponent;
65893
- exports["ɵbs"] = BaseCongviecDinhkemFormComponent;
65894
- exports["ɵbt"] = DatetimePickerComponent;
65895
- exports["ɵbu"] = DatetimePickerRangeComponent;
65896
- exports["ɵbv"] = DynamicNodeComponent;
65897
- exports["ɵbw"] = EntityPickerBoxComponent;
65898
- exports["ɵbx"] = EntityPickerDataComponent;
65899
- exports["ɵby"] = EntityPickerSelectedComponent;
65900
- exports["ɵbz"] = EntityPickerComponent;
65875
+ exports["ɵba"] = RoleService;
65876
+ exports["ɵbb"] = ProcessWorkflowFormComponent;
65877
+ exports["ɵbc"] = CongViecDinhKemService;
65878
+ exports["ɵbd"] = CongViecThayDoiService;
65879
+ exports["ɵbe"] = AddressComponent;
65880
+ exports["ɵbf"] = AfterViewCheckedComponent;
65881
+ exports["ɵbg"] = AdvanceSearchComponent;
65882
+ exports["ɵbh"] = AutoCompletePickerComponent;
65883
+ exports["ɵbi"] = ImageUploaderComponent;
65884
+ exports["ɵbj"] = CheckBoxListComponent;
65885
+ exports["ɵbk"] = CoCauToChucPickerListComponent;
65886
+ exports["ɵbl"] = CoCauToChucPickerListNewComponent;
65887
+ exports["ɵbm"] = FormBuilderComponent;
65888
+ exports["ɵbn"] = BaseCongViecTestComponent;
65889
+ exports["ɵbo"] = BaseCauHinhWorkflowDetailComponent;
65890
+ exports["ɵbp"] = BaseDmLoaiCongViecFormComponent;
65891
+ exports["ɵbq"] = BaseDmLinhVucCongViecFormComponent;
65892
+ exports["ɵbr"] = BaseDmPriorityFormComponent;
65893
+ exports["ɵbs"] = BaseCongviecDinhkemComponent;
65894
+ exports["ɵbt"] = BaseCongviecDinhkemFormComponent;
65895
+ exports["ɵbu"] = DatetimePickerComponent;
65896
+ exports["ɵbv"] = DatetimePickerRangeComponent;
65897
+ exports["ɵbw"] = DynamicNodeComponent;
65898
+ exports["ɵbx"] = EntityPickerBoxComponent;
65899
+ exports["ɵby"] = EntityPickerDataComponent;
65900
+ exports["ɵbz"] = EntityPickerSelectedComponent;
65901
65901
  exports["ɵc"] = EntityPickerService;
65902
- exports["ɵca"] = EntityPickerDialogComponent;
65903
- exports["ɵcb"] = EntityPickerTreeDataComponent;
65904
- exports["ɵcc"] = EntityPickerTreeSelectedComponent;
65905
- exports["ɵcd"] = EntityPermissionComponent;
65906
- exports["ɵce"] = EquationEditorComponent;
65907
- exports["ɵcf"] = MaskComponent;
65908
- exports["ɵcg"] = NumberPickerRangeComponent;
65909
- exports["ɵch"] = PagingNextBackOnlyComponent;
65910
- exports["ɵci"] = RadioButtonListComponent;
65911
- exports["ɵcj"] = VanBanPickerComponent;
65912
- exports["ɵck"] = VanBanDenService;
65913
- exports["ɵcl"] = VanBanDiService;
65914
- exports["ɵcm"] = VanBanPickerDialogComponent;
65915
- exports["ɵcn"] = VanbanDiPickerComponent;
65916
- exports["ɵco"] = VanbanDenPickerComponent;
65917
- exports["ɵcp"] = CongViecPickerComponent;
65918
- exports["ɵcq"] = ReportQueueComponent;
65902
+ exports["ɵca"] = EntityPickerComponent;
65903
+ exports["ɵcb"] = EntityPickerDialogComponent;
65904
+ exports["ɵcc"] = EntityPickerTreeDataComponent;
65905
+ exports["ɵcd"] = EntityPickerTreeSelectedComponent;
65906
+ exports["ɵce"] = EntityPermissionComponent;
65907
+ exports["ɵcf"] = EquationEditorComponent;
65908
+ exports["ɵcg"] = MaskComponent;
65909
+ exports["ɵch"] = NumberPickerRangeComponent;
65910
+ exports["ɵci"] = PagingNextBackOnlyComponent;
65911
+ exports["ɵcj"] = RadioButtonListComponent;
65912
+ exports["ɵck"] = VanBanPickerComponent;
65913
+ exports["ɵcl"] = VanBanDenService;
65914
+ exports["ɵcm"] = VanBanDiService;
65915
+ exports["ɵcn"] = VanBanPickerDialogComponent;
65916
+ exports["ɵco"] = VanbanDiPickerComponent;
65917
+ exports["ɵcp"] = VanbanDenPickerComponent;
65918
+ exports["ɵcq"] = CongViecPickerComponent;
65919
65919
  exports["ɵcr"] = SettingsComponent;
65920
65920
  exports["ɵcs"] = SettingsRowComponent;
65921
65921
  exports["ɵct"] = SettingsWorkflowComponent;
@@ -66021,10 +66021,10 @@
66021
66021
  exports["ɵt"] = StatusExtendsService;
66022
66022
  exports["ɵu"] = MessageBoardService;
66023
66023
  exports["ɵv"] = FileExplorerNewService;
66024
- exports["ɵw"] = FileVersionService;
66025
- exports["ɵx"] = FileManagerService;
66026
- exports["ɵy"] = DM_ChucVuService;
66027
- exports["ɵz"] = RoleService;
66024
+ exports["ɵw"] = ReportQueueComponent;
66025
+ exports["ɵx"] = FileVersionService;
66026
+ exports["ɵy"] = FileManagerService;
66027
+ exports["ɵz"] = DM_ChucVuService;
66028
66028
 
66029
66029
  Object.defineProperty(exports, '__esModule', { value: true });
66030
66030