-
<%= t(".csv_mapping_label", mapping: mapping_label(mapping_class)) %>
-
<%= t(".maybe_mapping_label", mapping: mapping_label(mapping_class)) %>
-
<%= t(".rows_label") %>
-
- <% mappings.sort_by(&:key).each do |mapping| %>
-
- <%= render partial: "import/mappings/form", locals: { mapping: mapping } %>
+
+ <% if mapping_class == Import::AccountMapping && import.account.nil? %>
+ <% if import.requires_account? %>
+
+
+
+ <%= tag.p t(".no_accounts"), class: "text-sm" %>
+ <%= link_to t(".create_account"), new_account_path(return_to: import_confirm_path(import)), class: "btn btn--primary whitespace-nowrap", data: { turbo_frame: :modal } %>
+
+
+ <% elsif import.has_unassigned_account? %>
+
+
+
+ <%= tag.p t(".unassigned_account"), class: "text-sm" %>
+ <%= link_to t(".create_account"), new_account_path(return_to: import_confirm_path(import)), class: "btn btn--primary whitespace-nowrap", data: { turbo_frame: :modal } %>
+
+
+
+ <% end %>
+ <% end %>
+
+
+
+
+
+
+
<%= t(".csv_mapping_label", mapping: mapping_label(mapping_class)) %>
+
<%= t(".maybe_mapping_label", mapping: mapping_label(mapping_class)) %>
+
<%= t(".rows_label") %>
+
+
+
+ <% mappings.sort_by(&:key).each do |mapping| %>
+
+ <%= render partial: "import/mappings/form", locals: { mapping: mapping } %>
+
+ <% end %>
+
+
+
+
+
+
+ <%= link_to is_last_step ? import_path(import) : url_for(step: step_idx + 2), class: "btn btn--primary w-full md:w-36 flex items-center justify-between gap-2" do %>
+ Next
+ <%= lucide_icon "arrow-right", class: "w-5 h-5" %>
<% end %>
-
-
- <%= link_to is_last_step ? import_path(import) : url_for(step: step_idx + 2), class: "btn btn--primary w-36 flex items-center justify-between gap-2" do %>
- Next
- <%= lucide_icon "arrow-right", class: "w-5 h-5" %>
- <% end %>
-