이용내역 권한 관련

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

@@ -30,6 +30,8 @@ import {
DetailMotionVariants
} from '@/entities/common/model/constant';
import { FullMenuClose } from '@/entities/common/ui/full-menu-close';
import { checkGrant } from '@/shared/lib/check-grant';
import { showAlert } from '@/widgets/show-alert';
export interface AllTransactionDetailProps {
detailOn: boolean;
@@ -38,6 +40,8 @@ export interface AllTransactionDetailProps {
serviceCode: string;
};
/* 거래내역조회 31 */
const menuId = 31;
export const AllTransactionDetail = ({
detailOn,
setDetailOn,
@@ -94,25 +98,30 @@ export const AllTransactionDetail = ({
};
const onClickToCancel = () => {
let msg = t('transaction.confirmCancel');
if(checkGrant(menuId, 'X')){
let msg = t('transaction.confirmCancel');
overlay.open(({
isOpen,
close,
unmount
}) => {
return (
<Dialog
afterLeave={ unmount }
open={ isOpen }
onClose={ close }
onConfirmClick={ () => onClickToNavigate(PATHS.transaction.allTransaction.cancel) }
// onConfirmClick={ () => callCancelInfo() }
message={ msg }
buttonLabel={[t('common.cancel'), t('common.confirm')]}
/>
);
});
overlay.open(({
isOpen,
close,
unmount
}) => {
return (
<Dialog
afterLeave={ unmount }
open={ isOpen }
onClose={ close }
onConfirmClick={ () => onClickToNavigate(PATHS.transaction.allTransaction.cancel) }
// onConfirmClick={ () => callCancelInfo() }
message={ msg }
buttonLabel={[t('common.cancel'), t('common.confirm')]}
/>
);
});
}
else{
showAlert('권한이 없습니다.');
}
};
const onClickToClose = () => {

View File

@@ -24,6 +24,7 @@ import { AmountInfoSection } from '@/entities/transaction/ui/section/amount-info
import { snackBar } from '@/shared/lib';
import { DetailMotionDuration, DetailMotionStyle, DetailMotionVariants } from '@/entities/common/model/constant';
import { FullMenuClose } from '@/entities/common/ui/full-menu-close';
import { checkGrant } from '@/shared/lib/check-grant';
export interface CashReceiptDetailProps {
detailOn: boolean;
@@ -31,6 +32,8 @@ export interface CashReceiptDetailProps {
tid: string;
};
/* 현금영수증 32 */
const menuId = 32;
export const CashReceiptDetail = ({
detailOn,
setDetailOn,
@@ -105,7 +108,12 @@ export const CashReceiptDetail = ({
};
const onClickToPurposeUpdate = () => {
setBottomSheetOn(true);
if(checkGrant(menuId, 'X')){
setBottomSheetOn(true);
}
else{
showAlert('권한이 없습니다.');
}
};
return (

View File

@@ -27,6 +27,8 @@ import { AmountInfoSection } from '@/entities/transaction/ui/section/amount-info
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
import { DetailMotionDuration, DetailMotionStyle, DetailMotionVariants } from '@/entities/common/model/constant';
import { FullMenuClose } from '@/entities/common/ui/full-menu-close';
import { checkGrant } from '@/shared/lib/check-grant';
import { showAlert } from '@/widgets/show-alert';
export interface EscrowDetailProps {
detailOn: boolean;
@@ -35,6 +37,8 @@ export interface EscrowDetailProps {
serviceCode: string;
};
/* 에스크로 33 */
const menuId = 33;
export const EscrowDetail = ({
detailOn,
setDetailOn,
@@ -91,7 +95,12 @@ export const EscrowDetail = ({
const onClickToShowMailResend = () => {
setBottomSheetOn(true);
if(checkGrant(menuId, 'X')){
setBottomSheetOn(true);
}
else{
showAlert('권한이 없습니다.');
}
};
const callMailResend = () => {