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
d1b0d336
Commit
d1b0d336
authored
Feb 17, 2023
by
Le Dinh Trung
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/update' into 'dev'
Hotfix/update See merge request
!21
parents
b7aa4a55
2a08846f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
29 deletions
+29
-29
nuxt.config.js
nuxt.config.js
+1
-2
index.vue
pages/categories/index.vue
+1
-1
index.vue
pages/posts/index.vue
+6
-8
index.vue
pages/products/index.vue
+21
-18
No files found.
nuxt.config.js
View file @
d1b0d336
...
...
@@ -48,8 +48,7 @@ export default {
// https://go.nuxtjs.dev/axios
'
@nuxtjs/axios
'
,
'
@nuxtjs/auth-next
'
,
'
@nuxtjs/toast
'
,
'
@pinia/nuxt
'
'
@nuxtjs/toast
'
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
...
...
pages/categories/index.vue
View file @
d1b0d336
...
...
@@ -612,7 +612,7 @@ export default {
}
})
.then((response) => {
self.$toast.success('
User
updated successfully!', {
self.$toast.success('
Category
updated successfully!', {
duration: 3000
})
this.editedItem = response.data.data
...
...
pages/posts/index.vue
View file @
d1b0d336
...
...
@@ -106,12 +106,11 @@
</v-col>
<v-col
cols=
"12"
text-align=
" left"
>
<v-img
v-for=
"(imageEdit, index) in eImages"
:key=
"index"
v-if=
"typeof eImages === 'string'"
contain
height=
"100px"
width=
"150px"
:src=
"
imageEdit
"
:src=
"
eImages
"
/>
</v-col>
</v-row>
...
...
@@ -213,7 +212,6 @@
v-model=
"category_id"
:items=
"categories"
:search=
"search"
:filter=
"filter"
item-text=
"name"
item-value=
"id"
label=
"Category"
...
...
@@ -630,7 +628,7 @@ export default {
})
.catch((error) => {
console.log(error)
self.$toast.error('something went wrong while trying
cre
ate!', {
self.$toast.error('something went wrong while trying
upd
ate!', {
duration: 3000
})
})
...
...
@@ -668,7 +666,7 @@ export default {
padding-left
:
90px
!important
;
}
img
{
width
:
100%
;
height
:
100%
;
}
width
:
100px
;
height
:
150px
;
}
</
style
>
pages/products/index.vue
View file @
d1b0d336
...
...
@@ -761,6 +761,7 @@ export default {
this
.
eImages
=
item
.
images
this
.
editedIndex
=
this
.
products
.
indexOf
(
item
)
console
.
log
(
item
.
variants
)
console
.
log
(
typeof
this
.
eImages
)
this
.
dialog3
=
true
},
updateProduct
(
ID
)
{
...
...
@@ -784,26 +785,28 @@ export default {
}
}
const
currentPostIndex
=
this
.
editedIndex
try
{
this
.
$axios
.
post
(
`/products/update/
${
this
?.
eId
}
`,
fd, {
headers: {
Authorization: `
Bearer
$
{
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
}
this
.
$axios
.
post
(
`/products/update/
${
this
?.
eId
}
`,
fd, {
headers: {
Authorization: `
Bearer
$
{
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
}
)
.then((response) => {
self.$toast.success('Product updated successfully!', {
duration: 3000
})
console.log(response)
this.editedItem = response.data.data
Object.assign(this.products[currentPostIndex], this.editedItem)
}
)
.then((response) => {
self.$toast.success('Product updated successfully!', {
duration: 3000
})
} catch (error) {
console.log(error)
}
console.log(response)
this.editedItem = response.data.data
Object.assign(this.products[currentPostIndex], this.editedItem)
})
.catch((error) => {
console.log(error)
self.$toast.error('something went wrong while trying update!', {
duration: 3000
})
})
},
addMore () {
this.variants.push({
...
...
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