get rid of the odd complexity of the snowflake class
This commit is contained in:
@@ -138,7 +138,7 @@ class RoleList extends Buttons {
|
||||
}
|
||||
for (const i of permissions) {
|
||||
console.log(i);
|
||||
this.buttons.push([i[0].getObject().name, i[0].id]); //
|
||||
this.buttons.push([i[0].name, i[0].id]);
|
||||
}
|
||||
this.options = options;
|
||||
}
|
||||
@@ -149,8 +149,11 @@ class RoleList extends Buttons {
|
||||
const perm = arr[1];
|
||||
this.permission.deny = perm.deny;
|
||||
this.permission.allow = perm.allow;
|
||||
this.options.name = SnowFlake.getSnowFlakeFromID(str, Role).getObject().name;
|
||||
this.options.haschanged = false;
|
||||
const role = this.permissions.find(e => e[0].id === str);
|
||||
if (role) {
|
||||
this.options.name = role[0].name;
|
||||
this.options.haschanged = false;
|
||||
}
|
||||
}
|
||||
return this.options.generateHTML();
|
||||
}
|
||||
|
Reference in New Issue
Block a user