ParkingSlotScreenViewModel

class ParkingSlotScreenViewModel(parkingSlotId: String, viewParkingSlot: ViewParkingSlot, occupyParkingSlot: OccupyParkingSlot, incrementParkingSlotOccupation: IncrementParkingSlotOccupation, freeParkingSlot: FreeParkingSlot, router: Router) : ViewModel

Constructors

Link copied to clipboard
constructor(parkingSlotId: String, viewParkingSlot: ViewParkingSlot, occupyParkingSlot: OccupyParkingSlot, incrementParkingSlotOccupation: IncrementParkingSlotOccupation, freeParkingSlot: FreeParkingSlot, router: Router)

Functions

Link copied to clipboard
Link copied to clipboard
fun free()

Frees the shown parking slot

Link copied to clipboard
fun goBack()

Goes back to the previous screen

Link copied to clipboard
fun incrementOccupation(stopEnd: LocalDateTime)

Increments the occupation of the current parking slot

Link copied to clipboard
fun occupy(stopEnd: LocalDateTime)

Increments the occupation of the current parking slot

Link copied to clipboard
fun refresh()

Refreshes the details of the parking slot

Properties

Link copied to clipboard
val alertState: StateFlow<AppAlertState>

Current state of UI alerts

Link copied to clipboard
val uiState: StateFlow<ParkingSlotUiState>

Current state of the UI