1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 07:25:19 +02:00

Use collection rendering/spacer templates for rules, and new shared_ruler

This commit is contained in:
hatz 2025-05-13 19:59:10 -05:00
parent 99ff22e61a
commit b449397d16
No known key found for this signature in database
2 changed files with 3 additions and 7 deletions

View file

@ -1,5 +1,6 @@
<%# locals: (rule:) %> <%# locals: (rule:) %>
<div class="flex justify-between items-center p-4 <%= rule.active? ? 'text-primary' : 'text-secondary' %>"> <div id="<%= dom_id(rule) %>" class="flex justify-between items-center p-4 <%= rule.active? ? 'text-primary' : 'text-secondary' %>">
<div class="text-sm space-y-1.5"> <div class="text-sm space-y-1.5">
<% if rule.name.present? %> <% if rule.name.present? %>
<h3 class="font-medium text-md"><%= rule.name %></h3> <h3 class="font-medium text-md"><%= rule.name %></h3>

View file

@ -59,12 +59,7 @@
</div> </div>
<div class="p-1"> <div class="p-1">
<div class="flex flex-col bg-container rounded-xl shadow-border-xs first_child:rounded-t-xl last_child:rounded-b-xl"> <div class="flex flex-col bg-container rounded-xl shadow-border-xs first_child:rounded-t-xl last_child:rounded-b-xl">
<% @rules.each_with_index do |rule, idx| %> <%= render partial: @rules, spacer_template: "shared/ruler" %>
<%= render "rule", rule: rule%>
<% unless idx == @rules.size - 1 %>
<div class="h-px bg-divider ml-4 mr-6"></div>
<% end %>
<% end %>
</div> </div>
</div> </div>
</div> </div>