Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: After applying filters on the Open & Completed pages, the filters are not hiding in the empty state (#936) #941

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 21 additions & 22 deletions src/views/Completed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,29 @@

<ion-content ref="contentRef" :scroll-events="true" @ionScroll="enableScrolling()" id="view-size-selector">
<ion-searchbar class="searchbar" :value="completedOrders.query.queryString" :placeholder="translate('Search orders')" @keyup.enter="updateQueryString($event.target.value)" />
<div class="filters">
<ion-item lines="none" v-for="carrierPartyId in carrierPartyIds" :key="carrierPartyId.val">
<ion-checkbox label-placement="end" :checked="completedOrders.query.selectedCarrierPartyIds.includes(carrierPartyId.val)" @ionChange="updateSelectedCarrierPartyIds(carrierPartyId.val)">
<ion-label>
{{ getPartyName(carrierPartyId.val.split('/')[0]) }}
<p>{{ carrierPartyId.groups }} {{ carrierPartyId.groups === 1 ? translate('package') : translate("packages") }}</p>
</ion-label>
</ion-checkbox>
<!-- TODO: make the print icon functional -->
<!-- <ion-icon :icon="printOutline" /> -->
</ion-item>

<ion-item lines="none" v-for="shipmentMethod in shipmentMethods" :key="shipmentMethod.val">
<ion-checkbox label-placement="end" :checked="completedOrders.query.selectedShipmentMethods.includes(shipmentMethod.val)" @ionChange="updateSelectedShipmentMethods(shipmentMethod.val)">
<ion-label>
{{ getShipmentMethodDesc(shipmentMethod.val) }}
<p>{{ shipmentMethod.groups }} {{ shipmentMethod.groups > 1 ? translate('orders') : translate('order') }}, {{ shipmentMethod.itemCount }} {{ shipmentMethod.itemCount > 1 ? translate('items') : translate('item') }}</p>
</ion-label>
</ion-checkbox>
</ion-item>
</div>

<div v-if="completedOrders.total">

<div class="filters">
<ion-item lines="none" v-for="carrierPartyId in carrierPartyIds" :key="carrierPartyId.val">
<ion-checkbox label-placement="end" :checked="completedOrders.query.selectedCarrierPartyIds.includes(carrierPartyId.val)" @ionChange="updateSelectedCarrierPartyIds(carrierPartyId.val)">
<ion-label>
{{ getPartyName(carrierPartyId.val.split('/')[0]) }}
<p>{{ carrierPartyId.groups }} {{ carrierPartyId.groups === 1 ? translate('package') : translate("packages") }}</p>
</ion-label>
</ion-checkbox>
<!-- TODO: make the print icon functional -->
<!-- <ion-icon :icon="printOutline" /> -->
</ion-item>

<ion-item lines="none" v-for="shipmentMethod in shipmentMethods" :key="shipmentMethod.val">
<ion-checkbox label-placement="end" :checked="completedOrders.query.selectedShipmentMethods.includes(shipmentMethod.val)" @ionChange="updateSelectedShipmentMethods(shipmentMethod.val)">
<ion-label>
{{ getShipmentMethodDesc(shipmentMethod.val) }}
<p>{{ shipmentMethod.groups }} {{ shipmentMethod.groups > 1 ? translate('orders') : translate('order') }}, {{ shipmentMethod.itemCount }} {{ shipmentMethod.itemCount > 1 ? translate('items') : translate('item') }}</p>
</ion-label>
</ion-checkbox>
</ion-item>
</div>
<div class="results">
<ion-button :disabled="isShipNowDisabled || !hasAnyPackedShipment() || hasAnyMissingInfo() || (hasAnyShipmentTrackingInfoMissing() && !hasPermission(Actions.APP_FORCE_SHIP_ORDER))" expand="block" class="bulk-action desktop-only" fill="outline" size="large" @click="bulkShipOrders()">{{ translate("Ship") }}</ion-button>
<ion-card class="order" v-for="(order, index) in completedOrdersList" :key="index">
Expand Down
20 changes: 10 additions & 10 deletions src/views/OpenOrders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@

<ion-content ref="contentRef" :scroll-events="true" @ionScroll="enableScrolling()" id="view-size-selector">
<ion-searchbar class="searchbar" :value="openOrders.query.queryString" :placeholder="translate('Search orders')" @keyup.enter="updateQueryString($event.target.value)"/>
<div class="filters">
<ion-item lines="none" v-for="method in shipmentMethods" :key="method.val">
<ion-checkbox label-placement="end" @ionChange="updateSelectedShipmentMethods(method.val)">
<ion-label>
{{ getShipmentMethodDesc(method.val) }}
<p>{{ method.ordersCount }} {{ translate("orders") }}, {{ method.count }} {{ translate("items") }}</p>
</ion-label>
</ion-checkbox>
</ion-item>
</div>
<div v-if="openOrders.total">
<div class="filters">
<ion-item lines="none" v-for="method in shipmentMethods" :key="method.val">
<ion-checkbox label-placement="end" @ionChange="updateSelectedShipmentMethods(method.val)">
<ion-label>
{{ getShipmentMethodDesc(method.val) }}
<p>{{ method.ordersCount }} {{ translate("orders") }}, {{ method.count }} {{ translate("items") }}</p>
</ion-label>
</ion-checkbox>
</ion-item>
</div>

<div class="results">
<ion-button class="bulk-action desktop-only" size="large" @click="assignPickers">{{ translate("Print Picklist") }}</ion-button>
Expand Down
Loading