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
064aae00
Commit
064aae00
authored
Feb 02, 2023
by
TTS Kieu Tuan Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete
parent
02906955
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
444 deletions
+4
-444
index.vue
pages/categories/index.vue
+0
-442
index.vue
pages/products/index.vue
+4
-2
No files found.
pages/categories/index.vue
View file @
064aae00
This diff is collapsed.
Click to expand it.
pages/products/index.vue
View file @
064aae00
...
...
@@ -1043,6 +1043,7 @@ export default {
this
.
eDescription
=
item
.
description
this
.
eVariants
=
item
.
variants
this
.
editedIndex
=
this
.
products
.
indexOf
(
item
)
console
.
log
(
item
.
variants
)
this
.
dialog3
=
true
},
updateProduct
(
ID
)
{
...
...
@@ -1053,6 +1054,7 @@ export default {
fd
.
append
(
'
category_id
'
,
this
.
eCategoryId
)
fd
.
append
(
'
description
'
,
this
.
eDescription
)
for
(
let
i
=
0
;
i
<
this
.
eVariants
.
length
;
i
++
)
{
fd
.
append
(
`variants[
${
i
}
][id]`
,
this
.
eVariants
[
i
].
id
)
fd
.
append
(
`variants[
${
i
}
][color]`
,
this
.
eVariants
[
i
].
color
)
fd
.
append
(
`variants[
${
i
}
][quantity]`
,
this
.
eVariants
[
i
].
quantity
)
fd
.
append
(
`variants[
${
i
}
][size]`
,
this
.
eVariants
[
i
].
size
)
...
...
@@ -1060,6 +1062,7 @@ export default {
for
(
let
j
=
0
;
j
<
this
.
eImages
.
length
;
j
++
)
{
fd
.
append
(
`images[
${
j
}
]`
,
this
.
eImages
[
j
])
}
const
currentPostIndex
=
this
.
editedIndex
try
{
this
.
$axios
.
post
(
`/products/update/
${
this
?.
eId
}
`,
...
...
@@ -1076,8 +1079,7 @@ export default {
})
console.log(response)
this.editedItem = response.data.data
this.$bvModal.hide('modal-edit')
Object.assign(this.products[this.editedIndex], this.editedItem)
Object.assign(this.products[currentPostIndex], this.editedItem)
})
} catch (error) {
console.log(error)
...
...
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