tnx-shared 5.1.491 → 5.1.493
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 +24 -12
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/base/data-form-base.d.ts.map +1 -1
- package/classes/base/list-base.d.ts +1 -0
- package/classes/base/list-base.d.ts.map +1 -1
- package/classes/form-schema.d.ts +1 -0
- package/classes/form-schema.d.ts.map +1 -1
- package/components/service-file-upload/service-file-upload.component.d.ts.map +1 -1
- package/esm2015/classes/base/data-form-base.js +6 -4
- package/esm2015/classes/base/list-base.js +15 -10
- package/esm2015/classes/form-schema.js +2 -1
- package/esm2015/components/service-file-upload/service-file-upload.component.js +3 -2
- package/fesm2015/tnx-shared.js +22 -13
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -929,6 +929,7 @@
|
|
|
929
929
|
this.checkPermisionTrinhKy = false;
|
|
930
930
|
this.useWorkflowButton = false;
|
|
931
931
|
this.showEditLink = true;
|
|
932
|
+
this.showEditLinkOnlyView = false;
|
|
932
933
|
this.mdWidthCommonSearch = 3;
|
|
933
934
|
this.useCommonSearch = false;
|
|
934
935
|
this.useCommonFullTextSearch = true;
|
|
@@ -17750,11 +17751,11 @@
|
|
|
17750
17751
|
return _this;
|
|
17751
17752
|
}
|
|
17752
17753
|
DataFormBase.prototype.ngOnInit = function () {
|
|
17753
|
-
this.checkPermission(this.model.data.basePermission);
|
|
17754
|
+
// this.checkPermission(this.model.data.basePermission);
|
|
17754
17755
|
};
|
|
17755
17756
|
DataFormBase.prototype.checkPermission = function (basePermission) {
|
|
17756
17757
|
if (this.isBaseModel) {
|
|
17757
|
-
if (this.model.formState
|
|
17758
|
+
if (this.model.formState == exports.FormState.EDIT) {
|
|
17758
17759
|
if (basePermission & exports.PermissionBase.EDIT) {
|
|
17759
17760
|
this.model.formState = exports.FormState.EDIT;
|
|
17760
17761
|
}
|
|
@@ -17765,7 +17766,9 @@
|
|
|
17765
17766
|
this.model.formState = exports.FormState.VIEW;
|
|
17766
17767
|
}
|
|
17767
17768
|
}
|
|
17768
|
-
|
|
17769
|
+
else {
|
|
17770
|
+
this.__isFormView = this._isFormView();
|
|
17771
|
+
}
|
|
17769
17772
|
}
|
|
17770
17773
|
};
|
|
17771
17774
|
DataFormBase.prototype.addSchemaBase = function () {
|
|
@@ -25979,27 +25982,35 @@
|
|
|
25979
25982
|
});
|
|
25980
25983
|
};
|
|
25981
25984
|
ListBase.prototype._view = function (rowData) {
|
|
25985
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25986
|
+
return __generator(this, function (_a) {
|
|
25987
|
+
if (this.setting.showEditLinkOnlyView) {
|
|
25988
|
+
this._viewOnly(rowData);
|
|
25989
|
+
}
|
|
25990
|
+
else {
|
|
25991
|
+
this._edit(rowData);
|
|
25992
|
+
}
|
|
25993
|
+
return [2 /*return*/];
|
|
25994
|
+
});
|
|
25995
|
+
});
|
|
25996
|
+
};
|
|
25997
|
+
ListBase.prototype._viewOnly = function (rowData) {
|
|
25982
25998
|
return __awaiter(this, void 0, void 0, function () {
|
|
25983
25999
|
return __generator(this, function (_a) {
|
|
25984
26000
|
switch (_a.label) {
|
|
25985
26001
|
case 0:
|
|
25986
|
-
if (!(rowData.basePermission & exports.PermissionBase.EDIT)) return [3 /*break*/, 1];
|
|
25987
|
-
this._edit(rowData);
|
|
25988
|
-
return [3 /*break*/, 4];
|
|
25989
|
-
case 1:
|
|
25990
26002
|
this.formModel.formState = exports.FormState.VIEW;
|
|
25991
26003
|
return [4 /*yield*/, this.beforeView()];
|
|
25992
|
-
case
|
|
26004
|
+
case 1:
|
|
25993
26005
|
_a.sent();
|
|
25994
26006
|
this.setting.popupHeader = "Chi ti\u1EBFt " + this.setting.objectName;
|
|
25995
26007
|
this.setting.maskClass = null;
|
|
25996
26008
|
this.formModel.data = this.cloneData(rowData);
|
|
25997
26009
|
return [4 /*yield*/, this.modifyViewModel(rowData)];
|
|
25998
|
-
case
|
|
26010
|
+
case 2:
|
|
25999
26011
|
_a.sent();
|
|
26000
26012
|
this.showDetailForm = true;
|
|
26001
|
-
|
|
26002
|
-
case 4: return [2 /*return*/];
|
|
26013
|
+
return [2 /*return*/];
|
|
26003
26014
|
}
|
|
26004
26015
|
});
|
|
26005
26016
|
});
|
|
@@ -38016,13 +38027,14 @@
|
|
|
38016
38027
|
evt.stopPropagation();
|
|
38017
38028
|
};
|
|
38018
38029
|
ServiceFileUploadComponent.prototype.onRemoveFile = function () {
|
|
38030
|
+
var fileData = Object.assign({}, this.fileObj);
|
|
38019
38031
|
this.fileObj = null;
|
|
38020
38032
|
this.fileId = null;
|
|
38021
38033
|
this.selectedFile = null;
|
|
38022
38034
|
this.setFileName(null);
|
|
38023
38035
|
this.hasFile = false;
|
|
38024
38036
|
this.onChangeBase(null);
|
|
38025
|
-
this.onRemove.emit();
|
|
38037
|
+
this.onRemove.emit(fileData);
|
|
38026
38038
|
};
|
|
38027
38039
|
ServiceFileUploadComponent.prototype.onDownloadFile = function () {
|
|
38028
38040
|
this.download();
|