mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
* Create shared ruler view * Use collection rendering/spacer templates for rules, and new shared_ruler * Use shared ruler for all the places a ruler is used * Use shared ruler for imports and balance sheet * Fix brakeman by using a static partial with a defined collection * Update balance sheet
40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
<%# locals: (import:) %>
|
|
|
|
<div class="text-center space-y-2 mb-4 mx-auto max-w-md">
|
|
<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-2xl space-y-4">
|
|
<div class="bg-container-inset rounded-xl p-1 space-y-1">
|
|
<div class="flex justify-between items-center text-xs font-medium text-secondary uppercase px-5 py-3">
|
|
<p>item</p>
|
|
<p class="justify-self-end">count</p>
|
|
</div>
|
|
|
|
<div class="bg-container shadow-border-xs rounded-lg text-sm">
|
|
<% import.dry_run.each do |key, count| %>
|
|
<% resource = dry_run_resource(key) %>
|
|
|
|
<div class="flex items-center justify-between gap-2 bg-container px-5 py-3 rounded-lg">
|
|
<div class="flex items-center gap-3">
|
|
<%= tag.div class: class_names(resource.bg_class, resource.text_class, "w-8 h-8 rounded-full flex justify-center items-center") do %>
|
|
<%= icon resource.icon, color: "current" %>
|
|
<% end %>
|
|
|
|
<p><%= resource.label %></p>
|
|
</div>
|
|
|
|
<p class="justify-self-end"><%= count %></p>
|
|
</div>
|
|
|
|
<% if key != import.dry_run.keys.last %>
|
|
<%= render "shared/ruler" %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render ButtonComponent.new(text: "Publish import", href: publish_import_path(import), full_width: true) %>
|
|
</div>
|