Search update and optimization

This commit is contained in:
2023-11-23 23:35:19 -03:00
parent bf03e85975
commit e1ef31dccd
10 changed files with 232 additions and 36 deletions

View File

@ -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;
}
}