mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 22:34:47 +00:00
* Fix cashflow and outflows widgets to respect user's default period preference Resolves issue #118 where the Cashflow and Outflows widgets on the dashboard were hardcoded to use a 30-day period instead of respecting the user's default period preference setting. Changes: - Updated @cashflow_period to use Current.user&.default_period as fallback - Updated @outflows_period to use Current.user&.default_period as fallback - Both now follow the same pattern as the Periodable concern's set_period method This ensures consistency across all dashboard widgets - Net Worth, Cashflow, and Outflows now all respect the user's preference. * Synchronize period selection across all dashboard widgets All three dashboard widgets (Net Worth, Cashflow, and Outflows) now use a single shared period parameter, ensuring consistent data magnitudes across the dashboard. Changes: - Simplified controller to use single @period for all three widgets - Removed widget-specific period parameters (cashflow_period, outflows_period) - All widgets now use the shared 'period' parameter - All period dropdowns use turbo_frame: "_top" to reload entire page - Removed turbo_frame_tags from dashboard view for cleaner implementation User experience improvement: - Changing the period in any widget now updates all three widgets - Ensures data consistency and easier comparison across widgets - Maintains respect for user's default period preference * Make Net Worth widget title styling consistent with Cashflow and Outflows Changed Net Worth title from <p> with text-sm/text-secondary to <h2> with text-lg to match the consistent styling used by Cashflow and Outflows widgets. This provides a more unified visual appearance across all dashboard widgets. --------- Co-authored-by: Claude <noreply@anthropic.com>