diff --git a/frontend/src/Commons/Forms/InputModules/CalculateNutrients/CalculateNutrientsList.styles.ts b/frontend/src/Commons/Forms/InputModules/CalculateNutrients/CalculateNutrientsList.styles.ts index de49d36c..4d7da4c0 100644 --- a/frontend/src/Commons/Forms/InputModules/CalculateNutrients/CalculateNutrientsList.styles.ts +++ b/frontend/src/Commons/Forms/InputModules/CalculateNutrients/CalculateNutrientsList.styles.ts @@ -150,7 +150,7 @@ const StyledPBalance = styled.div` } @media (min-width: ${screenSizes.desktop}) { - gap: 24px; + gap: 20px; p { font: ${tokens.typographyRegularBody}; } @@ -158,11 +158,12 @@ const StyledPBalance = styled.div` `; const FontAwesomeContainer = styled.div` - font-size: 18px; + font-size: 16px; margin-left: -28px; @media (min-width: ${screenSizes.desktop}) { - margin-left: -40px; + font-size: 24px; + margin-left: -45px; } `; export { diff --git a/frontend/src/Commons/Forms/InputModules/Crops/CropsInfo.tsx b/frontend/src/Commons/Forms/InputModules/Crops/CropsInfo.tsx index 9388419e..973d8917 100644 --- a/frontend/src/Commons/Forms/InputModules/Crops/CropsInfo.tsx +++ b/frontend/src/Commons/Forms/InputModules/Crops/CropsInfo.tsx @@ -109,7 +109,11 @@ const CropsInfoComponent: FC = ({ distanceBtwnPlants: BlueberrySchemaString('cropId'), distanceBtwnRows: BlueberrySchemaString('cropId'), willPlantsBePruned: Yup.boolean().required('Required'), - whereWillPruningsGo: Yup.string().required('Required'), + whereWillPruningsGo: Yup.string().when('willPlantsBePruned', { + is: true, + then: (schema) => schema.required('Required'), + otherwise: (schema) => schema.notRequired(), + }), willSawdustBeApplied: Yup.boolean().required('Required'), }); @@ -297,18 +301,22 @@ const CropsInfoComponent: FC = ({ mobileWidth="137px" onChange={(e) => { handleChange(e, setFieldValue); + console.log(e.target.name, e.target.value); }} /> - - handleChange(e, setFieldValue)} - /> + {((values.willPlantsBePruned && + values.willPlantsBePruned.toString().includes('true')) || + values.willPlantsBePruned === undefined) && ( + handleChange(e, setFieldValue)} + /> + )}