이용내역 권한 관련

This commit is contained in:
focp212@naver.com
2025-11-05 15:26:14 +09:00
parent ad28ccd82f
commit fb889a9f2c
14 changed files with 119 additions and 102 deletions

View File

@@ -9,6 +9,7 @@ import { PATHS } from '@/shared/constants/paths';
import { useStore } from '@/shared/model/store';
import { useTranslation } from 'react-i18next';
import { showAlert } from '@/widgets/show-alert';
import { checkGrant } from '@/shared/lib/check-grant';
export const BoxContainer2 = () => {
const { navigate } = useNavigate();
@@ -81,17 +82,8 @@ export const BoxContainer2 = () => {
callOverview();
}, []);
const checkGrant = (menuId?: number) => {
const menuGrantsByKey = useStore.getState().UserStore.menuGrantsByKey;
const myGrants = menuGrantsByKey['' + menuId];
if(myGrants?.includes('R')){
return true
}
return false;
};
const onClickToNavigate = () => {
if(checkGrant(36)){
if(checkGrant(36, 'R')){
navigate(PATHS.settlement.list);
}
else{