Files
Andres2908 8f748cbc41 motivo
2022-07-29 13:56:23 -05:00

39 lines
805 B
Vue

<template>
<div class="block pt-5" v-if="motivo">
<div class="has-text-centered pb-4">
<b-tag type="is-danger" size="is-medium">Ticket declinado</b-tag>
</div>
<p class="box"><b>Motivo: </b>{{ motivo }}</p>
</div>
</template>
<script>
import axios from 'axios'
export default {
props: {
folio: { type: String, required: true },
token: { type: Object, required: true },
},
data() {
return {
motivo: '',
}
},
methods: {
traerMotivo() {
axios
.get(`${process.env.api}/admin/motivo?folio=${this.folio}`, this.token)
.then((res) => {
this.motivo = res.data.motivo
})
.catch((err) => {
console.log(err.response.data)
})
},
},
created() {
this.traerMotivo()
},
}
</script>