Files
sure/app/views/valuations/show.html.erb
StalkerSea a86329d632 PWA: Update manifest, meta tags, and fix UI layout issues (#801)
* pwa(cleanup): enforce LF, head meta + icons, manifest orientation, remove static webmanifest

* pwa(cleanup): add gitattributes, head meta/icons, manifest orientation; remove static manifest; small nav & dashboard fixes

* pwa(cleanup): improve transaction drawer header layout with inline close button

* fix: address PR review feedback

- Add dom_id to transaction header for Turbo Stream updates (Codex)
- Add pending badge next to date when transaction is pending (CodeRabbit)
- Make close button keyboard-focusable by removing tabindex=-1 (CodeRabbit)
- Fix settings nav horizontal scroll with flex-nowrap space-x-1 (CodeRabbit)

* fix: localize 'Linked with Plaid' tooltip string (CodeRabbit)

* Update .gitattributes

Better comment smh

* fix: align transaction/transfer dialog icons and update transfer drawer pattern

- Fix icon alignment in transaction header (items-center instead of items-start)
- Make transfer/linked icons consistent size and color
- Update transfers/show.html.erb to use frame: drawer with hide_close_icon pattern
- Match transfer dialog header layout with transaction details

* fix: enhance header layout

This in the transaction and transfer views, with consistent icon placement

* fix: remove fixed height from HTML document class

basically a regression issue pretty sure

* fix: update dialog rendering to use 'frame' and hide close icon in headers

* fix: update transaction type tabs layout for improved responsiveness

* fix: conditionally render transaction type tabs based on account type
2026-01-29 15:16:49 +01:00

76 lines
2.6 KiB
Plaintext

<% entry, account = @entry, @entry.account %>
<%= render DS::Dialog.new(frame: "drawer") do |dialog| %>
<% dialog.with_header(hide_close_icon: true) do %>
<%= render "valuations/header", entry: @entry %>
<% end %>
<% dialog.with_body do %>
<% if @error_message.present? %>
<div class="mb-4">
<%= render DS::Alert.new(message: @error_message, variant: :error) %>
</div>
<% end %>
<% dialog.with_section(title: t(".overview"), open: true) do %>
<div class="pb-4">
<%= styled_form_with model: entry,
url: confirm_update_valuation_path(entry),
method: :post,
data: { turbo_frame: :modal },
class: "space-y-4" do |f| %>
<%= f.date_field :date,
label: t(".date_label"),
max: Date.current %>
<%= f.money_field :amount,
label: "Account value on date",
disable_currency: true %>
<div class="flex justify-end">
<%= render DS::Button.new(
text: "Update value",
variant: :primary,
type: "submit"
) %>
</div>
<% end %>
</div>
<% end %>
<% dialog.with_section(title: t(".details")) do %>
<div class="pb-4">
<%= styled_form_with model: entry,
url: valuation_path(entry),
method: :patch,
class: "space-y-2",
data: { controller: "auto-submit-form", auto_submit_form_trigger_event_value: "blur" } do |f| %>
<%= f.text_area :notes,
label: t(".note_label"),
placeholder: t(".note_placeholder"),
rows: 5,
"data-auto-submit-form-target": "auto" %>
<% end %>
</div>
<% end %>
<% dialog.with_section(title: t(".settings")) do %>
<div class="pb-4">
<!-- Delete Valuation Form -->
<div class="flex items-center justify-between gap-2 p-3">
<div class="text-sm space-y-1">
<h4 class="text-primary"><%= t(".delete_title") %></h4>
<p class="text-secondary"><%= t(".delete_subtitle") %></p>
</div>
<%= button_to t(".delete"),
entry_path(entry),
method: :delete,
class: "rounded-lg px-3 py-2 text-red-500 text-sm font-medium border border-secondary",
data: { turbo_confirm: CustomConfirm.for_resource_deletion("value update").to_data_attribute, turbo_frame: "_top" } %>
</div>
</div>
<% end %>
<% end %>
<% end %>