|
@@ -13,7 +13,6 @@ import {
|
|
|
useSWRxUserGroupRelations,
|
|
useSWRxUserGroupRelations,
|
|
|
} from '~/stores/user-group';
|
|
} from '~/stores/user-group';
|
|
|
|
|
|
|
|
-// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
|
|
|
export const useUserGroup = (userGroupId: string, isExternalGroup: boolean) => {
|
|
export const useUserGroup = (userGroupId: string, isExternalGroup: boolean) => {
|
|
|
const userGroupRes = useSWRxUserGroup(isExternalGroup ? null : userGroupId);
|
|
const userGroupRes = useSWRxUserGroup(isExternalGroup ? null : userGroupId);
|
|
|
const externalUserGroupRes = useSWRxExternalUserGroup(
|
|
const externalUserGroupRes = useSWRxExternalUserGroup(
|
|
@@ -22,7 +21,6 @@ export const useUserGroup = (userGroupId: string, isExternalGroup: boolean) => {
|
|
|
return isExternalGroup ? externalUserGroupRes : userGroupRes;
|
|
return isExternalGroup ? externalUserGroupRes : userGroupRes;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
|
|
|
export const useUserGroupRelations = (
|
|
export const useUserGroupRelations = (
|
|
|
userGroupId: string,
|
|
userGroupId: string,
|
|
|
isExternalGroup: boolean,
|
|
isExternalGroup: boolean,
|
|
@@ -36,7 +34,6 @@ export const useUserGroupRelations = (
|
|
|
return isExternalGroup ? externalUserGroupRes : userGroupRes;
|
|
return isExternalGroup ? externalUserGroupRes : userGroupRes;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
|
|
|
export const useChildUserGroupList = (
|
|
export const useChildUserGroupList = (
|
|
|
userGroupId: string,
|
|
userGroupId: string,
|
|
|
isExternalGroup: boolean,
|
|
isExternalGroup: boolean,
|
|
@@ -52,7 +49,6 @@ export const useChildUserGroupList = (
|
|
|
return isExternalGroup ? externalUserGroupRes : userGroupRes;
|
|
return isExternalGroup ? externalUserGroupRes : userGroupRes;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
|
|
|
export const useUserGroupRelationList = (
|
|
export const useUserGroupRelationList = (
|
|
|
userGroupIds: string[],
|
|
userGroupIds: string[],
|
|
|
isExternalGroup: boolean,
|
|
isExternalGroup: boolean,
|
|
@@ -66,7 +62,6 @@ export const useUserGroupRelationList = (
|
|
|
return isExternalGroup ? externalUserGroupRes : userGroupRes;
|
|
return isExternalGroup ? externalUserGroupRes : userGroupRes;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
|
|
|
export const useAncestorUserGroups = (
|
|
export const useAncestorUserGroups = (
|
|
|
userGroupId: string,
|
|
userGroupId: string,
|
|
|
isExternalGroup: boolean,
|
|
isExternalGroup: boolean,
|