mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-06 14:05:20 +02:00
Since the very first 0.1.0-alpha.1 release, we've been moving quickly to add new features to the Maybe app. In doing so, some parts of the codebase have become outdated, unnecessary, or overly-complex as a natural result of this feature prioritization. Now that "core" Maybe is complete, we're moving into a second phase of development where we'll be working hard to improve the accuracy of existing features and build additional features on top of "core". This PR is a quick overhaul of the existing codebase aimed to: - Establish the brand new and simplified dashboard view (pictured above) - Establish and move towards the conventions introduced in Cursor rules and project design overview #1788 - Consolidate layouts and improve the performance of layout queries - Organize the core models of the Maybe domain (i.e. Account::Entry, Account::Transaction, etc.) and break out specific traits of each model into dedicated concerns for better readability - Remove stale / dead code from codebase - Remove overly complex code paths in favor of simpler ones
37 lines
1.5 KiB
Text
37 lines
1.5 KiB
Text
|
|
<header class="flex items-center justify-between">
|
|
<h1 class="text-primary text-xl font-medium"><%= t(".categories") %></h1>
|
|
|
|
<%= link_to new_category_path, class: "btn btn--primary flex items-center gap-1 justify-center", data: { turbo_frame: :modal } do %>
|
|
<%= lucide_icon "plus", class: "w-5 h-5" %>
|
|
<p><%= t(".new") %></p>
|
|
<% end %>
|
|
</header>
|
|
|
|
<div class="bg-white shadow-border-xs rounded-xl p-4">
|
|
<% if @categories.any? %>
|
|
<div class="space-y-4">
|
|
<% if @categories.incomes.any? %>
|
|
<%= render "categories/category_list_group", title: t(".categories_incomes"), categories: @categories.incomes %>
|
|
<% end %>
|
|
|
|
<% if @categories.expenses.any? %>
|
|
<%= render "categories/category_list_group", title: t(".categories_expenses"), categories: @categories.expenses %>
|
|
<% end %>
|
|
</div>
|
|
<% else %>
|
|
<div class="flex justify-center items-center py-20">
|
|
<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">
|
|
<%= button_to t(".bootstrap"), bootstrap_categories_path, class: "btn btn--primary" %>
|
|
|
|
<%= link_to new_category_path, class: "btn btn--outline flex items-center gap-1", data: { turbo_frame: "modal" } do %>
|
|
<%= lucide_icon("plus", class: "w-5 h-5") %>
|
|
<span><%= t(".new") %></span>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|