Commit 96408668 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

format time

parent 5eb58808
......@@ -220,7 +220,14 @@
</v-card-actions>
</v-card>
</v-dialog>
<v-data-table :headers="headers" :items="categories" sort-by="calories" class="elevation-1">
<v-data-table
:headers="headers"
:items="categories"
sort-by="calories"
class="elevation-1"
group-by="parent_id"
show-group-by
>
<template #top>
<v-toolbar flat>
<v-toolbar-title>Category Manage</v-toolbar-title>
......@@ -283,10 +290,10 @@
</v-toolbar>
</template>
<template #item.created_at="{ item }">
<span>{{ formatDate(item.created_at)}}</span>
<span>{{ formatDate(item.created_at) }}</span>
</template>
<template #item.updated_at="{ item }">
<span>{{ formatDate(item.updated_at)}}</span>
<span>{{ formatDate(item.updated_at) }}</span>
</template>
<template #item.actions="{ item }">
<v-icon :id="item.id" small @click="dialog2 = true; editCategory(item)">
......@@ -330,15 +337,15 @@ export default {
{
text: 'ID',
align: 'start',
value: 'id'
value: 'id',
groupable: false
},
{ text: 'Name', value: 'name' },
{ text: 'Odering', value: 'ordering' },
// { text: 'parent', value: 'parent_id', sortable: false },
{ text: 'Created', value: 'created_at' },
{ text: 'Updated', value: 'updated_at' },
{ text: 'Actions', value: 'actions', sortable: false },
{ text: 'index', value: 'index', sortable: false }
{ text: 'Name', value: 'name', sortable: false },
{ text: 'Odering', value: 'ordering', groupable: false },
{ text: 'parent', value: 'parent_id', sortable: false, groupable: false },
{ text: 'Created', value: 'created_at', groupable: false },
{ text: 'Updated', value: 'updated_at', groupable: false },
{ text: 'Actions', value: 'actions', sortable: false, groupable: false }
],
categories: [],
eID: '',
......@@ -459,7 +466,7 @@ export default {
fd.append('name', this.name)
fd.append('ordering', this.ordering)
fd.append('parent_id', this.parent_id)
fd.append('images', this.image)
fd.append('image', this.image)
this.$axios
.post('/categories/',
fd,
......@@ -539,7 +546,7 @@ export default {
fd.append('name', this.eName)
fd.append('ordering', this.eOrdering)
if (typeof this.eImage !== 'string') {
fd.append('images', this.eImage)
fd.append('image', this.eImage)
}
try {
this.$axios
......
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