-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi guys, I have a modal where I enter a range of dates ("from" "to") and one or more shops. The requirement is this: Depending on the inputs entered, a detailed table of the situation of orders being delivered will be displayed, showing the information in the "number of orders / capacity" format:
A row will be shown for each configured store or the row (s) of the store (s) selected in the filter.
A number of columns equal to the selected interval of days and a total summary for each week (intended as a fixed interval Mon-Sun) elapsed in the specified interval will be graphed.
The summary column will show the "total from to" information on the as is for the reference week, showing respectively the weekly total and the average of the delivery orders for the reference range.
Finally, a row of totals will be shown.
Attention: if in a day not have order I must show this "-/-". Image of required
how I can do this? Thanks a lot.
I suppose your question is about how to render that complicated Grid.
I suggest you to put all your query result from each store into a ListModelList
I guess the Grid's data might come from several objects instead of one object. So you have to merge those object into a custom value object for this grid e.g.
MyStoreData
And this value object combines multiple objects, e.g.
public class MyStoreData {
private Store store;
private DateRange dateRange;
private int sum;
}
Then you can render it by the template like:
<template name="model">
<row>
<label value="${each.store.id}"/>
<label value="${each.dateRange.from}"/>
<label value="${each.dateRange.to}"/>
<label value="${each.sum}"/>
</row>
</template>
If this is not your issue, please describe more specifically about what have you tried and what issue do you encounter. It's better to post the related code here.
Asked: 2022-04-15 19:16:15 +0800
Seen: 6 times
Last updated: Apr 20 '22