From 41ae6354fa80e3adfe69fd779e68a081bed13913 Mon Sep 17 00:00:00 2001 From: Josepablo C Date: Tue, 13 Aug 2024 21:22:38 -0600 Subject: [PATCH] fix(v1:vehicles): Adding is_available filter --- v1/README.md | 1 + v1/src/apps/private/vehicles/services.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/v1/README.md b/v1/README.md index 5ef2244..44c460a 100644 --- a/v1/README.md +++ b/v1/README.md @@ -433,6 +433,7 @@ Work In Progress __This endpoint is only valid for carriers.__ - `GET /find` : Find a list of elements (from the company it self only) with any of the following fields: + - is_available, - categories, - active_load, - load_shipper, diff --git a/v1/src/apps/private/vehicles/services.js b/v1/src/apps/private/vehicles/services.js index ff12d54..5ebfeed 100644 --- a/v1/src/apps/private/vehicles/services.js +++ b/v1/src/apps/private/vehicles/services.js @@ -12,6 +12,7 @@ function getAndFilterList( query ){ const filter_list = []; const { company, + is_available, categories, active_load, load_shipper, @@ -29,6 +30,7 @@ function getAndFilterList( query ){ } = query; if( company ) { filter_list.push({ company }); } + if( is_available ) { filter_list.push({ is_available }); } if( categories ) { filter_list.push({ categories }); } if( active_load ) { filter_list.push({ active_load }); } if( load_shipper ) { filter_list.push({ load_shipper }); }