Skip to content

Commit

Permalink
feat: 장부 카테고리 그룹핑 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
jinukeu committed Jan 31, 2024
1 parent d638626 commit e759b4c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ import com.susu.feature.received.R
import com.susu.feature.received.navigation.argument.FilterArgument
import com.susu.feature.received.received.component.LedgerAddCard
import com.susu.feature.received.received.component.LedgerCard
import com.susu.feature.received.received.component.LedgerCategoryCard
import kotlinx.collections.immutable.toPersistentList
import kotlinx.coroutines.android.awaitFrame
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -236,49 +235,24 @@ fun ReceiveScreen(
verticalArrangement = Arrangement.spacedBy(SusuTheme.spacing.spacing_xxs),
horizontalArrangement = Arrangement.spacedBy(SusuTheme.spacing.spacing_xxs),
) {
if (uiState.isFiltered) {
uiState.ledgerList.groupBy { it.category }.forEach { (category, ledgerList) ->
item(
span = { GridItemSpan(2) },
contentType = "LedgerCategoryCard",
) {
LedgerCategoryCard(name = category.name)
}

items(
items = ledgerList,
key = { it.id },
) { ledger ->
LedgerCard(
ledgerType = ledger.category.name,
title = ledger.title,
money = ledger.totalAmounts,
count = ledger.totalCounts,
style = ledger.category.style,
onClick = { onClickLedgerCard(ledger) },
)
}
}
} else {
items(
items = uiState.ledgerList,
key = { it.id },
) { ledger ->
LedgerCard(
ledgerType = ledger.category.name,
title = ledger.title,
money = ledger.totalAmounts,
count = ledger.totalCounts,
style = ledger.category.style,
onClick = { onClickLedgerCard(ledger) },
)
}
items(
items = uiState.ledgerList,
key = { it.id },
) { ledger ->
LedgerCard(
ledgerType = ledger.category.name,
title = ledger.title,
money = ledger.totalAmounts,
count = ledger.totalCounts,
style = ledger.category.style,
onClick = { onClickLedgerCard(ledger) },
)
}

item {
LedgerAddCard(
onClick = onClickLedgerAddCard,
)
}
item {
LedgerAddCard(
onClick = onClickLedgerAddCard,
)
}
}
}
Expand Down

This file was deleted.

0 comments on commit e759b4c

Please sign in to comment.