Add weekly tracking view and property active/inactive status #8

Closed
opened 2026-05-25 01:39:45 +00:00 by ldraney · 1 comment
Owner

Type

Feature

Lineage

Standalone — extends work queue from #5 with tracking and property lifecycle.

Repo

ldraney/landscaping-assistant

User Story

As a landscaper
I want to see which properties I completed each week and mark houses I no longer service
So that I can track my weekly progress and keep my property list clean

Context

The app assumes every recorded property needs weekly service. We need a way to mark properties inactive (no longer serviced) and a weekly completion view. The current schema already supports weekly tracking — work_queue_items has work_date + property_id + completed. Only migration needed is active boolean on properties. Navigation expands from two tabs to four: Today, Week, New, Properties.

File Targets

Files to modify or create:

  • db/migrate/xxx_add_active_to_properties.rb — add active boolean (default true)
  • app/models/property.rbscope :active, default scope considerations
  • app/controllers/weeks_controller.rb — new controller for weekly view
  • app/views/weeks/index.html.erb — weekly completion grid
  • app/controllers/properties_controller.rb — add update action for active toggle
  • app/views/properties/manage.html.erb — properties management view (or new index)
  • app/views/layouts/application.html.erb — four-tab nav (Today, Week, New, Properties)
  • app/views/work_queue_items/index.html.erb — filter "All Properties" to active only
  • config/routes.rb — add weeks resource, properties manage route
  • app/assets/stylesheets/application.css — week grid styles, inactive property styles

Files NOT to touch:

  • app/javascript/controllers/location_controller.js — GPS flow unchanged

Acceptance Criteria

  • active column on properties, defaults to true
  • Week tab shows all active properties with completion status for selected week (Mon-Sun)
  • Week navigation with prev/next arrows
  • Summary line: "12/15 completed" or equivalent
  • Properties tab lists all properties with active/inactive toggle
  • Inactive properties visually dimmed
  • Inactive properties excluded from Week view and Today "All Properties" list
  • Four-tab nav: Today, Week, New, Properties — active state correct on all

Test Expectations

  • Model spec: Property.active scope returns only active
  • Request spec: weeks#index returns 200, shows correct completion counts
  • Request spec: toggling property active status persists
  • Run command: bundle exec rspec

Constraints

  • No new tables — weekly tracking is a read-only aggregation of work_queue_items
  • Week = Monday through Sunday
  • Match existing design token system and component patterns
  • Properties tab should feel lightweight — toggle and search, not a full CRUD form

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-landscaping-assistant
### Type Feature ### Lineage Standalone — extends work queue from #5 with tracking and property lifecycle. ### Repo `ldraney/landscaping-assistant` ### User Story As a landscaper I want to see which properties I completed each week and mark houses I no longer service So that I can track my weekly progress and keep my property list clean ### Context The app assumes every recorded property needs weekly service. We need a way to mark properties inactive (no longer serviced) and a weekly completion view. The current schema already supports weekly tracking — `work_queue_items` has `work_date` + `property_id` + `completed`. Only migration needed is `active` boolean on `properties`. Navigation expands from two tabs to four: Today, Week, New, Properties. ### File Targets Files to modify or create: - `db/migrate/xxx_add_active_to_properties.rb` — add `active` boolean (default true) - `app/models/property.rb` — `scope :active`, default scope considerations - `app/controllers/weeks_controller.rb` — new controller for weekly view - `app/views/weeks/index.html.erb` — weekly completion grid - `app/controllers/properties_controller.rb` — add update action for active toggle - `app/views/properties/manage.html.erb` — properties management view (or new index) - `app/views/layouts/application.html.erb` — four-tab nav (Today, Week, New, Properties) - `app/views/work_queue_items/index.html.erb` — filter "All Properties" to active only - `config/routes.rb` — add weeks resource, properties manage route - `app/assets/stylesheets/application.css` — week grid styles, inactive property styles Files NOT to touch: - `app/javascript/controllers/location_controller.js` — GPS flow unchanged ### Acceptance Criteria - [ ] `active` column on properties, defaults to true - [ ] Week tab shows all active properties with completion status for selected week (Mon-Sun) - [ ] Week navigation with prev/next arrows - [ ] Summary line: "12/15 completed" or equivalent - [ ] Properties tab lists all properties with active/inactive toggle - [ ] Inactive properties visually dimmed - [ ] Inactive properties excluded from Week view and Today "All Properties" list - [ ] Four-tab nav: Today, Week, New, Properties — active state correct on all ### Test Expectations - [ ] Model spec: `Property.active` scope returns only active - [ ] Request spec: weeks#index returns 200, shows correct completion counts - [ ] Request spec: toggling property active status persists - Run command: `bundle exec rspec` ### Constraints - No new tables — weekly tracking is a read-only aggregation of `work_queue_items` - Week = Monday through Sunday - Match existing design token system and component patterns - Properties tab should feel lightweight — toggle and search, not a full CRUD form ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-landscaping-assistant`
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-1250-2026-05-24

Ticket template is complete and file targets all verified against codebase, but two issues require resolution before this moves to next_up:

  • [SCOPE] User story weekly-tracking missing from project-landscaping-assistant user-stories table — needs creation
  • [SCOPE] Architecture note arch-rails-app does not exist in pal-e-docs — needs creation
  • [DECOMPOSE] 10 file targets and 8 acceptance criteria exceed the 5-minute rule — route to skill-decompose-ticket for sub-board creation. Suggested 4-phase split: (1) migration + model scope, (2) week controller + view, (3) properties management + toggle, (4) nav expansion + active filtering
## Scope Review: NEEDS_REFINEMENT Review note: `review-1250-2026-05-24` Ticket template is complete and file targets all verified against codebase, but two issues require resolution before this moves to next_up: - **[SCOPE]** User story `weekly-tracking` missing from project-landscaping-assistant user-stories table — needs creation - **[SCOPE]** Architecture note `arch-rails-app` does not exist in pal-e-docs — needs creation - **[DECOMPOSE]** 10 file targets and 8 acceptance criteria exceed the 5-minute rule — route to `skill-decompose-ticket` for sub-board creation. Suggested 4-phase split: (1) migration + model scope, (2) week controller + view, (3) properties management + toggle, (4) nav expansion + active filtering
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/landscaping-assistant#8
No description provided.