Skip to content

Commit

Permalink
error with 'start date' - "cannot have survey start date before proje…
Browse files Browse the repository at this point in the history
…ct start date' (#429)

* update messaging

* build
  • Loading branch information
sdevalapurkar authored Jul 22, 2021
1 parent bbb092e commit fc6c000
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/src/features/observations/BlockObservationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ const BlockObservationPage = () => {

const dateHelperText = surveyWithDetails.survey_details.end_date
? `Observation date must be between ${formattedSurveyStartDate} and ${formattedSurveyEndDate}.`
: `Observation date must be after ${formattedSurveyStartDate}.`;
: `Observation date must be on or after ${formattedSurveyStartDate}.`;

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ exports[`CreateSurveyPage renders correctly when codes and project data are load
class="MuiFormHelperText-root MuiFormHelperText-contained Mui-required"
id="start_date-helper-text"
>
Start date must be after project start date Oct 10, 1998
Start date must be on or after project start date Oct 10, 1998
</p>
</div>
</div>
Expand Down Expand Up @@ -275,7 +275,7 @@ exports[`CreateSurveyPage renders correctly when codes and project data are load
class="MuiFormHelperText-root MuiFormHelperText-contained"
id="end_date-helper-text"
>
End date must be before project end date Feb 26, 2021
End date must be on or before project end date Feb 26, 2021
</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ const GeneralInformationForm: React.FC<IGeneralInformationFormProps> = (props) =
formikProps={formikProps}
startRequired={true}
endRequired={false}
startDateHelperText={`Start date must be after project start date ${getFormattedDate(
startDateHelperText={`Start date must be on or after project start date ${getFormattedDate(
DATE_FORMAT.ShortMediumDateFormat,
props.projectStartDate
)}`}
endDateHelperText={
props.projectEndDate &&
`End date must be before project end date ${getFormattedDate(
`End date must be on or before project end date ${getFormattedDate(
DATE_FORMAT.ShortMediumDateFormat,
props.projectEndDate
)}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ exports[`General Information Form renders correctly the empty component correctl
class="MuiFormHelperText-root MuiFormHelperText-contained Mui-required"
id="start_date-helper-text"
>
Start date must be after project start date Oct 10, 1998
Start date must be on or after project start date Oct 10, 1998
</p>
</div>
</div>
Expand Down Expand Up @@ -159,7 +159,7 @@ exports[`General Information Form renders correctly the empty component correctl
class="MuiFormHelperText-root MuiFormHelperText-contained"
id="end_date-helper-text"
>
End date must be before project end date Feb 26, 2021
End date must be on or before project end date Feb 26, 2021
</p>
</div>
</div>
Expand Down Expand Up @@ -924,7 +924,7 @@ exports[`General Information Form renders correctly the filled component correct
class="MuiFormHelperText-root MuiFormHelperText-contained Mui-required"
id="start_date-helper-text"
>
Start date must be after project start date Oct 10, 1998
Start date must be on or after project start date Oct 10, 1998
</p>
</div>
</div>
Expand Down Expand Up @@ -974,7 +974,7 @@ exports[`General Information Form renders correctly the filled component correct
class="MuiFormHelperText-root MuiFormHelperText-contained"
id="end_date-helper-text"
>
End date must be before project end date Feb 26, 2021
End date must be on or before project end date Feb 26, 2021
</p>
</div>
</div>
Expand Down

0 comments on commit fc6c000

Please sign in to comment.