add menu in create and update product admin
This commit is contained in:
@@ -122,6 +122,19 @@
|
||||
<p v-if="validation.index" class="text-danger" style="margin-top: 5px;">{{ validation.index.msg }}</p>
|
||||
</CCol>
|
||||
</CRow>
|
||||
|
||||
<CRow>
|
||||
<CCol s="12">
|
||||
<span>انتخاب منو</span>
|
||||
</CCol>
|
||||
<CCol sm="12" class="err">
|
||||
<el-select v-model="food.menuType_id" filterable style="width: 100%;margin-top: 5px;">
|
||||
<el-option v-for="item in menuTypes" :key="item._id" :value="item._id" :label="item.name"/>
|
||||
</el-select>
|
||||
<p v-if="validation.category" class="text-danger" style="margin-top: 5px;">{{ validation.menuType_id.msg }}</p>
|
||||
</CCol>
|
||||
</CRow>
|
||||
|
||||
</CForm>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
@@ -416,6 +429,7 @@ export default {
|
||||
data.append('static_discount', this.food.static_discount)
|
||||
data.append('special', this.food.special)
|
||||
data.append('index', this.food.index)
|
||||
data.append('menuType_id', this.food.menuType_id)
|
||||
data.append('havePoint', this.food.havePoint)
|
||||
data.append('club', this.food.club)
|
||||
data.append('point', this.food.point)
|
||||
@@ -446,6 +460,7 @@ export default {
|
||||
this.validation = {}
|
||||
const data = new FormData()
|
||||
data.append('name', this.food.name)
|
||||
data.append('menuType_id', this.food.menuType_id)
|
||||
data.append('price', this.food.price)
|
||||
data.append('description', this.food.description || '')
|
||||
data.append('short_description', this.food.short_description || '')
|
||||
@@ -522,7 +537,8 @@ export default {
|
||||
havePoint : false,
|
||||
club : false,
|
||||
sale: true,
|
||||
point : 0
|
||||
point : 0,
|
||||
menuType_id: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user