This commit is contained in:
Dennis Eichhorn 2024-01-02 23:34:19 +00:00
parent d99a587114
commit d209b4a6b1
8 changed files with 143 additions and 7 deletions

View File

@ -27,6 +27,21 @@
"permission": { "permission": 2, "type": null, "element": null },
"parent": 1006701001,
"children": []
},
{
"id": 1006703001,
"pid": "/warehouse/stocktaking",
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/base}/warehouse/stocktaking/list?{?}",
"target": "self",
"icon": null,
"order": 1,
"from": "StockTaking",
"permission": { "permission": 2, "type": null, "element": null },
"parent": 1006701001,
"children": []
}
]
}

View File

@ -1,4 +1,5 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
use Modules\StockTaking\Controller\BackendController;
use Modules\StockTaking\Models\PermissionState;

View File

@ -14,6 +14,11 @@ declare(strict_types=1);
namespace Modules\StockTaking\Controller;
use phpOMS\Contract\RenderableInterface;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
use phpOMS\Views\View;
/**
* Budgeting controller class.
*
@ -24,4 +29,24 @@ namespace Modules\StockTaking\Controller;
*/
final class BackendController extends Controller
{
/**
* 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 viewStockTakingList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{
$view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/StockTaking/Theme/Backend/stocktaking-list');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1006701001, $request, $response);
return $view;
}
}

View File

@ -17,7 +17,7 @@ namespace Modules\StockTaking\Models;
use phpOMS\Stdlib\Base\Enum;
/**
* Permision state enum.
* Permission category enum.
*
* @package Modules\StockTaking\Models
* @license OMS License 2.0

View File

@ -14,5 +14,5 @@ declare(strict_types=1);
return ['Navigation' => [
'StockTaking' => 'Inventur',
'Dashboard' => 'Dashboard',
'Dashboard' => 'Dashboard',
]];

View File

@ -13,6 +13,6 @@
declare(strict_types=1);
return ['Navigation' => [
'StockTaking' => 'StockTaking',
'Dashboard' => 'Dashboard',
'StockTaking' => 'Stocktaking',
'Dashboard' => 'Dashboard',
]];

View File

@ -1,10 +1,11 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\StockTaking
* @package Modules\AssetManagement
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
@ -12,4 +13,46 @@
*/
declare(strict_types=1);
echo $this->data['nav']->render();
use phpOMS\Uri\UriFactory;
/** @var \phpOMS\Views\View $this */
$assets = $this->data['assets'] ?? [];
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Stocktaking'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider">
<table id="iSalesClientList" class="default sticky">
<thead>
<tr>
<td>
<td><?= $this->getHtml('Stock'); ?>
<td><?= $this->getHtml('Location'); ?>
<td><?= $this->getHtml('No'); ?>
<td class="wf-100"><?= $this->getHtml('Item'); ?>
<td><?= $this->getHtml('Quantity'); ?>
<td><?= $this->getHtml('Stock'); ?>
<tbody>
<?php
$count = 0;
foreach ($assets as $key => $value) :
++$count;
$url = UriFactory::build('{/base}/accounting/asset/profile?{?}&id=' . $value->id);
?>
<tr data-href="<?= $url; ?>">
<td>
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml((string) $value->id); ?></a>
<td data-label="<?= $this->getHtml('Status'); ?>"><a href="<?= $url; ?>"><?= $this->getHtml(':status' . $value->status); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td data-label="<?= $this->getHtml('Type'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->type->getL11n()); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="8" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
</section>
</div>
</div>

View File

@ -0,0 +1,52 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\AssetManagement
* @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 */
$assets = $this->data['assets'] ?? [];
echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Stocktaking'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider">
<table id="iSalesClientList" class="default sticky">
<thead>
<tr>
<td>
<td class="wf-100"><?= $this->getHtml('Date'); ?>
<td><?= $this->getHtml('Status'); ?>
<tbody>
<?php
$count = 0;
foreach ($assets as $key => $value) :
++$count;
$url = UriFactory::build('{/base}/accounting/asset/profile?{?}&id=' . $value->id);
?>
<tr data-href="<?= $url; ?>">
<td>
<td data-label="<?= $this->getHtml('Date', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml((string) $value->id); ?></a>
<td>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
</section>
</div>
</div>