catch
This commit is contained in:
@@ -771,6 +771,7 @@ export interface CashReceiptPurposeUpdateResponse {
|
|||||||
updateDateTime: string;
|
updateDateTime: string;
|
||||||
};
|
};
|
||||||
export interface CashReceiptManualIssueParams {
|
export interface CashReceiptManualIssueParams {
|
||||||
|
mid: string;
|
||||||
businessNumber: string,
|
businessNumber: string,
|
||||||
purpose: CashReceiptPurposeType
|
purpose: CashReceiptPurposeType
|
||||||
productName: string,
|
productName: string,
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
import { useEffect, useState } from 'react';
|
|
||||||
import { PATHS } from '@/shared/constants/paths';
|
|
||||||
import { useLocation } from 'react-router';
|
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import {
|
|
||||||
useSetHeaderTitle,
|
|
||||||
useSetHeaderType,
|
|
||||||
useSetFooterMode,
|
|
||||||
useSetOnBack
|
|
||||||
} from '@/widgets/sub-layout/use-sub-layout';
|
|
||||||
|
|
||||||
export const FaqDetailPage = () => {
|
|
||||||
const { navigate } = useNavigate();
|
|
||||||
const location = useLocation();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const [cursorId, setCursorId] = useState<number>(0);
|
|
||||||
const [seq, setSeq] = useState<string>('');
|
|
||||||
const [category, setCategory] = useState<string>('');
|
|
||||||
const [title, setTitle] = useState<string>('');
|
|
||||||
const [contents, setContents] = useState<string>('');
|
|
||||||
|
|
||||||
useSetHeaderTitle(t('support.faq.title'));
|
|
||||||
useSetHeaderType(HeaderType.LeftArrow);
|
|
||||||
useSetFooterMode(false);
|
|
||||||
useSetOnBack(() => {
|
|
||||||
navigate(PATHS.support.faq.list);
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setCursorId(location?.state.cursorId);
|
|
||||||
setSeq(location?.state.seq);
|
|
||||||
setCategory(location?.state.category);
|
|
||||||
setTitle(location?.state.title);
|
|
||||||
setContents(location?.state.contents);
|
|
||||||
}, []);
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<main>
|
|
||||||
{ contents &&
|
|
||||||
<div className="tab-content">
|
|
||||||
<div className="tab-pane sub active">
|
|
||||||
<div className="faq-detail">
|
|
||||||
<div className="faq-detail__title">{ title }</div>
|
|
||||||
<div className="faq-detail__divider"></div>
|
|
||||||
<div className="faq-detail__body" dangerouslySetInnerHTML={{ __html: contents || '' }}></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</main>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -15,6 +15,7 @@ import {
|
|||||||
} from '@/widgets/sub-layout/use-sub-layout';
|
} from '@/widgets/sub-layout/use-sub-layout';
|
||||||
import useIntersectionObserver from '@/widgets/intersection-observer';
|
import useIntersectionObserver from '@/widgets/intersection-observer';
|
||||||
import { FaqDetail } from '@/entities/support/ui/detail/faq-detail';
|
import { FaqDetail } from '@/entities/support/ui/detail/faq-detail';
|
||||||
|
import { showAlert } from '@/widgets/show-alert';
|
||||||
|
|
||||||
export const FaqListPage = () => {
|
export const FaqListPage = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
@@ -95,6 +96,11 @@ export const FaqListPage = () => {
|
|||||||
&& rs.nextCursor !== pageParam.cursor
|
&& rs.nextCursor !== pageParam.cursor
|
||||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||||
);
|
);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
import { useEffect, useState } from 'react';
|
|
||||||
import { useLocation } from 'react-router';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { PATHS } from '@/shared/constants/paths';
|
|
||||||
import { useNoticeDetailMutation } from '@/entities/support/api/use-notice-detail-mutation';
|
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
|
||||||
import { NoticeDetailParams, NoticeDetailResponse, NoticeItem } from '@/entities/support/model/types';
|
|
||||||
import {
|
|
||||||
useSetHeaderTitle,
|
|
||||||
useSetHeaderType,
|
|
||||||
useSetFooterMode,
|
|
||||||
useSetOnBack
|
|
||||||
} from '@/widgets/sub-layout/use-sub-layout';
|
|
||||||
import moment from 'moment';
|
|
||||||
|
|
||||||
export const NoticeDetailPage = () => {
|
|
||||||
const { navigate } = useNavigate();
|
|
||||||
const location = useLocation();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const [result, setResult] = useState<NoticeItem>({});
|
|
||||||
|
|
||||||
let from = location?.state.from;
|
|
||||||
|
|
||||||
useSetHeaderTitle(t('support.notice.title'));
|
|
||||||
useSetHeaderType(HeaderType.RightClose);
|
|
||||||
useSetFooterMode(false);
|
|
||||||
useSetOnBack(() => {
|
|
||||||
if(from){
|
|
||||||
navigate(from);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
navigate(PATHS.support.notice.list);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const { mutateAsync: noticeDetail } = useNoticeDetailMutation();
|
|
||||||
|
|
||||||
const callDetail = () => {
|
|
||||||
let detailParams: NoticeDetailParams = {
|
|
||||||
seq: location?.state.seq,
|
|
||||||
};
|
|
||||||
noticeDetail(detailParams).then((rs: NoticeDetailResponse) => {
|
|
||||||
setResult(rs);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
callDetail();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<main>
|
|
||||||
{ result.informCl &&
|
|
||||||
<div className="tab-content">
|
|
||||||
<div className="tab-pane sub active">
|
|
||||||
<div className="option-list">
|
|
||||||
<div className="notice-detail">
|
|
||||||
<div className="notice-detail__title">{ result.title }</div>
|
|
||||||
<div className="notice-detail__meta">{ moment(result.regDt).format('YYYY.MM.DD') } | { t(`support.notice.categories.${result.informCl}`) }</div>
|
|
||||||
<div className="notice-detail__divider"></div>
|
|
||||||
<div className="notice-detail__body" dangerouslySetInnerHTML={{ __html: result.contents || '' }}></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</main>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -16,6 +16,7 @@ import {
|
|||||||
import useIntersectionObserver from '@/widgets/intersection-observer';
|
import useIntersectionObserver from '@/widgets/intersection-observer';
|
||||||
import { NoticeDetail } from '@/entities/support/ui/detail/notice-detail';
|
import { NoticeDetail } from '@/entities/support/ui/detail/notice-detail';
|
||||||
import { useParams } from 'react-router';
|
import { useParams } from 'react-router';
|
||||||
|
import { showAlert } from '@/widgets/show-alert';
|
||||||
|
|
||||||
export const NoticeListPage = () => {
|
export const NoticeListPage = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
@@ -97,8 +98,13 @@ export const NoticeListPage = () => {
|
|||||||
&& rs.nextCursor !== pageParam.cursor
|
&& rs.nextCursor !== pageParam.cursor
|
||||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||||
);
|
);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickToAction = () => {
|
const onClickToAction = () => {
|
||||||
// Remove focus from active element
|
// Remove focus from active element
|
||||||
|
|||||||
@@ -1,96 +0,0 @@
|
|||||||
import moment from 'moment';
|
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
import { PATHS } from '@/shared/constants/paths';
|
|
||||||
import { useLocation } from 'react-router';
|
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
|
||||||
import {
|
|
||||||
useSetHeaderTitle,
|
|
||||||
useSetHeaderType,
|
|
||||||
useSetFooterMode,
|
|
||||||
useSetOnBack
|
|
||||||
} from '@/widgets/sub-layout/use-sub-layout';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
export const QnaDetailPage = () => {
|
|
||||||
const { navigate } = useNavigate();
|
|
||||||
const { t } = useTranslation();
|
|
||||||
const location = useLocation();
|
|
||||||
|
|
||||||
const [answer, setAnswer] = useState<string>('');
|
|
||||||
const [answerDate, setAnswerDate] = useState<string>('');
|
|
||||||
const [contents, setContents] = useState<string>('');
|
|
||||||
const [corpName, setCorpName] = useState<string | null>('');
|
|
||||||
const [cursorId, setCursorId] = useState<number>(0);
|
|
||||||
const [requestDate, setRequestDate] = useState<string>('');
|
|
||||||
const [requestName, setRequestName] = useState<string>('');
|
|
||||||
const [requestType, setRequestType] = useState<string>('');
|
|
||||||
const [sendEmail, setSendEmail] = useState<string>('');
|
|
||||||
const [seq, setSeq] = useState<string>('');
|
|
||||||
const [statusCode, setStatusCode] = useState<string>('');
|
|
||||||
const [title, setTitle] = useState<string>('');
|
|
||||||
|
|
||||||
useSetHeaderTitle(t('support.qna.title'));
|
|
||||||
useSetHeaderType(HeaderType.LeftArrow);
|
|
||||||
useSetFooterMode(false);
|
|
||||||
useSetOnBack(() => {
|
|
||||||
navigate(PATHS.support.qna.list);
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setAnswer(location?.state.answer);
|
|
||||||
setAnswerDate(location?.state.answerDate);
|
|
||||||
setContents(location?.state.contents);
|
|
||||||
setCorpName(location?.state.corpName);
|
|
||||||
setCursorId(location?.state.cursorId);
|
|
||||||
setRequestDate(location?.state.requestDate);
|
|
||||||
setRequestName(location?.state.requestName);
|
|
||||||
setRequestType(location?.state.requestType);
|
|
||||||
setSendEmail(location?.state.sendEmail);
|
|
||||||
setSeq(location?.state.seq);
|
|
||||||
setStatusCode(location?.state.statusCode);
|
|
||||||
setTitle(location?.state.title);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<main>
|
|
||||||
{ statusCode &&
|
|
||||||
<div className="tab-content">
|
|
||||||
<div className="tab-pane active">
|
|
||||||
<div className="inq-detail">
|
|
||||||
<div className="inq-detail__head">
|
|
||||||
<div className="inq-detail__row">
|
|
||||||
<span className="inq-badge">{t('support.qna.detailLabels.title')}</span>
|
|
||||||
<span className="inq-head-text bold">{ title }</span>
|
|
||||||
</div>
|
|
||||||
<div className="inq-detail__row">
|
|
||||||
<span className="inq-badge">{t('support.qna.detailLabels.type')}</span>
|
|
||||||
<span className="inq-head-text">{ t(`support.qna.categories.${requestType}`) }</span>
|
|
||||||
</div>
|
|
||||||
<div className="inq-detail__row">
|
|
||||||
<span className="inq-badge">{t('support.qna.detailLabels.registrationDate')}</span>
|
|
||||||
<span className="inq-head-text">{ !!requestDate? moment(requestDate).format('YYYY.MM.DD'): '' }</span>
|
|
||||||
</div>
|
|
||||||
<div className="inq-detail__row">
|
|
||||||
<span className="inq-badge">{t('support.qna.detailLabels.answerDate')}</span>
|
|
||||||
<span className="inq-head-text">{ !!answerDate? moment(answerDate).format('YYYY.MM.DD'): '' }</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="inq-detail__divider"></div>
|
|
||||||
<div className="inq-detail__section">
|
|
||||||
<div className="inq-detail__section-title">{t('support.qna.detailLabels.inquiryAnswer')}</div>
|
|
||||||
<div className="inq-detail__body" dangerouslySetInnerHTML={{ __html: answer || '' }}></div>
|
|
||||||
</div>
|
|
||||||
<div className="inq-detail__section">
|
|
||||||
<div className="inq-detail__section-title">{t('support.qna.detailLabels.inquiryContents')}</div>
|
|
||||||
<div className="inq-detail__body" dangerouslySetInnerHTML={{ __html: contents || '' }}></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</main>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -109,6 +109,11 @@ export const QnaListPage = () => {
|
|||||||
&& rs.nextCursor !== pageParam.cursor
|
&& rs.nextCursor !== pageParam.cursor
|
||||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||||
);
|
);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -139,6 +139,11 @@ export const QnaRegisterPage = () => {
|
|||||||
qnaSave(params).then((rs: QnaSaveResponse) => {
|
qnaSave(params).then((rs: QnaSaveResponse) => {
|
||||||
alert(t('support.qna.successMessage'));
|
alert(t('support.qna.successMessage'));
|
||||||
navigate(PATHS.support.qna.list);
|
navigate(PATHS.support.qna.list);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import { useStore } from '@/shared/model/store';
|
|||||||
import { AllTransactionCancelPreventBond } from '@/entities/transaction/ui/all-transaction-cancel-prevent-bond';
|
import { AllTransactionCancelPreventBond } from '@/entities/transaction/ui/all-transaction-cancel-prevent-bond';
|
||||||
import { snackBar } from '@/shared/lib';
|
import { snackBar } from '@/shared/lib';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { showAlert } from '@/widgets/show-alert';
|
||||||
|
|
||||||
export const AllTransactionCancelPage = () => {
|
export const AllTransactionCancelPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -111,6 +112,11 @@ export const AllTransactionCancelPage = () => {
|
|||||||
// debtPreventionCancelDisplayInfo.isCancel == false => 얼럿만 띄우고 취소요청하면안됨
|
// debtPreventionCancelDisplayInfo.isCancel == false => 얼럿만 띄우고 취소요청하면안됨
|
||||||
|
|
||||||
|
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -140,6 +146,10 @@ export const AllTransactionCancelPage = () => {
|
|||||||
setRequestSuccess(true);
|
setRequestSuccess(true);
|
||||||
}).catch((e: any) => {
|
}).catch((e: any) => {
|
||||||
setRequestSuccess(false);
|
setRequestSuccess(false);
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -165,10 +165,21 @@ export const AllTransactionListPage = () => {
|
|||||||
&& rs.nextCursor !== pageParam.cursor
|
&& rs.nextCursor !== pageParam.cursor
|
||||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||||
);
|
);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
allTransactionListSummary(listSummaryParams).then((rs: AllTransactionListSummaryResponse) => {
|
allTransactionListSummary(listSummaryParams).then((rs: AllTransactionListSummaryResponse) => {
|
||||||
setTotalAmount(rs.totalAmount);
|
setTotalAmount(rs.totalAmount);
|
||||||
setTotalCount(rs.totalCount);
|
setTotalCount(rs.totalCount);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import { showAlert } from '@/widgets/show-alert';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import NiceCalendar from '@/shared/ui/calendar/nice-calendar';
|
import NiceCalendar from '@/shared/ui/calendar/nice-calendar';
|
||||||
import { notiBar, snackBar } from '@/shared/lib';
|
import { notiBar, snackBar } from '@/shared/lib';
|
||||||
|
import { BillingChargeParams, BillingChargeResponse } from '@/entities/transaction/model/types';
|
||||||
|
|
||||||
export const BillingChargePage = () => {
|
export const BillingChargePage = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
@@ -70,7 +71,7 @@ export const BillingChargePage = () => {
|
|||||||
showAlert('구매자명은 필수 입력 항목입니다.');
|
showAlert('구매자명은 필수 입력 항목입니다.');
|
||||||
}
|
}
|
||||||
|
|
||||||
let params = {
|
let params: BillingChargeParams = {
|
||||||
billKey: billKey,
|
billKey: billKey,
|
||||||
productName: productName,
|
productName: productName,
|
||||||
productAmount: productAmount,
|
productAmount: productAmount,
|
||||||
@@ -79,13 +80,12 @@ export const BillingChargePage = () => {
|
|||||||
paymentRequestDate: moment(paymentRequestDate).format('YYYYMMDD'),
|
paymentRequestDate: moment(paymentRequestDate).format('YYYYMMDD'),
|
||||||
installmentMonth: installmentMonth
|
installmentMonth: installmentMonth
|
||||||
};
|
};
|
||||||
billingCharge(params).then((rs) => {
|
billingCharge(params).then((rs: BillingChargeResponse) => {
|
||||||
snackBar('결제 신청을 성공하였습니다.', function(){
|
snackBar('결제 신청을 성공하였습니다.', function(){
|
||||||
navigate(PATHS.transaction.billing.list);
|
navigate(PATHS.transaction.billing.list);
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
|
||||||
}).catch((e: any) => {
|
}).catch((e: any) => {
|
||||||
console.log(e)
|
|
||||||
if(e.response?.data?.error?.message){
|
if(e.response?.data?.error?.message){
|
||||||
showAlert(e.response?.data?.error?.message);
|
showAlert(e.response?.data?.error?.message);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ export const BillingListPage = () => {
|
|||||||
&& rs.nextCursor !== pageParam.cursor
|
&& rs.nextCursor !== pageParam.cursor
|
||||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||||
);
|
);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { PATHS } from '@/shared/constants/paths';
|
|||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||||
import { CashReceiptHandWrittenIssuanceStep1 } from '@/entities/transaction/ui/cash-receipt-hand-written-issuance-step1';
|
import { CashReceiptHandWrittenIssuanceStep1 } from '@/entities/transaction/ui/cash-receipt-hand-written-issuance-step1';
|
||||||
import { CashReceiptHandWrittenIssuanceStep2 } from '@/entities/transaction/ui/cash-receipt-hand-written-issuance-step2';
|
import { CashReceiptHandWrittenIssuanceStep2 } from '@/entities/transaction/ui/cash-receipt-hand-written-issuance-step2';
|
||||||
import { CashReceiptPurposeType, ProcessStep } from '@/entities/transaction/model/types';
|
import { CashReceiptManualIssueParams, CashReceiptManualIssueResponse, CashReceiptPurposeType, ProcessStep } from '@/entities/transaction/model/types';
|
||||||
import { HeaderType} from '@/entities/common/model/types';
|
import { HeaderType} from '@/entities/common/model/types';
|
||||||
import { useSetFooterMode, useSetHeaderTitle, useSetHeaderType } from '@/widgets/sub-layout/use-sub-layout';
|
import { useSetFooterMode, useSetHeaderTitle, useSetHeaderType } from '@/widgets/sub-layout/use-sub-layout';
|
||||||
import { useCashReceiptManualIssueMutation } from '@/entities/transaction/api/use-cash-receipt-manual-issue-mutation';
|
import { useCashReceiptManualIssueMutation } from '@/entities/transaction/api/use-cash-receipt-manual-issue-mutation';
|
||||||
@@ -49,7 +49,7 @@ export const CashReceitHandWrittenIssuancePage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const callManualIssue = () => {
|
const callManualIssue = () => {
|
||||||
let params = {
|
let params: CashReceiptManualIssueParams = {
|
||||||
mid: userMid,
|
mid: userMid,
|
||||||
businessNumber: businessNumber,
|
businessNumber: businessNumber,
|
||||||
purpose: purposeType,
|
purpose: purposeType,
|
||||||
@@ -63,11 +63,15 @@ export const CashReceitHandWrittenIssuancePage = () => {
|
|||||||
taxFreeAmount: taxFreeAmount,
|
taxFreeAmount: taxFreeAmount,
|
||||||
serviceCharge: serviceCharge
|
serviceCharge: serviceCharge
|
||||||
};
|
};
|
||||||
cashReceiptManualIssue(params).then((rs) => {
|
cashReceiptManualIssue(params).then((rs: CashReceiptManualIssueResponse) => {
|
||||||
console.log(rs);
|
|
||||||
snackBar('수기 신청이 완료되었습니다.', function(){
|
snackBar('수기 신청이 완료되었습니다.', function(){
|
||||||
navigate(PATHS.transaction.cashReceipt.list);
|
navigate(PATHS.transaction.cashReceipt.list);
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -151,13 +151,24 @@ export const CashReceiptListPage = () => {
|
|||||||
&& rs.nextCursor !== pageParam.cursor
|
&& rs.nextCursor !== pageParam.cursor
|
||||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||||
);
|
);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cashReceiptSummary(listSummaryParams).then((rs: CashReceiptSummaryResponse) => {
|
cashReceiptSummary(listSummaryParams).then((rs: CashReceiptSummaryResponse) => {
|
||||||
setApprovalCount(rs.approvalCount);
|
setApprovalCount(rs.approvalCount);
|
||||||
setApprovalAmount(rs.approvalAmount);
|
setApprovalAmount(rs.approvalAmount);
|
||||||
setCancelCount(rs.cancelCount);
|
setCancelCount(rs.cancelCount);
|
||||||
setCancelAmount(rs.cancelAmount);
|
setCancelAmount(rs.cancelAmount);
|
||||||
setTotalCount(rs.totalCount);
|
setTotalCount(rs.totalCount);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ export const EscrowListPage = () => {
|
|||||||
&& rs.nextCursor !== pageParam.cursor
|
&& rs.nextCursor !== pageParam.cursor
|
||||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||||
);
|
);
|
||||||
|
}).catch((e: any) => {
|
||||||
|
if(e.response?.data?.error?.message){
|
||||||
|
showAlert(e.response?.data?.error?.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user