- getListDateGroup 수정
- 알림톡 필터 추가 - 일부 부가서비스 엑셀다운로드 바텀시트 추가
This commit is contained in:
@@ -7,15 +7,15 @@ import {
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { useExtensionFundAccountTransferRequestMutation } from '@/entities/additional-service/api/fund-account/use-extension-fund-account-transfer-request-mutation';
|
||||
import { ExtensionFundAccountTransferRequestParams, ExtensionFundAccountTransferRequestResponse } from '@/entities/additional-service/model/fund-account/types';
|
||||
import { ChangeEvent, useState } from 'react';
|
||||
import { ExtensionFundAccountTransferRegistParams, ExtensionFundAccountTransferRegistResponse } from '@/entities/additional-service/model/fund-account/types';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { snackBar } from '@/shared/lib';
|
||||
import { useExtensionFundAccountTransferRegistMutation } from '@/entities/additional-service/api/fund-account/use-extension-fund-account-transfer-regist-mutation';
|
||||
|
||||
|
||||
export const FundAccountTransferRequestPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const FundAccountTransferRequestPage = () => {
|
||||
const [moid, setMoid] = useState<string>('');
|
||||
const [depositParameter, setDepositParameter] = useState<string>('');
|
||||
|
||||
const { mutateAsync: extensionFundAccountRequest } = useExtensionFundAccountTransferRequestMutation();
|
||||
const { mutateAsync: extensionFundAccountRegist } = useExtensionFundAccountTransferRegistMutation();
|
||||
|
||||
useSetHeaderTitle('자금이체 이체등록');
|
||||
useSetHeaderType(HeaderType.RightClose);
|
||||
@@ -36,8 +36,17 @@ export const FundAccountTransferRequestPage = () => {
|
||||
navigate(PATHS.additionalService.fundAccount.transferList);
|
||||
});
|
||||
|
||||
const callExtensionFundAccountTransferRequest = () => {
|
||||
let params: ExtensionFundAccountTransferRequestParams = {
|
||||
const resetForm = () => {
|
||||
setBankCode('');
|
||||
setAccountNo('');
|
||||
setAccountName('');
|
||||
setAmount(0);
|
||||
setMoid('');
|
||||
setDepositParameter('');
|
||||
};
|
||||
|
||||
const callExtensionFundAccountTransferRegist = () => {
|
||||
let params: ExtensionFundAccountTransferRegistParams = {
|
||||
mid: mid,
|
||||
bankCode: bankCode,
|
||||
accountNo: accountNo,
|
||||
@@ -46,8 +55,13 @@ export const FundAccountTransferRequestPage = () => {
|
||||
moid: moid,
|
||||
depositParameter: depositParameter
|
||||
};
|
||||
extensionFundAccountRequest(params).then((rs: ExtensionFundAccountTransferRequestResponse) => {
|
||||
navigate(PATHS.additionalService.payout.list);
|
||||
extensionFundAccountRegist(params).then((rs: ExtensionFundAccountTransferRegistResponse) => {
|
||||
if (rs.status) {
|
||||
snackBar("이체등록을 성공하였습니다.")
|
||||
resetForm();
|
||||
} else {
|
||||
snackBar("이체등록이 실패하였습니다.")
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -72,10 +86,7 @@ export const FundAccountTransferRequestPage = () => {
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">가맹점<span>*</span></div>
|
||||
<div className="billing-field">
|
||||
<select
|
||||
value={ mid }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value) }
|
||||
>
|
||||
<select value={mid} onChange={(e) => setMid(e.target.value)}>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
@@ -154,7 +165,7 @@ export const FundAccountTransferRequestPage = () => {
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={callExtensionFundAccountTransferRequest}
|
||||
onClick={callExtensionFundAccountTransferRegist}
|
||||
disabled={!isFormValid()}
|
||||
>등록</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user