Property detail page: Projects section (depends on #122) #176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Split from #126 (CSS refresh). Child of spike #121. Part of Phase 3. Depends on #122 (ServiceRequest model — MERGED).
Repo
ldraney/landscaping-assistantUser Story
As a crew lead or admin, I want to see active and completed projects on the property detail page so I can track one-off work and service requests alongside the property's regular services.
Context
The property detail page (refreshed in #126) needs a Projects/Requests section showing ServiceRequests for the property. This is the admin/lead-facing display — the client-facing request form is #123. Projects are ServiceRequest records.
Source of truth for statuses is the model (
ServiceRequest::STATUSESandServiceRequest::VALID_TRANSITIONS), notdocs/service-requests.md(which may lag behind).File Targets
app/views/properties/show.html.erb(update — add projects/requests section)app/views/properties/_service_requests.html.erb(new partial — lives under properties/ since it renders from properties#show)app/assets/stylesheets/application.css(add project list and status badge styles — reuse existing.status-indicatorand.role-badgepatterns at lines 1564-1616)app/controllers/properties_controller.rb(eager-load service_requests in show action)spec/requests/properties_spec.rb(update show spec)Acceptance Criteria
Test Expectations
spec/requests/properties_spec.rb: show page includes projects section, renders request detailsbundle exec rspecConstraints
~/ror-css-guide— no Tailwind, design tokens in :root.status-indicatorand.role-badgeCSS patterns for status/type badgesServiceRequest::STATUSESin the model as source of truth for status valuesFeature Flag
None
Checklist
Related
Scope Review: NEEDS_REFINEMENT
Review note:
review-1403-2026-06-07Template complete, all file targets verified, dependencies (#122, #126) confirmed merged. One fixable issue blocks READY:
[BODY]docs/service-requests.mddoes not exist in the repo. The Context and Constraints sections reference it. Either create the doc (separate ticket) or inline the status lifecycle values (requested, quoted, paid, scheduled, completed, declinedfromServiceRequest::STATUSES). The model is the source of truth.[SCOPE]Noarch-rails-appnote exists in pal-e-docs (platform-wide gap, not blocking this ticket specifically).Scope update (post review-1403-2026-06-07):
New dependency: #195 (auth prereqs — session sub, accepted status, current_crew_member helper).
Property access model clarified:
docs/service-requests.mdwill exist once PR #182 merges (already approved, pending merge).Access update: Request creation is NOT client-only. Any role can create a service request from the property detail page: