merge ignore shopping with onhand

This commit is contained in:
smilerz
2021-12-29 16:32:19 -06:00
parent 2787b64a96
commit 3fafd43e58
22 changed files with 191 additions and 228 deletions

View File

@ -19,8 +19,10 @@
<!-- <span><b-button variant="link" size="sm" class="text-dark shadow-none"><i class="fas fa-chevron-down"></i></b-button></span> -->
<model-menu />
<span>{{ this.this_model.name }}</span>
<span v-if="this_model.name !== 'Step'"
><b-button variant="link" @click="startAction({ action: 'new' })"><i class="fas fa-plus-circle fa-2x"></i></b-button></span
<span v-if="apiName !== 'Step'">
<b-button variant="link" @click="startAction({ action: 'new' })">
<i class="fas fa-plus-circle fa-2x"></i>
</b-button> </span
><!-- TODO add proper field to model config to determine if create should be available or not -->
</h3>
</div>
@ -112,6 +114,9 @@ export default {
// TODO this is not necessarily bad but maybe there are better options to do this
return () => import(/* webpackChunkName: "header-component" */ `@/components/${this.header_component_name}`)
},
apiName() {
return this.this_model?.apiName
},
},
mounted() {
// value is passed from lists.py
@ -291,11 +296,6 @@ export default {
this.refreshCard({ ...food }, this.items_right)
})
},
addOnhand: function (item) {
item.on_hand = true
this.saveThis(item)
},
updateThis: function (item) {
this.refreshThis(item.id)
},