Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
42bf253
added max planting density textfield
sunilsabatp Sep 3, 2022
22cb635
Merge branch 'develop' of https://github.com/Plant-for-the-Planet-org…
sunilsabatp Sep 14, 2022
e5645ea
Merge branch 'develop' of https://github.com/Plant-for-the-Planet-org…
sunilsabatp Sep 15, 2022
981efdf
Merge branch 'develop' of https://github.com/Plant-for-the-Planet-org…
sunilsabatp Sep 19, 2022
70dcadc
made maxPlantingDensity optional
sunilsabatp Sep 26, 2022
25b4319
Merge branch 'develop' of https://github.com/Plant-for-the-Planet-org…
sunilsabatp Sep 26, 2022
54059bc
removed inline style from detailanalysis form
sunilsabatp Sep 29, 2022
7f71fea
resolved merged conflicts
sunilsabatp Sep 29, 2022
c6ef347
fixed layout and validation for maxplanting density
sunilsabatp Oct 5, 2022
354b3fb
Merge branch 'develop' of https://github.com/Plant-for-the-Planet-org…
sunilsabatp Oct 5, 2022
e15c7aa
merged develop
sunilsabatp Oct 5, 2022
c6812a3
code factor raised error
sunilsabatp Oct 5, 2022
d0ffa0f
package-lock json
sunilsabatp Oct 5, 2022
9556e7d
downgraded @react/type
sunilsabatp Oct 5, 2022
9c8fb67
Merge branch 'develop' of https://github.com/Plant-for-the-Planet-org…
sunilsabatp Oct 6, 2022
afd9b83
Merge branch 'develop' of https://github.com/Plant-for-the-Planet-org…
sunilsabatp Oct 6, 2022
6b5b039
resolve merge conflict
sunilsabatp Oct 6, 2022
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
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ module.exports = {
1,
{ extensions: ['.js', '.jsx', '.tsx'] },
],
'react/no-unknown-property': [
2,
{
ignore: ['jsx', 'global'],
},
],
'react/jsx-indent': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
Expand Down
3,476 changes: 1,844 additions & 1,632 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"@storybook/testing-library": "^0.0.11",
"@types/d3-ease": "^1.0.9",
"@types/node": "^14.0.26",
"@types/react": "^18.0.1",
"@types/react": "^16.9.43",
"@types/react-map-gl": "^5.2.7",
"@types/styled-jsx": "^2.2.8",
"@types/uuid": "^8.3.0",
Expand Down
3 changes: 3 additions & 0 deletions public/static/locales/en/manageProjects.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"yearOfAbandonment": "Approx. year of Abandonment",
"firstTreePlanted": "First tree planted",
"plantingDensity": "Planting Density",
"maxPlantingDensity": "Max Planting Density (optional)",
"employeeCount": "Employee Count",
"endangeredSpeciesValidation": "Not a Valid Input",
"endangeredSpecies": "Endangered Species",
Expand Down Expand Up @@ -186,9 +187,11 @@
"validation": "{{fieldName}} is Invalid",
"date": "Date",
"plantingDensityValidation": "Please enter Planting Density",
"maxPlantingDensityValidation": "please enter Maximum Planting Density",
"onlyEnglish": "Please create/edit projects in English only. Translations of Projects are managed automatically by Plant-for-the-Planet.",
"since": "since",
"Since": "Since",
"and": "and",
"errorForMaxPlantingDensity": "This value should be greater than planting density",
"managePayoutsButton": "Manage Payouts"
}
13 changes: 12 additions & 1 deletion src/features/projects/components/projectDetails/ProjectInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,18 @@ function ProjectInfo({ project }: Props): ReactElement {
{t('manageProjects:plantingDensity')}
</div>
<div className={styles.infoText}>
{project.plantingDensity} {t('manageProjects:treePerHa')}
{project.plantingDensity}
{project?.metadata?.maxPlantingDensity ? (
<div className={styles.infoTextMaxDensity}>
{'-'}
<div>{project?.metadata?.maxPlantingDensity}</div>
<h4>{t('manageProjects:treePerHa')}</h4>
</div>
) : (
<div style={{ paddingRight: '68px' }}>
{t('manageProjects:treePerHa')}
</div>
)}{' '}
</div>
</div>
)}
Expand Down
17 changes: 15 additions & 2 deletions src/features/projects/styles/ProjectDetails.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
/* Additional Information */

.projectMoreInfoHalfContainer {
width: 100%;
width: 340px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
Expand Down Expand Up @@ -179,10 +179,23 @@
font-size: $fontSmall;
color: $primaryFontColor;
display: flex;
flex-direction: row;
flex-direction:row;
justify-content: space-between;
}

.infoTextMaxDensity {
padding-right: 51px;
display:flex;
flex-direction: row;
>div{
margin-left: 1px;
}
>h4 {
width: 104px;
margin-left: 4px;
}
}

.infoTextButton {
color: $primaryColor;
}
Expand Down
75 changes: 74 additions & 1 deletion src/features/user/ManageProjects/StepForm.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,50 @@
}
}

.inputEndAdornment {
margin-left: 4px;
width: 100%;
text-align: right;
font-size: 14px;
}

.hyphen {
font-size: 40px;
margin-top: 16px;
@include xsPhoneView {
writing-mode: vertical-rl;
margin-top: 0;
margin-bottom: -19px;
margin-right: 126px;
}
@include smTabletView {
writing-mode: vertical-rl;
margin-top: 0;
margin-bottom: -19px;
margin-right: 126px;
}
@include mdTabletView {
writing-mode: horizontal-tb;
margin-top: 14px;
margin-bottom: 0;
margin-right: 0;
}

}
.density {
display: flex;
@include xsPhoneView {
flex-direction: column;
}
@include smTabletView {
flex-direction: column;
}
@include mdTabletView {
flex-direction: row;
}

}

.reviewContent {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -75,7 +119,8 @@
max-width: 320px;
justify-content: space-between;
align-items: center;
}
}


.skipBasicButton {
width: 89px;
Expand All @@ -87,6 +132,17 @@
}
}

.skipDetailAnalysis {
width: 89px;
margin-right: 45px;
}

.saveAndContinueDetailAnalysis {
width:169px;
height: 46px;
margin-right: 20px;
}

.reviewButtons {
display: flex;
margin-top: 30px;
Expand Down Expand Up @@ -139,6 +195,10 @@
max-width: 320px;
min-width: 320px;
}

.formFieldFix {
position: relative;
}
.latitudeInput {
width: fit-content !important;
div {
Expand Down Expand Up @@ -711,6 +771,7 @@
text-align: center;
border: 2px solid $primaryColor;
display: none;
left: -290px
}
&:hover,
&:active {
Expand All @@ -721,6 +782,18 @@
}
}

.infoIconDiv {
position: absolute;
top: -9px;
right: -292px;
width:fit-content
}

.causeOfDegradation {
position: absolute;
right: 13px;
}

// white modal
.modal {
background-color: $backgroundColor;
Expand Down
Loading