Skip to content

Commit

Permalink
Fixed: issue when redirecting to commerce after successfull upload of…
Browse files Browse the repository at this point in the history
… inventory or PO file(#268)
  • Loading branch information
ymaheshwari1 committed Mar 18, 2024
1 parent 5ef2594 commit 82acf5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/views/InventoryReview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ export default defineComponent({
text: translate('View'),
role: 'view',
handler: () => {
window.open(`https://${this.instanceUrl}.hotwax.io/commerce/control/ImportData?configId=RESET_INVENTORY`, '_blank');
const omsURL = (this.instanceUrl.startsWith('http') ? this.instanceUrl.replace(/api\/?/, "") : `https://${this.instanceUrl}.hotwax.io`) + `/commerce/control/ImportData?configId=RESET_INVENTORY`
window.open(omsURL, '_blank');
}
}])
this.router.push("/inventory");
Expand Down
3 changes: 2 additions & 1 deletion src/views/PurchaseOrderReview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ export default defineComponent({
text: translate('View'),
role: 'view',
handler: () => {
window.open(`https://${this.instanceUrl}.hotwax.io/commerce/control/ImportData?configId=IMP_PO`, '_blank');
const omsURL = (this.instanceUrl.startsWith('http') ? this.instanceUrl.replace(/api\/?/, "") : `https://${this.instanceUrl}.hotwax.io`) + `/commerce/control/ImportData?configId=IMP_PO`
window.open(omsURL, '_blank');
}
}])
this.router.push("/purchase-order");
Expand Down

0 comments on commit 82acf5c

Please sign in to comment.