Hide archived categories in transaction forms

Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
William Brawner 2023-05-31 08:47:57 -06:00
parent d904a806ed
commit 3c1449ac3b
2 changed files with 4 additions and 2 deletions

View file

@ -117,7 +117,8 @@ fun RecurringTransactionForm(store: Store) {
setAmount = setAmount,
expense = expense,
setExpense = setExpense,
categories = state.categories?.filter { c -> c.expense == expense } ?: emptyList(),
categories = state.categories?.filter { c -> c.expense == expense && !c.archived }
?: emptyList(),
category = category,
setCategory = setCategory
) {

View file

@ -111,7 +111,8 @@ fun TransactionForm(store: Store) {
setAmount = setAmount,
expense = expense,
setExpense = setExpense,
categories = state.categories?.filter { c -> c.expense == expense } ?: emptyList(),
categories = state.categories?.filter { c -> c.expense == expense && !c.archived }
?: emptyList(),
category = category,
setCategory = setCategory
) {