Tweak default product view
This commit is contained in:
parent
85c43e95e5
commit
29220093dd
|
@ -1,19 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<byjove-model-crud model-name="Product"
|
<byjove-model-crud model-name="Product"
|
||||||
|
:label-renderer="renderLabel"
|
||||||
:allow-edit="allowEdit"
|
:allow-edit="allowEdit"
|
||||||
:mode="mode"
|
:mode="mode"
|
||||||
@refresh="record => { product = record }">
|
@refresh="record => { product = record }">
|
||||||
|
|
||||||
<div style="display: flex; justify-content: space-between; margin-bottom: 0.5rem;">
|
<div style="display: flex; justify-content: space-between; margin-bottom: 0.5rem;">
|
||||||
|
|
||||||
<b-field label="Item ID">
|
<div style="display: flex; flex-direction: column;">
|
||||||
<b-input v-if="mode == 'creating' || mode == 'editing'"
|
|
||||||
v-model="product.item_id">
|
<b-field label="Brand">
|
||||||
</b-input>
|
{{ product.brand_name }}
|
||||||
<span v-if="mode == 'viewing' || mode == 'deleting'">
|
</b-field>
|
||||||
{{ product.item_id }}
|
|
||||||
</span>
|
<b-field label="Description">
|
||||||
</b-field>
|
{{ product.description }}
|
||||||
|
</b-field>
|
||||||
|
|
||||||
|
<b-field label="Size">
|
||||||
|
{{ product.size }}
|
||||||
|
</b-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
<img :src="product.image_url" />
|
<img :src="product.image_url" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -42,7 +49,7 @@
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
<b-field label="Preferred Vendor">
|
<b-field label="Preferred">
|
||||||
{{ product.vendor_name }} @ {{ product.default_unit_cost_display }}
|
{{ product.vendor_name }} @ {{ product.default_unit_cost_display }}
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
|
@ -86,5 +93,10 @@ export default {
|
||||||
product: {},
|
product: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
renderLabel(product) {
|
||||||
|
return product.product_key
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue