Skip to content

Commit

Permalink
Merge pull request #99 from amansinghbais/facilities/#91
Browse files Browse the repository at this point in the history
Fixed: facility id modal behavior on hitting enter to submit (#91)
  • Loading branch information
ravilodhi authored Dec 11, 2023
2 parents a6cb707 + cc62bd2 commit 1af42d5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
44 changes: 23 additions & 21 deletions src/components/CustomMappingModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,31 @@
<p>{{ currentFacility.facilityName }}</p>
</ion-item>
</ion-list>
<form @keyup.enter="saveMapping" @submit.prevent>
<ion-list>
<ion-list-header>{{ translate("Custom mapping") }}</ion-list-header>
<ion-item>
<ion-label>{{ translate("Mapping ID") }}</ion-label>
<ion-input v-model="mappingId" placeholder="Mapping ID" />
</ion-item>
<ion-item>
<ion-label>{{ translate("Mapping Name") }}</ion-label>
<ion-input v-model="mappingName" placeholder="Mapping name" />
</ion-item>
<ion-item>
<ion-label>{{ translate("Identification") }}</ion-label>
<ion-input v-model="mappingValue" placeholder="Mapping Value" />
</ion-item>
</ion-list>

<ion-list>
<ion-list-header>{{ translate("Custom mapping") }}</ion-list-header>
<ion-item>
<ion-label>{{ translate("Mapping ID") }}</ion-label>
<ion-input v-model="mappingId" placeholder="Mapping ID" />
</ion-item>
<ion-item>
<ion-label>{{ translate("Mapping Name") }}</ion-label>
<ion-input v-model="mappingName" placeholder="Mapping name" />
</ion-item>
<ion-item>
<ion-label>{{ translate("Identification") }}</ion-label>
<ion-input v-model="mappingValue" placeholder="Mapping Value" />
</ion-item>
</ion-list>
<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button @click="saveMapping">
<ion-icon :icon="saveOutline" />
</ion-fab-button>
</ion-fab>
</form>
</ion-content>
<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button @click="saveMapping">
<ion-icon :icon="saveOutline" />
</ion-fab-button>
</ion-fab>
</template>
</template>

<script lang="ts">
import {
Expand Down
2 changes: 1 addition & 1 deletion src/components/FacilityMappingModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ion-header>

<ion-content>
<form @keyup.enter="saveMapping">
<form @keyup.enter="type && type === 'update' ? updateMapping() : saveMapping()" @submit.prevent>
<ion-list>
<ion-list-header>{{ translate("Facility details") }}</ion-list-header>
<ion-item>
Expand Down
4 changes: 2 additions & 2 deletions src/components/FacilityShopifyMappingModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ion-header>

<ion-content>
<form @keyup.enter="saveMapping">
<form @keyup.enter="type && type === 'update' ? updateMapping() : saveMapping()" @submit.prevent>
<ion-list>
<ion-list-header>{{ translate("Facility details") }}</ion-list-header>
<ion-item>
Expand All @@ -26,7 +26,7 @@

<ion-list>
<ion-list-header>{{ translate('Shopify location') }}</ion-list-header>
<ion-item>
<ion-item @keyup.enter.stop>
<ion-label>{{ translate("Shopify store") }}</ion-label>
<ion-label slot="end" v-if="type && type === 'update'">{{ shopifyFacilityMapping.shopId }}</ion-label>
<ion-select v-else interface="popover" :placeholder="translate('Select')" v-model="shopId">
Expand Down

0 comments on commit 1af42d5

Please sign in to comment.