Skip to content

Commit

Permalink
Improved: create button text to be dynamic based on facility type (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Dec 7, 2023
1 parent 3545153 commit 07b34de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
"Configure the order fulfillment capacity of your facility.": "Configure the order fulfillment capacity of your facility.",
"Consumed Order Limit": "Consumed Order Limit",
"Create login credentials": "Create login credentials",
"Create Outlet Store": "Create Outlet Store",
"Create Outlet Warehouse": "Create Outlet Warehouse",
"Create Retail Store": "Create Retail Store",
"Create store": "Create store",
"Create Warehouse": "Create Warehouse",
"Custom": "Custom",
"Custom fulfillment capacity": "Custom fulfillment capacity",
"Custom mapping": "Custom mapping",
Expand Down
8 changes: 6 additions & 2 deletions src/views/CreateFacility.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<ion-list>
<ion-item lines="none">
<ion-label>{{ translate("Type") }}</ion-label>
<ion-select interface="popover" :value="selectedFacilityTypeId">
<ion-select interface="popover" v-model="selectedFacilityTypeId">
<ion-select-option :value="facilityTypeId" :key="facilityTypeId" v-for="(type, facilityTypeId) in facilityTypesByParentTypeId">
{{ type.description }}
</ion-select-option>
Expand Down Expand Up @@ -48,7 +48,7 @@
<div class="ion-text-center ion-margin">
<ion-button @click="createFacility()">
<ion-icon slot="start" :icon="addOutline"/>
{{ translate("Create store") }}
{{ facilityTypes[selectedFacilityTypeId] ? translate(`Create ${facilityTypes[selectedFacilityTypeId]?.description}`) : translate("Create store") }}
</ion-button>
</div>
</main>
Expand All @@ -72,6 +72,8 @@ import {
IonList,
IonNote,
IonPage,
IonSelect,
IonSelectOption,
IonText,
IonTitle,
IonToolbar,
Expand Down Expand Up @@ -103,6 +105,8 @@ export default defineComponent({
IonList,
IonNote,
IonPage,
IonSelect,
IonSelectOption,
IonText,
IonTitle,
IonToolbar,
Expand Down

0 comments on commit 07b34de

Please sign in to comment.