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: Interaction Issues in Product Stores Modal(#253) #263

Merged
merged 3 commits into from
May 3, 2024
Merged
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
9 changes: 9 additions & 0 deletions src/components/AddProductStoreToGroupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ import logger from "@/logger";
import { hasError } from "@/adapter";
import { showToast } from "@/utils";
import { DateTime } from "luxon";
import emitter from "@/event-bus";


export default defineComponent({
name: "AddProductStoreToGroupModal",
Expand Down Expand Up @@ -96,6 +98,7 @@ export default defineComponent({
modalController.dismiss({ dismissed: true});
},
async fetchGroupProductStores() {
emitter.emit('presentLoader')
try {
const resp = await FacilityService.fetchAssociatedProductStoresToGroup({
"inputFields": {
Expand All @@ -116,6 +119,7 @@ export default defineComponent({
} catch(err) {
logger.error(err)
}
emitter.emit('dismissLoader');
},
isSelected(productStoreId: any) {
return this.selectedProductStoreValues.some((productStore: any) => productStore.productStoreId === productStoreId);
Expand Down Expand Up @@ -182,4 +186,9 @@ export default defineComponent({
},
});
</script>
<style scoped>
ion-content {
--padding-bottom: 80px;
}
</style>

2 changes: 1 addition & 1 deletion src/views/FindGroups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<ion-icon :icon="bagHandleOutline" slot="start"/>
<ion-label>{{ translate('Product stores') }}</ion-label>
<ion-chip outline slot="end" @click="openAddProductStoreToGroupModal(group)">
{{ group.productStoreCount }}
{{ group.productStoreCount || 0 }}
</ion-chip>
</ion-item>
<ion-item>
Expand Down
Loading