sort 구조 변경

This commit is contained in:
focp212@naver.com
2025-10-24 16:49:46 +09:00
parent c0c983be1a
commit 8e27c42a2d
6 changed files with 35 additions and 107 deletions

View File

@@ -34,25 +34,22 @@ export const ListWrap = () => {
const { mutateAsync: vatReturnList } = useVatReturnListMutation();
const callList = (option?: {
sortType?: SortTypeKeys
}) => {
const callList = () => {
let params: VatReturnListParams = {
mid: mid,
startMonth: startMonth,
endMonth: endMonth,
receiptType: receiptType,
targetType: targetType,
page: pageParam
page: {
...pageParam,
...{ sortType: sortType }
}
};
if(params.page){
params.page.sortType = option?.sortType || sortType;
setPageParam(params.page);
}
vatReturnList(params).then((rs: VatReturnListResponse) => {
setListItems(rs.content);
});
};
const onClickToOpenFIlter = () => {
@@ -72,7 +69,7 @@ export const ListWrap = () => {
callList();
}, [
mid, startMonth, endMonth,
receiptType, targetType
receiptType, targetType, sortType
]);
const getListDateGroup = () => {