mirror of
https://github.com/Karaka-Management/oms-ClientManagement.git
synced 2026-02-13 23:38:43 +00:00
cs fixes, bug fixes, code coverage
This commit is contained in:
parent
672273e43d
commit
9b1cf99422
|
|
@ -248,7 +248,7 @@ class Client
|
||||||
*/
|
*/
|
||||||
private function orderContactElements(ContactElement $a, ContactElement $b) : int
|
private function orderContactElements(ContactElement $a, ContactElement $b) : int
|
||||||
{
|
{
|
||||||
return $a->getOrder() <=> $b->getOrder();
|
return $a->order <=> $b->order;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -87,9 +87,10 @@ class ClientAttribute implements \JsonSerializable, ArrayableInterface
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'type' => $this->type,
|
'client' => $this->client,
|
||||||
'value' => $this->value,
|
'type' => $this->type,
|
||||||
|
'value' => $this->value,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ final class NullClientAttribute extends ClientAttribute
|
||||||
*/
|
*/
|
||||||
public function __construct(int $id = 0)
|
public function __construct(int $id = 0)
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Modules\Media\Models\NullMedia;
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
/** @var \phpOMS\Views\View $this */
|
/** @var \phpOMS\Views\View $this */
|
||||||
|
|
|
||||||
|
|
@ -86,11 +86,11 @@ echo $this->getData('nav')->render();
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table class="layout wf-100">
|
<table class="layout wf-100">
|
||||||
<tr><td><label for="iName1"><?= $this->getHtml('Phone'); ?></label>
|
<tr><td><label for="iName1"><?= $this->getHtml('Phone'); ?></label>
|
||||||
<tr><td><input type="text" id="iName1" name="name1" value="<?= $this->printHtml($client->getMainContactElement(ContactType::PHONE)->getContent()); ?>">
|
<tr><td><input type="text" id="iName1" name="name1" value="<?= $this->printHtml($client->getMainContactElement(ContactType::PHONE)->content); ?>">
|
||||||
<tr><td><label for="iName1"><?= $this->getHtml('Email'); ?></label>
|
<tr><td><label for="iName1"><?= $this->getHtml('Email'); ?></label>
|
||||||
<tr><td><input type="text" id="iName1" name="name1" value="<?= $this->printHtml($client->getMainContactElement(ContactType::EMAIL)->getContent()); ?>">
|
<tr><td><input type="text" id="iName1" name="name1" value="<?= $this->printHtml($client->getMainContactElement(ContactType::EMAIL)->content); ?>">
|
||||||
<tr><td><label for="iName1"><?= $this->getHtml('Website'); ?></label>
|
<tr><td><label for="iName1"><?= $this->getHtml('Website'); ?></label>
|
||||||
<tr><td><input type="text" id="iName1" name="name1" value="<?= $this->printHtml($client->getMainContactElement(ContactType::WEBSITE)->getContent()); ?>">
|
<tr><td><input type="text" id="iName1" name="name1" value="<?= $this->printHtml($client->getMainContactElement(ContactType::WEBSITE)->content); ?>">
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -147,7 +147,7 @@ echo $this->getData('nav')->render();
|
||||||
|
|
||||||
<section class="portlet highlight-4">
|
<section class="portlet highlight-4">
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<textarea class="undecorated"><?= $this->printHtml($client->getInfo()); ?></textarea>
|
<textarea class="undecorated"><?= $this->printHtml($client->info); ?></textarea>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ final class ClientAttributeTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
[
|
[
|
||||||
'id',
|
'id',
|
||||||
|
'client',
|
||||||
'type',
|
'type',
|
||||||
'value',
|
'value',
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user