Lesson 5 of 7 · 4 min
Managing the Resource Library (Admin)
Use the admin list view to edit, deactivate, and delete existing SOPs and checklists, and understand when to deactivate vs. delete.
Managing the Resource Library (Admin)
Video coming soon
Lesson Notes
The admin list at /resources shows all resources in the org regardless of active status, split into two tabs: SOPs and Checklists. The tab strip shows live counts in parentheses — 'SOPs (4)' and 'Checklists (7)' — so you can see library size at a glance. Clicking a tab filters the list to that type; the tab strip is the only way to switch because both types would otherwise fill one unwieldy list. Inactive resources show an 'Inactive' badge in outline style next to the title, so you can see at a glance which resources the team can currently see.
Each resource card in the admin list shows the title, the inactive badge if applicable, the short description, all topic badges and service type badges, and — for checklists only — an item count and a run count ('7 items · 23 runs'). The run count tells you how actively this checklist is being used, which is important context before you delete or significantly edit it. Two icon buttons on the right of each card provide the only actions: a Pencil icon (edit) and a Trash icon (delete, styled in rose/red).
Clicking the Pencil icon opens the same ResourceEditorDialog populated with the existing resource's data. All fields are editable: title, description, body (for SOPs), items (for checklists), topics, service types, and the active toggle. For checklists, the item editor supports adding new items, editing existing items (by label and required flag), and removing items. The backend applies a diff: items sent with their existing id are updated; items with no id (temp- prefixed client-side) are inserted; items present in the existing database record but absent from the submission are deleted. Deleting a checklist item also removes any completion records for that item across all runs — do this carefully if the checklist has active runs.
Clicking the Trash icon opens an AlertDialog (not a simple browser confirm) with the warning: 'This permanently removes the resource and any per-job runs your team has tied to it. To hide it without losing the data, toggle it inactive instead.' The dialog has Cancel and a rose-colored 'Delete' button. Confirming sends a DELETE to /resources/:id which hard-deletes the resource and cascade-deletes all runs and item completions. This is irreversible — the recommendation in the dialog is deliberate: use the Active toggle to hide resources rather than deleting them, especially for checklists that have accumulated run history.
A good admin workflow for managing the library over time: use Topics and Service types accurately on creation (they are editable later), toggle resources inactive rather than deleting when a procedure changes, and create a new version of a resource when you make a significant procedural change rather than editing the live one mid-shift. There is no versioning system in the current resource model, so a major edit to a checklist template will immediately change what technicians see on their next run — even if they are mid-job on the old version.
Key Takeaways
- The SOPs and Checklists tabs show live counts and include inactive resources so admins have full visibility without team members seeing drafts.
- The run count on each checklist card tells you how heavily it is used — a high count is a signal to be cautious about edits or deletes.
- Editing a checklist applies a server-side diff: new items are inserted, existing items are updated by id, and missing items are deleted along with their completion records.
- Delete is a hard, cascading, irreversible operation — prefer the Active toggle to hide resources and preserve historical run data.
- There is no versioning: editing a live resource changes what the team sees immediately, including technicians mid-run on that checklist.