페이징 처리 조건 수정
This commit is contained in:
@@ -107,12 +107,13 @@ export const ArsListPage = () => {
|
||||
else{
|
||||
setListItems(rs.content);
|
||||
}
|
||||
if(rs.hasNext){
|
||||
if(rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: rs.nextCursor }
|
||||
});
|
||||
setOnActionIntersect(true);
|
||||
}
|
||||
else{
|
||||
setPageParam({
|
||||
@@ -120,6 +121,10 @@ export const ArsListPage = () => {
|
||||
...{ cursor: null }
|
||||
});
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -229,7 +234,7 @@ export const ArsListPage = () => {
|
||||
return (
|
||||
<>
|
||||
<main>
|
||||
<div className="tab-content">
|
||||
<div className="tab-content pb-86">
|
||||
<div className="tab-pane sub active">
|
||||
<section className="summary-section">
|
||||
<div className="credit-controls">
|
||||
@@ -286,16 +291,16 @@ export const ArsListPage = () => {
|
||||
|
||||
<section className="transaction-list">
|
||||
{ getListDateGroup() }
|
||||
<div ref={ setTarget }></div>
|
||||
</section>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={() => onClickToNavigate()}
|
||||
>결제 신청</button>
|
||||
</div>
|
||||
<div ref={ setTarget }></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={() => onClickToNavigate()}
|
||||
>결제 신청</button>
|
||||
</div>
|
||||
</main>
|
||||
<ArsFilter
|
||||
filterOn={filterOn}
|
||||
|
||||
@@ -103,12 +103,13 @@ export const KeyInPaymentPage = () => {
|
||||
else{
|
||||
setListItems(rs.content);
|
||||
}
|
||||
if(rs.hasNext){
|
||||
if(rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: rs.nextCursor }
|
||||
});
|
||||
setOnActionIntersect(true);
|
||||
}
|
||||
else{
|
||||
setPageParam({
|
||||
@@ -116,6 +117,10 @@ export const KeyInPaymentPage = () => {
|
||||
...{ cursor: null }
|
||||
});
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -115,12 +115,13 @@ export const PayoutListPage = () => {
|
||||
else{
|
||||
setListItems(rs.content);
|
||||
}
|
||||
if(rs.hasNext){
|
||||
if(rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: rs.nextCursor }
|
||||
});
|
||||
setOnActionIntersect(true);
|
||||
}
|
||||
else{
|
||||
setPageParam({
|
||||
@@ -128,6 +129,10 @@ export const PayoutListPage = () => {
|
||||
...{ cursor: null }
|
||||
});
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -75,12 +75,13 @@ export const FaqListPage = () => {
|
||||
else{
|
||||
setResultList(rs.content);
|
||||
}
|
||||
if(rs.hasNext){
|
||||
if(rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: rs.nextCursor }
|
||||
});
|
||||
setOnActionIntersect(true);
|
||||
}
|
||||
else{
|
||||
setPageParam({
|
||||
@@ -88,6 +89,10 @@ export const FaqListPage = () => {
|
||||
...{ cursor: null }
|
||||
});
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -75,12 +75,13 @@ export const NoticeListPage = () => {
|
||||
else{
|
||||
setResultList(rs.content);
|
||||
}
|
||||
if(rs.hasNext){
|
||||
if(rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: rs.nextCursor }
|
||||
});
|
||||
setOnActionIntersect(true);
|
||||
}
|
||||
else{
|
||||
setPageParam({
|
||||
@@ -88,6 +89,10 @@ export const NoticeListPage = () => {
|
||||
...{ cursor: null }
|
||||
});
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -77,12 +77,13 @@ export const QnaListPage = () => {
|
||||
else{
|
||||
setResultList(rs.content);
|
||||
}
|
||||
if(rs.hasNext){
|
||||
if(rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: rs.nextCursor }
|
||||
});
|
||||
setOnActionIntersect(true);
|
||||
}
|
||||
else{
|
||||
setPageParam({
|
||||
@@ -90,6 +91,10 @@ export const QnaListPage = () => {
|
||||
...{ cursor: null }
|
||||
});
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ export const AllTransactionListPage = () => {
|
||||
const [dateCl, setDateCl] = useState<string>('');
|
||||
const [goodsName, setGoodsName] = useState<string>('');
|
||||
// const [fromDate, setFromDate] = useState(moment().subtract(1, 'month').format('YYYYMMDD'));
|
||||
const [fromDate, setFromDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [fromDate, setFromDate] = useState(moment().subtract(2, 'year').format('YYYYMMDD'));
|
||||
const [toDate, setToDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [statusCode, setStatusCode] = useState<string>('');
|
||||
const [serviceCode, setServiceCode] = useState<string>('01');
|
||||
@@ -135,12 +135,13 @@ export const AllTransactionListPage = () => {
|
||||
else{
|
||||
setListItems(rs.content);
|
||||
}
|
||||
if(rs.hasNext){
|
||||
if(rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: rs.nextCursor }
|
||||
});
|
||||
setOnActionIntersect(true);
|
||||
}
|
||||
else{
|
||||
setPageParam({
|
||||
@@ -148,6 +149,10 @@ export const AllTransactionListPage = () => {
|
||||
...{ cursor: null }
|
||||
});
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
allTransactionListSummary(listSummaryParams).then((rs: AllTransactionListSummaryResponse) => {
|
||||
setTotalAmount(rs.totalAmount);
|
||||
|
||||
@@ -34,8 +34,7 @@ import useIntersectionObserver from '@/widgets/intersection-observer';
|
||||
export const BillingListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
const userInfo = useStore((state) => state.UserStore.userInfo);
|
||||
|
||||
|
||||
const [onActionIntersect, setOnActionIntersect] = useState<boolean>(false);
|
||||
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
||||
const [listItems, setListItems] = useState<Array<ListItemProps>>([]);
|
||||
@@ -115,19 +114,24 @@ export const BillingListPage = () => {
|
||||
else{
|
||||
setListItems(rs.content);
|
||||
}
|
||||
if(rs.hasNext){
|
||||
if(rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: rs.nextCursor }
|
||||
});
|
||||
setOnActionIntersect(true);
|
||||
}
|
||||
else{
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: null }
|
||||
});
|
||||
}
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -123,12 +123,13 @@ export const CashReceiptListPage = () => {
|
||||
else{
|
||||
setListItems(rs.content);
|
||||
}
|
||||
if(rs.hasNext){
|
||||
if(rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: rs.nextCursor }
|
||||
});
|
||||
setOnActionIntersect(true);
|
||||
}
|
||||
else{
|
||||
setPageParam({
|
||||
@@ -136,6 +137,10 @@ export const CashReceiptListPage = () => {
|
||||
...{ cursor: null }
|
||||
});
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
cashReceiptSummary(listSummaryParams).then((rs: CashReceiptSummaryResponse) => {
|
||||
setApprovalCount(rs.approvalCount);
|
||||
|
||||
@@ -98,9 +98,38 @@ export const EscrowListPage = () => {
|
||||
...{ sortType: sortType }
|
||||
}
|
||||
};
|
||||
if(type !== 'page' && listParams.page){
|
||||
listParams.page.cursor = null;
|
||||
}
|
||||
|
||||
escrowList(listParams).then((rs: EscrowListResponse) => {
|
||||
setListItems(rs.content);
|
||||
if(type === 'page'){
|
||||
setListItems([
|
||||
...listItems,
|
||||
...rs.content
|
||||
]);
|
||||
}
|
||||
else{
|
||||
setListItems(rs.content);
|
||||
}
|
||||
if(rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
){
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: rs.nextCursor }
|
||||
});
|
||||
}
|
||||
else{
|
||||
setPageParam({
|
||||
...pageParam,
|
||||
...{ cursor: null }
|
||||
});
|
||||
}
|
||||
setOnActionIntersect(
|
||||
!!rs.hasNext
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user