From bdbb8ea58ab307b18f0048119374a29290b8ecc3 Mon Sep 17 00:00:00 2001 From: smohyud1 Date: Wed, 17 Apr 2024 18:34:40 -0400 Subject: [PATCH 1/2] Add ApplicantListItem component to display applicant information in a table --- .../components/ApplicantListItem/index.tsx | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 apps/applicant-tracking/src/components/ApplicantListItem/index.tsx diff --git a/apps/applicant-tracking/src/components/ApplicantListItem/index.tsx b/apps/applicant-tracking/src/components/ApplicantListItem/index.tsx new file mode 100644 index 0000000..46f8e0e --- /dev/null +++ b/apps/applicant-tracking/src/components/ApplicantListItem/index.tsx @@ -0,0 +1,31 @@ +import { ApplicantResponse } from '@hack4impact-utk/internal-models'; +import { Chip, TableCell, TableRow } from '@mui/material'; +import LaunchIcon from '@mui/icons-material/Launch'; +import Button from '@mui/material/Button'; + +//Each row should display the applicant name (first and last), status, NetID and application +export default function ApplicantListItem(applicant: ApplicantResponse) { + return ( + + + {applicant.firstName} {applicant.lastName} + + + + + + {applicant.netid} + + + + + + ); +} From 0d282a8f014ca244dc4675fe3c72d626400b7e87 Mon Sep 17 00:00:00 2001 From: smohyud1 Date: Fri, 19 Apr 2024 01:17:41 -0400 Subject: [PATCH 2/2] Refactor ApplicantListItem component to use props instead of direct parameter access and fixed styling --- .../components/ApplicantListItem/index.tsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/applicant-tracking/src/components/ApplicantListItem/index.tsx b/apps/applicant-tracking/src/components/ApplicantListItem/index.tsx index 46f8e0e..8c57ea3 100644 --- a/apps/applicant-tracking/src/components/ApplicantListItem/index.tsx +++ b/apps/applicant-tracking/src/components/ApplicantListItem/index.tsx @@ -2,28 +2,28 @@ import { ApplicantResponse } from '@hack4impact-utk/internal-models'; import { Chip, TableCell, TableRow } from '@mui/material'; import LaunchIcon from '@mui/icons-material/Launch'; import Button from '@mui/material/Button'; - +interface ApplicantListItemProps { + applicant: ApplicantResponse; +} //Each row should display the applicant name (first and last), status, NetID and application -export default function ApplicantListItem(applicant: ApplicantResponse) { +export default function ApplicantListItem(props: ApplicantListItemProps) { return ( - - {applicant.firstName} {applicant.lastName} - - - + + {props.applicant.firstName} {props.applicant.lastName} - - {applicant.netid} + + - + {props.applicant.netid} +