feat: almost done with most ts stuff

This commit is contained in:
=
2025-10-10 00:09:46 +05:30
parent 44c9575a3d
commit c2490380f0
28 changed files with 551 additions and 1432 deletions
@@ -167,6 +167,13 @@ export const roleServiceFactory = ({
await factory.onGetRoleByIdGuard(dto);
const scope = factory.getScopeField(scopeData);
const predefinedRole = await factory.getPredefinedRoles(scopeData);
const selectedRole = predefinedRole.find((el) => el.id === dto.selector.id);
if (selectedRole) {
return { ...selectedRole, permissions: UnpackedPermissionSchema.array().parse(selectedRole.permissions) };
}
const role = await roleDAL.findOne({
id: selector.id,
[scope.key]: scope.value