mirror of
https://github.com/Karaka-Management/oms-FleetManagement.git
synced 2026-02-17 22:08: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 = new View($this->app->l11nManager, $request, $response);
|
||||||
|
|
||||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/driver-list');
|
$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()
|
$list = DriverMapper::getAll()
|
||||||
->with('account')
|
->with('account')
|
||||||
|
|
@ -360,7 +360,7 @@ final class BackendController extends Controller
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
|
|
||||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/driver-view');
|
$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'] = new \Modules\Attribute\Theme\Backend\Components\AttributeView($this->app->l11nManager, $request, $response);
|
||||||
$view->data['attributeView']->data['default_localization'] = $this->app->l11nServer;
|
$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 = new View($this->app->l11nManager, $request, $response);
|
||||||
|
|
||||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/driver-view');
|
$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.
|
// @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()
|
$driver = DriverMapper::get()
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ declare(strict_types=1);
|
||||||
namespace Modules\FleetManagement\Models\Driver;
|
namespace Modules\FleetManagement\Models\Driver;
|
||||||
|
|
||||||
use Modules\Admin\Models\Account;
|
use Modules\Admin\Models\Account;
|
||||||
|
use Modules\Admin\Models\NullAccount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Driver class.
|
* Driver class.
|
||||||
|
|
@ -54,6 +55,11 @@ class Driver
|
||||||
|
|
||||||
public array $inspections = [];
|
public array $inspections = [];
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->account = new NullAccount();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ final class NullDriver extends Driver
|
||||||
public function __construct(int $id = 0)
|
public function __construct(int $id = 0)
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ return ['FleetManagement' => [
|
||||||
'Responsible' => 'Verantwortlich',
|
'Responsible' => 'Verantwortlich',
|
||||||
'Start' => 'Start',
|
'Start' => 'Start',
|
||||||
'Status' => 'Status',
|
'Status' => 'Status',
|
||||||
|
'VIN' => 'VIN',
|
||||||
'Type' => 'Typ',
|
'Type' => 'Typ',
|
||||||
'Upcoming' => 'Upcoming',
|
'Upcoming' => 'Upcoming',
|
||||||
'Vehicles' => 'Fahrzeuge',
|
'Vehicles' => 'Fahrzeuge',
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ return ['FleetManagement' => [
|
||||||
'Responsible' => 'Responsible',
|
'Responsible' => 'Responsible',
|
||||||
'Start' => 'Start',
|
'Start' => 'Start',
|
||||||
'Status' => 'Status',
|
'Status' => 'Status',
|
||||||
|
'VIN' => 'VIN',
|
||||||
'Type' => 'Type',
|
'Type' => 'Type',
|
||||||
'Upcoming' => 'Upcoming',
|
'Upcoming' => 'Upcoming',
|
||||||
'Vehicles' => 'Vehicles',
|
'Vehicles' => 'Vehicles',
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ echo $this->data['nav']->render();
|
||||||
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
||||||
<td><?= $this->getHtml('Responsible'); ?>
|
<td><?= $this->getHtml('Responsible'); ?>
|
||||||
<tbody>
|
<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?!
|
// @todo handle old inspections in the past? maybe use a status?!
|
||||||
if ($inspection->next === null) {
|
if ($inspection->next === null) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -158,7 +158,7 @@ echo $this->data['nav']->render();
|
||||||
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
||||||
<td><?= $this->getHtml('Responsible'); ?>
|
<td><?= $this->getHtml('Responsible'); ?>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($this->data['inspections'] as $inspection) : ?>
|
<?php foreach (($this->data['inspections'] ?? []) as $inspection) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $inspection->date->format('Y-m-d H:i'); ?>
|
<td><?= $inspection->date->format('Y-m-d H:i'); ?>
|
||||||
<td><?= $this->printHtml($inspection->type->getL11n()); ?>
|
<td><?= $this->printHtml($inspection->type->getL11n()); ?>
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ echo $this->data['nav']->render();
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iVehicleDriver"><?= $this->getHtml('Driver'); ?></label>
|
<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>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -108,12 +108,12 @@ echo $this->data['nav']->render();
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iVehiclePrice"><?= $this->getHtml('PurchasePrice'); ?></label>
|
<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>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iVehiclePrice"><?= $this->getHtml('LeasingFee'); ?></label>
|
<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>
|
</div>
|
||||||
<div class="portlet-foot">
|
<div class="portlet-foot">
|
||||||
|
|
@ -180,7 +180,7 @@ echo $this->data['nav']->render();
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$count = 0;
|
$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?!
|
// @todo handle old inspections in the past? maybe use a status?!
|
||||||
if ($inspection->next === null) {
|
if ($inspection->next === null) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -212,7 +212,7 @@ echo $this->data['nav']->render();
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$count = 0;
|
$count = 0;
|
||||||
foreach ($this->data['inspections'] as $inspection) :
|
foreach (($this->data['inspections'] ?? []) as $inspection) :
|
||||||
++$count;
|
++$count;
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user