mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: delete & edit role.
This commit is contained in:
@@ -75,3 +75,19 @@ export function usePermissionsSchema(query, props) {
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the role permisstion schema.
|
||||
* @param {number} role_id - role id.
|
||||
*/
|
||||
export function useRolePermission(role_id, props, requestProps) {
|
||||
return useRequestQuery(
|
||||
[t.ROLE, role_id],
|
||||
{ method: 'get', url: `roles/${role_id}`, ...requestProps },
|
||||
{
|
||||
select: (res) => res.data.role,
|
||||
defaultData: [],
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user