Add "Scheduled By" filter to inspection worklists
Objective
- Add a Scheduled By filter to the worklist filter bar on inspection-type worklists so schedulers can narrow a worklist to jobs they personally booked.
- Give office staff a self-service QC tool — replacing the "my orders" visibility they had in the Spectora widget — to review their own closed or open work without needing a separate worklist per person.
- Mirror the existing "Created By" filter already available on quote worklists; the underlying field and lookup mechanism are the same.
Background
- Catherine Lemoine (SE/Residential) requested this as a scheduler productivity and QC feature.
- Schedulers previously used the Spectora widget to see "their own orders" — e.g. what they had closed that day — as a lightweight review step. That capability hasn't carried over into Attik worklists.
- The "Created By" filter on quote worklists already implements this pattern: the
createdByfield on the quote document stores the booking staff member's employee ID, andcreateEmployeeStagesWithKeyword('createdBy')populates the resolved name in the response pipeline. - The same
createdByfield exists on inspection records; it is set at creation time inPOST /worklistviares.locals.membership.employeeId || res.locals.membership._inspectorId || res.locals.membership._officeStaffId. - The backend
GET /worklist/:id/datahandler already accepts awlCreatedByquery param but only applies it whenworklist.type === 'quotes'. Inspections are excluded. - The frontend
WorklistFiltersBar.tsxrenders the "Created By" Autocomplete only inside theshowQuoteFiltersbranch. The office staff list (useServer<OfficeStaff[]>({ url: 'office-staff' })) is also only fetched for quotes.
Product Decisions
Locked
- Filter label — Display as "Scheduled By" on inspection worklists (not "Created By"), to match the mental model schedulers use.
- Staff pool — All office staff (same unscoped list used for "Created By" on quotes); no role restriction.
- Scope — Inspection worklists only. Quote worklists already have "Created By." Event worklists are out of scope for this issue.
Scope
Backend — attik-backend/src/routes/worklist.ts
- In the ephemeral view filter block, extend the
wlCreatedBycondition to apply whenworklist.type === 'inspections', not just'quotes'. The field path iscreatedByon the inspection document — same as quotes.
Frontend — attik-frontend/src/components/task-check/WorklistFiltersBar.tsx
- The
officeStafffetch (useServer<OfficeStaff[]>({ url: 'office-staff' })) currently conditions onworklistType === 'quotes'. Extend to also fetch whenworklistType === 'inspections'. - The "Created By" Autocomplete currently renders inside the
showQuoteFiltersblock. Add a parallel "Scheduled By" Autocomplete inside theshowInspectionFiltersblock, wired to the samecreatedBy/wlCreatedByparam but with the label "Scheduled By." - The
FilterValuesinterface,buildParams,hasActiveFilters,activeFilterCount, andclearAllalready handlecreatedBy— verify they extend cleanly to the inspections path or adjust as needed.
References
- ATT-785 — Worklist Filtering (Done) — original filter bar implementation
attik-frontend/src/components/task-check/WorklistFiltersBar.tsxattik-backend/src/routes/worklist.ts
Status: Planned
Log in to comment and vote
No comments yet
Be the first to share your thoughts.