링크결제
This commit is contained in:
@@ -7,7 +7,7 @@ import { PATHS } from "@/shared/constants/paths";
|
||||
import { LinkPaymentHistoryList } from "./link-payment-history-list";
|
||||
import { SortTypeBox } from '@/entities/common/ui/sort-type-box';
|
||||
import { DefaultRequestPagination, SortTypeKeys } from '@/entities/common/model/types';
|
||||
import { AdditionalServiceCategory, ProcessResult } from "../../model/types";
|
||||
import { AdditionalServiceCategory, DetailData, ProcessResult } from "../../model/types";
|
||||
import { useExtensionLinkPayHistoryListMutation } from '../../api/link-payment/use-extension-link-pay-history-list-mutation';
|
||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
import { useExtensionLinkPayHistoryDownloadExcelMutation } from '../../api/link-payment/use-extension-link-pay-history-download-excel-mutation';
|
||||
@@ -16,6 +16,7 @@ import { ExtensionLinkPayHistoryListParams, LinkPaymentHistoryListItem, LinkPaym
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
import useIntersectionObserver from '@/widgets/intersection-observer';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { LinkPaymentHistoryDetail } from './detail/link-payment-history-detail';
|
||||
|
||||
const getPaymentResultBtnGroup = (t: any) => [
|
||||
{ name: t('additionalService.linkPayment.all'), value: LinkPaymentPaymentStatus.ALL },
|
||||
@@ -47,6 +48,10 @@ export const LinkPaymentHistoryWrap = () => {
|
||||
const [sendStatus, setSendStatus] = useState<LinkPaymentSendStatus>(LinkPaymentSendStatus.ALL);
|
||||
const [sendMethod, setSendMethod] = useState<LinkPaymentSendMethod>(LinkPaymentSendMethod.ALL);
|
||||
const [emailBottomSheetOn, setEmailBottomSheetOn] = useState<boolean>(false);
|
||||
const [detailOn, setDetailOn] = useState<boolean>(false);
|
||||
const [detailMid, setDetailMid] = useState<string>('');
|
||||
const [detailRequestId, setDetailRequestId] = useState<string>('');
|
||||
const [detailSubReqId, setDetailSubReqId] = useState<string>('');
|
||||
|
||||
const { mutateAsync: linkPayHistoryList } = useExtensionLinkPayHistoryListMutation();
|
||||
const { mutateAsync: downloadExcel } = useExtensionLinkPayHistoryDownloadExcelMutation();
|
||||
@@ -163,6 +168,19 @@ export const LinkPaymentHistoryWrap = () => {
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
|
||||
const setDetailData = (detailData: DetailData) => {
|
||||
setDetailOn(detailData.detailOn);
|
||||
if(detailData.mid){
|
||||
setDetailMid(detailData.mid);
|
||||
}
|
||||
if(detailData.requestId){
|
||||
setDetailRequestId(detailData.requestId);
|
||||
}
|
||||
if(detailData.subReqId){
|
||||
setDetailSubReqId(detailData.subReqId);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
}, [
|
||||
@@ -232,9 +250,10 @@ export const LinkPaymentHistoryWrap = () => {
|
||||
</div>
|
||||
|
||||
<LinkPaymentHistoryList
|
||||
listItems={listItems}
|
||||
additionalServiceCategory={AdditionalServiceCategory.LinkPaymentHistory}
|
||||
mid={mid}
|
||||
listItems={ listItems }
|
||||
additionalServiceCategory={ AdditionalServiceCategory.LinkPaymentHistory }
|
||||
mid={ mid }
|
||||
setDetailData={ setDetailData }
|
||||
></LinkPaymentHistoryList>
|
||||
<div ref={ setTarget }></div>
|
||||
<div className="apply-row">
|
||||
@@ -263,6 +282,13 @@ export const LinkPaymentHistoryWrap = () => {
|
||||
setSendStatus={setSendStatus}
|
||||
setSendMethod={setSendMethod}
|
||||
></LinkPaymentHistoryFilter>
|
||||
<LinkPaymentHistoryDetail
|
||||
detailOn={ detailOn }
|
||||
setDetailOn={ setDetailOn }
|
||||
mid={ detailMid }
|
||||
requestId={ detailRequestId }
|
||||
subReqId={ detailSubReqId }
|
||||
></LinkPaymentHistoryDetail>
|
||||
<EmailBottomSheet
|
||||
bottomSheetOn={emailBottomSheetOn}
|
||||
setBottomSheetOn={setEmailBottomSheetOn}
|
||||
|
||||
Reference in New Issue
Block a user