You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Computer programmers obtain quasi-magical, superhuman coding ability when they have a blood alcohol concentration percentage between 0.129% and 0.138%" - Former CEO of Microsoft
Running the program
Clone the repo through git clone
Navigate to the directory of your fph-frontend repo using the cd command.
Run git checkout dev and then git pull.
Create a branch off the dev branch in fph-frontend. For the name of the branch, use what the title of this issue as. Use git checkout -b <insert_branch_name>.
Install the necessary dependencies through running yarn. Test that your application works by running yarn format followed by yarn dev
Create your necessary code through creating files within the component folder.
Run the code with yarn (to install), yarn format (to format the code), and yarn start (to start the program).
Setup pagination in the backend so that if we are on page 1 then we have only 1-10 showing, if on page 2 its 11-20, etc. Reference this PR (ctc-uci/fph-backend@d58e7fe) to see how it is done in the backend.
The total number of donations for a business can be found by doing a GET by id on the donation tracking table. Please message me or Madhu if you are confused on this.
Use Chakra Components only to create the fields for this task.
Notice how we are doing search on all columns so that a user can search on any column and it will filter for them.
Try your best to match the wireframes provided by the designers. If you click on the figma element, you can see the properties such as color and size. Try not to use px and manully size things, instead try to use the chakra components in place as much as possible to do css like in the codeblock below:
// Sample card from Airbnb
function AirbnbExample() {
const property = {
imageUrl: "https://bit.ly/2Z4KKcF",
imageAlt: "Rear view of modern home with pool",
beds: 3,
baths: 2,
title: "Modern home in city center in the heart of historic Los Angeles",
formattedPrice: "$1,900.00",
reviewCount: 34,
rating: 4,
};
return (
<Box maxW="sm" borderWidth="1px" rounded="lg" overflow="hidden">
<Image src={property.imageUrl} alt={property.imageAlt} />
<Box p="6">
<Box d="flex" alignItems="baseline">
<Badge rounded="full" px="2" variantColor="teal">
New
</Badge>
<Box
color="gray.500"
fontWeight="semibold"
letterSpacing="wide"
fontSize="xs"
textTransform="uppercase"
ml="2"
>
{property.beds} beds • {property.baths} baths
</Box>
</Box>
<Box
mt="1"
fontWeight="semibold"
as="h4"
lineHeight="tight"
isTruncated
>
{property.title}
</Box>
<Box>
{property.formattedPrice}
<Box as="span" color="gray.600" fontSize="sm">
/ wk
</Box>
</Box>
<Box d="flex" mt="2" alignItems="center">
{Array(5)
.fill("")
.map((_, i) => (
<StarIcon
key={i}
color={i < property.rating ? "teal.500" : "gray.300"}
/>
))}
<Box as="span" ml="2" color="gray.600" fontSize="sm">
{property.reviewCount} reviews
</Box>
</Box>
</Box>
</Box>
);
}
Lastly, make sure the component is scalable. This means if you were to zoom in and out of the page the nav bar should still look relatively the same.
Support
Feel free to reach out to Madhu and Josh on Slack/Messenger for assistance.
The text was updated successfully, but these errors were encountered:
joshualipton
changed the title
Pagination, Search, CSS for Donation History Table
Pagination, Search, CSS for Business Donation History Table
Feb 21, 2024
Overview
"Computer programmers obtain quasi-magical, superhuman coding ability when they have a blood alcohol concentration percentage between 0.129% and 0.138%" - Former CEO of Microsoft
Running the program
git clone
fph-frontend
repo using thecd
command.git checkout dev
and thengit pull
.dev
branch infph-frontend
. For the name of the branch, use what the title of this issue as. Usegit checkout -b <insert_branch_name>
.yarn
. Test that your application works by runningyarn format
followed byyarn dev
component
folder.yarn
(to install),yarn format
(to format the code), andyarn start
(to start the program).localhost:3000/
.Task
https://www.figma.com/file/VkH80LtHkl1Ck76v88fTvk/Ideation?type=design&node-id=811-5079&mode=design&t=437dVGAGG9JzgBhn-0
Setup pagination in the backend so that if we are on page 1 then we have only 1-10 showing, if on page 2 its 11-20, etc. Reference this PR (ctc-uci/fph-backend@d58e7fe) to see how it is done in the backend.
Reference this PR (https://github.com/ctc-uci/fph-frontend/pull/39/files), more specifically the AdminFilterDashboard. See how they setup the pagination on there.
The total number of donations for a business can be found by doing a GET by id on the donation tracking table. Please message me or Madhu if you are confused on this.
Use Chakra Components only to create the fields for this task.
For search, reference cell dogs:
Frontend:
Backend:
Notice how we are doing search on all columns so that a user can search on any column and it will filter for them.
Try your best to match the wireframes provided by the designers. If you click on the figma element, you can see the properties such as color and size. Try not to use px and manully size things, instead try to use the chakra components in place as much as possible to do css like in the codeblock below:
Lastly, make sure the component is scalable. This means if you were to zoom in and out of the page the nav bar should still look relatively the same.
Support
Feel free to reach out to Madhu and Josh on Slack/Messenger for assistance.
The text was updated successfully, but these errors were encountered: