mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 13:35:21 +02:00
parent
4bf72506d5
commit
53f4b32c33
19 changed files with 91 additions and 86 deletions
|
@ -1,4 +1,4 @@
|
|||
<%# locals: (path:, link_token: nil) %>
|
||||
<%# locals: (path:, us_link_token: nil, eu_link_token: nil) %>
|
||||
|
||||
<%= render layout: "accounts/new/container", locals: { title: t(".title"), back_path: new_account_path } do %>
|
||||
<div class="text-sm">
|
||||
|
@ -9,24 +9,24 @@
|
|||
<%= t("accounts.new.method_selector.manual_entry") %>
|
||||
<% end %>
|
||||
|
||||
<% if link_token.present? %>
|
||||
<% if us_link_token %>
|
||||
<%# Default US-only Link %>
|
||||
<button data-controller="plaid" data-action="plaid#open modal#close" data-plaid-link-token-value="<%= @link_token %>" class="flex items-center gap-4 w-full text-center focus:outline-none focus:bg-gray-50 border border-transparent focus:border focus:border-gray-200 px-2 hover:bg-gray-50 rounded-lg p-2">
|
||||
<button data-controller="plaid" data-action="plaid#open modal#close" data-plaid-region-value="us" data-plaid-link-token-value="<%= us_link_token %>" class="flex items-center gap-4 w-full text-center focus:outline-none focus:bg-gray-50 border border-transparent focus:border focus:border-gray-200 px-2 hover:bg-gray-50 rounded-lg p-2">
|
||||
<span class="flex w-8 h-8 shrink-0 grow-0 items-center justify-center rounded-lg bg-alpha-black-50 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.02)]">
|
||||
<%= lucide_icon("link-2", class: "text-gray-500 w-5 h-5") %>
|
||||
</span>
|
||||
<%= t(".connected_entry") %>
|
||||
<%= t("accounts.new.method_selector.connected_entry") %>
|
||||
</button>
|
||||
<% end %>
|
||||
|
||||
<%# EU Link %>
|
||||
<% unless Current.family.country == "US" %>
|
||||
<button data-controller="plaid" data-action="plaid#open modal#close" data-plaid-link-token-value="<%= Current.family.get_link_token(webhooks_url: webhooks_plaid_url, redirect_url: accounts_url, accountable_type: accountable_type.name, region: :eu) %>" class="flex items-center gap-4 w-full text-center focus:outline-none focus:bg-gray-50 border border-transparent focus:border focus:border-gray-200 px-2 hover:bg-gray-50 rounded-lg p-2">
|
||||
<span class="flex w-8 h-8 shrink-0 grow-0 items-center justify-center rounded-lg bg-alpha-black-50 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.02)]">
|
||||
<%= lucide_icon("link-2", class: "text-gray-500 w-5 h-5") %>
|
||||
</span>
|
||||
<%= t(".connected_entry_eu") %>
|
||||
</button>
|
||||
<% end %>
|
||||
<%# EU Link %>
|
||||
<% if eu_link_token %>
|
||||
<button data-controller="plaid" data-action="plaid#open modal#close" data-plaid-region-value="eu" data-plaid-link-token-value="<%= eu_link_token %>" class="flex items-center gap-4 w-full text-center focus:outline-none focus:bg-gray-50 border border-transparent focus:border focus:border-gray-200 px-2 hover:bg-gray-50 rounded-lg p-2">
|
||||
<span class="flex w-8 h-8 shrink-0 grow-0 items-center justify-center rounded-lg bg-alpha-black-50 shadow-[inset_0_0_0_1px_rgba(0,0,0,0.02)]">
|
||||
<%= lucide_icon("link-2", class: "text-gray-500 w-5 h-5") %>
|
||||
</span>
|
||||
<%= t("accounts.new.method_selector.connected_entry_eu") %>
|
||||
</button>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if params[:step] == "method_select" %>
|
||||
<%= render "accounts/new/method_selector", path: new_credit_card_path(return_to: params[:return_to]), link_token: @link_token %>
|
||||
<%= render "accounts/new/method_selector", path: new_credit_card_path(return_to: params[:return_to]), us_link_token: @us_link_token, eu_link_token: @eu_link_token %>
|
||||
<% else %>
|
||||
<%= modal_form_wrapper title: t(".title") do %>
|
||||
<%= render "credit_cards/form", account: @account, url: credit_cards_path %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if params[:step] == "method_select" %>
|
||||
<%= render "accounts/new/method_selector", path: new_crypto_path(return_to: params[:return_to]), link_token: @link_token %>
|
||||
<%= render "accounts/new/method_selector", path: new_crypto_path(return_to: params[:return_to]), us_link_token: @us_link_token, eu_link_token: @eu_link_token %>
|
||||
<% else %>
|
||||
<%= modal_form_wrapper title: t(".title") do %>
|
||||
<%= render "cryptos/form", account: @account, url: cryptos_path %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if params[:step] == "method_select" %>
|
||||
<%= render "accounts/new/method_selector", path: new_depository_path(return_to: params[:return_to]), link_token: @link_token %>
|
||||
<%= render "accounts/new/method_selector", path: new_depository_path(return_to: params[:return_to]), us_link_token: @us_link_token, eu_link_token: @eu_link_token %>
|
||||
<% else %>
|
||||
<%= modal_form_wrapper title: t(".title") do %>
|
||||
<%= render "depositories/form", account: @account, url: depositories_path %>
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
|
||||
<%= link_to @cta, @confirmation_url, class: "button" %>
|
||||
|
||||
<p class="footer"><%= t(".expiry_notice", hours: 24) %></p>
|
||||
<p class="footer"><%= t(".expiry_notice", hours: 24) %></p>
|
||||
|
|
|
@ -6,4 +6,4 @@ EmailConfirmation#confirmation_email
|
|||
|
||||
<%= t(".cta") %>: <%= @confirmation_url %>
|
||||
|
||||
<%= t(".expiry_notice", hours: 24) %>
|
||||
<%= t(".expiry_notice", hours: 24) %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if params[:step] == "method_select" %>
|
||||
<%= render "accounts/new/method_selector", path: new_investment_path(return_to: params[:return_to]), link_token: @link_token %>
|
||||
<%= render "accounts/new/method_selector", path: new_investment_path(return_to: params[:return_to]), us_link_token: @us_link_token, eu_link_token: @eu_link_token %>
|
||||
<% else %>
|
||||
<%= modal_form_wrapper title: t(".title") do %>
|
||||
<%= render "investments/form", account: @account, url: investments_path %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if params[:step] == "method_select" %>
|
||||
<%= render "accounts/new/method_selector", path: new_loan_path(return_to: params[:return_to]), link_token: @link_token %>
|
||||
<%= render "accounts/new/method_selector", path: new_loan_path(return_to: params[:return_to]), us_link_token: @us_link_token, eu_link_token: @eu_link_token %>
|
||||
<% else %>
|
||||
<%= modal_form_wrapper title: t(".title") do %>
|
||||
<%= render "loans/form", account: @account, url: loans_path %>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
</div>
|
||||
<% if Current.user.admin? && user != Current.user %>
|
||||
<div class="ml-auto">
|
||||
<%= button_to settings_profile_path(user_id: user),
|
||||
<%= button_to settings_profile_path(user_id: user),
|
||||
method: :delete,
|
||||
class: "text-red-500 hover:text-red-700",
|
||||
data: { turbo_confirm: {
|
||||
|
@ -101,7 +101,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<% if Current.user.admin? %>
|
||||
<%= button_to invitation_path(invitation),
|
||||
<%= button_to invitation_path(invitation),
|
||||
method: :delete,
|
||||
class: "text-red-500 hover:text-red-700",
|
||||
data: { turbo_confirm: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue