-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from choffmann/implement-dashboard-viewmodel
Implement Dashboard Viewmodel
- Loading branch information
Showing
20 changed files
with
791 additions
and
255 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
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
82 changes: 0 additions & 82 deletions
82
...p/src/commonMain/kotlin/de/hsfl/budgetBinder/presentation/viewmodel/DashboardViewModel.kt
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
...nMain/kotlin/de/hsfl/budgetBinder/presentation/viewmodel/dashboard/DashboardEntryState.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,9 @@ | ||
package de.hsfl.budgetBinder.presentation.viewmodel.dashboard | ||
|
||
import de.hsfl.budgetBinder.common.Category | ||
import de.hsfl.budgetBinder.common.Entry | ||
|
||
data class DashboardEntryState( | ||
val entry: Entry, | ||
val categoryImage: Category.Image = Category.Image.DEFAULT | ||
) |
12 changes: 12 additions & 0 deletions
12
...commonMain/kotlin/de/hsfl/budgetBinder/presentation/viewmodel/dashboard/DashboardEvent.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,12 @@ | ||
package de.hsfl.budgetBinder.presentation.viewmodel.dashboard | ||
|
||
|
||
sealed class DashboardEvent { | ||
object OnPrevCategory : DashboardEvent() | ||
object OnNextCategory : DashboardEvent() | ||
object OnRefresh: DashboardEvent() | ||
object OnLoadMore: DashboardEvent() | ||
data class OnEntry(val id: Int) : DashboardEvent() | ||
data class OnEntryDelete(val id: Int): DashboardEvent() | ||
object OnEntryCreate : DashboardEvent() | ||
} |
12 changes: 12 additions & 0 deletions
12
...commonMain/kotlin/de/hsfl/budgetBinder/presentation/viewmodel/dashboard/DashboardState.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,12 @@ | ||
package de.hsfl.budgetBinder.presentation.viewmodel.dashboard | ||
|
||
import de.hsfl.budgetBinder.common.Category | ||
import de.hsfl.budgetBinder.common.Entry | ||
|
||
data class DashboardState( | ||
val hasPrev: Boolean = false, | ||
val hasNext: Boolean = true, | ||
val category: Category = Category(0, "Overall", "111111", Category.Image.DEFAULT, 0f), | ||
val entryList: List<DashboardEntryState> = emptyList(), | ||
val spendBudgetOnCurrentCategory: Float = 0f | ||
) |
Oops, something went wrong.