Skip to content

Commit

Permalink
Improved: usage of ion-select as per the changes in ionic v7(#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Jan 2, 2024
1 parent de344e7 commit f7e0ea9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/LocationPopover.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<ion-chip outline>
<ion-icon :icon="locationOutline"/>
<ion-select interface="popover" :placeholder="$t('facility location')" :value="item.locationSeqId" @ionChange="setFacilityLocation($event)">
<ion-select aria-label="Facility Location" interface="popover" :placeholder="$t('facility location')" :value="item.locationSeqId" @ionChange="setFacilityLocation($event)">
<ion-select-option v-for="facilityLocation in (getFacilityLocationsByFacilityId(facilityId) ? getFacilityLocationsByFacilityId(facilityId) : [])" :key="facilityLocation.locationSeqId" :value="facilityLocation.locationSeqId" >{{ facilityLocation.locationPath ? facilityLocation.locationPath : facilityLocation.locationSeqId }}</ion-select-option>
</ion-select>
</ion-chip>
Expand Down
9 changes: 3 additions & 6 deletions src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
{{ $t('Specify which facility you want to operate from. Order, inventory and other configuration data will be specific to the facility you select.') }}
</ion-card-content>
<ion-item lines="none">
<ion-label>{{ $t("Select facility") }}</ion-label>
<ion-select interface="popover" :value="currentFacility.facilityId" @ionChange="setFacility($event)">
<ion-select :label="$t('Select facility')" interface="popover" :value="currentFacility.facilityId" @ionChange="setFacility($event)">
<ion-select-option v-for="facility in (userProfile ? userProfile.facilities : [])" :key="facility.facilityId" :value="facility.facilityId" >{{ facility.facilityName }}</ion-select-option>
</ion-select>
</ion-item>
Expand Down Expand Up @@ -77,14 +76,12 @@
</ion-card-content>

<ion-item>
<ion-label>{{ $t("Primary Product Identifier") }}</ion-label>
<ion-select :disabled="!hasPermission(Actions.APP_PRODUCT_IDENTIFIER_UPDATE) || !currentEComStore?.productStoreId" interface="popover" :placeholder="$t('primary identifier')" :value="productIdentificationPref.primaryId" @ionChange="setProductIdentificationPref($event.detail.value, 'primaryId')">
<ion-select :label="$t('Primary Product Identifier')" :disabled="!hasPermission(Actions.APP_PRODUCT_IDENTIFIER_UPDATE) || !currentEComStore?.productStoreId" interface="popover" :placeholder="$t('primary identifier')" :value="productIdentificationPref.primaryId" @ionChange="setProductIdentificationPref($event.detail.value, 'primaryId')">
<ion-select-option v-for="identification in productIdentifications" :key="identification" :value="identification" >{{ identification }}</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>{{ $t("Secondary Product Identifier") }}</ion-label>
<ion-select :disabled="!hasPermission(Actions.APP_PRODUCT_IDENTIFIER_UPDATE) || !currentEComStore?.productStoreId" interface="popover" :placeholder="$t('secondary identifier')" :value="productIdentificationPref.secondaryId" @ionChange="setProductIdentificationPref($event.detail.value, 'secondaryId')">
<ion-select :label="$t('Secondary Product Identifier')" :disabled="!hasPermission(Actions.APP_PRODUCT_IDENTIFIER_UPDATE) || !currentEComStore?.productStoreId" interface="popover" :placeholder="$t('secondary identifier')" :value="productIdentificationPref.secondaryId" @ionChange="setProductIdentificationPref($event.detail.value, 'secondaryId')">
<ion-select-option v-for="identification in productIdentifications" :key="identification" :value="identification" >{{ identification }}</ion-select-option>
<ion-select-option value="">{{ $t("None") }}</ion-select-option>
</ion-select>
Expand Down

0 comments on commit f7e0ea9

Please sign in to comment.