mirror of
https://github.com/we-promise/sure.git
synced 2026-04-25 06:54:07 +00:00
* 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
17 lines
570 B
Plaintext
17 lines
570 B
Plaintext
<%# locals: (account:, size: "md") %>
|
|
|
|
<% size_classes = {
|
|
"sm" => "w-6 h-6",
|
|
"md" => "w-9 h-9",
|
|
"lg" => "w-10 h-10",
|
|
"full" => "w-full h-full"
|
|
} %>
|
|
|
|
<% 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 %>
|