mirror of
https://github.com/we-promise/sure.git
synced 2026-05-12 15:15:01 +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>
57 lines
2.6 KiB
Plaintext
57 lines
2.6 KiB
Plaintext
<%= turbo_frame_tag "modal" do %>
|
|
<%= render DS::Dialog.new do |dialog| %>
|
|
<% dialog.with_header(title: t(".title")) %>
|
|
|
|
<% dialog.with_body do %>
|
|
<div class="space-y-4">
|
|
<p class="text-sm text-secondary">
|
|
<%= t(".description", product_name: product_name) %>
|
|
</p>
|
|
|
|
<form action="<%= link_accounts_sophtron_items_path %>" method="post" class="space-y-4" data-turbo-frame="_top">
|
|
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
|
|
<%= hidden_field_tag :accountable_type, @accountable_type %>
|
|
<%= hidden_field_tag :return_to, @return_to %>
|
|
|
|
<div class="space-y-2">
|
|
<% @available_accounts.each do |account| %>
|
|
<% Rails.logger.debug "Sophtron account data: #{account.inspect}" %>
|
|
<% 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">
|
|
<%= check_box_tag "account_ids[]", account[:id], false, 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 || new_account_path,
|
|
variant: :secondary,
|
|
data: { turbo_frame: "_top", action: "DS--dialog#close" }
|
|
) %>
|
|
<%= render DS::Button.new(text: t(".link_accounts"), type: "submit") %>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|