Skip to content

Commit

Permalink
Improved: code to display facilityTypeId if description is not given (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Dec 8, 2023
1 parent 874b6ac commit 9ec7e58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"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",
Expand Down
4 changes: 2 additions & 2 deletions src/views/CreateFacility.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ion-label>{{ translate("Type") }}</ion-label>
<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"/>
{{ facilityTypes[selectedFacilityTypeId] ? translate(`Create ${facilityTypes[selectedFacilityTypeId]?.description}`) : translate("Create store") }}
{{ facilityTypes[selectedFacilityTypeId]?.description ? translate(`Create ${facilityTypes[selectedFacilityTypeId].description}`) : translate(`Create ${selectedFacilityTypeId}`) }}
</ion-button>
</div>
</main>
Expand Down

0 comments on commit 9ec7e58

Please sign in to comment.