- 자금이체 : 이체신청,결과조회 리스트,상세정보 수정

- 부가서비스 엑셀 다운로드 이메일 바텀시트 추가
This commit is contained in:
HyeonJongKim
2025-10-23 13:47:16 +09:00
parent a60b5ba69e
commit fbc910caf9
15 changed files with 293 additions and 181 deletions

View File

@@ -13,6 +13,7 @@ import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
import { useExtensionLinkPayHistoryDownloadExcelMutation } from '../../api/link-payment/use-extension-link-pay-history-download-excel-mutation';
import { useStore } from '@/shared/model/store';
import { ExtensionLinkPayHistoryListParams, LinkPaymentHistoryListItem, LinkPaymentPaymentMethod, LinkPaymentPaymentStatus, LinkPaymentSearchCl, LinkPaymentSendMethod, LinkPaymentSendStatus } from '../../model/link-pay/types';
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
const paymentResultBtnGroup = [
{ name: '전체', value: LinkPaymentPaymentStatus.ALL },
@@ -41,8 +42,7 @@ export const LinkPaymentHistoryWrap = () => {
const [paymentStatus, setPaymentStatus] = useState<LinkPaymentPaymentStatus>(LinkPaymentPaymentStatus.ALL);
const [sendStatus, setSendStatus] = useState<LinkPaymentSendStatus>(LinkPaymentSendStatus.ALL);
const [sendMethod, setSendMethod] = useState<LinkPaymentSendMethod>(LinkPaymentSendMethod.ALL);
const [email, setEmail] = useState<string>('');
const [emailBottomSheetOn, setEmailBottomSheetOn] = useState<boolean>(false);
const { mutateAsync: linkPayHistoryList } = useExtensionLinkPayHistoryListMutation();
const { mutateAsync: downloadExcel } = useExtensionLinkPayHistoryDownloadExcelMutation();
@@ -77,21 +77,28 @@ export const LinkPaymentHistoryWrap = () => {
});
};
const onClickToDownloadExcel = () => {
downloadExcel({
mid: mid,
email: email,
searchCl: searchCl,
searchValue: searchValue,
paymentMethod: paymentMethod,
fromDate: fromDate,
toDate: toDate,
paymentStatus: paymentStatus,
sendStatus: sendStatus,
sendMethod: sendMethod,
}).then((rs) => {
console.log('Excel Dowload Status : ' + rs.status);
});
const onClickToOpenEmailBottomSheet = () => {
setEmailBottomSheetOn(true);
};
const onSendRequest = (selectedEmail?: string) => {
if (selectedEmail) {
downloadExcel({
mid: mid,
email: selectedEmail,
searchCl: searchCl,
searchValue: searchValue,
paymentMethod: paymentMethod,
fromDate: fromDate,
toDate: toDate,
paymentStatus: paymentStatus,
sendStatus: sendStatus,
sendMethod: sendMethod,
}).then((rs) => {
console.log('Excel Download Status: ' + rs.status);
});
}
setEmailBottomSheetOn(false);
};
const onClickPaymentStatus = (val: LinkPaymentPaymentStatus) => {
@@ -149,11 +156,11 @@ export const LinkPaymentHistoryWrap = () => {
<button
className="download-btn"
aria-label="다운로드"
onClick={() => onClickToOpenEmailBottomSheet()}
>
<img
src={IMAGE_ROOT + '/ico_download.svg'}
alt="다운로드"
onClick={() => onClickToDownloadExcel()}
/>
</button>
</div>
@@ -211,6 +218,13 @@ export const LinkPaymentHistoryWrap = () => {
setSendStatus={setSendStatus}
setSendMethod={setSendMethod}
></LinkPaymentHistoryFilter>
<EmailBottomSheet
bottomSheetOn={emailBottomSheetOn}
setBottomSheetOn={setEmailBottomSheetOn}
imageSave={false}
sendEmail={true}
sendRequest={onSendRequest}
></EmailBottomSheet>
</>
);
}