fix(transactions): single-line rows with a foreign column, whole-card period strip under the table

This commit is contained in:
hh committed 2026-10-16 04:29:46 +00:00
1 parent e279d3948a
commit dea5d8c675
3 files changed
+11 -4

No files matched your search

@@ -64,14 +64,14 @@
<nav <nav
aria-label="Periods" aria-label="Periods"
class="flex min-w-0 gap-2 overflow-x-auto min-[1600px]:flex-col min-[1600px]:overflow-visible {className}" class="grid min-w-0 auto-rows-[0] grid-cols-[repeat(auto-fill,minmax(10rem,1fr))] grid-rows-[auto] gap-x-2 overflow-hidden min-[1600px]:flex min-[1600px]:flex-col min-[1600px]:gap-2 min-[1600px]:overflow-visible {className}"
> >
{#each periods as item (item.range.start)} {#each periods as item (item.range.start)}
{@const current = {@const current =
item.range.start === period.start && item.range.end === period.end} item.range.start === period.start && item.range.end === period.end}
<a <a
aria-current={current ? "page" : undefined} aria-current={current ? "page" : undefined}
class="cladd-surface cladd-outline flex w-40 shrink-0 flex-col gap-0.5 rounded-cladd-md px-3 py-2 text-[12px] min-[1600px]:w-auto {current class="cladd-surface cladd-outline flex min-w-0 flex-col gap-0.5 rounded-cladd-md px-3 py-2 text-[12px] {current
? "bg-row-cursor outline-2 outline-brand -outline-offset-2" ? "bg-row-cursor outline-2 outline-brand -outline-offset-2"
: "hover:bg-row-hover"}" : "hover:bg-row-hover"}"
href={href(item.range)} href={href(item.range)}
@@ -332,11 +332,16 @@
<td class="text-right"> <td class="text-right">
{@render money(amount)} {@render money(amount)}
{#if foreign} {#if foreign}
<div class="num text-[12px] text-cladd-fg-soft"> <div class="num text-[12px] text-cladd-fg-soft lg:hidden">
{formatMoney(foreign)} {formatMoney(foreign)}
</div> </div>
{/if} {/if}
</td> </td>
<td class="num text-right text-[12px] text-cladd-fg-soft max-lg:hidden">
{#if foreign}
{formatMoney(foreign)}
{/if}
</td>
{#if accountId} {#if accountId}
<td class="text-right">{@render plain(balanceAfter(split, accountId))}</td> <td class="text-right">{@render plain(balanceAfter(split, accountId))}</td>
{/if} {/if}
@@ -414,6 +419,7 @@
<div>{@render money(sum)}</div> <div>{@render money(sum)}</div>
{/each} {/each}
</td> </td>
<td class="max-lg:hidden"></td>
{#if accountId} {#if accountId}
<td></td> <td></td>
{/if} {/if}
@@ -478,6 +484,7 @@
<th class="w-6 max-sm:hidden"><span class="sr-only">Type</span></th> <th class="w-6 max-sm:hidden"><span class="sr-only">Type</span></th>
<th>Description</th> <th>Description</th>
<th class="w-28 text-right md:w-32">Amount</th> <th class="w-28 text-right md:w-32">Amount</th>
<th class="w-24 text-right max-lg:hidden">Foreign</th>
{#if accountId} {#if accountId}
<th class="w-32 text-right">Balance</th> <th class="w-32 text-right">Balance</th>
{/if} {/if}
@@ -234,6 +234,6 @@
{/snippet} {/snippet}
</Box> </Box>
{#if !everything} {#if !everything}
<Periods class="order-first min-[1600px]:order-none" {type} /> <Periods {type} />
{/if} {/if}
</div> </div>