mirror of
https://github.com/Karaka-Management/oms-SupplierManagement.git
synced 2026-01-10 17:08:41 +00:00
started with template fixes
This commit is contained in:
parent
2d9111fed3
commit
fcf379a41f
|
|
@ -6,6 +6,13 @@
|
|||
"virtualPath": "/Modules",
|
||||
"user": 1
|
||||
},
|
||||
{
|
||||
"type": "collection",
|
||||
"create_directory": true,
|
||||
"name": "Suppliers",
|
||||
"virtualPath": "/Modules/SupplierManagement",
|
||||
"user": 1
|
||||
},
|
||||
{
|
||||
"type": "type",
|
||||
"name": "supplier_profile_image",
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@
|
|||
{ "value": "FI" },
|
||||
{ "value": "FR" },
|
||||
{ "value": "DE" },
|
||||
{ "value": "DE_0" },
|
||||
{ "value": "DE_S" },
|
||||
{ "value": "GR" },
|
||||
{ "value": "HU" },
|
||||
{ "value": "IE" },
|
||||
|
|
@ -329,6 +329,7 @@
|
|||
{ "value": "SE" },
|
||||
{ "value": "GB" },
|
||||
{ "value": "INT" },
|
||||
{ "value": "EU_S" },
|
||||
{ "value": "EU" }
|
||||
]
|
||||
},
|
||||
|
|
|
|||
187
Admin/Routes/Web/Api.php
Normal file
187
Admin/Routes/Web/Api.php
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
<?php
|
||||
/**
|
||||
* Jingga
|
||||
*
|
||||
* PHP Version 8.2
|
||||
*
|
||||
* @package Modules
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 2.0
|
||||
* @version 1.0.0
|
||||
* @link https://jingga.app
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use Modules\SupplierManagement\Controller\ApiController;
|
||||
use Modules\SupplierManagement\Models\PermissionCategory;
|
||||
use phpOMS\Account\PermissionType;
|
||||
use phpOMS\Router\RouteVerb;
|
||||
|
||||
return [
|
||||
'^.*/supplier/find(\?.*$|$)' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierFind',
|
||||
'verb' => RouteVerb::GET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/supplier/attribute$' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeUpdate',
|
||||
'verb' => RouteVerb::SET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/supplier/attribute/type$' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeTypeCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeTypeUpdate',
|
||||
'verb' => RouteVerb::SET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/supplier/attribute/type/l11n$' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeTypeL11nCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeTypeL11nUpdate',
|
||||
'verb' => RouteVerb::SET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/supplier/attribute/value$' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeValueCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeValueUpdate',
|
||||
'verb' => RouteVerb::SET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/supplier/attribute/value/l11n$' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeValueL11nCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeValueL11nUpdate',
|
||||
'verb' => RouteVerb::SET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/supplier/l11n$' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierL11nCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierL11nUpdate',
|
||||
'verb' => RouteVerb::SET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/supplier/l11n/type$' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierL11nTypeCreate',
|
||||
'verb' => RouteVerb::PUT,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierL11nTypeUpdate',
|
||||
'verb' => RouteVerb::SET,
|
||||
'csrf' => true,
|
||||
'permission' => [
|
||||
'module' => ApiController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -25,18 +25,51 @@ return [
|
|||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
'state' => PermissionCategory::ATTRIBUTE,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/purchase/supplier/attribute/type(\?.*$|$)' => [
|
||||
'^.*/purchase/supplier/attribute/type/view(\?.*$|$)' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\BackendController:viewSupplierManagementAttributeType',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::SUPPLIER,
|
||||
'state' => PermissionCategory::ATTRIBUTE,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/purchase/supplier/attribute/type/create(\?.*$|$)' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\BackendController:viewSupplierManagementAttributeType',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionCategory::ATTRIBUTE,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/purchase/supplier/attribute/value/view(\?.*$|$)' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\BackendController:viewSupplierManagementAttributeValue',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionCategory::ATTRIBUTE,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/purchase/supplier/attribute/value/create(\?.*$|$)' => [
|
||||
[
|
||||
'dest' => '\Modules\SupplierManagement\Controller\BackendController:viewSupplierManagementAttributeValueCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionCategory::ATTRIBUTE,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ omsApp.Modules.SupplierManagement = class {
|
|||
const self = this;
|
||||
const data = JSON.parse(chart.getAttribute('data-chart'));
|
||||
|
||||
/** global: Chart */
|
||||
const myChart = new Chart(chart.getContext('2d'), data);
|
||||
};
|
||||
|
||||
|
|
@ -59,6 +60,7 @@ omsApp.Modules.SupplierManagement = class {
|
|||
return;
|
||||
}
|
||||
|
||||
/** global: OpenLayers */
|
||||
const mapObj = new OpenLayers.Map(map.getAttribute('id'), {
|
||||
controls: [
|
||||
new OpenLayers.Control.Navigation(
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ namespace Modules\SupplierManagement\Controller;
|
|||
|
||||
use Modules\Admin\Models\Account;
|
||||
use Modules\Admin\Models\NullAccount;
|
||||
use Modules\Media\Models\Collection;
|
||||
use Modules\Media\Models\CollectionMapper;
|
||||
use Modules\Media\Models\MediaMapper;
|
||||
use Modules\Media\Models\PathSettings;
|
||||
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeTypeMapper;
|
||||
|
|
@ -69,6 +71,10 @@ final class ApiController extends Controller
|
|||
$supplier = $this->createSupplierFromRequest($request);
|
||||
$this->createModel($request->header->account, $supplier, SupplierMapper::class, 'supplier', $request->getOrigin());
|
||||
|
||||
// Create media dir
|
||||
// @todo should this collection get added to the parent collection?
|
||||
$this->createMediaDirForSupplier($supplier->id, $request->header->account);
|
||||
|
||||
// Create stock
|
||||
if ($this->app->moduleManager->isActive('WarehouseManagement')) {
|
||||
$internalResponse = new HttpResponse();
|
||||
|
|
@ -87,6 +93,29 @@ final class ApiController extends Controller
|
|||
$this->createStandardCreateResponse($request, $response, $supplier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create directory for an account
|
||||
*
|
||||
* @param int $id Item number
|
||||
* @param int $createdBy Creator of the directory
|
||||
*
|
||||
* @return Collection
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function createMediaDirForSupplier(int $id, int $createdBy) : Collection
|
||||
{
|
||||
$collection = new Collection();
|
||||
$collection->name = $id;
|
||||
$collection->setVirtualPath('/Modules/SupplierManagement/Suppliers');
|
||||
$collection->setPath('/Modules/Media/Files/Modules/SupplierManagement/Suppliers/' . $id);
|
||||
$collection->createdBy = new NullAccount($createdBy);
|
||||
|
||||
CollectionMapper::create()->execute($collection);
|
||||
|
||||
return $collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to create news article from request.
|
||||
*
|
||||
|
|
@ -343,8 +372,8 @@ final class ApiController extends Controller
|
|||
fileNames: $request->getDataList('filenames'),
|
||||
files: $uploadedFiles,
|
||||
account: $request->header->account,
|
||||
basePath: __DIR__ . '/../../../Modules/Media/Files/Modules/SupplierManagement/' . ($request->getData('supplier') ?? '0'),
|
||||
virtualPath: '/Modules/SupplierManagement/' . ($request->getData('supplier') ?? '0'),
|
||||
basePath: __DIR__ . '/../../../Modules/Media/Files/Modules/SupplierManagement/Suppliers/' . ($request->getData('supplier') ?? '0'),
|
||||
virtualPath: '/Modules/SupplierManagement/Suppliers/' . ($request->getData('supplier') ?? '0'),
|
||||
pathSettings: PathSettings::FILE_PATH
|
||||
);
|
||||
|
||||
|
|
@ -393,7 +422,7 @@ final class ApiController extends Controller
|
|||
*/
|
||||
public function apiNoteCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
|
||||
{
|
||||
$request->setData('virtualpath', '/Modules/SupplierManagement/' . $request->getData('id'), true);
|
||||
$request->setData('virtualpath', '/Modules/SupplierManagement/Suppliers/' . $request->getData('id'), true);
|
||||
$this->app->moduleManager->get('Editor')->apiEditorCreate($request, $response, $data);
|
||||
|
||||
$data = $response->getDataArray($request->uri->__toString());
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ use Modules\Media\Models\MediaMapper;
|
|||
use Modules\Media\Models\MediaTypeMapper;
|
||||
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeTypeL11nMapper;
|
||||
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeTypeMapper;
|
||||
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeValueL11nMapper;
|
||||
use Modules\SupplierManagement\Models\Attribute\SupplierAttributeValueMapper;
|
||||
use Modules\SupplierManagement\Models\SupplierMapper;
|
||||
use phpOMS\Asset\AssetType;
|
||||
|
|
@ -56,17 +57,15 @@ final class BackendController extends Controller
|
|||
*/
|
||||
public function viewSupplierManagementAttributeTypeList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
$view->setTemplate('/Modules/SupplierManagement/Theme/Backend/attribute-type-list');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1004801001, $request, $response);
|
||||
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeTypeListView($this->app->l11nManager, $request, $response);
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003203001, $request, $response);
|
||||
|
||||
/** @var \Modules\Attribute\Models\AttributeType[] $attributes */
|
||||
$attributes = SupplierAttributeTypeMapper::getAll()
|
||||
$view->attributes = SupplierAttributeTypeMapper::getAll()
|
||||
->with('l11n')
|
||||
->where('l11n/language', $response->header->l11n->language)
|
||||
->execute();
|
||||
|
||||
$view->data['attributes'] = $attributes;
|
||||
$view->path = 'purchase/supplier';
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
@ -87,7 +86,7 @@ final class BackendController extends Controller
|
|||
{
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
$view->setTemplate('/Modules/SupplierManagement/Theme/Backend/attribute-value-list');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1004801001, $request, $response);
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003203001, $request, $response);
|
||||
|
||||
/** @var \Modules\Attribute\Models\AttributeValue[] $attributes */
|
||||
$attributes = SupplierAttributeValueMapper::getAll()
|
||||
|
|
@ -114,23 +113,55 @@ final class BackendController extends Controller
|
|||
*/
|
||||
public function viewSupplierManagementAttributeType(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
$view->setTemplate('/Modules/SupplierManagement/Theme/Backend/attribute-type');
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1004801001, $request, $response);
|
||||
$view = new \Modules\Attribute\Theme\Backend\Components\AttributeTypeView($this->app->l11nManager, $request, $response);
|
||||
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003203001, $request, $response);
|
||||
|
||||
/** @var \Modules\Attribute\Models\AttributeType $attribute */
|
||||
$attribute = SupplierAttributeTypeMapper::get()
|
||||
$view->attribute = SupplierAttributeTypeMapper::get()
|
||||
->with('l11n')
|
||||
->with('defaults')
|
||||
->with('defaults/l11n')
|
||||
->where('id', (int) $request->getData('id'))
|
||||
->where('l11n/language', $response->header->l11n->language)
|
||||
->where('defaults/l11n/language', [$response->header->l11n->language, null])
|
||||
->execute();
|
||||
|
||||
$l11ns = SupplierAttributeTypeL11nMapper::getAll()
|
||||
->where('ref', $attribute->id)
|
||||
$view->l11ns = SupplierAttributeTypeL11nMapper::getAll()
|
||||
->where('ref', $view->attribute->id)
|
||||
->execute();
|
||||
|
||||
$view->data['attribute'] = $attribute;
|
||||
$view->data['l11ns'] = $l11ns;
|
||||
$view->path = 'purchase/supplier';
|
||||
|
||||
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 viewSupplierManagementAttributeValue(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(1003203001, $request, $response);
|
||||
|
||||
$view->attribute = SupplierAttributeValueMapper::get()
|
||||
->with('l11n')
|
||||
->where('id', (int) $request->getData('id'))
|
||||
->where('l11n/language', [$response->header->l11n->language, null])
|
||||
->execute();
|
||||
|
||||
$view->l11ns = SupplierAttributeValueL11nMapper::getAll()
|
||||
->where('ref', $view->attribute->id)
|
||||
->execute();
|
||||
|
||||
// @todo Also find the ItemAttributeType
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,4 +29,6 @@ abstract class PermissionCategory extends Enum
|
|||
public const SUPPLIER = 1;
|
||||
|
||||
public const ANALYSIS = 2;
|
||||
|
||||
public const ATTRIBUTE = 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Jingga
|
||||
*
|
||||
* PHP Version 8.2
|
||||
*
|
||||
* @package Modules\ItemManagement
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 2.0
|
||||
* @version 1.0.0
|
||||
* @link https://jingga.app
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
/** @var \phpOMS\Views\View $this */
|
||||
$attributes = $this->data['attributes'];
|
||||
|
||||
echo $this->data['nav']->render(); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('AttributeTypes'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||
<div class="slider">
|
||||
<table id="iAttributeTypeList" class="default sticky">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||
<label for="iAttributeTypeList-sort-1">
|
||||
<input type="radio" name="iAttributeTypeList-sort" id="iAttributeTypeList-sort-1">
|
||||
<i class="sort-asc g-icon">expand_less</i>
|
||||
</label>
|
||||
<label for="iAttributeTypeList-sort-2">
|
||||
<input type="radio" name="iAttributeTypeList-sort" id="iAttributeTypeList-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="iAttributeTypeList-sort-2">
|
||||
<input type="radio" name="iAttributeTypeList-sort" id="iAttributeTypeList-sort-2">
|
||||
<i class="sort-asc g-icon">expand_less</i>
|
||||
</label>
|
||||
<label for="iAttributeTypeList-sort-3">
|
||||
<input type="radio" name="iAttributeTypeList-sort" id="iAttributeTypeList-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 ($attributes as $key => $value) : ++$count;
|
||||
$url = UriFactory::build('{/base}/purchase/supplier/attribute/type?{?}&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,65 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Jingga
|
||||
*
|
||||
* PHP Version 8.2
|
||||
*
|
||||
* @package Modules\Tasks
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 2.0
|
||||
* @version 1.0.0
|
||||
* @link https://jingga.app
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use phpOMS\Localization\ISO639Enum;
|
||||
|
||||
$attribute = $this->data['attribute'];
|
||||
$l11ns = $this->data['l11ns'];
|
||||
|
||||
echo $this->data['nav']->render(); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<section id="task" class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Attribute'); ?></div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<div class="form-group">
|
||||
<label for="iId"><?= $this->getHtml('ID'); ?></label>
|
||||
<input type="text" value="<?= $this->printHtml((string) $attribute->id); ?>" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="iName"><?= $this->getHtml('Name'); ?></label>
|
||||
<input type="text" value="<?= $this->printHtml($attribute->name); ?>" disabled>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Language', '0', '0'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||
<table class="default sticky">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
<td>
|
||||
<td><?= $this->getHtml('Language', '0', '0'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Title'); ?>
|
||||
<tbody>
|
||||
<?php $c = 0; foreach ($l11ns as $key => $value) : ++$c; ?>
|
||||
<tr>
|
||||
<td><a href="#"><i class="g-icon">close</i></a>
|
||||
<td><a href="#"><i class="g-icon">settings</i></a>
|
||||
<td><?= ISO639Enum::getByName('_' . \strtoupper($value->language)); ?>
|
||||
<td><?= $value->content; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($c === 0) : ?>
|
||||
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -40,11 +40,11 @@ echo $this->data['nav']->render(); ?>
|
|||
<tr><td><label for="iId"><?= $this->getHtml('ID', '0', '0'); ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="g-icon">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><input type="text" id="iName1" name="name1" required>
|
||||
<tr><td><label for="iName2"><?= $this->getHtml('Name2'); ?></label>
|
||||
<tr><td><input type="text" id="iName2" name="name2" placeholder="">
|
||||
<tr><td><input type="text" id="iName2" name="name2">
|
||||
<tr><td><label for="iName3"><?= $this->getHtml('Name3'); ?></label>
|
||||
<tr><td><input type="text" id="iName3" name="name3" placeholder="">
|
||||
<tr><td><input type="text" id="iName3" name="name3">
|
||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-supplier">
|
||||
</table>
|
||||
</form>
|
||||
|
|
@ -118,15 +118,15 @@ echo $this->data['nav']->render(); ?>
|
|||
<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="g-icon">book</i></button><input id="iSource" name="source" type="text" placeholder=""></span>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="g-icon">book</i></button><input id="iSource" name="source" type="text"></span>
|
||||
<tr><td><label for="iSegment"><?= $this->getHtml('Segment'); ?></label>
|
||||
<tr><td><input id="iSegment" name="segment" type="text" placeholder="">
|
||||
<tr><td><input id="iSegment" name="segment" type="text">
|
||||
<tr><td><label for="iProductgroup"><?= $this->getHtml('Productgroup'); ?></label>
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text" placeholder="">
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text">
|
||||
<tr><td><label for="iGroup"><?= $this->getHtml('Group'); ?></label>
|
||||
<tr><td><input id="iGroup" name="group" type="text" placeholder="">
|
||||
<tr><td><input id="iGroup" name="group" type="text">
|
||||
<tr><td><label for="iArticlegroup"><?= $this->getHtml('Articlegroup'); ?></label>
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text" placeholder="">
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text">
|
||||
<tr><td><label for="iTerm"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td><select id="iTerm" name="term" required>
|
||||
<option>
|
||||
|
|
|
|||
|
|
@ -492,15 +492,15 @@ echo $this->data['nav']->render();
|
|||
<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="g-icon">book</i></button><input id="iSource" name="source" type="text" placeholder=""></span>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="g-icon">book</i></button><input id="iSource" name="source" type="text"></span>
|
||||
<tr><td><label for="iSegment"><?= $this->getHtml('Segment'); ?></label>
|
||||
<tr><td><input id="iSegment" name="segment" type="text" placeholder="">
|
||||
<tr><td><input id="iSegment" name="segment" type="text">
|
||||
<tr><td><label for="iProductgroup"><?= $this->getHtml('Productgroup'); ?></label>
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text" placeholder="">
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text">
|
||||
<tr><td><label for="iGroup"><?= $this->getHtml('Group'); ?></label>
|
||||
<tr><td><input id="iGroup" name="group" type="text" placeholder="">
|
||||
<tr><td><input id="iGroup" name="group" type="text">
|
||||
<tr><td><label for="iArticlegroup"><?= $this->getHtml('Articlegroup'); ?></label>
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text" placeholder="">
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text">
|
||||
<tr><td><label for="iTerm"><?= $this->getHtml('Type'); ?></label>
|
||||
<tr><td><select id="iTerm" name="term" required>
|
||||
<option>
|
||||
|
|
@ -529,25 +529,25 @@ echo $this->data['nav']->render();
|
|||
<option>
|
||||
</select><td>
|
||||
<tr><td><label for="iSource"><?= $this->getHtml('ID'); ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="g-icon">book</i></button><input id="iSource" name="source" type="text" placeholder=""></span>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="g-icon">book</i></button><input id="iSource" name="source" type="text"></span>
|
||||
<tr><td><label for="iSegment"><?= $this->getHtml('Segment'); ?></label>
|
||||
<tr><td><input id="iSegment" name="segment" type="text" placeholder="">
|
||||
<tr><td><input id="iSegment" name="segment" type="text">
|
||||
<tr><td><label for="iProductgroup"><?= $this->getHtml('Productgroup'); ?></label>
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text" placeholder="">
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text">
|
||||
<tr><td><label for="iGroup"><?= $this->getHtml('Group'); ?></label>
|
||||
<tr><td><input id="iGroup" name="group" type="text" placeholder="">
|
||||
<tr><td><input id="iGroup" name="group" type="text">
|
||||
<tr><td><label for="iArticlegroup"><?= $this->getHtml('Articlegroup'); ?></label>
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text" placeholder="">
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text">
|
||||
<tr><td><label for="iPQuantity"><?= $this->getHtml('Quantity'); ?></label>
|
||||
<tr><td><input id="iPQuantity" name="quantity" type="text" placeholder=""><td>
|
||||
<tr><td><input id="iPQuantity" name="quantity" type="text"><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><input id="iPrice" name="price" type="number" step="any" min="0"><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><input id="iDiscount" name="discount" type="number" step="any" min="0"><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><input id="iDiscountP" name="discountp" type="number" step="any" min="0"><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 id="iBonus" name="bonus" type="number" step="any" min="0"><td>
|
||||
<tr><td><input type="submit" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||
</table>
|
||||
</form>
|
||||
|
|
@ -567,17 +567,17 @@ echo $this->data['nav']->render();
|
|||
<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="g-icon">book</i></button><input id="iManager" name="source" type="text" placeholder=""></span>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="g-icon">book</i></button><input id="iManager" name="source" type="text"></span>
|
||||
<tr><td><label for="iSource"><?= $this->getHtml('ID'); ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="g-icon">book</i></button><input id="iSource" name="source" type="text" placeholder=""></span>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="g-icon">book</i></button><input id="iSource" name="source" type="text"></span>
|
||||
<tr><td><label for="iSegment"><?= $this->getHtml('Segment'); ?></label>
|
||||
<tr><td><input id="iSegment" name="segment" type="text" placeholder="">
|
||||
<tr><td><input id="iSegment" name="segment" type="text">
|
||||
<tr><td><label for="iProductgroup"><?= $this->getHtml('Productgroup'); ?></label>
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text" placeholder="">
|
||||
<tr><td><input id="iProductgroup" name="productgroup" type="text">
|
||||
<tr><td><label for="iGroup"><?= $this->getHtml('Group'); ?></label>
|
||||
<tr><td><input id="iGroup" name="group" type="text" placeholder="">
|
||||
<tr><td><input id="iGroup" name="group" type="text">
|
||||
<tr><td><label for="iArticlegroup"><?= $this->getHtml('Articlegroup'); ?></label>
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text" placeholder="">
|
||||
<tr><td><input id="iArticlegroup" name="articlegroup" type="text">
|
||||
<tr><td><input type="submit" value="<?= $this->getHtml('Add', '0', '0'); ?>">
|
||||
</table>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user