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

Charlotte/new pick up #85

Closed
wants to merge 2 commits into from
Closed
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
26 changes: 14 additions & 12 deletions src/app/orderConfirmationPickUp/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,44 @@ import {
getOrderById,
} from '@/api/supabase/queries/order_queries';
import {
Body2Bold,
Body2,
Heading3Bold,
Body1,
Body1Bold,
Body2Light,
Heading3Bold,
Heading4Bold,
Body2Light,
} from '@/styles/fonts';
import { fetchCartItemsWithQuantity } from '../../api/supabase/queries/cart_queries';
import { useSearchParams } from 'next/navigation';
import { fetchCartItemsWithQuantityByID } from '../../api/supabase/queries/cart_queries';

import BackButton from '../../components/BackButton/BackButton';

import NavBar from '../../components/NavBarFolder/NavBar';

import {
TextDiv,
TextDiv1,
BackButtonDiv,
FavoriteDiv,
ColDiv,
OutterFavoriteDiv,
TextDiv1,
OutterBox,
Label,
LabelBox,
LabelBox1,
ScrollDiv,
ShippingDetailsDiv,
ImageDiv,
BottomColumnDiv,
Wrapper,
LabelBox1,
LeftColumnDiv,
RightColumnDiv,
DetailsHeader,
PageDiv,
CenterDiv,
BackButtonDiv,
TextDiv,
} from './styles';

import { Product, User, Pickup } from '../../schema/schema';

import { fetchCartItemsWithQuantityByID } from '../../api/supabase/queries/cart_queries';
export default function OrderConfirmationPickUp() {
const [Cart, setCart] = useState<Product[]>([]);
const [user, setUser] = useState<User>();
Expand Down Expand Up @@ -95,10 +98,9 @@ export default function OrderConfirmationPickUp() {
<TextDiv>
<Heading3Bold>Your order has been submitted</Heading3Bold>
</TextDiv>

<OutterFavoriteDiv>
<TextDiv1>
<Heading4Bold>Order No. {orderIDFromSearch}</Heading4Bold>
<Heading4Bold>Order No. {user?.cart_id}</Heading4Bold>
</TextDiv1>
<ScrollDiv>
{Cart.map(cartItem => (
Expand Down
16 changes: 8 additions & 8 deletions src/app/orderConfirmationPickUp/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ export const OutterFavoriteDiv = styled.div`
max-height: 100%;
margin-top: 20px;
margin-right: 60px;
margin-left: 60px;
padding-right: 20px;
padding-left: 10px;
margin-left: 40px;
padding-right: 15px;
padding-top: 10px;
`;

Expand Down Expand Up @@ -232,7 +231,6 @@ export const RightColumnDiv = styled.div`
display: flex;
flex-flow: column;
align-items: start;
margin-left: 10px;
width: 100%;
`;

Expand All @@ -241,7 +239,7 @@ export const BackButtonDiv = styled.div`
flex-direction: row;
text-align: left;
width: 800px;
margin-left: 80px;
margin-left: 60px;
margin-bottom: 40px;
`;

Expand All @@ -261,14 +259,15 @@ export const BottomColumnDiv = styled.div`
justify-content: space-around;
width: 100%;
margin-left: 20px;
margin-right: 20px;
margin-bottom: 30px;
gap: 30px;
`;

export const TextDiv = styled.div`
display: flex;
flex-direction: row;
margin-left: 60px;
margin-left: 40px;
margin-top: 20px;
margin-bottom: 20px;
`;
Expand All @@ -287,6 +286,7 @@ export const PageDiv = styled.div`
justify-content: flex-start;
align-items: flex-start;
width: 100%;
margin-bottom: 40px;
`;

export const ShippingDetailsDiv = styled.div`
Expand All @@ -296,7 +296,7 @@ export const ShippingDetailsDiv = styled.div`
border-radius: 10px;
background: var(--White, #fff);
box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.2);
width: 467px;
width: 475px;
height: auto;
max-height: 100%;
padding: 36px 34px;
Expand All @@ -322,4 +322,4 @@ export const CenterDiv = styled.div`
justify-content: center;
width: 100%;
padding: 20px;
`;
`;
20 changes: 11 additions & 9 deletions src/app/profileScreen/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
fetchOrderProductById,
fetchProductWithQuantityById,
} from '@/api/supabase/queries/order_queries';
import { Check, CheckCircle, X } from 'react-feather';
import { Check, CheckCircle, X, Send } from 'react-feather';
import BackButton from '../../components/BackButton/BackButton';
import {
LogOutButton,
Expand Down Expand Up @@ -170,15 +170,15 @@ function OrderHistorySection(props: { Orders: Order[] }) {
if (firstOrderProducts.length > 0) {
let backgroundColor = 'transparent';
if (Orders[0].order_status === 'Submitted') {
backgroundColor = '#CEE8BE';
backgroundColor = 'var(--Greyish, #E6E6E6)';
} else if (Orders[0].order_status === 'Rejected') {
backgroundColor = '#FFDDDD';
} else if (Orders[0].order_status === 'Confirmed') {
backgroundColor = '#C7DDFF';
}
let icon;
if (Orders[0].order_status === 'Submitted') {
icon = <CheckCircle />;
icon = <Send />;
} else if (Orders[0].order_status === 'Rejected') {
icon = <X />;
} else if (Orders[0].order_status === 'Confirmed') {
Expand Down Expand Up @@ -329,12 +329,7 @@ function AccountDetailSectionPickUp(props: { user: User }) {
<main>
<AccountDetails>
<Heading2>Account Details</Heading2>
<HeadingSpacing>
<Body1Bold>Email</Body1Bold>
</HeadingSpacing>
<TextSpacing>
<Body2>{user?.email}</Body2>
</TextSpacing>

<HeadingSpacing>
<Body1Bold>Name</Body1Bold>
</HeadingSpacing>
Expand All @@ -343,6 +338,13 @@ function AccountDetailSectionPickUp(props: { user: User }) {
{user?.first_name} {user?.last_name}
</Body2>
</TextSpacing>
<HeadingSpacing>
<Body1Bold>Email</Body1Bold>
</HeadingSpacing>
<TextSpacing>
<Body2>{user?.email}</Body2>
</TextSpacing>

<HeadingSpacing>
<Body1Bold>Phone Number</Body1Bold>
</HeadingSpacing>
Expand Down
Loading