2022-08-25 21:27:32 +00:00
|
|
|
<template>
|
|
|
|
<b-table
|
|
|
|
class="pb-6"
|
|
|
|
:current-page="page"
|
|
|
|
:data="multas"
|
|
|
|
:loading="isLoadingTable"
|
|
|
|
:per-page="25"
|
|
|
|
:total="total"
|
|
|
|
@page-change="onPageChange"
|
|
|
|
backend-pagination
|
|
|
|
detailed
|
|
|
|
hoverable
|
|
|
|
paginated
|
|
|
|
show-detail-icon
|
|
|
|
striped
|
|
|
|
>
|
|
|
|
<b-table-column
|
|
|
|
field="usuario"
|
|
|
|
label="Número de cuenta/trabajador"
|
|
|
|
v-slot="props"
|
|
|
|
v-if="columnaUsuario"
|
|
|
|
centered
|
|
|
|
>
|
|
|
|
<p>{{ props.row.prestamo.usuario.usuario }}</p>
|
|
|
|
</b-table-column>
|
|
|
|
|
|
|
|
<b-table-column
|
|
|
|
field="fechaInicio"
|
|
|
|
label="Fecha Inicio"
|
|
|
|
v-slot="props"
|
|
|
|
centered
|
|
|
|
>
|
2022-09-05 23:45:01 +00:00
|
|
|
<p>{{ fecha(props.row.fecha_inicio) }}</p>
|
2022-08-25 21:27:32 +00:00
|
|
|
</b-table-column>
|
|
|
|
|
|
|
|
<b-table-column field="fechaFin" label="Fecha Fin" v-slot="props" centered>
|
2022-09-05 23:45:01 +00:00
|
|
|
<p>{{ fecha(props.row.fecha_fin) }}</p>
|
2022-08-25 21:27:32 +00:00
|
|
|
</b-table-column>
|
|
|
|
|
|
|
|
<b-table-column field="operador" label="Operador" v-slot="props" centered>
|
2022-09-08 22:58:08 +00:00
|
|
|
<p>{{ props.row.operadorMulta.operador || '' }}</p>
|
2022-08-25 21:27:32 +00:00
|
|
|
</b-table-column>
|
|
|
|
|
|
|
|
<b-table-column field="activo" label="Status" v-slot="props" centered>
|
2022-09-05 22:39:04 +00:00
|
|
|
<p class="tag" :class="props.row.activo ? 'is-success' : 'is-danger'">
|
|
|
|
{{ props.row.activo ? 'Vigente' : 'Expirada' }}
|
|
|
|
</p>
|
2022-08-25 21:27:32 +00:00
|
|
|
</b-table-column>
|
|
|
|
|
|
|
|
<template #detail="props">
|
2022-08-25 22:16:50 +00:00
|
|
|
<b-table :data="[props.row]" hoverable striped>
|
2022-08-25 21:27:32 +00:00
|
|
|
<b-table-column
|
|
|
|
field="descripcion"
|
|
|
|
label="Descripción"
|
|
|
|
v-slot="props"
|
|
|
|
centered
|
|
|
|
>
|
|
|
|
<p>{{ props.row.descripcion }}</p>
|
|
|
|
</b-table-column>
|
|
|
|
|
|
|
|
<b-table-column
|
|
|
|
field="infraccion"
|
|
|
|
label="Infraccion extra"
|
|
|
|
v-slot="props"
|
|
|
|
centered
|
|
|
|
>
|
|
|
|
<p
|
|
|
|
v-if="
|
|
|
|
props.row.institucionInfraccion &&
|
|
|
|
props.row.institucionInfraccion.infraccion.id_infraccion != 1
|
|
|
|
"
|
|
|
|
>
|
|
|
|
{{ props.row.institucionInfraccion.infraccion.infraccion }}
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p v-else>-</p>
|
|
|
|
</b-table-column>
|
|
|
|
|
2022-09-05 22:39:04 +00:00
|
|
|
<b-table-column field="retraso" label="Retraso" v-slot="props" centered>
|
2022-08-25 21:27:32 +00:00
|
|
|
<b-icon
|
|
|
|
class="is-success"
|
|
|
|
icon="check"
|
|
|
|
size="is-large"
|
|
|
|
v-if="props.row.retraso"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<p v-else>-</p>
|
|
|
|
</b-table-column>
|
|
|
|
</b-table>
|
|
|
|
</template>
|
|
|
|
</b-table>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import moment from 'moment'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
multas: { type: Array, required: true, default: () => [] },
|
|
|
|
columnaUsuario: { type: Boolean, required: false, default: false },
|
|
|
|
isLoadingTable: { type: Boolean, required: true, default: false },
|
|
|
|
onPageChange: { type: Function, required: true, default: () => {} },
|
|
|
|
page: { type: Number, required: true, default: 0 },
|
|
|
|
total: { type: Number, required: true, default: 0 },
|
|
|
|
},
|
|
|
|
methods: {
|
2022-09-05 23:45:01 +00:00
|
|
|
fecha(date) {
|
|
|
|
return moment(date).format('YYYY-MM-DD')
|
2022-08-25 21:27:32 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|