Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: message to be displayed after performing an operation on the order #91

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Add address": "Add address",
"An email will be sent to you when your item(s) are ready to collect at the new requested location(s).": "An email will be sent to you when your item(s) are ready to collect at the new requested location(s).",
"Are you sure you want to save the changes?": "Are you sure you want to save the changes?",
"Are you sure you want to cancel the order items?": "Are you sure you want to cancel the order items?",
"Cancel": "Cancel",
Expand Down
8 changes: 7 additions & 1 deletion src/views/Order.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
<ion-button v-if="hasPermission(Actions.APP_SHPGRP_CNCL)" @click="cancel(shipGroup)" fill="clear" color="danger">{{ $t("Cancel") }}</ion-button>
</ion-card>
</div>
<div v-else-if="isOrderUpdated" class="ion-text-center ion-padding-top">
<ion-label>{{ $t("An email will be sent to you when your item(s) are ready to collect at the new requested location(s).") }}</ion-label>
</div>
<div v-else class="ion-text-center ion-padding-top">
<ion-label>{{ $t("Order item not eligible for reroute fulfilment") }}</ion-label>
</div>
Expand Down Expand Up @@ -150,7 +153,8 @@ export default defineComponent({
name: 'Shipping',
value: 'STANDARD'
}
]
],
isOrderUpdated: false
}
},
computed: {
Expand Down Expand Up @@ -286,6 +290,7 @@ export default defineComponent({
shipGroup.shipTo.postalAddress = shipGroup.updatedAddress
shipGroup.updatedAddress = null
showToast(translate("Changes saved"))
this.isOrderUpdated = true
} else {
showToast(translate("Failed to update the shipping addess"))
}
Expand Down Expand Up @@ -313,6 +318,7 @@ export default defineComponent({
if (resp.status === 200 && !hasError(resp)) {
shipGroup.facilityId = shipGroup.selectedFacility.facilityId
showToast(translate("Changes saved"))
this.isOrderUpdated = true
} else {
showToast(translate("Failed to update the pickup store"))
}
Expand Down
Loading