stevenyvr987 / overdrive-evergreen-opac

Automatically exported from code.google.com/p/overdrive-evergreen-opac
0 stars 0 forks source link

Do not reload hold or checkout list after making certain transactions #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
After making a transaction, we need to update the list on the screen to show 
the change. Currently, to do achieve this, we reload the entire page.

But the OD server returns an updated version of the related holds or checkout 
object, which can be used to more efficiently update the screen.

Original issue reported on code.google.com by steven3...@gmail.com on 10 Aug 2014 at 6:48

GoogleCodeExporter commented 9 years ago
We need to refactor the code at various places.

In the page rewrite functions, decouple the code to build a new row from the 
code to populate the row with initial hold or checkout values.

At the API layer, put the code to normalize the hold or checkout object into a 
function so that it can be re-used.

At the API layer, publish the hold or checkout object to the higher layer. The 
trigger event should be called 'od.hold' or 'od.checkout', ie, it indicates the 
data type.

Original comment by steven3...@gmail.com on 15 Aug 2014 at 8:14

GoogleCodeExporter commented 9 years ago

Original comment by steven3...@gmail.com on 17 Aug 2014 at 5:13

GoogleCodeExporter commented 9 years ago
The actions that can participate in this enhancement are:
- Add a hold suspension
- Select a checkout format

These are the actions that return a new hold or checkout object, which can be 
used to immediately update the hold or checkout list. There is also no need to 
update the dash board because the length of the list remains constant.

If we further refactor the code, we can include more actions:
- Remove a hold
- Return a checkout

These are actions that delete an entry from a list. The dashboard would have to 
be updated because of the change in the length of the list.

Original comment by steven3...@gmail.com on 17 Aug 2014 at 5:25

GoogleCodeExporter commented 9 years ago
The action of removing a hold suspension is an odd one, because the hold is not 
removed from the list and the action doesn't return a hold object. Thus, we 
don't have enough information to update the list unless we put the logic in the 
code.

Original comment by steven3...@gmail.com on 17 Aug 2014 at 6:39

GoogleCodeExporter commented 9 years ago
Also, we can't use the API to get the one specific hold object; we can only get 
the entire list.

Original comment by steven3...@gmail.com on 17 Aug 2014 at 6:47

GoogleCodeExporter commented 9 years ago
The following actions are done.

Updates w/o page reload:
- Add a hold suspension
- Select a checkout format

Removes w/o page reload:
- Remove a hold
- Return a checkout

Dashboard needs to respond to the change in length of hold or checkout list.

Original comment by steven3...@gmail.com on 17 Aug 2014 at 8:12

GoogleCodeExporter commented 9 years ago
A responsive dashboard is done.

Original comment by steven3...@gmail.com on 18 Aug 2014 at 8:12