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