Skip to content

Commit

Permalink
Improved: variable name for the seleted facility id value (hotwax#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Dec 2, 2024
1 parent 0a84415 commit 6049fd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/views/Order.vue
Original file line number Diff line number Diff line change
Expand Up @@ -475,18 +475,18 @@ export default defineComponent({
})
modal.onDidDismiss().then((result) => {
const selectedFacilityId = result.data?.selectedFacilityId;
const selectedOptionId = result.data?.selectedOptionId;
if(selectedFacilityId) {
if(selectedFacilityId === "cancel") {
if(selectedOptionId) {
if(selectedOptionId === "cancel") {
item.isItemCancelled = true;
} else {
if(isPickupForAll) {
this.selectedFacility = this.nearbyStores.find((store: any) => store.facilityId === selectedFacilityId);
this.selectedFacility = this.nearbyStores.find((store: any) => store.facilityId === selectedOptionId);
} else {
item.selectedFacilityId = selectedFacilityId
if(this.selectedItemsByFacility[selectedFacilityId]?.length) this.selectedItemsByFacility[selectedFacilityId].push(item);
else this.selectedItemsByFacility[selectedFacilityId] = [item]
item.selectedFacilityId = selectedOptionId
if(this.selectedItemsByFacility[selectedOptionId]?.length) this.selectedItemsByFacility[selectedOptionId].push(item);
else this.selectedItemsByFacility[selectedOptionId] = [item]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/PickupLocationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default defineComponent({
modalController.dismiss({ dismissed: true, ...payload });
},
save() {
this.closeModal({ selectedFacilityId: this.selectedFacilityIdValue })
this.closeModal({ selectedOptionId: this.selectedFacilityIdValue })
}
},
setup() {
Expand Down

0 comments on commit 6049fd2

Please sign in to comment.