-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create stock movement uses hardcoded openboxes
on link
#1600
Comments
@lorranpego Thanks for the awesome bug report! We have a ticket to enable a configurable context path that we are planning to introduce in 0.9.x (when we upgrade to Grails 3), but I'll see if there's some way to deal with this in the short-term. At the moment, the easiest (only) way to deal with this is to deploy the WAR as openboxes.war. I know that's a bummer since you probably want to white label your server, but that's the best we can do with the current version. Additional Context However, there's no way to pass this deploy-time context path to the React apps because they are compiled before the application is deployed. So imagine you deploy the WAR file as "myopenboxes.war" and load a page that initializes a React app. The React app has several API endpoints that it calls to get / update date. But how would you pass that new context path (myopenboxes) to React so that it can reference the APIs properly. There's potentially one very hacky way of doing this in the short term, since we use a GSP to load the React page. And that is to include some javascript to set a global variable that will be used by the React app. So I think the following (or something similar) would probably work assuming that the React doesn't do anything do exclude scope outside of the application resources.
And then later in a React JSX file (for example)
I don't know React well enough to conclude whether this will work or not. But I'll see if we can get it to work properly in version 0.8.12. |
Thanks @jmiranda, That is how I knew there was some bug there. Since there is already a ticket, I will close the Issue. |
When clicking on
![openboxes](https://user-images.githubusercontent.com/7591107/79900906-5ed52d80-83e5-11ea-97f1-9ce2a041f2cb.gif)
Inbound
->Create Inbound Stock Movement
it showsNot found. Resource not found
messageThe calls to
![Screenshot_20200421_145413](https://user-images.githubusercontent.com/7591107/79900910-609ef100-83e5-11ea-83be-ded10587027f.png)
/api/getAppContext
and/api/localizations
uses a hardcodedopenboxes/
in front of itOther calls do not have the hardcoded
![Screenshot_20200421_145427](https://user-images.githubusercontent.com/7591107/79900912-61378780-83e5-11ea-9adb-d59636243ff5.png)
openboxes/
Other Information:
Grails Version: 1.3.9
Application version: 0.8.11
Branch: master
Build Number: v0.8.11
Environment: production
The text was updated successfully, but these errors were encountered: