ps-toolkit-ui 0.0.138 → 0.0.142
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/ps-toolkit-ui.umd.js +12 -12
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/table/row/table.row.component.js +13 -13
- package/fesm2015/ps-toolkit-ui.js +12 -12
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -2590,7 +2590,7 @@
|
|
|
2590
2590
|
var _loop_1 = function (option) {
|
|
2591
2591
|
var opt = new InputClass(this_1.table.environment, this_1.table.l, option.Name, option.Icon, option.InputType === exports.PermissionInputTypeEnum.Icon ? exports.InputType.Icon : exports.InputType.Button, 'blue h-25 m-h-5 d-ib va-m f-u');
|
|
2592
2592
|
opt.row = this_1.row;
|
|
2593
|
-
if (option.
|
|
2593
|
+
if (option.AccessType === exports.PermissionAccessTypeEnum.Update) {
|
|
2594
2594
|
if (this_1.table.form) {
|
|
2595
2595
|
opt.onClick = function () {
|
|
2596
2596
|
_this.table.form.url = _this.table.url + 'Update/' + _this.row.Data.Id;
|
|
@@ -2621,7 +2621,7 @@
|
|
|
2621
2621
|
opt.url = this_1.table.url + '/Update/' + this_1.row.Data.Id;
|
|
2622
2622
|
}
|
|
2623
2623
|
}
|
|
2624
|
-
else if (option.
|
|
2624
|
+
else if (option.AccessType === exports.PermissionAccessTypeEnum.Delete) {
|
|
2625
2625
|
opt.class = opt.class.replace('blue', 'red');
|
|
2626
2626
|
opt.onClick = function () {
|
|
2627
2627
|
if (_this.table.form) {
|
|
@@ -2686,9 +2686,9 @@
|
|
|
2686
2686
|
var p = new PermissionClass();
|
|
2687
2687
|
p.RelatedId = _this.row.Data.Id;
|
|
2688
2688
|
p.Area = _this.table.permissions.Area;
|
|
2689
|
-
p.Controller =
|
|
2689
|
+
p.Controller = option.Controller;
|
|
2690
2690
|
p.Action = r.name;
|
|
2691
|
-
p.Accesses = option.
|
|
2691
|
+
p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
|
|
2692
2692
|
r.table.permissions = p;
|
|
2693
2693
|
if (r.table.form) {
|
|
2694
2694
|
r.table.form.url = p.getUrl() + 'Insert';
|
|
@@ -2714,31 +2714,31 @@
|
|
|
2714
2714
|
p.Area = this_1.table.permissions.Area;
|
|
2715
2715
|
p.Controller = 'Print';
|
|
2716
2716
|
p.Action = option.Action;
|
|
2717
|
-
opt.url = '/Report' + p.getUrl() + '/
|
|
2717
|
+
opt.url = '/Report' + p.getUrl() + '/' + this_1.row.Data.Id;
|
|
2718
2718
|
opt.urlNewTab = true;
|
|
2719
2719
|
}
|
|
2720
2720
|
else if (option.InputAction === exports.PermissionInputActionEnum.File) {
|
|
2721
2721
|
var p = new PermissionClass();
|
|
2722
2722
|
p.RelatedId = this_1.table.permissions.RelatedId;
|
|
2723
2723
|
p.Area = this_1.table.permissions.Area;
|
|
2724
|
-
p.Controller =
|
|
2725
|
-
p.Action =
|
|
2726
|
-
opt.url = '/File' + p.getUrl() + '/
|
|
2724
|
+
p.Controller = option.Controller;
|
|
2725
|
+
p.Action = option.Action;
|
|
2726
|
+
opt.url = '/File' + p.getUrl() + '/' + this_1.row.Data.Id;
|
|
2727
2727
|
opt.urlNewTab = true;
|
|
2728
2728
|
}
|
|
2729
2729
|
else if (option.InputAction === exports.PermissionInputActionEnum.Confirm) {
|
|
2730
|
-
opt.onClick = function (
|
|
2730
|
+
opt.onClick = function () {
|
|
2731
2731
|
var p = new PermissionClass();
|
|
2732
2732
|
p.RelatedId = _this.table.permissions.RelatedId;
|
|
2733
2733
|
p.Area = _this.table.permissions.Area;
|
|
2734
|
-
p.Controller =
|
|
2734
|
+
p.Controller = option.Controller;
|
|
2735
2735
|
p.Action = option.Action;
|
|
2736
|
-
_this.table.showConfirm(_this.table.l(option.Action + 'Confirm'), p.getUrl() + '/' +
|
|
2736
|
+
_this.table.showConfirm(_this.table.l(option.Action + 'Confirm'), p.getUrl() + '/' + _this.row.Data.Id, null, function () {
|
|
2737
2737
|
_this.table.load();
|
|
2738
2738
|
});
|
|
2739
2739
|
};
|
|
2740
2740
|
}
|
|
2741
|
-
else
|
|
2741
|
+
else {
|
|
2742
2742
|
if (option.OnClick) {
|
|
2743
2743
|
opt.onClick = function (btn) {
|
|
2744
2744
|
option.OnClick(btn);
|