KeyIn 결제 Sort 컴포넌트 추가
This commit is contained in:
@@ -369,9 +369,9 @@ export interface KeyInPaymentFilterProps extends FilterProps {
|
|||||||
setMid: (mid: string) => void;
|
setMid: (mid: string) => void;
|
||||||
setStartDate: (startDate: string) => void;
|
setStartDate: (startDate: string) => void;
|
||||||
setEndDate: (endDate: string) => void;
|
setEndDate: (endDate: string) => void;
|
||||||
|
setTransactionStatus: (transactionStatus: KeyInPaymentTransactionStatus) => void;
|
||||||
setMinAmount: (minAmount: string | number) => void;
|
setMinAmount: (minAmount: string | number) => void;
|
||||||
setMaxAmount: (maxAmount: string | number) => void;
|
setMaxAmount: (maxAmount: string | number) => void;
|
||||||
setTransactionStatus: (transactionStatus: KeyInPaymentTransactionStatus) => void;
|
|
||||||
}
|
}
|
||||||
// 계좌성명 조회 필터
|
// 계좌성명 조회 필터
|
||||||
export interface AccountHolderSearchFilterProps extends FilterProps {
|
export interface AccountHolderSearchFilterProps extends FilterProps {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
import { HeaderType } from '@/entities/common/model/types';
|
||||||
@@ -9,15 +9,28 @@ import {
|
|||||||
useSetFooterMode
|
useSetFooterMode
|
||||||
} from '@/widgets/sub-layout/use-sub-layout';
|
} from '@/widgets/sub-layout/use-sub-layout';
|
||||||
import { PATHS } from '@/shared/constants/paths';
|
import { PATHS } from '@/shared/constants/paths';
|
||||||
|
import { useExtensionKeyinDownloadExcelMutation } from '@/entities/additional-service/api/use-extension-keyin-download-excel-mutation';
|
||||||
import { KeyInPaymentFilter } from '@/entities/additional-service/ui/key-in-payment/key-in-payment-filter';
|
import { KeyInPaymentFilter } from '@/entities/additional-service/ui/key-in-payment/key-in-payment-filter';
|
||||||
import { KeyInPaymentTransactionStatus,SortByKeys } from '@/entities/additional-service/model/types';
|
import { KeyInPaymentTransactionStatus, SortByKeys } from '@/entities/additional-service/model/types';
|
||||||
|
import { SortOptionsBox } from '@/entities/additional-service/ui/link-payment/sort-options-box';
|
||||||
|
import { useExtensionKeyinListMutation } from '@/entities/additional-service/api/use-extension-keyin-list-mutation';
|
||||||
|
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constants';
|
||||||
|
|
||||||
|
const requestStatusBtnGroup = [
|
||||||
|
{ name: '전체', value: KeyInPaymentTransactionStatus.ALL },
|
||||||
|
{ name: '승인', value: KeyInPaymentTransactionStatus.APPROVE },
|
||||||
|
{ name: '전취소', value: KeyInPaymentTransactionStatus.BF_CANCEL },
|
||||||
|
{ name: '후취소', value: KeyInPaymentTransactionStatus.AF_CANCEL }
|
||||||
|
];
|
||||||
|
|
||||||
export const KeyInPaymentPage = () => {
|
export const KeyInPaymentPage = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
|
|
||||||
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
|
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
|
||||||
|
const [listItems, setListItems] = useState({});
|
||||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||||
|
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||||
const [mid, setMid] = useState<string>('nictest001m');
|
const [mid, setMid] = useState<string>('nictest001m');
|
||||||
const [startDate, setStartDate] = useState(moment().format('YYYY-MM-DD'));
|
const [startDate, setStartDate] = useState(moment().format('YYYY-MM-DD'));
|
||||||
const [endDate, setEndDate] = useState(moment().format('YYYY-MM-DD'));
|
const [endDate, setEndDate] = useState(moment().format('YYYY-MM-DD'));
|
||||||
@@ -30,21 +43,50 @@ export const KeyInPaymentPage = () => {
|
|||||||
useSetHeaderType(HeaderType.LeftArrow);
|
useSetHeaderType(HeaderType.LeftArrow);
|
||||||
useSetFooterMode(false);
|
useSetFooterMode(false);
|
||||||
|
|
||||||
|
const { mutateAsync: keyinList } = useExtensionKeyinListMutation();
|
||||||
|
const { mutateAsync: downloadExcel } = useExtensionKeyinDownloadExcelMutation();
|
||||||
|
|
||||||
const onClickToOpenFilter = () => {
|
const onClickToOpenFilter = () => {
|
||||||
setFilterOn(!filterOn);
|
setFilterOn(!filterOn);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onClickToDownloadExcel = () => {
|
||||||
|
// downloadExcel({
|
||||||
|
// mid,
|
||||||
|
// fromDate: '',
|
||||||
|
// toDate: '',
|
||||||
|
// paymentStatus: '',
|
||||||
|
// minAmount: 0,
|
||||||
|
// maxAmount: 0
|
||||||
|
// }).then((rs) => {
|
||||||
|
|
||||||
|
// });
|
||||||
|
};
|
||||||
|
|
||||||
|
const onClickToSort = (sort: SortByKeys) => {
|
||||||
|
setSortBy(sort);
|
||||||
|
// TODO : callList 구현
|
||||||
|
};
|
||||||
|
|
||||||
|
const onClickToTransactionStatus = (val: KeyInPaymentTransactionStatus) => {
|
||||||
|
setTransactionStatus(val);
|
||||||
|
// TODO : callList 구현
|
||||||
|
};
|
||||||
|
|
||||||
const onClickToNavigation = () => {
|
const onClickToNavigation = () => {
|
||||||
navigate(PATHS.additionalService.keyInPayment.request)
|
navigate(PATHS.additionalService.keyInPayment.request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// TODO : callList();
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<main>
|
<main>
|
||||||
<div className="tab-content">
|
<div className="tab-content">
|
||||||
<div className="tab-pane sub active">
|
<div className="tab-pane sub active">
|
||||||
<section className="summary-section no-border">
|
<section className="summary-section">
|
||||||
<div className="credit-controls">
|
<div className="credit-controls">
|
||||||
<div>
|
<div>
|
||||||
<input
|
<input
|
||||||
@@ -71,26 +113,31 @@ export const KeyInPaymentPage = () => {
|
|||||||
<img
|
<img
|
||||||
src={IMAGE_ROOT + '/ico_download.svg'}
|
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||||
alt="다운로드"
|
alt="다운로드"
|
||||||
|
onClick={() => onClickToDownloadExcel()}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section className="filter-section">
|
<div className="filter-section">
|
||||||
<div className="sort-options">
|
<SortOptionsBox
|
||||||
<button className="sort-btn active">최신순</button>
|
sortBy={sortBy}
|
||||||
<span className="sort-divider">|</span>
|
onClickToSort={onClickToSort}
|
||||||
<button className="sort-btn">고액순</button>
|
></SortOptionsBox>
|
||||||
</div>
|
|
||||||
<div className="excrow">
|
<div className="excrow">
|
||||||
<div className="full-menu-keywords no-padding">
|
<div className="full-menu-keywords no-padding">
|
||||||
<span className="keyword-tag active">전체</span>
|
{
|
||||||
<span className="keyword-tag">승인</span>
|
requestStatusBtnGroup.map((value, index) => (
|
||||||
<span className="keyword-tag">전취소</span>
|
<span
|
||||||
<span className="keyword-tag">후취소</span>
|
key={`key-service-code=${index}`}
|
||||||
|
className={`keyword-tag ${(transactionStatus === value.value) ? 'active' : ''}`}
|
||||||
|
onClick={() => onClickToTransactionStatus(value.value)}
|
||||||
|
>{value.name}</span>
|
||||||
|
))
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</div>
|
||||||
|
|
||||||
<section className="transaction-list">
|
<section className="transaction-list">
|
||||||
<div className="date-group">
|
<div className="date-group">
|
||||||
|
|||||||
Reference in New Issue
Block a user