-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converting account create screen with state and actions
- Loading branch information
Showing
5 changed files
with
393 additions
and
477 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...c/main/kotlin/com/naveenapps/expensemanager/feature/account/create/AccountCreateAction.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,14 @@ | ||
package com.naveenapps.expensemanager.feature.account.create | ||
|
||
sealed class AccountCreateAction { | ||
|
||
data object ShowDeleteDialog : AccountCreateAction() | ||
|
||
data object DismissDeleteDialog : AccountCreateAction() | ||
|
||
data object ClosePage : AccountCreateAction() | ||
|
||
data object Save : AccountCreateAction() | ||
|
||
data object Delete : AccountCreateAction() | ||
} |
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
20 changes: 20 additions & 0 deletions
20
...rc/main/kotlin/com/naveenapps/expensemanager/feature/account/create/AccountCreateState.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,20 @@ | ||
package com.naveenapps.expensemanager.feature.account.create | ||
|
||
import androidx.annotation.DrawableRes | ||
import com.naveenapps.expensemanager.core.model.AccountType | ||
import com.naveenapps.expensemanager.core.model.Currency | ||
import com.naveenapps.expensemanager.core.model.TextFieldValue | ||
|
||
data class AccountCreateState( | ||
val name: TextFieldValue<String>, | ||
val type: TextFieldValue<AccountType>, | ||
val color: TextFieldValue<String>, | ||
val icon: TextFieldValue<String>, | ||
val creditLimit: TextFieldValue<String>, | ||
val amount: TextFieldValue<String>, | ||
val currency: Currency, | ||
val totalAmount: String, | ||
@DrawableRes val totalAmountBackgroundColor: Int, | ||
val showDeleteButton: Boolean, | ||
val showDeleteDialog: Boolean, | ||
) |
Oops, something went wrong.