mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-06 22:15:20 +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
|
@ -41,7 +41,7 @@
|
|||
<% end %>
|
||||
|
||||
<% if account.draft? %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Complete setup",
|
||||
href: edit_account_path(account, return_to: return_to),
|
||||
variant: :outline,
|
||||
|
@ -49,7 +49,7 @@
|
|||
) %>
|
||||
<% elsif account.active? || account.disabled? %>
|
||||
<%= form_with model: account, url: toggle_active_account_path(account), method: :patch, data: { turbo_frame: "_top", controller: "auto-submit-form" } do |f| %>
|
||||
<%= render ToggleComponent.new(
|
||||
<%= render DS::Toggle.new(
|
||||
id: "account_#{account.id}_active",
|
||||
name: "active",
|
||||
checked: account.active?,
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</details>
|
||||
<% end %>
|
||||
|
||||
<%= render TabsComponent.new(active_tab: active_tab, session_key: "account_sidebar_tab", testid: "account-sidebar-tabs") do |tabs| %>
|
||||
<%= render DS::Tabs.new(active_tab: active_tab, session_key: "account_sidebar_tab", testid: "account-sidebar-tabs") do |tabs| %>
|
||||
<% tabs.with_nav do |nav| %>
|
||||
<% nav.with_btn(id: "asset", label: "Assets") %>
|
||||
<% nav.with_btn(id: "liability", label: "Debts") %>
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
<% tabs.with_panel(tab_id: "asset") do %>
|
||||
<div class="space-y-2">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "New asset",
|
||||
variant: "ghost",
|
||||
href: new_account_path(step: "method_select", classification: "asset"),
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
<% tabs.with_panel(tab_id: "liability") do %>
|
||||
<div class="space-y-2">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "New debt",
|
||||
variant: "ghost",
|
||||
href: new_account_path(step: "method_select", classification: "liability"),
|
||||
|
@ -70,7 +70,7 @@
|
|||
|
||||
<% tabs.with_panel(tab_id: "all") do %>
|
||||
<div class="space-y-2">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "New account",
|
||||
variant: "ghost",
|
||||
full_width: true,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<%= link_to new_polymorphic_path(accountable, step: "method_select", return_to: params[:return_to]),
|
||||
class: "flex items-center gap-4 w-full text-center focus:outline-hidden hover:bg-surface-hover focus:bg-surface-hover fg-primary border border-transparent block px-2 rounded-lg p-2" do %>
|
||||
<%= render FilledIconComponent.new(
|
||||
<%= render DS::FilledIcon.new(
|
||||
icon: accountable.icon,
|
||||
hex_color: accountable.color,
|
||||
) %>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<div id="<%= account_group.dom_id(tab: all_tab ? :all : nil, mobile: mobile) %>">
|
||||
<% is_open = open.nil? ? account_group.accounts.any? { |account| page_active?(account_path(account)) } : open %>
|
||||
<%= render DisclosureComponent.new(align: :left, open: is_open) do |disclosure| %>
|
||||
<%= render DS::Disclosure.new(align: :left, open: is_open) do |disclosure| %>
|
||||
<% disclosure.with_summary_content do %>
|
||||
<div class="flex items-center gap-3">
|
||||
<%= icon "chevron-right", class: "group-open:transform group-open:rotate-90" %>
|
||||
|
@ -51,7 +51,7 @@
|
|||
</div>
|
||||
|
||||
<div class="my-2">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
href: new_polymorphic_path(account_group.key, step: "method_select"),
|
||||
text: "New #{account_group.name.downcase.singularize}",
|
||||
icon: "plus",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<%= tag.p t(".no_accounts"), class: "text-primary mb-1 font-medium" %>
|
||||
<%= tag.p t(".empty_message"), class: "text-secondary mb-4" %>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: t(".new_account"),
|
||||
href: new_account_path,
|
||||
frame: :modal
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%# locals: (account:, url:) %>
|
||||
|
||||
<% if @error_message.present? %>
|
||||
<%= render AlertComponent.new(message: @error_message, variant: :error) %>
|
||||
<%= render DS::Alert.new(message: @error_message, variant: :error) %>
|
||||
<% end %>
|
||||
|
||||
<%= styled_form_with model: account, url: url, scope: :account, data: { turbo: false }, class: "flex flex-col gap-4 justify-between grow text-primary" do |form| %>
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
<% elsif account.logo.attached? %>
|
||||
<%= image_tag account.logo, class: "shrink-0 rounded-full #{size_classes[size]}" %>
|
||||
<% else %>
|
||||
<%= render FilledIconComponent.new(variant: :text, hex_color: color || account.accountable.color, text: account.name, size: size, rounded: true) %>
|
||||
<%= render DS::FilledIcon.new(variant: :text, hex_color: color || account.accountable.color, text: account.name, size: size, rounded: true) %>
|
||||
<% end %>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<h1 class="text-xl"><%= t(".accounts") %></h1>
|
||||
<div class="flex items-center gap-5">
|
||||
<div class="flex items-center gap-2">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "New account",
|
||||
href: new_account_path(return_to: accounts_path),
|
||||
variant: "primary",
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<%= button_to imports_path(import: { type: "AccountImport" }),
|
||||
data: { turbo_frame: :_top },
|
||||
class: "flex items-center gap-4 w-full text-center focus:outline-hidden hover:bg-surface-hover focus:bg-surface-hover fg-primary border border-transparent block px-2 rounded-lg p-2" do %>
|
||||
<%= render FilledIconComponent.new(
|
||||
<%= render DS::FilledIcon.new(
|
||||
icon: "download",
|
||||
hex_color: "#F79009",
|
||||
) %>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<%# locals: (title:, back_path: nil) %>
|
||||
|
||||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<div class="flex flex-col relative" data-controller="list-keyboard-navigation">
|
||||
<div class="border-b border-tertiary md:border-alpha-black-25 px-4 pb-4 text-gray-800 flex items-center justify-between gap-2">
|
||||
<div class="flex items-center gap-2">
|
||||
<% if back_path %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
variant: "icon",
|
||||
icon: "arrow-left",
|
||||
href: back_path,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="flex items-center justify-between mb-4" data-testid="activity-menu">
|
||||
<%= tag.h2 t(".title"), class: "font-medium text-lg" %>
|
||||
<% unless @account.plaid_account_id.present? %>
|
||||
<%= render MenuComponent.new(variant: "button") do |menu| %>
|
||||
<%= render DS::Menu.new(variant: "button") do |menu| %>
|
||||
<% menu.with_button(text: "New", variant: "secondary", icon: "plus") %>
|
||||
|
||||
<% menu.with_item(
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="flex items-center gap-3">
|
||||
<h2 class="font-medium text-xl truncate <%= "animate-pulse" if account.syncing? %>"><%= title %></h2>
|
||||
<% if account.draft? %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Complete setup",
|
||||
href: edit_account_path(account),
|
||||
variant: :outline,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%# locals: (account:) %>
|
||||
|
||||
<%= render MenuComponent.new(testid: "account-menu") do |menu| %>
|
||||
<%= render DS::Menu.new(testid: "account-menu") do |menu| %>
|
||||
<% menu.with_item(variant: "link", text: "Edit", href: edit_account_path(account), icon: "pencil-line", data: { turbo_frame: :modal }) %>
|
||||
|
||||
<% unless account.crypto? %>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<% if budget_category.category.lucide_icon %>
|
||||
<%= icon(budget_category.category.lucide_icon, color: "current") %>
|
||||
<% else %>
|
||||
<%= render FilledIconComponent.new(
|
||||
<%= render DS::FilledIcon.new(
|
||||
variant: :text,
|
||||
hex_color: budget_category.category.color,
|
||||
text: budget_category.category.name,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div id="<%= dom_id(budget, :confirm_button) %>">
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Confirm",
|
||||
variant: "primary",
|
||||
full_width: true,
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
</p>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Use defaults (recommended)",
|
||||
href: bootstrap_categories_path,
|
||||
) %>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "New category",
|
||||
variant: "outline",
|
||||
icon: "plus",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new(variant: :drawer) do |dialog| %>
|
||||
<%= render DS::Dialog.new(variant: :drawer) do |dialog| %>
|
||||
<% dialog.with_header do %>
|
||||
<div>
|
||||
<p class="text-sm text-secondary">Category</p>
|
||||
|
@ -119,7 +119,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "View all category transactions",
|
||||
variant: "outline",
|
||||
full_width: true,
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
|
||||
<div class="justify-self-end">
|
||||
<%= render MenuComponent.new do |menu| %>
|
||||
<%= render DS::Menu.new do |menu| %>
|
||||
<% menu.with_item(variant: "link", text: t(".edit"), icon: "pencil", href: edit_category_path(category), data: { turbo_frame: :modal }) %>
|
||||
|
||||
<% if category.transactions.any? %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%# locals: (transaction:) %>
|
||||
|
||||
<%= render MenuComponent.new(variant: "button") do |menu| %>
|
||||
<%= render DS::Menu.new(variant: "button") do |menu| %>
|
||||
<% menu.with_button do %>
|
||||
<% render partial: "categories/badge", locals: { category: transaction.category } %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".edit")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", category: @category, categories: @categories %>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<h1 class="text-primary text-xl font-medium"><%= t(".categories") %></h1>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<%= render MenuComponent.new do |menu| %>
|
||||
<%= render DS::Menu.new do |menu| %>
|
||||
<% menu.with_item(
|
||||
variant: "button",
|
||||
text: "Delete all",
|
||||
|
@ -12,7 +12,7 @@
|
|||
confirm: CustomConfirm.for_resource_deletion("all categories", high_severity: true)) %>
|
||||
<% end %>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: t(".new"),
|
||||
variant: "primary",
|
||||
icon: "plus",
|
||||
|
@ -38,12 +38,12 @@
|
|||
<div class="text-center flex flex-col items-center max-w-[500px]">
|
||||
<p class="text-sm text-secondary mb-4"><%= t(".empty") %></p>
|
||||
<div class="flex items-center gap-2">
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: t(".bootstrap"),
|
||||
href: bootstrap_categories_path,
|
||||
) %>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: t(".new"),
|
||||
variant: "outline",
|
||||
icon: "plus",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".new_category")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", category: @category, categories: @categories %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".delete_category"), subtitle: t(".explanation", category_name: @category.name)) %>
|
||||
|
||||
<% dialog.with_body do %>
|
||||
|
@ -14,14 +14,14 @@
|
|||
{ prompt: t(".replacement_category_prompt"), label: t(".category"), container_class: "mb-4" },
|
||||
data: { deletion_target: "replacementField", action: "deletion#chooseSubmitButton" } %>
|
||||
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
variant: "destructive",
|
||||
text: t(".delete_and_leave_uncategorized", category_name: @category.name),
|
||||
full_width: true,
|
||||
data: { deletion_target: "destructiveSubmitButton" }
|
||||
) %>
|
||||
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Delete and reassign",
|
||||
data: { deletion_target: "safeSubmitButton" },
|
||||
hidden: true,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<%= render partial: "categories/badge", locals: { category: category } %>
|
||||
<% end %>
|
||||
|
||||
<%= render MenuComponent.new do |menu| %>
|
||||
<%= render DS::Menu.new do |menu| %>
|
||||
<% menu.with_item(variant: "link", text: t(".edit"), icon: "pencil-line", href: edit_category_path(category), data: { turbo_frame: :modal }) %>
|
||||
<% menu.with_item(variant: "link", text: t(".delete"), icon: "trash-2", href: new_category_deletion_path(category), data: { turbo_frame: :modal }, destructive: true) %>
|
||||
<% end %>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<div class="text-center flex flex-col items-center max-w-[500px]">
|
||||
<p class="text-sm text-secondary font-normal mb-4"><%= t(".empty") %></p>
|
||||
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: t(".bootstrap"),
|
||||
variant: "outline",
|
||||
href: bootstrap_categories_path,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<%= render MenuComponent.new(icon_vertical: true) do |menu| %>
|
||||
<%= render DS::Menu.new(icon_vertical: true) do |menu| %>
|
||||
<% menu.with_item(
|
||||
variant: "link",
|
||||
text: "Edit chat title",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<% path = chat.new_record? ? chats_path : chats_path(previous_chat_id: chat.id) %>
|
||||
|
||||
<div class="flex items-center gap-2 grow">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
id: "chat-nav-back",
|
||||
variant: "icon",
|
||||
icon: "menu",
|
||||
|
@ -18,7 +18,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<%= render MenuComponent.new(icon_vertical: true) do |menu| %>
|
||||
<%= render DS::Menu.new(icon_vertical: true) do |menu| %>
|
||||
<% menu.with_item(variant: "link", text: "Start new chat", href: new_chat_path, icon: "plus") %>
|
||||
|
||||
<% unless chat.new_record? %>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="flex items-center justify-between gap-2">
|
||||
<p class="text-xs text-red-500">Failed to generate response. Please try again.</p>
|
||||
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Retry",
|
||||
href: retry_chat_path(chat),
|
||||
) %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="grow flex flex-col">
|
||||
<div class="flex items-center justify-between my-6">
|
||||
<h1 class="text-xl font-medium">Chats</h1>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
id: "new-chat",
|
||||
icon: "plus",
|
||||
variant: "icon",
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
|
||||
<div class="flex justify-center py-8">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Edit account details",
|
||||
variant: "ghost",
|
||||
href: edit_credit_card_path(account),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
|
||||
|
||||
<% dialog.with_body do %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
show_eu_link: @show_eu_link,
|
||||
accountable_type: "CreditCard" %>
|
||||
<% else %>
|
||||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "credit_cards/form", account: @account, url: credit_cards_path %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", account: @account, url: crypto_path(@account) %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
show_eu_link: @show_eu_link,
|
||||
accountable_type: "Crypto" %>
|
||||
<% else %>
|
||||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", account: @account, url: cryptos_path %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", account: @account, url: depository_path(@account) %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
show_eu_link: @show_eu_link,
|
||||
accountable_type: "Depository" %>
|
||||
<% else %>
|
||||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "depositories/form", account: @account, url: depositories_path %>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Go back",
|
||||
href: "javascript:history.back()",
|
||||
variant: :secondary
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<% if params[:display].present? %>
|
||||
<%= hidden_field_tag :display, params[:display], id: nil %>
|
||||
<% end %>
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: t("doorkeeper.authorizations.buttons.authorize"),
|
||||
variant: :primary,
|
||||
size: :lg,
|
||||
|
@ -59,7 +59,7 @@
|
|||
<% if params[:display].present? %>
|
||||
<%= hidden_field_tag :display, params[:display], id: nil %>
|
||||
<% end %>
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: t("doorkeeper.authorizations.buttons.deny"),
|
||||
variant: :outline,
|
||||
size: :lg,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="justify-self-end">
|
||||
<%= render MenuComponent.new do |menu| %>
|
||||
<%= render DS::Menu.new do |menu| %>
|
||||
<% menu.with_item(variant: "link", text: "Edit", href: edit_family_merchant_path(family_merchant), icon: "pencil", data: { turbo_frame: "modal" }) %>
|
||||
<% menu.with_item(
|
||||
variant: "button",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", family_merchant: @family_merchant %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<header class="flex items-center justify-between">
|
||||
<h1 class="text-primary text-xl font-medium">Merchants</h1>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "New merchant",
|
||||
variant: "primary",
|
||||
href: new_family_merchant_path,
|
||||
|
@ -29,7 +29,7 @@
|
|||
<div class="text-center flex flex-col items-center max-w-[300px]">
|
||||
<p class="text-primary mb-1 font-medium text-sm"><%= t(".empty") %></p>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: t(".new"),
|
||||
icon: "plus",
|
||||
href: new_family_merchant_path,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", family_merchant: @family_merchant %>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div class="grid grid-cols-12 items-center text-primary text-sm font-medium p-4">
|
||||
<div class="col-span-4 flex items-center gap-4">
|
||||
<%= render FilledIconComponent.new(
|
||||
<%= render DS::FilledIcon.new(
|
||||
variant: :text,
|
||||
text: currency.symbol,
|
||||
rounded: true,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new(variant: "drawer") do |dialog| %>
|
||||
<%= render DS::Dialog.new(variant: "drawer") do |dialog| %>
|
||||
<% dialog.with_header do %>
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<p class="text-success text-sm">Your data has been cleaned</p>
|
||||
</div>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Next step",
|
||||
variant: "primary",
|
||||
href: import_confirm_path(@import),
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
<p class="text-sm text-secondary">We found a configuration from a previous import for this account. Would you like to apply it to this import?</p>
|
||||
|
||||
<div class="mt-4 flex gap-2 items-center">
|
||||
<%= render LinkComponent.new(text: "Manually configure", href: import_configuration_path(@import), variant: "outline") %>
|
||||
<%= render ButtonComponent.new(text: "Apply template", href: apply_template_import_path(@import), method: :put, data: { turbo_frame: :_top }) %>
|
||||
<%= render DS::Link.new(text: "Manually configure", href: import_configuration_path(@import), variant: "outline") %>
|
||||
<%= render DS::Button.new(text: "Apply template", href: apply_template_import_path(@import), method: :put, data: { turbo_frame: :_top }) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div class="flex items-center justify-between p-4 gap-4 text-secondary bg-red-100 border border-red-200 rounded-lg w-[650px] min-w-0 mx-auto">
|
||||
<%= tag.p t(".no_accounts"), class: "text-sm" %>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Create account",
|
||||
variant: "primary",
|
||||
href: new_account_path(return_to: import_confirm_path(import)),
|
||||
|
@ -25,7 +25,7 @@
|
|||
<div class="overflow-x-auto">
|
||||
<div class="flex items-center justify-between p-4 gap-4 text-secondary bg-yellow-100 border border-yellow-200 rounded-lg w-[650px] min-w-0 mx-auto">
|
||||
<%= tag.p t(".unassigned_account"), class: "text-sm" %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: t(".create_account"),
|
||||
variant: "primary",
|
||||
href: new_account_path(return_to: import_confirm_path(import)),
|
||||
|
@ -59,7 +59,7 @@
|
|||
</div>
|
||||
|
||||
<div class="flex justify-center w-full">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Next",
|
||||
variant: "primary",
|
||||
href: is_last_step ? import_path(import) : url_for(step: step_idx + 2),
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<p class="text-secondary text-sm"><%= t(".description") %></p>
|
||||
</div>
|
||||
|
||||
<%= render TabsComponent.new(active_tab: params[:tab] || "csv-upload", url_param_key: "tab", testid: "import-tabs") do |tabs| %>
|
||||
<%= render DS::Tabs.new(active_tab: params[:tab] || "csv-upload", url_param_key: "tab", testid: "import-tabs") do |tabs| %>
|
||||
<% tabs.with_nav do |nav| %>
|
||||
<% nav.with_btn(id: "csv-upload", label: "Upload CSV") %>
|
||||
<% nav.with_btn(id: "csv-paste", label: "Copy & Paste") %>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="text-center flex flex-col items-center max-w-[300px] gap-4">
|
||||
<p class="text-primary mb-1 font-medium text-sm"><%= t(".message") %></p>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: t(".new"),
|
||||
variant: "primary",
|
||||
href: new_import_path,
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
<p class="text-sm text-secondary">Please check that your file format, for any errors and that all required fields are filled, then come back and try again.</p>
|
||||
</div>
|
||||
|
||||
<%= render ButtonComponent.new(text: "Try again", href: publish_import_path(import), full_width: true) %>
|
||||
<%= render DS::Button.new(text: "Try again", href: publish_import_path(import), full_width: true) %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= render MenuComponent.new do |menu| %>
|
||||
<%= render DS::Menu.new do |menu| %>
|
||||
<% menu.with_item(variant: "link", text: t(".view"), href: import_path(import), icon: "eye") %>
|
||||
|
||||
<% if import.complete? || import.revert_failed? %>
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
</div>
|
||||
|
||||
<div class="space-y-2 flex flex-col">
|
||||
<%= render LinkComponent.new(text: "Check status", href: import_path(import), variant: "primary", full_width: true) %>
|
||||
<%= render LinkComponent.new(text: "Back to dashboard", href: root_path, variant: "secondary", full_width: true) %>
|
||||
<%= render DS::Link.new(text: "Check status", href: import_path(import), variant: "primary", full_width: true) %>
|
||||
<%= render DS::Link.new(text: "Back to dashboard", href: root_path, variant: "secondary", full_width: true) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -35,5 +35,5 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<%= render ButtonComponent.new(text: "Publish import", href: publish_import_path(import), full_width: true) %>
|
||||
<%= render DS::Button.new(text: "Publish import", href: publish_import_path(import), full_width: true) %>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<p class="text-sm text-secondary">Please try again or contact support.</p>
|
||||
</div>
|
||||
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Try again",
|
||||
full_width: true,
|
||||
href: revert_import_path(import)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<p class="text-sm text-secondary">Your imported data has been successfully added to the app and is now ready for use.</p>
|
||||
</div>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Back to dashboard",
|
||||
variant: "primary",
|
||||
full_width: true,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="flex items-center justify-between">
|
||||
<h1 class="text-xl font-medium text-primary"><%= t(".title") %></h1>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "New import",
|
||||
href: new_import_path,
|
||||
icon: "plus",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title"), subtitle: t(".description")) %>
|
||||
|
||||
<% dialog.with_body do %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "investments/form", account: @account, url: investment_path(@account) %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
show_eu_link: @show_eu_link,
|
||||
accountable_type: "Investment" %>
|
||||
<% else %>
|
||||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "investments/form", account: @account, url: investments_path %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title"), subtitle: t(".subtitle")) %>
|
||||
|
||||
<% dialog.with_body do %>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
</ul>
|
||||
|
||||
<div class="pl-2 mt-auto mx-auto flex flex-col gap-2">
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
variant: "icon",
|
||||
icon: "message-circle-question",
|
||||
data: { action: "intercom#show" }
|
||||
|
@ -93,7 +93,7 @@
|
|||
<p class="text-sm text-secondary"><%= Current.family.days_left_in_trial %> days remaining</p>
|
||||
</div>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Upgrade",
|
||||
href: upgrade_subscription_path,
|
||||
) %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%= render "layouts/shared/htmldoc" do %>
|
||||
<div class="flex flex-col h-full bg-container">
|
||||
<header class="flex items-center justify-between p-8">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
variant: "icon",
|
||||
icon: "arrow-left",
|
||||
href: content_for(:previous_path) || imports_path
|
||||
|
@ -11,7 +11,7 @@
|
|||
<%= yield :header_nav %>
|
||||
</nav>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
variant: "icon",
|
||||
icon: "x",
|
||||
href: imports_path
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%# This dialog is used as an override to the browser's confirm API when submitting forms with data-turbo-confirm %>
|
||||
<%# See confirm_dialog_controller.js and _htmldoc.html.erb %>
|
||||
<%= render DialogComponent.new(id: "confirm-dialog", auto_open: false, data: { controller: "confirm-dialog" }, width: "sm", disable_frame: true) do |dialog| %>
|
||||
<%= render DS::Dialog.new(id: "confirm-dialog", auto_open: false, data: { controller: "confirm-dialog" }, width: "sm", disable_frame: true) do |dialog| %>
|
||||
<% dialog.with_body do %>
|
||||
<form method="dialog" class="space-y-4">
|
||||
<div class="space-y-2">
|
||||
|
@ -14,7 +14,7 @@
|
|||
|
||||
<div>
|
||||
<% ["primary", "outline-destructive", "destructive"].each do |variant| %>
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Confirm",
|
||||
variant: variant,
|
||||
autofocus: true,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<% if content_for?(:prev_nav) %>
|
||||
<%= yield :prev_nav %>
|
||||
<% else %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
variant: "icon",
|
||||
icon: "arrow-left",
|
||||
href: content_for(:previous_path) || root_path
|
||||
|
@ -18,7 +18,7 @@
|
|||
<% if content_for?(:cancel_action) %>
|
||||
<%= yield :cancel_action %>
|
||||
<% else %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
variant: "icon",
|
||||
icon: "x",
|
||||
href: content_for(:cancel_path) || root_path
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", account: @account, url: loan_path(@account) %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
show_eu_link: @show_eu_link,
|
||||
accountable_type: "Loan" %>
|
||||
<% else %>
|
||||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "loans/form", account: @account, url: loans_path %>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</div>
|
||||
|
||||
<div class="flex justify-center py-8">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Edit loan details",
|
||||
variant: "ghost",
|
||||
href: edit_loan_path(account),
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: t(".continue"),
|
||||
href: settings_security_path,
|
||||
variant: "primary",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Sign out",
|
||||
icon: "log-out",
|
||||
icon_position: :right,
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Next",
|
||||
full_width: true
|
||||
) %>
|
||||
|
|
|
@ -30,20 +30,20 @@
|
|||
|
||||
<div class="w-full">
|
||||
<% if Current.family.can_start_trial? %>
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Try Maybe for 14 days",
|
||||
href: subscription_path,
|
||||
full_width: true,
|
||||
data: { turbo: false }
|
||||
) %>
|
||||
<% elsif Current.family.trialing? %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Continue trial",
|
||||
href: root_path,
|
||||
full_width: true,
|
||||
) %>
|
||||
<% else %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Upgrade",
|
||||
href: upgrade_subscription_path,
|
||||
full_width: true,
|
||||
|
@ -57,9 +57,9 @@
|
|||
|
||||
<div class="flex gap-3">
|
||||
<div class="rounded-xl p-1 bg-gray-400/20 theme-dark:bg-gray-500/20 flex flex-col justify-between items-center text-secondary">
|
||||
<%= render FilledIconComponent.new(icon: "unlock-keyhole", variant: :inverse) %>
|
||||
<%= render FilledIconComponent.new(icon: "bell", variant: :inverse) %>
|
||||
<%= render FilledIconComponent.new(icon: "credit-card", variant: :inverse) %>
|
||||
<%= render DS::FilledIcon.new(icon: "unlock-keyhole", variant: :inverse) %>
|
||||
<%= render DS::FilledIcon.new(icon: "bell", variant: :inverse) %>
|
||||
<%= render DS::FilledIcon.new(icon: "credit-card", variant: :inverse) %>
|
||||
</div>
|
||||
|
||||
<div class="space-y-12">
|
||||
|
@ -86,22 +86,22 @@
|
|||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-x-12 gap-y-6 text-secondary">
|
||||
<div class="flex flex-col gap-4 items-center">
|
||||
<%= render FilledIconComponent.new(icon: "landmark", variant: :surface) %>
|
||||
<%= render DS::FilledIcon.new(icon: "landmark", variant: :surface) %>
|
||||
<p class="text-sm text-primary text-center">More than 10,000 institutions to connect to</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-4 items-center">
|
||||
<%= render FilledIconComponent.new(icon: "layers", variant: :surface) %>
|
||||
<%= render DS::FilledIcon.new(icon: "layers", variant: :surface) %>
|
||||
<p class="text-sm text-primary text-center">Connect unlimited accounts and account types</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-4 items-center">
|
||||
<%= render FilledIconComponent.new(icon: "line-chart", variant: :surface) %>
|
||||
<%= render DS::FilledIcon.new(icon: "line-chart", variant: :surface) %>
|
||||
<p class="text-sm text-primary text-center">Performance and investment returns across portfolio</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-4 items-center">
|
||||
<%= render FilledIconComponent.new(icon: "credit-card", variant: :surface) %>
|
||||
<%= render DS::FilledIcon.new(icon: "credit-card", variant: :surface) %>
|
||||
<p class="text-sm text-primary text-center">Comprehensive transaction tracking experience</p>
|
||||
</div>
|
||||
|
||||
|
@ -111,22 +111,22 @@
|
|||
</div>
|
||||
|
||||
<div class="flex flex-col gap-4 items-center">
|
||||
<%= render FilledIconComponent.new(icon: "keyboard", variant: :surface) %>
|
||||
<%= render DS::FilledIcon.new(icon: "keyboard", variant: :surface) %>
|
||||
<p class="text-sm text-primary text-center">Manual account tracking that works well</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-4 items-center">
|
||||
<%= render FilledIconComponent.new(icon: "globe-2", variant: :surface) %>
|
||||
<%= render DS::FilledIcon.new(icon: "globe-2", variant: :surface) %>
|
||||
<p class="text-sm text-primary text-center">Multiple currencies and near global coverage</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-4 items-center">
|
||||
<%= render FilledIconComponent.new(icon: "ship", variant: :surface) %>
|
||||
<%= render DS::FilledIcon.new(icon: "ship", variant: :surface) %>
|
||||
<p class="text-sm text-primary text-center">Early access to newly released features</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-4 items-center">
|
||||
<%= render FilledIconComponent.new(icon: "messages-square", variant: :surface) %>
|
||||
<%= render DS::FilledIcon.new(icon: "messages-square", variant: :surface) %>
|
||||
<p class="text-sm text-primary text-center">Priority human support from team</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", account: @account, url: other_asset_path(@account) %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", account: @account, url: other_assets_path %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", account: @account, url: other_liability_path(@account) %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: t(".title")) %>
|
||||
<% dialog.with_body do %>
|
||||
<%= render "form", account: @account, url: other_liabilities_path %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<p class="text-sm lg:text-base text-secondary">Here's what's happening with your finances</p>
|
||||
</div>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
icon: "plus",
|
||||
text: "New",
|
||||
href: new_account_path,
|
||||
|
@ -13,7 +13,7 @@
|
|||
class: "hidden lg:inline-flex"
|
||||
) %>
|
||||
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
variant: "icon-inverse",
|
||||
icon: "plus",
|
||||
href: new_account_path,
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
|
||||
<% else %>
|
||||
<div class="py-10 flex flex-col items-center">
|
||||
<%= render FilledIconComponent.new(
|
||||
<%= render DS::FilledIcon.new(
|
||||
variant: :container,
|
||||
icon: classification_group.icon,
|
||||
) %>
|
||||
|
|
|
@ -25,14 +25,14 @@
|
|||
<% else %>
|
||||
<div class="h-[300px] lg:h-[340px] bg-container py-4 flex flex-col items-center justify-center">
|
||||
<div class="space-y-3 text-center flex flex-col items-center">
|
||||
<%= render FilledIconComponent.new(
|
||||
<%= render DS::FilledIcon.new(
|
||||
variant: :container,
|
||||
icon: "activity" # cashflow placeholder icon
|
||||
) %>
|
||||
|
||||
<p class="text-sm font-medium text-primary">No cash flow data for this time period</p>
|
||||
<p class="text-secondary text-sm">Add transactions to display cash flow data or expand the time period</p>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Add transaction",
|
||||
icon: "plus",
|
||||
href: new_transaction_path,
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<div class="h-[300px] lg:h-[340px] bg-container shadow-border-xs rounded-xl py-4 flex flex-col items-center justify-center">
|
||||
<div class="space-y-3 text-center flex flex-col items-center">
|
||||
<%= render FilledIconComponent.new(
|
||||
<%= render DS::FilledIcon.new(
|
||||
variant: :container,
|
||||
icon: "layers",
|
||||
) %>
|
||||
|
||||
<p class="text-sm font-medium text-primary">No accounts yet</p>
|
||||
<p class="text-secondary text-sm">Add accounts to display net worth data</p>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Add account",
|
||||
icon: "plus",
|
||||
href: new_account_path,
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<!-- Primary CTA -->
|
||||
<div class="text-center space-y-4">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "View Setup Guide",
|
||||
href: "https://github.com/maybe-finance/maybe/blob/main/docs/hosting/docker.md",
|
||||
variant: "primary",
|
||||
|
@ -44,7 +44,7 @@
|
|||
<div class="pt-6 border-t border-primary">
|
||||
<div class="text-center space-y-3">
|
||||
<p class="text-sm text-muted">Once you've configured Redis, refresh this page to continue.</p>
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Refresh Page",
|
||||
variant: "secondary",
|
||||
icon: "refresh-cw",
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
<div class="flex items-center gap-2">
|
||||
<% if plaid_item.requires_update? %>
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: t(".update"),
|
||||
icon: "refresh-cw",
|
||||
variant: "secondary",
|
||||
|
@ -63,7 +63,7 @@
|
|||
) %>
|
||||
<% end %>
|
||||
|
||||
<%= render MenuComponent.new do |menu| %>
|
||||
<%= render DS::Menu.new do |menu| %>
|
||||
<% menu.with_item(
|
||||
variant: "button",
|
||||
text: t(".delete"),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%# locals: (notice: nil, error: nil) %>
|
||||
|
||||
<% if notice.present? %>
|
||||
<%= render AlertComponent.new(message: notice, variant: :success) %>
|
||||
<%= render DS::Alert.new(message: notice, variant: :success) %>
|
||||
<% elsif error.present? %>
|
||||
<%= render AlertComponent.new(message: error, variant: :error) %>
|
||||
<%= render DS::Alert.new(message: error, variant: :error) %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: "Enter property manually") %>
|
||||
<% dialog.with_body do %>
|
||||
<div class="flex gap-4">
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
<!-- Save button -->
|
||||
<div class="flex justify-end mt-4">
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Save",
|
||||
variant: "primary",
|
||||
) %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: "Enter property manually") %>
|
||||
<% dialog.with_body do %>
|
||||
<div class="flex gap-4">
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
<!-- Next button -->
|
||||
<div class="flex justify-end mt-4">
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: @account.active? ? "Save" : "Next",
|
||||
variant: "primary",
|
||||
) %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: "Enter property manually") %>
|
||||
<% dialog.with_body do %>
|
||||
<div class="flex gap-4">
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
<!-- Save button -->
|
||||
<div class="flex justify-end mt-4">
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: @account.active? ? "Save" : "Next",
|
||||
variant: "primary",
|
||||
) %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render DialogComponent.new do |dialog| %>
|
||||
<%= render DS::Dialog.new do |dialog| %>
|
||||
<% dialog.with_header(title: "Enter property manually") %>
|
||||
<% dialog.with_body do %>
|
||||
<div class="flex gap-4">
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
<!-- Create button -->
|
||||
<div class="flex justify-end mt-4">
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Next",
|
||||
variant: "primary",
|
||||
) %>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
|
||||
<div class="flex justify-center py-8">
|
||||
<%= render LinkComponent.new(
|
||||
<%= render DS::Link.new(
|
||||
text: "Edit account details",
|
||||
href: edit_property_path(account),
|
||||
variant: "ghost",
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= render ButtonComponent.new(
|
||||
<%= render DS::Button.new(
|
||||
text: "Add condition",
|
||||
leading_icon: "plus",
|
||||
variant: "ghost",
|
||||
|
|
|
@ -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"),
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue