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 [
- '
',
- '
',
- `
`,
- `
`,
- '
',
- '
',
- `
${unit.type.charAt(0).toUpperCase() + unit.type.slice(1)}
`,
- '',
- '
',
- '
',
- '
',
- '
',
- '',
- ``,
- '
',
- '
',
- ].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 = [
+ '',
+ ''
+ ].join('')
+ }
+ return [
+ '',
+ '
',
+ `
`,
+ `
`,
+ '
',
+ '
',
+ `
${unit.type.charAt(0).toUpperCase() + unit.type.slice(1)}
`,
+ '',
+ '
',
+ '
',
+ '
',
+ promotions,
+ '
',
+ '',
+ ``,
+ '
',
+ '
',
+ ].join('')
}
}
reset() {