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 { 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 { useTranslation } from 'react-i18next';
@@ -9,6 +11,7 @@ export interface CashReceitPurposeUpdateBottomSheetProps {
callPurposeUpdate: () => void;
};
const menuId = 32;
export const CashReceitPurposeUpdateBottomSheet = ({
bottomSheetOn,
setBottomSheetOn,
@@ -20,13 +23,20 @@ export const CashReceitPurposeUpdateBottomSheet = ({
setBottomSheetOn(false);
};
const onCliickToPurposeUpdate = () => {
callPurposeUpdate();
if(checkGrant(menuId, 'X')){
callPurposeUpdate();
}
else{
showAlert(t('common.nopermission'));
}
};
return (
<>
{ (bottomSheetOn) &&
<div className="bg-dim"></div>
<div className="bg-dim"
style={{ zIndex: 1020 }}
></div>
}
<motion.div
className="bottomsheet"

View File

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