-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af25d6a
commit d0ed262
Showing
7 changed files
with
95 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
compose-common/src/jvmMain/kotlin/simple/payment/tracker/compose/MonthlyGrouping.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package simple.payment.tracker.compose | ||
|
||
interface MonthlyGrouping { | ||
fun group(category: String): Grouping | ||
|
||
data class Grouping(val group: String, val prio: Int) | ||
|
||
companion object { | ||
val NONE: (String) -> Grouping = { Grouping("", 0) } | ||
val DEFAULT: (String) -> Grouping = { category -> | ||
when (category) { | ||
"Жилье", | ||
"Машина", | ||
"Садик", | ||
"Интернет" -> Grouping("Constant", 0) | ||
"Еда", | ||
"Ресторан", | ||
"Гедонизм", | ||
"Кот", | ||
"Образование", | ||
"Няня", | ||
"Фитнесс", | ||
"Drogerie" -> Grouping("Regular", 2) | ||
else -> Grouping("Irregular", 1) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters