mirror of
https://github.com/Karaka-Management/oms-FleetManagement.git
synced 2026-01-30 13:28:41 +00:00
fix templates
This commit is contained in:
parent
55134be232
commit
87edec7bfc
|
|
@ -14,6 +14,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\FleetManagement\Controller;
|
||||
|
||||
use Modules\Attribute\Models\NullAttributeType;
|
||||
use Modules\Attribute\Models\NullAttributeValue;
|
||||
use Modules\FleetManagement\Models\Attribute\DriverAttributeTypeMapper;
|
||||
use Modules\FleetManagement\Models\Attribute\DriverAttributeValueL11nMapper;
|
||||
use Modules\FleetManagement\Models\Attribute\DriverAttributeValueMapper;
|
||||
|
|
@ -238,16 +240,15 @@ final class BackendController extends Controller
|
|||
public function viewFleetManagementInspectionTypeList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
|
||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/inspection-type-list');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $request, $response);
|
||||
|
||||
$list = InspectionTypeMapper::getAll()
|
||||
$view->data['inspections'] = InspectionTypeMapper::getAll()
|
||||
->with('l11n')
|
||||
->where('l11n/language', $response->header->l11n->language)
|
||||
->sort('id', 'DESC')
|
||||
->executeGetArray();
|
||||
|
||||
$view->data['inspections'] = $list;
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
|
|
@ -263,18 +264,43 @@ final class BackendController extends Controller
|
|||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function viewFleetManagementInspectionCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
public function viewFleetManagementDriverInspectionTypeList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
|
||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/inspection-list');
|
||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/inspection-type-list');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $request, $response);
|
||||
|
||||
$list = InspectionMapper::getAll()
|
||||
$view->data['inspections'] = InspectionTypeMapper::getAll()
|
||||
->with('l11n')
|
||||
->where('l11n/language', $response->header->l11n->language)
|
||||
->sort('id', 'DESC')
|
||||
->executeGetArray();
|
||||
|
||||
$view->data['inspections'] = $list;
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param array $data Generic data
|
||||
*
|
||||
* @return RenderableInterface Returns a renderable object
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function viewFleetManagementDriverInspectionCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
|
||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/inspection-view');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $request, $response);
|
||||
|
||||
$view->data['inspections'] = InspectionMapper::getAll()
|
||||
->sort('id', 'DESC')
|
||||
->executeGetArray();
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
@ -510,7 +536,6 @@ final class BackendController extends Controller
|
|||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/vehicle-view');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $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.
|
||||
$vehicle = VehicleMapper::get()
|
||||
->with('attributes')
|
||||
->with('attributes/type')
|
||||
|
|
@ -557,7 +582,7 @@ final class BackendController extends Controller
|
|||
->where(VehicleMapper::HAS_MANY['files']['self'], '=', $vehicle->id)
|
||||
->where(MediaTypeMapper::TABLE . '.' . MediaTypeMapper::getColumnByMember('name'), '=', 'vehicle_profile_image');
|
||||
|
||||
$view->data['vehicleImage'] = MediaMapper::get()
|
||||
$view->data['vehicleImage'] = MediaMapper::get()
|
||||
->with('types')
|
||||
->where('id', $results)
|
||||
->limit(1)
|
||||
|
|
@ -604,7 +629,6 @@ final class BackendController extends Controller
|
|||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/driver-view');
|
||||
$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()
|
||||
->with('attributes')
|
||||
->with('attributes/type')
|
||||
|
|
@ -662,4 +686,102 @@ final class BackendController extends Controller
|
|||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param array $data Generic data
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function viewFleetManagementDriverAttributeTypeCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeTypeView($this->app->l11nManager, $request, $response);
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003506001, $request, $response);
|
||||
|
||||
$view->attribute = new NullAttributeType();
|
||||
|
||||
$view->path = 'fleet/driver';
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param array $data Generic data
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function viewFleetManagementAttributeTypeCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeTypeView($this->app->l11nManager, $request, $response);
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003505001, $request, $response);
|
||||
|
||||
$view->attribute = new NullAttributeType();
|
||||
|
||||
$view->path = 'fleet/driver';
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param array $data Generic data
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function viewFleetManagementAttributeValueCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeValueView($this->app->l11nManager, $request, $response);
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003505001, $request, $response);
|
||||
|
||||
$view->type = VehicleAttributeTypeMapper::get()->where('id', (int) $request->getData('type'))->execute();
|
||||
$view->attribute = new NullAttributeValue();
|
||||
|
||||
$view->path = 'contract';
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behavior.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param array $data Generic data
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function viewFleetManagementDriverAttributeValueCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeValueView($this->app->l11nManager, $request, $response);
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003506001, $request, $response);
|
||||
|
||||
$view->type = DriverAttributeTypeMapper::get()->where('id', (int) $request->getData('type'))->execute();
|
||||
$view->attribute = new NullAttributeValue();
|
||||
|
||||
$view->path = 'contract';
|
||||
|
||||
return $view;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ return ['FleetManagement' => [
|
|||
'Files' => 'Dateien',
|
||||
'History' => 'Historie',
|
||||
'Inspections' => 'Inspektionen',
|
||||
'InspectionTypes' => 'Inspektionsarten',
|
||||
'LeasingFee' => 'Leasingkosten',
|
||||
'Make' => 'Marke',
|
||||
'Milage' => 'Tacho',
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ return ['FleetManagement' => [
|
|||
'Reference' => 'Reference',
|
||||
'History' => 'History',
|
||||
'Inspections' => 'Inspections',
|
||||
'InspectionTypes' => 'Inspection Types',
|
||||
'LeasingFee' => 'Leasing Fee',
|
||||
'Make' => 'Make',
|
||||
'Milage' => 'Milage',
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ echo $this->data['nav']->render();
|
|||
<div class="tabview tab-2">
|
||||
<div class="box">
|
||||
<ul class="tab-links">
|
||||
<li><label for="c-tab-1"><?= $this->getHtml('Profile'); ?></label>
|
||||
<li><label for="c-tab-1"><?= $this->getHtml('Driver'); ?></label>
|
||||
<li><label for="c-tab-2"><?= $this->getHtml('Attributes'); ?></label>
|
||||
<li><label for="c-tab-3"><?= $this->getHtml('Files'); ?></label>
|
||||
<li><label for="c-tab-4"><?= $this->getHtml('Notes'); ?></label>
|
||||
|
|
@ -50,7 +50,7 @@ echo $this->data['nav']->render();
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Profile'); ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Driver'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<div class="form-group">
|
||||
<label for="iFleetDriverProfileName"><?= $this->getHtml('Name'); ?></label>
|
||||
|
|
|
|||
|
|
@ -12,4 +12,56 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
echo $this->data['nav']->render();
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
echo $this->data['nav']->render(); ?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('InspectionTypes'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||
<div class="slider">
|
||||
<table id="iContractTypeList" class="default sticky">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||
<label for="iContractTypeList-sort-1">
|
||||
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-1">
|
||||
<i class="sort-asc g-icon">expand_less</i>
|
||||
</label>
|
||||
<label for="iContractTypeList-sort-2">
|
||||
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-2">
|
||||
<i class="sort-desc g-icon">expand_more</i>
|
||||
</label>
|
||||
<label>
|
||||
<i class="filter g-icon">filter_alt</i>
|
||||
</label>
|
||||
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
||||
<label for="iContractTypeList-sort-2">
|
||||
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-2">
|
||||
<i class="sort-asc g-icon">expand_less</i>
|
||||
</label>
|
||||
<label for="iContractTypeList-sort-3">
|
||||
<input type="radio" name="iContractTypeList-sort" id="iContractTypeList-sort-3">
|
||||
<i class="sort-desc g-icon">expand_more</i>
|
||||
</label>
|
||||
<label>
|
||||
<i class="filter g-icon">filter_alt</i>
|
||||
</label>
|
||||
<tbody>
|
||||
<?php
|
||||
$count = 0;
|
||||
foreach ($this->data['types'] as $key => $value) : ++$count;
|
||||
$url = UriFactory::build('{/base}/fleet/inspection/type/view?{?}&id=' . $value->id);
|
||||
?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n()); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,371 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Jingga
|
||||
*
|
||||
* PHP Version 8.2
|
||||
*
|
||||
* @package Modules\ClientManagement
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 2.0
|
||||
* @version 1.0.0
|
||||
* @link https://jingga.app
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use Modules\FleetManagement\Models\NullVehicle;
|
||||
use Modules\FleetManagement\Models\VehicleStatus;
|
||||
use Modules\Media\Models\NullMedia;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
$countryCodes = \phpOMS\Localization\ISO3166TwoEnum::getConstants();
|
||||
$countries = \phpOMS\Localization\ISO3166NameEnum::getConstants();
|
||||
$vehicleStatus = VehicleStatus::getConstants();
|
||||
|
||||
/**
|
||||
* @var \Modules\FleetManagement\Models\Vehicle $vehicle
|
||||
*/
|
||||
$vehicle = $this->data['vehicle'] ?? new NullVehicle();
|
||||
$vehicleImage = $this->data['vehicleImage'] ?? new NullMedia();
|
||||
$vehicleTypes = $this->data['types'] ?? [];
|
||||
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
echo $this->data['nav']->render();
|
||||
?>
|
||||
<div class="tabview tab-2">
|
||||
<div class="box">
|
||||
<ul class="tab-links">
|
||||
<li><label for="c-tab-1"><?= $this->getHtml('Profile'); ?></label>
|
||||
<li><label for="c-tab-2"><?= $this->getHtml('Attributes'); ?></label>
|
||||
<li><label for="c-tab-3"><?= $this->getHtml('Files'); ?></label>
|
||||
<li><label for="c-tab-4"><?= $this->getHtml('Notes'); ?></label>
|
||||
<li><label for="c-tab-5"><?= $this->getHtml('Inspections'); ?></label>
|
||||
<li><label for="c-tab-7"><?= $this->getHtml('Milage'); ?></label>
|
||||
<li><label for="c-tab-8"><?= $this->getHtml('Costs'); ?></label>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Profile'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<div class="form-group">
|
||||
<label for="iFleetVehicleProfileName"><?= $this->getHtml('Name'); ?></label>
|
||||
<input type="text" id="iFleetVehicleProfileName" name="name" value="<?= $this->printHtml($vehicle->name); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iVehicleDriver"><?= $this->getHtml('Driver'); ?></label>
|
||||
<input type="text" id="iVehicleDriver" name="driver" value="" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iVehicleVin"><?= $this->getHtml('VIN'); ?></label>
|
||||
<input type="text" id="iVehicleVin" name="vin" value="<?= $this->printHtml($vehicle->getAttribute('vin')->value->getValue()); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iVehicleStatus"><?= $this->getHtml('Status'); ?></label>
|
||||
<select id="iVehicleStatus" name="vehicle_status">
|
||||
<?php foreach ($vehicleStatus as $status) : ?>
|
||||
<option value="<?= $status; ?>"<?= $status === $vehicle->status ? ' selected' : ''; ?>><?= $this->getHtml(':status' . $status); ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iVehicleEnd"><?= $this->getHtml('Type'); ?></label>
|
||||
<select id="iVehicleEnd" name="vehicle_type">
|
||||
<?php foreach ($vehicleTypes as $type) : ?>
|
||||
<option value="<?= $type->id; ?>"<?= $vehicle->type->id === $type->id ? ' selected' : ''; ?>><?= $this->printHtml($type->getL11n()); ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iVehicleMake"><?= $this->getHtml('Make'); ?></label>
|
||||
<input type="text" id="iVehicleMake" name="make" value="<?= $this->printHtml($vehicle->getAttribute('maker')->value->getValue()); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iVehicleModel"><?= $this->getHtml('Model'); ?></label>
|
||||
<input type="text" id="iVehicleModel" name="vehicle_model" value="<?= $this->printHtml($vehicle->getAttribute('vehicle_model')->value->getValue()); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iVehicleStart"><?= $this->getHtml('Start'); ?></label>
|
||||
<input type="datetime-local" id="iVehicleStart" name="ownership_start" value="<?= $vehicle->getAttribute('ownership_start')->value->getValue()?->format('Y-m-d\TH:i') ?? $vehicle->createdAt->format('Y-m-d\TH:i'); ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iVehicleEnd"><?= $this->getHtml('End'); ?></label>
|
||||
<input type="datetime-local" id="iVehicleEnd" name="ownership_end" value="<?= $vehicle->getAttribute('ownership_end')->value->getValue()?->format('Y-m-d\TH:i'); ?>">
|
||||
</div>
|
||||
|
||||
<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()); ?>">
|
||||
</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()); ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
<?php if ($vehicle->id === 0) : ?>
|
||||
<input id="iCreateSubmit" type="Submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
|
||||
<?php else : ?>
|
||||
<input id="iSaveSubmit" type="Submit" value="<?= $this->getHtml('Save', '0', '0'); ?>">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="portlet">
|
||||
<div class="portlet-body">
|
||||
<img width="100%" src="<?= $vehicleImage->id === 0
|
||||
? 'Web/Backend/img/logo_grey.png'
|
||||
: UriFactory::build($vehicleImage->getPath()); ?>"></a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-2' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<?= $this->data['attributeView']->render(
|
||||
$vehicle->attributes,
|
||||
$this->data['attributeTypes'] ?? [],
|
||||
$this->data['units'] ?? [],
|
||||
'{/api}fleet/vehicle/attribute?csrf={$CSRF}',
|
||||
$vehicle->id
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-3' ? ' checked' : ''; ?>>
|
||||
<div class="tab col-simple">
|
||||
<?= $this->data['media-upload']->render('vehicle-file', 'files', '', $vehicle->files); ?>
|
||||
</div>
|
||||
|
||||
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<?= $this->data['vehicle-notes']->render('vehicle-notes', '', $vehicle->notes); ?>
|
||||
</div>
|
||||
|
||||
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-5' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<a class="button" href="<?= UriFactory::build('{/base}/fleet/inspection/create?vehicle=' . $vehicle->id); ?>"><?= $this->getHtml('Create', '0', '0'); ?></a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Upcoming'); ?></div>
|
||||
<table id="upcomingInspections" class="default sticky">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Date'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
||||
<td><?= $this->getHtml('Responsible'); ?>
|
||||
<tbody>
|
||||
<?php foreach ($this->data['inspections'] as $inspection) :
|
||||
// @todo handle old inspections in the past? maybe use a status?!
|
||||
if ($inspection->next === null) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?= $inspection->next->format('Y-m-d H:i'); ?>
|
||||
<td><?= $this->printHtml($inspection->type->getL11n()); ?>
|
||||
<td>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('History'); ?></div>
|
||||
<table id="historicInspections" class="default sticky">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Date'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
||||
<td><?= $this->getHtml('Responsible'); ?>
|
||||
<tbody>
|
||||
<?php foreach ($this->data['inspections'] as $inspection) : ?>
|
||||
<tr>
|
||||
<td><?= $inspection->date->format('Y-m-d H:i'); ?>
|
||||
<td><?= $this->printHtml($inspection->type->getL11n()); ?>
|
||||
<td>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="radio" id="c-tab-7" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-7' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="portlet">
|
||||
<form id="milageForm" action="<?= UriFactory::build(''); ?>" method="post"
|
||||
data-ui-container="#milageTable tbody"
|
||||
data-add-form="milageForm"
|
||||
data-add-tpl="#milageTable tbody .oms-add-tpl-milage">
|
||||
<div class="portlet-head"><?= $this->getHtml('Milage'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<div class="form-group">
|
||||
<label for="iAttributeId"><?= $this->getHtml('ID', '0', '0'); ?></label>
|
||||
<input type="text" id="iAttributeId" name="id" data-tpl-text="/id" data-tpl-value="/id" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iDriver"><?= $this->getHtml('Driver'); ?></label>
|
||||
<div class="ipt-wrap">
|
||||
<div class="ipt-first">
|
||||
<span class="input">
|
||||
<button type="button" formaction="">
|
||||
<i class="g-icon">book</i>
|
||||
</button>
|
||||
<input type="text" id="iDriver" name="bill_client" value="">
|
||||
</span>
|
||||
</div>
|
||||
<?php if (0 > 0) : ?>
|
||||
<div class="ipt-second">
|
||||
<a class="button" href="<?= UriFactory::build('{/base}/sales/client/view?id=' . 0); ?>"><?= $this->getHtml('Driver'); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iStartDate"><?= $this->getHtml('Start'); ?></label>
|
||||
<input type="datetime-local" id="iStartDate" name="bill_invoice_date"
|
||||
value="">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iEndDate"><?= $this->getHtml('End'); ?></label>
|
||||
<input type="datetime-local" id="iEndDate" name="bill_invoice_date"
|
||||
value="">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iFrom"><?= $this->getHtml('From'); ?></label>
|
||||
<input type="text" id="iFrom" name="bill_invoice_date"
|
||||
value="">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iTo"><?= $this->getHtml('To'); ?></label>
|
||||
<input type="text" id="iTo" name="bill_invoice_date"
|
||||
value="">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iMilage"><?= $this->getHtml('Milage'); ?></label>
|
||||
<input type="number" id="iMilage" name="bill_invoice_date"
|
||||
value="">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iMilageDescription"><?= $this->getHtml('Description'); ?></label>
|
||||
<pre class="textarea contenteditable" id="iMilageDescription" data-name="description" data-tpl-value="/value" contenteditable></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
<input id="bAttributeAdd" formmethod="put" type="submit" class="add-form" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||
<input id="bAttributeSave" formmethod="post" type="submit" class="save-form vh button save" value="<?= $this->getHtml('Update', '0', '0'); ?>">
|
||||
<input type="submit" class="cancel-form vh button close" value="<?= $this->getHtml('Cancel', '0', '0'); ?>">
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Milage'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||
<div class="slider">
|
||||
<table id="milageTable" class="default sticky"
|
||||
data-tag="form"
|
||||
data-ui-element="tr"
|
||||
data-add-tpl=".oms-add-tpl-milage"
|
||||
data-update-form="milageForm">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Driver'); ?><i class="sort-asc g-icon">expand_less</i><i class="sort-desc g-icon">expand_more</i>
|
||||
<td><?= $this->getHtml('Milage'); ?><i class="sort-asc g-icon">expand_less</i><i class="sort-desc g-icon">expand_more</i>
|
||||
<td><?= $this->getHtml('Start'); ?><i class="sort-asc g-icon">expand_less</i><i class="sort-desc g-icon">expand_more</i>
|
||||
<td><?= $this->getHtml('End'); ?><i class="sort-asc g-icon">expand_less</i><i class="sort-desc g-icon">expand_more</i>
|
||||
<tbody>
|
||||
<template class="oms-add-tpl-milage">
|
||||
<tr data-id="" draggable="false">
|
||||
<td>
|
||||
<i class="g-icon btn update-form">settings</i>
|
||||
<input id="milageTable-remove-0" type="checkbox" class="vh">
|
||||
<label for="milageTable-remove-0" class="checked-visibility-alt"><i class="g-icon btn form-action">close</i></label>
|
||||
<span class="checked-visibility">
|
||||
<label for="milageTable-remove-0" class="link default"><?= $this->getHtml('Cancel', '0', '0'); ?></label>
|
||||
<label for="milageTable-remove-0" class="remove-form link cancel"><?= $this->getHtml('Delete', '0', '0'); ?></label>
|
||||
</span>
|
||||
<td data-tpl-text="/id" data-tpl-value="/id"></td>
|
||||
<td data-tpl-text="/type" data-tpl-value="/type" data-value=""></td>
|
||||
<td data-tpl-text="/value" data-tpl-value="/value"></td>
|
||||
<td data-tpl-text="/unit" data-tpl-value="/unit"></td>
|
||||
<td data-tpl-text="/unit" data-tpl-value="/unit"></td>
|
||||
</tr>
|
||||
</template>
|
||||
<?php $c = 0;
|
||||
$milage = [];
|
||||
foreach ($milage as $key => $value) : ++$c; ?>
|
||||
<tr data-id="<?= $value->id; ?>">
|
||||
<td>
|
||||
<i class="g-icon btn update-form">settings</i>
|
||||
<?php if (!$value->type->isRequired) : ?>
|
||||
<input id="milageTable-remove-<?= $value->id; ?>" type="checkbox" class="vh">
|
||||
<label for="milageTable-remove-<?= $value->id; ?>" class="checked-visibility-alt"><i class="g-icon btn form-action">close</i></label>
|
||||
<span class="checked-visibility">
|
||||
<label for="milageTable-remove-<?= $value->id; ?>" class="link default"><?= $this->getHtml('Cancel', '0', '0'); ?></label>
|
||||
<label for="milageTable-remove-<?= $value->id; ?>" class="remove-form link cancel"><?= $this->getHtml('Delete', '0', '0'); ?></label>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<td data-tpl-text="/id" data-tpl-value="/id"><?= $value->id; ?>
|
||||
<td data-tpl-text="/type" data-tpl-value="/type" data-value="<?= $value->type->id; ?>"><?= $this->printHtml($value->type->getL11n()); ?>
|
||||
<td data-tpl-text="/value" data-tpl-value="/value"><?= $value->value->getValue() instanceof \DateTime ? $value->value->getValue()->format('Y-m-d') : $this->printHtml((string) $value->value->getValue()); ?>
|
||||
<td data-tpl-text="/unit" data-tpl-value="/unit" data-value="<?= $value->value->unit; ?>"><?= $this->printHtml($value->value->unit); ?>
|
||||
<td data-tpl-text="/unit" data-tpl-value="/unit" data-value="<?= $value->value->unit; ?>"><?= $this->printHtml($value->value->unit); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($c === 0) : ?>
|
||||
<tr>
|
||||
<td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="radio" id="c-tab-8" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-8' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -36,7 +36,7 @@ echo $this->data['nav']->render();
|
|||
<div class="tabview tab-2">
|
||||
<div class="box">
|
||||
<ul class="tab-links">
|
||||
<li><label for="c-tab-1"><?= $this->getHtml('Profile'); ?></label>
|
||||
<li><label for="c-tab-1"><?= $this->getHtml('Vehicle'); ?></label>
|
||||
<li><label for="c-tab-2"><?= $this->getHtml('Attributes'); ?></label>
|
||||
<li><label for="c-tab-3"><?= $this->getHtml('Files'); ?></label>
|
||||
<li><label for="c-tab-4"><?= $this->getHtml('Notes'); ?></label>
|
||||
|
|
@ -51,7 +51,7 @@ echo $this->data['nav']->render();
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Profile'); ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Vehicle'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<div class="form-group">
|
||||
<label for="iFleetVehicleProfileName"><?= $this->getHtml('Name'); ?></label>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user