mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-06 22:15: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
40 lines
1.5 KiB
Text
40 lines
1.5 KiB
Text
<%# locals: (budget:, previous_budget:, next_budget:, latest_budget:) %>
|
|
|
|
<div class="flex items-center gap-1 mb-4">
|
|
<div class="flex items-center gap-2">
|
|
<% if budget.previous_budget_param %>
|
|
<%= link_to budget_path(budget.previous_budget_param) do %>
|
|
<%= lucide_icon "chevron-left" %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= lucide_icon "chevron-left", class: "text-subdued" %>
|
|
<% end %>
|
|
|
|
<% if budget.next_budget_param %>
|
|
<%= link_to budget_path(budget.next_budget_param) do %>
|
|
<%= lucide_icon "chevron-right" %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= lucide_icon "chevron-right", class: "text-subdued" %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div data-controller="menu" data-menu-placement-value="bottom-start">
|
|
<%= tag.button data: { menu_target: "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"><%= @budget.name %></span>
|
|
<%= lucide_icon "chevron-down", class: "w-5 h-5 shrink-0 text-secondary" %>
|
|
<% end %>
|
|
|
|
<div data-menu-target="content" class="hidden z-10">
|
|
<%= render "budgets/picker", family: Current.family, year: budget.start_date.year %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ml-auto">
|
|
<% if @budget.current? %>
|
|
<span class="border border-secondary text-primary text-sm font-medium px-3 py-2 rounded-lg">Today</span>
|
|
<% else %>
|
|
<%= link_to "Today", budget_path(Budget.date_to_param(Date.current)), class: "btn btn--outline" %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|