fix: refs #7283 #7283 ItemDiary subToolbar

This commit is contained in:
Javier Segarra 2024-10-21 13:48:43 +02:00
parent f2cb0111eb
commit 29a7f3b2fe
1 changed files with 34 additions and 33 deletions

View File

@ -188,7 +188,7 @@ async function updateWarehouse(warehouseFk) {
}, },
}); });
await stock.fetch({}); await stock.fetch({});
stock.store.data.itemFk = route.params.id stock.store.data.itemFk = route.params.id;
} }
</script> </script>
@ -205,38 +205,39 @@ async function updateWarehouse(warehouseFk) {
auto-load auto-load
@on-fetch="(data) => (warehousesOptions = data)" @on-fetch="(data) => (warehousesOptions = data)"
/> />
<QToolbar class="justify-end"> <template v-if="stateStore.isHeaderMounted()">
<div id="st-data" class="row"> <Teleport to="#st-data">
<VnSelect <div class="row">
:label="t('itemDiary.warehouse')" <VnSelect
:options="warehousesOptions" :label="t('itemDiary.warehouse')"
hide-selected :options="warehousesOptions"
option-label="name" hide-selected
option-value="id" option-label="name"
dense option-value="id"
v-model="itemsBalanceFilter.where.warehouseFk" dense
@update:model-value=" v-model="itemsBalanceFilter.where.warehouseFk"
(value) => fetchItemBalances() && updateWarehouse(value) @update:model-value="
" (value) => fetchItemBalances() && updateWarehouse(value)
class="q-mr-lg" "
/> class="q-mr-lg"
<QCheckbox />
:label="t('itemDiary.showBefore')" <QCheckbox
v-model="showWhatsBeforeInventory" :label="t('itemDiary.showBefore')"
@update:model-value="fetchItemBalances" v-model="showWhatsBeforeInventory"
class="q-mr-lg" @update:model-value="fetchItemBalances"
/> class="q-mr-lg"
<VnInputDate />
v-if="showWhatsBeforeInventory" <VnInputDate
:label="t('itemDiary.since')" v-if="showWhatsBeforeInventory"
dense :label="t('itemDiary.since')"
v-model="itemsBalanceFilter.where.date" dense
@update:model-value="fetchItemBalances" v-model="itemsBalanceFilter.where.date"
/> @update:model-value="fetchItemBalances"
</div> />
<QSpace /> </div>
<div id="st-actions"></div> </Teleport>
</QToolbar> <Teleport to="#st-actions"> </Teleport>
</template>
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:rows="itemBalances" :rows="itemBalances"