Custom Calendar - Redesign required!

0
  Hi, I’m in the process of creating a custom calendar however I’m concerned about the design / performance. The calendar itself will load on the current week and let the users go to next / previous weeks using the arrows which sets the date content on the WeekHelper non persistent object. For each day the DayHelper dataview holds the date for that day, within this is a listview pulling from the database for that day (additional constraints also applied depending on the user role). The issue i have is this isn’t very efficient and it’s difficult to scale for other user roles (who should see diff calendar events). Ideally I’d like to load all events for the user for the week and for each day filter that list of data for just the day I require i.e. once call to database to return list of events for this user for the week. What would be the most efficient approach to doing this?  I’ve mocked up what I have currently:
asked
1 answers
0

Hm, some info on my project, showing and reporting the day-details per week:

Similarity: every day has to have an object available because it needs to show up. The difference: my project only needs one week at the time. The microflow sets up the entire week, regardless of the day having registered hours or not. This results in a helper which will be destroyed on page-leave.

Also, my project needs the calender-days showing 7 days per week, and in order to retrieve the EventChilds and show them per day, per week, the quickest way is to make the EventChild-entity also have a week number and an index on that attribute for optimized retrieval. Also, make the EventChild-entity have a day number. Then create the main helper on your page containing all objects, retrieved all at once. Loop over those objects and

  • create a helper for each week and associate the week-helper to the main helper;
  • create day-helpers and associate day-helpers to the week-helpers;
  • associate a non-persistable version of each EventChild to the day-helper
answered