Skip to content

Comments

feat(app): wire document attachments for service logs, maintenance, quotes, and vendors#435

Merged
cpcloud merged 2 commits intomainfrom
feat/427-service-log-documents
Feb 21, 2026
Merged

feat(app): wire document attachments for service logs, maintenance, quotes, and vendors#435
cpcloud merged 2 commits intomainfrom
feat/427-service-log-documents

Conversation

@cpcloud
Copy link
Owner

@cpcloud cpcloud commented Feb 21, 2026

Summary

  • Wire up document attachments on service log entries, maintenance items, quotes, and vendors by adding a "Docs" drilldown column with per-entity document counts
  • Add serviceLogDocumentDef, maintenanceDocumentDef, quoteDocumentDef, and vendorDocumentDef detail definitions with routing
  • Introduce a formKind discriminator on detailRoute so nested detail views (e.g. appliance -> maintenance -> docs) route to the correct document def instead of the parent tab's; nil handler is treated as "no match" to prevent fallback surprises
  • Extract entityIDs generic helper to replace repeated manual ID-collection boilerplate in handlers
  • Scoped variants (appliance maintenance, vendor quotes, project quotes) and their handlers are also updated
  • All changes follow the existing pattern used by projects, appliances, and incidents -- no data-layer changes needed

Steps to reproduce

  1. Open the Maintenance tab, select a maintenance item, drill into Service Log, select an entry, and activate the "Docs" column to see its documents
  2. Go back to the Maintenance tab and activate the "Docs" column directly on a maintenance item
  3. Open the Quotes tab and activate the "Docs" column on a quote
  4. Open the Vendors tab and activate the "Docs" column on a vendor
  5. For nested paths (e.g. Appliances -> drill into appliance -> Maint -> drill into item -> Docs), verify the breadcrumb says "Maintenance" not "Appliances"

closes #427

@cpcloud cpcloud changed the title feat(app): attach documents to service log entries feat(app): wire document attachments for service logs, maintenance, quotes, and vendors Feb 21, 2026
@cpcloud cpcloud force-pushed the feat/427-service-log-documents branch 2 times, most recently from 22adc06 to 0847b05 Compare February 21, 2026 20:25
cpcloud and others added 2 commits February 21, 2026 15:42
Wire up the existing DocumentEntityServiceLog polymorphic link in the UI
so users can attach and browse documents (receipts, invoices, etc.) on
individual service log entries.

- Add "Docs" drilldown column to service log table with document counts
- Add serviceLogDocumentDef detail definition and routing
- Handle serviceLogColDocs in the exhaustive inline-edit switch
- Add tests for doc count rendering, handler form kind, drilldown routing

closes #427

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Make serviceLogColDocs fall through to startEditServiceLogForm,
  matching the pattern used by all other entity Docs columns
- Harden formKind route matching: treat nil handler as "no match"
  instead of matching all formKind-scoped routes
- Extract entityIDs generic helper to replace 10 instances of
  manual ID-collection boilerplate in handlers
- Add doc count cell tests for maintenance, quote, and vendor rows
  (previously only service log had coverage)
- Rename TestMaintenanceColumnsIncludeLog to
  TestMaintenanceColumnsIncludeLogAndDocs

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@cpcloud cpcloud force-pushed the feat/427-service-log-documents branch from 0847b05 to 54a7064 Compare February 21, 2026 20:43
@cpcloud cpcloud merged commit 1c6e2ea into main Feb 21, 2026
10 checks passed
@cpcloud cpcloud deleted the feat/427-service-log-documents branch February 21, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: attach documents to Service Log of a Maintenance item

1 participant