mirror of
https://github.com/Karaka-Management/oms-ClientManagement.git
synced 2026-01-26 06:38:40 +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
|
||||
{
|
||||
return $a->getOrder() <=> $b->getOrder();
|
||||
return $a->order <=> $b->order;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -87,9 +87,10 @@ class ClientAttribute implements \JsonSerializable, ArrayableInterface
|
|||
public function toArray() : array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'type' => $this->type,
|
||||
'value' => $this->value,
|
||||
'id' => $this->id,
|
||||
'client' => $this->client,
|
||||
'type' => $this->type,
|
||||
'value' => $this->value,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ final class NullClientAttribute extends ClientAttribute
|
|||
*/
|
||||
public function __construct(int $id = 0)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->id = $id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use Modules\Media\Models\NullMedia;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
/** @var \phpOMS\Views\View $this */
|
||||
|
|
|
|||
|
|
@ -86,11 +86,11 @@ echo $this->getData('nav')->render();
|
|||
<div class="portlet-body">
|
||||
<table class="layout wf-100">
|
||||
<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><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><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>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -147,7 +147,7 @@ echo $this->getData('nav')->render();
|
|||
|
||||
<section class="portlet highlight-4">
|
||||
<div class="portlet-body">
|
||||
<textarea class="undecorated"><?= $this->printHtml($client->getInfo()); ?></textarea>
|
||||
<textarea class="undecorated"><?= $this->printHtml($client->info); ?></textarea>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ final class ClientAttributeTest extends \PHPUnit\Framework\TestCase
|
|||
self::assertEquals(
|
||||
[
|
||||
'id',
|
||||
'client',
|
||||
'type',
|
||||
'value',
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user