Commit 765cf0ac authored by rene's avatar rene
Browse files

ordenar barcas por fecha de creación en Barcas

parent 51367e70
......@@ -105,7 +105,7 @@ export default {
consensos(state) {
return state.consensos
.filter(consenso => consenso.barca_id == this.barcaId)
.sort((a, b) => new Date(b.created_at) > new Date(a.created_at))
.sort((a, b) => new Date(b.updated_at) - new Date(a.updated_at))
},
}),
consensosNuevos() {
......
......@@ -87,9 +87,11 @@ export default {
barcasFiltradas() {
return (
this.barcas.length > 0 &&
this.barcas.filter(({ abordada }) =>
this.filtro === Filtros.ABORDADAS ? abordada : !abordada,
)
this.barcas
.filter(({ abordada }) =>
this.filtro === Filtros.ABORDADAS ? abordada : !abordada,
)
.sort((a, b) => new Date(a.created_at) - new Date(b.created_at))
)
},
filtro() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment