fix(v1:Loads): companyId -> company and carrierId -> carrier

This commit is contained in:
Josepablo C
2024-08-15 16:46:03 -06:00
parent 07820bbb1d
commit 1f90a9e8b9

View File

@@ -13,8 +13,8 @@ const generic = new GenericHandler( Model, null, populate_list );
function getAndFilterList( query ){
const filter_list = [];
const {
companyId,
carrierId,
company,
carrier,
vehicle,
driver,
status,
@@ -29,8 +29,8 @@ function getAndFilterList( query ){
shipment_code
} = query;
if( companyId ){ filter_list.push( { company : companyId } ); }
if( carrierId ){ filter_list.push( { carrier : carrierId } ); }
if( company ){ filter_list.push( { company } ); }
if( carrier ){ filter_list.push( { carrier } ); }
if( vehicle ){ filter_list.push( { vehicle } ); }
if( driver ){ filter_list.push( { driver } ); }
if( status ){ filter_list.push( { status } ); }