Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use children and caregivers information in review form #204

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading