UI 잇슈 수정

This commit is contained in:
focp212@naver.com
2025-11-12 19:38:17 +09:00
parent 05ad24b13f
commit 6726b33fa5
2 changed files with 19 additions and 7 deletions

View File

@@ -1,5 +1,7 @@
import { BottomSheetMotionDuration, BottomSheetMotionVaiants } from '@/entities/common/model/constant'; import { BottomSheetMotionDuration, BottomSheetMotionVaiants } from '@/entities/common/model/constant';
import { IMAGE_ROOT } from '@/shared/constants/common'; import { IMAGE_ROOT } from '@/shared/constants/common';
import { checkGrant } from '@/shared/lib/check-grant';
import { showAlert } from '@/widgets/show-alert';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@@ -9,6 +11,7 @@ export interface CashReceitPurposeUpdateBottomSheetProps {
callPurposeUpdate: () => void; callPurposeUpdate: () => void;
}; };
const menuId = 32;
export const CashReceitPurposeUpdateBottomSheet = ({ export const CashReceitPurposeUpdateBottomSheet = ({
bottomSheetOn, bottomSheetOn,
setBottomSheetOn, setBottomSheetOn,
@@ -20,13 +23,20 @@ export const CashReceitPurposeUpdateBottomSheet = ({
setBottomSheetOn(false); setBottomSheetOn(false);
}; };
const onCliickToPurposeUpdate = () => { const onCliickToPurposeUpdate = () => {
callPurposeUpdate(); if(checkGrant(menuId, 'X')){
callPurposeUpdate();
}
else{
showAlert(t('common.nopermission'));
}
}; };
return ( return (
<> <>
{ (bottomSheetOn) && { (bottomSheetOn) &&
<div className="bg-dim"></div> <div className="bg-dim"
style={{ zIndex: 1020 }}
></div>
} }
<motion.div <motion.div
className="bottomsheet" className="bottomsheet"

View File

@@ -196,11 +196,13 @@ export const CashReceiptDetail = ({
} }
</div> </div>
</motion.div> </motion.div>
<CashReceitPurposeUpdateBottomSheet { bottomSheetOn &&
setBottomSheetOn={ setBottomSheetOn } <CashReceitPurposeUpdateBottomSheet
bottomSheetOn={ bottomSheetOn } setBottomSheetOn={ setBottomSheetOn }
callPurposeUpdate={ callPurposeUpdate } bottomSheetOn={ bottomSheetOn }
></CashReceitPurposeUpdateBottomSheet> callPurposeUpdate={ callPurposeUpdate }
></CashReceitPurposeUpdateBottomSheet>
}
</> </>
); );
}; };