Enhance vehicle summary retrieval for customers and update OpenAPI schema for subuser management grants
This commit is contained in:
@@ -82,10 +82,15 @@ class vehiclesRoute
|
||||
|
||||
private function buildVehicleSummaryForCustomer(int $customerNumber): array
|
||||
{
|
||||
$rows = (new customer_vehicles_o())->getFieldsWhere([
|
||||
$vehicles = new customer_vehicles_o();
|
||||
$filters = [
|
||||
'customer_id' => $customerNumber,
|
||||
'deleted_at' => null,
|
||||
], [
|
||||
];
|
||||
if ($vehicles->columnsExist(['deleted_at'])) {
|
||||
$filters['deleted_at'] = null;
|
||||
}
|
||||
|
||||
$rows = $vehicles->getFieldsWhere($filters, [
|
||||
'id',
|
||||
'wash_subscription',
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user