This commit is contained in:
2020-06-04 00:29:31 -04:00
parent cc566d4a39
commit c1d4046c93
9 changed files with 17 additions and 39 deletions

View File

@ -117,7 +117,6 @@ class Producto extends Model {
$this->valor = $data->valor;
$this->direccion = new Direccion();
$this->direccion->map($data);
$this->valor($data->valor);
$this->destacado((isset($data->destacado) and $data->destacado == 'on') ? true : false);
$this->descripcion = $data->descripcion;
$this->publicacion = $data->publicacion;

View File

@ -33,6 +33,7 @@ class Bodega extends Producto {
]
];
array_walk($properties, function(&$item) {
$item['prefix'] = $item['prefix'] ?? '';
$item['suffix'] = $item['suffix'] ?? '';
$item = (object) $item;
});
@ -54,6 +55,7 @@ class Bodega extends Producto {
'suffix' => ' m²'
];
array_walk($data, function(&$item) {
$item->prefix = $item->prefix ?? '';
$item->suffix = $item->suffix ?? '';
});
return $data;

View File

@ -42,6 +42,7 @@ class Oficina extends Producto {
]
];
array_walk($properties, function(&$item) {
$item['prefix'] = $item['prefix'] ?? '';
$item['suffix'] = $item['suffix'] ?? '';
$item = (object) $item;
});
@ -52,13 +53,14 @@ class Oficina extends Producto {
$data []= (object) [
'label' => 'Gastos Comunes',
'name' => 'gastos',
'suffix' => ' UF'
'prefix' => '$'
];
$data []= (object) [
'label' => 'UF/m²',
'name' => 'uf_m2'
];
array_walk($data, function(&$item) {
$item->prefix = $item->prefix ?? '';
$item->suffix = $item->suffix ?? '';
});
return $data;

View File

@ -41,7 +41,7 @@ class Retail extends Producto {
public function getProperties(): array {
$properties = [];
$properties []= (object) [
'label' => 'Bono Pie en UF',
'label' => 'Bono Pie %',
'name' => 'bono'
];
$properties []= (object) [
@ -49,7 +49,7 @@ class Retail extends Producto {
'name' => 'rentabilidad'
];
$properties []= (object) [
'label' => 'Valor Cuota en UF',
'label' => 'Valor Cuota en $',
'name' => 'cuota'
];
$properties []= (object) [
@ -84,7 +84,7 @@ class Retail extends Producto {
[
'label' => 'Bono Pie',
'name' => 'bono',
'suffix' => ' UF'
'suffix' => '%'
],
[
'label' => 'Rentabilidad',
@ -94,7 +94,7 @@ class Retail extends Producto {
[
'label' => 'Valor Cuota',
'name' => 'cuota',
'suffix' => ' UF'
'prefix' => '$'
],
[
'label' => 'Entrega Estimada',
@ -102,6 +102,7 @@ class Retail extends Producto {
]
];
array_walk($properties, function(&$item) {
$item['prefix'] = $item['prefix'] ?? '';
$item['suffix'] = $item['suffix'] ?? '';
$item = (object) $item;
});
@ -140,6 +141,7 @@ class Retail extends Producto {
]
];
array_walk($properties, function(&$item) {
$item['prefix'] = $item['prefix'] ?? '';
$item['suffix'] = $item['suffix'] ?? '';
$item = (object) $item;
});

View File

@ -28,6 +28,7 @@ class Terreno extends Producto {
]
];
array_walk($properties, function(&$item) {
$item['prefix'] = $item['prefix'] ?? '';
$item['suffix'] = $item['suffix'] ?? '';
$item = (object) $item;
});