Agregados bonos de transporte y cambio de estilo

This commit is contained in:
Ale 2022-11-13 18:01:01 -03:00
parent 1a961c0732
commit 896baf18dd
4 changed files with 143 additions and 89 deletions

152
public/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="container is-max-widescreen is-max-desktop animate__animated" :class="animation" v-show="!init"> <div class="container is-max-widescreen is-max-desktop animate__animated" :class="animation">
<pedidos-admin-tabs-secciones></pedidos-admin-tabs-secciones> <pedidos-admin-tabs-secciones></pedidos-admin-tabs-secciones>
<div class="block" id="pedidos-seccion" <div class="block" id="pedidos-seccion"
:class="seccionActiva === 'pedidos-seccion' ? 'is-active' : 'is-hidden'"> :class="seccionActiva === 'pedidos-seccion' ? 'is-active' : 'is-hidden'">

View File

@ -1,37 +1,41 @@
<template> <template>
<table class="table is-fullwidth is-striped is-bordered"> <div class="block">
<thead> <div class="block" v-show="!hayBonos">
<tr> <p class="has-text-centered">
<th><abbr title="Bono">Bono</abbr></th> Todavía no hay bonos pedidos.
<th class="is-1"><abbr title="Cantidad">Cantidad</abbr></th> </p>
<th><abbr title="Total a Pagar">Total $</abbr></th> </div>
</tr> <div class="block">
</thead> <table class="table is-fullwidth is-striped is-bordered">
<tfoot> <thead>
<tr> <tr>
<th></th> <th><abbr title="Bono">Bono</abbr></th>
<th>Total bonos</th> <th class="is-1"><abbr title="Cantidad">Cantidad</abbr></th>
<th>$ {{ totalBonos }}</th> <th><abbr title="Total a Pagar">Total $</abbr></th>
</tr> </tr>
<tr> </thead>
<th></th> <tfoot>
<th></th> <tr v-show="hayBonos">
<th></th> <th></th>
</tr> <th>Total bonos</th>
<tr> <th>$ {{ totalBonos }}</th>
<td>Bonos de Transporte</td> </tr>
<td>{{ bonosDeTransporteAprobados }}</td> <tr>
<td>$ {{ bonosDeTransporteAprobados * 15 }}</td> <td> Bonos de Transporte </td>
</tr> <td> {{ bonosDeTransporteAprobados }} </td>
</tfoot> <td> $ {{ bonosDeTransporteAprobados * 15 }} </td>
<tbody> </tr>
<pedidos-admin-fila-bono v-for="(bono, i) in bonosCantidadesTotales" :key="i" </tfoot>
:nombre="bono.nombre" <tbody v-show="hayBonos">
:cantidad="bono.cantidad" <pedidos-admin-fila-bono v-for="(bono, i) in bonosCantidadesTotales" :key="i"
:total="bono.total"> :nombre="bono.nombre"
</pedidos-admin-fila-bono> :cantidad="bono.cantidad"
</tbody> :total="bono.total">
</table> </pedidos-admin-fila-bono>
</tbody>
</table>
</div>
</div>
</template> </template>
<script> <script>
@ -104,6 +108,9 @@ export default {
total += b.total; total += b.total;
}); });
return total; return total;
},
hayBonos: function() {
return this.totalBonos !== 0;
} }
}, },
methods: { methods: {

View File

@ -45,6 +45,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import 'bulma';
hr { hr {
border: none; border: none;
height: 1px; height: 1px;
@ -54,4 +55,8 @@ export default {
border-bottom-style: solid !important; border-bottom-style: solid !important;
border-bottom-width: 1px !important; border-bottom-width: 1px !important;
} }
.tabs li.is-active a {
border-bottom-color: #e3342f;
color: #e3342f;
}
</style> </style>