2024-02-02 09:05:04 -06:00
|
|
|
class PagesController < ApplicationController
|
2024-10-09 13:17:58 -05:00
|
|
|
skip_before_action :authenticate_user!, only: %i[early_access]
|
2024-05-17 09:09:32 -04:00
|
|
|
|
2024-02-02 09:05:04 -06:00
|
|
|
def dashboard
|
2025-03-03 12:47:20 -05:00
|
|
|
@period = params[:period] ? Period.from_key(params[:period]) : Period.last_30_days
|
2025-02-21 11:57:59 -05:00
|
|
|
@balance_sheet = Current.family.balance_sheet
|
|
|
|
@accounts = Current.family.accounts.active.with_attached_logo
|
2025-02-25 10:14:07 -06:00
|
|
|
|
|
|
|
@breadcrumbs = [ [ "Home", root_path ], [ "Dashboard", nil ] ]
|
2024-02-02 09:05:04 -06:00
|
|
|
end
|
2024-04-18 07:56:51 -04:00
|
|
|
|
|
|
|
def changelog
|
2024-09-09 16:54:56 -04:00
|
|
|
@release_notes = Provider::Github.new.fetch_latest_release_notes
|
2025-02-21 11:57:59 -05:00
|
|
|
|
|
|
|
render layout: "settings"
|
2024-04-18 07:56:51 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def feedback
|
2025-02-21 11:57:59 -05:00
|
|
|
render layout: "settings"
|
2024-04-18 07:56:51 -04:00
|
|
|
end
|
|
|
|
|
2024-10-09 13:17:58 -05:00
|
|
|
def early_access
|
|
|
|
redirect_to root_path if self_hosted?
|
|
|
|
|
|
|
|
@invite_codes_count = InviteCode.count
|
|
|
|
@invite_code = InviteCode.order("RANDOM()").limit(1).first
|
|
|
|
render layout: false
|
2024-04-18 07:56:51 -04:00
|
|
|
end
|
2024-02-02 09:05:04 -06:00
|
|
|
end
|