mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE-363): Send joined filter params to logistic report API
This commit is contained in:
@@ -211,19 +211,19 @@ const PurchasesPerSupplierTab = () => {
|
||||
const params = {
|
||||
area_id:
|
||||
tableFilterState.area_id.length > 0
|
||||
? tableFilterState.area_id
|
||||
? tableFilterState.area_id.join(',')
|
||||
: undefined,
|
||||
supplier_id:
|
||||
tableFilterState.supplier_id.length > 0
|
||||
? tableFilterState.supplier_id
|
||||
? tableFilterState.supplier_id.join(',')
|
||||
: undefined,
|
||||
product_id:
|
||||
tableFilterState.product_id.length > 0
|
||||
? tableFilterState.product_id
|
||||
? tableFilterState.product_id.join(',')
|
||||
: undefined,
|
||||
product_category_id:
|
||||
tableFilterState.product_category_id.length > 0
|
||||
? tableFilterState.product_category_id
|
||||
? tableFilterState.product_category_id.join(',')
|
||||
: undefined,
|
||||
received_date:
|
||||
tableFilterState.filter_by === 'received_date'
|
||||
@@ -281,19 +281,19 @@ const PurchasesPerSupplierTab = () => {
|
||||
const params = {
|
||||
area_id:
|
||||
tableFilterState.area_id.length > 0
|
||||
? tableFilterState.area_id
|
||||
? tableFilterState.area_id.join(',')
|
||||
: undefined,
|
||||
supplier_id:
|
||||
tableFilterState.supplier_id.length > 0
|
||||
? tableFilterState.supplier_id
|
||||
? tableFilterState.supplier_id.join(',')
|
||||
: undefined,
|
||||
product_id:
|
||||
tableFilterState.product_id.length > 0
|
||||
? tableFilterState.product_id
|
||||
? tableFilterState.product_id.join(',')
|
||||
: undefined,
|
||||
product_category_id:
|
||||
tableFilterState.product_category_id.length > 0
|
||||
? tableFilterState.product_category_id
|
||||
? tableFilterState.product_category_id.join(',')
|
||||
: undefined,
|
||||
received_date:
|
||||
tableFilterState.filter_by === 'received_date'
|
||||
|
||||
@@ -12,10 +12,10 @@ export class LogisticApiService extends BaseApiService<
|
||||
}
|
||||
|
||||
async getLogisticPurchasePerSupplierReport(
|
||||
area_id?: string[],
|
||||
supplier_id?: string[],
|
||||
product_id?: string[],
|
||||
product_category_id?: string[],
|
||||
area_id?: string,
|
||||
supplier_id?: string,
|
||||
product_id?: string,
|
||||
product_category_id?: string,
|
||||
received_date?: string,
|
||||
po_date?: string,
|
||||
start_date?: string,
|
||||
@@ -30,19 +30,10 @@ export class LogisticApiService extends BaseApiService<
|
||||
>(`purchase-supplier`, {
|
||||
method: 'GET',
|
||||
params: {
|
||||
area_id: area_id && area_id.length > 0 ? area_id.join(',') : undefined,
|
||||
supplier_id:
|
||||
supplier_id && supplier_id.length > 0
|
||||
? supplier_id.join(',')
|
||||
: undefined,
|
||||
product_id:
|
||||
product_id && product_id.length > 0
|
||||
? product_id.join(',')
|
||||
: undefined,
|
||||
product_category_id:
|
||||
product_category_id && product_category_id.length > 0
|
||||
? product_category_id.join(',')
|
||||
: undefined,
|
||||
area_id: area_id,
|
||||
supplier_id: supplier_id,
|
||||
product_id: product_id,
|
||||
product_category_id: product_category_id,
|
||||
received_date: received_date,
|
||||
po_date: po_date,
|
||||
start_date: start_date,
|
||||
|
||||
Reference in New Issue
Block a user