minor tpl and bug fixes

This commit is contained in:
Dennis Eichhorn 2020-06-13 21:25:23 +02:00
parent 3170f31822
commit 3d799684f6
5 changed files with 132 additions and 54 deletions

View File

@ -27,7 +27,7 @@ use Modules\Profile\Models\Profile;
*/
class Client
{
private int $id = 0;
protected int $id = 0;
private string $number = '';

39
Models/NullClient.php Normal file
View File

@ -0,0 +1,39 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\ClientManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\ClientManagement\Models;
/**
* Null model
*
* @package Modules\ClientManagement\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class NullClient extends Client
{
/**
* Constructor
*
* @param int $id Model id
*
* @since 1.0.0
*/
public function __construct(int $id = 0)
{
$this->id = $id;
parent::__construct();
}
}

View File

@ -0,0 +1,16 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\ClientManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
return ['Navigation' => [
]];

View File

@ -0,0 +1,67 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\ClientManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
return ['ClientManagement' => [
'Accounting' => 'Buchhaltung',
'Address' => 'Addresse',
'Addresses' => 'Addressen',
'AreaManager' => 'Area Manager',
'Articlegroup' => 'Artikelgruppe',
'Bonus' => 'Bonus',
'Business' => 'Business',
'City' => 'Stadt',
'Client' => 'Kunde',
'Clients' => 'Kunden',
'Contact' => 'Kontakt',
'Country' => 'Land',
'Creditcard' => 'Kreditkarte',
'Date' => 'Datum',
'Default' => 'Standard',
'Delivery' => 'Lieferung',
'Discount' => 'Rabatt',
'DiscountP' => 'Rabatt %',
'Email' => 'Email',
'Fax' => 'Fax',
'Files' => 'Dateien',
'Freightage' => 'Frachtkosten',
'Group' => 'Gruppe',
'ID' => 'ID',
'Info' => 'Info',
'Invoice' => 'Rechnung',
'IsDefault' => 'Ist Standard?',
'Log' => 'Log',
'Logs' => 'Logs',
'Master' => 'Master',
'Name' => 'Name',
'Name1' => 'Name1',
'Name2' => 'Name2',
'Name3' => 'Name3',
'Office' => 'Büro',
'Payment' => 'Zahlung',
'PaymentTerm' => 'Zahlungsziel',
'Phone' => 'Telefon',
'Price' => 'Preis',
'Prices' => 'Preise',
'Private' => 'Privat',
'Productgroup' => 'Produktgruppe',
'Purchase' => 'Einkauf',
'Quantity' => 'Anzahl',
'Sales' => 'Umsatz',
'Segment' => 'Segment',
'Subtype' => 'Untergruppe',
'Support' => 'Support',
'Type' => 'Typ',
'Wire' => 'Wire',
'Zip' => 'Postleitzahl',
]];

View File

@ -1,4 +1,5 @@
<?php
/**
* Orange Management
*
@ -12,59 +13,17 @@
*/
declare(strict_types=1);
use phpOMS\Uri\UriFactory;
$footerView = new \phpOMS\Views\PaginationView($this->l11nManager, $this->request, $this->response);
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
$footerView->setPages(20);
$footerView->setPage(1);
/** @var \phpOMS\Views\View $this */
$clients = $this->getData('client');
echo $this->getData('nav')->render(); ?>
<!-- Hover may be better here?!?!?!
<section class="box w-100">
<header><h1><?= $this->getHtml('Client'); ?></h1></header>
<div class="inner floatLeft wf-100">
<form class="wf-33 floatLeft">
<table class="layout wf-100">
<tr><td><label for="iName1"><?= $this->getHtml('Name1') ?></label>
<tr><td><input type="text" id="iName1" disabled>
<tr><td><label for="iName2"><?= $this->getHtml('Name2') ?></label>
<tr><td><input type="text" id="iName2" disabled>
<tr><td><label for="iName3"><?= $this->getHtml('Name3') ?></label>
<tr><td><input type="text" id="iName3" disabled>
</table>
</form>
<form class="wf-33 floatLeft">
<table class="layout wf-100">
<tr><td><label for="iAddress"><?= $this->getHtml('Address') ?></label>
<tr><td><input type="text" id="iAddress" disabled>
<tr><td><label for="iZip"><?= $this->getHtml('Zip') ?></label>
<tr><td><input type="text" id="iZip" disabled>
<tr><td><label for="iCountry"><?= $this->getHtml('Country') ?></label>
<tr><td><input type="text" id="iCountry" disabled>
</table>
</form>
<form class="wf-33 floatLeft">
<table class="layout wf-100">
<tr><td><label for="iPhone"><?= $this->getHtml('Phone') ?></label>
<tr><td><input type="text" id="iPhone" disabled>
<tr><td><label for="iFax"><?= $this->getHtml('Fax') ?></label>
<tr><td><input type="text" id="iFax" disabled>
<tr><td><label for="iEmail"><?= $this->getHtml('Email') ?></label>
<tr><td><input type="text" id="iEmail" disabled>
</table>
</form>
</div>
</section>
-->
<div class="row">
<div class="col-xs-12">
<div class="box wf-100">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Clients'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default">
<caption><?= $this->getHtml('Clients'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
@ -75,12 +34,9 @@ echo $this->getData('nav')->render(); ?>
<td><?= $this->getHtml('Zip') ?>
<td><?= $this->getHtml('Address') ?>
<td><?= $this->getHtml('Country') ?>
<tfoot>
<tr>
<td colspan="8">
<tbody>
<?php $count = 0; foreach ($clients as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}sales/client/profile?{?}&id=' . $value->getId()); ?>
$url = UriFactory::build('{/prefix}sales/client/profile?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', '0', '0') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getNumber()); ?></a>
<td data-label="<?= $this->getHtml('Name1') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getProfile()->getAccount()->getName1()); ?></a>
@ -92,9 +48,9 @@ echo $this->getData('nav')->render(); ?>
<td data-label="<?= $this->getHtml('Country') ?>">
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="8" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
<tr><td colspan="8" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?>
</table>
</div>
</section>
</div>
</div>