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