1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 13:35:21 +02:00

feat: Add institution details to Plaid items (#1816)

* feat: Add institution details to Plaid items

- Fetch and store institution URL, ID, and primary color for Plaid items
- Update PlaidItem model to retrieve and save institution metadata
- Add new method in Plaid provider to get institution details
- Update account logo view to use institution domain for logo generation

* Add institution domain method to Account model

- Extract institution domain logic from view to Account model
- Simplify logo view by using new institution_domain method
- Improve code reusability and separation of concerns
This commit is contained in:
Josh Pigford 2025-02-06 08:57:24 -06:00 committed by GitHub
parent df5f4c83fe
commit 7ba9063e04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 46 additions and 6 deletions

View file

@ -3,9 +3,7 @@
<%= turbo_frame_tag dom_id(account) do %>
<div class="p-4 flex items-center justify-between gap-3 group/account">
<div class="flex items-center gap-3">
<div class="w-8 h-8 flex items-center justify-center rounded-full text-xs font-medium <%= account.is_active ? "bg-blue-500/10 text-blue-500" : "bg-gray-500/10 text-gray-500" %>">
<%= account.name[0].upcase %>
</div>
<%= render "accounts/logo", account: account, size: "md" %>
<div>
<% if account.scheduled_for_deletion? %>

View file

@ -7,8 +7,10 @@
"full" => "w-full h-full"
} %>
<% if account.logo.attached? %>
<%= image_tag account.logo, class: size_classes[size] %>
<% if account.plaid_account_id? && account.institution_domain.present? %>
<%= image_tag "https://logo.synthfinance.com/#{account.institution_domain}", class: "rounded-full #{size_classes[size]}" %>
<% elsif account.logo.attached? %>
<%= image_tag account.logo, class: "rounded-full #{size_classes[size]}" %>
<% else %>
<%= circle_logo(account.name, hex: account.accountable.color, size: size) %>
<% end %>