ps-toolkit-ui 0.0.31 → 0.0.35
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 +18 -15
- 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 +12 -10
- package/esm2015/lib/components/base.component.js +4 -6
- package/esm2015/lib/components/table/row/table.row.component.js +4 -1
- package/fesm2015/ps-toolkit-ui.js +17 -14
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/base.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2525,6 +2525,9 @@
|
|
|
2525
2525
|
};
|
|
2526
2526
|
TableRowComponent.prototype.getOptions = function () {
|
|
2527
2527
|
var _this = this;
|
|
2528
|
+
console.log(this.table.options);
|
|
2529
|
+
console.log(this.table.options.map(function (x) { return x.condition; }));
|
|
2530
|
+
console.log(this.table.options.map(function (x) { return _this.row[x.condition]; }));
|
|
2528
2531
|
return (this.addChildren !== null && (this.table.level === null || this.table.level > this.level) ? [this.addChildren] : [])
|
|
2529
2532
|
.concat(this.table.options.filter(function (x) { return x.condition == null ||
|
|
2530
2533
|
(x.condition.startsWith('!') ? !_this.row[x.condition.substring(1)] : _this.row[x.condition]); }).map(function (o) {
|
|
@@ -6886,17 +6889,15 @@
|
|
|
6886
6889
|
return app.getL("" + c + (a ? "." + a : ''), key, v);
|
|
6887
6890
|
};
|
|
6888
6891
|
if (app.currentUser !== null) {
|
|
6889
|
-
this.permissions = this.getPermission();
|
|
6890
|
-
console.log(this.permissions);
|
|
6892
|
+
this.permissions = this.getPermission(this.c, this.a);
|
|
6891
6893
|
if (this.permissions) {
|
|
6892
6894
|
this.permissions.Area = app.area;
|
|
6893
6895
|
}
|
|
6894
6896
|
}
|
|
6895
6897
|
}
|
|
6896
|
-
BaseComponent.prototype.getPermission = function () {
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
var p = this.app.currentUser.Permissions.filter(function (per) { return per.Controller === _this.c && (_this.a == null || per.Action === _this.a) &&
|
|
6898
|
+
BaseComponent.prototype.getPermission = function (c, a) {
|
|
6899
|
+
if (a === void 0) { a = null; }
|
|
6900
|
+
var p = this.app.currentUser.Permissions.filter(function (per) { return per.Controller === c && (a == null || per.Action === a) &&
|
|
6900
6901
|
per.Type === exports.PermissionTypeEnum.Item; });
|
|
6901
6902
|
return p.length > 0 ? this.getPermissionClass(p[0]) : null;
|
|
6902
6903
|
};
|
|
@@ -7056,15 +7057,17 @@
|
|
|
7056
7057
|
var _this = this;
|
|
7057
7058
|
if (changeRows === void 0) { changeRows = null; }
|
|
7058
7059
|
this.permission = true;
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
this.
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7060
|
+
if (this.permissions) {
|
|
7061
|
+
var listAccess = this.permissions.getAccess('List');
|
|
7062
|
+
if (listAccess !== null) {
|
|
7063
|
+
this.title = listAccess.Name;
|
|
7064
|
+
this.url = this.permissions.getUrl();
|
|
7065
|
+
if (this.permissions.Type !== exports.PermissionTypeEnum.Form) {
|
|
7066
|
+
this.load();
|
|
7067
|
+
}
|
|
7068
|
+
else {
|
|
7069
|
+
this.loading = false;
|
|
7070
|
+
}
|
|
7068
7071
|
}
|
|
7069
7072
|
}
|
|
7070
7073
|
else {
|