Skip to content

Commit

Permalink
Filter add LOI tasks when appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
gino-m committed Dec 15, 2023
1 parent 9405bcf commit 034c0d8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ internal constructor(
private val activeSurvey: Survey = requireNotNull(surveyRepository.activeSurvey)
private val job: Job =
activeSurvey.getJob(requireNotNull(jobId)) ?: error("couldn't retrieve job for $jobId")
// TODO: Hide add LOI task if loiId == null
// TODO: Add special instructions to add LOI task
val tasks: List<Task> = job.tasksSorted
// LOI creation task is included only on "new data collection site" flow..
val tasks: List<Task> = job.tasksSorted.filter { loiId == null || !it.isAddLoiTask }

val surveyId: String = surveyRepository.lastActiveSurveyId

Expand Down

0 comments on commit 034c0d8

Please sign in to comment.