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
fd1a54b9
Commit
fd1a54b9
authored
Jan 16, 2023
by
TTS Kieu Tuan Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ident
parent
209387e4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
53 deletions
+13
-53
categories.vue
pages/home/categories.vue
+6
-22
index.vue
pages/home/index.vue
+2
-12
users.vue
pages/home/users.vue
+5
-15
index.vue
pages/index.vue
+0
-4
No files found.
pages/home/categories.vue
View file @
fd1a54b9
...
...
@@ -30,7 +30,6 @@
placeholder=
"Parent ID"
v-model=
"parent_id"
/>
<label>
Ordering :
</label>
<input
type=
"text"
...
...
@@ -48,7 +47,6 @@
placeholder=
"Choose a image or drop it here..."
drop-placeholder=
"Drop file here..."
></b-form-file>
</form>
</p>
<template
#modal-footer
>
...
...
@@ -76,7 +74,6 @@
placeholder=
"Parent ID"
v-model=
"eParent_id"
/>
<label>
Ordering :
</label>
<input
type=
"text"
...
...
@@ -92,7 +89,6 @@
placeholder=
"Choose a image or drop it here..."
drop-placeholder=
"Drop file here..."
></b-form-file>
</form>
</p>
<
template
#modal-footer
>
...
...
@@ -101,7 +97,6 @@
</
template
>
</b-modal>
<div>
<v-data-table
:headers=
"headers"
:items=
"categories"
...
...
@@ -120,7 +115,6 @@
<v-card-title>
<span
class=
"text-h5"
>
{{ formTitle }}
</span>
</v-card-title>
<v-card-text>
<v-container>
<v-row>
...
...
@@ -157,7 +151,6 @@
</v-row>
</v-container>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color=
"blue darken-1"
text
@
click=
"close"
>
...
...
@@ -195,13 +188,7 @@
</
template
>
</v-data-table>
</div>
</div>
</template>
<
script
>
import
Nav
from
"
@/components/Nav
"
;
...
...
@@ -216,7 +203,6 @@ export default {
components
:
{
Navigation
},
components
:
{
notification
},
middleware
:
[
"
web
"
],
data
:
()
=>
{
return
{
parent_id
:
''
,
...
...
@@ -256,7 +242,6 @@ export default {
status
:
""
,
created_at
:
""
,
updated_at
:
""
,
},
defaultItem
:
{
name
:
""
,
...
...
@@ -370,9 +355,9 @@ export default {
this
.
image
=
file
;
console
.
log
(
file
)
console
.
log
(
this
.
image
)
},
deleteCategory
(
ID
,
index
)
{
const
self
=
this
this
.
editedIndex
=
this
.
categories
.
indexOf
(
index
);
if
(
confirm
(
"
Do you really want to delete?
"
)){
try
{
...
...
@@ -380,12 +365,14 @@ export default {
.
delete
(
`http://127.0.0.1:8000/api/categories/
${
ID
}
`
)
.
then
(
response
=>
{
this
.
categories
.
splice
(
this
.
editedIndex
,
1
);
self
.
$toast
.
success
(
'
Category deleted successfully!
'
,{
duration
:
3000
});
})
}
catch
(
error
){
console
.
log
(
error
)
}
}
},
getID
(
item
)
{
console
.
log
(
this
.
categories
.
indexOf
(
item
))
...
...
@@ -423,9 +410,6 @@ export default {
console.log(error)
}
}
},
};
</
script
>
\ No newline at end of file
pages/home/index.vue
View file @
fd1a54b9
<
template
>
<div>
<div>
<h1
style=
"text-align: center"
>
HOME
</h1>
</div>
</div>
</
template
>
<
script
>
import
{
onMounted
}
from
"
vue
"
;
import
axios
from
"
axios
"
;
import
VueAxios
from
"
vue-axios
"
;
import
Nav
from
"
@/components/Nav
"
;
export
default
{
layout
:
"
admin
"
,
components
:
{
Nav
},
middleware
:
[
'
web
'
],
};
</
script
>
<
style
></
style
>
pages/home/users.vue
View file @
fd1a54b9
...
...
@@ -34,7 +34,6 @@
v-model=
"email"
required
/>
<label>
Password :
</label>
<input
type=
"password"
...
...
@@ -43,7 +42,6 @@
v-model=
"password"
required
/>
</form>
</p>
<template
#modal-footer
>
...
...
@@ -73,7 +71,6 @@
v-model=
"eEmail"
required
/>
<label>
Password :
</label>
<input
type=
"password"
...
...
@@ -194,7 +191,6 @@
</
template
>
</v-data-table>
</div>
</template>
<
script
>
import
Nav
from
"
@/components/Nav
"
;
...
...
@@ -210,7 +206,6 @@ export default {
components
:
{
Navigation
},
components
:
{
notification
},
middleware
:
[
"
web
"
],
data
:
()
=>
{
return
{
email
:
''
,
...
...
@@ -350,7 +345,6 @@ export default {
duration
:
3000
});
});
},
deleteUser
(
userID
)
{
if
(
confirm
(
"
Do you really want to delete?
"
)){
...
...
@@ -361,9 +355,7 @@ export default {
console
.
log
(
error
)
}
}
},
editUser
(
userID
)
{
this
.
$bvModal
.
show
(
'
modal-edit
'
);
this
.
eID
=
userID
;
...
...
@@ -391,8 +383,6 @@ export default {
console.log(error)
}
}
},
};
</
script
>
pages/index.vue
View file @
fd1a54b9
...
...
@@ -118,21 +118,17 @@ export default {
this
.
$router
.
push
(
"
/
"
);
}
},
checkForm
:
function
(
e
)
{
if
(
this
.
name
&&
this
.
age
)
{
return
true
;
}
this
.
errors
=
[];
if
(
!
this
.
name
)
{
this
.
errors
.
push
(
"
Name required.
"
);
}
if
(
!
this
.
age
)
{
this
.
errors
.
push
(
"
Age required.
"
);
}
e
.
preventDefault
();
},
},
...
...
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