mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-07 06:25:19 +02:00
Component namespacing (#2463)
* [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:23 EDT * [claudesquad] update from 'component-namespacing' on 18 Jul 25 07:30 EDT * Update stimulus controller references to use namespace * Fix remaining tests
This commit is contained in:
parent
d5b147f2cd
commit
ab6fdbbb68
182 changed files with 322 additions and 321 deletions
|
@ -13,9 +13,9 @@
|
|||
<%= f.hidden_field :rule_prompt_dismissed_at, value: Time.current %>
|
||||
|
||||
<%= tag.div class:"flex gap-2 justify-end" do %>
|
||||
<%= render ButtonComponent.new(text: "Dismiss", variant: "secondary") %>
|
||||
<%= render DS::Button.new(text: "Dismiss", variant: "secondary") %>
|
||||
<% rule_href = new_rule_path(resource_type: "transaction", action_type: "set_transaction_category", action_value: cta[:category_id]) %>
|
||||
<%= render LinkComponent.new(text: "Create rule", variant: "primary", href: rule_href, frame: :modal) %>
|
||||
<%= render DS::Link.new(text: "Create rule", variant: "primary", href: rule_href, frame: :modal) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -50,8 +50,8 @@
|
|||
</ul>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<%= render ButtonComponent.new(text: "Add condition", icon: "plus", variant: "ghost", type: "button", data: { action: "rules#addCondition" }) %>
|
||||
<%= render ButtonComponent.new(text: "Add condition group", icon: "copy-plus", variant: "ghost", type: "button", data: { action: "rules#addConditionGroup" }) %>
|
||||
<%= render DS::Button.new(text: "Add condition", icon: "plus", variant: "ghost", type: "button", data: { action: "rules#addCondition" }) %>
|
||||
<%= render DS::Button.new(text: "Add condition group", icon: "copy-plus", variant: "ghost", type: "button", data: { action: "rules#addConditionGroup" }) %>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= render ButtonComponent.new(text: "Add action", icon: "plus", variant: "ghost", type: "button", data: { action: "rules#addAction" }) %>
|
||||
<%= render DS::Button.new(text: "Add action", icon: "plus", variant: "ghost", type: "button", data: { action: "rules#addAction" }) %>
|
||||
</section>
|
||||
|
||||
<section class="space-y-4">
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<%= styled_form_with model: rule, data: { controller: "auto-submit-form" } do |f| %>
|
||||
<%= f.toggle :active, { data: { auto_submit_form_target: "auto" } } %>
|
||||
<% end %>
|
||||
<%= render MenuComponent.new do |menu| %>
|
||||
<%= render DS::Menu.new do |menu| %>
|
||||
<% menu.with_item(variant: "link", text: "Edit", href: edit_rule_path(rule), icon: "pencil", data: { turbo_frame: "modal" }) %>
|
||||
<% menu.with_item(variant: "link", text: "Re-apply rule", href: confirm_rule_path(rule), icon: "refresh-cw", data: { turbo_frame: "modal" }) %>
|
||||
<% menu.with_item(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new(reload_on_close: true) do |dialog| %>
|
||||
<%= render DS::Dialog.new(reload_on_close: true) do |dialog| %>
|
||||
<%
|
||||
title = if @rule.name.present?
|
||||
"Confirm changes to \"#{@rule.name}\""
|
||||
|
@ -15,7 +15,7 @@
|
|||
that meet the specified rule criteria. Please confirm if you wish to proceed with this change.
|
||||
</p>
|
||||
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Confirm changes",
|
||||
href: apply_rule_path(@rule),
|
||||
method: :post,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= link_to "Back to rules", rules_path %>
|
||||
|
||||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<%
|
||||
title = if @rule.name.present?
|
||||
"Edit #{@rule.resource_type} rule \"#{@rule.name}\""
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<h1 class="text-primary text-xl font-medium">Rules</h1>
|
||||
<div class="flex items-center gap-2">
|
||||
<% if @rules.any? %>
|
||||
<%= render MenuComponent.new do |menu| %>
|
||||
<%= render DS::Menu.new do |menu| %>
|
||||
<% menu.with_item(
|
||||
variant: "button",
|
||||
text: "Delete all rules",
|
||||
|
@ -12,7 +12,7 @@
|
|||
confirm: CustomConfirm.for_resource_deletion("all rules", high_severity: true)) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "New rule",
|
||||
variant: "primary",
|
||||
href: new_rule_path(resource_type: "transaction"),
|
||||
|
@ -48,7 +48,7 @@
|
|||
data: { auto_submit_form_target: "auto", autosubmit_trigger_event: "change" } %>
|
||||
<%= form.hidden_field :direction, value: @direction %>
|
||||
<% end %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
href: rules_path(direction: @direction == "asc" ? "desc" : "asc", sort_by: @sort_by),
|
||||
variant: "icon",
|
||||
icon: "arrow-up-down",
|
||||
|
@ -69,7 +69,7 @@
|
|||
<p class="text-sm text-primary font-medium mb-1">No rules yet</p>
|
||||
<p class="text-sm text-secondary mb-4">Set up rules to perform actions to your transactions and other data on every account sync.</p>
|
||||
<div class="flex items-center gap-2">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "New rule",
|
||||
variant: "primary",
|
||||
href: new_rule_path(resource_type: "transaction"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= link_to "Back to rules", rules_path %>
|
||||
|
||||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: "New #{@rule.resource_type} rule") %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "rules/form", rule: @rule %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue