tnx-shared 5.3.287 → 5.3.288
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 +20 -2
- 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.map +1 -1
- package/classes/base/validators.d.ts.map +1 -1
- package/esm2015/classes/base/data-form-base.js +4 -3
- package/esm2015/classes/base/list-base.js +4 -1
- package/esm2015/classes/base/validators.js +4 -2
- package/esm2015/services/common.service.js +13 -1
- package/fesm2015/tnx-shared.js +21 -3
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/common.service.d.ts +1 -0
- package/services/common.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
package/fesm2015/tnx-shared.js
CHANGED
|
@@ -4004,6 +4004,18 @@ class CommonService {
|
|
|
4004
4004
|
element.innerHTML = str;
|
|
4005
4005
|
return element.innerText;
|
|
4006
4006
|
}
|
|
4007
|
+
renderTimespan(datetime) {
|
|
4008
|
+
if (!datetime) {
|
|
4009
|
+
return '';
|
|
4010
|
+
}
|
|
4011
|
+
try {
|
|
4012
|
+
const arrTime = datetime.split(':');
|
|
4013
|
+
return `${arrTime[0]}:${arrTime[1]}`;
|
|
4014
|
+
}
|
|
4015
|
+
catch (_a) {
|
|
4016
|
+
return '';
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4007
4019
|
}
|
|
4008
4020
|
CommonService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CommonService_Factory() { return new CommonService(i0.ɵɵinject(ModuleConfigService)); }, token: CommonService, providedIn: "root" });
|
|
4009
4021
|
CommonService.decorators = [
|
|
@@ -11647,7 +11659,9 @@ class RequiredValidator {
|
|
|
11647
11659
|
var _a;
|
|
11648
11660
|
this._label = (_a = event.control.errorLabel) !== null && _a !== void 0 ? _a : event.control.label;
|
|
11649
11661
|
if (event.control.isHtmlLabel) {
|
|
11650
|
-
|
|
11662
|
+
const element = document.createElement('div');
|
|
11663
|
+
element.innerHTML = this._label;
|
|
11664
|
+
this._label = element.innerText;
|
|
11651
11665
|
}
|
|
11652
11666
|
return isNotEmpty(event.value, event.control);
|
|
11653
11667
|
}
|
|
@@ -15621,7 +15635,7 @@ class DataFormBase extends ComponentBaseWithButton {
|
|
|
15621
15635
|
const defaultSetting = new CrudFormSetting();
|
|
15622
15636
|
const cauHinhNghiepVu = (_a = this.environment) === null || _a === void 0 ? void 0 : _a.cauHinhNghiepVu;
|
|
15623
15637
|
if (cauHinhNghiepVu) {
|
|
15624
|
-
for (
|
|
15638
|
+
for (const key in cauHinhNghiepVu) {
|
|
15625
15639
|
if (defaultSetting[key] == this.setting[key]
|
|
15626
15640
|
&& this.setting[key] != undefined
|
|
15627
15641
|
&& cauHinhNghiepVu[key] != undefined
|
|
@@ -16197,8 +16211,9 @@ class DataFormBase extends ComponentBaseWithButton {
|
|
|
16197
16211
|
}
|
|
16198
16212
|
showMessageAfterUpdate(isSuccess = false, error) {
|
|
16199
16213
|
if (isSuccess) {
|
|
16200
|
-
if (!this.messageUpdateSuccess)
|
|
16214
|
+
if (!this.messageUpdateSuccess) {
|
|
16201
16215
|
this.messageUpdateSuccess = this._translateService.instant('MESSAGE.UPDATE_DATA_SUCCESS');
|
|
16216
|
+
}
|
|
16202
16217
|
if (this.messageUpdateSuccess) {
|
|
16203
16218
|
this._notifierService.showSuccess(this.messageUpdateSuccess);
|
|
16204
16219
|
}
|
|
@@ -23108,6 +23123,9 @@ class ListBase extends ComponentBaseWithButton {
|
|
|
23108
23123
|
this.model.total = 0;
|
|
23109
23124
|
this.model.expandedRowKeys = {};
|
|
23110
23125
|
this._unmarkLoading();
|
|
23126
|
+
setTimeout(() => {
|
|
23127
|
+
this.setAuthorizeButtons();
|
|
23128
|
+
}, 10);
|
|
23111
23129
|
return;
|
|
23112
23130
|
}
|
|
23113
23131
|
return this.doGetRequest(gridInfo);
|