When TODO is toggled, calves on the TODO list should show up in order of how much time has expired since they entered the TODO list. See screen 2 for the general areal that the calves should show up in.
To retrieve this data a GET request should be sent to the mock api for
GET /calves?filter[waiting]=true&filter[wait_expires]=>1456426326&sort=wait_expires&offset=0&limit=100
Note:1456426326 is today's date integer encoded. The date is represented in seconds since 1/1/1970
This will retrieve, a list of calves who are on the to do list, sorted by the day they entered the to do list -- those who entered first will appear first. Offset and limit have been set in order to paginate results.
To reduce the number of http requests time, it might be smart to add the include parameter to the collection query like so
GET /calves?filter[waiting]=true &filter[wait_expires]=>1456426326&sort=wait_expires&include=treatment_plan
Notice the edition of include=treatment_plan. This will include any treatment plans the cows are associated with, so that when the cow is clicked, this information can easily be passed on to screen 3 without making another API call.
When TODO is toggled, calves on the TODO list should show up in order of how much time has expired since they entered the TODO list. See screen 2 for the general areal that the calves should show up in.
To retrieve this data a GET request should be sent to the mock api for
Note: 1456426326 is today's date integer encoded. The date is represented in seconds since 1/1/1970
This will retrieve, a list of calves who are on the to do list, sorted by the day they entered the to do list -- those who entered first will appear first. Offset and limit have been set in order to paginate results.
To reduce the number of http requests time, it might be smart to add the include parameter to the collection query like so
Notice the edition of include=treatment_plan. This will include any treatment plans the cows are associated with, so that when the cow is clicked, this information can easily be passed on to screen 3 without making another API call.