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
61a8187e
Commit
61a8187e
authored
Apr 10, 2023
by
vieanh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update error alert message
parent
fc3c2bc9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
25 deletions
+26
-25
index.vue
pages/categories/index.vue
+20
-19
index.vue
pages/posts/index.vue
+2
-2
index.vue
pages/products/index.vue
+2
-2
index.vue
pages/users/index.vue
+2
-2
No files found.
pages/categories/index.vue
View file @
61a8187e
...
...
@@ -542,7 +542,7 @@ export default {
.
catch
((
errors
)
=>
{
console
.
log
(
errors
.
response
.
data
.
message
)
this
.
message
=
errors
.
response
.
data
.
message
self
.
$toast
.
error
(
'
something went wrong while trying create!
'
,
{
self
.
$toast
.
error
(
this
.
message
,
{
duration
:
3000
})
})
...
...
@@ -602,26 +602,27 @@ export default {
if
(
typeof
this
.
eImage
!==
'
string
'
&&
this
.
eImage
!=
null
)
{
fd
.
append
(
'
image
'
,
this
.
eImage
)
}
try
{
this
.
$axios
.
post
(
`categories/update/
${
this
?.
eID
}
`, fd, {
headers: {
Authorization: `
Bearer
$
{
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
}
this
.
$axios
.
post
(
`categories/update/
${
this
?.
eID
}
`, fd, {
headers: {
Authorization: `
Bearer
$
{
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
}
})
.then((response) => {
self.$toast.success('Category updated successfully!', {
duration: 3000
})
.then((response) => {
self.$toast.success('Category updated successfully!', {
duration: 3000
})
this.editedItem = response.data.data
Object.assign(this.categories[this.editedIndex], this.editedItem)
this.clearFile()
this.editedItem = response.data.data
Object.assign(this.categories[this.editedIndex], this.editedItem)
this.clearFile()
}).catch((errors) => {
this.message = errors.response.data.message
self.$toast.error(this.message, {
duration: 3000
})
} catch (error) {
console.log(error)
}
})
},
clearData () {
this.parent_id = ''
...
...
pages/posts/index.vue
View file @
61a8187e
...
...
@@ -555,7 +555,7 @@ export default {
this
.
clearFile
()
})
.
catch
((
errors
)
=>
{
self
.
$toast
.
error
(
'
something went wrong while trying create!
'
,
{
self
.
$toast
.
error
(
errors
.
response
.
data
.
message
,
{
duration
:
3000
})
})
...
...
@@ -628,7 +628,7 @@ export default {
})
.catch((error) => {
console.log(error)
self.$toast.error(
'something went wrong while trying update!'
, {
self.$toast.error(
error.response.data.message
, {
duration: 3000
})
})
...
...
pages/products/index.vue
View file @
61a8187e
...
...
@@ -721,7 +721,7 @@ export default {
.
catch
((
errors
)
=>
{
console
.
log
(
errors
.
response
.
data
.
message
)
this
.
message
=
errors
.
response
.
data
.
message
self
.
$toast
.
error
(
'
something went wrong while trying create!
'
,
{
self
.
$toast
.
error
(
errors
.
response
.
data
.
message
,
{
duration
:
3000
})
})
...
...
@@ -803,7 +803,7 @@ export default {
})
.catch((error) => {
console.log(error)
self.$toast.error(
'something went wrong while trying update!'
, {
self.$toast.error(
error.response.data.message
, {
duration: 3000
})
})
...
...
pages/users/index.vue
View file @
61a8187e
...
...
@@ -403,7 +403,7 @@ export default {
this
.
validate
()
console
.
log
(
errors
.
response
.
data
.
message
)
this
.
message
=
errors
.
response
.
data
.
message
self
.
$toast
.
error
(
'
something went wrong while trying create!
'
,
{
self
.
$toast
.
error
(
this
.
message
,
{
duration
:
3000
})
})
...
...
@@ -467,7 +467,7 @@ export default {
})
.catch((error) => {
console.log(error)
self.$toast.error(
'something went wrong while trying update!'
, {
self.$toast.error(
this.message
, {
duration: 3000
})
})
...
...
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