Fixed duplicated departments issue

You will now receive the right permissions for the right departments without any departments messing or getting duplicated.
This commit is contained in:
Andyyy7666
2022-07-17 20:14:27 +02:00
committed by GitHub
parent be2b6c4770
commit d5040e06b7

View File

@@ -112,9 +112,11 @@ $(function() {
}
if (item.type === "givePerms") {
$('.departments').append($('<option>', {
text: item.deptRole
}));
JSON.parse(item.deptRoles).forEach((dept) => {
$('.departments').append($('<option>', {
text: dept
}));
});
}
if (item.type === "aop") {
@@ -264,4 +266,4 @@ $(function() {
$.post(`https://${GetParentResourceName()}/exitGame`);
return;
});
});
});