Skip to content

Commit

Permalink
Merge pull request #105 from rcpch/cdc
Browse files Browse the repository at this point in the history
add cdc
  • Loading branch information
eatyourpeas authored Oct 21, 2024
2 parents 72e5c46 + 985949b commit 08b8602
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 93 deletions.
166 changes: 83 additions & 83 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rcpchgrowth-react",
"version": "6.0.0",
"version": "6.1.0",
"private": false,
"license": "MIT",
"repository": {
Expand All @@ -23,7 +23,7 @@
"semantic-ui-css": "2.5.0",
"semantic-ui-react": "3.0.0-beta.2",
"styled-components": "6.1.12",
"@rcpch/digital-growth-charts-react-component-library": "7.0.11"
"@rcpch/digital-growth-charts": "6.1.0"
},
"devDependencies": {
"@eslint/js": "^9.8.0",
Expand Down
3 changes: 1 addition & 2 deletions src/components/FictionalChildForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ const FictionalChildForm = (props) => {
maternalHeight: event.target[0].value,
paternalHeight: event.target[1].value,
});
console.log(props);
props.handleUtilitiesFormDataSubmit(formData);
};

Expand Down Expand Up @@ -364,7 +363,7 @@ const FictionalChildForm = (props) => {
)}
</Form>

{props.globalState.reference === "uk-who" && (
{(props.globalState.reference === "uk-who" || props.globalState.reference === "cdc") && (
<UtilitiesForm
utilitiesFormDataSubmit={handleUtilitiesDataSubmit}
changeMaternalHeight={handleMaternalHeight}
Expand Down
7 changes: 4 additions & 3 deletions src/components/MeasurementForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const MeasurementForm = (props) => {
const [showEvents, setShowEvents] = useState(false);

const handleChangeReference = ({ value }) => {
if (value !== "uk-who") {
props.updateGlobalState("mid-parental-height", "reset"); //midparental height on present on UK-WHO reference
if (value !== "uk-who" && value !== "cdc") {
props.updateGlobalState("mid-parental-height", "reset"); //midparental height only present on UK-WHO and CDC reference
}
props.updateGlobalState("reference", value);
};
Expand Down Expand Up @@ -329,6 +329,7 @@ const MeasurementForm = (props) => {
height_maternal: event.target[0].value,
height_paternal: event.target[1].value,
sex: props.globalState["sex"],
reference: props.globalState["reference"],
};
props.updateGlobalState("isMidParentalHeightRequest", true);
props.updateGlobalState("parentalHeights", {
Expand Down Expand Up @@ -588,7 +589,7 @@ const MeasurementForm = (props) => {
</Segment>
)}

{props.globalState.reference === "uk-who" && (
{(props.globalState.reference === "uk-who" || props.globalState.reference === "cdc") && (
<UtilitiesForm
utilitiesFormDataSubmit={handleUtilitiesDataSubmit}
changeMaternalHeight={handleMaternalHeight}
Expand Down
Loading

0 comments on commit 08b8602

Please sign in to comment.