memos order by upated & fix created
This commit is contained in:
@@ -43,12 +43,20 @@ export default {
|
||||
axios.get('/api/memos')
|
||||
.then(response => {
|
||||
this.memos = response.data.data
|
||||
this.reorderList()
|
||||
this.loading = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
console.log('Unable to fetch memos.')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
reorderList() {
|
||||
this.memos.sort(function(a, b) {
|
||||
return a.data.last_updated_timestamp + b.data.last_updated_timestamp
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user