-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: [ANDROAPP-5821] Add no options available category selector (#3460)
* fix: [ANDROAPP-5821] add new no options available logic * feat: [ANDROAPP-5821] sonar code smell fixes refactor and clean-up code * feat: [ANDROAPP-5821] refactor code for sonar fix and remove options available for create new event button visibility * fix: [ANDROAPP-5821] add test for empty category selector
- Loading branch information
1 parent
63aa296
commit bbf47a8
Showing
14 changed files
with
507 additions
and
347 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
19 changes: 19 additions & 0 deletions
19
...org/dhis2/usescases/eventsWithoutRegistration/eventDetails/models/EventCatComboUiModel.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,19 @@ | ||
package org.dhis2.usescases.eventsWithoutRegistration.eventDetails.models | ||
|
||
import org.hisp.dhis.android.core.category.CategoryOption | ||
import java.util.Date | ||
|
||
data class EventCatComboUiModel( | ||
val category: EventCategory, | ||
val eventCatCombo: EventCatCombo, | ||
val detailsEnabled: Boolean, | ||
val currentDate: Date?, | ||
val selectedOrgUnit: String?, | ||
val onShowCategoryDialog: (EventCategory) -> Unit, | ||
val onClearCatCombo: (EventCategory) -> Unit, | ||
val onOptionSelected: (CategoryOption?) -> Unit, | ||
val required: Boolean = false, | ||
val noOptionsText: String, | ||
val catComboText: String, | ||
val showField: Boolean = true, | ||
) |
14 changes: 14 additions & 0 deletions
14
...rg/dhis2/usescases/eventsWithoutRegistration/eventDetails/models/EventInputDateUiModel.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 org.dhis2.usescases.eventsWithoutRegistration.eventDetails.models | ||
|
||
import org.dhis2.usescases.eventsWithoutRegistration.eventDetails.providers.InputDateValues | ||
|
||
data class EventInputDateUiModel( | ||
val eventDate: EventDate, | ||
val detailsEnabled: Boolean, | ||
val onDateClick: () -> Unit, | ||
val allowsManualInput: Boolean = true, | ||
val onDateSet: (InputDateValues) -> Unit, | ||
val onClear: () -> Unit, | ||
val required: Boolean = false, | ||
val showField: Boolean = true, | ||
) |
Oops, something went wrong.