Skip to content

Commit

Permalink
Merge pull request #269 from ymaheshwari1/#268
Browse files Browse the repository at this point in the history
Fixed: issue when redirecting to commerce after successfull upload of inventory or PO file(#268)
  • Loading branch information
ymaheshwari1 authored Mar 18, 2024
2 parents 731b797 + ce2d6c9 commit b740b23
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 b740b23

Please sign in to comment.