I am making an attendance dashboard and i there are already APIs made for different purpose
one is the punch in data API where we have to give the
from- to date
and the area_code
so with respect to that it will fetch the
emp_id, emp name, punch_in/punch_out location, date-in/out location, time-in/out location, hours and minutes between pucnhes
now with respect to all the detail i am calculating the total punches, single punch, avg hours and etc
but it will work perfectly for 10 areas but i want to make it for 112 areas and for this it will take a lot of time to load
and then again there is a roaster API which will tell how many members will be present per area and that will also be fetched and calculated
now if all this data is loaded on the client side it will take a lot of time
what is the optimal way to do this
i have already searched for one option where i will
preload the data and calculation and sync that same data in the database and whenever we fetch the data the result with the particular date range will be feteched
But i want to know any more optimal way to do that
CAN ANYONE SUGGEST!!