diff --git a/src/lib/components/KpiCard.svelte b/src/lib/components/KpiCard.svelte index f85af5c..63d4ae9 100644 --- a/src/lib/components/KpiCard.svelte +++ b/src/lib/components/KpiCard.svelte @@ -22,6 +22,9 @@ const iconClass = $derived( `size-5 ${tone === 'good' ? 'text-emerald-600' : tone === 'warning' ? 'text-amber-600' : 'text-primary'}`, ); + const rialSuffix = '\u00a0ریال'; + const hasRialSuffix = $derived(value.endsWith(rialSuffix)); + const displayValue = $derived(hasRialSuffix ? value.slice(0, -rialSuffix.length) : value); @@ -34,7 +37,14 @@

- {value} + {#if hasRialSuffix} + + + + + {:else} + {value} + {/if}

{note}