fix(v1:proposals): Adding shipper/carrier as query
This commit is contained in:
@@ -20,8 +20,20 @@ const generic = new GenericHandler( Model, null, populate_list );
|
|||||||
|
|
||||||
function getAndFilterList( query ){
|
function getAndFilterList( query ){
|
||||||
const filter_list = [];
|
const filter_list = [];
|
||||||
const { load, categories, branch_name, phone, city, state, truck_type } = query;
|
const {
|
||||||
|
shipper,
|
||||||
|
carrier,
|
||||||
|
load,
|
||||||
|
categories,
|
||||||
|
branch_name,
|
||||||
|
phone,
|
||||||
|
city,
|
||||||
|
state,
|
||||||
|
truck_type
|
||||||
|
} = query;
|
||||||
|
|
||||||
|
if( shipper ) { filter_list.push({ shipper }); }
|
||||||
|
if( carrier ) { filter_list.push({ carrier }); }
|
||||||
if( load ) { filter_list.push({ load }); }
|
if( load ) { filter_list.push({ load }); }
|
||||||
if( categories ) { filter_list.push({ categories }); }
|
if( categories ) { filter_list.push({ categories }); }
|
||||||
if( branch_name ) { filter_list.push({ branch_name }); }
|
if( branch_name ) { filter_list.push({ branch_name }); }
|
||||||
|
|||||||
Reference in New Issue
Block a user