UI 잇슈 수정
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
}
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user