diff --git a/v1/src/apps/private/loads/services.js b/v1/src/apps/private/loads/services.js index 7d790e8..50d316a 100644 --- a/v1/src/apps/private/loads/services.js +++ b/v1/src/apps/private/loads/services.js @@ -111,10 +111,12 @@ async function findCalendarLoads( userId, companyId, query ){ "createdAt", "shipment_code", "est_loading_date", - "est_unloading_date" + "est_unloading_date", + "shipper_warehouse" ]; const { date, load_status , $sort } = query; const { global } = query; + const { shipper_warehouse } = query; if( ! date ){ throw "Date field is required"; @@ -152,6 +154,10 @@ async function findCalendarLoads( userId, companyId, query ){ andFilterList.push( { load_status } ) } + if( shipper_warehouse ){ + andFilterList.push( { shipper_warehouse } ) + } + const filter = { $and : andFilterList, };