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

category fix

parent 86679059
......@@ -332,11 +332,11 @@ export default {
sortable: false,
value: 'name'
},
{ text: 'id', value: 'id' },
{ text: 'ordering', value: 'ordering' },
{ text: 'parent', value: 'parent_id', sortable: false },
{ text: 'created_at', value: 'created_at' },
{ text: 'updated_at', value: 'updated_at' },
{ text: 'ID', value: 'id' },
{ text: 'Odering', value: 'ordering' },
// { text: 'parent', value: 'parent_id', sortable: false },
{ text: 'Created', value: 'created_at' },
{ text: 'Updated', value: 'updated_at' },
{ text: 'Actions', value: 'actions', sortable: false }
],
categories: [],
......
......@@ -84,6 +84,7 @@
dense
accept="image/*"
@change="fileSelected"
prepend-icon="mdi-camera"
/>
</v-col>
</v-row>
......@@ -255,6 +256,7 @@
accept="image/*"
small-chips
dense
prepend-icon="mdi-camera"
/>
</v-col>
</v-row>
......
......@@ -1055,11 +1055,13 @@ export default {
fd.append('price', this.ePrice)
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)
if (this.eVariants) {
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)
}
}
for (let j = 0; j < this.eImages.length; 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