mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
refactor(FE): Rename customer_id to customer_ids in API and UI
This commit is contained in:
@@ -163,7 +163,7 @@ const CustomerPaymentTab = () => {
|
|||||||
isSubmitted
|
isSubmitted
|
||||||
? () => {
|
? () => {
|
||||||
const params = {
|
const params = {
|
||||||
customer_id:
|
customer_ids:
|
||||||
filterCustomer.length > 0
|
filterCustomer.length > 0
|
||||||
? filterCustomer.map((v) => String(v.value)).join(',')
|
? filterCustomer.map((v) => String(v.value)).join(',')
|
||||||
: undefined,
|
: undefined,
|
||||||
@@ -184,7 +184,7 @@ const CustomerPaymentTab = () => {
|
|||||||
: null,
|
: null,
|
||||||
([, params]) =>
|
([, params]) =>
|
||||||
FinanceApi.getCustomerPaymentReport(
|
FinanceApi.getCustomerPaymentReport(
|
||||||
params.customer_id,
|
params.customer_ids,
|
||||||
undefined, // TODO: Change to params.sales_id when BE is ready
|
undefined, // TODO: Change to params.sales_id when BE is ready
|
||||||
undefined, // TODO: Change to params.filter_by when BE is ready
|
undefined, // TODO: Change to params.filter_by when BE is ready
|
||||||
params.start_date,
|
params.start_date,
|
||||||
@@ -207,7 +207,7 @@ const CustomerPaymentTab = () => {
|
|||||||
CustomerPaymentReport[] | null
|
CustomerPaymentReport[] | null
|
||||||
> => {
|
> => {
|
||||||
const params = {
|
const params = {
|
||||||
customer_id:
|
customer_ids:
|
||||||
filterCustomer.length > 0
|
filterCustomer.length > 0
|
||||||
? filterCustomer.map((v) => String(v.value)).join(',')
|
? filterCustomer.map((v) => String(v.value)).join(',')
|
||||||
: undefined,
|
: undefined,
|
||||||
@@ -223,7 +223,7 @@ const CustomerPaymentTab = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const response = await FinanceApi.getCustomerPaymentReport(
|
const response = await FinanceApi.getCustomerPaymentReport(
|
||||||
params.customer_id,
|
params.customer_ids,
|
||||||
undefined, // TODO: Change to params.sales_id when BE is ready
|
undefined, // TODO: Change to params.sales_id when BE is ready
|
||||||
undefined, // TODO: Change to params.filter_by when BE is ready
|
undefined, // TODO: Change to params.filter_by when BE is ready
|
||||||
params.start_date,
|
params.start_date,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export class FinanceApiService extends BaseApiService<
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getCustomerPaymentReport(
|
async getCustomerPaymentReport(
|
||||||
customer_id?: string,
|
customer_ids?: string,
|
||||||
// TODO: Uncomment when BE is ready
|
// TODO: Uncomment when BE is ready
|
||||||
// sales_id?: string,
|
// sales_id?: string,
|
||||||
// filter_by?: 'do_date',
|
// filter_by?: 'do_date',
|
||||||
@@ -28,7 +28,7 @@ export class FinanceApiService extends BaseApiService<
|
|||||||
{
|
{
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: {
|
params: {
|
||||||
customer_id: customer_id,
|
customer_ids: customer_ids,
|
||||||
// TODO: Uncomment when BE is ready
|
// TODO: Uncomment when BE is ready
|
||||||
// sales_id: sales_id,
|
// sales_id: sales_id,
|
||||||
// filter_by: filter_by,
|
// filter_by: filter_by,
|
||||||
|
|||||||
Reference in New Issue
Block a user