Skip to content

Commit

Permalink
use children and caregivers information in review form
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenzhu1 committed Aug 28, 2023
1 parent 25c20e7 commit 153e6df
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
17 changes: 10 additions & 7 deletions frontend/src/components/intake/IndividualDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React from "react";
import { Button, VStack, Text, HStack, Icon, Divider } from "@chakra-ui/react";
import { ArrowRight } from "react-feather";
import { IndividualDetailsOverview } from "./PromptBox";
import { Children } from "./child-information/AddChildPage";
import { Caregivers } from "./NewCaregiverModal";

type IndividualDetailsProps = {
childrenDetails: IndividualDetailsOverview[];
caregiverDetails: IndividualDetailsOverview[];
childrenDetails: Children;
caregiverDetails: Caregivers;
};

const IndividualDetails = ({
Expand All @@ -29,10 +30,12 @@ const IndividualDetails = ({
<HStack w="full">
<VStack align="flex-start" w="full" spacing="0px">
<HStack>
<Text textStyle="title-small">{indiv.name}</Text>
<Text textStyle="title-small">
{indiv.childDetails.childName}
</Text>
</HStack>
<Text color="gray.600" textStyle="body-medium">
{indiv.fileNumber}
{indiv.childDetails.cpinFileNumber}
</Text>
</VStack>
<Button
Expand Down Expand Up @@ -66,10 +69,10 @@ const IndividualDetails = ({
<HStack w="full">
<VStack align="flex-start" w="full" spacing="0px">
<HStack>
<Text textStyle="title-small">{indiv.name}</Text>
<Text textStyle="title-small">{indiv.caregiverName}</Text>
</HStack>
<Text color="gray.600" textStyle="body-medium">
{indiv.fileNumber}
{indiv.relationship}
</Text>
</VStack>
<Button
Expand Down
11 changes: 10 additions & 1 deletion frontend/src/components/intake/ReviewCaseForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import CourtInformationForm, { CourtDetails } from "./CourtInformationForm";
import ProgramForm, { ProgramDetails } from "./ProgramForm";
import IntakeSteps from "./intakeSteps";
import IntakeFooter from "./IntakeFormFooter";
import { Children } from "./child-information/AddChildPage";
import { Caregivers } from "./NewCaregiverModal";

type ReviewFormProps = {
referralDetails: ReferralDetails;
Expand All @@ -20,6 +22,8 @@ type ReviewFormProps = {
setReviewHeader: React.Dispatch<React.SetStateAction<boolean>>;
isReviewOnly: boolean;
setIsReviewOnly: React.Dispatch<React.SetStateAction<boolean>>;
childrens: Children;
caregivers: Caregivers;
};

const ReviewForm = ({
Expand All @@ -34,6 +38,8 @@ const ReviewForm = ({
setReviewHeader,
isReviewOnly,
setIsReviewOnly,
childrens,
caregivers,
}: ReviewFormProps): React.ReactElement => {
const onNextStep = () => {
nextStep(); // TODO: Add functionality for nextStep (Currently we pass in empty nextStep() prop)
Expand Down Expand Up @@ -101,7 +107,10 @@ const ReviewForm = ({
</Text>
{editSectionButton(IntakeSteps.INDIVIDUAL_DETAILS)};
</HStack>
<IndividualDetails childrenDetails={[]} caregiverDetails={[]} />
<IndividualDetails
childrenDetails={childrens}
caregiverDetails={caregivers}
/>
</Stack>

<Stack padding="32px" spacing="16px">
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/pages/IntakePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ const Intake = (): React.ReactElement => {
setReviewHeader={setReviewHeader}
isReviewOnly={isReviewOnly}
setIsReviewOnly={setIsReviewOnly}
childrens={children}
caregivers={caregivers}
/>
</Box>
);
Expand Down

0 comments on commit 153e6df

Please sign in to comment.