diff --git a/app/views/import/cleans/show.html.erb b/app/views/import/cleans/show.html.erb index 89cd0cd9..efce906c 100644 --- a/app/views/import/cleans/show.html.erb +++ b/app/views/import/cleans/show.html.erb @@ -11,13 +11,13 @@ <% if @import.cleaned? %> -
+
<%= lucide_icon "check-circle", class: "w-4 h-4 text-green-500" %> -

Your data has been cleaned

+

Your data has been cleaned

- <%= link_to "Next step", import_confirm_path(@import), class: "btn btn--primary" %> + <%= link_to "Next step", import_confirm_path(@import), class: "btn btn--primary w-full md:w-auto" %>
<% else %>
diff --git a/app/views/import/confirms/_mappings.html.erb b/app/views/import/confirms/_mappings.html.erb index f5819160..659c2895 100644 --- a/app/views/import/confirms/_mappings.html.erb +++ b/app/views/import/confirms/_mappings.html.erb @@ -1,45 +1,58 @@ <%# locals: (import:, mapping_class:, step_idx:) %> + <% mappings = mapping_class.for_import(import) %> <% is_last_step = step_idx == import.mapping_steps.count - 1 %> -<% 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 } %> +
+ <% 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 %> -