fix(costs): the count beside the total adds up what it does, and its left-out chip counts all again (#2819, #2839)

With a category left out the total card still counted every expense, and in
the table view the only way back was to switch views; the chip now brings
everything back. The phone says what is left out once, under the total.
Linking a receipt offers pictures and PDFs only, like the upload.
This commit is contained in:
Maurice
2026-11-13 10:49:28 +01:00
parent 43a8984e4c
commit fcbb538c24
7 changed files with 40 additions and 13 deletions
@@ -328,9 +328,8 @@ export default function MCostsTab({ planner, shell }: MTabScreenProps) {
</button>
)}
</div>
{leftOutLabel
? <p className="mt-1 text-caption text-m-muted">{leftOutLabel}</p>
: catBreakdown.length > 1 && <p className="mt-1 text-caption text-m-faint">{t('costs.breakdown.hint')}</p>}
{/* What is left out is said once, under the total above. */}
{!leftOutLabel && catBreakdown.length > 1 && <p className="mt-1 text-caption text-m-faint">{t('costs.breakdown.hint')}</p>}
{catBreakdown.length === 0 ? (
<p className="mt-2 font-geist text-[0.71875rem] text-m-faint">{t('costs.noCategories')}</p>
) : (