-
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 #126 from choffmann/web-compose-frontend
Rework EntryViewModel and various Web compose frontend stuff
- Loading branch information
Showing
56 changed files
with
3,380 additions
and
1,505 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
3 changes: 2 additions & 1 deletion
3
...tBinder/domain/usecase/EntriesUseCases.kt → ...getBinder/domain/usecase/EntryUseCases.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
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
27 changes: 27 additions & 0 deletions
27
...app/src/commonMain/kotlin/de/hsfl/budgetBinder/presentation/viewmodel/entry/EntryEvent.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,27 @@ | ||
package de.hsfl.budgetBinder.presentation.viewmodel.entry | ||
|
||
import de.hsfl.budgetBinder.presentation.event.LifecycleEvent | ||
|
||
// View is not allowed to declare what should be done, only notify what has happened, names are assigned as such | ||
|
||
sealed class EntryEvent { | ||
//User-made Data Input | ||
data class EnteredName(val value: String) : EntryEvent() | ||
data class EnteredAmount(val value: Float) : EntryEvent() | ||
object EnteredRepeat : EntryEvent() | ||
data class EnteredCategoryID(val value: Int?) : EntryEvent() | ||
object EnteredAmountSign : EntryEvent() | ||
|
||
//Action | ||
object OnCreateEntry : EntryEvent() | ||
object OnEditEntry : EntryEvent() | ||
object OnDeleteEntry : EntryEvent() | ||
object OnDeleteDialogConfirm : EntryEvent() | ||
object OnDeleteDialogDismiss : EntryEvent() | ||
object OnCancel: EntryEvent() | ||
|
||
|
||
//LifeCycle | ||
data class LifeCycle(val value: LifecycleEvent): EntryEvent() | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...rc/commonMain/kotlin/de/hsfl/budgetBinder/presentation/viewmodel/entry/EntryInputState.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.entry | ||
|
||
data class EntryInputState( | ||
val name: String = "", | ||
val amount: Float = 0f, | ||
val repeat: Boolean = false, | ||
val categoryID: Int? = null, | ||
val amountSign: Boolean = false | ||
) |
9 changes: 9 additions & 0 deletions
9
...app/src/commonMain/kotlin/de/hsfl/budgetBinder/presentation/viewmodel/entry/EntryState.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.entry | ||
|
||
import de.hsfl.budgetBinder.common.Category | ||
import de.hsfl.budgetBinder.common.Entry | ||
|
||
data class EntryState( | ||
val selectedEntry: Entry = Entry(0,"",0f,false,null), | ||
val categoryList: List<Category> = listOf(Category(0,"No category","ffffff",Category.Image.DEFAULT,0f)) | ||
) |
Oops, something went wrong.