Skip to content

Commit

Permalink
fix(app/order-info): properly redirect to account page on "my account…
Browse files Browse the repository at this point in the history
…" summary button click
  • Loading branch information
leomp12 committed Nov 29, 2024
1 parent 1620816 commit 176ba53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ <h2 class="order-info__number">
:items="localOrder.items"
:buyer="(localOrder.buyer && localOrder.buyer[0]) || ecomPassport.getCustomer()"
:shippingAddress="shippingAddress"
@click:account="goToAccount"
/>
</div>
</div>
Expand Down
10 changes: 9 additions & 1 deletion @ecomplus/storefront-app/src/components/js/EcOrderInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export default {
skipDataLoad: Boolean,
skipFirstDataLoad: Boolean,
skipCustomerUpdate: Boolean,
accountUrl: {
type: String,
default: '/app/#/account/'
},
accountOrdersUrl: {
type: String,
default: '/app/#/account/orders'
Expand Down Expand Up @@ -150,7 +154,7 @@ export default {
},

validThru () {
const transactionMethod = this.transaction['banking_billet'] || this.transaction['account_deposit']
const transactionMethod = this.transaction.banking_billet || this.transaction.account_deposit
return transactionMethod && transactionMethod.valid_thru
},

Expand Down Expand Up @@ -369,6 +373,10 @@ export default {
.finally(() => {
this.isUpdating = false
})
},

goToAccount () {
window.location.href = this.accountUrl
}
},

Expand Down

0 comments on commit 176ba53

Please sign in to comment.