mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Initial enable banking implementation (#382)
* Initial enable banking implementation * Handle multiple connections * Amount fixes * Account type mapping * Add option to skip accounts * Update schema.rb * Transaction fixes * Provider fixes * FIX account identifier * FIX support unlinking * UI style fixes * FIX safe redirect and brakeman issue * FIX - pagination max fix - wrap crud in transaction logic * FIX api uid access - The Enable Banking API expects the UUID (uid from the API response) to fetch balances/transactions, not the identification_hash * FIX add new connection * FIX erb code * Alert/notice box overflow protection * Give alert/notification boxes room to grow (3 lines max) * Add "Enable Banking (beta)" to `/settings/bank_sync` * Make Enable Banking section collapsible like all others * Add callback hint to error message --------- Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -23,6 +23,13 @@ class Settings::BankSyncController < ApplicationController
|
||||
path: "https://beta-bridge.simplefin.org",
|
||||
target: "_blank",
|
||||
rel: "noopener noreferrer"
|
||||
},
|
||||
{
|
||||
name: "Enable Banking (beta)",
|
||||
description: "European bank connections via open banking APIs across multiple countries.",
|
||||
path: "https://enablebanking.com",
|
||||
target: "_blank",
|
||||
rel: "noopener noreferrer"
|
||||
}
|
||||
]
|
||||
end
|
||||
|
||||
@@ -123,11 +123,14 @@ class Settings::ProvidersController < ApplicationController
|
||||
# Load all provider configurations (exclude SimpleFin and Lunchflow, which have their own family-specific panels below)
|
||||
Provider::Factory.ensure_adapters_loaded
|
||||
@provider_configurations = Provider::ConfigurationRegistry.all.reject do |config|
|
||||
config.provider_key.to_s.casecmp("simplefin").zero? || config.provider_key.to_s.casecmp("lunchflow").zero?
|
||||
config.provider_key.to_s.casecmp("simplefin").zero? || config.provider_key.to_s.casecmp("lunchflow").zero? || \
|
||||
config.provider_key.to_s.casecmp("enable_banking").zero?
|
||||
end
|
||||
|
||||
# Providers page only needs to know whether any SimpleFin/Lunchflow connections exist with valid credentials
|
||||
@simplefin_items = Current.family.simplefin_items.where.not(access_url: [ nil, "" ]).ordered.select(:id)
|
||||
@lunchflow_items = Current.family.lunchflow_items.where.not(api_key: [ nil, "" ]).ordered.select(:id)
|
||||
# Enable Banking panel needs session info for status display
|
||||
@enable_banking_items = Current.family.enable_banking_items.ordered
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user