ps-toolkit-ui 0.0.137 → 0.0.141
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 +26 -23
- 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/classes/table.class.js +1 -3
- package/esm2015/lib/components/table/row/table.row.component.js +27 -22
- package/fesm2015/ps-toolkit-ui.js +26 -23
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -2590,7 +2590,10 @@
|
|
|
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
|
-
|
|
2593
|
+
console.log(option, 'option');
|
|
2594
|
+
console.log(option.AccessType, 'option.AccessType');
|
|
2595
|
+
console.log(opt, 'opt');
|
|
2596
|
+
if (option.AccessType === exports.PermissionAccessTypeEnum.Update) {
|
|
2594
2597
|
if (this_1.table.form) {
|
|
2595
2598
|
opt.onClick = function () {
|
|
2596
2599
|
_this.table.form.url = _this.table.url + 'Update/' + _this.row.Data.Id;
|
|
@@ -2621,9 +2624,12 @@
|
|
|
2621
2624
|
opt.url = this_1.table.url + '/Update/' + this_1.row.Data.Id;
|
|
2622
2625
|
}
|
|
2623
2626
|
}
|
|
2624
|
-
else if (option.
|
|
2627
|
+
else if (option.AccessType === exports.PermissionAccessTypeEnum.Delete) {
|
|
2628
|
+
console.log(option, 'option');
|
|
2629
|
+
console.log(opt, 'opt');
|
|
2625
2630
|
opt.class = opt.class.replace('blue', 'red');
|
|
2626
2631
|
opt.onClick = function () {
|
|
2632
|
+
console.log(_this.row.Data.Id, 'opt onClick');
|
|
2627
2633
|
if (_this.table.form) {
|
|
2628
2634
|
_this.table.form.clear();
|
|
2629
2635
|
}
|
|
@@ -2647,19 +2653,18 @@
|
|
|
2647
2653
|
var p = new PermissionClass();
|
|
2648
2654
|
p.RelatedId = this_1.table.permissions.RelatedId;
|
|
2649
2655
|
p.Area = this_1.table.permissions.Area;
|
|
2650
|
-
p.Controller = option.Controller
|
|
2651
|
-
p.Action =
|
|
2652
|
-
opt.url = p.getUrl() +
|
|
2656
|
+
p.Controller = option.Controller;
|
|
2657
|
+
p.Action = option.Action;
|
|
2658
|
+
opt.url = p.getUrl() + '/' + this_1.row.Data.Id;
|
|
2653
2659
|
opt.urlNewTab = option.InputAction === exports.PermissionInputActionEnum.LinkNewTab;
|
|
2654
2660
|
}
|
|
2655
2661
|
else if (option.InputAction === exports.PermissionInputActionEnum.Modal) {
|
|
2656
2662
|
opt.modal = this_1.table.modals.find(function (x) { return x.name === option.Action; });
|
|
2657
|
-
opt.onClick = function (
|
|
2663
|
+
opt.onClick = function () {
|
|
2658
2664
|
var e_2, _a;
|
|
2659
2665
|
if (opt.modal.table) {
|
|
2660
|
-
console.log(_this.row.Options.filter(function (x) { return x.ParentId === option.Id; }), 'this.row.Options.filter(x => x.ParentId === option.Id)');
|
|
2661
2666
|
var p = new PermissionClass();
|
|
2662
|
-
p.RelatedId =
|
|
2667
|
+
p.RelatedId = _this.row.Data.Id;
|
|
2663
2668
|
p.Area = _this.table.permissions.Area;
|
|
2664
2669
|
p.Controller = _this.table.permissions.Controller;
|
|
2665
2670
|
p.Action = option.Action;
|
|
@@ -2673,8 +2678,8 @@
|
|
|
2673
2678
|
}
|
|
2674
2679
|
if (opt.modal.form) {
|
|
2675
2680
|
opt.modal.form.name = option.Name;
|
|
2676
|
-
opt.modal.form.url = opt.modal.form.baseUrl + 'Update/' +
|
|
2677
|
-
opt.modal.form.loadData(opt.modal.form.baseUrl + 'Get/' +
|
|
2681
|
+
opt.modal.form.url = opt.modal.form.baseUrl + 'Update/' + _this.row.Data.Id;
|
|
2682
|
+
opt.modal.form.loadData(opt.modal.form.baseUrl + 'Get/' + _this.row.Data.Id);
|
|
2678
2683
|
opt.modal.form.onSuccessBase = function () {
|
|
2679
2684
|
opt.modal.hide();
|
|
2680
2685
|
};
|
|
@@ -2685,11 +2690,11 @@
|
|
|
2685
2690
|
var r = _c.value;
|
|
2686
2691
|
if (r.table) {
|
|
2687
2692
|
var p = new PermissionClass();
|
|
2688
|
-
p.RelatedId =
|
|
2693
|
+
p.RelatedId = _this.row.Data.Id;
|
|
2689
2694
|
p.Area = _this.table.permissions.Area;
|
|
2690
|
-
p.Controller =
|
|
2695
|
+
p.Controller = option.Controller;
|
|
2691
2696
|
p.Action = r.name;
|
|
2692
|
-
p.Accesses = option.
|
|
2697
|
+
p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
|
|
2693
2698
|
r.table.permissions = p;
|
|
2694
2699
|
if (r.table.form) {
|
|
2695
2700
|
r.table.form.url = p.getUrl() + 'Insert';
|
|
@@ -2715,31 +2720,31 @@
|
|
|
2715
2720
|
p.Area = this_1.table.permissions.Area;
|
|
2716
2721
|
p.Controller = 'Print';
|
|
2717
2722
|
p.Action = option.Action;
|
|
2718
|
-
opt.url = '/Report' + p.getUrl() + '/
|
|
2723
|
+
opt.url = '/Report' + p.getUrl() + '/' + this_1.row.Data.Id;
|
|
2719
2724
|
opt.urlNewTab = true;
|
|
2720
2725
|
}
|
|
2721
2726
|
else if (option.InputAction === exports.PermissionInputActionEnum.File) {
|
|
2722
2727
|
var p = new PermissionClass();
|
|
2723
2728
|
p.RelatedId = this_1.table.permissions.RelatedId;
|
|
2724
2729
|
p.Area = this_1.table.permissions.Area;
|
|
2725
|
-
p.Controller =
|
|
2726
|
-
p.Action =
|
|
2727
|
-
opt.url = '/File' + p.getUrl() + '/
|
|
2730
|
+
p.Controller = option.Controller;
|
|
2731
|
+
p.Action = option.Action;
|
|
2732
|
+
opt.url = '/File' + p.getUrl() + '/' + this_1.row.Data.Id;
|
|
2728
2733
|
opt.urlNewTab = true;
|
|
2729
2734
|
}
|
|
2730
2735
|
else if (option.InputAction === exports.PermissionInputActionEnum.Confirm) {
|
|
2731
|
-
opt.onClick = function (
|
|
2736
|
+
opt.onClick = function () {
|
|
2732
2737
|
var p = new PermissionClass();
|
|
2733
2738
|
p.RelatedId = _this.table.permissions.RelatedId;
|
|
2734
2739
|
p.Area = _this.table.permissions.Area;
|
|
2735
|
-
p.Controller =
|
|
2740
|
+
p.Controller = option.Controller;
|
|
2736
2741
|
p.Action = option.Action;
|
|
2737
|
-
_this.table.showConfirm(_this.table.l(option.Action + 'Confirm'), p.getUrl() + '/' +
|
|
2742
|
+
_this.table.showConfirm(_this.table.l(option.Action + 'Confirm'), p.getUrl() + '/' + _this.row.Data.Id, null, function () {
|
|
2738
2743
|
_this.table.load();
|
|
2739
2744
|
});
|
|
2740
2745
|
};
|
|
2741
2746
|
}
|
|
2742
|
-
else
|
|
2747
|
+
else {
|
|
2743
2748
|
if (option.OnClick) {
|
|
2744
2749
|
opt.onClick = function (btn) {
|
|
2745
2750
|
option.OnClick(btn);
|
|
@@ -7244,7 +7249,6 @@
|
|
|
7244
7249
|
var accessInp = new InputClass(this_1.environment, this_1.l, access.Name, access.Icon, access.InputType === exports.PermissionInputTypeEnum.Button ? exports.InputType.Button : exports.InputType.Icon, 'blue w-u h-30');
|
|
7245
7250
|
if (access.AccessType === exports.PermissionAccessTypeEnum.Insert) {
|
|
7246
7251
|
accessInp.class = accessInp.class.replace('blue', 'green');
|
|
7247
|
-
console.log(this_1.name, this_1.form, '111111111111');
|
|
7248
7252
|
if (this_1.form) {
|
|
7249
7253
|
this_1.form.url = this_1.form.baseUrl = this_1.url + 'Insert';
|
|
7250
7254
|
if (!this_1.form.onTop) {
|
|
@@ -7258,7 +7262,6 @@
|
|
|
7258
7262
|
}
|
|
7259
7263
|
else {
|
|
7260
7264
|
this_1.form.displayLabel = false;
|
|
7261
|
-
console.log(this_1.form, '222222222');
|
|
7262
7265
|
return "continue";
|
|
7263
7266
|
}
|
|
7264
7267
|
}
|