Hi Guys, I need help in understanding how to design the below table.There are different toilets (t2-t201, t2-t202........) and the numbers highlighted are the complaints received at each time interval (12am, 1am,...........)If Toilet (T2-T201) has received 2 complaints at 12am then the number should be 2 as shown in below image .
I need to understand exactly how to structure the input that we need for this kind of table !Maybe a dummy data with OML could help :)
It's not really that dynamic, right ? It is always showing the 24 hours of one particular day ??
So you can have a structure with an integer attribute for each hour, and make a list of that structure come out of your Fetch.
Then, in the UI, that's a straightforward table widget.
As for the datamodel, in it's most simple form, you just have a toilet and complaint entity, the complaint having both a datetime and a reference id to toilet.
With that datamodel, your challenge will be to translate each datetime to the right timeslot, and to pivot each timeslot from a row into a column. If you go this way, then I'd say an advanced SQL with pivot clause is the way to go.
If this way of presenting the data (a list of timeslots) is very central to your system, you could also bend your datamodel to be already more prepared to be displayed like this. That will make retrieval for this overview easier, but might make saving data more convoluted.
Dorine