- 자금이체 페이지 List 초기화 문제 및 Cursor 유지 오류 수정
- KeyIn결제 page 수정
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
FundAccountReceiveAccountNameNo,
|
FundAccountReceiveAccountNameNo,
|
||||||
FundAccountResultStatus,
|
FundAccountResultStatus,
|
||||||
|
FundAccountSearchCl,
|
||||||
FundAccountSearchDateType,
|
FundAccountSearchDateType,
|
||||||
FundAccountStatus
|
FundAccountStatus
|
||||||
} from './types';
|
} from './types';
|
||||||
@@ -39,9 +40,9 @@ export const FundAccountResultSearchDateTypeBtnGroup = [
|
|||||||
{ name: '이체일자', value: FundAccountSearchDateType.APPLICATION_DATE }
|
{ name: '이체일자', value: FundAccountSearchDateType.APPLICATION_DATE }
|
||||||
];
|
];
|
||||||
|
|
||||||
export const FundAccountReceiveAccountNameNoOptionsGroup = [
|
export const FundAccountSearchClOptionsGroup = [
|
||||||
{ name: '수취인', value: FundAccountReceiveAccountNameNo.ReceiveAccountName },
|
{ name: '수취인', value: FundAccountSearchCl.ACCOUNT_NAME },
|
||||||
{ name: '계좌번호', value: FundAccountReceiveAccountNameNo.ReceiveAccountNo },
|
{ name: '계좌번호', value: FundAccountSearchCl.ACCOUNT_NO },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const FundAccountReceiveBankCodeOptionsGroup = [
|
export const FundAccountReceiveBankCodeOptionsGroup = [
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ export enum FundAccountSearchDateType {
|
|||||||
APPLICATION_DATE = 'APPLICATION_DATE'
|
APPLICATION_DATE = 'APPLICATION_DATE'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export interface FundAccountTabProps {
|
export interface FundAccountTabProps {
|
||||||
activeTab: FundAccountTabKeys;
|
activeTab: FundAccountTabKeys;
|
||||||
};
|
};
|
||||||
|
|||||||
9
src/entities/additional-service/model/key-in/constant.ts
Normal file
9
src/entities/additional-service/model/key-in/constant.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { KeyInPaymentPaymentStatus } from "./types";
|
||||||
|
|
||||||
|
// contant로 옮기기
|
||||||
|
export const requestStatusBtnGroup = [
|
||||||
|
{ name: '전체', value: KeyInPaymentPaymentStatus.ALL },
|
||||||
|
{ name: '승인', value: KeyInPaymentPaymentStatus.APPROVAL },
|
||||||
|
{ name: '전취소', value: KeyInPaymentPaymentStatus.PRE_CANCEL },
|
||||||
|
{ name: '후취소', value: KeyInPaymentPaymentStatus.POST_CANCEL }
|
||||||
|
];
|
||||||
@@ -4,7 +4,7 @@ import { AdditionalServiceCategory, ExtensionRequestParams, FilterProps, ListIte
|
|||||||
// ========================================
|
// ========================================
|
||||||
// 키인결제 관련 타입들
|
// 키인결제 관련 타입들
|
||||||
// ========================================
|
// ========================================
|
||||||
export enum KeyInPaymentTransactionStatus {
|
export enum KeyInPaymentPaymentStatus {
|
||||||
ALL = 'ALL',
|
ALL = 'ALL',
|
||||||
APPROVAL = 'APPROVAL',
|
APPROVAL = 'APPROVAL',
|
||||||
PRE_CANCEL = 'PRE_CANCEL',
|
PRE_CANCEL = 'PRE_CANCEL',
|
||||||
@@ -20,21 +20,22 @@ export interface KeyInPaymentListItem {
|
|||||||
|
|
||||||
export interface KeyInPaymentListProps {
|
export interface KeyInPaymentListProps {
|
||||||
additionalServiceCategory: AdditionalServiceCategory;
|
additionalServiceCategory: AdditionalServiceCategory;
|
||||||
listItems: Record<string, Array<ListItemProps>>;
|
listItems: Array<KeyInPaymentListItem>;
|
||||||
mid?: string;
|
mid?: string;
|
||||||
|
setTarget: (element: HTMLElement | null) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface KeyInPaymentFilterProps extends FilterProps {
|
export interface KeyInPaymentFilterProps extends FilterProps {
|
||||||
mid: string,
|
mid: string,
|
||||||
startDate: string;
|
startDate: string;
|
||||||
endDate: string;
|
endDate: string;
|
||||||
transactionStatus: KeyInPaymentTransactionStatus;
|
transactionStatus: KeyInPaymentPaymentStatus;
|
||||||
minAmount?: number;
|
minAmount?: number;
|
||||||
maxAmount?: number;
|
maxAmount?: number;
|
||||||
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;
|
setTransactionStatus: (transactionStatus: KeyInPaymentPaymentStatus) => void;
|
||||||
setMinAmount: (minAmount?: number) => void;
|
setMinAmount: (minAmount?: number) => void;
|
||||||
setMaxAmount: (maxAmount?: number) => void;
|
setMaxAmount: (maxAmount?: number) => void;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,12 +14,25 @@ export interface LinkPaymentTabProps {
|
|||||||
activeTab: LinkPaymentTabKeys;
|
activeTab: LinkPaymentTabKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum LinkPaymentSearchType {
|
export enum LinkPaymentSearchCl {
|
||||||
ALL = "ALL",
|
ALL = "",
|
||||||
PHONE = "PHONE",
|
PHONE = "PHONE_NUMBER",
|
||||||
EMAIL = "EMAIL"
|
EMAIL = "EMAIL"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum LinkPaymentPaymentMethod {
|
||||||
|
ALL = "ALL",
|
||||||
|
CARD = "CARD",
|
||||||
|
BANK = "BANK",
|
||||||
|
VIRTURE_BANK = "VIRTURE_BANK",
|
||||||
|
PHONE = "PHONE",
|
||||||
|
CULTURELAND = "CULTURELAND",
|
||||||
|
SSG_MONEY = "SSG_MONEY",
|
||||||
|
SSG_BANK = "SSG_BANK",
|
||||||
|
CMS_BANK = "CMS_BANK",
|
||||||
|
TMONEY_PAY = "TMONEY_PAY"
|
||||||
|
}
|
||||||
|
|
||||||
export enum LinkPaymentSendMethod {
|
export enum LinkPaymentSendMethod {
|
||||||
ALL = "ALL",
|
ALL = "ALL",
|
||||||
SMS = "SMS",
|
SMS = "SMS",
|
||||||
@@ -27,19 +40,19 @@ export enum LinkPaymentSendMethod {
|
|||||||
KAKAO = "KAKAO"
|
KAKAO = "KAKAO"
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum LinkPaymentTransactionStatus {
|
export enum LinkPaymentPaymentStatus {
|
||||||
ALL = "ALL",
|
ALL = "ALL",
|
||||||
ACTIVATE = "ACTIVATE",
|
ACTIVATE = "ACTIVATE",
|
||||||
DEPOSIT_REQUEST = "DEPOSIT_REQUEST",
|
DEPOSIT_REQUEST = "DEPOSIT_REQUEST",
|
||||||
TRANSACTION_COMPLETE = "TRANSACTION_COMPLETE",
|
PAYMENT_COMPLETE = "PAYMENT_COMPLETE",
|
||||||
TRANSACTION_FAIL = "TRANSACTION_FAIL",
|
PAYMENT_FAIL = "PAYMENT_FAIL",
|
||||||
INACTIVE = "INACTIVE"
|
INACTIVE = "INACTIVE"
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum LinkPaymentSendingStatus {
|
export enum LinkPaymentSendStatus {
|
||||||
ALL = "ALL",
|
ALL = "ALL",
|
||||||
SEND_REQUEST = "SEND_REQUEST",
|
SUCCESS = "SUCCESS",
|
||||||
SEND_CANCEL = "SEND_CANCEL"
|
FAIL = "FAIL"
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum LinkContentType {
|
export enum LinkContentType {
|
||||||
@@ -79,39 +92,39 @@ export interface LinkPaymentWaitListProps {
|
|||||||
|
|
||||||
export interface LinkPaymentHistoryFilterProps extends FilterProps {
|
export interface LinkPaymentHistoryFilterProps extends FilterProps {
|
||||||
mid: string;
|
mid: string;
|
||||||
searchType: LinkPaymentSearchType;
|
searchCl: LinkPaymentSearchCl;
|
||||||
searchKeyword: string;
|
searchValue: string;
|
||||||
startDate: string;
|
fromDate: string;
|
||||||
endDate: string;
|
toDate: string;
|
||||||
transactionStatus: LinkPaymentTransactionStatus;
|
paymentStatus: LinkPaymentPaymentStatus;
|
||||||
processResult: ProcessResult;
|
processResult: ProcessResult;
|
||||||
sendMethod: LinkPaymentSendMethod;
|
sendMethod: LinkPaymentSendMethod;
|
||||||
setMid: (mid: string) => void;
|
setMid: (mid: string) => void;
|
||||||
setSearchType: (searchType: LinkPaymentSearchType) => void;
|
setSearchType: (searchType: LinkPaymentSearchCl) => void;
|
||||||
setSearchKeyword: (searchKeyWorld: string) => void;
|
setSearchKeyword: (searchKeyWorld: string) => void;
|
||||||
setStartDate: (startDate: string) => void;
|
setStartDate: (startDate: string) => void;
|
||||||
setEndDate: (endDate: string) => void;
|
setEndDate: (endDate: string) => void;
|
||||||
setTransactionStatus: (transactionStatus: LinkPaymentTransactionStatus) => void;
|
setTransactionStatus: (transactionStatus: LinkPaymentPaymentStatus) => void;
|
||||||
setProcessResult: (processResult: ProcessResult) => void;
|
setProcessResult: (processResult: ProcessResult) => void;
|
||||||
setSendMethod: (sendMethod: LinkPaymentSendMethod) => void;
|
setSendMethod: (sendMethod: LinkPaymentSendMethod) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LinkPaymentWaitFilterProps extends FilterProps {
|
export interface LinkPaymentWaitFilterProps extends FilterProps {
|
||||||
mid: string;
|
mid: string;
|
||||||
searchType: LinkPaymentSearchType;
|
searchCl: LinkPaymentSearchCl;
|
||||||
searchKeyword: string;
|
searchKeyword: string;
|
||||||
startDate: string;
|
startDate: string;
|
||||||
endDate: string;
|
endDate: string;
|
||||||
sendMethod: LinkPaymentSendMethod;
|
sendMethod: LinkPaymentSendMethod;
|
||||||
sendingStatus: LinkPaymentSendingStatus;
|
sendingStatus: LinkPaymentSendStatus;
|
||||||
setMid: (mid: string) => void;
|
setMid: (mid: string) => void;
|
||||||
setSearchType: (searchType: LinkPaymentSearchType) => void;
|
setSearchType: (searchType: LinkPaymentSearchCl) => void;
|
||||||
setSearchKeyword: (searchKeyWorld: string) => void;
|
setSearchKeyword: (searchKeyWorld: string) => void;
|
||||||
setStartDate: (startDate: string) => void;
|
setStartDate: (startDate: string) => void;
|
||||||
setEndDate: (endDate: string) => void;
|
setEndDate: (endDate: string) => void;
|
||||||
setSendMethod: (sendMethod: LinkPaymentSendMethod) => void;
|
setSendMethod: (sendMethod: LinkPaymentSendMethod) => void;
|
||||||
setSendingStatus: (sendingStatus: LinkPaymentSendingStatus) => void;
|
setSendingStatus: (sendingStatus: LinkPaymentSendStatus) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 링크 결제 - 발송,대기 조회 확장 서비스
|
// 링크 결제 - 발송,대기 조회 확장 서비스
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { FilterMotionDuration, FilterMotionStyle, FilterMotionVariants } from '@
|
|||||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||||
import { FilterSelect } from '@/shared/ui/filter/select';
|
import { FilterSelect } from '@/shared/ui/filter/select';
|
||||||
import { FilterCalendar } from '@/shared/ui/filter/calendar';
|
import { FilterCalendar } from '@/shared/ui/filter/calendar';
|
||||||
import { FundAccountReceiveAccountNameNoOptionsGroup, FundAccountReceiveBankCodeOptionsGroup, FundAccountResultSearchDateTypeBtnGroup, FundAccountStatusBtnGroup } from '../../model/fund-account/constant';
|
import { FundAccountReceiveBankCodeOptionsGroup, FundAccountResultSearchDateTypeBtnGroup, FundAccountResultStatusBtnGroup, FundAccountSearchClOptionsGroup, FundAccountStatusBtnGroup } from '../../model/fund-account/constant';
|
||||||
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
||||||
import { FilterSelectInput } from '@/shared/ui/filter/select-input';
|
import { FilterSelectInput } from '@/shared/ui/filter/select-input';
|
||||||
import { useStore } from '@/shared/model/store';
|
import { useStore } from '@/shared/model/store';
|
||||||
@@ -61,15 +61,6 @@ export const FundAccountResultFilter = ({
|
|||||||
const [filterBankCode, setFilterBankCode] = useState<string>(bankCode);
|
const [filterBankCode, setFilterBankCode] = useState<string>(bankCode);
|
||||||
const [filterResultStatus, setFilterResultStatus] = useState<FundAccountResultStatus>(resultStatus);
|
const [filterResultStatus, setFilterResultStatus] = useState<FundAccountResultStatus>(resultStatus);
|
||||||
|
|
||||||
const [
|
|
||||||
filterReceiveAccountNameNoSelectValue,
|
|
||||||
setFilterReceiveAccountNameNoSelectValue
|
|
||||||
] = useState<FundAccountReceiveAccountNameNo>(FundAccountReceiveAccountNameNo.ReceiveAccountName);
|
|
||||||
const [
|
|
||||||
filterReceiveAccountNameNoInputValue,
|
|
||||||
setFilterReceiveAccountNameNoInputValue
|
|
||||||
] = useState<string>('');
|
|
||||||
|
|
||||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||||
|
|
||||||
const onClickToClose = () => {
|
const onClickToClose = () => {
|
||||||
@@ -133,11 +124,11 @@ export const FundAccountResultFilter = ({
|
|||||||
></FilterSelect>
|
></FilterSelect>
|
||||||
<FilterSelectInput
|
<FilterSelectInput
|
||||||
title='수취인/계좌번호'
|
title='수취인/계좌번호'
|
||||||
selectValue={filterReceiveAccountNameNoSelectValue}
|
selectValue={filterSearchCl}
|
||||||
selectSetter={setFilterReceiveAccountNameNoSelectValue}
|
selectSetter={setFilterSearchCl}
|
||||||
selectOptions={FundAccountReceiveAccountNameNoOptionsGroup}
|
selectOptions={FundAccountSearchClOptionsGroup}
|
||||||
inputValue={filterReceiveAccountNameNoInputValue}
|
inputValue={filterSearchValue}
|
||||||
inputSetter={setFilterReceiveAccountNameNoInputValue}
|
inputSetter={setFilterSearchValue}
|
||||||
></FilterSelectInput>
|
></FilterSelectInput>
|
||||||
<FilterButtonGroups
|
<FilterButtonGroups
|
||||||
title='조회 기준'
|
title='조회 기준'
|
||||||
@@ -161,7 +152,7 @@ export const FundAccountResultFilter = ({
|
|||||||
<FilterButtonGroups
|
<FilterButtonGroups
|
||||||
title='처리 결과'
|
title='처리 결과'
|
||||||
activeValue={filterResultStatus}
|
activeValue={filterResultStatus}
|
||||||
btnGroups={FundAccountStatusBtnGroup}
|
btnGroups={FundAccountResultStatusBtnGroup}
|
||||||
setter={setFilterResultStatus}
|
setter={setFilterResultStatus}
|
||||||
></FilterButtonGroups>
|
></FilterButtonGroups>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { FilterMotionDuration, FilterMotionStyle, FilterMotionVariants } from '@
|
|||||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||||
import { FilterSelect } from '@/shared/ui/filter/select';
|
import { FilterSelect } from '@/shared/ui/filter/select';
|
||||||
import { FilterCalendar } from '@/shared/ui/filter/calendar';
|
import { FilterCalendar } from '@/shared/ui/filter/calendar';
|
||||||
import { FundAccountReceiveAccountNameNoOptionsGroup, FundAccountReceiveBankCodeOptionsGroup, FundAccountStatusBtnGroup } from '../../model/fund-account/constant';
|
import { FundAccountReceiveBankCodeOptionsGroup, FundAccountSearchClOptionsGroup, FundAccountStatusBtnGroup } from '../../model/fund-account/constant';
|
||||||
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
||||||
import { FilterSelectInput } from '@/shared/ui/filter/select-input';
|
import { FilterSelectInput } from '@/shared/ui/filter/select-input';
|
||||||
import { useStore } from '@/shared/model/store';
|
import { useStore } from '@/shared/model/store';
|
||||||
@@ -120,7 +120,7 @@ export const FundAccountTransactionFilter = ({
|
|||||||
title='수취인/계좌번호'
|
title='수취인/계좌번호'
|
||||||
selectValue={ filterSearchCl }
|
selectValue={ filterSearchCl }
|
||||||
selectSetter={ setFilterSearchCl }
|
selectSetter={ setFilterSearchCl }
|
||||||
selectOptions={ FundAccountReceiveAccountNameNoOptionsGroup }
|
selectOptions={ FundAccountSearchClOptionsGroup }
|
||||||
inputValue={ filterSearchValue }
|
inputValue={ filterSearchValue }
|
||||||
inputSetter={ setFilterSearchValue }
|
inputSetter={ setFilterSearchValue }
|
||||||
></FilterSelectInput>
|
></FilterSelectInput>
|
||||||
|
|||||||
@@ -16,14 +16,37 @@ import { SortTypeBox } from '@/entities/common/ui/sort-type-box';
|
|||||||
import { FundAccountResultStatusBtnGroup, FundAccountStatusBtnGroup } from '../../model/fund-account/constant';
|
import { FundAccountResultStatusBtnGroup, FundAccountStatusBtnGroup } from '../../model/fund-account/constant';
|
||||||
import { FundAccountResultFilter } from '../filter/fund-account-result-filter';
|
import { FundAccountResultFilter } from '../filter/fund-account-result-filter';
|
||||||
import { useStore } from '@/shared/model/store';
|
import { useStore } from '@/shared/model/store';
|
||||||
|
import useIntersectionObserver from '@/widgets/intersection-observer';
|
||||||
|
|
||||||
export const FundAccountResultListWrap = () => {
|
export const FundAccountResultListWrap = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
|
const [onActionIntersect, setOnActionIntersect] = useState<boolean>(false);
|
||||||
|
const onIntersect: IntersectionObserverCallback = (entries: Array<IntersectionObserverEntry>) => {
|
||||||
|
entries.forEach((entry: IntersectionObserverEntry) => {
|
||||||
|
if (entry.isIntersecting) {
|
||||||
|
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
|
||||||
|
if (onActionIntersect) {
|
||||||
|
callList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log('Element is no longer intersecting with the root.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const { setTarget } = useIntersectionObserver({
|
||||||
|
threshold: 1,
|
||||||
|
onIntersect
|
||||||
|
});
|
||||||
|
|
||||||
const userMid = useStore.getState().UserStore.mid;
|
const userMid = useStore.getState().UserStore.mid;
|
||||||
|
|
||||||
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
||||||
const [listItems, setListItems] = useState<Array<FundAccountResultContentItem>>([]);
|
const [listItems, setListItems] = useState<Array<FundAccountResultContentItem>>([]);
|
||||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||||
|
const [nextCursor, setNextCursor] = useState<string | null>(null);
|
||||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||||
|
|
||||||
const [mid, setMid] = useState<string>(userMid);
|
const [mid, setMid] = useState<string>(userMid);
|
||||||
@@ -51,11 +74,16 @@ export const FundAccountResultListWrap = () => {
|
|||||||
|
|
||||||
const callList = (option?: {
|
const callList = (option?: {
|
||||||
sortType?: SortTypeKeys,
|
sortType?: SortTypeKeys,
|
||||||
resultStatus?: FundAccountResultStatus
|
resultStatus?: FundAccountResultStatus,
|
||||||
|
resetPage?: boolean
|
||||||
}) => {
|
}) => {
|
||||||
|
setOnActionIntersect(false);
|
||||||
|
|
||||||
pageParam.sortType = (option?.sortType) ? option.sortType : sortType;
|
const currentPageParam = option?.resetPage
|
||||||
setPageParam(pageParam);
|
? { ...DEFAULT_PAGE_PARAM, sortType: option?.sortType ?? sortType }
|
||||||
|
: { ...pageParam, sortType: option?.sortType ?? sortType };
|
||||||
|
|
||||||
|
setPageParam(currentPageParam);
|
||||||
|
|
||||||
let listSummaryParams: ExtensionFundAccountResultListParams = {
|
let listSummaryParams: ExtensionFundAccountResultListParams = {
|
||||||
mid: mid,
|
mid: mid,
|
||||||
@@ -66,12 +94,29 @@ export const FundAccountResultListWrap = () => {
|
|||||||
toDate: '20250930',
|
toDate: '20250930',
|
||||||
bankCode: bankCode,
|
bankCode: bankCode,
|
||||||
resultStatus: option?.resultStatus ?? resultStatus,
|
resultStatus: option?.resultStatus ?? resultStatus,
|
||||||
page: pageParam
|
... {
|
||||||
|
page: currentPageParam
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
extensionFundAccountResultList(listSummaryParams).then((rs: any) => {
|
extensionFundAccountResultList(listSummaryParams).then((rs: any) => {
|
||||||
console.log(rs);
|
console.log(rs);
|
||||||
setListItems(rs.content);
|
// resetPage면 기존 리스트 무시, 아니면 추가
|
||||||
|
setListItems(option?.resetPage ? rs.content : [
|
||||||
|
...listItems,
|
||||||
|
...rs.content
|
||||||
|
]);
|
||||||
|
if (rs.hasNext) {
|
||||||
|
setNextCursor(rs.nextCursor);
|
||||||
|
setPageParam({
|
||||||
|
...currentPageParam, // pageParam이 아니라 currentPageParam 사용
|
||||||
|
cursor: rs.nextCursor
|
||||||
|
});
|
||||||
|
setOnActionIntersect(true)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setNextCursor(null);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -113,14 +158,18 @@ export const FundAccountResultListWrap = () => {
|
|||||||
|
|
||||||
const onClickToSort = (sort: SortTypeKeys) => {
|
const onClickToSort = (sort: SortTypeKeys) => {
|
||||||
setSortType(sort);
|
setSortType(sort);
|
||||||
|
setListItems([]); // 리스트 초기화
|
||||||
callList({
|
callList({
|
||||||
sortType: sort
|
sortType: sort,
|
||||||
|
resetPage: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const onClickToStatus = (val: FundAccountResultStatus) => {
|
const onClickToStatus = (val: FundAccountResultStatus) => {
|
||||||
setResultStatus(val);
|
setResultStatus(val);
|
||||||
|
setListItems([]); // 리스트 초기화
|
||||||
callList({
|
callList({
|
||||||
resultStatus: val
|
resultStatus: val,
|
||||||
|
resetPage: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -129,25 +178,26 @@ export const FundAccountResultListWrap = () => {
|
|||||||
let date = '';
|
let date = '';
|
||||||
let list: FundAccountResultContentItem[] = [];
|
let list: FundAccountResultContentItem[] = [];
|
||||||
for (let i = 0; i < listItems.length; i++) {
|
for (let i = 0; i < listItems.length; i++) {
|
||||||
// registDate format: "20211018140420" (YYYYMMDDHHmmss)
|
// requestDate format: "20211018140420" (YYYYMMDDHHmmss)
|
||||||
let requestDate = listItems[i]?.requestDate || '';
|
let requestDate = listItems[i]?.requestDate || '';
|
||||||
let itemDate = requestDate.substring(0, 8);
|
let itemDate = requestDate.substring(0, 8);
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
date = itemDate;
|
date = itemDate;
|
||||||
}
|
}
|
||||||
if (date !== itemDate) {
|
if (date !== itemDate) {
|
||||||
date = itemDate;
|
// 날짜가 바뀌면 이전 리스트를 푸시 (날짜 업데이트 전에!)
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
rs.push(
|
rs.push(
|
||||||
<ListDateGroup
|
<ListDateGroup
|
||||||
additionalServiceCategory={AdditionalServiceCategory.FundAccountResult}
|
additionalServiceCategory={AdditionalServiceCategory.FundAccountResult}
|
||||||
mid={mid}
|
mid={mid}
|
||||||
key={date + '-' + i}
|
key={date + '-' + i}
|
||||||
date={date}
|
date={date} // 이전 날짜 사용
|
||||||
items={list as any}
|
items={list as any}
|
||||||
></ListDateGroup>
|
></ListDateGroup>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
date = itemDate; // 그 다음에 날짜 업데이트
|
||||||
list = [];
|
list = [];
|
||||||
}
|
}
|
||||||
list.push(listItems[i] as any);
|
list.push(listItems[i] as any);
|
||||||
@@ -155,7 +205,7 @@ export const FundAccountResultListWrap = () => {
|
|||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
rs.push(
|
rs.push(
|
||||||
<ListDateGroup
|
<ListDateGroup
|
||||||
additionalServiceCategory={AdditionalServiceCategory.FundAccountTransfer}
|
additionalServiceCategory={AdditionalServiceCategory.FundAccountResult}
|
||||||
mid={mid}
|
mid={mid}
|
||||||
key={date + '-last'}
|
key={date + '-last'}
|
||||||
date={date}
|
date={date}
|
||||||
@@ -167,10 +217,25 @@ export const FundAccountResultListWrap = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
callList();
|
|
||||||
callSummary();
|
callSummary();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// 필터 조건이 변경되면 첫 페이지부터 다시 시작
|
||||||
|
setListItems([]);
|
||||||
|
setNextCursor(null);
|
||||||
|
callList({ resetPage: true });
|
||||||
|
}, [
|
||||||
|
mid,
|
||||||
|
searchCl,
|
||||||
|
searchValue,
|
||||||
|
searchDateType,
|
||||||
|
fromDate,
|
||||||
|
toDate,
|
||||||
|
bankCode,
|
||||||
|
resultStatus
|
||||||
|
]);
|
||||||
|
|
||||||
const onClickToNavigate = () => {
|
const onClickToNavigate = () => {
|
||||||
navigate(PATHS.additionalService.fundAccount.transferRequest);
|
navigate(PATHS.additionalService.fundAccount.transferRequest);
|
||||||
};
|
};
|
||||||
@@ -300,6 +365,7 @@ export const FundAccountResultListWrap = () => {
|
|||||||
|
|
||||||
<section className="transaction-list">
|
<section className="transaction-list">
|
||||||
{getListDateGroup()}
|
{getListDateGroup()}
|
||||||
|
<div ref={setTarget}></div>
|
||||||
</section>
|
</section>
|
||||||
<div className="apply-row">
|
<div className="apply-row">
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { SortTypeKeys } from '@/entities/common/model/types';
|
import { DefaultRequestPagination, SortTypeKeys } from '@/entities/common/model/types';
|
||||||
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 { JSX, useEffect, useState } from 'react';
|
import { JSX, useEffect, useState } from 'react';
|
||||||
@@ -8,7 +8,6 @@ import {
|
|||||||
ExtensionFundAccountTransferExcelParams,
|
ExtensionFundAccountTransferExcelParams,
|
||||||
ExtensionFundAccountTransferExcelResponse,
|
ExtensionFundAccountTransferExcelResponse,
|
||||||
ExtensionFundAccountTransferListParams,
|
ExtensionFundAccountTransferListParams,
|
||||||
ExtensionFundAccountTransferListResponse,
|
|
||||||
FundAccountSearchCl,
|
FundAccountSearchCl,
|
||||||
FundAccountStatus,
|
FundAccountStatus,
|
||||||
FundAccountTransferContentItem
|
FundAccountTransferContentItem
|
||||||
@@ -26,15 +25,38 @@ import { NumericFormat } from 'react-number-format';
|
|||||||
import { FundAccountTransactionFilter } from '../filter/fund-account-trnasaction-filter';
|
import { FundAccountTransactionFilter } from '../filter/fund-account-trnasaction-filter';
|
||||||
import { PATHS } from '@/shared/constants/paths';
|
import { PATHS } from '@/shared/constants/paths';
|
||||||
import { useStore } from '@/shared/model/store';
|
import { useStore } from '@/shared/model/store';
|
||||||
|
import useIntersectionObserver from '@/widgets/intersection-observer';
|
||||||
|
|
||||||
export const FundAccountTransferListWrap = () => {
|
export const FundAccountTransferListWrap = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
|
const [onActionIntersect, setOnActionIntersect] = useState<boolean>(false);
|
||||||
|
const onIntersect: IntersectionObserverCallback = (entries: Array<IntersectionObserverEntry>) => {
|
||||||
|
entries.forEach((entry: IntersectionObserverEntry) => {
|
||||||
|
if (entry.isIntersecting) {
|
||||||
|
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
|
||||||
|
if (onActionIntersect) {
|
||||||
|
callList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log('Element is no longer intersecting with the root.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const { setTarget } = useIntersectionObserver({
|
||||||
|
threshold: 1,
|
||||||
|
onIntersect
|
||||||
|
});
|
||||||
|
|
||||||
const userMid = useStore.getState().UserStore.mid;
|
const userMid = useStore.getState().UserStore.mid;
|
||||||
|
|
||||||
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
||||||
const [listItems, setListItems] = useState<Array<FundAccountTransferContentItem>>([]);
|
const [listItems, setListItems] = useState<Array<FundAccountTransferContentItem>>([]);
|
||||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
const [nextCursor, setNextCursor] = useState<string | null>(null);
|
||||||
|
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||||
const [mid, setMid] = useState<string>(userMid);
|
const [mid, setMid] = useState<string>(userMid);
|
||||||
const [searchCl, setSearchCl] = useState<FundAccountSearchCl>(FundAccountSearchCl.ACCOUNT_NAME);
|
const [searchCl, setSearchCl] = useState<FundAccountSearchCl>(FundAccountSearchCl.ACCOUNT_NAME);
|
||||||
const [searchValue, setSearchValue] = useState<string>('');
|
const [searchValue, setSearchValue] = useState<string>('');
|
||||||
@@ -52,25 +74,47 @@ export const FundAccountTransferListWrap = () => {
|
|||||||
|
|
||||||
const callList = (option?: {
|
const callList = (option?: {
|
||||||
sortType?: SortTypeKeys,
|
sortType?: SortTypeKeys,
|
||||||
status?: FundAccountStatus
|
status?: FundAccountStatus,
|
||||||
|
resetPage?: boolean
|
||||||
}) => {
|
}) => {
|
||||||
pageParam.sortType = (option?.sortType) ? option.sortType : sortType;
|
setOnActionIntersect(false);
|
||||||
setPageParam(pageParam);
|
|
||||||
|
const currentPageParam = option?.resetPage
|
||||||
|
? { ...DEFAULT_PAGE_PARAM, sortType: option?.sortType ?? sortType }
|
||||||
|
: { ...pageParam, sortType: option?.sortType ?? sortType };
|
||||||
|
|
||||||
|
setPageParam(currentPageParam);
|
||||||
|
|
||||||
let listSummaryParams: ExtensionFundAccountTransferListParams = {
|
let listSummaryParams: ExtensionFundAccountTransferListParams = {
|
||||||
mid: "nictest80m",
|
mid: mid,
|
||||||
searchCl: searchCl,
|
searchCl: searchCl,
|
||||||
searchValue: searchValue,
|
searchValue: searchValue,
|
||||||
bankCode: bankCode,
|
bankCode: bankCode,
|
||||||
fromDate: "20210101",
|
fromDate: fromDate,
|
||||||
toDate: "20221231",
|
toDate: toDate,
|
||||||
resultStatus: option?.status ?? status,
|
resultStatus: option?.status ?? status,
|
||||||
page: pageParam
|
... {
|
||||||
|
page: currentPageParam
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
extensionFundAccountTransferList(listSummaryParams).then((rs: any) => {
|
extensionFundAccountTransferList(listSummaryParams).then((rs: any) => {
|
||||||
const content = rs.content || [];
|
// resetPage면 기존 리스트 무시, 아니면 추가
|
||||||
setListItems(rs.content);
|
setListItems(option?.resetPage ? rs.content : [
|
||||||
|
...listItems,
|
||||||
|
...rs.content
|
||||||
|
]);
|
||||||
|
if (rs.hasNext) {
|
||||||
|
setNextCursor(rs.nextCursor);
|
||||||
|
setPageParam({
|
||||||
|
...currentPageParam, // pageParam이 아니라 currentPageParam 사용
|
||||||
|
cursor: rs.nextCursor
|
||||||
|
});
|
||||||
|
setOnActionIntersect(true)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setNextCursor(null);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
callBalance();
|
callBalance();
|
||||||
@@ -93,7 +137,6 @@ export const FundAccountTransferListWrap = () => {
|
|||||||
mid: mid
|
mid: mid
|
||||||
};
|
};
|
||||||
extensionFundAccountBalance(params).then((rs: ExtensionFundAccountBalanceResponse) => {
|
extensionFundAccountBalance(params).then((rs: ExtensionFundAccountBalanceResponse) => {
|
||||||
console.log(rs);
|
|
||||||
setBalance(rs.balance);
|
setBalance(rs.balance);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -109,12 +152,15 @@ export const FundAccountTransferListWrap = () => {
|
|||||||
|
|
||||||
const onClickToSort = (sort: SortTypeKeys) => {
|
const onClickToSort = (sort: SortTypeKeys) => {
|
||||||
setSortType(sort);
|
setSortType(sort);
|
||||||
callList({ sortType: sort });
|
setListItems([]); // 리스트 초기화
|
||||||
|
callList({ sortType: sort, resetPage: true });
|
||||||
};
|
};
|
||||||
const onClickToStatus = (val: FundAccountStatus) => {
|
const onClickToStatus = (val: FundAccountStatus) => {
|
||||||
setStatus(val);
|
setStatus(val);
|
||||||
|
setListItems([]); // 리스트 초기화
|
||||||
callList({
|
callList({
|
||||||
status: val
|
status: val,
|
||||||
|
resetPage: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -135,7 +181,7 @@ export const FundAccountTransferListWrap = () => {
|
|||||||
rs.push(
|
rs.push(
|
||||||
<ListDateGroup
|
<ListDateGroup
|
||||||
additionalServiceCategory={AdditionalServiceCategory.FundAccountTransfer}
|
additionalServiceCategory={AdditionalServiceCategory.FundAccountTransfer}
|
||||||
mid={"nictest80m"}
|
mid={mid}
|
||||||
key={date + '-' + i}
|
key={date + '-' + i}
|
||||||
date={date}
|
date={date}
|
||||||
items={list as any}
|
items={list as any}
|
||||||
@@ -150,7 +196,7 @@ export const FundAccountTransferListWrap = () => {
|
|||||||
rs.push(
|
rs.push(
|
||||||
<ListDateGroup
|
<ListDateGroup
|
||||||
additionalServiceCategory={AdditionalServiceCategory.FundAccountTransfer}
|
additionalServiceCategory={AdditionalServiceCategory.FundAccountTransfer}
|
||||||
mid={"nictest80m"}
|
mid={mid}
|
||||||
key={date + '-last'}
|
key={date + '-last'}
|
||||||
date={date}
|
date={date}
|
||||||
items={list as any}
|
items={list as any}
|
||||||
@@ -161,7 +207,10 @@ export const FundAccountTransferListWrap = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
callList();
|
// 필터 조건이 변경되면 첫 페이지부터 다시 시작
|
||||||
|
setListItems([]);
|
||||||
|
setNextCursor(null);
|
||||||
|
callList({ resetPage: true });
|
||||||
}, [
|
}, [
|
||||||
mid,
|
mid,
|
||||||
searchCl,
|
searchCl,
|
||||||
@@ -250,6 +299,7 @@ export const FundAccountTransferListWrap = () => {
|
|||||||
|
|
||||||
<section className="transaction-list pb-86">
|
<section className="transaction-list pb-86">
|
||||||
{getListDateGroup()}
|
{getListDateGroup()}
|
||||||
|
<div ref={setTarget}></div>
|
||||||
</section>
|
</section>
|
||||||
<div className="apply-row">
|
<div className="apply-row">
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
|||||||
import { FilterRangeAmount } from '@/shared/ui/filter/range-amount';
|
import { FilterRangeAmount } from '@/shared/ui/filter/range-amount';
|
||||||
import { FilterMotionDuration, FilterMotionStyle, FilterMotionVariants } from '@/entities/common/model/constant';
|
import { FilterMotionDuration, FilterMotionStyle, FilterMotionVariants } from '@/entities/common/model/constant';
|
||||||
import { useStore } from '@/shared/model/store';
|
import { useStore } from '@/shared/model/store';
|
||||||
import { KeyInPaymentFilterProps, KeyInPaymentTransactionStatus } from '@/entities/additional-service/model/key-in/types';
|
import { KeyInPaymentFilterProps, KeyInPaymentPaymentStatus } from '@/entities/additional-service/model/key-in/types';
|
||||||
|
|
||||||
export const KeyInPaymentFilter = ({
|
export const KeyInPaymentFilter = ({
|
||||||
filterOn,
|
filterOn,
|
||||||
@@ -32,7 +32,7 @@ export const KeyInPaymentFilter = ({
|
|||||||
const [filterMid, setFilterMid] = useState<string>(mid);
|
const [filterMid, setFilterMid] = useState<string>(mid);
|
||||||
const [filterStartDate, setFilterStartDate] = useState<string>(startDate);
|
const [filterStartDate, setFilterStartDate] = useState<string>(startDate);
|
||||||
const [filterEndDate, setFilterEndDate] = useState<string>(endDate);
|
const [filterEndDate, setFilterEndDate] = useState<string>(endDate);
|
||||||
const [filterTransactionStatus, setFilterTransactionStatus] = useState<KeyInPaymentTransactionStatus>(transactionStatus);
|
const [filterTransactionStatus, setFilterTransactionStatus] = useState<KeyInPaymentPaymentStatus>(transactionStatus);
|
||||||
const [filterMinAmount, setFilterMinAmount] = useState<number | undefined>(minAmount);
|
const [filterMinAmount, setFilterMinAmount] = useState<number | undefined>(minAmount);
|
||||||
const [filterMaxAmount, setFilterMaxAmount] = useState<number | undefined>(maxAmount);
|
const [filterMaxAmount, setFilterMaxAmount] = useState<number | undefined>(maxAmount);
|
||||||
|
|
||||||
@@ -57,10 +57,10 @@ export const KeyInPaymentFilter = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
let transactionStatusOption = [
|
let transactionStatusOption = [
|
||||||
{ name: '전체', value: KeyInPaymentTransactionStatus.ALL },
|
{ name: '전체', value: KeyInPaymentPaymentStatus.ALL },
|
||||||
{ name: '승인', value: KeyInPaymentTransactionStatus.APPROVAL },
|
{ name: '승인', value: KeyInPaymentPaymentStatus.APPROVAL },
|
||||||
{ name: '전취소', value: KeyInPaymentTransactionStatus.PRE_CANCEL },
|
{ name: '전취소', value: KeyInPaymentPaymentStatus.PRE_CANCEL },
|
||||||
{ name: '후취소', value: KeyInPaymentTransactionStatus.POST_CANCEL },
|
{ name: '후취소', value: KeyInPaymentPaymentStatus.POST_CANCEL },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,24 +1,53 @@
|
|||||||
import { PATHS } from '@/shared/constants/paths';
|
import { PATHS } from '@/shared/constants/paths';
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||||
import { ListDateGroup } from '../list-date-group';
|
import { ListDateGroup } from '../list-date-group';
|
||||||
import { KeyInPaymentListProps } from '../../model/key-in/types';
|
import { KeyInPaymentListItem, KeyInPaymentListProps } from '../../model/key-in/types';
|
||||||
|
import { JSX } from 'react';
|
||||||
|
|
||||||
export const KeyInPaymentList = ({
|
export const KeyInPaymentList = ({
|
||||||
additionalServiceCategory,
|
additionalServiceCategory,
|
||||||
listItems,
|
listItems,
|
||||||
mid
|
mid,
|
||||||
|
setTarget
|
||||||
}: KeyInPaymentListProps) => {
|
}: KeyInPaymentListProps) => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
const getListDateGroup = () => {
|
const getListDateGroup = () => {
|
||||||
let rs = [];
|
let rs: JSX.Element[] = [];
|
||||||
for (const [key, value] of Object.entries(listItems)) {
|
let date = '';
|
||||||
|
let list: KeyInPaymentListItem[] = [];
|
||||||
|
for (let i = 0; i < listItems.length; i++) {
|
||||||
|
// paymentDate format: "20211018140420" (YYYYMMDDHHmmss)
|
||||||
|
let paymentDate = listItems[i]?.paymentDate || '';
|
||||||
|
let itemDate = paymentDate.substring(0, 8);
|
||||||
|
if (i === 0) {
|
||||||
|
date = itemDate;
|
||||||
|
}
|
||||||
|
if (date !== itemDate) {
|
||||||
|
date = itemDate;
|
||||||
|
if (list.length > 0) {
|
||||||
|
rs.push(
|
||||||
|
<ListDateGroup
|
||||||
|
additionalServiceCategory={additionalServiceCategory}
|
||||||
|
mid={mid}
|
||||||
|
key={date + '-' + i}
|
||||||
|
date={date}
|
||||||
|
items={list as any}
|
||||||
|
></ListDateGroup>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
list = [];
|
||||||
|
}
|
||||||
|
list.push(listItems[i] as any);
|
||||||
|
}
|
||||||
|
if (list.length > 0) {
|
||||||
rs.push(
|
rs.push(
|
||||||
<ListDateGroup
|
<ListDateGroup
|
||||||
additionalServiceCategory={additionalServiceCategory}
|
additionalServiceCategory={additionalServiceCategory}
|
||||||
key={key}
|
mid={mid}
|
||||||
date={key}
|
key={date + '-last'}
|
||||||
items={value}
|
date={date}
|
||||||
|
items={list as any}
|
||||||
></ListDateGroup>
|
></ListDateGroup>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -31,14 +60,15 @@ export const KeyInPaymentList = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="transaction-list">
|
<section className="transaction-list">
|
||||||
{getListDateGroup()}
|
{getListDateGroup()}
|
||||||
<div className="apply-row">
|
<div ref={setTarget}></div>
|
||||||
<button
|
</section>
|
||||||
className="btn-50 btn-blue flex-1"
|
<div className="apply-row">
|
||||||
onClick={() => onClickToNavigate()}
|
<button
|
||||||
>결제 신청</button>
|
className="btn-50 btn-blue flex-1"
|
||||||
</div>
|
onClick={() => onClickToNavigate()}
|
||||||
|
>결제 신청</button>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,17 +13,17 @@ import { FilterCalendar } from '@/shared/ui/filter/calendar';
|
|||||||
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
||||||
import { FilterMotionDuration, FilterMotionStyle, FilterMotionVariants } from '@/entities/common/model/constant';
|
import { FilterMotionDuration, FilterMotionStyle, FilterMotionVariants } from '@/entities/common/model/constant';
|
||||||
import { useStore } from '@/shared/model/store';
|
import { useStore } from '@/shared/model/store';
|
||||||
import { LinkPaymentHistoryFilterProps, LinkPaymentSearchType, LinkPaymentSendMethod, LinkPaymentTransactionStatus } from '@/entities/additional-service/model/link-pay/types';
|
import { LinkPaymentHistoryFilterProps, LinkPaymentPaymentStatus, LinkPaymentSearchCl, LinkPaymentSendMethod } from '@/entities/additional-service/model/link-pay/types';
|
||||||
|
|
||||||
export const LinkPaymentHistoryFilter = ({
|
export const LinkPaymentHistoryFilter = ({
|
||||||
filterOn,
|
filterOn,
|
||||||
setFilterOn,
|
setFilterOn,
|
||||||
mid,
|
mid,
|
||||||
searchType,
|
searchCl,
|
||||||
searchKeyword,
|
searchValue,
|
||||||
startDate,
|
fromDate,
|
||||||
endDate,
|
toDate,
|
||||||
transactionStatus,
|
paymentStatus,
|
||||||
processResult,
|
processResult,
|
||||||
sendMethod,
|
sendMethod,
|
||||||
setMid,
|
setMid,
|
||||||
@@ -38,11 +38,11 @@ export const LinkPaymentHistoryFilter = ({
|
|||||||
|
|
||||||
|
|
||||||
const [filterMid, setFilterMid] = useState<string>(mid);
|
const [filterMid, setFilterMid] = useState<string>(mid);
|
||||||
const [filterSearchType, setFilterSearchType] = useState<LinkPaymentSearchType>(searchType);
|
const [filterSearchType, setFilterSearchType] = useState<LinkPaymentSearchCl>(searchCl);
|
||||||
const [filterSearchKeyword, setFilterSearchKeyword] = useState<string>(searchKeyword);
|
const [filterSearchKeyword, setFilterSearchKeyword] = useState<string>(searchValue);
|
||||||
const [filterStartDate, setFilterStartDate] = useState<string>(startDate);
|
const [filterStartDate, setFilterStartDate] = useState<string>(fromDate);
|
||||||
const [filterEndDate, setFilterEndDate] = useState<string>(endDate);
|
const [filterEndDate, setFilterEndDate] = useState<string>(toDate);
|
||||||
const [filterTransactionStatus, setFilterTransactionStatus] = useState<LinkPaymentTransactionStatus>(transactionStatus)
|
const [filterTransactionStatus, setFilterTransactionStatus] = useState<LinkPaymentPaymentStatus>(paymentStatus)
|
||||||
const [filterProcessResult, setFilterProcessResult] = useState<ProcessResult>(processResult);
|
const [filterProcessResult, setFilterProcessResult] = useState<ProcessResult>(processResult);
|
||||||
const [filterSendMethod, setFilterSendMethod] = useState<LinkPaymentSendMethod>(sendMethod);
|
const [filterSendMethod, setFilterSendMethod] = useState<LinkPaymentSendMethod>(sendMethod);
|
||||||
const [dateReadOnly, setDateReadyOnly] = useState<boolean>(true);
|
const [dateReadOnly, setDateReadyOnly] = useState<boolean>(true);
|
||||||
@@ -73,17 +73,17 @@ export const LinkPaymentHistoryFilter = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
let searchTypeOption = [
|
let searchTypeOption = [
|
||||||
{ name: '휴대폰번호', value: LinkPaymentSearchType.PHONE },
|
{ name: '휴대폰번호', value: LinkPaymentSearchCl.PHONE },
|
||||||
{ name: '이메일', value: LinkPaymentSearchType.EMAIL },
|
{ name: '이메일', value: LinkPaymentSearchCl.EMAIL },
|
||||||
];
|
];
|
||||||
|
|
||||||
let transactionStatusOption = [
|
let transactionStatusOption = [
|
||||||
{ name: '전체', value: LinkPaymentTransactionStatus.ALL },
|
{ name: '전체', value: LinkPaymentPaymentStatus.ALL },
|
||||||
{ name: '미완료/활성화', value: LinkPaymentTransactionStatus.ACTIVATE },
|
{ name: '미완료/활성화', value: LinkPaymentPaymentStatus.ACTIVATE },
|
||||||
{ name: '입금요청', value: LinkPaymentTransactionStatus.DEPOSIT_REQUEST },
|
{ name: '입금요청', value: LinkPaymentPaymentStatus.DEPOSIT_REQUEST },
|
||||||
{ name: '결제완료', value: LinkPaymentTransactionStatus.TRANSACTION_COMPLETE },
|
{ name: '결제완료', value: LinkPaymentPaymentStatus.PAYMENT_COMPLETE },
|
||||||
{ name: '결제실패', value: LinkPaymentTransactionStatus.TRANSACTION_FAIL },
|
{ name: '결제실패', value: LinkPaymentPaymentStatus.PAYMENT_FAIL },
|
||||||
{ name: '결제중단/비활성화', value: LinkPaymentTransactionStatus.INACTIVE },
|
{ name: '결제중단/비활성화', value: LinkPaymentPaymentStatus.INACTIVE },
|
||||||
];
|
];
|
||||||
|
|
||||||
let processResultOption = [
|
let processResultOption = [
|
||||||
@@ -139,7 +139,7 @@ export const LinkPaymentHistoryFilter = ({
|
|||||||
selectValue={filterSearchType}
|
selectValue={filterSearchType}
|
||||||
selectSetter={setFilterSearchType}
|
selectSetter={setFilterSearchType}
|
||||||
selectOptions={searchTypeOption}
|
selectOptions={searchTypeOption}
|
||||||
inputValue={searchKeyword}
|
inputValue={searchValue}
|
||||||
inputSetter={setSearchKeyword}
|
inputSetter={setSearchKeyword}
|
||||||
></FilterSelectInput>
|
></FilterSelectInput>
|
||||||
<FilterCalendar
|
<FilterCalendar
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ import { FilterCalendar } from '@/shared/ui/filter/calendar';
|
|||||||
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
||||||
import { FilterMotionDuration, FilterMotionStyle, FilterMotionVariants } from '@/entities/common/model/constant';
|
import { FilterMotionDuration, FilterMotionStyle, FilterMotionVariants } from '@/entities/common/model/constant';
|
||||||
import { useStore } from '@/shared/model/store';
|
import { useStore } from '@/shared/model/store';
|
||||||
import { LinkPaymentSearchType, LinkPaymentSendingStatus, LinkPaymentSendMethod, LinkPaymentWaitFilterProps } from '@/entities/additional-service/model/link-pay/types';
|
import { LinkPaymentSearchCl, LinkPaymentSendMethod, LinkPaymentSendStatus, LinkPaymentWaitFilterProps } from '@/entities/additional-service/model/link-pay/types';
|
||||||
|
|
||||||
export const LinkPaymentWaitSendFilter = ({
|
export const LinkPaymentWaitSendFilter = ({
|
||||||
filterOn,
|
filterOn,
|
||||||
setFilterOn,
|
setFilterOn,
|
||||||
mid,
|
mid,
|
||||||
searchType,
|
searchCl,
|
||||||
searchKeyword,
|
searchKeyword,
|
||||||
startDate,
|
startDate,
|
||||||
endDate,
|
endDate,
|
||||||
@@ -33,12 +33,12 @@ export const LinkPaymentWaitSendFilter = ({
|
|||||||
|
|
||||||
|
|
||||||
const [filterMid, setFilterMid] = useState<string>(mid);
|
const [filterMid, setFilterMid] = useState<string>(mid);
|
||||||
const [filterSearchType, setFilterSearchType] = useState<LinkPaymentSearchType>(searchType);
|
const [filterSearchType, setFilterSearchType] = useState<LinkPaymentSearchCl>(searchCl);
|
||||||
const [filterSearchKeyword, setFilterSearchKeyword] = useState<string>(searchKeyword);
|
const [filterSearchKeyword, setFilterSearchKeyword] = useState<string>(searchKeyword);
|
||||||
const [filterStartDate, setFilterStartDate] = useState<string>(startDate);
|
const [filterStartDate, setFilterStartDate] = useState<string>(startDate);
|
||||||
const [filterEndDate, setFilterEndDate] = useState<string>(endDate);
|
const [filterEndDate, setFilterEndDate] = useState<string>(endDate);
|
||||||
const [filterSendMethod, setFilterSendMethod] = useState<LinkPaymentSendMethod>(sendMethod)
|
const [filterSendMethod, setFilterSendMethod] = useState<LinkPaymentSendMethod>(sendMethod)
|
||||||
const [filterSendingStatus, setFilterSendingStatus] = useState<LinkPaymentSendingStatus>(sendingStatus);
|
const [filterSendingStatus, setFilterSendingStatus] = useState<LinkPaymentSendStatus>(sendingStatus);
|
||||||
const [dateReadOnly, setDateReadyOnly] = useState<boolean>(true);
|
const [dateReadOnly, setDateReadyOnly] = useState<boolean>(true);
|
||||||
const [filterDateOptionsBtn, setFilterDateOptionsBtn] = useState<FilterDateOptions>(FilterDateOptions.Input);
|
const [filterDateOptionsBtn, setFilterDateOptionsBtn] = useState<FilterDateOptions>(FilterDateOptions.Input);
|
||||||
|
|
||||||
@@ -66,8 +66,8 @@ export const LinkPaymentWaitSendFilter = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
let searchTypeOption = [
|
let searchTypeOption = [
|
||||||
{ name: '휴대폰번호', value: LinkPaymentSearchType.PHONE },
|
{ name: '휴대폰번호', value: LinkPaymentSearchCl.PHONE },
|
||||||
{ name: '이메일', value: LinkPaymentSearchType.EMAIL },
|
{ name: '이메일', value: LinkPaymentSearchCl.EMAIL },
|
||||||
];
|
];
|
||||||
|
|
||||||
let sendMethodOption = [
|
let sendMethodOption = [
|
||||||
@@ -78,9 +78,9 @@ export const LinkPaymentWaitSendFilter = ({
|
|||||||
];
|
];
|
||||||
|
|
||||||
let sendingStatusOption = [
|
let sendingStatusOption = [
|
||||||
{ name: '전체', value: LinkPaymentSendingStatus.ALL },
|
{ name: '전체', value: LinkPaymentSendStatus.ALL },
|
||||||
{ name: '발송요청', value: LinkPaymentSendingStatus.SEND_REQUEST },
|
{ name: '발송요청', value: LinkPaymentSendStatus.SUCCESS },
|
||||||
{ name: '발송취소', value: LinkPaymentSendingStatus.SEND_CANCEL },
|
{ name: '발송취소', value: LinkPaymentSendStatus.FAIL },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -120,7 +120,7 @@ export const LinkPaymentWaitSendFilter = ({
|
|||||||
|
|
||||||
<FilterSelectInput
|
<FilterSelectInput
|
||||||
title='휴대폰번호/이메일'
|
title='휴대폰번호/이메일'
|
||||||
selectValue={searchType}
|
selectValue={searchCl}
|
||||||
selectSetter={setFilterSearchType}
|
selectSetter={setFilterSearchType}
|
||||||
selectOptions={searchTypeOption}
|
selectOptions={searchTypeOption}
|
||||||
inputValue={searchKeyword}
|
inputValue={searchKeyword}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { useExtensionLinkPayHistoryListMutation } from '../../api/link-payment/u
|
|||||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||||
import { useExtensionLinkPayHistoryDownloadExcelMutation } from '../../api/link-payment/use-extension-link-pay-history-download-excel-mutation';
|
import { useExtensionLinkPayHistoryDownloadExcelMutation } from '../../api/link-payment/use-extension-link-pay-history-download-excel-mutation';
|
||||||
import { useStore } from '@/shared/model/store';
|
import { useStore } from '@/shared/model/store';
|
||||||
import { LinkPaymentHistoryListItem, LinkPaymentSearchType, LinkPaymentSendMethod, LinkPaymentTransactionStatus } from '../../model/link-pay/types';
|
import { LinkPaymentHistoryListItem, LinkPaymentPaymentStatus, LinkPaymentSearchCl, LinkPaymentSendMethod } from '../../model/link-pay/types';
|
||||||
|
|
||||||
const processResultBtnGroup = [
|
const processResultBtnGroup = [
|
||||||
{ name: '전체', value: ProcessResult.ALL },
|
{ name: '전체', value: ProcessResult.ALL },
|
||||||
@@ -28,12 +28,13 @@ export const LinkPaymentHistoryWrap = () => {
|
|||||||
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
||||||
const [listItems, setListItems] = useState({});
|
const [listItems, setListItems] = useState({});
|
||||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||||
|
|
||||||
const [mid, setMid] = useState<string>(userMid);
|
const [mid, setMid] = useState<string>(userMid);
|
||||||
const [searchType, setSearchType] = useState<LinkPaymentSearchType>(LinkPaymentSearchType.ALL)
|
const [searchCl, setSearchCl] = useState<LinkPaymentSearchCl>(LinkPaymentSearchCl.ALL)
|
||||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||||
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'));
|
||||||
const [transactionStatus, setTransactionStatus] = useState<LinkPaymentTransactionStatus>(LinkPaymentTransactionStatus.ALL)
|
const [transactionStatus, setTransactionStatus] = useState<LinkPaymentPaymentStatus>(LinkPaymentPaymentStatus.ALL)
|
||||||
const [processResult, setProcessResult] = useState<ProcessResult>(ProcessResult.ALL)
|
const [processResult, setProcessResult] = useState<ProcessResult>(ProcessResult.ALL)
|
||||||
const [sendMethod, setSendMethod] = useState<LinkPaymentSendMethod>(LinkPaymentSendMethod.ALL)
|
const [sendMethod, setSendMethod] = useState<LinkPaymentSendMethod>(LinkPaymentSendMethod.ALL)
|
||||||
|
|
||||||
@@ -53,12 +54,12 @@ export const LinkPaymentHistoryWrap = () => {
|
|||||||
|
|
||||||
let listParams = {
|
let listParams = {
|
||||||
mid: mid,
|
mid: mid,
|
||||||
searchCl: searchType === LinkPaymentSearchType.ALL ? '' : searchType,
|
searchCl: searchCl,
|
||||||
searchValue: searchKeyword,
|
searchValue: searchKeyword,
|
||||||
paymentMethod: '',
|
paymentMethod: '',
|
||||||
fromDate: startDate,
|
fromDate: startDate,
|
||||||
toDate: endDate,
|
toDate: endDate,
|
||||||
paymentStatus: transactionStatus === LinkPaymentTransactionStatus.ALL ? '' : transactionStatus,
|
paymentStatus: transactionStatus === LinkPaymentPaymentStatus.ALL ? '' : transactionStatus,
|
||||||
sendStatus: processResult === ProcessResult.ALL ? '' : processResult,
|
sendStatus: processResult === ProcessResult.ALL ? '' : processResult,
|
||||||
sendMethod: sendMethod === LinkPaymentSendMethod.ALL ? '' : sendMethod,
|
sendMethod: sendMethod === LinkPaymentSendMethod.ALL ? '' : sendMethod,
|
||||||
page: pageParam
|
page: pageParam
|
||||||
@@ -90,12 +91,12 @@ export const LinkPaymentHistoryWrap = () => {
|
|||||||
const onClickToDownloadExcel = () => {
|
const onClickToDownloadExcel = () => {
|
||||||
downloadExcel({
|
downloadExcel({
|
||||||
mid: mid,
|
mid: mid,
|
||||||
searchCl: (searchType === LinkPaymentSearchType.ALL)? '': searchType,
|
searchCl: searchCl,
|
||||||
searchValue: searchKeyword,
|
searchValue: searchKeyword,
|
||||||
paymentMethod: '',
|
paymentMethod: '',
|
||||||
fromDate: startDate,
|
fromDate: startDate,
|
||||||
toDate: endDate,
|
toDate: endDate,
|
||||||
paymentStatus: (transactionStatus === LinkPaymentTransactionStatus.ALL)? '': transactionStatus,
|
paymentStatus: transactionStatus,
|
||||||
sendStatus: (processResult === ProcessResult.ALL)? '': processResult,
|
sendStatus: (processResult === ProcessResult.ALL)? '': processResult,
|
||||||
sendMethod: (sendMethod === LinkPaymentSendMethod.ALL)? '': sendMethod,
|
sendMethod: (sendMethod === LinkPaymentSendMethod.ALL)? '': sendMethod,
|
||||||
}).then((rs) => {
|
}).then((rs) => {
|
||||||
@@ -190,15 +191,15 @@ export const LinkPaymentHistoryWrap = () => {
|
|||||||
filterOn={filterOn}
|
filterOn={filterOn}
|
||||||
setFilterOn={setFilterOn}
|
setFilterOn={setFilterOn}
|
||||||
mid={mid}
|
mid={mid}
|
||||||
searchType={searchType}
|
searchCl={searchCl}
|
||||||
searchKeyword={searchKeyword}
|
searchValue={searchKeyword}
|
||||||
startDate={startDate}
|
fromDate={startDate}
|
||||||
endDate={endDate}
|
toDate={endDate}
|
||||||
transactionStatus={transactionStatus}
|
paymentStatus={transactionStatus}
|
||||||
processResult={processResult}
|
processResult={processResult}
|
||||||
sendMethod={sendMethod}
|
sendMethod={sendMethod}
|
||||||
setMid={setMid}
|
setMid={setMid}
|
||||||
setSearchType={setSearchType}
|
setSearchType={setSearchCl}
|
||||||
setSearchKeyword={setSearchKeyword}
|
setSearchKeyword={setSearchKeyword}
|
||||||
setStartDate={setStartDate}
|
setStartDate={setStartDate}
|
||||||
setEndDate={setEndDate}
|
setEndDate={setEndDate}
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ import { useExtensionLinkPayWaitListMutation } from '../../api/link-payment/use-
|
|||||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||||
import { useExtensionLinkPayWaitDownloadExcelMutation } from '../../api/link-payment/use-extension-link-pay-wait-download-excel-mutation';
|
import { useExtensionLinkPayWaitDownloadExcelMutation } from '../../api/link-payment/use-extension-link-pay-wait-download-excel-mutation';
|
||||||
import { useStore } from '@/shared/model/store';
|
import { useStore } from '@/shared/model/store';
|
||||||
import { LinkPaymentSearchType, LinkPaymentSendingStatus, LinkPaymentSendMethod, LinkPaymentWaitListItem } from '../../model/link-pay/types';
|
import { LinkPaymentSearchCl, LinkPaymentSendMethod, LinkPaymentSendStatus, LinkPaymentWaitListItem } from '../../model/link-pay/types';
|
||||||
|
|
||||||
const sendingStatusBtnGrouup = [
|
const sendingStatusBtnGrouup = [
|
||||||
{ name: '전체', value: LinkPaymentSendingStatus.ALL },
|
{ name: '전체', value: LinkPaymentSendStatus.ALL },
|
||||||
{ name: '발송요청', value: LinkPaymentSendingStatus.SEND_REQUEST },
|
{ name: '발송요청', value: LinkPaymentSendStatus.SUCCESS },
|
||||||
{ name: '발송취소', value: LinkPaymentSendingStatus.SEND_CANCEL }
|
{ name: '발송취소', value: LinkPaymentSendStatus.FAIL }
|
||||||
]
|
]
|
||||||
|
|
||||||
export const LinkPaymentWaitSendWrap = () => {
|
export const LinkPaymentWaitSendWrap = () => {
|
||||||
@@ -27,12 +27,12 @@ export const LinkPaymentWaitSendWrap = () => {
|
|||||||
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
||||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||||
const [mid, setMid] = useState<string>(userMid);
|
const [mid, setMid] = useState<string>(userMid);
|
||||||
const [searchType, setSearchType] = useState<LinkPaymentSearchType>(LinkPaymentSearchType.ALL)
|
const [searchType, setSearchType] = useState<LinkPaymentSearchCl>(LinkPaymentSearchCl.ALL)
|
||||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||||
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'));
|
||||||
const [sendMethod, setSendMethod] = useState<LinkPaymentSendMethod>(LinkPaymentSendMethod.ALL);
|
const [sendMethod, setSendMethod] = useState<LinkPaymentSendMethod>(LinkPaymentSendMethod.ALL);
|
||||||
const [sendingStatus, setSendingStatus] = useState<LinkPaymentSendingStatus>(LinkPaymentSendingStatus.ALL);
|
const [sendingStatus, setSendingStatus] = useState<LinkPaymentSendStatus>(LinkPaymentSendStatus.ALL);
|
||||||
const [listItems, setListItems] = useState({});
|
const [listItems, setListItems] = useState({});
|
||||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||||
|
|
||||||
@@ -55,13 +55,13 @@ export const LinkPaymentWaitSendWrap = () => {
|
|||||||
|
|
||||||
let listParams = {
|
let listParams = {
|
||||||
mid: mid,
|
mid: mid,
|
||||||
searchCl: (searchType === LinkPaymentSearchType.ALL)? '': searchType,
|
searchCl: searchType,
|
||||||
searchValue: searchKeyword,
|
searchValue: searchKeyword,
|
||||||
fromDate: startDate,
|
fromDate: startDate,
|
||||||
toDate: endDate,
|
toDate: endDate,
|
||||||
sendStatus: (sendingStatus === LinkPaymentSendingStatus.ALL)? '': sendingStatus, // 추후 삭제 필요
|
sendStatus: sendingStatus, // 추후 삭제 필요
|
||||||
sendMethod: (sendMethod === LinkPaymentSendMethod.ALL)? '': sendMethod,
|
sendMethod: (sendMethod === LinkPaymentSendMethod.ALL)? '': sendMethod,
|
||||||
processStatus: (sendingStatus === LinkPaymentSendingStatus.ALL)? '': sendingStatus,
|
processStatus: sendingStatus,
|
||||||
page: pageParam
|
page: pageParam
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,13 +91,13 @@ export const LinkPaymentWaitSendWrap = () => {
|
|||||||
const onClickToDownloadExcel = () => {
|
const onClickToDownloadExcel = () => {
|
||||||
downloadExcel({
|
downloadExcel({
|
||||||
mid: mid,
|
mid: mid,
|
||||||
searchCl: (searchType === LinkPaymentSearchType.ALL)? '': searchType,
|
searchCl: (searchType === LinkPaymentSearchCl.ALL)? '': searchType,
|
||||||
searchValue: searchKeyword,
|
searchValue: searchKeyword,
|
||||||
fromDate: startDate,
|
fromDate: startDate,
|
||||||
toDate: endDate,
|
toDate: endDate,
|
||||||
sendStatus: (sendingStatus === LinkPaymentSendingStatus.ALL)? '': sendingStatus, // 추후 삭제 필요
|
sendStatus: (sendingStatus === LinkPaymentSendStatus.ALL)? '': sendingStatus, // 추후 삭제 필요
|
||||||
sendMethod: (sendMethod === LinkPaymentSendMethod.ALL)? '': sendMethod,
|
sendMethod: (sendMethod === LinkPaymentSendMethod.ALL)? '': sendMethod,
|
||||||
processStatus: (sendingStatus === LinkPaymentSendingStatus.ALL)? '': sendingStatus,
|
processStatus: (sendingStatus === LinkPaymentSendStatus.ALL)? '': sendingStatus,
|
||||||
}).then((rs) => {
|
}).then((rs) => {
|
||||||
console.log('Excel Dowload Status : ' + rs.status);
|
console.log('Excel Dowload Status : ' + rs.status);
|
||||||
});
|
});
|
||||||
@@ -107,7 +107,7 @@ export const LinkPaymentWaitSendWrap = () => {
|
|||||||
setSortType(sort);
|
setSortType(sort);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickSendingStatus = (val: LinkPaymentSendingStatus) => {
|
const onClickSendingStatus = (val: LinkPaymentSendStatus) => {
|
||||||
setSendingStatus(val);
|
setSendingStatus(val);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ export const LinkPaymentWaitSendWrap = () => {
|
|||||||
filterOn={filterOn}
|
filterOn={filterOn}
|
||||||
setFilterOn={setFilterOn}
|
setFilterOn={setFilterOn}
|
||||||
mid={mid}
|
mid={mid}
|
||||||
searchType={searchType}
|
searchCl={searchType}
|
||||||
searchKeyword={searchKeyword}
|
searchKeyword={searchKeyword}
|
||||||
startDate={startDate}
|
startDate={startDate}
|
||||||
endDate={endDate}
|
endDate={endDate}
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ export const ListItem = ({
|
|||||||
}
|
}
|
||||||
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
else if (additionalServiceCategory === AdditionalServiceCategory.FundAccountResult) {
|
||||||
rs.push(
|
rs.push(
|
||||||
<div className="transaction-details">
|
<div key="fund-account-transfer" className="transaction-details">
|
||||||
<span>{getTime()}</span>
|
<span>{getTime()}</span>
|
||||||
<span className="separator">|</span>
|
<span className="separator">|</span>
|
||||||
<span>{getStatus()}</span>
|
<span>{getStatus()}</span>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export const FundAccountTransferRequestPage = () => {
|
|||||||
const isFormValid = () => {
|
const isFormValid = () => {
|
||||||
return (
|
return (
|
||||||
mid.trim() !== '' &&
|
mid.trim() !== '' &&
|
||||||
//bankCode.trim() !== '' &&
|
bankCode.trim() !== '' &&
|
||||||
accountNo.trim() !== '' &&
|
accountNo.trim() !== '' &&
|
||||||
accountName.trim() !== '' &&
|
accountName.trim() !== '' &&
|
||||||
amount > 0 &&
|
amount > 0 &&
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import moment from 'moment';
|
|||||||
import { useEffect, 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 { DefaultRequestPagination, HeaderType } from '@/entities/common/model/types';
|
||||||
import {
|
import {
|
||||||
useSetHeaderTitle,
|
useSetHeaderTitle,
|
||||||
useSetHeaderType,
|
useSetHeaderType,
|
||||||
@@ -19,31 +19,44 @@ import { useExtensionKeyinListMutation } from '@/entities/additional-service/api
|
|||||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||||
import { KeyInPaymentList } from '@/entities/additional-service/ui/key-in-payment/key-in-payment-list';
|
import { KeyInPaymentList } from '@/entities/additional-service/ui/key-in-payment/key-in-payment-list';
|
||||||
import { useStore } from '@/shared/model/store';
|
import { useStore } from '@/shared/model/store';
|
||||||
import { KeyInPaymentListItem, KeyInPaymentTransactionStatus } from '@/entities/additional-service/model/key-in/types';
|
import { KeyInPaymentListItem, KeyInPaymentPaymentStatus } from '@/entities/additional-service/model/key-in/types';
|
||||||
|
import { requestStatusBtnGroup } from '@/entities/additional-service/model/key-in/constant';
|
||||||
// contant로 옮기기
|
import useIntersectionObserver from '@/widgets/intersection-observer';
|
||||||
const requestStatusBtnGroup = [
|
|
||||||
{ name: '전체', value: KeyInPaymentTransactionStatus.ALL },
|
|
||||||
{ name: '승인', value: KeyInPaymentTransactionStatus.APPROVAL },
|
|
||||||
{ name: '전취소', value: KeyInPaymentTransactionStatus.PRE_CANCEL },
|
|
||||||
{ name: '후취소', value: KeyInPaymentTransactionStatus.POST_CANCEL }
|
|
||||||
];
|
|
||||||
|
|
||||||
export const KeyInPaymentPage = () => {
|
export const KeyInPaymentPage = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
const userMid = useStore.getState().UserStore.mid;
|
const userMid = useStore.getState().UserStore.mid;
|
||||||
|
|
||||||
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
||||||
const [listItems, setListItems] = useState({});
|
const [listItems, setListItems] = useState<Array<KeyInPaymentListItem>>([]);
|
||||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||||
|
const [nextCursor, setNextCursor] = useState<string | null>(null);
|
||||||
const [mid, setMid] = useState<string>(userMid);
|
const [mid, setMid] = useState<string>(userMid);
|
||||||
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'));
|
||||||
const [transactionStatus, setTransactionStatus] = useState<KeyInPaymentTransactionStatus>(KeyInPaymentTransactionStatus.ALL)
|
const [paymentStatus, setPaymentStatus] = useState<KeyInPaymentPaymentStatus>(KeyInPaymentPaymentStatus.ALL)
|
||||||
const [minAmount, setMinAmount] = useState<number>();
|
const [minAmount, setMinAmount] = useState<number>();
|
||||||
const [maxAmount, setMaxAmount] = useState<number>();
|
const [maxAmount, setMaxAmount] = useState<number>();
|
||||||
|
const [onActionIntersect, setOnActionIntersect] = useState<boolean>(false);
|
||||||
|
const onIntersect: IntersectionObserverCallback = (entries: Array<IntersectionObserverEntry>) => {
|
||||||
|
entries.forEach((entry: IntersectionObserverEntry) => {
|
||||||
|
if (entry.isIntersecting) {
|
||||||
|
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
|
||||||
|
if (onActionIntersect) {
|
||||||
|
callList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log('Element is no longer intersecting with the root.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const { setTarget } = useIntersectionObserver({
|
||||||
|
threshold: 1,
|
||||||
|
onIntersect
|
||||||
|
});
|
||||||
|
|
||||||
useSetHeaderTitle('KEY-IN 결제');
|
useSetHeaderTitle('KEY-IN 결제');
|
||||||
useSetHeaderType(HeaderType.LeftArrow);
|
useSetHeaderType(HeaderType.LeftArrow);
|
||||||
@@ -57,73 +70,75 @@ export const KeyInPaymentPage = () => {
|
|||||||
|
|
||||||
const callList = (option?: {
|
const callList = (option?: {
|
||||||
sortType?: SortTypeKeys,
|
sortType?: SortTypeKeys,
|
||||||
val?: string
|
status?: KeyInPaymentPaymentStatus,
|
||||||
|
resetPage?: boolean
|
||||||
}) => {
|
}) => {
|
||||||
pageParam.sortType = (option?.sortType) ? option.sortType : sortType;
|
setOnActionIntersect(false);
|
||||||
setPageParam(pageParam);
|
|
||||||
|
const currentPageParam = option?.resetPage
|
||||||
|
? { ...DEFAULT_PAGE_PARAM, sortType: option?.sortType ?? sortType }
|
||||||
|
: { ...pageParam, sortType: option?.sortType ?? sortType };
|
||||||
|
|
||||||
|
setPageParam(currentPageParam);
|
||||||
|
|
||||||
let newMinAmount = minAmount;
|
let newMinAmount = minAmount;
|
||||||
if(!!minAmount && typeof (minAmount) === 'string'){
|
if (!!minAmount && typeof (minAmount) === 'string') {
|
||||||
newMinAmount = parseInt(minAmount);
|
newMinAmount = parseInt(minAmount);
|
||||||
}
|
}
|
||||||
let newMaxAmount = maxAmount;
|
let newMaxAmount = maxAmount;
|
||||||
if(!!maxAmount && typeof (maxAmount) === 'string'){
|
if (!!maxAmount && typeof (maxAmount) === 'string') {
|
||||||
newMaxAmount = parseInt(maxAmount);
|
newMaxAmount = parseInt(maxAmount);
|
||||||
}
|
}
|
||||||
let listParams = {
|
let listParams = {
|
||||||
mid: mid,
|
mid: mid,
|
||||||
fromDate: startDate,
|
fromDate: startDate,
|
||||||
toDate: endDate,
|
toDate: endDate,
|
||||||
paymentStatus: transactionStatus,
|
paymentStatus: paymentStatus,
|
||||||
minAmount: newMinAmount,
|
minAmount: newMinAmount,
|
||||||
maxAmount: newMaxAmount,
|
maxAmount: newMaxAmount,
|
||||||
page: pageParam
|
... {
|
||||||
|
page: currentPageParam
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log('Request Info: ', listParams);
|
|
||||||
|
|
||||||
keyinList(listParams).then((rs) => {
|
keyinList(listParams).then((rs) => {
|
||||||
setListItems(assembleData(rs.content));
|
// resetPage면 기존 리스트 무시, 아니면 추가
|
||||||
|
setListItems(option?.resetPage ? rs.content : [
|
||||||
|
...listItems,
|
||||||
|
...rs.content
|
||||||
|
]);
|
||||||
|
if (rs.hasNext) {
|
||||||
|
setNextCursor(rs.nextCursor);
|
||||||
|
setPageParam({
|
||||||
|
...currentPageParam, // pageParam이 아니라 currentPageParam 사용
|
||||||
|
cursor: rs.nextCursor
|
||||||
|
});
|
||||||
|
setOnActionIntersect(true)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setNextCursor(null);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const assembleData = (content: Array<KeyInPaymentListItem>) => {
|
|
||||||
console.log('rs.content:', content);
|
|
||||||
let data: any = {};
|
|
||||||
if (content && content.length > 0) {
|
|
||||||
for(let i = 0; i < content?.length; i++){
|
|
||||||
let paymentDate = content[i]?.paymentDate?.substring(0, 8);
|
|
||||||
let groupDate = moment(paymentDate).format('YYYYMMDD');
|
|
||||||
if(!!groupDate && !data.hasOwnProperty(groupDate)){
|
|
||||||
data[groupDate] = [];
|
|
||||||
}
|
|
||||||
if(!!groupDate && data.hasOwnProperty(groupDate)){
|
|
||||||
data[groupDate].push(content[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log('Data : ', data);
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const onClickToOpenFilter = () => {
|
const onClickToOpenFilter = () => {
|
||||||
setFilterOn(!filterOn);
|
setFilterOn(!filterOn);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickToDownloadExcel = () => {
|
const onClickToDownloadExcel = () => {
|
||||||
let newMinAmount = minAmount;
|
let newMinAmount = minAmount;
|
||||||
if(!!minAmount && typeof (minAmount) === 'string'){
|
if (!!minAmount && typeof (minAmount) === 'string') {
|
||||||
newMinAmount = parseInt(minAmount);
|
newMinAmount = parseInt(minAmount);
|
||||||
}
|
}
|
||||||
let newMaxAmount = maxAmount;
|
let newMaxAmount = maxAmount;
|
||||||
if(!!maxAmount && typeof (maxAmount) === 'string'){
|
if (!!maxAmount && typeof (maxAmount) === 'string') {
|
||||||
newMaxAmount = parseInt(maxAmount);
|
newMaxAmount = parseInt(maxAmount);
|
||||||
}
|
}
|
||||||
downloadExcel({
|
downloadExcel({
|
||||||
mid: mid,
|
mid: mid,
|
||||||
fromDate: startDate,
|
fromDate: startDate,
|
||||||
toDate: endDate,
|
toDate: endDate,
|
||||||
paymentStatus: transactionStatus,
|
paymentStatus: paymentStatus,
|
||||||
minAmount: newMinAmount,
|
minAmount: newMinAmount,
|
||||||
maxAmount: newMaxAmount
|
maxAmount: newMaxAmount
|
||||||
}).then((rs) => {
|
}).then((rs) => {
|
||||||
@@ -133,16 +148,19 @@ export const KeyInPaymentPage = () => {
|
|||||||
|
|
||||||
const onClickToSort = (sort: SortTypeKeys) => {
|
const onClickToSort = (sort: SortTypeKeys) => {
|
||||||
setSortType(sort);
|
setSortType(sort);
|
||||||
|
setListItems([]);
|
||||||
callList({
|
callList({
|
||||||
sortType: sort
|
sortType: sort,
|
||||||
|
resetPage: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickToTransactionStatus = (val: KeyInPaymentTransactionStatus) => {
|
const onClickToPaymentStatus = (val: KeyInPaymentPaymentStatus) => {
|
||||||
console.log('TransactionStatus Test: ', val);
|
setPaymentStatus(val);
|
||||||
setTransactionStatus(val);
|
setListItems([]);
|
||||||
callList({
|
callList({
|
||||||
val: val
|
status: val,
|
||||||
|
resetPage: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -190,8 +208,8 @@ export const KeyInPaymentPage = () => {
|
|||||||
|
|
||||||
<div className="filter-section">
|
<div className="filter-section">
|
||||||
<SortTypeBox
|
<SortTypeBox
|
||||||
sortType={ sortType }
|
sortType={sortType}
|
||||||
onClickToSort={ onClickToSort }
|
onClickToSort={onClickToSort}
|
||||||
></SortTypeBox>
|
></SortTypeBox>
|
||||||
<div className="excrow">
|
<div className="excrow">
|
||||||
<div className="full-menu-keywords no-padding">
|
<div className="full-menu-keywords no-padding">
|
||||||
@@ -199,8 +217,8 @@ export const KeyInPaymentPage = () => {
|
|||||||
requestStatusBtnGroup.map((value, index) => (
|
requestStatusBtnGroup.map((value, index) => (
|
||||||
<span
|
<span
|
||||||
key={`key-service-code=${index}`}
|
key={`key-service-code=${index}`}
|
||||||
className={`keyword-tag ${(transactionStatus === value.value) ? 'active' : ''}`}
|
className={`keyword-tag ${(paymentStatus === value.value) ? 'active' : ''}`}
|
||||||
onClick={() => onClickToTransactionStatus(value.value)}
|
onClick={() => onClickToPaymentStatus(value.value)}
|
||||||
>{value.name}</span>
|
>{value.name}</span>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
@@ -211,6 +229,7 @@ export const KeyInPaymentPage = () => {
|
|||||||
listItems={listItems}
|
listItems={listItems}
|
||||||
additionalServiceCategory={AdditionalServiceCategory.KeyInPayment}
|
additionalServiceCategory={AdditionalServiceCategory.KeyInPayment}
|
||||||
mid={mid}
|
mid={mid}
|
||||||
|
setTarget={setTarget}
|
||||||
></KeyInPaymentList>
|
></KeyInPaymentList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -221,13 +240,13 @@ export const KeyInPaymentPage = () => {
|
|||||||
mid={mid}
|
mid={mid}
|
||||||
startDate={startDate}
|
startDate={startDate}
|
||||||
endDate={endDate}
|
endDate={endDate}
|
||||||
transactionStatus={transactionStatus}
|
transactionStatus={paymentStatus}
|
||||||
minAmount={minAmount}
|
minAmount={minAmount}
|
||||||
maxAmount={maxAmount}
|
maxAmount={maxAmount}
|
||||||
setMid={setMid}
|
setMid={setMid}
|
||||||
setStartDate={setStartDate}
|
setStartDate={setStartDate}
|
||||||
setEndDate={setEndDate}
|
setEndDate={setEndDate}
|
||||||
setTransactionStatus={setTransactionStatus}
|
setTransactionStatus={setPaymentStatus}
|
||||||
setMinAmount={setMinAmount}
|
setMinAmount={setMinAmount}
|
||||||
setMaxAmount={setMaxAmount}
|
setMaxAmount={setMaxAmount}
|
||||||
></KeyInPaymentFilter>
|
></KeyInPaymentFilter>
|
||||||
|
|||||||
Reference in New Issue
Block a user