통합거래조회 UI api

This commit is contained in:
focp212@naver.com
2025-09-11 13:40:21 +09:00
parent 409a711b9a
commit 1b4af7a82f
27 changed files with 1056 additions and 390 deletions

View File

@@ -1,10 +1,11 @@
import moment from 'moment';
import { useEffect, useState } from 'react';
import { useStore } from '@/shared/model/store';
import { IMAGE_ROOT } from '@/shared/constants/common';
import { PATHS } from '@/shared/constants/paths';
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
import { BillingList } from '@/entities/transaction/ui/billing-list';
import { ListItem, TransactionCategory, SortByKeys } from '@/entities/transaction/model/types';
import { BillingListItem, TransactionCategory, SortByKeys } from '@/entities/transaction/model/types';
import { useBillingListMutation } from '@/entities/transaction/api/use-billing-list-mutation';
import { useDownloadExcelMutation } from '@/entities/transaction/api/use-download-excel-mutation';
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constants';
@@ -27,6 +28,7 @@ const serviceCodes = [
export const BillingListPage = () => {
const { navigate } = useNavigate();
const userInfo = useStore((state) => state.UserStore.UserInfo);
const [selectedServiceCode, setSelectedServiceCode] = useState<string>('all');
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
@@ -69,12 +71,11 @@ export const BillingListPage = () => {
});
}
const assembleData = (content: Array<ListItem>) => {
const assembleData = (content: Array<BillingListItem>) => {
let data: any = {};
if(content && content.length > 0){
for(let i=0;i<content?.length;i++){
let stateDate = content[i]?.stateDate;
let groupDate = stateDate?.substring(0, 8);
let groupDate = moment(content[i]?.transactionDateTime).format('YYYYMMDD');
if(!!groupDate && !data.hasOwnProperty(groupDate)){
data[groupDate] = [];
}