Fix ordering worksheet generator, per butterball

This commit is contained in:
Lance Edgar 2024-06-03 20:04:01 -05:00
parent 2791e1c385
commit 2498da3909

View file

@ -18,35 +18,46 @@
<tailbone-autocomplete v-model="vendorUUID"
service-url="${url('vendors.autocomplete')}"
name="vendor"
@input="vendorChanged">
expanded
% if request.use_oruga:
@update:model-value="vendorChanged"
% else:
@input="vendorChanged"
% endif
>
</tailbone-autocomplete>
</b-field>
<b-field label="Departments">
<b-table v-if="fetchedDepartments"
<${b}-table v-if="fetchedDepartments"
:data="departments"
narrowed
checkable
% if request.use_oruga:
v-model:checked-rows="checkedDepartments"
% else:
:checked-rows.sync="checkedDepartments"
% endif
:loading="fetchingDepartments">
<b-table-column field="number"
<${b}-table-column field="number"
label="Number"
v-slot="props">
{{ props.row.number }}
</b-table-column>
</${b}-table-column>
<b-table-column field="name"
<${b}-table-column field="name"
label="Name"
v-slot="props">
{{ props.row.name }}
</b-table-column>
</${b}-table-column>
</b-table>
</${b}-table>
</b-field>
<b-field>
<b-checkbox name="preferred_only" :value="true"
<b-checkbox name="preferred_only"
v-model="preferredVendorOnly"
native-value="1">
Only include products for which this vendor is preferred.
</b-checkbox>
@ -77,6 +88,7 @@
ThisPageData.vendorUUID = null
ThisPageData.departments = []
ThisPageData.checkedDepartments = []
ThisPageData.preferredVendorOnly = true
ThisPageData.fetchingDepartments = false
ThisPageData.fetchedDepartments = false