update permission and product

This commit is contained in:
Timi
2026-09-04 23:07:59 +08:00
parent 1df5748f54
commit fc9e6a5023
48 changed files with 1670 additions and 2475 deletions
+10
View File
@@ -167,6 +167,14 @@ export const usePermissionSettingsStore = defineStore("permission-settings", ()
return (await RoleAPI.parentGrantableList(roleId)).map(normalizeRole);
}
async function loadCreateParentGrantableRoles(targetModuleCode: ModuleCode = moduleCode): Promise<Role[]> {
return (await RoleAPI.createParentGrantableList(targetModuleCode)).map(normalizeRole);
}
async function loadCurrentRoleDetails(targetModuleCode: ModuleCode = moduleCode): Promise<Role[]> {
return (await RoleAPI.currentDetailList(targetModuleCode)).map(normalizeRole);
}
async function loadPermissionDetail(id: string): Promise<Permission> {
if (!id) {
return createEmptyPermission();
@@ -389,6 +397,8 @@ export const usePermissionSettingsStore = defineStore("permission-settings", ()
loadDelegationPermissions,
loadGrantableDelegationPermissions,
loadParentGrantableRoles,
loadCreateParentGrantableRoles,
loadCurrentRoleDetails,
loadRoleDetail,
loadPermissionDetail,
getRoleById,