refactor(nestjs): wip

This commit is contained in:
Ahmed Bouhuolia
2025-05-28 21:32:48 +02:00
parent c51347d3ec
commit 66a2261e50
32 changed files with 206 additions and 70 deletions

View File

@@ -159,7 +159,7 @@ export function usePaymentReceive(id, props) {
[t.PAYMENT_RECEIVE, id],
{ method: 'get', url: `payments-received/${id}` },
{
select: (res) => res.data.payment_receive,
select: (res) => res.data,
defaultData: {},
...props,
},
@@ -176,7 +176,7 @@ export function usePaymentReceiveEditPage(id, props) {
{ method: 'get', url: `payments-received/${id}/edit-page` },
{
select: (res) => ({
paymentReceive: res.data.payment_receive,
paymentReceive: res.data,
entries: res.data.entries,
}),
defaultData: {
@@ -231,7 +231,7 @@ export function usePaymentReceiveSMSDetail(
...requestProps,
},
{
select: (res) => res.data.data,
select: (res) => res.data,
defaultData: {},
...props,
},
@@ -336,7 +336,7 @@ export function usePaymentReceivedMailState(
() =>
apiRequest
.get(`payments-received/${paymentReceiveId}/mail`)
.then((res) => transformToCamelCase(res.data?.data)),
.then((res) => transformToCamelCase(res.data)),
);
}
@@ -360,7 +360,7 @@ export function usePaymentReceivedState(
() =>
apiRequest
.get('/payments-received/state')
.then((res) => transformToCamelCase(res.data?.data)),
.then((res) => transformToCamelCase(res.data)),
{
...options,
},