mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 13:35:21 +02:00
Improve account transaction, trade, and valuation editing and sync experience (#1506)
* Consolidate entry controller logic * Transaction builder * Update trades controller to use new params * Load account charts in turbo frames, fix PG overflow * Consolidate tests * Tests passing * Remove unused code * Add client side trade form validations
This commit is contained in:
parent
76f2714006
commit
c3248cd796
97 changed files with 1103 additions and 1159 deletions
|
@ -1,5 +1,10 @@
|
|||
<%# locals: (content:, reload_on_close: false) %>
|
||||
|
||||
<%= turbo_frame_tag "drawer" do %>
|
||||
<dialog class="bg-white border border-alpha-black-25 rounded-2xl max-w-[480px] w-full shadow-xs h-full mt-4 mr-4 focus-visible:outline-none" data-controller="modal" data-action="click->modal#clickOutside">
|
||||
<dialog class="bg-white border border-alpha-black-25 rounded-2xl max-w-[480px] w-full shadow-xs h-full mt-4 mr-4 focus-visible:outline-none"
|
||||
data-controller="modal"
|
||||
data-action="click->modal#clickOutside"
|
||||
data-modal-reload-on-close-value="<%= reload_on_close %>">
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex justify-end items-center p-4">
|
||||
<div data-action="click->modal#close" class="cursor-pointer p-2">
|
||||
|
|
6
app/views/shared/_form_errors.html.erb
Normal file
6
app/views/shared/_form_errors.html.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<%# locals: (model:) %>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<%= lucide_icon("alert-circle", class: "text-red-500 w-4 h-4 shrink-0") %>
|
||||
<p class="text-red-500 text-sm"><%= model.errors.full_messages.to_sentence %></p>
|
||||
</div>
|
|
@ -1,10 +1,9 @@
|
|||
<%# locals: (message:, type: "notice", id: nil, **_opts) %>
|
||||
<%# locals: (message:, type: "notice", **_opts) %>
|
||||
|
||||
<% type = type.to_sym %>
|
||||
<% action = "animationend->element-removal#remove" if type == :notice %>
|
||||
|
||||
<%= tag.div class: "flex gap-3 rounded-lg border bg-white p-4 group max-w-80 shadow-xs border-alpha-black-25",
|
||||
id: type == :processing ? "syncing-notification" : id,
|
||||
data: {
|
||||
controller: "element-removal",
|
||||
action: action
|
||||
|
@ -20,8 +19,6 @@
|
|||
<div class="flex h-full items-center justify-center rounded-full bg-error">
|
||||
<%= lucide_icon "x", class: "w-3 h-3" %>
|
||||
</div>
|
||||
<% when :processing %>
|
||||
<%= lucide_icon "loader", class: "w-5 h-5 text-gray-500 animate-pulse" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
7
app/views/shared/_syncing_notice.html.erb
Normal file
7
app/views/shared/_syncing_notice.html.erb
Normal file
|
@ -0,0 +1,7 @@
|
|||
<%= tag.div id: "syncing-notice", class: "flex gap-3 rounded-lg border bg-white p-4 group max-w-80 shadow-xs border-alpha-black-25" do %>
|
||||
<div class="h-5 w-5 shrink-0 p-px text-white">
|
||||
<%= lucide_icon "loader", class: "w-5 h-5 text-gray-500 animate-pulse" %>
|
||||
</div>
|
||||
|
||||
<%= tag.p t(".syncing"), class: "text-gray-900 text-sm font-medium" %>
|
||||
<% end %>
|
Loading…
Add table
Add a link
Reference in a new issue