mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 07: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
|
@ -12,7 +12,7 @@
|
|||
<%= format_money(budget.actual_spending_money) %>
|
||||
</div>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "of #{budget.budgeted_spending_money.format}",
|
||||
variant: "secondary",
|
||||
icon: "pencil",
|
||||
|
@ -25,7 +25,7 @@
|
|||
<span><%= format_money Money.new(0, budget.currency || budget.family.currency) %></span>
|
||||
</div>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "New budget",
|
||||
size: "sm",
|
||||
icon: "plus",
|
||||
|
@ -46,7 +46,7 @@
|
|||
<%= format_money(bc.actual_spending_money) %>
|
||||
</p>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "of #{bc.budgeted_spending_money.format(precision: 0)}",
|
||||
variant: "secondary",
|
||||
icon: "pencil",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="flex items-center gap-1 mb-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<% if budget.previous_budget_param %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
variant: "icon",
|
||||
icon: "chevron-left",
|
||||
href: budget_path(budget.previous_budget_param),
|
||||
|
@ -15,7 +15,7 @@
|
|||
<% end %>
|
||||
|
||||
<% if budget.next_budget_param %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
variant: "icon",
|
||||
icon: "chevron-right",
|
||||
href: budget_path(budget.next_budget_param),
|
||||
|
@ -27,7 +27,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= render MenuComponent.new(variant: "button") do |menu| %>
|
||||
<%= render DS::Menu.new(variant: "button") do |menu| %>
|
||||
<% menu.with_button class: "flex items-center gap-1 hover:bg-alpha-black-25 cursor-pointer rounded-md p-2" do %>
|
||||
<span class="text-primary font-medium text-lg lg:text-base"><%= @budget.name %></span>
|
||||
<%= icon("chevron-down") %>
|
||||
|
@ -39,7 +39,7 @@
|
|||
<% end %>
|
||||
|
||||
<div class="ml-auto">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Today",
|
||||
variant: "outline",
|
||||
href: budget_path(Budget.date_to_param(Date.current)),
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= icon "alert-triangle", size: "lg", color: "destructive" %>
|
||||
<p class="text-secondary text-sm text-center">You have over-allocated your budget. Please fix your allocations.</p>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Fix allocations",
|
||||
variant: "secondary",
|
||||
size: "sm",
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<% param_key = Budget.date_to_param(date) %>
|
||||
|
||||
<% if Budget.budget_date_valid?(date, family: family) %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
variant: "ghost",
|
||||
text: month_name,
|
||||
href: budget_path(param_key),
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<%= render ToggleComponent.new(
|
||||
<%= render DS::Toggle.new(
|
||||
id: "auto_fill",
|
||||
data: {
|
||||
action: "change->budget-form#toggleAutoFill",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<div>
|
||||
|
||||
<% if @budget.initialized? && @budget.available_to_allocate.positive? %>
|
||||
<%= render TabsComponent.new(active_tab: params[:tab].presence || "budgeted") do |tabs| %>
|
||||
<%= render DS::Tabs.new(active_tab: params[:tab].presence || "budgeted") do |tabs| %>
|
||||
<% tabs.with_nav do |nav| %>
|
||||
<% nav.with_btn(id: "budgeted", label: "Budgeted") %>
|
||||
<% nav.with_btn(id: "actuals", label: "Actual") %>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<h2 class="text-lg font-medium">Categories</h2>
|
||||
|
||||
<% if @budget.initialized? %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Edit",
|
||||
variant: "secondary",
|
||||
icon: "settings-2",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue