Files
sure/app/views/import/configurations/show.html.erb
Zach Gollwitzer 90a9546f32 Pre-launch design sync with Figma spec (#2154)
* Add lookbook + viewcomponent, organize design system file

* Build menu component

* Button updates

* More button fixes

* Replace all menus with new ViewComponent

* Checkpoint: fix tests, all buttons and menus converted

* Split into Link and Button components for clarity

* Button cleanup

* Simplify custom confirmation configuration in views

* Finalize button, link component API

* Add toggle field to custom form builder + Component

* Basic tabs component

* Custom tabs, convert all menu / tab instances in app

* Gem updates

* Centralized icon helper

* Update all icon usage to central helper

* Lint fixes

* Centralize all disclosure instances

* Dialog replacements

* Consolidation of all dialog styles

* Test fixes

* Fix app layout issues, move to component with slots

* Layout simplification

* Flakey test fix

* Fix dashboard mobile issues

* Finalize homepage

* Lint fixes

* Fix shadows and borders in dark mode

* Fix tests

* Remove stale class

* Fix filled icon logic

* Move transparent? to public interface
2025-04-30 18:14:22 -04:00

39 lines
1.6 KiB
Plaintext

<%= content_for :header_nav do %>
<%= render "imports/nav", import: @import %>
<% end %>
<%= content_for :previous_path, import_upload_path(@import) %>
<% if @import.suggested_template.present? && params[:template_hint] == "true" %>
<div class="py-12">
<div class="shadow-border-xs rounded-lg p-4 max-w-lg mx-auto">
<h3 class="text-sm font-medium mb-2 flex items-center gap-2">
<span class="text-success">
<%= icon "sparkles" %>
</span>
Template configuration found
</h3>
<p class="text-sm text-secondary">We found a configuration from a previous import for this account. Would you like to apply it to this import?</p>
<div class="mt-4 flex gap-2 items-center">
<%= render LinkComponent.new(text: "Manually configure", href: import_configuration_path(@import), variant: "outline") %>
<%= render ButtonComponent.new(text: "Apply template", href: apply_template_import_path(@import), method: :put, data: { turbo_frame: :_top }) %>
</div>
</div>
</div>
<% else %>
<div class="space-y-6">
<div class="text-center space-y-2">
<h1 class="text-3xl text-primary font-medium"><%= t(".title") %></h1>
<p class="text-secondary text-sm"><%= t(".description") %></p>
</div>
<div class="mx-auto max-w-lg space-y-4">
<%= render partial: permitted_import_configuration_path(@import), locals: { import: @import } %>
<%= render "imports/table", headers: @import.csv_headers, rows: @import.csv_sample, caption: "Sample data from your uploaded CSV" %>
</div>
</div>
<% end %>