Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support search by dynamic queries #3550

Merged
merged 10 commits into from
Oct 19, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ data class RegisterContentConfig(
val visible: Boolean? = null,
val computedRules: List<String>? = null,
val searchByQrCode: Boolean? = null,
val dataFilterFields: List<RegisterFilterField> = emptyList(),
)
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class RegisterScreenTest {
pagesCount = 0,
progressPercentage = flowOf(0),
isSyncUpload = flowOf(false),
params = emptyMap(),
params = emptyList(),
)
val searchText = mutableStateOf(SearchQuery.emptyText)
val currentPage = mutableStateOf(0)
Expand Down Expand Up @@ -173,7 +173,7 @@ class RegisterScreenTest {
pagesCount = 1,
progressPercentage = flowOf(0),
isSyncUpload = flowOf(false),
params = emptyMap(),
params = emptyList(),
)
val searchText = mutableStateOf(SearchQuery.emptyText)
val currentPage = mutableStateOf(0)
Expand Down Expand Up @@ -218,7 +218,7 @@ class RegisterScreenTest {
pagesCount = 1,
progressPercentage = flowOf(0),
isSyncUpload = flowOf(false),
params = emptyMap(),
params = emptyList(),
)
val searchText = mutableStateOf(SearchQuery.emptyText)
val currentPage = mutableStateOf(0)
Expand Down Expand Up @@ -263,7 +263,7 @@ class RegisterScreenTest {
pagesCount = 1,
progressPercentage = flowOf(0),
isSyncUpload = flowOf(false),
params = emptyMap(),
params = emptyList(),
)
val searchText = mutableStateOf(SearchQuery.emptyText)
val currentPage = mutableStateOf(0)
Expand Down Expand Up @@ -309,7 +309,7 @@ class RegisterScreenTest {
pagesCount = 0,
progressPercentage = flowOf(0),
isSyncUpload = flowOf(false),
params = emptyMap(),
params = emptyList(),
)
val searchText = mutableStateOf(SearchQuery.emptyText)
val currentPage = mutableStateOf(0)
Expand Down Expand Up @@ -356,7 +356,7 @@ class RegisterScreenTest {
pagesCount = 0,
progressPercentage = flowOf(0),
isSyncUpload = flowOf(false),
params = emptyMap(),
params = emptyList(),
)
val searchText = mutableStateOf(SearchQuery.emptyText)
val currentPage = mutableStateOf(0)
Expand Down Expand Up @@ -442,7 +442,7 @@ class RegisterScreenTest {
),
),
),
params = emptyMap(),
params = emptyList(),
)
val searchText = mutableStateOf(SearchQuery.emptyText)
val currentPage = mutableStateOf(0)
Expand Down Expand Up @@ -495,7 +495,7 @@ class RegisterScreenTest {
progressPercentage = flowOf(100),
isSyncUpload = flowOf(false),
currentSyncJobStatus = flowOf(CurrentSyncJobStatus.Succeeded(OffsetDateTime.now())),
params = emptyMap(),
params = emptyList(),
)
val searchText = mutableStateOf(SearchQuery.emptyText)
val currentPage = mutableStateOf(0)
Expand Down Expand Up @@ -547,7 +547,7 @@ class RegisterScreenTest {
progressPercentage = flowOf(100),
isSyncUpload = flowOf(false),
currentSyncJobStatus = flowOf(CurrentSyncJobStatus.Succeeded(OffsetDateTime.now())),
params = emptyMap(),
params = emptyList(),
)
val searchText = mutableStateOf(SearchQuery.emptyText)
val currentPage = mutableStateOf(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ fun RegisterScreenWithDataPreview() {
pagesCount = 1,
progressPercentage = flowOf(0),
isSyncUpload = flowOf(false),
params = emptyMap(),
params = emptyList(),
)
val searchText = remember { mutableStateOf(SearchQuery.emptyText) }
val currentPage = remember { mutableIntStateOf(0) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.google.android.fhir.sync.CurrentSyncJobStatus
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flowOf
import org.smartregister.fhircore.engine.configuration.register.RegisterConfiguration
import org.smartregister.fhircore.engine.domain.model.ActionParameter

data class RegisterUiState(
val screenTitle: String = "",
Expand All @@ -32,5 +33,5 @@ data class RegisterUiState(
val progressPercentage: Flow<Int> = flowOf(0),
val isSyncUpload: Flow<Boolean> = flowOf(false),
val currentSyncJobStatus: Flow<CurrentSyncJobStatus?> = flowOf(null),
val params: Map<String, String> = emptyMap(),
val params: List<ActionParameter> = emptyList(),
)
Loading
Loading