mirror of
https://github.com/we-promise/sure.git
synced 2026-04-10 15:54:48 +00:00
* Add ability to name a rule * Add sorting by name and date, * Improve rule page and form design * Small header tweak * Improve sorting click areas by including icon * Fix brakeman * Use icon helper instead of lucide_icon helper * Fix double headers with new DialogComponent * Use updated_at for sorting instead of created_at * Use copy-plus icon for compound rules * Remove icons and change IF/THEN/FOR font in edit form * Use text-secondary on disabled rules * First pass at redesigning the sorting menu * New rule list * Borders instead of shadows * Apply proper text color to TO in edit form * Improve dark mode with proper background color classes * Use border-secondary * Add touch: true to conditions and actions of a rule, so updated_at works as expected * Fix db schema * Change sort direction to be a LinkComponent outside of the form for better sort behavior * Clean up dropdown design to match figma * Match tags/categories design * Fix name text color, add bg-divider background for dividers * Fix family subscription tests (thanks zach!)
26 lines
839 B
Plaintext
26 lines
839 B
Plaintext
<%= render DialogComponent.new(reload_on_close: true) do |dialog| %>
|
|
<%
|
|
title = if @rule.name.present?
|
|
"Confirm changes to \"#{@rule.name}\""
|
|
else
|
|
"Confirm changes"
|
|
end
|
|
%>
|
|
<% dialog.with_header(title: title) %>
|
|
|
|
<% dialog.with_body do %>
|
|
<p class="text-secondary text-sm mb-4">
|
|
You are about to apply this rule to
|
|
<span class="text-primary font-medium"><%= @rule.affected_resource_count %> <%= @rule.resource_type.pluralize %></span>
|
|
that meet the specified rule criteria. Please confirm if you wish to proceed with this change.
|
|
</p>
|
|
|
|
<%= render ButtonComponent.new(
|
|
text: "Confirm changes",
|
|
href: apply_rule_path(@rule),
|
|
method: :post,
|
|
full_width: true,
|
|
data: { turbo_frame: "_top" }) %>
|
|
<% end %>
|
|
<% end %>
|