refactoring(payment receive): payment receive.

This commit is contained in:
elforjani3
2021-03-06 21:07:43 +02:00
parent 51059bc277
commit 11d688b980
9 changed files with 93 additions and 45 deletions

View File

@@ -33,7 +33,7 @@ export function usePaymentReceives(query, props) {
},
filterMeta: {},
}),
}
};
}
/**
@@ -118,20 +118,15 @@ export function usePaymentReceive(id, props) {
{
select: (res) => ({
paymentReceive: res.data.payment_receive,
receivableEntries: res.data.receivable_entries,
}),
...props
...props,
},
);
return {
...states,
data: defaultTo(states.data, {
paymentReceive: {},
receivableInvoices: {},
paymentInvoices: {}
}),
}
data: defaultTo(states.data, {}),
};
}
/**
@@ -158,6 +153,6 @@ export function usePaymentReceiveEditPage(id, props) {
data: defaultTo(states.data, {
paymentReceive: {},
entries: [],
})
}
}),
};
}