Skip to content
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

OBPIH-2228 Add custom substitutions to substitution modal #1352

Merged
merged 1 commit into from
Dec 15, 2019

Conversation

dbienkowska
Copy link
Collaborator

No description provided.

@awalkowiak
Copy link
Collaborator

@jmiranda please take a look on this feature

if (params.name && params.name.size() < minLength) {
render([data: []])
return
}

String[] terms = params?.name?.split(",| ")?.findAll { it }
def products = productService.searchProducts(terms, [])
if(params.availableItems) {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not comfortable using the product API in this way. Instead I think we should add a new endpoint.

/openboxes/api/products/:id/availableItems

Do you really need to get available items for more than one product at a time? If so we need to discuss this on Slack.

Copy link
Member

Choose a reason for hiding this comment

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

@DominikaHatala I'm going to merge the PR as-is but we need to discuss refactoring this on an upcoming Monday call. This is an expensive and not something I want to do. I'd rather get available items for a single product at a time.

@jmiranda jmiranda merged commit 84fe672 into develop Dec 15, 2019
@jmiranda jmiranda deleted the OBPIH-2228 branch December 15, 2019 20:31
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.

None yet

3 participants