mejoras tablas y enpoint update compras
This commit is contained in:
@@ -5,7 +5,12 @@
|
||||
<i class="fa fa-plus fa-2x" @click="toggleDropDown"> </i>
|
||||
</a>
|
||||
<span class="dropdown-menu" :class="{ show: isOpen }">
|
||||
<div class="color_fondo p-3">
|
||||
<card>
|
||||
|
||||
<template slot="header">
|
||||
<img v-if="isUpdate === false" src="img//card-primary.png" alt="" />
|
||||
<img v-else src="img//card-info.png" alt="" />
|
||||
</template>
|
||||
<base-input
|
||||
label="Fecha"
|
||||
v-model="newCompra.fecha"
|
||||
@@ -36,26 +41,36 @@
|
||||
</option>
|
||||
</select>
|
||||
</base-input>
|
||||
<base-button
|
||||
<base-button v-if="isUpdate === false"
|
||||
type="primary"
|
||||
class="mb-3 col-12"
|
||||
size="lg"
|
||||
@click="saveCompra()"
|
||||
>Guardar</base-button
|
||||
>
|
||||
</div>
|
||||
>Guardar</base-button>
|
||||
|
||||
<base-button v-else
|
||||
type="info"
|
||||
class="mb-3 col-12"
|
||||
size="lg"
|
||||
@click="updateCompra(newCompra._id)"
|
||||
>Actualizar</base-button>
|
||||
|
||||
|
||||
</card>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Card from '../Cards/Card.vue';
|
||||
export default {
|
||||
components: { Card },
|
||||
name: "Fcompras",
|
||||
props: ["categorias", "metodos_pago", "newCompra", "saveCompra"],
|
||||
props: ["categorias", "metodos_pago", "newCompra", "saveCompra","isUpdate","updateCompra","openForm"],
|
||||
data() {
|
||||
return {
|
||||
isOpen: false,
|
||||
isOpen: this.openForm
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user