mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-07 14:35:23 +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
48 lines
1.9 KiB
Text
48 lines
1.9 KiB
Text
<%# locals: (form:) %>
|
|
|
|
<div
|
|
id="transaction-filters-menu"
|
|
data-menu-target="content"
|
|
data-controller="tabs"
|
|
data-tabs-active-class="bg-gray-25 text-primary"
|
|
data-tabs-default-tab-value="<%= get_default_transaction_search_filter[:key] %>"
|
|
class="hidden absolute flex z-10 h-80 w-[540px] top-12 right-0 shadow-border-xs bg-white rounded-lg">
|
|
<div class="flex w-44 flex-col items-start p-3 text-sm font-medium text-secondary border-r border-r-alpha-black-100">
|
|
<% transaction_search_filters.each do |filter| %>
|
|
<button
|
|
class="flex text-secondary hover:bg-gray-25 items-center gap-2 px-3 rounded-md py-2 w-full"
|
|
type="button"
|
|
data-id="<%= filter[:key] %>"
|
|
data-tabs-target="btn"
|
|
data-action="tabs#select">
|
|
<%= lucide_icon(filter[:icon], class: "w-5 h-5") %>
|
|
<span class="text-sm font-medium"><%= t(".#{filter[:key]}") %></span>
|
|
</button>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="flex flex-col grow">
|
|
<div class="grow p-3 border-b border-b-alpha-black-100 overflow-y-auto">
|
|
<% transaction_search_filters.each do |filter| %>
|
|
<div id="<%= filter[:key] %>" data-tabs-target="tab">
|
|
<%= render partial: get_transaction_search_filter_partial_path(filter), locals: { form: form } %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="flex justify-between items-center gap-2 bg-white p-3">
|
|
<div>
|
|
<% if @q.present? %>
|
|
<%= link_to t(".clear_filters"), transactions_path(clear_filters: true), class: "btn btn--ghost" %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div>
|
|
<%= button_tag type: "reset", data: { action: "menu#close" }, class: "py-2 px-3 bg-gray-50 rounded-lg text-sm text-primary font-medium" do %>
|
|
<%= t(".cancel") %>
|
|
<% end %>
|
|
<%= form.submit t(".apply"), name: nil, class: "py-2 px-3 bg-gray-900 hover:bg-gray-700 rounded-lg text-sm text-white font-medium cursor-pointer" %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|