Skip to content

Commit

Permalink
Merge pull request #69 from amansinghbais/facilities/#68
Browse files Browse the repository at this point in the history
Improved: create facility button text to be dynamic based on facility type (#68)
  • Loading branch information
ravilodhi authored Dec 8, 2023
2 parents b83ae4e + 1f29766 commit 1275831
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
"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 store": "Create store",
"Create Outlet Store": "Create Outlet Store",
"Create Outlet Warehouse": "Create Outlet Warehouse",
"Create Retail Store": "Create Retail Store",
"Create Warehouse": "Create Warehouse",
"Custom": "Custom",
"Custom fulfillment capacity": "Custom fulfillment capacity",
"Custom mapping": "Custom mapping",
Expand Down
6 changes: 3 additions & 3 deletions src/views/CreateFacility.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<ion-list>
<ion-item>
<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 }}
{{ type.description ? type.description : facilityTypeId }}
</ion-select-option>
</ion-select>
</ion-item>
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]?.description ? translate(`Create ${facilityTypes[selectedFacilityTypeId].description}`) : translate(`Create ${selectedFacilityTypeId}`) }}
</ion-button>
</div>
</main>
Expand Down

0 comments on commit 1275831

Please sign in to comment.