SWAMI Page 4 - Completed Inspections

If the user now goes back to the Inspection List page they will no longer see the restaurant that they have completed an inspection on.  Although, if they choose to view the Completed Inspections they should see this restaurant listed.

The inspectCompleteList.html page is pretty much a clone of the other list pages, except this page will display the contents of the JSONStore that relates to the completedInspections collection.


If the user clicks on the logo image, they will be redirected to the #/inspectViewHI route as defined in the app.js file.  This will then pass the {{inspection_id}} as a parameter and this will be used as a route parameter in the inspectViewHI controller.

The inspectViewHI.html file will output the results from the completed Inspection in a read-only format.

 As you can see, this is the same format/structure as before:

In the same way the completedInspection controller worked, the inspectViewHI controller does the same thing, in fact for v2.0 this could be merged into a single JavaScript function but for now, we'll leave this in separate controller files.

Okay, so we've now shown the ability for the user to see what Inspections they need to perform, complete the Inspection, view a completed inspection, so now we need to get that data off the device and into a backend database.  We'll cover that in the next page.

Comments