format total numbers better

This commit is contained in:
2025-06-06 19:40:53 -06:00
parent fc50a9d4c6
commit 6a47f0d3e7
2 changed files with 14 additions and 6 deletions

View File

@@ -386,11 +386,10 @@
>
<!-- just show the hours, or alternatively whatever is first -->
<span v-if="givenTotalHours() > 0">
{{ givenTotalHours() }} {{ libsUtil.UNIT_SHORT["HUR"] }}
{{ libsUtil.formattedAmount(givenTotalHours(), "HUR") }}
</span>
<span v-else>
{{ givesTotalsByUnit[0].amount }}
{{ libsUtil.UNIT_SHORT[givesTotalsByUnit[0].unit] }}
{{ libsUtil.formattedAmount(givesTotalsByUnit[0].amount, givesTotalsByUnit[0].unit) }}
</span>
<span v-if="givesTotalsByUnit.length > 1">...</span>
<span>
@@ -411,7 +410,7 @@
:icon="libsUtil.iconForUnitCode(total.unit)"
class="fa-fw text-slate-400 mr-1"
/>
{{ total.amount }} {{ libsUtil.UNIT_LONG[total.unit] }}
{{ libsUtil.formattedAmount(total.amount, total.unit) }}
</div>
</div>
</span>