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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -172,7 +172,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 @@ -216,7 +216,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 @@ -260,7 +260,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 @@ -305,7 +305,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 @@ -351,7 +351,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 @@ -436,7 +436,7 @@ class RegisterScreenTest {
),
),
),
params = emptyMap(),
params = emptyList(),
)
val searchText = mutableStateOf(SearchQuery.emptyText)
val currentPage = mutableStateOf(0)
Expand Down Expand Up @@ -488,7 +488,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 @@ -539,7 +539,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 @@ -292,7 +292,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