pcpuma_unam_operador/components/botones/BotonDesactivar.vue
2022-07-25 07:49:16 -05:00

33 lines
698 B
Vue

<template>
<b-field>
<b-button
:type="row.activo || row.mostrar ? 'is-success' : 'is-danger'"
@click="
$alertsGenericos.imprimirWarning(
$buefy,
msjWarning,
llamarActivarDesactivar
)
"
expanded
>
{{ row.activo || row.mostrar ? 'Activo' : 'Inactivo' }}
</b-button>
</b-field>
</template>
<script>
export default {
props: {
activarDesactivar: { type: Function, required: true },
row: { type: Object, required: true, default: () => ({}) },
msjWarning: { type: String, required: true },
},
methods: {
llamarActivarDesactivar() {
this.activarDesactivar(row)
},
},
}
</script>