template fixes + bug fixes + style fixes

This commit is contained in:
Dennis Eichhorn 2024-04-02 21:40:47 +00:00
parent 38820fc8a3
commit 923353efae
4 changed files with 22 additions and 22 deletions

View File

@ -62,7 +62,7 @@ final class BackendController extends Controller
$view->attributes = EquipmentAttributeTypeMapper::getAll() $view->attributes = EquipmentAttributeTypeMapper::getAll()
->with('l11n') ->with('l11n')
->where('l11n/language', $response->header->l11n->language) ->where('l11n/language', $response->header->l11n->language)
->execute(); ->executeGetArray();
$view->path = 'equipment'; $view->path = 'equipment';
@ -93,7 +93,7 @@ final class BackendController extends Controller
->with('type/l11n') ->with('type/l11n')
->where('type/l11n/language', $response->header->l11n->language) ->where('type/l11n/language', $response->header->l11n->language)
->sort('id', 'DESC') ->sort('id', 'DESC')
->execute(); ->executeGetArray();
$view->data['equipments'] = $list; $view->data['equipments'] = $list;
@ -128,7 +128,7 @@ final class BackendController extends Controller
$view->l11ns = EquipmentAttributeTypeL11nMapper::getAll() $view->l11ns = EquipmentAttributeTypeL11nMapper::getAll()
->where('ref', $view->attribute->id) ->where('ref', $view->attribute->id)
->execute(); ->executeGetArray();
$view->path = 'fleet/vehicle'; $view->path = 'fleet/vehicle';
@ -160,7 +160,7 @@ final class BackendController extends Controller
$view->l11ns = EquipmentAttributeValueL11nMapper::getAll() $view->l11ns = EquipmentAttributeValueL11nMapper::getAll()
->where('ref', $view->attribute->id) ->where('ref', $view->attribute->id)
->execute(); ->executeGetArray();
// @todo Also find the ItemAttributeType // @todo Also find the ItemAttributeType
@ -241,7 +241,7 @@ final class BackendController extends Controller
->with('type/l11n') ->with('type/l11n')
->where('reference', $equipment->id) ->where('reference', $equipment->id)
->where('type/l11n/language', $response->header->l11n->language) ->where('type/l11n/language', $response->header->l11n->language)
->execute(); ->executeGetArray();
$view->data['inspections'] = $inspections; $view->data['inspections'] = $inspections;
@ -272,12 +272,12 @@ final class BackendController extends Controller
$equipmentTypes = EquipmentTypeMapper::getAll() $equipmentTypes = EquipmentTypeMapper::getAll()
->with('l11n') ->with('l11n')
->where('l11n/language', $response->header->l11n->language) ->where('l11n/language', $response->header->l11n->language)
->execute(); ->executeGetArray();
$view->data['types'] = $equipmentTypes; $view->data['types'] = $equipmentTypes;
$units = UnitMapper::getAll() $units = UnitMapper::getAll()
->execute(); ->executeGetArray();
$view->data['units'] = $units; $view->data['units'] = $units;
@ -337,7 +337,7 @@ final class BackendController extends Controller
$list = InspectionTypeMapper::getAll() $list = InspectionTypeMapper::getAll()
->sort('id', 'DESC') ->sort('id', 'DESC')
->execute(); ->executeGetArray();
$view->data['inspections'] = $list; $view->data['inspections'] = $list;

View File

@ -27,7 +27,7 @@ trait ApiControllerEquipmentTrait
#[\PHPUnit\Framework\Attributes\Group('module')] #[\PHPUnit\Framework\Attributes\Group('module')]
public function testApiEquipmentCreate() : void public function testApiEquipmentCreate() : void
{ {
$equipmentType = EquipmentTypeMapper::getAll()->execute(); $equipmentType = EquipmentTypeMapper::getAll()->executeGetArray();
$equipmentTypeCount = \count($equipmentType); $equipmentTypeCount = \count($equipmentType);
$response = new HttpResponse(); $response = new HttpResponse();