63 lines
2.2 KiB
JavaScript
63 lines
2.2 KiB
JavaScript
|
|
"use strict";
|
||
|
|
var __extends = (this && this.__extends) || (function () {
|
||
|
|
var extendStatics = function (d, b) {
|
||
|
|
extendStatics = Object.setPrototypeOf ||
|
||
|
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
|
|
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||
|
|
return extendStatics(d, b);
|
||
|
|
};
|
||
|
|
return function (d, b) {
|
||
|
|
if (typeof b !== "function" && b !== null)
|
||
|
|
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||
|
|
extendStatics(d, b);
|
||
|
|
function __() { this.constructor = d; }
|
||
|
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
|
|
};
|
||
|
|
})();
|
||
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
|
exports.RoleActionPermission = exports.MenuTree = exports.RolePermission = exports.Role = void 0;
|
||
|
|
var baseObject_1 = require("../Basic/baseObject");
|
||
|
|
var enums_1 = require("../enums");
|
||
|
|
var Role = /** @class */ (function (_super) {
|
||
|
|
__extends(Role, _super);
|
||
|
|
function Role() {
|
||
|
|
var _this = _super.call(this) || this;
|
||
|
|
_this.rolePermissions = [];
|
||
|
|
_this.code = '';
|
||
|
|
_this.name = '';
|
||
|
|
_this.description = '';
|
||
|
|
_this.approveBy = undefined;
|
||
|
|
_this.approveDate = undefined;
|
||
|
|
return _this;
|
||
|
|
}
|
||
|
|
return Role;
|
||
|
|
}(baseObject_1.BaseObject));
|
||
|
|
exports.Role = Role;
|
||
|
|
var RolePermission = /** @class */ (function () {
|
||
|
|
function RolePermission() {
|
||
|
|
this.isBookmarked = false;
|
||
|
|
this.menuKey = '';
|
||
|
|
this.status = enums_1.EnumAuthStatus.Approved;
|
||
|
|
}
|
||
|
|
return RolePermission;
|
||
|
|
}());
|
||
|
|
exports.RolePermission = RolePermission;
|
||
|
|
var MenuTree = /** @class */ (function () {
|
||
|
|
function MenuTree() {
|
||
|
|
this.level = '';
|
||
|
|
this.icon = 'pi pi-fw pi-home';
|
||
|
|
}
|
||
|
|
MenuTree.prototype.prepareRolePermission = function (permissions) {
|
||
|
|
var menu = new MenuTree();
|
||
|
|
return menu;
|
||
|
|
};
|
||
|
|
return MenuTree;
|
||
|
|
}());
|
||
|
|
exports.MenuTree = MenuTree;
|
||
|
|
var RoleActionPermission = /** @class */ (function () {
|
||
|
|
function RoleActionPermission() {
|
||
|
|
}
|
||
|
|
return RoleActionPermission;
|
||
|
|
}());
|
||
|
|
exports.RoleActionPermission = RoleActionPermission;
|
||
|
|
//# sourceMappingURL=role.js.map
|