get rid of the odd complexity of the snowflake class

This commit is contained in:
MathMan05
2024-09-03 10:34:40 -05:00
parent b72d7673f4
commit 03041cf9fd
13 changed files with 237 additions and 257 deletions

View File

@@ -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();
}