mirror of
https://github.com/Karaka-Management/oms-EquipmentManagement.git
synced 2026-01-11 17:18:41 +00:00
template fixes + bug fixes + style fixes
This commit is contained in:
parent
38820fc8a3
commit
923353efae
|
|
@ -56,13 +56,13 @@ final class BackendController extends Controller
|
||||||
*/
|
*/
|
||||||
public function viewEquipmentManagementAttributeTypeList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
public function viewEquipmentManagementAttributeTypeList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeTypeListView($this->app->l11nManager, $request, $response);
|
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeTypeListView($this->app->l11nManager, $request, $response);
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1008405001, $request, $response);
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1008405001, $request, $response);
|
||||||
|
|
||||||
$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;
|
||||||
|
|
||||||
|
|
@ -114,7 +114,7 @@ final class BackendController extends Controller
|
||||||
*/
|
*/
|
||||||
public function viewEquipmentManagementAttributeType(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
public function viewEquipmentManagementAttributeType(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeTypeView($this->app->l11nManager, $request, $response);
|
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeTypeView($this->app->l11nManager, $request, $response);
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1008405001, $request, $response);
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1008405001, $request, $response);
|
||||||
|
|
||||||
$view->attribute = EquipmentAttributeTypeMapper::get()
|
$view->attribute = EquipmentAttributeTypeMapper::get()
|
||||||
|
|
@ -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';
|
||||||
|
|
||||||
|
|
@ -149,7 +149,7 @@ final class BackendController extends Controller
|
||||||
*/
|
*/
|
||||||
public function viewEquipmentManagementAttributeValue(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
public function viewEquipmentManagementAttributeValue(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeValueView($this->app->l11nManager, $request, $response);
|
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeValueView($this->app->l11nManager, $request, $response);
|
||||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1008405001, $request, $response);
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1008405001, $request, $response);
|
||||||
|
|
||||||
$view->attribute = EquipmentAttributeValueMapper::get()
|
$view->attribute = EquipmentAttributeValueMapper::get()
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return ['Navigation' => [
|
return ['Navigation' => [
|
||||||
'Attributes' => 'Attribute',
|
'Attributes' => 'Attribute',
|
||||||
'InspectionTypes' => 'Inspektionsarten',
|
'InspectionTypes' => 'Inspektionsarten',
|
||||||
'EquipmentManagement' => 'Equipment Management',
|
'EquipmentManagement' => 'Equipment Management',
|
||||||
'Equipments' => 'Equipments',
|
'Equipments' => 'Equipments',
|
||||||
'Inspections' => 'Inspektionen',
|
'Inspections' => 'Inspektionen',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return ['Navigation' => [
|
return ['Navigation' => [
|
||||||
'Attributes' => 'Attributes',
|
'Attributes' => 'Attributes',
|
||||||
'InspectionTypes' => 'Inspection Types',
|
'InspectionTypes' => 'Inspection Types',
|
||||||
'EquipmentManagement' => 'Equipment Management',
|
'EquipmentManagement' => 'Equipment Management',
|
||||||
'Equipments' => 'Equipments',
|
'Equipments' => 'Equipments',
|
||||||
'Inspections' => 'Inspections',
|
'Inspections' => 'Inspections',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user