mirror of
https://github.com/we-promise/sure.git
synced 2026-05-12 07:05:00 +00:00
* Complete Sophtron account mapping * Clarify Sophtron login challenge flow * Add Sophtron connection UI timeout * Treat Sophtron timeout jobs as failed * Reset failed Sophtron connection state * Handle stale Sophtron connection jobs * Advance Sophtron polling timeout * Shorten Sophtron connection timeout * Fix Sophtron modal polling updates * Stabilize Sophtron MFA polling * Give Sophtron OTP challenges more time * Clarify Sophtron institution login failures * Extend Sophtron polling during login progress * Probe Sophtron accounts after completed MFA step * Align Sophtron dialogs with design system * Start Sophtron initial load after linking accounts * Fix Sophtron initial transaction load * Fail Sophtron sync without institution connection * Fix tests * Wrap Sophtron account linking in transaction * Wrap Sophtron provider responses * Fix Sophtron MFA security tests * Guard Sophtron MFA challenge arrays * Respect Sophtron initial load window * Use unique Sophtron MFA answer field ids * Address Sophtron review follow-ups * Fix Sophtron transaction sync refresh * Avoid blocking Sophtron refresh polling * Move Sophtron account helpers to model * Keep Sophtron grouping provider-level * Start new Sophtron institution links * Isolate Sophtron institution connections --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
61 lines
2.6 KiB
Plaintext
61 lines
2.6 KiB
Plaintext
<%= turbo_frame_tag "modal" do %>
|
|
<%= render DS::Dialog.new do |dialog| %>
|
|
<% dialog.with_header(title: t(".title", account_name: @account.name)) %>
|
|
|
|
<% dialog.with_body do %>
|
|
<div class="space-y-4">
|
|
<p class="text-sm text-secondary">
|
|
<%= t(".description") %>
|
|
</p>
|
|
|
|
<%= form_with url: link_existing_account_sophtron_items_path,
|
|
method: :post,
|
|
class: "space-y-4",
|
|
data: { turbo_frame: "_top" } do %>
|
|
<%= hidden_field_tag :account_id, @account.id %>
|
|
<%= hidden_field_tag :return_to, @return_to %>
|
|
|
|
<div class="space-y-2">
|
|
<% @available_accounts.each do |account| %>
|
|
<% has_blank_name = account[:account_name].blank? %>
|
|
<label class="flex items-start gap-3 rounded-lg border <%= has_blank_name ? "border-destructive bg-container-inset opacity-60" : "border-primary bg-container-inset hover:bg-container-inset-hover" %> p-3 <%= has_blank_name ? "cursor-not-allowed" : "cursor-pointer" %> transition-colors">
|
|
<%= radio_button_tag "sophtron_account_id", account[:id], false,
|
|
required: true,
|
|
disabled: has_blank_name,
|
|
class: "mt-1" %>
|
|
<div class="flex-1">
|
|
<div class="text-sm font-medium <%= has_blank_name ? "text-destructive" : "text-primary" %>">
|
|
<% if has_blank_name %>
|
|
<%= t(".no_name_placeholder") %>
|
|
<% else %>
|
|
<%= account[:account_name] %>
|
|
<% end %>
|
|
</div>
|
|
<div class="text-xs text-secondary mt-1">
|
|
<%= account[:institution_name] %> • <%= account[:currency] %> • <%= account[:status] %>
|
|
</div>
|
|
<% if has_blank_name %>
|
|
<div class="mt-1 text-xs text-destructive">
|
|
<%= t(".configure_name_in_sophtron") %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</label>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="flex gap-2 justify-end pt-4">
|
|
<%= render DS::Link.new(
|
|
text: t(".cancel"),
|
|
href: @return_to || accounts_path,
|
|
variant: :secondary,
|
|
data: { turbo_frame: "_top", action: "click->DS--dialog#close" }
|
|
) %>
|
|
<%= render DS::Button.new(text: t(".link_account"), type: "submit") %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|