Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Commit

Permalink
bug-fix(Order): shippment status now canceled (#27)
Browse files Browse the repository at this point in the history
- If an order has been canceled, it's shipment status would change to canceled as against (not yet shipped or shipped)

[fixes #152682337]
  • Loading branch information
fidelisojeah authored and Femi Senjobi committed Nov 10, 2017
1 parent 4a73bf7 commit 61650b0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3 class="panel-title">
<span data-i18n="order.completed">Completed</span>
{{else}} {{#if orderCancelled}}

<span data-i18n="order.canceled">Cancelled</span>
<span data-i18n="order.filter.canceled">Cancelled</span>
{{else}}
<span data-i18n="order.processing">Processing</span>
{{/if}} {{/if}}
Expand Down
8 changes: 8 additions & 0 deletions imports/plugins/core/orders/client/templates/orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,14 @@ Template.orderStatusDetail.helpers({

shipmentStatus() {
const self = this;
if (this.workflow.status === "canceled" ||
this.workflow.status === "refunded") {
return {
shipped: false,
status: "danger",
label: i18next.t("order.filter.canceled")
};
}
const shipment = this.shipping[0];
const shipped = _.every(shipment.items, (shipmentItem) => {
for (const fullItem of self.items) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ Template.coreOrderShippingSummary.helpers({
},
shipmentStatus() {
const order = Template.instance().order;

if (order.workflow.status === "canceled" ||
order.workflow.status === "refunded") {
return {
shipped: false,
status: "danger",
label: i18next.t("order.filter.canceled")
};
}
const shipment = Template.instance().order.shipping[0];
const shipped = _.every(shipment.items, (shipmentItem) => {
for (const fullItem of order.items) {
Expand Down

0 comments on commit 61650b0

Please sign in to comment.