From adb50214ba7085402d1eeec14947914ebcfecfdb Mon Sep 17 00:00:00 2001 From: AngelaZQ1 Date: Thu, 8 Feb 2024 17:31:51 -0500 Subject: [PATCH] use nupath display name --- .../components/Sidebar/NUPathSection.tsx | 66 +++++++++++-------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/packages/frontend/components/Sidebar/NUPathSection.tsx b/packages/frontend/components/Sidebar/NUPathSection.tsx index 06002fe49..6b939ad52 100644 --- a/packages/frontend/components/Sidebar/NUPathSection.tsx +++ b/packages/frontend/components/Sidebar/NUPathSection.tsx @@ -15,21 +15,24 @@ interface NUPathSectionProps { dndIdPrefix: string; loading?: boolean; } - -const nupathAbbreviations: [nupath: string, abbreviation: string][] = [ - [NUPathEnum.ND, "ND"], - [NUPathEnum.EI, "EI"], - [NUPathEnum.IC, "IC"], - [NUPathEnum.FQ, "FQ"], - [NUPathEnum.SI, "SI"], - [NUPathEnum.AD, "AD"], - [NUPathEnum.DD, "DD"], - [NUPathEnum.ER, "ER"], - [NUPathEnum.WF, "WF"], - [NUPathEnum.WD, "WD"], - [NUPathEnum.WI, "WI"], - [NUPathEnum.EX, "EX"], - [NUPathEnum.CE, "CE"], +const nuPathDisplayAndAbbr: [ + nupath: string, + displayName: string, + abbreviation: string +][] = [ + [NUPathEnum.ND, "Natural and Designed World", "ND"], + [NUPathEnum.EI, "Creative Expression/Innovation", "EI"], + [NUPathEnum.IC, "Interpreting Culture", "IC"], + [NUPathEnum.FQ, "Formal and Quantitative Reasoning", "FQ"], + [NUPathEnum.SI, "Societies and Institutions", "SI"], + [NUPathEnum.AD, "Analyzing/Using Data", "AD"], + [NUPathEnum.DD, "Difference and Diversity", "DD"], + [NUPathEnum.ER, "Ethical Reasoning", "ER"], + [NUPathEnum.WF, "First Year Writing", "WF"], + [NUPathEnum.WD, "Advanced Writing in the Disciplines", "WD"], + [NUPathEnum.WI, "Writing Intensive", "WI"], + [NUPathEnum.EX, "Integration Experience", "EX"], + [NUPathEnum.CE, "Capstone Experience", "CE"], ]; const grey = "neutral.400"; const green = "states.success.main"; @@ -191,17 +194,20 @@ const NUPathSection: React.FC = ({ Complete the following NUpath requirements. <> - {nupathAbbreviations.map(([nupath, abbreviation], idx) => { - const numTaken = nupathMap[nupath] || 0; - return ( - - ); - })} + {nuPathDisplayAndAbbr.map( + ([nupath, displayName, abbreviation], idx) => { + const numTaken = nupathMap[nupath] || 0; + return ( + + ); + } + )} )} @@ -211,14 +217,16 @@ const NUPathSection: React.FC = ({ }; interface NUPathRequirementProps { - abbreviation: string; nupath: string; + abbreviation: string; + displayName: string; numTaken: number; } const NUPathRequirement: React.FC = ({ - abbreviation, nupath, + abbreviation, + displayName, numTaken, }) => { const isWI = nupath === NUPathEnum.WI; @@ -264,7 +272,7 @@ const NUPathRequirement: React.FC = ({ {abbreviation} - {nupath} + {displayName} {isWI && }