- 자금이체 : 이체신청,결과조회 리스트,상세정보 수정
- 부가서비스 엑셀 다운로드 이메일 바텀시트 추가
This commit is contained in:
@@ -21,6 +21,7 @@ import { KeyInPaymentList } from '@/entities/additional-service/ui/key-in-paymen
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { KeyInPaymentListItem, KeyInPaymentPaymentStatus } from '@/entities/additional-service/model/key-in/types';
|
||||
import { keyInPaymentPaymentStatusBtnGroup } from '@/entities/additional-service/model/key-in/constant';
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
|
||||
export const KeyInPaymentPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -36,6 +37,7 @@ export const KeyInPaymentPage = () => {
|
||||
const [paymentStatus, setPaymentStatus] = useState<KeyInPaymentPaymentStatus>(KeyInPaymentPaymentStatus.ALL)
|
||||
const [minAmount, setMinAmount] = useState<number>();
|
||||
const [maxAmount, setMaxAmount] = useState<number>();
|
||||
const [emailBottomSheetOn, setEmailBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
useSetHeaderTitle('KEY-IN 결제');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
@@ -83,25 +85,33 @@ export const KeyInPaymentPage = () => {
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
|
||||
const onClickToDownloadExcel = () => {
|
||||
let newMinAmount = minAmount;
|
||||
if (!!minAmount && typeof (minAmount) === 'string') {
|
||||
newMinAmount = parseInt(minAmount);
|
||||
const onClickToOpenEmailBottomSheet = () => {
|
||||
setEmailBottomSheetOn(true);
|
||||
};
|
||||
|
||||
const onSendRequest = (selectedEmail?: string) => {
|
||||
if (selectedEmail) {
|
||||
let newMinAmount = minAmount;
|
||||
if (!!minAmount && typeof (minAmount) === 'string') {
|
||||
newMinAmount = parseInt(minAmount);
|
||||
}
|
||||
let newMaxAmount = maxAmount;
|
||||
if (!!maxAmount && typeof (maxAmount) === 'string') {
|
||||
newMaxAmount = parseInt(maxAmount);
|
||||
}
|
||||
downloadExcel({
|
||||
mid: mid,
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
paymentStatus: paymentStatus,
|
||||
minAmount: newMinAmount,
|
||||
maxAmount: newMaxAmount,
|
||||
//email: selectedEmail
|
||||
}).then((rs) => {
|
||||
console.log('Excel Download Status:', rs.status);
|
||||
});
|
||||
}
|
||||
let newMaxAmount = maxAmount;
|
||||
if (!!maxAmount && typeof (maxAmount) === 'string') {
|
||||
newMaxAmount = parseInt(maxAmount);
|
||||
}
|
||||
downloadExcel({
|
||||
mid: mid,
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
paymentStatus: paymentStatus,
|
||||
minAmount: newMinAmount,
|
||||
maxAmount: newMaxAmount
|
||||
}).then((rs) => {
|
||||
console.log('Excel Dowload Status : ' + rs.status);
|
||||
});
|
||||
setEmailBottomSheetOn(false);
|
||||
};
|
||||
|
||||
const onClickToSort = (sort: SortTypeKeys) => {
|
||||
@@ -161,7 +171,7 @@ export const KeyInPaymentPage = () => {
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||
alt="다운로드"
|
||||
onClick={() => onClickToDownloadExcel()}
|
||||
onClick={() => onClickToOpenEmailBottomSheet()}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
@@ -210,6 +220,13 @@ export const KeyInPaymentPage = () => {
|
||||
setMinAmount={setMinAmount}
|
||||
setMaxAmount={setMaxAmount}
|
||||
></KeyInPaymentFilter>
|
||||
<EmailBottomSheet
|
||||
bottomSheetOn={emailBottomSheetOn}
|
||||
setBottomSheetOn={setEmailBottomSheetOn}
|
||||
imageSave={false}
|
||||
sendEmail={true}
|
||||
sendRequest={onSendRequest}
|
||||
></EmailBottomSheet>
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user