From 600773a27092dcc1ae4327758106ba6b891a234b Mon Sep 17 00:00:00 2001 From: Juan Pablo Vial Date: Mon, 15 Sep 2025 14:07:52 -0300 Subject: [PATCH] Unit promotions --- .../ventas/reservations/modal/add.blade.php | 75 ++++++++++++------- 1 file changed, 47 insertions(+), 28 deletions(-) diff --git a/app/resources/views/ventas/reservations/modal/add.blade.php b/app/resources/views/ventas/reservations/modal/add.blade.php index 4c7fcf2..5e9f2fd 100644 --- a/app/resources/views/ventas/reservations/modal/add.blade.php +++ b/app/resources/views/ventas/reservations/modal/add.blade.php @@ -293,34 +293,7 @@ return } this.components.units.innerHTML = this.data.units.map(unit => { - return [ - '
', - '
', - ``, - `', - '
', - '
', - '', - '
', - '', - '
UF
', - '
', - '
', - '
', - '', - ``, - '
', - '
', - ].join('') + return this.draw.unit(unit) }).join('') this.components.units.querySelectorAll('.dropdown').forEach(dropdown => { $(dropdown).dropdown() @@ -331,6 +304,52 @@ this.remove(idx) }) }) + }, + unit: unit => { + let promotions = '' + if (unit.type === 'departamento') { + promotions = [ + '
', + '', + '', + '
Promociones
', + '', + '
', + '' + ].join('') + } + return [ + '
', + '
', + ``, + `', + '
', + '
', + '', + '
', + '', + '
UF
', + '
', + '
', + promotions, + '
', + '', + ``, + '
', + '
', + ].join('') } } reset() {