Skip to content

Commit

Permalink
Add custom search param for Flag status field (#3416)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rkareko authored Jul 26, 2024
1 parent 131d2ac commit ac6694d
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ interface ConfigService {
/**
* Provide a list of custom search parameters.
*
* @return list of predefined custom group search parameters.
* @return list of predefined custom search parameters.
*/
fun provideCustomSearchParameters(): List<SearchParameter> {
val activeGroupSearchParameter =
Expand All @@ -87,11 +87,23 @@ interface ConfigService {
description = "Search the active field"
}

return listOf(activeGroupSearchParameter)
val flagStatusSearchParameter =
SearchParameter().apply {
url = "http://smartregister.org/SearchParameter/flag-status"
addBase("Flag")
name = STATUS_SEARCH_PARAM
code = STATUS_SEARCH_PARAM
type = Enumerations.SearchParamType.TOKEN
expression = "Flag.status"
description = "Search the status field"
}

return listOf(activeGroupSearchParameter, flagStatusSearchParameter)
}

companion object {
const val ACTIVE_SEARCH_PARAM = "active"
const val APP_VERSION = "AppVersion"
const val STATUS_SEARCH_PARAM = "status"
}
}

0 comments on commit ac6694d

Please sign in to comment.