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-3860 Show derived status on the orders list and details page #3438

Merged
merged 1 commit into from
Aug 25, 2022

Conversation

awalkowiak
Copy link
Collaborator

No description provided.

@awalkowiak
Copy link
Collaborator Author

I am gonna merge, but I will revisit in case of any change request.

@awalkowiak awalkowiak merged commit e13b639 into release/0.8.19 Aug 25, 2022
@awalkowiak awalkowiak deleted the OBPIH-3860 branch August 25, 2022 19:27
@@ -73,8 +73,13 @@ class OrderController {

def orders = orderService.getOrders(orderTemplate, statusStartDate, statusEndDate, params)

if (params.format && orders) {
def ordersDerivedStatus
Copy link
Member

Choose a reason for hiding this comment

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

In the future, you can just call something like this derivedOrderStatuses. Otherwise it's awkward to read.

return [:]
}

def g = grailsApplication.mainContext.getBean('org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib')
Copy link
Member

Choose a reason for hiding this comment

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

We can also use the injected messageSource for this. But this seems fine.

}

def g = grailsApplication.mainContext.getBean('org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib')
def orderSummaryList = OrderSummary.findAllByIdInList(orderIds)
Copy link
Member

Choose a reason for hiding this comment

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

I assume this method is going to be slow due to the use of the order summary. Are we in for a rude awakening come testing? Or do you think this will perform ok?

@@ -220,6 +223,19 @@
.datepicker('setDate', null);
});
});

function fetchOrdersDerivedStatus() {
Copy link
Member

Choose a reason for hiding this comment

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

Oh interesting. When I wrote the "rude awakening" comment I was thinking that one way to deal with this would be to pull the data in asynchronously. So I guess we won't be rudely awakened.

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

2 participants