From 9d66feae5483141be0689d834b6d45906d6be84a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 25 Apr 2025 14:16:31 -0700 Subject: clean up payments page --- src/routes/(app)/payments/[...page]/+page.svelte | 54 +++++++++++++----------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/src/routes/(app)/payments/[...page]/+page.svelte b/src/routes/(app)/payments/[...page]/+page.svelte index 28cd29f4..57316f4a 100644 --- a/src/routes/(app)/payments/[...page]/+page.svelte +++ b/src/routes/(app)/payments/[...page]/+page.svelte @@ -215,7 +215,7 @@ - {#if tipsIn || tipsOut}{$t("payments.tips")}{/if} + {#if tipsIn > 0 || tipsOut > 0}{$t("payments.tips")}{/if} {$t("payments.total")}{$t("payments.income")} - - {tipsIn > 0 ? f(tipsIn, c, locale) : "-"} - {totalIn > 0 ? f(totalIn, c, locale) : "-"} + {#if totalIn > 0} + {$t("payments.income")} + + {tipsIn > 0 ? f(tipsIn, c, locale) : ""} + {totalIn > 0 ? f(totalIn, c, locale) : "-"} + {/if} - {$t("payments.expenditure")} - - {tipsOut > 0 ? f(tipsOut, c, locale) : "-"} - {totalOut > 0 ? f(totalOut, c, locale) : "-"} + {#if totalOut > 0} + {$t("payments.expenditure")} + + {tipsOut > 0 ? f(tipsOut, c, locale) : "-"} + {totalOut > 0 ? f(totalOut, c, locale) : "-"} + {/if} {/each} -
- -
+ {#if payments.length} +
+ +
+ {/if} -- cgit v1.2.3