Search update and optimization
This commit is contained in:
@ -46,7 +46,7 @@ class Unidad extends Ideal\Model
|
||||
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), [
|
||||
$output = array_merge(parent::jsonSerialize(), [
|
||||
'subtipo' => $this->subtipo,
|
||||
'piso' => $this->piso,
|
||||
'descripcion' => $this->descripcion,
|
||||
@ -54,5 +54,10 @@ class Unidad extends Ideal\Model
|
||||
'proyecto_tipo_unidad' => $this->proyectoTipoUnidad,
|
||||
'prorrateo' => $this->prorrateo
|
||||
]);
|
||||
if (isset($this->precios)) {
|
||||
$output['precios'] = $this->precios;
|
||||
$output['current_precio'] = $this->currentPrecio;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user