Skip to content

OBGM-509 Hyperlinks to PO view page from PO shipment don't work #4109

Merged
awalkowiak merged 1 commit intofeature/upgrade-to-grails-3.3.10from
OBGM-509
Jun 16, 2023
Merged

OBGM-509 Hyperlinks to PO view page from PO shipment don't work #4109
awalkowiak merged 1 commit intofeature/upgrade-to-grails-3.3.10from
OBGM-509

Conversation

@alannadolny
Copy link
Collaborator

No description provided.

fieldValue,
}) => ({
url: fieldValue && fieldValue.orderId ? `/order/show/${fieldValue.orderId}` : '',
url: fieldValue?.orderId ? stringUrlInterceptor(`/order/show/${fieldValue.orderId}`) : '',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about adding this url to our urls.js factory?
so to add:

const CONTEXT_PATH = `/openboxes`
...
// ORDER
export const ORDER = `${CONTEXT_PATH}/order`
export const ORDER_SHOW = id => `${ORDER}/show/${id}`

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I prefer doing this all at once (replacing interceptor with url factory) or starting doing it right now while fixing bugs. But I guess if we start doing it now, we won't have to double-check if it works.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure? the stringInterceptor actually also adds the context path. I believe this url is not used for the apiClient, so it needs to have the context path manually added? Am I wrong?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless you meant the context path should not be hardcoded as /openboxes, but window.CONTEXT_PATH, then I can agree and sorry for the confusion in the comment above

@awalkowiak awalkowiak merged commit f888c6e into feature/upgrade-to-grails-3.3.10 Jun 16, 2023
@awalkowiak awalkowiak deleted the OBGM-509 branch June 16, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants