Insert Screen View Model

abstract class InsertScreenViewModel(revenueId: String?) : EquinoxViewModel

The InsertScreenViewModel class is the support class used to execute the authentication requests to the backend

Author

N7ghtm4r3 - Tecknobit

See also

Retriever
EquinoxViewModel

Inheritors

Constructors

Link copied to clipboard
constructor(revenueId: String?)

Properties

Link copied to clipboard

addingGeneralRevenue whether

Link copied to clipboard

description the description of the revenue

Link copied to clipboard

descriptionError whether the description field is not valid

Link copied to clipboard
lateinit var insertionDate: MutableState<LocalDateTime>

insertionDate the date of the insertion of the revenue

Link copied to clipboard

keyboardState the state used to manage the amount value of the revenue

Link copied to clipboard
val revenue: StateFlow<Revenue?>
Link copied to clipboard
Link copied to clipboard
lateinit var state: SessionFlowState

sessionFlowState the state used to manage the session lifecycle in the screen

Link copied to clipboard
lateinit var title: MutableState<String>

title the title of the revenue

Link copied to clipboard

titleError whether the title field is not valid

Functions

Link copied to clipboard
expect open fun addCloseable(closeable: AutoCloseable)
expect fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard
open override fun canRetrieverStart(): Boolean
Link copied to clipboard
open override fun continueToRetrieve(currentContext: KClass<*>): Boolean
Link copied to clipboard
expect fun <T : AutoCloseable> getCloseable(key: String): T?
Link copied to clipboard
fun insert()

Method to insert the created revenue validating before the information

Link copied to clipboard
open override fun restartRetriever()
Link copied to clipboard
open fun restartRetrieverIf(condition: Boolean)
Link copied to clipboard
open override fun retrieve(currentContext: KClass<*>, routine: suspend () -> Unit, repeatRoutine: Boolean, refreshDelay: Long)
Link copied to clipboard
open fun retrieveRevenue(onSuccess: () -> Unit? = null)

Method to retrieve the revenue information to edit that revenue

Link copied to clipboard
open fun setActiveContext(currentContext: KClass<*>)
Link copied to clipboard
fun showSnackbarMessage(message: String, actionLabel: String?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
fun showSnackbarMessage(response: JsonObject, actionLabel: String?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
fun showSnackbarMessage(message: StringResource, actionLabel: StringResource?, onDismiss: () -> Unit?, onActionPerformed: () -> Unit?, withDismissAction: Boolean, duration: SnackbarDuration)
Link copied to clipboard
open override fun suspendRetriever()
Link copied to clipboard
open fun suspendRetrieverIf(condition: Boolean)