- 부가서비스 누락된 권한 체크 추가, 누락된 시스템 에러 처리 추가
This commit is contained in:
@@ -11,6 +11,7 @@ import { useExtensionArsResendMutation } from '@/entities/additional-service/api
|
||||
import { snackBar } from '@/shared/lib';
|
||||
import { ArsResendSmsBottomSheet } from '../resend-sms-bottom-sheet';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
|
||||
export interface ArsDetailProps {
|
||||
detailOn: boolean;
|
||||
@@ -71,6 +72,10 @@ export const ArsDetail = ({
|
||||
}
|
||||
|
||||
const onClickToOpenResendBottomSheet = () => {
|
||||
if (!checkGrant(52, 'X')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
setBottomSheetOn(true);
|
||||
};
|
||||
const onClickToClose = () => {
|
||||
|
||||
@@ -12,6 +12,7 @@ import { useExtensionFundAccountTransferRequestMutation } from '@/entities/addit
|
||||
import { DetailMotionDuration, DetailMotionStyle, DetailMotionVariants } from '@/entities/common/model/constant';
|
||||
import { FullMenuClose } from '@/entities/common/ui/full-menu-close';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
|
||||
export interface FundAccountTransferDetailProps {
|
||||
detailOn: boolean;
|
||||
@@ -49,6 +50,10 @@ export const FundAccountTransferDetail = ({
|
||||
};
|
||||
|
||||
const onClickToRequest = () => {
|
||||
if (!checkGrant(55, 'W')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
let params: ExtensionFundAccountTransferRequestParams = {
|
||||
seq: seq
|
||||
};
|
||||
|
||||
@@ -25,6 +25,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { DetailMotionDuration, DetailMotionStyle, DetailMotionVariants } from '@/entities/common/model/constant';
|
||||
import { FullMenuClose } from '@/entities/common/ui/full-menu-close';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
|
||||
export interface LinkPaymentHistoryDetailProps {
|
||||
detailOn: boolean;
|
||||
@@ -107,6 +108,10 @@ export const LinkPaymentHistoryDetail = ({
|
||||
}
|
||||
|
||||
const onClickToResend = () => {
|
||||
if (!checkGrant(54, 'X')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
let msg = t('additionalService.linkPayment.resendConfirm');
|
||||
|
||||
overlay.open(({
|
||||
@@ -128,6 +133,10 @@ export const LinkPaymentHistoryDetail = ({
|
||||
};
|
||||
|
||||
const onClickToSeparateApproval = () => {
|
||||
if (!checkGrant(54, 'X')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
navigate(PATHS.additionalService.linkPayment.separateApproval, {
|
||||
state: { mid, requestId }
|
||||
});
|
||||
|
||||
@@ -10,6 +10,7 @@ import { FullMenuClose } from '@/entities/common/ui/full-menu-close';
|
||||
import { DownloadTypeBottomSheet } from '@/entities/common/ui/download-type-bottom-sheet';
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
|
||||
|
||||
export interface PayoutDetailProps {
|
||||
@@ -51,6 +52,10 @@ export const PayoutDetail = ({
|
||||
}
|
||||
|
||||
const onClickToDownload = () => {
|
||||
if (!checkGrant(53, 'D')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
setDownloadTypeBottomSheetOn(true);
|
||||
};
|
||||
|
||||
@@ -133,7 +138,7 @@ export const PayoutDetail = ({
|
||||
</span>
|
||||
</div>
|
||||
<div className="num-store">{detail?.companyName}</div>
|
||||
<div className="num-day">{detail?.settlementDate}</div>
|
||||
<div className="num-day">{moment(detail?.settlementDate).format('YYYY.MM.DD')}</div>
|
||||
<div className="receipt-row">
|
||||
<button
|
||||
className="receipt-btn"
|
||||
@@ -163,7 +168,7 @@ export const PayoutDetail = ({
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">{t('additionalService.payout.disbursementDateTime')}</span>
|
||||
<span className="v">{moment(detail?.settlementDateTime, 'YYYYMMDDHHmmss').format('YYYY.MM.DD HH:mm:ss')}</span>
|
||||
<span className="v">{detail?.settlementDateTime ? moment(detail?.settlementDateTime, 'YYYYMMDDHHmmss').format('YYYY.MM.DD HH:mm:ss') : ""}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">{t('additionalService.payout.businessNumber')}</span>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { SmsPaymentDetailResendProps } from '../../../additional-service/model/s
|
||||
import { useExtensionSmsResendMutation } from '../../api/sms-payment/use-extension-sms-resend-mutation';
|
||||
import { snackBar } from '@/shared/lib';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
|
||||
export const SmsPaymentDetailResend = ({
|
||||
bottomSmsPaymentDetailResendOn,
|
||||
@@ -27,6 +28,11 @@ export const SmsPaymentDetailResend = ({
|
||||
return;
|
||||
}
|
||||
|
||||
if (!checkGrant(57)) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
|
||||
resendMessage({
|
||||
seq: seq,
|
||||
sendMessage: smsDetailData.sendMessage
|
||||
@@ -38,11 +44,11 @@ export const SmsPaymentDetailResend = ({
|
||||
snackBar(t('additionalService.sms.sendFailed', { message: rs.error?.message }))
|
||||
}
|
||||
}).catch((e: any) => {
|
||||
console.log(e)
|
||||
if (e.response?.data?.error?.message) {
|
||||
showAlert(e.response?.data?.error?.message);
|
||||
setBottomSmsPaymentDetailResendOn(false)
|
||||
return;
|
||||
console.log("SMS ALERT : " + e)
|
||||
if (e.response?.data?.error?.root !== "SystemErrorCode") {
|
||||
snackBar(`[${t('common.failed')}] ${e?.response?.data?.error?.message}`)
|
||||
} else {
|
||||
showAlert(`[${t('common.failed')}] ${e?.response?.data?.error?.message}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -151,6 +151,10 @@ export const AccountHolderAuthPage = () => {
|
||||
|
||||
|
||||
const onClickToOpenEmailBottomSheet = () => {
|
||||
if (!checkGrant(59, 'D')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
setEmailBottomSheetOn(true);
|
||||
};
|
||||
|
||||
|
||||
@@ -141,6 +141,10 @@ export const AccountHolderSearchPage = () => {
|
||||
};
|
||||
|
||||
const onClickToOpenEmailBottomSheet = () => {
|
||||
if (!checkGrant(60, 'D')) {
|
||||
showAlert(t('common.nopermission'));
|
||||
return;
|
||||
}
|
||||
setEmailBottomSheetOn(true);
|
||||
};
|
||||
|
||||
@@ -223,7 +227,7 @@ export const AccountHolderSearchPage = () => {
|
||||
>
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_setting.svg'}
|
||||
alt={t('filter.searchOptions')}
|
||||
alt={t('common.searchOptions')}
|
||||
onClick={() => onClickToOpenFilter()}
|
||||
/>
|
||||
</button>
|
||||
@@ -234,7 +238,7 @@ export const AccountHolderSearchPage = () => {
|
||||
>
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||
alt={t('filter.download')}
|
||||
alt={t('common.download')}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -119,6 +119,7 @@ export const PayoutRequestPage = () => {
|
||||
type="text"
|
||||
placeholder={t('additionalService.payout.dateSelectPlaceholder')}
|
||||
value={settlementDate ? moment(settlementDate).format('YYYY.MM.DD') : ''}
|
||||
onChange={() => {}}
|
||||
/>
|
||||
<button
|
||||
className="date-btn"
|
||||
|
||||
Reference in New Issue
Block a user