Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
K
kiaisoft_tuananh_nuxt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TTS Tran Viet Anh
kiaisoft_tuananh_nuxt
Commits
96408668
Commit
96408668
authored
Feb 04, 2023
by
TTS Kieu Tuan Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format time
parent
5eb58808
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
index.vue
pages/categories/index.vue
+20
-13
No files found.
pages/categories/index.vue
View file @
96408668
...
...
@@ -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
(
'
image
s
'
,
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
(
'
image
s
'
,
this
.
eImage
)
fd
.
append
(
'
image
'
,
this
.
eImage
)
}
try
{
this
.
$axios
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment