ps-toolkit-ui 1.4.21 → 1.4.24
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 +8 -5
- 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 +9 -6
- package/fesm2015/ps-toolkit-ui.js +8 -5
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/table/row/table.row.component.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -2573,6 +2573,9 @@
|
|
|
2573
2573
|
}
|
|
2574
2574
|
}, 500);
|
|
2575
2575
|
};
|
|
2576
|
+
TableRowComponent.prototype.getOptionUrl = function (url, relatedId, rowId) {
|
|
2577
|
+
return (relatedId ? url.replace('{}', relatedId) : url).replace('{}', rowId);
|
|
2578
|
+
};
|
|
2576
2579
|
TableRowComponent.prototype.setOptions = function () {
|
|
2577
2580
|
var e_1, _a, e_2, _b;
|
|
2578
2581
|
var _this = this;
|
|
@@ -2612,7 +2615,7 @@
|
|
|
2612
2615
|
if (option.AccessType === exports.PermissionAccessTypeEnum.Update) {
|
|
2613
2616
|
if (this_2.table.form) {
|
|
2614
2617
|
opt.onClick = function () {
|
|
2615
|
-
_this.table.form.url = option.Url
|
|
2618
|
+
_this.table.form.url = _this.getOptionUrl(option.Url, _this.table.permissions.RelatedId, _this.row.Data.Id);
|
|
2616
2619
|
if (_this.table.hasChildren && _this.row.Data.ParentId != null) {
|
|
2617
2620
|
_this.table.form.onSuccessBase = function () {
|
|
2618
2621
|
_this.table.modal.hide();
|
|
@@ -2637,7 +2640,7 @@
|
|
|
2637
2640
|
};
|
|
2638
2641
|
}
|
|
2639
2642
|
else {
|
|
2640
|
-
opt.url = option.Url
|
|
2643
|
+
opt.url = this_2.getOptionUrl(option.Url, this_2.table.permissions.RelatedId, this_2.row.Data.Id);
|
|
2641
2644
|
}
|
|
2642
2645
|
}
|
|
2643
2646
|
else if (option.AccessType === exports.PermissionAccessTypeEnum.Delete) {
|
|
@@ -2651,7 +2654,7 @@
|
|
|
2651
2654
|
_this.changeRows.emit(_this.row.Data);
|
|
2652
2655
|
}
|
|
2653
2656
|
else {
|
|
2654
|
-
_this.confirmShow.emit({ url: option.Url.
|
|
2657
|
+
_this.confirmShow.emit({ url: _this.getOptionUrl(option.Url, _this.table.permissions.RelatedId, _this.row.Data.Id), accept: function () {
|
|
2655
2658
|
if (_this.table.hasChildren && _this.table.childrenAutoLoad && _this.row.Data.ParentId != null) {
|
|
2656
2659
|
_this.loadParent.emit(_this.row.Data.ParentId);
|
|
2657
2660
|
}
|
|
@@ -2733,7 +2736,7 @@
|
|
|
2733
2736
|
p.Area = this_2.table.permissions.Area;
|
|
2734
2737
|
p.Controller = option.Controller;
|
|
2735
2738
|
p.Action = option.Action;
|
|
2736
|
-
opt.url = '/
|
|
2739
|
+
opt.url = '/file' + this_2.getOptionUrl(option.Url, this_2.table.permissions.RelatedId, this_2.row.Data.Id);
|
|
2737
2740
|
opt.urlNewTab = true;
|
|
2738
2741
|
}
|
|
2739
2742
|
else if (option.InputAction === exports.PermissionInputActionEnum.Confirm) {
|
|
@@ -2868,7 +2871,7 @@
|
|
|
2868
2871
|
this.table.form.inputs.filter(function (x) { return !x.inEditVisible; }).forEach(function (x) { return x.visible = false; });
|
|
2869
2872
|
}
|
|
2870
2873
|
else {
|
|
2871
|
-
new RequestClass(this.table.environment, this.table.l).send(option.Url.replace('update', 'get').
|
|
2874
|
+
new RequestClass(this.table.environment, this.table.l).send(this.getOptionUrl(option.Url.replace('update', 'get'), this.table.permissions.RelatedId, this.row.Data.Id), exports.Method.Post, null, opt, function (result) {
|
|
2872
2875
|
_this.table.form.name = opt.name;
|
|
2873
2876
|
_this.table.form.setButtons(_this.table.form.onTop, true, _this.row.Data.Id);
|
|
2874
2877
|
_this.table.form.setData(result);
|