Maintenance Records
Maintenance Records detail service performed on a particular refrigerator. Individually they are a brief record of service performed, and taken together they compose the service history of a refrigerator.
Lists of Maintenance Records
Function
A List of Maintenance Records is similar to a Lists of Refrigerators. It is launched by pressing the View All Maintenance Records button on the Refrigerator Menu.
The list portion contains each maintenance record in the log for a particular refrigerator, with the date serviced highlighted. Clicking that list item will open the Maintenance Record Menu.
Records can be searched by refrigerator ID. This page is paginated by default to 10 records per page. This can be adjusted to 20, 50, 100, or 1000 by selecting the option from the drop menu. To navigate between pages of maintenance records, use the Next and Prev buttons.
Tapping the Edit button will launch the Survey form for this maintenance record. Each field will be prepopulated with the values shown in the menu, so that only the values that are incorrect need to be filled in.
Implementation
The maintenance records list uses the files tables/maintenance_logs/html/maintenance_logs_list.html
and tables/maintenance_logs/js/meaintenance_logs_list.js
similarly to the refrigerators list.
The key differences are the listQuery
and searchParams
variables that define the values that will populate the same user interface. This file's versions of listQuery
finds all maintenance logs that match the refrigerator ID and this versions of searchParams
searches for matching refrigerator IDs.
That logic that implements that user interface is discussed in The list_view_logic.js library.
Files
tables/maintenance_logs/html/maintenance_logs_list.html
tables/maintenance_logs/js/maintenance_logs_list.js
config/assets/js/list_view_logic.js
Forms
None
Database Tables
Maintenance Logs
Refrigerators