Commit 1ae90ea2 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

category fix

parent 86679059
...@@ -332,11 +332,11 @@ export default { ...@@ -332,11 +332,11 @@ export default {
sortable: false, sortable: false,
value: 'name' value: 'name'
}, },
{ text: 'id', value: 'id' }, { text: 'ID', value: 'id' },
{ text: 'ordering', value: 'ordering' }, { text: 'Odering', value: 'ordering' },
{ text: 'parent', value: 'parent_id', sortable: false }, // { text: 'parent', value: 'parent_id', sortable: false },
{ text: 'created_at', value: 'created_at' }, { text: 'Created', value: 'created_at' },
{ text: 'updated_at', value: 'updated_at' }, { text: 'Updated', value: 'updated_at' },
{ text: 'Actions', value: 'actions', sortable: false } { text: 'Actions', value: 'actions', sortable: false }
], ],
categories: [], categories: [],
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
dense dense
accept="image/*" accept="image/*"
@change="fileSelected" @change="fileSelected"
prepend-icon="mdi-camera"
/> />
</v-col> </v-col>
</v-row> </v-row>
...@@ -255,6 +256,7 @@ ...@@ -255,6 +256,7 @@
accept="image/*" accept="image/*"
small-chips small-chips
dense dense
prepend-icon="mdi-camera"
/> />
</v-col> </v-col>
</v-row> </v-row>
......
...@@ -1055,12 +1055,14 @@ export default { ...@@ -1055,12 +1055,14 @@ export default {
fd.append('price', this.ePrice) fd.append('price', this.ePrice)
fd.append('category_id', this.eCategoryId) fd.append('category_id', this.eCategoryId)
fd.append('description', this.eDescription) fd.append('description', this.eDescription)
if (this.eVariants) {
for (let i = 0; i < this.eVariants.length; i++) { for (let i = 0; i < this.eVariants.length; i++) {
fd.append(`variants[${i}][id]`, this.eVariants[i].id) fd.append(`variants[${i}][id]`, this.eVariants[i].id)
fd.append(`variants[${i}][color]`, this.eVariants[i].color) fd.append(`variants[${i}][color]`, this.eVariants[i].color)
fd.append(`variants[${i}][quantity]`, this.eVariants[i].quantity) fd.append(`variants[${i}][quantity]`, this.eVariants[i].quantity)
fd.append(`variants[${i}][size]`, this.eVariants[i].size) fd.append(`variants[${i}][size]`, this.eVariants[i].size)
} }
}
for (let j = 0; j < this.eImages.length; j++) { for (let j = 0; j < this.eImages.length; j++) {
fd.append(`images[${j}]`, this.eImages[j]) fd.append(`images[${j}]`, this.eImages[j])
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment