3 Commits

2 changed files with 27 additions and 2 deletions

View File

@@ -10,7 +10,8 @@
</v-form> </v-form>
</v-card-text> </v-card-text>
<v-card-actions> <v-card-actions>
<v-btn type="submit" form="code-form">Aceptar</v-btn> <v-btn type="submit" form="code-form" color="green">Aceptar</v-btn>
<v-btn :to="{ path: '/' }" color="red">Cancelar</v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</v-dialog> </v-dialog>

View File

@@ -39,8 +39,26 @@
{{ currencyFormat(calculateSubtotal(item.unit_price, item.quantity)) }} {{ currencyFormat(calculateSubtotal(item.unit_price, item.quantity)) }}
</template> </template>
</v-data-table-virtual> </v-data-table-virtual>
<v-alert type="info" class="my-4">
Recuerda adicionar a la planilla física lo siguiente
<v-data-table
:headers="headersTemplate"
:items="[purchase]"
item-key="id"
hide-default-footer
>
<template v-slot:item="{ item }">
<tr>
<td>{{ item.id }}</td>
<td>{{ item.date }}</td>
<td><span v-if="item.customer">{{ item.customer.name }}</span></td>
<td><span v-if="item.lines">{{ currencyFormat(calculateTotal(item.lines)) }}</span></td>
</tr>
</template>
</v-data-table>
</v-alert>
<div class="text-center"> <div class="text-center">
<v-btn :to="{ path: 'comprar' }" color="green">Ir a Comprar</v-btn> <v-btn :to="{ path: '/' }" color="green">Ir al inicio</v-btn>
</div> </div>
</v-container> </v-container>
</v-container> </v-container>
@@ -65,6 +83,12 @@
{ title: 'Cantidad', value: 'quantity' }, { title: 'Cantidad', value: 'quantity' },
{ title: 'Subtotal', value: 'subtotal' }, { title: 'Subtotal', value: 'subtotal' },
], ],
headersTemplate: [
{title: 'Compra', value: 'id'},
{title: 'Fecha', value: 'date'},
{title: 'Nombre', value: 'customer.name'},
{title: 'Valor', value: ''},
],
}; };
}, },
created() { created() {