Listados separados por hojas (tabs)
This commit is contained in:
@ -14,67 +14,77 @@
|
|||||||
<b>Fecha Inicio:</b> {{ $contract->current()->date->format('d/m/Y') }} <br/>
|
<b>Fecha Inicio:</b> {{ $contract->current()->date->format('d/m/Y') }} <br/>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui active inline loader"></div>
|
<div class="ui active inline loader"></div>
|
||||||
<table class="ui table" id="tipos">
|
<div id="results">
|
||||||
<thead>
|
<div class="ui top attached tabular menu">
|
||||||
<tr>
|
<a class="item active" data-tab="tipos">Tipos</a>
|
||||||
<th rowspan="2">Tipo</th>
|
<a class="item" data-tab="lineas">Líneas</a>
|
||||||
<th class="center aligned" rowspan="2">Cantidad</th>
|
<a class="item" data-tab="unidades">Unidades</a>
|
||||||
<th class="center aligned" colspan="3">Precio</th>
|
</div>
|
||||||
<th class="center aligned" colspan="3">Promoción</th>
|
<div class="ui bottom attached tab basic horizontally fitted segment active" data-tab="tipos">
|
||||||
<th class="right aligned" rowspan="2">Acciones</th>
|
<table class="ui table" id="tipos">
|
||||||
</tr>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="right aligned">Mínimo</th>
|
<th rowspan="2">Tipo</th>
|
||||||
<th class="right aligned">Promedio</th>
|
<th class="center aligned" rowspan="2">Cantidad</th>
|
||||||
<th class="right aligned">Máximo</th>
|
<th class="center aligned" colspan="3">Precio</th>
|
||||||
<th class="right aligned">Mínima</th>
|
<th class="center aligned" colspan="3">Promoción</th>
|
||||||
<th class="right aligned">Promedio</th>
|
<th class="right aligned" rowspan="2">Acciones</th>
|
||||||
<th class="right aligned">Máxima</th>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</thead>
|
<th class="right aligned">Mínimo</th>
|
||||||
<tbody></tbody>
|
<th class="right aligned">Promedio</th>
|
||||||
</table>
|
<th class="right aligned">Máximo</th>
|
||||||
<table class="ui table" id="lineas">
|
<th class="right aligned">Mínima</th>
|
||||||
<thead>
|
<th class="right aligned">Promedio</th>
|
||||||
<tr>
|
<th class="right aligned">Máxima</th>
|
||||||
<th rowspan="2">Tipo</th>
|
</tr>
|
||||||
<th class="center aligned" rowspan="2">Línea</th>
|
</thead>
|
||||||
<th class="center aligned" rowspan="2">Orientación</th>
|
<tbody></tbody>
|
||||||
<th class="center aligned" rowspan="2">Tipología</th>
|
</table>
|
||||||
<th class="center aligned" rowspan="2">Cantidad</th>
|
</div>
|
||||||
<th class="center aligned" colspan="3">Precio</th>
|
<div class="ui bottom attached tab basic horizontally fitted segment" data-tab="lineas">
|
||||||
<th class="center aligned" colspan="3">Promoción</th>
|
<table class="ui table" id="lineas">
|
||||||
<th class="right aligned" rowspan="2">Acciones</th>
|
<thead>
|
||||||
</tr>
|
<tr>
|
||||||
<tr>
|
<th rowspan="2">Tipo</th>
|
||||||
<th class="right aligned">Mínimo</th>
|
<th class="center aligned" rowspan="2">Línea</th>
|
||||||
<th class="right aligned">Promedio</th>
|
<th class="center aligned" rowspan="2">Orientación</th>
|
||||||
<th class="right aligned">Máximo</th>
|
<th class="center aligned" rowspan="2">Cantidad</th>
|
||||||
<th class="right aligned">Mínima</th>
|
<th class="center aligned" colspan="3">Precio</th>
|
||||||
<th class="right aligned">Promedio</th>
|
<th class="center aligned" colspan="3">Promoción</th>
|
||||||
<th class="right aligned">Máxima</th>
|
<th class="right aligned" rowspan="2">Acciones</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
<tr>
|
||||||
<tbody></tbody>
|
<th class="right aligned">Mínimo</th>
|
||||||
</table>
|
<th class="right aligned">Promedio</th>
|
||||||
<div id="unidades_container">
|
<th class="right aligned">Máximo</th>
|
||||||
<table class="ui table" id="unidades">
|
<th class="right aligned">Mínima</th>
|
||||||
<thead>
|
<th class="right aligned">Promedio</th>
|
||||||
<tr>
|
<th class="right aligned">Máxima</th>
|
||||||
<th>Tipo</th>
|
</tr>
|
||||||
<th>Tipo Order</th>
|
</thead>
|
||||||
<th class="right aligned">Unidad</th>
|
<tbody></tbody>
|
||||||
<th>Unidad Orden</th>
|
</table>
|
||||||
<th>Estado</th>
|
</div>
|
||||||
<th class="right aligned">Precio</th>
|
<div class="ui bottom attached tab basic horizontally fitted segment" data-tab="unidades">
|
||||||
<th class="right aligned">Promoción</th>
|
<table class="ui table" id="unidades">
|
||||||
<th>Fecha Inicio</th>
|
<thead>
|
||||||
<th>Fecha Término</th>
|
<tr>
|
||||||
<th class="right aligned">Acciones</th>
|
<th>Tipo</th>
|
||||||
</tr>
|
<th>Tipo Order</th>
|
||||||
</thead>
|
<th class="right aligned">Unidad</th>
|
||||||
<tbody></tbody>
|
<th>Unidad Orden</th>
|
||||||
</table>
|
<th>Estado</th>
|
||||||
|
<th class="right aligned">Precio</th>
|
||||||
|
<th class="right aligned">Promoción</th>
|
||||||
|
<th>Fecha Inicio</th>
|
||||||
|
<th>Fecha Término</th>
|
||||||
|
<th class="right aligned">Acciones</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@ -312,9 +322,8 @@
|
|||||||
tbody.innerHTML += [
|
tbody.innerHTML += [
|
||||||
`<tr>`,
|
`<tr>`,
|
||||||
`<td>${tipo.charAt(0).toUpperCase() + tipo.slice(1)}</td>`,
|
`<td>${tipo.charAt(0).toUpperCase() + tipo.slice(1)}</td>`,
|
||||||
`<td class="center aligned">${linea}</td>`,
|
`<td class="center aligned"><span data-tooltip="${unidades[0].proyecto_tipo_unidad.tipologia}" data-position="right center">${linea}</span></td>`,
|
||||||
`<td class="center aligned">${orientacion}</td>`,
|
`<td class="center aligned">${orientacion}</td>`,
|
||||||
`<td class="center aligned">${unidades[0].proyecto_tipo_unidad.tipologia}</td>`,
|
|
||||||
`<td class="center aligned">${unidades.length}</td>`,
|
`<td class="center aligned">${unidades.length}</td>`,
|
||||||
`<td class="right aligned">UF ${units.formatters.ufs.format(precios.min)}</td>`,
|
`<td class="right aligned">UF ${units.formatters.ufs.format(precios.min)}</td>`,
|
||||||
`<td class="right aligned">UF ${units.formatters.ufs.format(precios.avg)}</td>`,
|
`<td class="right aligned">UF ${units.formatters.ufs.format(precios.avg)}</td>`,
|
||||||
@ -363,18 +372,25 @@
|
|||||||
}
|
}
|
||||||
$(`#${units.ids.units}`).DataTable(dto)
|
$(`#${units.ids.units}`).DataTable(dto)
|
||||||
|
|
||||||
document.getElementById(units.ids.unidades_container).style.visibility = 'hidden'
|
$(`#${units.ids.results}`).find('.tabular.menu .item').tab({
|
||||||
document.getElementById(units.ids.tipos).style.visibility = 'hidden'
|
onVisible: function(tabPath) {
|
||||||
document.getElementById(units.ids.lineas).style.visibility = 'hidden'
|
if (tabPath !== 'unidades') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
$(this.querySelector('table')).DataTable().columns.adjust().draw()
|
||||||
|
this.querySelector('table').style.width = ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
document.getElementById(units.ids.results).style.visibility = 'hidden'
|
||||||
|
|
||||||
units.get().units().then(() => {
|
units.get().units().then(() => {
|
||||||
units.get().prices().then(() => {
|
units.get().prices().then(() => {
|
||||||
units.get().promotions().then(() => {
|
units.get().promotions().then(() => {
|
||||||
units.get().sold().then(() => {
|
units.get().sold().then(() => {
|
||||||
$(units.ids.loader).hide()
|
$(units.ids.loader).hide()
|
||||||
document.getElementById(units.ids.unidades_container).style.visibility = 'visible'
|
|
||||||
document.getElementById(units.ids.tipos).style.visibility = 'visible'
|
document.getElementById(units.ids.results).style.visibility = 'visible'
|
||||||
document.getElementById(units.ids.lineas).style.visibility = 'visible'
|
|
||||||
units.draw().units()
|
units.draw().units()
|
||||||
units.draw().tipos()
|
units.draw().tipos()
|
||||||
units.draw().lineas()
|
units.draw().lineas()
|
||||||
@ -385,7 +401,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
units.setup({units: 'unidades', unidades_container: 'unidades_container', tipos: 'tipos', lineas: 'lineas', loader: '.ui.loader'})
|
units.setup({results: 'results', units: 'unidades', tipos: 'tipos', lineas: 'lineas', loader: '.ui.loader'})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
Reference in New Issue
Block a user