mirror of
https://github.com/Karaka-Management/oms-FleetManagement.git
synced 2026-01-29 21:08:40 +00:00
continue implementation
This commit is contained in:
parent
c22b2890a7
commit
595dc5c8ed
|
|
@ -64,6 +64,98 @@
|
|||
"pid": "/",
|
||||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Drivers",
|
||||
"uri": "{/base}/fleet/driver/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
"from": "FleetManagement",
|
||||
"permission": { "permission": 2, "category": null, "element": null },
|
||||
"parent": 1003501001,
|
||||
"children": [
|
||||
{
|
||||
"id": 1003503101,
|
||||
"pid": "/fleet/driver",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "List",
|
||||
"uri": "{/base}/fleet/driver/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
"from": "FleetManagement",
|
||||
"permission": { "permission": 2, "category": null, "element": null },
|
||||
"parent": 1003503001,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"id": 1003503201,
|
||||
"pid": "/fleet/driver",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Create",
|
||||
"uri": "{/base}/fleet/driver/create?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
"from": "FleetManagement",
|
||||
"permission": { "permission": 4, "category": null, "element": null },
|
||||
"parent": 1003503001,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1003504001,
|
||||
"pid": "/",
|
||||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Inspection",
|
||||
"uri": "{/base}/fleet/inspection/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
"from": "FleetManagement",
|
||||
"permission": { "permission": 2, "category": null, "element": null },
|
||||
"parent": 1003501001,
|
||||
"children": [
|
||||
{
|
||||
"id": 1003504101,
|
||||
"pid": "/fleet/inspection",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "List",
|
||||
"uri": "{/base}/fleet/inspection/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
"from": "FleetManagement",
|
||||
"permission": { "permission": 2, "category": null, "element": null },
|
||||
"parent": 1003504001,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"id": 1003504201,
|
||||
"pid": "/fleet/inspection",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Create",
|
||||
"uri": "{/base}/fleet/inspection/create?{?}",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
"from": "FleetManagement",
|
||||
"permission": { "permission": 4, "category": null, "element": null },
|
||||
"parent": 1003504001,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1003505001,
|
||||
"pid": "/",
|
||||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Attributes",
|
||||
"uri": "{/base}/fleet/vehicle/attribute/type/list?{?}",
|
||||
"target": "self",
|
||||
|
|
@ -74,7 +166,7 @@
|
|||
"parent": 1003501001,
|
||||
"children": [
|
||||
{
|
||||
"id": 1003503101,
|
||||
"id": 1003505101,
|
||||
"pid": "/fleet/vehicle/attribute",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
|
|
@ -85,11 +177,11 @@
|
|||
"order": 15,
|
||||
"from": "FleetManagement",
|
||||
"permission": { "permission": 2, "category": null, "element": null },
|
||||
"parent": 1003503001,
|
||||
"parent": 1003505001,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"id": 1003503201,
|
||||
"id": 1003505201,
|
||||
"pid": "/fleet/vehicle/attribute",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
|
|
@ -100,7 +192,7 @@
|
|||
"order": 15,
|
||||
"from": "FleetManagement",
|
||||
"permission": { "permission": 2, "category": null, "element": null },
|
||||
"parent": 1003503001,
|
||||
"parent": 1003505001,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
|
|
|
|||
37
Admin/Install/inspectiontype.json
Normal file
37
Admin/Install/inspectiontype.json
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[
|
||||
{
|
||||
"name": "tire_change",
|
||||
"l11n": {
|
||||
"en": "Tire change",
|
||||
"de": "Reifenwechsel"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "oil_change",
|
||||
"l11n": {
|
||||
"en": "Oil change",
|
||||
"de": "Ölwechsel"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "mot",
|
||||
"l11n": {
|
||||
"en": "MOT test",
|
||||
"de": "TÜV"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "emissions_test",
|
||||
"l11n": {
|
||||
"en": "Emissions test",
|
||||
"de": "Abgasuntersuchung"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "general",
|
||||
"l11n": {
|
||||
"en": "General",
|
||||
"de": "Allgemein"
|
||||
}
|
||||
}
|
||||
]
|
||||
52
Admin/Routes/Web/Api.php
Normal file
52
Admin/Routes/Web/Api.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
/**
|
||||
* Karaka
|
||||
*
|
||||
* PHP Version 8.1
|
||||
*
|
||||
* @package Modules
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 2.0
|
||||
* @version 1.0.0
|
||||
* @link https://jingga.app
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use Modules\FleetManagement\Controller\ApiController;
|
||||
use Modules\FleetManagement\Models\PermissionCategory;
|
||||
use phpOMS\Account\PermissionType;
|
||||
use phpOMS\Router\RouteVerb;
|
||||
|
||||
return [
|
||||
'^.*/fleet/vehicle/find.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\FleetManagement\Controller\ApiController:apiVehicleFind',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::VEHICLE,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/fleet/vehicle/attribute.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\FleetManagement\Controller\ApiController:apiVehicleAttributeCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::VEHICLE,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\FleetManagement\Controller\ApiController:apiVehicleAttributeUpdate',
|
||||
'verb' => RouteVerb::SET,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::VEHICLE,
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -40,6 +40,7 @@ return [
|
|||
],
|
||||
],
|
||||
],
|
||||
|
||||
'^.*/fleet/vehicle/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\FleetManagement\Controller\BackendController:viewFleetManagementVehicleList',
|
||||
|
|
@ -73,4 +74,72 @@ return [
|
|||
],
|
||||
],
|
||||
],
|
||||
|
||||
'^.*/fleet/driver/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\FleetManagement\Controller\BackendController:viewFleetManagementDriverList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::VEHICLE,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/fleet/driver/create.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\FleetManagement\Controller\BackendController:viewFleetManagementDriverCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionCategory::VEHICLE,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/fleet/driver/profile.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\FleetManagement\Controller\BackendController:viewFleetManagementDriverProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::VEHICLE,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'^.*/fleet/inspection/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\FleetManagement\Controller\BackendController:viewFleetManagementVehicleList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::VEHICLE,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/fleet/inspection/create.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\FleetManagement\Controller\BackendController:viewFleetManagementVehicleCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionCategory::VEHICLE,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/fleet/inspection/profile.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\FleetManagement\Controller\BackendController:viewFleetManagementVehicleProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::VEHICLE,
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -14,12 +14,15 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\FleetManagement\Controller;
|
||||
|
||||
use Modules\Admin\Models\LocalizationMapper;
|
||||
use Modules\Admin\Models\SettingsEnum;
|
||||
use Modules\FleetManagement\Models\VehicleAttributeTypeL11nMapper;
|
||||
use Modules\FleetManagement\Models\VehicleAttributeTypeMapper;
|
||||
use Modules\FleetManagement\Models\VehicleMapper;
|
||||
use Modules\FleetManagement\Models\VehicleTypeMapper;
|
||||
use Modules\Media\Models\MediaMapper;
|
||||
use Modules\Media\Models\MediaTypeMapper;
|
||||
use Modules\Organization\Models\UnitMapper;
|
||||
use phpOMS\Contract\RenderableInterface;
|
||||
use phpOMS\DataStorage\Database\Query\Builder;
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
|
|
@ -132,6 +135,39 @@ final class BackendController extends Controller
|
|||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param mixed $data Generic data
|
||||
*
|
||||
* @return RenderableInterface Returns a renderable object
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function viewFleetManagementVehicleCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
|
||||
$view->setTemplate('/Modules/FleetManagement/Theme/Backend/vehicle-profile');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $request, $response);
|
||||
|
||||
/** @var \Model\Setting $settings */
|
||||
$settings = $this->app->appSettings->get(null, [
|
||||
SettingsEnum::DEFAULT_LOCALIZATION,
|
||||
]);
|
||||
|
||||
$view->data['attributeView'] = new \Modules\Attribute\Theme\Backend\Components\AttributeView($this->app->l11nManager, $request, $response);
|
||||
$view->data['attributeView']->data['defaultlocalization'] = LocalizationMapper::get()->where('id', (int) $settings->id)->execute();
|
||||
|
||||
$view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response);
|
||||
$view->data['vehicle-notes'] = new \Modules\Editor\Theme\Backend\Components\Compound\BaseView($this->app->l11nManager, $request, $response);
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* Routing end-point for application behaviour.
|
||||
*
|
||||
|
|
@ -197,6 +233,21 @@ final class BackendController extends Controller
|
|||
|
||||
$view->data['types'] = $vehicleTypes;
|
||||
|
||||
$units = UnitMapper::getAll()
|
||||
->execute();
|
||||
$view->data['units'] = $units;
|
||||
|
||||
/** @var \Model\Setting $settings */
|
||||
$settings = $this->app->appSettings->get(null, [
|
||||
SettingsEnum::DEFAULT_LOCALIZATION,
|
||||
]);
|
||||
|
||||
$view->data['attributeView'] = new \Modules\Attribute\Theme\Backend\Components\AttributeView($this->app->l11nManager, $request, $response);
|
||||
$view->data['attributeView']->data['defaultlocalization'] = LocalizationMapper::get()->where('id', (int) $settings->id)->execute();
|
||||
|
||||
$view->data['media-upload'] = new \Modules\Media\Theme\Backend\Components\Upload\BaseView($this->app->l11nManager, $request, $response);
|
||||
$view->data['vehicle-notes'] = new \Modules\Editor\Theme\Backend\Components\Compound\BaseView($this->app->l11nManager, $request, $response);
|
||||
|
||||
return $view;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ final class VehicleTypeL11nMapper extends DataMapperFactory
|
|||
'fleetmgmt_vehicle_type_l11n_id' => ['name' => 'fleetmgmt_vehicle_type_l11n_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'fleetmgmt_vehicle_type_l11n_title' => ['name' => 'fleetmgmt_vehicle_type_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
|
||||
'fleetmgmt_vehicle_type_l11n_type' => ['name' => 'fleetmgmt_vehicle_type_l11n_type', 'type' => 'int', 'internal' => 'ref'],
|
||||
'fleetmgmt_vehicle_type_l11n_lang' => ['name' => 'fleetmgmt_vehicle_type_l11n_lang', 'type' => 'string', 'internal' => 'language'],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@ declare(strict_types=1);
|
|||
return ['Navigation' => [
|
||||
'FleetManagement' => 'Fleet Management',
|
||||
'Vehicles' => 'Vehicles',
|
||||
'Drivers' => 'Drivers',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ return ['FleetManagement' => [
|
|||
'Attributes' => 'Attributes',
|
||||
'Files' => 'Files',
|
||||
'Notes' => 'Notes',
|
||||
'Costs' => 'Costs',
|
||||
'Inspections' => 'Inspections',
|
||||
'Drivers' => 'Drivers',
|
||||
'Milage' => 'Milage',
|
||||
|
|
|
|||
|
|
@ -1,289 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Karaka
|
||||
*
|
||||
* PHP Version 8.1
|
||||
*
|
||||
* @package Modules\ClientManagement
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 2.0
|
||||
* @version 1.0.0
|
||||
* @link https://jingga.app
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @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>
|
||||
<li><label for="c-tab-2"><?= $this->getHtml('Contact'); ?></label></li>
|
||||
<li><label for="c-tab-3"><?= $this->getHtml('Addresses'); ?></label></li>
|
||||
<li><label for="c-tab-4"><?= $this->getHtml('PaymentTerm'); ?></label></li>
|
||||
<li><label for="c-tab-5"><?= $this->getHtml('Payment'); ?></label></li>
|
||||
<li><label for="c-tab-6"><?= $this->getHtml('Prices'); ?></label></li>
|
||||
<li><label for="c-tab-7"><?= $this->getHtml('AreaManager'); ?></label></li>
|
||||
<li><label for="c-tab-8"><?= $this->getHtml('Files'); ?></label></li>
|
||||
<li><label for="c-tab-9"><?= $this->getHtml('Logs'); ?></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 col-lg-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Client'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iId"><?= $this->getHtml('ID', '0', '0'); ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" id="iId" min="1" name="id" required></span>
|
||||
<tr><td><label for="iName1"><?= $this->getHtml('Name1'); ?></label>
|
||||
<tr><td><input type="text" id="iName1" name="name1" placeholder="" required>
|
||||
<tr><td><label for="iName2"><?= $this->getHtml('Name2'); ?></label>
|
||||
<tr><td><input type="text" id="iName2" name="name2" placeholder="">
|
||||
<tr><td><label for="iName3"><?= $this->getHtml('Name3'); ?></label>
|
||||
<tr><td><input type="text" id="iName3" name="name3" placeholder="">
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-client">
|
||||
</table>
|
||||
</form>
|
||||
</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">
|
||||
<div class="col-xs-12 col-md-6 col-lg-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Contact'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iCType"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td><select id="iCType" name="actype">
|
||||
<option><?= $this->getHtml('Email'); ?>
|
||||
<option><?= $this->getHtml('Fax'); ?>
|
||||
<option><?= $this->getHtml('Phone'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iCStype"><?= $this->getHtml('Subtype'); ?></label>
|
||||
<tr><td><select id="iCStype" name="acstype">
|
||||
<option><?= $this->getHtml('Office'); ?>
|
||||
<option><?= $this->getHtml('Sales'); ?>
|
||||
<option><?= $this->getHtml('Purchase'); ?>
|
||||
<option><?= $this->getHtml('Accounting'); ?>
|
||||
<option><?= $this->getHtml('Support'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iCInfo"><?= $this->getHtml('Info'); ?></label>
|
||||
<tr><td><input type="text" id="iCInfo" name="cinfo">
|
||||
<tr><td><label for="iCData"><?= $this->getHtml('Contact'); ?></label>
|
||||
<tr><td><input type="text" id="iCData" name="cdata">
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-3' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6 col-lg-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Address'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iAType"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td><select id="iAType" name="atype">
|
||||
<option><?= $this->getHtml('Default'); ?>
|
||||
<option><?= $this->getHtml('Delivery'); ?>
|
||||
<option><?= $this->getHtml('Invoice'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iAddress"><?= $this->getHtml('Address'); ?></label>
|
||||
<tr><td><input type="text" id="iAddress" name="address">
|
||||
<tr><td><label for="iZip"><?= $this->getHtml('Zip'); ?></label>
|
||||
<tr><td><input type="text" id="iZip" name="zip">
|
||||
<tr><td><label for="iCountry"><?= $this->getHtml('Country'); ?></label>
|
||||
<tr><td><input type="text" id="iCountry" name="country">
|
||||
<tr><td><label for="iAInfo"><?= $this->getHtml('Info'); ?></label>
|
||||
<tr><td><input type="text" id="iAInfo" name="ainfo">
|
||||
<tr><td><span class="check"><input type="checkbox" id="iDefault" name="default" checked><label for="iDefault"><?= $this->getHtml('IsDefault'); ?></label></span>
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6 col-lg-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('PaymentTerm'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iSource"><?= $this->getHtml('ID'); ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input id="iSource" name="source" type="text" placeholder=""></span>
|
||||
<tr><td><label for="iSegment"><?= $this->getHtml('Segment'); ?></label>
|
||||
<tr><td><input id="iSegment" name="segment" type="text" placeholder="">
|
||||
<tr><td><label for="iProductgroup"><?= $this->getHtml('Productgroup'); ?></label>
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text" placeholder="">
|
||||
<tr><td><label for="iGroup"><?= $this->getHtml('Group'); ?></label>
|
||||
<tr><td><input id="iGroup" name="group" type="text" placeholder="">
|
||||
<tr><td><label for="iArticlegroup"><?= $this->getHtml('Articlegroup'); ?></label>
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text" placeholder="">
|
||||
<tr><td><label for="iTerm"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td><select id="iTerm" name="term" required>
|
||||
<option>
|
||||
</select>
|
||||
<tr><td><span class="check"><input type="checkbox" id="iFreightage" name="freightage"><label for="iFreightage"><?= $this->getHtml('Freightage'); ?></label></span>
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</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">
|
||||
<div class="col-xs-12 col-md-6 col-lg-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Payment'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iACType"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td><select id="iACType" name="actype">
|
||||
<option><?= $this->getHtml('Wire'); ?>
|
||||
<option><?= $this->getHtml('Creditcard'); ?>
|
||||
</select>
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-6" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-6' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6 col-lg-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Price'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form action="<?= \phpOMS\Uri\UriFactory::build('{/api}...'); ?>" method="post">
|
||||
<table class="layout wf-100">
|
||||
<tbody>
|
||||
<tr><td colspan="2"><label for="iPType"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td><select id="iPType" name="ptye">
|
||||
<option>
|
||||
</select><td>
|
||||
<tr><td><label for="iSource"><?= $this->getHtml('ID'); ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input id="iSource" name="source" type="text" placeholder=""></span>
|
||||
<tr><td><label for="iSegment"><?= $this->getHtml('Segment'); ?></label>
|
||||
<tr><td><input id="iSegment" name="segment" type="text" placeholder="">
|
||||
<tr><td><label for="iProductgroup"><?= $this->getHtml('Productgroup'); ?></label>
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text" placeholder="">
|
||||
<tr><td><label for="iGroup"><?= $this->getHtml('Group'); ?></label>
|
||||
<tr><td><input id="iGroup" name="group" type="text" placeholder="">
|
||||
<tr><td><label for="iArticlegroup"><?= $this->getHtml('Articlegroup'); ?></label>
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text" placeholder="">
|
||||
<tr><td><label for="iPQuantity"><?= $this->getHtml('Quantity'); ?></label>
|
||||
<tr><td><input id="iPQuantity" name="quantity" type="text" placeholder=""><td>
|
||||
<tr><td><label for="iPrice"><?= $this->getHtml('Price'); ?></label>
|
||||
<tr><td><input id="iPrice" name="price" type="number" step="any" min="0" placeholder=""><td>
|
||||
<tr><td><label for="iDiscount"><?= $this->getHtml('Discount'); ?></label>
|
||||
<tr><td><input id="iDiscount" name="discount" type="number" step="any" min="0" placeholder=""><td>
|
||||
<tr><td><label for="iDiscount"><?= $this->getHtml('DiscountP'); ?></label>
|
||||
<tr><td><input id="iDiscountP" name="discountp" type="number" step="any" min="0" placeholder=""><td>
|
||||
<tr><td><label for="iBonus"><?= $this->getHtml('Bonus'); ?></label>
|
||||
<tr><td><input id="iBonus" name="bonus" type="number" step="any" min="0" placeholder=""><td>
|
||||
<tr><td><input type="submit" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</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 col-lg-4">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('AreaManager'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form action="<?= \phpOMS\Uri\UriFactory::build('{/api}...'); ?>" method="post">
|
||||
<table class="layout wf-100">
|
||||
<tbody>
|
||||
<tr><td><label for="iManager"><?= $this->getHtml('AreaManager'); ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input id="iManager" name="source" type="text" placeholder=""></span>
|
||||
<tr><td><label for="iSource"><?= $this->getHtml('ID'); ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input id="iSource" name="source" type="text" placeholder=""></span>
|
||||
<tr><td><label for="iSegment"><?= $this->getHtml('Segment'); ?></label>
|
||||
<tr><td><input id="iSegment" name="segment" type="text" placeholder="">
|
||||
<tr><td><label for="iProductgroup"><?= $this->getHtml('Productgroup'); ?></label>
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text" placeholder="">
|
||||
<tr><td><label for="iGroup"><?= $this->getHtml('Group'); ?></label>
|
||||
<tr><td><input id="iGroup" name="group" type="text" placeholder="">
|
||||
<tr><td><label for="iArticlegroup"><?= $this->getHtml('Articlegroup'); ?></label>
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text" placeholder="">
|
||||
<tr><td><input type="submit" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||
</table>
|
||||
</form>
|
||||
</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>
|
||||
<input type="radio" id="c-tab-9" name="tabular-2"<?= $this->request->uri->fragment === 'c-tab-9' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<?php
|
||||
$footerView = new \phpOMS\Views\PaginationView($this->l11nManager, $this->request, $this->response);
|
||||
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
|
||||
$footerView->setPages(20);
|
||||
$footerView->setPage(1);
|
||||
?>
|
||||
<div class="box wf-100">
|
||||
<table class="default">
|
||||
<caption><?= $this->getHtml('Logs'); ?><i class="fa fa-download floatRight download btn"></i></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>IP
|
||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||
<td><?= $this->getHtml('Name'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Log'); ?>
|
||||
<td><?= $this->getHtml('Date'); ?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?= $this->printHtml($this->request->getOrigin()); ?>
|
||||
<td><?= $this->printHtml((string) $this->request->header->account); ?>
|
||||
<td><?= $this->printHtml((string) $this->request->header->account); ?>
|
||||
<td>Creating customer
|
||||
<td><?= $this->printHtml((new \DateTime('now'))->format('Y-m-d H:i:s')); ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -24,10 +24,11 @@ $vehicleStatus = VehicleStatus::getConstants();
|
|||
/**
|
||||
* @var \Modules\FleetManagement\Models\Vehicle $vehicle
|
||||
*/
|
||||
$vehicle = $this->getData('vehicle') ?? new NullVehicle();
|
||||
$vehicle = $this->data['vehicle'] ?? new NullVehicle();
|
||||
$files = $vehicle->files;
|
||||
$vehicleImage = $this->getData('vehicleImage') ?? new NullMedia();
|
||||
$vehicleImage = $this->data['vehicleImage'] ?? new NullMedia();
|
||||
$vehicleTypes = $this->data['types'] ?? [];
|
||||
$attributeView = $this->data['attributeView'];
|
||||
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
|
|
@ -38,12 +39,12 @@ echo $this->data['nav']->render();
|
|||
<div class="box">
|
||||
<ul class="tab-links">
|
||||
<li><label for="c-tab-1"><?= $this->getHtml('Profile'); ?></label>
|
||||
<li><label for="c-tab-6"><?= $this->getHtml('Attributes'); ?></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-3"><?= $this->getHtml('Notes'); ?></label>
|
||||
<li><label for="c-tab-4"><?= $this->getHtml('Inspections'); ?></label>
|
||||
<li><label for="c-tab-5"><?= $this->getHtml('Drivers'); ?></label>
|
||||
<li><label for="c-tab-6"><?= $this->getHtml('Milage'); ?></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">
|
||||
|
|
@ -109,14 +110,21 @@ echo $this->data['nav']->render();
|
|||
|
||||
<div class="form-group">
|
||||
<label for="iVehiclePrice"><?= $this->getHtml('PurchasePrice'); ?></label>
|
||||
<input type="text" id="iVehiclePrice" name="purchase_price" value="<?= $this->printHtml($vehicle->getAttribute('purchase_price')->value->getValue()); ?>">
|
||||
<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="text" id="iVehiclePrice" name="leasing_fee" value="<?= $this->printHtml($vehicle->getAttribute('leasing_fee')->value->getValue()); ?>">
|
||||
<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>
|
||||
|
||||
|
|
@ -131,5 +139,225 @@ echo $this->data['nav']->render();
|
|||
</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">
|
||||
<?= $attributeView->render(
|
||||
$vehicle->getAttributes(),
|
||||
$this->data['attributeTypes'] ?? [],
|
||||
$this->data['units'] ?? [],
|
||||
'{/api}fleet/vehicle/attribute'
|
||||
);
|
||||
?>
|
||||
</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('{/app}/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">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Date'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
||||
<td><?= $this->getHtml('Responsible'); ?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
</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">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Date'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Type'); ?>
|
||||
<td><?= $this->getHtml('Responsible'); ?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
</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="attributeForm" action="<?= UriFactory::build(''); ?>" method="post"
|
||||
data-ui-container="#attributeTable tbody"
|
||||
data-add-form="attributeForm"
|
||||
data-add-tpl="#attributeTable tbody .oms-add-tpl-attribute">
|
||||
<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="fa fa-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('{/app}/sales/client/profile?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 hidden button save" value="<?= $this->getHtml('Update', '0', '0'); ?>">
|
||||
<input type="submit" class="cancel-form hidden 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="lni lni-download download btn end-xs"></i></div>
|
||||
<div class="slider">
|
||||
<table id="milageTable" class="default"
|
||||
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 fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Milage'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Start'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('End'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<tbody>
|
||||
<template class="oms-add-tpl-milage">
|
||||
<tr data-id="" draggable="false">
|
||||
<td>
|
||||
<i class="fa fa-cogs btn update-form"></i>
|
||||
<input id="milageTable-remove-0" type="checkbox" class="hidden">
|
||||
<label for="milageTable-remove-0" class="checked-visibility-alt"><i class="fa fa-times btn form-action"></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="fa fa-cogs btn update-form"></i>
|
||||
<?php if (!$value->type->isRequired) : ?>
|
||||
<input id="milageTable-remove-<?= $value->id; ?>" type="checkbox" class="hidden">
|
||||
<label for="milageTable-remove-<?= $value->id; ?>" class="checked-visibility-alt"><i class="fa fa-times btn form-action"></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>
|
||||
Loading…
Reference in New Issue
Block a user