diff --git a/client/src/components/ProjectWizard/RuleInput/ParkingProvidedRuleInput.jsx b/client/src/components/ProjectWizard/RuleInput/ParkingProvidedRuleInput.jsx index 1739f74f..611e4411 100644 --- a/client/src/components/ProjectWizard/RuleInput/ParkingProvidedRuleInput.jsx +++ b/client/src/components/ProjectWizard/RuleInput/ParkingProvidedRuleInput.jsx @@ -3,16 +3,19 @@ import PropTypes from "prop-types"; import { createUseStyles } from "react-jss"; import clsx from "clsx"; import debounce from "lodash/debounce"; +import ResetButtons from "../WizardPages/ResetButtons"; const useStyles = createUseStyles(theme => ({ parkingProvidedWrapper: { display: "flex", flexDirection: "column", alignItems: "center", - margin: "2em" + margin: "2em", + marginTop: "1em" }, label: { - ...theme.typography.heading2 + ...theme.typography.heading2, + marginTop: "1em" }, requiredInputLabel: { "&:after": { @@ -42,7 +45,7 @@ const useStyles = createUseStyles(theme => ({ } })); -const ParkingProvidedRuleInput = ({ rule, onInputChange }) => { +const ParkingProvidedRuleInput = ({ rule, onInputChange, resetProject }) => { const { code, name, value, units, maxValue, validationErrors, required } = rule; const classes = useStyles(); @@ -61,12 +64,25 @@ const ParkingProvidedRuleInput = ({ rule, onInputChange }) => { onDebounceInputChange(e); }; + const handleClear = e => { + setShowValidationErrors(true); + setSpacesProvided(""); + onDebounceInputChange(e); + }; + const onBlur = () => { setShowValidationErrors(true); }; return (
+
+ +
@@ -103,7 +119,8 @@ ParkingProvidedRuleInput.propTypes = { validationErrors: PropTypes.array, required: PropTypes.bool.isRequired }).isRequired, - onInputChange: PropTypes.func.isRequired + onInputChange: PropTypes.func.isRequired, + resetProject: PropTypes.func.isRequired }; export default ParkingProvidedRuleInput; diff --git a/client/src/components/ProjectWizard/WizardPages/ProjectTargetPoints.jsx b/client/src/components/ProjectWizard/WizardPages/ProjectTargetPoints.jsx index 64e5f6c0..cb9df8f6 100644 --- a/client/src/components/ProjectWizard/WizardPages/ProjectTargetPoints.jsx +++ b/client/src/components/ProjectWizard/WizardPages/ProjectTargetPoints.jsx @@ -4,7 +4,6 @@ import { createUseStyles, useTheme } from "react-jss"; import RuleCalculationPanels from "../RuleCalculation/RuleCalculationPanels"; import Level0Page from "./Level0Page"; import ParkingProvidedRuleInput from "../RuleInput/ParkingProvidedRuleInput"; -import ResetButtons from "./ResetButtons"; const useStyles = createUseStyles(theme => ({ projectBox: { @@ -56,7 +55,6 @@ function ProjectTargetPoints(props) { onInputChange, isLevel0, onParkingProvidedChange, - uncheckAll, resetProject } = props; const projectLevel = rules.find(e => e.code === "LEVEL"); @@ -69,11 +67,7 @@ function ProjectTargetPoints(props) { return ( <> - + {projectLevel && projectLevel.calcValue > 0 && (
@@ -86,20 +80,13 @@ function ProjectTargetPoints(props) { entered below.
-
- -
{parkingProvidedRuleOnly && ( )} -

Your project level @@ -129,7 +116,6 @@ ProjectTargetPoints.propTypes = { onInputChange: PropTypes.func.isRequired, onParkingProvidedChange: PropTypes.func.isRequired, isLevel0: PropTypes.bool.isRequired, - uncheckAll: PropTypes.func.isRequired, resetProject: PropTypes.func.isRequired }; diff --git a/client/src/components/ProjectWizard/WizardPages/ResetButtons.jsx b/client/src/components/ProjectWizard/WizardPages/ResetButtons.jsx index bf492ff9..0fd4aa44 100644 --- a/client/src/components/ProjectWizard/WizardPages/ResetButtons.jsx +++ b/client/src/components/ProjectWizard/WizardPages/ResetButtons.jsx @@ -38,15 +38,17 @@ const ResetButtons = props => { > Reset Project - + {uncheckAll && ( + + )}

); }; ResetButtons.propTypes = { - uncheckAll: PropTypes.func.isRequired, + uncheckAll: PropTypes.func, resetProject: PropTypes.func.isRequired }; diff --git a/client/src/components/ToolTip/AccordionToolTip.jsx b/client/src/components/ToolTip/AccordionToolTip.jsx index 283505ac..13313466 100644 --- a/client/src/components/ToolTip/AccordionToolTip.jsx +++ b/client/src/components/ToolTip/AccordionToolTip.jsx @@ -66,7 +66,6 @@ const AccordionToolTip = ({
- {disabledStyle ? (