mirror of
https://github.com/we-promise/sure
synced 2026-04-25 17:15:07 +02:00
PWA: Transaction UI Fixes (#283)
* PWA: Fix header display on screens smaller than tailwind md Also makes the header not render if there aren't any transactions. Mobile already did this, desktop didn't. Now it's consistent. Fix #181 * PWA: Display category on `md` * ERB: Align transaction amount column --------- Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -89,11 +89,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hidden lg:flex items-center gap-1 col-span-2">
|
||||
<div class="hidden md:flex items-center gap-1 col-span-2">
|
||||
<%= render "transactions/transaction_category", transaction: transaction %>
|
||||
</div>
|
||||
|
||||
<div class="col-span-2 ml-auto text-right">
|
||||
<div class="col-span-2 col-start-11 md:col-start-auto ml-auto text-right">
|
||||
<%= content_tag :p,
|
||||
transaction.transfer? && view_ctx == "global" ? "+/- #{format_money(entry.amount_money.abs)}" : format_money(-entry.amount_money),
|
||||
class: ["text-green-600": entry.amount.negative?] %>
|
||||
|
||||
@@ -58,24 +58,17 @@
|
||||
|
||||
<% if @pagy.count > 0 || (@projected_recurring.any? && @q.blank?) %>
|
||||
<div class="grow overflow-y-auto">
|
||||
<div class="grid-cols-12 bg-container-inset rounded-xl px-5 py-3 text-xs uppercase font-medium text-secondary items-center mb-4 hidden md:grid">
|
||||
<div class="pl-0.5 col-span-8 flex items-center gap-4">
|
||||
<%= check_box_tag "selection_entry",
|
||||
class: "checkbox checkbox--light",
|
||||
data: { action: "bulk-select#togglePageSelection" } %>
|
||||
<p>transaction</p>
|
||||
</div>
|
||||
|
||||
<p class="col-span-2">category</p>
|
||||
<p class="col-span-2 justify-self-end">amount</p>
|
||||
</div>
|
||||
|
||||
<% if @transactions.any? %>
|
||||
<div class="md:hidden text-xs uppercase font-medium text-secondary mb-2 px-2">
|
||||
<%= check_box_tag "selection_entry",
|
||||
class: "checkbox checkbox--light mr-2 ml-1",
|
||||
data: { action: "bulk-select#togglePageSelection" } %>
|
||||
<span>TRANSACTION</span>
|
||||
<div class="grid-cols-12 bg-container-inset rounded-xl px-5 py-3 text-xs uppercase font-medium text-secondary items-center mb-4 grid">
|
||||
<div class="pl-0.5 col-span-8 flex items-center gap-4">
|
||||
<%= check_box_tag "selection_entry",
|
||||
class: "checkbox checkbox--light",
|
||||
data: { action: "bulk-select#togglePageSelection" } %>
|
||||
<p>transaction</p>
|
||||
</div>
|
||||
|
||||
<p class="col-span-2 md:block hidden">category</p>
|
||||
<p class="col-span-2 col-start-11 md:col-start-auto justify-self-end md:block">amount</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user