2022-07-25 12:49:16 +00:00
|
|
|
<template>
|
2022-07-29 06:55:24 +00:00
|
|
|
<b-field :label="labelDisabled ? 'Status' : ''">
|
2022-07-25 12:49:16 +00:00
|
|
|
<b-button
|
2022-07-27 21:41:02 +00:00
|
|
|
:disabled="disabled"
|
2022-08-14 22:23:01 +00:00
|
|
|
:type="row.activo || row.mostrar ? 'is-success' : 'is-danger'"
|
2022-07-25 12:49:16 +00:00
|
|
|
@click="
|
|
|
|
$alertsGenericos.imprimirWarning(
|
|
|
|
$buefy,
|
|
|
|
msjWarning,
|
|
|
|
llamarActivarDesactivar
|
|
|
|
)
|
|
|
|
"
|
|
|
|
expanded
|
|
|
|
>
|
|
|
|
{{ row.activo || row.mostrar ? 'Activo' : 'Inactivo' }}
|
|
|
|
</b-button>
|
|
|
|
</b-field>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
2022-07-27 21:41:02 +00:00
|
|
|
disabled: { type: Boolean, required: false, default: false },
|
2022-07-29 06:55:24 +00:00
|
|
|
labelDisabled: { type: Boolean, required: false, default: false },
|
2022-08-14 22:23:01 +00:00
|
|
|
activarDesactivar: { type: Function, required: true, default: () => {} },
|
2022-07-25 12:49:16 +00:00
|
|
|
row: { type: Object, required: true, default: () => ({}) },
|
2022-08-14 22:23:01 +00:00
|
|
|
msjWarning: { type: String, required: true, default: '' },
|
2022-07-25 12:49:16 +00:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
llamarActivarDesactivar() {
|
2022-07-26 16:49:26 +00:00
|
|
|
this.activarDesactivar(this.row)
|
2022-07-25 12:49:16 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|