홈 화면 month api 수정

This commit is contained in:
focp212@naver.com
2025-10-20 17:54:41 +09:00
parent 948657db3f
commit 61c7e6c8f7
10 changed files with 385 additions and 119 deletions

View File

@@ -18,7 +18,7 @@ export const allTransactionCancelInfo = (params: AllTransactionCancelInfoParams)
);
};
export const useTransactioCancleInfonMutation = (options?: UseMutationOptions<AllTransactionCancelInfoResponse, CBDCAxiosError, AllTransactionCancelInfoParams>) => {
export const useAllTransactioCancleInfoMutation = (options?: UseMutationOptions<AllTransactionCancelInfoResponse, CBDCAxiosError, AllTransactionCancelInfoParams>) => {
const mutation = useMutation<AllTransactionCancelInfoResponse, CBDCAxiosError, AllTransactionCancelInfoParams>({
...options,
mutationFn: (params: AllTransactionCancelInfoParams) => allTransactionCancelInfo(params),

View File

@@ -488,16 +488,54 @@ export interface AllTransactionCancelResponse {
};
export interface AllTransactionCancelInfoParams {
serviceCode: string;
tid: string;
};
export interface AllTransactionCancelInfoResponse {
remainAmount: number;
partCancelCl: boolean;
isCompoundTax: boolean;
supplyAmount: number;
goodsVatAmount: number;
taxFreeAmount: number;
serviceAmount: number;
supplyAmount: number | null;
goodsVat: number | null;
taxFreeAmount: number | null;
serviceAmount: number | null;
debtPreventionCancelDisplayInfo: DebtPreventionCancelDisplayInfo | null;
debtPreventionCancelRequestInfo: DebtPreventionCancelRequestInfo | null;
};
export interface DebtPreventionCancelDisplayInfo {
isCancel: boolean;
serviceCode: string;
approvalDate: string;
approvalNo: string;
amount: number;
totalCancelAmount: number;
depositRequestAmount: number;
bankName: string;
accountNo: string;
accountName: string;
};
export interface DebtPreventionCancelRequestInfo {
tid: string;
mid: string;
gid: string;
aid: string;
corpNo: string;
corpName: string;
serviceCode: string;
serviceProductCode: string;
approvalDate: string;
approvalNo: string;
goodsAmount: number;
cancelRequestAmount: number;
depositRequestAmount: number;
bankName: string;
accountNo: string;
depositName: string;
hourCount: 0,
totalCancelCount: number;
autoTaxCalcCl: string;
approvalVatMark: string;
};
export interface FilterProps {
filterOn: boolean;

View File

@@ -1,59 +1,33 @@
import { IMAGE_ROOT } from '@/shared/constants/common';
import { AllTransactionCancelInfoResponse } from '../model/types';
import { AllTransactionCancelSectionPasswordGroup } from './section/all-transaction-cancel-section-password-group';
import { AllTransactionCancelSectionBankGroup } from './section/all-transaction-cancel-section-bank-group';
export const AllTransactionAllCancel = () => {
export interface AllTransactionAllCancelProps extends AllTransactionCancelInfoResponse {
serviceCode: string;
};
export const AllTransactionAllCancel = ({
serviceCode,
remainAmount,
partCancelCl,
isCompoundTax,
supplyAmount,
goodsVat,
taxFreeAmount,
serviceAmount,
debtPreventionCancelDisplayInfo,
debtPreventionCancelRequestInfo
}: AllTransactionAllCancelProps) => {
console.log(serviceCode)
return (
<>
<div className="form-section">
<div className="form-group">
<label className="form-label"> </label>
<div className="input-wrapper wid-100 error">
<input
className="wid-100 align-right"
type="password"
value="2736356352"
/>
</div>
</div>
<div className="error-msg"> </div>
<div className="form-group">
<label className="form-label"></label>
<div className="input-wrapper wid-100">
<select className="wid-100 align-right">
<option></option>
<option>KB국민은행</option>
<option>22323213123</option>
</select>
</div>
</div>
<div className="form-group">
<label className="form-label"></label>
<div className="input-wrapper wid-100">
<input
className="form-input wid-100"
type="text"
placeholder=""
/>
</div>
</div>
<div className="form-group">
<label className="form-label"></label>
<div className="input-wrapper wid-100">
<input
className="form-input wid-100"
type="text"
placeholder=""
/>
</div>
</div>
<div className="notice-text wid-100">
<p> .<br /> .</p>
</div>
</div>
<AllTransactionCancelSectionPasswordGroup></AllTransactionCancelSectionPasswordGroup>
{ serviceCode === '03' &&
<AllTransactionCancelSectionBankGroup></AllTransactionCancelSectionBankGroup>
}
</div>
</>
);
};

View File

@@ -0,0 +1,100 @@
import { IMAGE_ROOT } from '@/shared/constants/common';
import { motion } from 'framer-motion';
export interface AllTransactionCancelPreventBondProps {
preventBondOn: boolean;
setCancelPreventBondOn: (preventBondOn: boolean) => void;
};
export const AllTransactionCancelPreventBond = ({
preventBondOn,
setCancelPreventBondOn
}: AllTransactionCancelPreventBondProps) => {
const onClickToClose = () => {
setCancelPreventBondOn(false);
};
return (
<>
<motion.div>
<div className="full-menu-container">
<div className="full-menu-header">
<div className="full-menu-title center">( )</div>
<div className="full-menu-actions">
<button
id="closeFullMenu"
className="full-menu-close"
>
<img
src={ IMAGE_ROOT + '/ico_close.svg' }
alt="닫기"
onClick={ () => onClickToClose() }
/>
</button>
</div>
</div>
<div className="option-list pt-16">
<div className="txn-divider minus"></div>
<div className="summary-section pt-30">
<div className="summary-extend">
<div> </div>
<ul className="summary-amount-list">
<li className="summary-amount-item">
<span className="label"></span>
<span className="value"></span>
</li>
<li className="summary-amount-item">
<span className="label"></span>
<span className="value"></span>
</li>
<li className="summary-amount-item">
<span className="label"></span>
<span className="value"></span>
</li>
<li className="summary-amount-item">
<span className="label"> </span>
<span className="value"></span>
</li>
<li className="summary-amount-item">
<span className="label"></span>
<span className="value"></span>
</li>
</ul>
</div>
<div className="summary-extend">
<div> </div>
<ul className="summary-amount-list">
<li className="summary-amount-item">
<span className="label"></span>
<span className="value"></span>
</li>
<li className="summary-amount-item">
<span className="label"></span>
<span className="value"></span>
</li>
<li className="summary-amount-item">
<span className="label"></span>
<span className="value"></span>
</li>
<li className="summary-amount-item">
<span className="label"> </span>
<span className="value"></span>
</li>
</ul>
</div>
<div>
<div>[] .</div>
<div> .</div>
<div> .</div>
<div> 3 .</div>
<div> </div>
<div> - - - </div>
<div> </div>
<div>service@nicepay.co.kr .( 2 )</div>
</div>
</div>
</div>
</div>
</motion.div>
</>
);
};

View File

@@ -1,11 +1,30 @@
import { IMAGE_ROOT } from '@/shared/constants/common';
import { AllTransactionCancelInfoResponse } from '../model/types';
import { NumericFormat } from 'react-number-format';
import { AllTransactionCancelSectionPasswordGroup } from './section/all-transaction-cancel-section-password-group';
import { AllTransactionCancelSectionBankGroup } from './section/all-transaction-cancel-section-bank-group';
export interface AllTransactionPartCancelProps extends AllTransactionCancelInfoResponse {
serviceCode: string;
};
export const AllTransactionPartCancel = () => {
export const AllTransactionPartCancel = ({
serviceCode,
remainAmount,
partCancelCl,
isCompoundTax,
supplyAmount,
goodsVat,
taxFreeAmount,
serviceAmount,
debtPreventionCancelDisplayInfo,
debtPreventionCancelRequestInfo
}: AllTransactionPartCancelProps) => {
return (
<>
{ !!isCompoundTax &&
<div className="tb_both">
<table className="partial-cancel-table">
<colgroup>
@@ -23,7 +42,13 @@ export const AllTransactionPartCancel = () => {
<tbody>
<tr>
<td className="row-label"></td>
<td className="row-balance">555,550,000</td>
<td className="row-balance">
<NumericFormat
value={ supplyAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</td>
<td className="row-cancel">
<input
className="cancel-input"
@@ -34,7 +59,13 @@ export const AllTransactionPartCancel = () => {
</tr>
<tr>
<td className="row-label"></td>
<td className="row-balance">50,000</td>
<td className="row-balance">
<NumericFormat
value={ goodsVat }
thousandSeparator
displayType="text"
></NumericFormat>
</td>
<td className="row-cancel">
<input
className="cancel-input"
@@ -45,7 +76,13 @@ export const AllTransactionPartCancel = () => {
</tr>
<tr>
<td className="row-label"></td>
<td className="row-balance">50,000</td>
<td className="row-balance">
<NumericFormat
value={ taxFreeAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</td>
<td className="row-cancel">
<input
className="cancel-input"
@@ -56,7 +93,13 @@ export const AllTransactionPartCancel = () => {
</tr>
<tr>
<td className="row-label"></td>
<td className="row-balance">50,000</td>
<td className="row-balance">
<NumericFormat
value={ serviceAmount }
thousandSeparator
displayType="text"
></NumericFormat>
</td>
<td className="row-cancel">
<input
className="cancel-input"
@@ -68,56 +111,13 @@ export const AllTransactionPartCancel = () => {
</tbody>
</table>
</div>
}
<div className="form-section">
<div className="form-group">
<label className="form-label"> </label>
<div className="input-wrapper wid-100 error">
<input
className="wid-100 align-right"
type="password"
value=""
/>
</div>
</div>
<div className="error-msg"> </div>
<div className="form-group">
<label className="form-label"></label>
<div className="input-wrapper wid-100">
<select className="wid-100 align-right">
<option></option>
<option>KB국민은행</option>
<option>22323213123</option>
</select>
</div>
</div>
<div className="form-group">
<label className="form-label"></label>
<div className="input-wrapper wid-100">
<input
className="form-input wid-100"
type="text"
placeholder=""
/>
</div>
</div>
<div className="form-group">
<label className="form-label"></label>
<div className="input-wrapper wid-100">
<input
className="form-input wid-100"
type="text"
placeholder=""
/>
</div>
</div>
<div className="notice-text wid-100">
<p> .<br /> .</p>
</div>
<AllTransactionCancelSectionPasswordGroup></AllTransactionCancelSectionPasswordGroup>
{ serviceCode === '03' &&
<AllTransactionCancelSectionBankGroup></AllTransactionCancelSectionBankGroup>
}
</div>
</>
);

View File

@@ -0,0 +1,43 @@
export const AllTransactionCancelSectionBankGroup = () => {
return (
<>
<div className="form-group">
<label className="form-label"></label>
<div className="input-wrapper wid-100">
<select className="wid-100 align-right">
<option></option>
<option>KB국민은행</option>
<option>22323213123</option>
</select>
</div>
</div>
<div className="form-group">
<label className="form-label"></label>
<div className="input-wrapper wid-100">
<input
className="form-input wid-100"
type="text"
placeholder=""
/>
</div>
</div>
<div className="form-group">
<label className="form-label"></label>
<div className="input-wrapper wid-100">
<input
className="form-input wid-100"
type="text"
placeholder=""
/>
</div>
</div>
<div className="notice-text wid-100">
<p> .<br /> .</p>
</div>
</>
);
}

View File

@@ -0,0 +1,18 @@
export const AllTransactionCancelSectionPasswordGroup = () => {
return (
<>
<div className="form-group">
<label className="form-label"> </label>
<div className="input-wrapper wid-100 error">
<input
className="wid-100 align-right"
type="password"
value="2736356352"
/>
</div>
</div>
<div className="error-msg"> </div>
</>
);
}