Skip to content

Commit

Permalink
fix(migration-trackedentity): change followupStatus to followup
Browse files Browse the repository at this point in the history
and ensure that the parameter is not selected if ALL is chosen
  • Loading branch information
kabaros committed Mar 5, 2024
1 parent ce2235d commit 9105ff3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/components/Inputs/FollowUpStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { RadioGroupField } from '../index.js'

const followUpStatusOptions = [
{ value: 'ALL', label: i18n.t('All') },
{ value: 'TRUE', label: i18n.t('Marked for follow-up') },
{ value: 'FALSE', label: i18n.t('Not marked for follow-up') },
{ value: 'true', label: i18n.t('Marked for follow-up') },
{ value: 'false', label: i18n.t('Not marked for follow-up') },
]
const defaultFollowUpStatusOption = followUpStatusOptions[0].value

const NAME = 'followUpStatus'
const NAME = 'followup'
const DATATEST = 'input-follow-up-status'
const LABEL = i18n.t('Include only entities with follow-up status')

Expand Down
2 changes: 1 addition & 1 deletion src/pages/TEIExport/TEIExport.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const initialValues = {
inclusion: defaultInclusionOption,
teiTypeFilter: defaultTEITypeFilterOption,
programStatus: defaultProgramStatusOption,
followUpStatus: defaultFollowUpStatusOption,
followup: defaultFollowUpStatusOption,
enrollmentEnrolledAfter: '',
enrollmentEnrolledBefore: '',
compression: '', // disable compression until it is properly implemented in the backend
Expand Down
8 changes: 6 additions & 2 deletions src/pages/TEIExport/form-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const valuesToParams = (
assignedUserMode,
teiTypeFilter,
programStatus,
followUpStatus,
followup,
enrollmentEnrolledAfter,
enrollmentEnrolledBefore,
lastUpdatedFilter,
Expand Down Expand Up @@ -70,7 +70,11 @@ const valuesToParams = (
minParams.programStatus = programStatus
}

minParams.followUpStatus = followUpStatus
console.log('>>>>>', followup, minParams.followup)

if(followup !== 'ALL') {
minParams.followup = followup
}

if (enrollmentEnrolledAfter) {
minParams.enrollmentEnrolledAfter = enrollmentEnrolledAfter
Expand Down

0 comments on commit 9105ff3

Please sign in to comment.