Staging #1663

Merged
korina.cordero merged 16 commits from staging into master 2023-02-09 10:19:34 +00:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit cbf5d12d96 - Show all commits

View file

@ -270,7 +270,7 @@ class BatteryManufacturerController extends Controller
// get row data
$em = $this->getDoctrine()->getManager();
$all_batts = $em->getRepository(Battery::class)->findAll();
$all_batts = $em->getRepository(Battery::class)->findBy(['flag_active' => true]);
foreach ($all_batts as $battery)
{

View file

@ -1043,7 +1043,7 @@ class RiderAppController extends APIController
if ($rider == null)
return new APIResponse(false, 'No rider found.');
$batts = $em->getRepository(Battery::class)->findAll();
$batts = $em->getRepository(Battery::class)->findBy(['flag_active' => true]);
$models = $em->getRepository(BatteryModel::class)->findAll();
$sizes = $em->getRepository(BatterySize::class)->findAll();

View file

@ -485,7 +485,7 @@ class VehicleController extends Controller
// get row data
$em = $this->getDoctrine()->getManager();
$vobj = $em->getRepository(Vehicle::class)->find($req->request->get('vehicle_id'));
$all_batts = $em->getRepository(Battery::class)->findAll();
$all_batts = $em->getRepository(Battery::class)->findBy('flag_active' => true);
if (empty($vobj))
throw $this->createNotFoundException('The item does not exist');