mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 07:39:39 +02:00
22 lines
506 B
Ruby
22 lines
506 B
Ruby
|
class Family::SyncCompleteEvent
|
||
|
attr_reader :family
|
||
|
|
||
|
def initialize(family)
|
||
|
@family = family
|
||
|
end
|
||
|
|
||
|
def broadcast
|
||
|
family.broadcast_replace(
|
||
|
target: "balance-sheet",
|
||
|
partial: "pages/dashboard/balance_sheet",
|
||
|
locals: { balance_sheet: family.balance_sheet }
|
||
|
)
|
||
|
|
||
|
family.broadcast_replace(
|
||
|
target: "net-worth-chart",
|
||
|
partial: "pages/dashboard/net_worth_chart",
|
||
|
locals: { balance_sheet: family.balance_sheet, period: Period.last_30_days }
|
||
|
)
|
||
|
end
|
||
|
end
|