Skip to content

Commit

Permalink
Merge branch 'user-dashboard' of https://github.com/uwblueprint/feedi…
Browse files Browse the repository at this point in the history
…ng-canadian-kids into user-dashboard
  • Loading branch information
hannahxdu committed Aug 1, 2023
2 parents a4e50c4 + 2e58f8b commit e3a9665
Showing 1 changed file with 124 additions and 35 deletions.
159 changes: 124 additions & 35 deletions frontend/src/components/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { CalendarIcon, ChevronDownIcon, HamburgerIcon } from "@chakra-ui/icons";

Check failure on line 1 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

'/home/runner/work/feeding-canadian-kids/feeding-canadian-kids/frontend/node_modules/@chakra-ui/icons/dist/index.mjs' imported multiple times
import { AtSignIcon, EmailIcon, InfoIcon } from "@chakra-ui/icons";

Check failure on line 2 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

'/home/runner/work/feeding-canadian-kids/feeding-canadian-kids/frontend/node_modules/@chakra-ui/icons/dist/index.mjs' imported multiple times
import {
Accordion,
AccordionItem,

Check warning on line 5 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

'AccordionItem' is defined but never used

Check warning on line 5 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

Replace `Item` with `Button`
AccordionButton,

Check failure on line 6 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

Member 'AccordionButton' of the import declaration should be sorted alphabetically

Check warning on line 6 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

Replace `Butt` with `Ic`
AccordionPanel,

Check warning on line 7 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

'AccordionPanel' is defined but never used

Check warning on line 7 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

Replace `Panel` with `Item`
AccordionIcon,

Check warning on line 8 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

Replace `Icon` with `Panel`
Box,
Button,
Card,
CardBody,
CardFooter,

Check warning on line 13 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

'CardFooter' is defined but never used
CardHeader,

Check warning on line 14 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

'CardHeader' is defined but never used
Flex,
List,

Check warning on line 16 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

'List' is defined but never used
ListItem,

Check warning on line 17 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

'ListItem' is defined but never used
Stack,
Tab,
TabList,
Expand Down Expand Up @@ -97,6 +104,12 @@ function App() {
MealRequest | undefined
>(undefined);

const listData = [
{ title: 'Item 1', content: 'Content for Item 1' },
{ title: 'Item 2', content: 'Content for Item 2' },
{ title: 'Item 3', content: 'Content for Item 3' },
];

return (
<Box
marginLeft={["20px", "20px", "150px", "150px"]}
Expand Down Expand Up @@ -131,7 +144,7 @@ function App() {
>
<Button
colorScheme="green"
fontSize={["12px", "14px", "14px", "14px"]}
fontSize={["12px", "16px", "16px", "16px"]}
width={["100%", "100%", "100%", "auto"]}
mt={"10px"}

Check failure on line 149 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

Curly braces are unnecessary here
mb={"20px"}

Check failure on line 150 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

Curly braces are unnecessary here
Expand Down Expand Up @@ -249,50 +262,126 @@ function App() {
</TabPanel>

<TabPanel>
{/* ORIGINAL TABLE *********************************** */}
<TableContainer>
<Table style={{ fontFamily: "Inter" }}>
<Thead style={{ fontSize: "18px" }}>
{/* should abstract the rows into a react component */}
<Thead style={{ fontSize: '18px' }}>
<Tr>
<Th style={{ fontFamily: "Inter" }}>Date Requested</Th>
<Th style={{ fontFamily: "Inter" }}>Time Requested</Th>
<Th style={{ fontFamily: "Inter" }}>Donor's Name</Th>
<Th style={{ fontFamily: "Inter" }}>Number of Meals</Th>
<Th style={{ fontFamily: 'Inter' }}>Date Requested</Th>
<Th style={{ fontFamily: 'Inter' }}>Time Requested</Th>
<Th style={{ fontFamily: 'Inter' }}>Donor's Name</Th>

Check failure on line 272 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

`'` can be escaped with `&apos;`, `&lsquo;`, `&#39;`, `&rsquo;`
<Th style={{ fontFamily: 'Inter' }}>Number of Meals</Th>
<Th></Th>

Check failure on line 274 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

Empty components are self-closing
</Tr>
</Thead>

<Tbody style={{ fontSize: "16px" }}>
<Tr>
<Td>Oct 27, 2022</Td>
<Td>5:00-6:00 PM</Td>
<Td>Harvey's</Td>
<Td>5</Td>
<Td>
<ChevronDownIcon boxSize={6} />
</Td>
</Tr>
<Tr>
<Td>Oct 27, 2022</Td>
<Td>5:00-6:00 PM</Td>
<Td>Harvey's</Td>
<Td>5</Td>
<Td>
<ChevronDownIcon boxSize={6} />
</Td>
</Tr>
<Tr>
<Td>Oct 27, 2022</Td>
<Td>5:00-6:00 PM</Td>
<Td>Harvey's</Td>
<Td>5</Td>
<Td>
<ChevronDownIcon boxSize={6} />
</Td>
</Tr>
<Tbody style={{ fontSize: '16px' }}>
<Accordion defaultIndex={[0]} allowMultiple>
<Tr>
<AccordionButton>
<Box as="span" flex='1' textAlign='left'>
<Td>Oct 27, 2022</Td>
<Td>5:00-6:00 PM</Td>
<Td>Harvey's</Td>

Check failure on line 285 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

`'` can be escaped with `&apos;`, `&lsquo;`, `&#39;`, `&rsquo;`
<Td>5</Td>
<Td>
<ChevronDownIcon boxSize={6} />
</Td>
</Box>
<AccordionIcon />
</AccordionButton>
</Tr>
<Tr>
<Td>Oct 27, 2022</Td>
<Td>5:00-6:00 PM</Td>
<Td>Harvey's</Td>

Check failure on line 297 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

`'` can be escaped with `&apos;`, `&lsquo;`, `&#39;`, `&rsquo;`
<Td>5</Td>
<Td>
<ChevronDownIcon boxSize={6} />
</Td>
</Tr>
<Tr>
<Td>Oct 27, 2022</Td>
<Td>5:00-6:00 PM</Td>
<Td>Harvey's</Td>

Check failure on line 306 in frontend/src/components/pages/Dashboard.tsx

View workflow job for this annotation

GitHub Actions / run-lint

`'` can be escaped with `&apos;`, `&lsquo;`, `&#39;`, `&rsquo;`
<Td>5</Td>
<Td>
<ChevronDownIcon boxSize={6} />
</Td>
</Tr>
</Accordion>
</Tbody>
</Table>
</TableContainer>

{/* BASIC ACCORDION &********************** */}
{/* <Accordion defaultIndex={[0]} allowMultiple>
<AccordionItem>
<h2>
<AccordionButton>
<Box as="span" flex='1' textAlign='left'>
Section 1 title
</Box>
<AccordionIcon />
</AccordionButton>
</h2>
<AccordionPanel pb={4}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.
</AccordionPanel>
</AccordionItem>
<AccordionItem>
<h2>
<AccordionButton>
<Box as="span" flex='1' textAlign='left'>
Section 2 title
</Box>
<AccordionIcon />
</AccordionButton>
</h2>
<AccordionPanel pb={4}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.
</AccordionPanel>
</AccordionItem>
</Accordion> */}

{/* ATTEMPT AT LIST ACCORDION ******************************** */}
{/* <List spacing={4}>
{listData.map((item, index) => (
<Accordion key={index} defaultIndex={0}>
<AccordionItem>
{({ isExpanded }) => (
<>
<h2>
<AccordionButton>
<Box flex="1" textAlign="left">
{item.title}
</Box>
{isExpanded ? (
<ChevronUpIcon boxSize={6} />
) : (
<ChevronDownIcon boxSize={6} />
)}
</AccordionButton>
</h2>
<AccordionPanel>
<p>{item.content}</p>
</AccordionPanel>
</>
)}
</AccordionItem>
</Accordion>
))}
</List>
*/}


</TabPanel>
<TabPanel>
<Wrap>
Expand Down

0 comments on commit e3a9665

Please sign in to comment.