This commit is contained in:
focp212@naver.com
2025-10-29 15:51:51 +09:00
parent b0caff51e8
commit 777521a960
11 changed files with 106 additions and 16 deletions

View File

@@ -10,11 +10,20 @@ import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
import { getHeaderUserAgent } from '@/shared/constants/url';
export const allTransactionCancelInfo = (params: AllTransactionCancelInfoParams) => {
let headerOptions = {
menuId: 31,
apiType: 'SELECT'
};
let options = {
headers: {
'X-User-Agent': getHeaderUserAgent(headerOptions)
}
};
return resultify(
axios.post<AllTransactionCancelInfoResponse>(API_URL_TRANSACTION.allTransactionCancelInfo(), params),
axios.post<AllTransactionCancelInfoResponse>(API_URL_TRANSACTION.allTransactionCancelInfo(), params, options),
);
};

View File

@@ -10,10 +10,20 @@ import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
import { getHeaderUserAgent } from '@/shared/constants/url';
export const allTransactionCancel = (params: AllTransactionCancelParams) => {
let headerOptions = {
menuId: 31,
apiType: 'SELECT'
};
let options = {
headers: {
'X-User-Agent': getHeaderUserAgent(headerOptions)
}
};
return resultify(
axios.post<AllTransactionCancelResponse>(API_URL_TRANSACTION.allTransactionCancel(), params),
axios.post<AllTransactionCancelResponse>(API_URL_TRANSACTION.allTransactionCancel(), params, options),
);
};

View File

@@ -10,10 +10,20 @@ import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
import { getHeaderUserAgent } from '@/shared/constants/url';
export const allTransactionDetail = (params: AllTransactionDetailParams) => {
let headerOptions = {
menuId: 31,
apiType: 'SELECT'
};
let options = {
headers: {
'X-User-Agent': getHeaderUserAgent(headerOptions)
}
};
return resultify(
axios.post<DetailResponse>(API_URL_TRANSACTION.allTransactionDetail(), params),
axios.post<DetailResponse>(API_URL_TRANSACTION.allTransactionDetail(), params, options),
);
};

View File

@@ -10,11 +10,20 @@ import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
import { getHeaderUserAgent } from '@/shared/constants/url';
export const allTransactionList = (params: AllTransactionListParams) => {
//axios.AxiosHeaders[]
let headerOptions = {
menuId: 31,
apiType: 'SELECT'
};
let options = {
headers: {
'X-User-Agent': getHeaderUserAgent(headerOptions)
}
};
return resultify(
axios.post<AllTransactionListResponse>(API_URL_TRANSACTION.allTransactionList(), params),
axios.post<AllTransactionListResponse>(API_URL_TRANSACTION.allTransactionList(), params, options),
);
};

View File

@@ -10,10 +10,20 @@ import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
import { getHeaderUserAgent } from '@/shared/constants/url';
export const allTransactionListSummary = (params: AllTransactionListSummaryParams) => {
let headerOptions = {
menuId: 31,
apiType: 'SELECT'
};
let options = {
headers: {
'X-User-Agent': getHeaderUserAgent(headerOptions)
}
};
return resultify(
axios.post<AllTransactionListSummaryResponse>(API_URL_TRANSACTION.allTransactionListSummary(), params),
axios.post<AllTransactionListSummaryResponse>(API_URL_TRANSACTION.allTransactionListSummary(), params, options),
);
};

View File

@@ -10,10 +10,20 @@ import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
import { getHeaderUserAgent } from '@/shared/constants/url';
export const cashReceiptDetail = (params: CashReceiptDetailParams) => {
let headerOptions = {
menuId: 32,
apiType: 'SELECT'
};
let options = {
headers: {
'X-User-Agent': getHeaderUserAgent(headerOptions)
}
};
return resultify(
axios.post<DetailResponse>(API_URL_TRANSACTION.cashReceiptDetail(), params),
axios.post<DetailResponse>(API_URL_TRANSACTION.cashReceiptDetail(), params, options),
);
};

View File

@@ -10,10 +10,20 @@ import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
import { getHeaderUserAgent } from '@/shared/constants/url';
export const cashReceiptList = (params: CashReceiptListParams) => {
let headerOptions = {
menuId: 32,
apiType: 'SELECT'
};
let options = {
headers: {
'X-User-Agent': getHeaderUserAgent(headerOptions)
}
};
return resultify(
axios.post<CashReceiptListResponse>(API_URL_TRANSACTION.cashReceiptList(), params),
axios.post<CashReceiptListResponse>(API_URL_TRANSACTION.cashReceiptList(), params, options),
);
};

View File

@@ -10,10 +10,20 @@ import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
import { getHeaderUserAgent } from '@/shared/constants/url';
export const cashReceiptManualIssue = (params: CashReceiptManualIssueParams) => {
let headerOptions = {
menuId: 32,
apiType: 'INSERT'
};
let options = {
headers: {
'X-User-Agent': getHeaderUserAgent(headerOptions)
}
};
return resultify(
axios.post<CashReceiptManualIssueResponse>(API_URL_TRANSACTION.cashReceiptManualIssue(), params),
axios.post<CashReceiptManualIssueResponse>(API_URL_TRANSACTION.cashReceiptManualIssue(), params, options),
);
};

View File

@@ -10,10 +10,20 @@ import {
useMutation,
UseMutationOptions
} from '@tanstack/react-query';
import { getHeaderUserAgent } from '@/shared/constants/url';
export const cashReceiptPurposeUpdate = (params: CashReceiptPurposeUpdateParams) => {
let headerOptions = {
menuId: 32,
apiType: 'UPDATE'
};
let options = {
headers: {
'X-User-Agent': getHeaderUserAgent(headerOptions)
}
};
return resultify(
axios.post<CashReceiptPurposeUpdateResponse>(API_URL_TRANSACTION.cashReceiptPurposeUpdate(), params),
axios.post<CashReceiptPurposeUpdateResponse>(API_URL_TRANSACTION.cashReceiptPurposeUpdate(), params, options),
);
};