1
0
Fork 0
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)
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled

* 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:
Zach Gollwitzer 2024-11-27 16:01:50 -05:00 committed by GitHub
parent 76f2714006
commit c3248cd796
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
97 changed files with 1103 additions and 1159 deletions

View file

@ -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">

View 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>

View file

@ -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>

View 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 %>