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

fix error message of donation for conservation form #1492

Merged
merged 1 commit into from
Jun 1, 2022
Merged
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
1 change: 1 addition & 0 deletions public/static/locales/en/manageProjects.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"treeCostValidaitonRequired": "Please enter cost per tree",
"treeCostValidationInvalid": "Please enter valid cost per tree",
"treeCostValidation": "Cost per tree should be more than €0 or lesser than €100",
"conservationCostValidation": "Cost per m2 should be more than €0 or lesser than €100",
"projectLocation": "Project Location",
"visitorAssistanceLabel": "I will provide lodging, site access and local transport if a reviewer is sent by Plant-for-the-Planet.",
"publishProject": "Publish Project",
Expand Down
7 changes: 6 additions & 1 deletion src/features/user/ManageProjects/components/BasicDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,12 @@ export default function BasicDetails({
<span className={styles.formErrors}>
{errors.unitCost.message
? errors.unitCost.message
: t('manageProjects:treeCostValidation')}
: t(
router.query.purpose === 'trees' ||
projectDetails.purpose === 'trees'
? 'manageProjects:treeCostValidation'
: 'manageProjects:conservationCostValidation'
)}
</span>
)}
</div>
Expand Down