fix(loads/proposals): when proposal changes vehicle, active load is removed from vehicle
fix(loads): Populate vehicle.categories + vehicle.notes in find request
This commit is contained in:
@@ -23,7 +23,9 @@ const vehicle_projection = [
|
||||
'circulation_serial_number',
|
||||
'trailer_plate_1',
|
||||
'trailer_plate_2',
|
||||
'notes',
|
||||
'city',
|
||||
'available_in'
|
||||
];
|
||||
const user_projection = ['first_name','last_name','middle_name'];
|
||||
const populate_list = [
|
||||
@@ -33,7 +35,7 @@ const populate_list = [
|
||||
'origin_warehouse',
|
||||
'destination_warehouse',
|
||||
{path:'carrier',select: carrier_projection },
|
||||
{path:'vehicle',select: vehicle_projection },
|
||||
{path:'vehicle',select: vehicle_projection, populate : { path : 'categories' } },
|
||||
{path:'driver',select: user_projection },
|
||||
{path:'bidder',select: user_projection },
|
||||
];
|
||||
@@ -164,8 +166,6 @@ async function findLoads( query ){
|
||||
filter = null;
|
||||
}
|
||||
|
||||
console.log( andFilterList );
|
||||
|
||||
const { total , limit, skip, data } = await generic.getList( page , elements, filter, null, $sort );
|
||||
|
||||
const load_list = data;
|
||||
|
||||
Reference in New Issue
Block a user