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
ffcb4ea2
Commit
ffcb4ea2
authored
Feb 17, 2023
by
TTS Kieu Tuan Anh
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://gitlab.kiaisoft.com/kiaisoft.anh.tran2/kiaisoft_tuananh_nuxt
into dev
parents
46c4a8f8
d1b0d336
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
27 deletions
+28
-27
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.
pages/categories/index.vue
View file @
ffcb4ea2
...
...
@@ -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 @
ffcb4ea2
...
...
@@ -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 @
ffcb4ea2
...
...
@@ -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