autofixes

This commit is contained in:
Dennis Eichhorn 2020-08-30 20:13:10 +02:00
parent eb33279ee7
commit 752408fe01
8 changed files with 33 additions and 22 deletions

View File

@ -136,7 +136,7 @@ final class GSDCostCenter implements \JsonSerializable
return $this->description;
}
/**
/**
* Set cost center
*
* @param string $costCenter Cost center

View File

@ -136,7 +136,7 @@ final class GSDCostObject implements \JsonSerializable
return $this->description;
}
/**
/**
* Set cost object
*
* @param string $costObject Cost object

View File

@ -2,25 +2,25 @@
<div class="col-xs-12 col-md-6">
<section class="portlet">
<form id="fImport" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/api}admin/exchange/import/profile?{?}&exchange=GSD&csrf={$CSRF}'); ?>">
<div class="portlet-head"><?= $this->getHtml('Import') ?> - GSD</div>
<div class="portlet-head"><?= $this->getHtml('Import'); ?> - GSD</div>
<div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed">
<tbody>
<tr><td><label for="iHost"><?= $this->getHtml('Host') ?></label>
<tr><td><input type="text" id="iHost" name="host" placeholder="&#xf040; <?= $this->getHtml('Host') ?>" required><input type="hidden" id="iDb" name="db" value="<?= \phpOMS\DataStorage\Database\DatabaseType::SQLSRV; ?>" required>
<tr><td><label for="iPort"><?= $this->getHtml('Port') ?></label>
<tr><td><label for="iHost"><?= $this->getHtml('Host'); ?></label>
<tr><td><input type="text" id="iHost" name="host" placeholder="&#xf040; <?= $this->getHtml('Host'); ?>" required><input type="hidden" id="iDb" name="db" value="<?= \phpOMS\DataStorage\Database\DatabaseType::SQLSRV; ?>" required>
<tr><td><label for="iPort"><?= $this->getHtml('Port'); ?></label>
<tr><td><input type="text" id="iPort" name="port" value="1433" required>
<tr><td><label for="iDatabase"><?= $this->getHtml('Database') ?></label>
<tr><td><input type="text" id="iDatabase" name="database" placeholder="&#xf040; <?= $this->getHtml('Database') ?>" required>
<tr><td><label for="iLogin"><?= $this->getHtml('Login') ?></label>
<tr><td><input type="text" id="iLogin" name="login" placeholder="&#xf040; <?= $this->getHtml('Login') ?>" required>
<tr><td><label for="iPassword"><?= $this->getHtml('Password') ?></label>
<tr><td><input type="password" id="iPassword" name="password" placeholder="&#xf040; <?= $this->getHtml('Password') ?>" required>
<tr><td><label for="iStart"><?= $this->getHtml('Start') ?></label>
<tr><td><label for="iDatabase"><?= $this->getHtml('Database'); ?></label>
<tr><td><input type="text" id="iDatabase" name="database" placeholder="&#xf040; <?= $this->getHtml('Database'); ?>" required>
<tr><td><label for="iLogin"><?= $this->getHtml('Login'); ?></label>
<tr><td><input type="text" id="iLogin" name="login" placeholder="&#xf040; <?= $this->getHtml('Login'); ?>" required>
<tr><td><label for="iPassword"><?= $this->getHtml('Password'); ?></label>
<tr><td><input type="password" id="iPassword" name="password" placeholder="&#xf040; <?= $this->getHtml('Password'); ?>" required>
<tr><td><label for="iStart"><?= $this->getHtml('Start'); ?></label>
<tr><td><input type="datetime-local" id="iStart" name="start" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>">
<tr><td><label for="iEnd"><?= $this->getHtml('End') ?></label>
<tr><td><label for="iEnd"><?= $this->getHtml('End'); ?></label>
<tr><td><input type="datetime-local" id="iEnd" name="end" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>">
<tr><td><?= $this->getHtml('Options') ?>
<tr><td><?= $this->getHtml('Options'); ?>
<tr><td>
<table class="layout wf-100"><tr><td>
<label class="checkbox" for="iCustomers">

View File

@ -28,12 +28,20 @@ use phpOMS\Stdlib\Base\Enum;
abstract class ExchangeType extends Enum
{
public const CUSTOMER = 1;
public const SUPPLIER = 2;
public const ARTICLE = 3;
public const BOOKING = 4;
public const ACCOUNT = 5;
public const ADDRESS = 6;
public const COSTCENTER = 7;
public const COSTOBJECT = 8;
public const INVOICE = 9;
}

View File

@ -27,6 +27,8 @@ use phpOMS\Stdlib\Base\Enum;
abstract class PermissionState extends Enum
{
public const IMPORT = 1;
public const EXPORT = 2;
public const DASHBOARD = 3;
}

View File

@ -20,16 +20,16 @@ echo $this->getData('nav')->render();
<div class="row">
<div class="col-xs-12">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Exports') ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="portlet-head"><?= $this->getHtml('Exports'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default">
<thead>
<tr>
<td class="wf-100"><?= $this->getHtml('Title') ?>
<td class="wf-100"><?= $this->getHtml('Title'); ?>
<tbody>
<?php $count = 0; foreach ($interfaces as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/exchange/export/profile?{?}&id=' . $value->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Title'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -12,7 +12,7 @@
*/
declare(strict_types=1);
/** @var \phpOMS\Views\View $this */
/** @var \phpOMS\Views\View $this */
$interfaces = $this->getData('interfaces');
echo $this->getData('nav')->render();
@ -20,16 +20,16 @@ echo $this->getData('nav')->render();
<div class="row">
<div class="col-xs-12">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Imports') ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="portlet-head"><?= $this->getHtml('Imports'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default">
<thead>
<tr>
<td class="wf-100"><?= $this->getHtml('Title') ?>
<td class="wf-100"><?= $this->getHtml('Title'); ?>
<tbody>
<?php $count = 0; foreach ($interfaces as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/exchange/import/profile?{?}&id=' . $value->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Title'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -20,6 +20,7 @@ namespace Modules\Exchange\tests\Admin;
class AdminTest extends \PHPUnit\Framework\TestCase
{
protected const MODULE_NAME = 'Exchange';
protected const URI_LOAD = '';
use \Modules\tests\ModuleTestTrait;