Skip to content

Commit

Permalink
Merge pull request #343 from priyanshee1604/#323
Browse files Browse the repository at this point in the history
Improved: Display Product Store ID instead of Store Name when Store Name is not present on the Find Facilities page.
  • Loading branch information
ymaheshwari1 authored Jan 24, 2025
2 parents 1d26456 + 6ea10f5 commit 4cd83d8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/FacilityFilters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ion-icon :icon="globeOutline" slot="start" />
<ion-select :label="translate('Product Store')" interface="popover" v-model="query.productStoreId" @ionChange="updateQuery()">
<ion-select-option value="">{{ translate("All") }}</ion-select-option>
<ion-select-option :value="productStore.productStoreId" :key="index" v-for="(productStore, index) in productStores">{{ productStore.storeName }}</ion-select-option>
<ion-select-option :value="productStore.productStoreId" :key="index" v-for="(productStore, index) in productStores">{{ productStore.storeName || productStore.productStoreId }}</ion-select-option>
</ion-select>
</ion-item>
<ion-item lines="none">
Expand Down
4 changes: 3 additions & 1 deletion src/components/ProductStorePopover.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<ion-content>
<ion-list>
<ion-list-header>{{ getProductStore(currentProductStore.productStoreId).storeName }}</ion-list-header>
<ion-list-header>
{{ getProductStore(currentProductStore.productStoreId).storeName || currentProductStore.productStoreId }}
</ion-list-header>
<ion-item button @click="togglePrimary()">
{{ translate("Primary") }}
<ion-icon slot="end" :color="current.primaryFacilityGroupId === shopifyShopIdForProductStore(currentProductStore.productStoreId) ? 'warning' : ''" :icon="current.primaryFacilityGroupId === shopifyShopIdForProductStore(currentProductStore.productStoreId) ? star : starOutline" />
Expand Down
4 changes: 2 additions & 2 deletions src/views/AddFacilityConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ion-list>
<ion-item v-for="store in selectedProductStores" :key="store.productStoreId">
<ion-label>
<h2>{{ getProductStore(store.productStoreId)?.storeName }}</h2>
<h2>{{ getProductStore(store.productStoreId)?.storeName || store.productStoreId }}</h2>
</ion-label>
<ion-badge v-if="store.productStoreId === primaryFacilityGroupId">
{{ translate("primary store") }}
Expand All @@ -35,7 +35,7 @@
<ion-popover trigger="product-store-actions-trigger" showBackdrop="false" dismissOnSelect="true">
<ion-content>
<ion-list>
<ion-list-header>{{ getProductStore(store.productStoreId).storeName }}</ion-list-header>
<ion-list-header>{{ getProductStore(store.productStoreId).storeName || store.productStoreId }}</ion-list-header>
<ion-item button @click="updatePrimaryFacilityGroupId(store.productStoreId)">
{{ translate("Primary") }}
<ion-icon slot="end" :color="store.productStoreId === primaryFacilityGroupId ? 'warning' : ''" :icon="store.productStoreId === primaryFacilityGroupId ? star : starOutline" />
Expand Down
2 changes: 1 addition & 1 deletion src/views/FindFacilities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ion-icon :icon="globeOutline" slot="start" />
<ion-select :label="translate('Product Store')" interface="popover" v-model="query.productStoreId" @ionChange="updateQuery()">
<ion-select-option value="">{{ translate("All") }}</ion-select-option>
<ion-select-option :value="productStore.productStoreId" :key="index" v-for="(productStore, index) in productStores">{{ productStore.storeName }}</ion-select-option>
<ion-select-option :value="productStore.productStoreId" :key="index" v-for="(productStore, index) in productStores">{{ productStore.storeName ? productStore.storeName : productStore.productStoreId }}</ion-select-option>
</ion-select>
</ion-item>
<ion-item lines="none">
Expand Down

0 comments on commit 4cd83d8

Please sign in to comment.