Skip to content

Commit

Permalink
Merge pull request #335 from amansinghbais/bopis/rejectorderbehaviour
Browse files Browse the repository at this point in the history
Improved: removing all items from order details on reject all event
  • Loading branch information
ymaheshwari1 committed Nov 3, 2023
2 parents d5015f3 + 19bbd19 commit 22482fd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/RejectOrderModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ export default defineComponent({
this.store.dispatch('order/setUnfillableOrderOrItem', { orderId: this.order.orderId, part }).then((resp) => {
if (resp) {
// Mark current order as rejected
this.store.dispatch('order/updateCurrent', { order: { ...this.order, rejected: true } })
const order = { ...this.order, part: { ...this.order.part, items: [] }, rejected: true };

this.store.dispatch('order/updateCurrent', { order })
}
this.closeModal();
})
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"App": "App",
"All items were rejected from the order": "All items were rejected from the order",
"All order items are rejected": "All order items are rejected",
"Allow partial rejection": "Allow partial rejection",
"An email notification will be sent to that their order is ready for pickup. This order will also be moved to the packed orders tab.": "An email notification will be sent to { customerName } that their order is ready for pickup.{ space } This order will also be moved to the packed orders tab.",
"An email notification will be sent to that their order is ready for pickup.": "An email notification will be sent to { customerName } that their order is ready for pickup.",
Expand Down
1 change: 1 addition & 0 deletions src/locales/es.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"App": "Aplicación",
"All items were rejected from the order": "All items were rejected from the order",
"All order items are rejected": "All order items are rejected",
"Allow partial rejection": "Allow partial rejection",
"An email notification will be sent to that their order is ready for pickup. This order will also be moved to the packed orders tab.": "Se enviará una notificación por correo electrónico a {customerName} de que su pedido está listo para recoger.{ space } Este pedido también se moverá a la pestaña de pedidos empacados.",
"An email notification will be sent to that their order is ready for pickup.": "Se enviará una notificación por correo electrónico a {customerName} de que su pedido está listo para recoger.",
Expand Down
1 change: 1 addition & 0 deletions src/locales/ja.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"App": "App",
"All items were rejected from the order": "All items were rejected from the order",
"All order items are rejected": "All order items are rejected",
"Allow partial rejection": "Allow partial rejection",
"An email notification will be sent to that their order is ready for pickup. This order will also be moved to the packed orders tab.": "{ customerName }様宛に注文の受け取り準備が完了したことをお知らするメールが送信されます。{ space } この注文は「梱包済み注文」タブに移動されます.",
"An email notification will be sent to that their order is ready for pickup.": "{ customerName }様宛に注文の受け取り準備が完了したことをお知らするメールが送信されます。",
Expand Down
2 changes: 1 addition & 1 deletion src/views/OrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
</ion-button>
</div>
</ion-card>
<p v-if="!order.part?.items?.length" class="empty-state">{{ translate('No items found') }}</p>
<p v-if="!order.part?.items?.length" class="empty-state">{{ translate('All order items are rejected') }}</p>
</section>
</main>
Expand Down

0 comments on commit 22482fd

Please sign in to comment.