tnx-shared 5.1.285 → 5.1.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 +36 -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/i-list-component.d.ts +0 -1
- package/classes/base/i-list-component.d.ts.map +1 -1
- package/classes/base/list-base.d.ts.map +1 -1
- package/classes/form-schema.d.ts.map +1 -1
- package/components/tn-dialog/tn-dialog.component.d.ts +4 -4
- package/components/tn-dialog/tn-dialog.component.d.ts.map +1 -1
- package/esm2015/classes/base/i-list-component.js +1 -1
- package/esm2015/classes/base/list-base.js +6 -5
- package/esm2015/classes/form-schema.js +2 -2
- package/esm2015/components/tn-dialog/tn-dialog.component.js +10 -7
- package/esm2015/services/permission.service.js +1 -3
- package/fesm2015/tnx-shared.js +15 -13
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/permission.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -718,7 +718,7 @@
|
|
|
718
718
|
this.hiddenTrinhKy = true;
|
|
719
719
|
this.useBaseTrinhKy = true;
|
|
720
720
|
this.disableShare = false;
|
|
721
|
-
this.disableViewWorkflowAttach =
|
|
721
|
+
this.disableViewWorkflowAttach = true;
|
|
722
722
|
this.hiddenWorkflowCoreStatus = true;
|
|
723
723
|
this.requiredVanBanDiAfterTrinhKy = false;
|
|
724
724
|
this.showExportAll = false;
|
|
@@ -10419,7 +10419,26 @@
|
|
|
10419
10419
|
case 0: return [4 /*yield*/, this._userService.getCurrentUser()];
|
|
10420
10420
|
case 1:
|
|
10421
10421
|
user = (_e.sent());
|
|
10422
|
-
|
|
10422
|
+
if (user && user.issuperuser && user.issuperuser.toLowerCase() == 'true') {
|
|
10423
|
+
resolve(true);
|
|
10424
|
+
return [2 /*return*/];
|
|
10425
|
+
}
|
|
10426
|
+
if (user && user.isadmin && user.isadmin.toLowerCase() == 'true' && !this.ignoreAdmin) {
|
|
10427
|
+
resolve(true);
|
|
10428
|
+
return [2 /*return*/];
|
|
10429
|
+
}
|
|
10430
|
+
this.getPermissions(service).then(function (permissions) {
|
|
10431
|
+
if (permissions && permissions.length) {
|
|
10432
|
+
var isAuthorized = permissions.includes(permission);
|
|
10433
|
+
resolve(isAuthorized);
|
|
10434
|
+
}
|
|
10435
|
+
else {
|
|
10436
|
+
console.log("L\u1ED7i kh\u00F4ng l\u1EA5y \u0111\u01B0\u1EE3c permission cho module: " + service);
|
|
10437
|
+
resolve(false);
|
|
10438
|
+
}
|
|
10439
|
+
}, function (error) {
|
|
10440
|
+
reject(false);
|
|
10441
|
+
});
|
|
10423
10442
|
return [2 /*return*/];
|
|
10424
10443
|
}
|
|
10425
10444
|
});
|
|
@@ -23954,15 +23973,17 @@
|
|
|
23954
23973
|
configurable: true
|
|
23955
23974
|
});
|
|
23956
23975
|
ListBase.prototype.setMainListComponentValue = function (content) {
|
|
23976
|
+
var _this = this;
|
|
23957
23977
|
var beforeValue = this.crudList;
|
|
23958
23978
|
if (content) {
|
|
23959
23979
|
this.crudList = content;
|
|
23960
23980
|
if (!beforeValue) {
|
|
23961
23981
|
this.countReady++;
|
|
23962
|
-
|
|
23963
|
-
|
|
23964
|
-
|
|
23965
|
-
|
|
23982
|
+
setTimeout(function (f) {
|
|
23983
|
+
if (!_this.crudList.checkIsInsideDialog()) {
|
|
23984
|
+
_this.loadItemFromQueryParam();
|
|
23985
|
+
}
|
|
23986
|
+
}, 100);
|
|
23966
23987
|
if (this.countReady < 2) {
|
|
23967
23988
|
return;
|
|
23968
23989
|
}
|
|
@@ -47557,12 +47578,12 @@
|
|
|
47557
47578
|
this.showFooter = true;
|
|
47558
47579
|
this.hiddenSave = true;
|
|
47559
47580
|
this.maximizable = true;
|
|
47560
|
-
this.scrollConfig = { suppressScrollX: true, suppressScrollY: false };
|
|
47561
|
-
this.scrollStyle = {};
|
|
47562
47581
|
this.onSave = new i0.EventEmitter();
|
|
47563
47582
|
this.onCancel = new i0.EventEmitter();
|
|
47564
47583
|
this.onShow = new i0.EventEmitter();
|
|
47565
47584
|
this.onHide = new i0.EventEmitter();
|
|
47585
|
+
this.scrollConfig = { suppressScrollX: true, suppressScrollY: false };
|
|
47586
|
+
this.scrollStyle = {};
|
|
47566
47587
|
this._domService = this._injector.get(DomService);
|
|
47567
47588
|
this._commonService = this._injector.get(CommonService);
|
|
47568
47589
|
}
|
|
@@ -47605,8 +47626,9 @@
|
|
|
47605
47626
|
else if (this.popupSize.maximize) {
|
|
47606
47627
|
this.maximize();
|
|
47607
47628
|
}
|
|
47608
|
-
else
|
|
47629
|
+
else {
|
|
47609
47630
|
this.onResize();
|
|
47631
|
+
}
|
|
47610
47632
|
this.onShow.emit(event);
|
|
47611
47633
|
};
|
|
47612
47634
|
TnDialogComponent.prototype.handleHideDialog = function (event) {
|
|
@@ -47614,10 +47636,12 @@
|
|
|
47614
47636
|
};
|
|
47615
47637
|
TnDialogComponent.prototype.onResize = function () {
|
|
47616
47638
|
if (this.popupSize.width && this._domService.maximizeDialog(this.dialogContentDom, this.popupSize)) {
|
|
47617
|
-
if (window.innerWidth < this.popupSize.width)
|
|
47639
|
+
if (window.innerWidth < this.popupSize.width) {
|
|
47618
47640
|
this.popupSize.width = window.innerWidth;
|
|
47619
|
-
|
|
47641
|
+
}
|
|
47642
|
+
if (window.innerHeight < this.popupSize.height) {
|
|
47620
47643
|
this.popupSize.height = window.innerHeight;
|
|
47644
|
+
}
|
|
47621
47645
|
this.setupScrollStyle();
|
|
47622
47646
|
this.dialog.maximizable = false;
|
|
47623
47647
|
}
|
|
@@ -47643,7 +47667,7 @@
|
|
|
47643
47667
|
TnDialogComponent.decorators = [
|
|
47644
47668
|
{ type: i0.Component, args: [{
|
|
47645
47669
|
selector: 'tn-dialog',
|
|
47646
|
-
template: "<p-dialog #dialog [closeOnEscape]=\"closeOnEscape\" [appendTo]=\"'body'\" [focusOnShow]=\"false\" [focusTrap]=\"false\"\r\n [header]=\"header | translate\" [(visible)]=\"visible\" [modal]=\"modal\" [responsive]=\"true\" [maximizable]=\"maximizable\"\r\n [autoZIndex]=\"true\" [styleClass]=\"styleClass\" [maskStyleClass]=\"maskClass\"\r\n [style]=\"{'width': popupSize.width + 'px', 'min-width': popupSize.width + 'px', 'height': popupSize.height + 'px', 'min-height': popupSize.height + 'px'}\"\r\n (onShow)=\"handleShowDialog($event)\" (onHide)=\"handleHideDialog($event)\"
|
|
47670
|
+
template: "<p-dialog #dialog [closeOnEscape]=\"closeOnEscape\" [appendTo]=\"'body'\" [focusOnShow]=\"false\" [focusTrap]=\"false\"\r\n [header]=\"header | translate\" [(visible)]=\"visible\" [modal]=\"modal\" [responsive]=\"true\" [maximizable]=\"maximizable\"\r\n [autoZIndex]=\"true\" [styleClass]=\"styleClass\" [maskStyleClass]=\"maskClass\"\r\n [style]=\"{'width': popupSize.width + 'px', 'min-width': popupSize.width + 'px', 'height': popupSize.height + 'px', 'min-height': popupSize.height + 'px'}\"\r\n (onShow)=\"handleShowDialog($event)\" (onHide)=\"handleHideDialog($event)\">\r\n <tn-custom-scrollbar #scrollbar [useDefaultScrollBar]=\"useDefaultScrollBar\" [class]=\"scrollBarStyleClass\"\r\n [config]=\"scrollConfig\" [style]=\"scrollStyle\" class=\"tn-dialog-scrollbar\">\r\n <ng-content></ng-content>\r\n </tn-custom-scrollbar>\r\n <p-footer *ngIf=\"showFooter && formBase && formBase.buttonTemplate\">\r\n <ng-container *ngTemplateOutlet=\"formBase.buttonTemplate\">\r\n </ng-container>\r\n </p-footer>\r\n <p-footer *ngIf=\"showFooter && footer\">\r\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\r\n </p-footer>\r\n</p-dialog>",
|
|
47647
47671
|
styles: [""]
|
|
47648
47672
|
},] }
|
|
47649
47673
|
];
|