Skip to content
8 changes: 4 additions & 4 deletions app/components/settings/provider_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ def self.maturity_label(maturity)
I18n.t(key) if key
end

def initialize(provider_key:, name:, tagline: nil, region: nil, kind: nil, tier: nil,
def initialize(provider_key:, name:, tagline: nil, region: nil, kinds: nil, tier: nil,
maturity: :stable, logo_bg: "bg-gray-500", logo_text: nil)
@provider_key = provider_key
@name = name
@tagline = tagline
@region = region
@kind = kind
@kinds = Array(kinds).compact
@tier = tier
@maturity = maturity.to_sym
@logo_bg = logo_bg
Expand All @@ -29,7 +29,7 @@ def maturity_label
end

def meta_line
[ @region, @kind, @tier ].compact.join(" · ")
[ @region, @kinds.join(" / "), @tier ].compact_blank.join(" · ")
end

def connect_path
Expand All @@ -41,7 +41,7 @@ def filter_data
providers_filter_target: "card",
provider_name: @name.to_s.downcase,
provider_region: @region.to_s.downcase,
provider_kind: @kind.to_s.downcase
provider_kind: @kinds.map { |kind| kind.to_s.downcase }.join(" ")
}
end
end
8 changes: 8 additions & 0 deletions app/controllers/accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def index
@plaid_items = visible_provider_items(family.plaid_items.ordered.includes(:syncs, :plaid_accounts))
@simplefin_items = visible_provider_items(family.simplefin_items.ordered.includes(:syncs))
@lunchflow_items = visible_provider_items(family.lunchflow_items.ordered.includes(:syncs, :lunchflow_accounts))
@akahu_items = visible_provider_items(family.akahu_items.ordered.includes(:syncs, :akahu_accounts))
@enable_banking_items = visible_provider_items(family.enable_banking_items.ordered.includes(:syncs))
@coinstats_items = visible_provider_items(family.coinstats_items.ordered.includes(:coinstats_accounts, :accounts, :syncs))
@mercury_items = visible_provider_items(family.mercury_items.ordered.includes(:syncs, :mercury_accounts))
Expand Down Expand Up @@ -325,6 +326,13 @@ def build_sync_stats_maps
@lunchflow_sync_stats_map[item.id] = latest_sync&.sync_stats || {}
end

# Akahu sync stats
@akahu_sync_stats_map = {}
@akahu_items.each do |item|
latest_sync = item.syncs.ordered.first
@akahu_sync_stats_map[item.id] = latest_sync&.sync_stats || {}
end

# Enable Banking sync stats
@enable_banking_sync_stats_map = {}
@enable_banking_latest_sync_error_map = {}
Expand Down
Loading
Loading