Editar Brokers y sus contratos
This commit is contained in:
@ -9,9 +9,9 @@ class Contract extends Common\Ideal\Model
|
||||
public Model\Proyecto $project;
|
||||
public Model\Proyecto\Broker $broker;
|
||||
public float $commission;
|
||||
protected array $states = [];
|
||||
protected ?array $states;
|
||||
|
||||
public function states(): array
|
||||
public function states(): ?array
|
||||
{
|
||||
if (!isset($this->states) or count($this->states) === 0) {
|
||||
$this->states = $this->runFactory('states');
|
||||
@ -20,7 +20,7 @@ class Contract extends Common\Ideal\Model
|
||||
}
|
||||
|
||||
protected ?Contract\State $current;
|
||||
public function currentState(): ?Contract\State
|
||||
public function current(): ?Contract\State
|
||||
{
|
||||
if (!isset($this->current)) {
|
||||
try {
|
||||
@ -39,7 +39,7 @@ class Contract extends Common\Ideal\Model
|
||||
'broker_rut' => $this->broker->rut,
|
||||
'commission' => $this->commission,
|
||||
'states' => $this->states(),
|
||||
'current' => $this->currentState(),
|
||||
'current' => $this->current(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user