Skip to content

feat: replace global year selector with per-page date range filters (Story 17.12)#296

Merged
daveharmswebdev merged 4 commits intomainfrom
feature/17-12-replace-year-selector-date-range
Mar 7, 2026
Merged

feat: replace global year selector with per-page date range filters (Story 17.12)#296
daveharmswebdev merged 4 commits intomainfrom
feature/17-12-replace-year-selector-date-range

Conversation

@daveharmswebdev
Copy link
Owner

Summary

  • Replace global YearSelectorService + YearSelectorComponent with per-page DateRangeFilterComponent instances on Dashboard, Properties list, and Property detail
  • Add dateFrom/dateTo query params to 3 backend endpoints (GetAllProperties, GetPropertyById, GetDashboardTotals) with backward-compatible year fallback
  • Add last-year preset to DateRangeFilterComponent and DateRangePreset type
  • Decouple Income component and Report dialogs from removed global year state
  • Delete YearSelectorService, YearSelectorComponent, and all related files (−913 lines)
  • Dynamic stat labels on Property detail ("YTD Expenses" vs "Expenses" based on preset)

Acceptance Criteria

  • AC-1: Year selector removed from sidebar
  • AC-2: Dashboard date range filter with presets (default: This Year)
  • AC-3: Property detail date range filter with dynamic labels
  • AC-4: Properties list date range filter (default: This Year)
  • AC-5: Income list decoupled from global year
  • AC-6: Report dialogs unaffected (own year selector, defaults to current year)
  • AC-7: Full cleanup — no remaining references to removed components

Test plan

  • All 2583 frontend unit tests pass
  • All 1535 backend unit tests pass
  • Manual smoke: Dashboard loads with "This Year" default, changing filter updates totals
  • Manual smoke: Properties list loads with date range filter
  • Manual smoke: Property detail shows date range filter, stat cards update, labels change
  • Manual smoke: Income list works without global year interference
  • Manual smoke: Batch report dialog opens, defaults to current year
  • Manual smoke: Sidebar has no year selector on desktop, tablet, and mobile

GitHub Issue: #279

🤖 Generated with Claude Code

daveharmswebdev and others added 4 commits March 7, 2026 09:00
…Story 17.12)

Replace the global YearSelectorService/YearSelectorComponent (sidebar widget → singleton service → effects in 4 components) with local DateRangeFilterComponent instances on Dashboard, Properties list, and Property detail pages. Add dateFrom/dateTo query params to backend endpoints with year-based fallback for backward compatibility. Decouple Income and Report dialogs from the removed global year state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… added All Time option

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…m shared store, cleanup

- Replace 3 separate date signals with single dateRange signal + computed projections
  to prevent double effect fires on preset change (Dashboard, Properties, PropertyDetail)
- Move propertyId assignment to constructor so effect has it on first fire (PropertyDetail)
- BatchReportDialog now fetches properties via PropertyService with year-scoped dates
  instead of reading date-filtered data from shared PropertyStore singleton
- Remove dead .year-selector-panel CSS from global styles (AC-7 cleanup)
- Remove empty ngOnInit / implements OnInit from Dashboard and Properties components
- Remove unused imports (effect, PropertyStore) from BatchReportDialog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@daveharmswebdev daveharmswebdev merged commit e784665 into main Mar 7, 2026
7 checks passed
@daveharmswebdev daveharmswebdev deleted the feature/17-12-replace-year-selector-date-range branch March 7, 2026 17:39
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.

1 participant