tnx-shared 5.3.410 → 5.3.411
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/tnx-shared.umd.js +42 -8
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/form-schema.d.ts +1 -0
- package/classes/form-schema.d.ts.map +1 -1
- package/components/file-explorer/file-manager/file-manager.component.d.ts.map +1 -1
- package/components/file-explorer/file-viewer/file-viewer.component.d.ts.map +1 -1
- package/esm2015/classes/form-schema.js +2 -1
- package/esm2015/components/file-explorer/file-manager/file-manager.component.js +29 -3
- package/esm2015/components/file-explorer/file-viewer/file-viewer.component.js +4 -1
- package/fesm2015/tnx-shared.js +32 -2
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -1357,6 +1357,7 @@
|
|
|
1357
1357
|
this.hiddenKySoSimCaNhan = false;
|
|
1358
1358
|
this.hiddenKySoUsbCaNhan = false;
|
|
1359
1359
|
this.hiddenKySoDonVi = false;
|
|
1360
|
+
this.hiddenKySoSmartCA = false;
|
|
1360
1361
|
this.hiddenButPhe = false;
|
|
1361
1362
|
this.arrFieldMustValidate = [];
|
|
1362
1363
|
this.getCustomDataTrinhKy = function (rowData) { return ({}); };
|
|
@@ -35768,7 +35769,8 @@
|
|
|
35768
35769
|
command: function () {
|
|
35769
35770
|
_this.signFileSmartCA(item);
|
|
35770
35771
|
},
|
|
35771
|
-
visible: item.
|
|
35772
|
+
visible: (this._fileObjectService.isTypeFileKySo(item.name)
|
|
35773
|
+
&& this.layout !== exports.EnumFileLayout.SIMPLE_FOR_LIST && !this.parentSetting.hiddenKySoSmartCA),
|
|
35772
35774
|
},
|
|
35773
35775
|
{
|
|
35774
35776
|
label: 'Ký số cá nhân (USB)', icon: 'fas fa-signature',
|
|
@@ -36819,20 +36821,49 @@
|
|
|
36819
36821
|
};
|
|
36820
36822
|
FileManagerComponent.prototype.signFileSmartCA = function (rowData) {
|
|
36821
36823
|
return __awaiter(this, void 0, void 0, function () {
|
|
36822
|
-
var dataKySo;
|
|
36824
|
+
var sourceFileId, sourceFile, rsConvert, e_5, dataKySo;
|
|
36823
36825
|
return __generator(this, function (_b) {
|
|
36824
36826
|
switch (_b.label) {
|
|
36825
|
-
case 0:
|
|
36827
|
+
case 0:
|
|
36828
|
+
sourceFileId = rowData.id;
|
|
36829
|
+
sourceFile = rowData;
|
|
36830
|
+
if (!this._fileExplorerService.needConvertBeforeSign(rowData.name)) return [3 /*break*/, 4];
|
|
36831
|
+
_b.label = 1;
|
|
36832
|
+
case 1:
|
|
36833
|
+
_b.trys.push([1, 3, , 4]);
|
|
36834
|
+
return [4 /*yield*/, this._fileExplorerService.convertDocumentToPdfAndSave({
|
|
36835
|
+
instanceId: sourceFileId,
|
|
36836
|
+
name: this._fileExplorerService.changeFileExtension(rowData.name, 'pdf'),
|
|
36837
|
+
folderInstanceId: rowData.parentFolderId,
|
|
36838
|
+
ownerType: this._userService.getCurrentUser().userId.toString(),
|
|
36839
|
+
})];
|
|
36840
|
+
case 2:
|
|
36841
|
+
rsConvert = _b.sent();
|
|
36842
|
+
if (!rsConvert || !rsConvert.success) {
|
|
36843
|
+
this._notifierService.showWarning("C\u00F3 l\u1ED7i x\u1EA3y ra khi chuy\u1EC3n \u0111\u1ED5i t\u00E0i li\u1EC7u " + rowData.name + " th\u00E0nh pdf \u0111\u1EC3 k\u00FD. Vui l\u00F2ng th\u1EED l\u1EA1i sau");
|
|
36844
|
+
return [2 /*return*/];
|
|
36845
|
+
}
|
|
36846
|
+
else {
|
|
36847
|
+
this._notifierService.showSuccess("Chuy\u1EC3n \u0111\u1ED5i t\u00E0i li\u1EC7u " + rowData.name + " th\u00E0nh pdf th\u00E0nh c\u00F4ng");
|
|
36848
|
+
sourceFileId = rsConvert.data;
|
|
36849
|
+
sourceFile = { id: sourceFileId };
|
|
36850
|
+
}
|
|
36851
|
+
return [3 /*break*/, 4];
|
|
36852
|
+
case 3:
|
|
36853
|
+
e_5 = _b.sent();
|
|
36854
|
+
this._notifierService.showWarning("C\u00F3 l\u1ED7i x\u1EA3y ra khi chuy\u1EC3n \u0111\u1ED5i t\u00E0i li\u1EC7u " + rowData.name + " th\u00E0nh pdf \u0111\u1EC3 k\u00FD. Vui l\u00F2ng th\u1EED l\u1EA1i sau");
|
|
36855
|
+
return [2 /*return*/];
|
|
36856
|
+
case 4: return [4 /*yield*/, this._userChuKySoService.getDetailByFilter([
|
|
36826
36857
|
this.newFilter('provider', exports.Operator.equal, 'SmartCA'),
|
|
36827
36858
|
this.newFilter('userId', exports.Operator.equal, this._userService.getCurrentUser().userId),
|
|
36828
36859
|
])];
|
|
36829
|
-
case
|
|
36860
|
+
case 5:
|
|
36830
36861
|
dataKySo = (_b.sent()).data;
|
|
36831
36862
|
if (!dataKySo) {
|
|
36832
36863
|
this._notifierService.showWarning('Người dùng chưa cấu hình thông tin ký số');
|
|
36833
36864
|
}
|
|
36834
36865
|
this.forms.fileViewer.formData.data = {
|
|
36835
|
-
fileId:
|
|
36866
|
+
fileId: sourceFileId,
|
|
36836
36867
|
isFileVersion: false,
|
|
36837
36868
|
fileName: rowData.name,
|
|
36838
36869
|
service: rowData.serviceCode,
|
|
@@ -37022,7 +37053,7 @@
|
|
|
37022
37053
|
});
|
|
37023
37054
|
};
|
|
37024
37055
|
FileManagerComponent.prototype.buildTreeData = function (data, rootFolderId) {
|
|
37025
|
-
var
|
|
37056
|
+
var e_6, _b;
|
|
37026
37057
|
var result = [];
|
|
37027
37058
|
var rootData = data.filter(function (x) { return x.parentFolderId == rootFolderId; });
|
|
37028
37059
|
if (rootData.length > 0) {
|
|
@@ -37038,12 +37069,12 @@
|
|
|
37038
37069
|
});
|
|
37039
37070
|
}
|
|
37040
37071
|
}
|
|
37041
|
-
catch (
|
|
37072
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
37042
37073
|
finally {
|
|
37043
37074
|
try {
|
|
37044
37075
|
if (rootData_1_1 && !rootData_1_1.done && (_b = rootData_1.return)) _b.call(rootData_1);
|
|
37045
37076
|
}
|
|
37046
|
-
finally { if (
|
|
37077
|
+
finally { if (e_6) throw e_6.error; }
|
|
37047
37078
|
}
|
|
37048
37079
|
}
|
|
37049
37080
|
return result;
|
|
@@ -50555,6 +50586,9 @@
|
|
|
50555
50586
|
return __generator(this, function (_b) {
|
|
50556
50587
|
switch (_b.label) {
|
|
50557
50588
|
case 0:
|
|
50589
|
+
if (!this.model.data.signatureLocation) {
|
|
50590
|
+
return [2 /*return*/, this._notifierService.showWarning('Vui lòng chọn vị trí chữ ký trước khi thực hiện ký số')];
|
|
50591
|
+
}
|
|
50558
50592
|
this.showWaitBox('Đang thực hiện ký số, vui lòng kiểm tra ứng dụng SmartCA');
|
|
50559
50593
|
return [4 /*yield*/, this._fileObjectService.kySoSmartCA(this.model.data)];
|
|
50560
50594
|
case 1:
|