mirror of
https://github.com/Karaka-Management/oms-FleetManagement.git
synced 2026-02-09 09:58:41 +00:00
bump
This commit is contained in:
parent
ebdd6901c6
commit
45ae07b0ac
|
|
@ -149,7 +149,7 @@ final class BackendController extends Controller
|
|||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
|
||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/driver-list');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $request, $response);
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003503001, $request, $response);
|
||||
|
||||
$list = DriverMapper::getAll()
|
||||
->with('account')
|
||||
|
|
@ -360,7 +360,7 @@ final class BackendController extends Controller
|
|||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
|
||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/driver-view');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $request, $response);
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003503001, $request, $response);
|
||||
|
||||
$view->data['attributeView'] = new \Modules\Attribute\Theme\Backend\Components\AttributeView($this->app->l11nManager, $request, $response);
|
||||
$view->data['attributeView']->data['default_localization'] = $this->app->l11nServer;
|
||||
|
|
@ -505,7 +505,7 @@ final class BackendController extends Controller
|
|||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
|
||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/driver-view');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $request, $response);
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003503001, $request, $response);
|
||||
|
||||
// @todo This language filtering doesn't work. But it was working with the old mappers. Maybe there is a bug in the where() definition. Need to inspect the actual query.
|
||||
$driver = DriverMapper::get()
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ declare(strict_types=1);
|
|||
namespace Modules\FleetManagement\Models\Driver;
|
||||
|
||||
use Modules\Admin\Models\Account;
|
||||
use Modules\Admin\Models\NullAccount;
|
||||
|
||||
/**
|
||||
* Driver class.
|
||||
|
|
@ -54,6 +55,11 @@ class Driver
|
|||
|
||||
public array $inspections = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->account = new NullAccount();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ final class NullDriver extends Driver
|
|||
public function __construct(int $id = 0)
|
||||
{
|
||||
$this->id = $id;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ return ['FleetManagement' => [
|
|||
'Responsible' => 'Verantwortlich',
|
||||
'Start' => 'Start',
|
||||
'Status' => 'Status',
|
||||
'VIN' => 'VIN',
|
||||
'Type' => 'Typ',
|
||||
'Upcoming' => 'Upcoming',
|
||||
'Vehicles' => 'Fahrzeuge',
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ return ['FleetManagement' => [
|
|||
'Responsible' => 'Responsible',
|
||||
'Start' => 'Start',
|
||||
'Status' => 'Status',
|
||||
'VIN' => 'VIN',
|
||||
'Type' => 'Type',
|
||||
'Upcoming' => 'Upcoming',
|
||||
'Vehicles' => 'Vehicles',
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ echo $this->data['nav']->render();
|
|||
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
||||
<td><?= $this->getHtml('Responsible'); ?>
|
||||
<tbody>
|
||||
<?php foreach ($this->data['inspections'] as $inspection) :
|
||||
<?php foreach (($this->data['inspections'] ?? []) as $inspection) :
|
||||
// @todo handle old inspections in the past? maybe use a status?!
|
||||
if ($inspection->next === null) {
|
||||
continue;
|
||||
|
|
@ -158,7 +158,7 @@ echo $this->data['nav']->render();
|
|||
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
||||
<td><?= $this->getHtml('Responsible'); ?>
|
||||
<tbody>
|
||||
<?php foreach ($this->data['inspections'] as $inspection) : ?>
|
||||
<?php foreach (($this->data['inspections'] ?? []) as $inspection) : ?>
|
||||
<tr>
|
||||
<td><?= $inspection->date->format('Y-m-d H:i'); ?>
|
||||
<td><?= $this->printHtml($inspection->type->getL11n()); ?>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ echo $this->data['nav']->render();
|
|||
|
||||
<div class="form-group">
|
||||
<label for="iVehicleDriver"><?= $this->getHtml('Driver'); ?></label>
|
||||
<input type="text" id="iVehicleDriver" name="driver" value="" disabled>
|
||||
<input type="text" id="iVehicleDriver" name="driver" value="">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
@ -108,12 +108,12 @@ echo $this->data['nav']->render();
|
|||
|
||||
<div class="form-group">
|
||||
<label for="iVehiclePrice"><?= $this->getHtml('PurchasePrice'); ?></label>
|
||||
<input type="number" step="0.01" id="iVehiclePrice" name="purchase_price" value="<?= $this->printHtml($vehicle->getAttribute('purchase_price')->value->getValue()); ?>">
|
||||
<input type="number" step="any" id="iVehiclePrice" name="purchase_price" value="<?= $this->printHtml($vehicle->getAttribute('purchase_price')->value->getValue()); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iVehiclePrice"><?= $this->getHtml('LeasingFee'); ?></label>
|
||||
<input type="number" step="0.01" id="iVehiclePrice" name="leasing_fee" value="<?= $this->printHtml($vehicle->getAttribute('leasing_fee')->value->getValue()); ?>">
|
||||
<input type="number" step="any" id="iVehiclePrice" name="leasing_fee" value="<?= $this->printHtml($vehicle->getAttribute('leasing_fee')->value->getValue()); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
|
|
@ -180,7 +180,7 @@ echo $this->data['nav']->render();
|
|||
<tbody>
|
||||
<?php
|
||||
$count = 0;
|
||||
foreach ($this->data['inspections'] as $inspection) :
|
||||
foreach (($this->data['inspections'] ?? []) as $inspection) :
|
||||
// @todo handle old inspections in the past? maybe use a status?!
|
||||
if ($inspection->next === null) {
|
||||
continue;
|
||||
|
|
@ -212,7 +212,7 @@ echo $this->data['nav']->render();
|
|||
<tbody>
|
||||
<?php
|
||||
$count = 0;
|
||||
foreach ($this->data['inspections'] as $inspection) :
|
||||
foreach (($this->data['inspections'] ?? []) as $inspection) :
|
||||
++$count;
|
||||
?>
|
||||
<tr>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user