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 #92

Merged
merged 52 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
83a7d69
new branch
BuyankhuuTsCAl Apr 17, 2024
1d57cf4
fixes
Apr 17, 2024
9f61fe8
product page finished; favorites hover button finished; login partial…
Apr 18, 2024
20ce153
eslint and prettier
Apr 18, 2024
3add398
temp
CharlotteLaw Apr 18, 2024
5dc651f
temp
CharlotteLaw Apr 21, 2024
f595b64
order details page done
Apr 21, 2024
a34ef2d
changes made
Apr 21, 2024
745b2a1
order details page done
Apr 21, 2024
dfd7df1
fixes
Apr 17, 2024
37910e2
product page finished; favorites hover button finished; login partial…
Apr 18, 2024
c7fa3e0
eslint and prettier
Apr 18, 2024
9b32140
order details page done
Apr 21, 2024
816eb75
changes made
Apr 21, 2024
2756019
order details page done
Apr 21, 2024
cf03702
preRebase
BuyankhuuTsCAl Apr 21, 2024
b2ca068
done
BuyankhuuTsCAl Apr 21, 2024
21ff7aa
a
Apr 21, 2024
575b5dc
prepull
Apr 21, 2024
dbe06a2
profile page
Apr 21, 2024
b287da7
temp
CharlotteLaw Apr 21, 2024
f9d3c30
save
Apr 21, 2024
1d4191b
ip
CharlotteLaw Apr 21, 2024
704ad41
ip
CharlotteLaw Apr 21, 2024
257f004
ip
CharlotteLaw Apr 21, 2024
d3e08ac
after rebase
CharlotteLaw Apr 21, 2024
d545b66
fix: fetchProducts correctly retrieves category name for favorites
oahnh Apr 21, 2024
46a8b03
fixed after rebasing
CharlotteLaw Apr 21, 2024
5330746
finshed
Apr 21, 2024
4cf1d70
finshed
Apr 21, 2024
c5f1306
Week 7 and 8 Sprint
CharlotteLaw Apr 21, 2024
0c497ff
Week 7 and 8 Sprint
CharlotteLaw Apr 21, 2024
1df609f
finshed
Apr 21, 2024
1f4afb5
r
Apr 21, 2024
73ccad5
Merge pull request #93 from calblueprint/monique/order-details-deliv
BuyankhuuTsCAl Apr 21, 2024
d6d6ff7
r
Apr 21, 2024
c43336c
merge
Apr 21, 2024
e1f3c07
merge
Apr 21, 2024
5c2b151
fixed
Apr 21, 2024
85ab6a4
r
Apr 21, 2024
5ebb174
Merge pull request #88 from calblueprint/monique/week-7-sprint
BuyankhuuTsCAl Apr 22, 2024
1c9ab4d
ip
CharlotteLaw Apr 21, 2024
be5b777
ip
CharlotteLaw Apr 21, 2024
eafc73c
ip
BuyankhuuTsCAl Apr 22, 2024
0f37f3b
ip
BuyankhuuTsCAl Apr 22, 2024
2fa888a
done
BuyankhuuTsCAl Apr 22, 2024
f258e5a
con
BuyankhuuTsCAl Apr 22, 2024
f6e18b5
fixed after rebasing
CharlotteLaw Apr 21, 2024
358096c
Week 7 and 8 Sprint
CharlotteLaw Apr 21, 2024
e16534a
msg
BuyankhuuTsCAl Apr 22, 2024
31dd383
buyankhuu's rebase
BuyankhuuTsCAl Apr 22, 2024
f53a189
done
BuyankhuuTsCAl Apr 22, 2024
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
29 changes: 16 additions & 13 deletions src/app/orderConfirmationPickUp/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,49 @@ import { useState, useEffect } from 'react';

import { fetchUser } from '@/api/supabase/queries/user_queries';
import { fetchPickupTimesByID } from '@/api/supabase/queries/pickup_queries';
import { convertButtonNumberToCategory } from '@/api/supabase/queries/button_queries';
import {
fetchCurrentOrdersByUser,
getOrderById,
} from '@/api/supabase/queries/order_queries';
import {
Body2Bold,
Body2,
Heading3Bold,
Body1,
Body1Bold,
Body2Light,
Heading3Bold,
Heading4Bold,
Body2Light,
} from '@/styles/fonts';
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,
LeftColumnDiv,
RightColumnDiv,
DetailsHeader,
ImageDiv,
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[]>([]);
Expand Down Expand Up @@ -73,7 +77,6 @@ export default function OrderConfirmationPickUp() {

function organizePickupTime() {
const startTime = pickupTime?.start_time.toLocaleString();
const endTime = pickupTime?.end_time.toLocaleString();
const date =
startTime == null
? ['0', '0', '0']
Expand All @@ -97,7 +100,7 @@ export default function OrderConfirmationPickUp() {
</TextDiv>
<OutterFavoriteDiv>
<TextDiv1>
<Heading4Bold>Order No. {orderIDFromSearch}</Heading4Bold>
<Heading4Bold>Order No. {user?.cart_id}</Heading4Bold>
</TextDiv1>
<ScrollDiv>
{Cart.map(cartItem => (
Expand All @@ -112,13 +115,13 @@ export default function OrderConfirmationPickUp() {
}}
/>
</ImageDiv>
<LabelBox1>
<LabelBox>
<Body1Bold>{cartItem.name}</Body1Bold>
<br />
<Body2Light style={{ marginTop: '-10px' }}>
Category: {cartItem.category}
</Body2Light>
</LabelBox1>
</LabelBox>
<LabelBox>
<div>
<span
Expand Down
92 changes: 49 additions & 43 deletions src/app/orderConfirmationPickUp/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ export const FavoriteDiv = styled.div`
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
width: 750px;
margin-bottom: 50px;
margin-top: 30px;
margin-right: 20px;
gap: 40px;
`;

export const OutterFavoriteDiv = styled.div`
Expand All @@ -22,36 +23,24 @@ export const OutterFavoriteDiv = styled.div`
border-radius: 10px;
background: var(--White, #fff);
box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.2);
width: 800px;
<<<<<<< HEAD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a merge conflict?

=======
width: 700px;
>>>>>>> b287da70273f0befb5c5c6b437883b203f43b605
max-height: 100%;
max-width: 750px;
margin-top: 20px;
margin-right: 60px;
margin-left: 60px;
padding-right: 20px;
padding-left: 10px;
padding-left: 40px;
padding-top: 10px;
`;

export const ScrollDiv = styled.div`
overflow: scroll;
width: 100%;
`;

export const ImageDiv = styled.div`
box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.08);
width: 150px;
height: 150px;
margin-left: 30px;
display: flex;
justify-content: center;
align-items: center;
`;

export const Wrapper = styled.div`
padding: 15px;
display: flex;
justify-content: center;
align-items: center;
overflow-x: hidden;
max-width: 100%;
`;

export const BackDiv = styled.button`
Expand Down Expand Up @@ -110,18 +99,17 @@ export const Label = styled.p`
margin-top: 20px;
`;

export const LabelBox1 = styled.div`
width: 250px;
height: 100%;
padding: 20px;
export const ImageDiv = styled.p`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this a p tag

width: 150px;
height: 150px;
align-items: center;
justify-content: center;
display: flex;
`;

export const LabelBox = styled.div`
width: 150px;
height: 100%;
padding: 20px;
gap: 50px;
margin-right: 30px;
`;

export const HeaderText = styled.h3`
Expand Down Expand Up @@ -226,23 +214,23 @@ export const LeftColumnDiv = styled.div`
flex-flow: column;
justify-content: space-evenly;
align-items: space-evenly;
width: 100%;
width: 800px;
`;
export const RightColumnDiv = styled.div`
display: flex;
flex-flow: column;
align-items: start;
margin-left: 10px;
width: 100%;
align-items: left;
width: 475px;
`;

export const BackButtonDiv = styled.div`
display: flex;
flex-direction: row;
text-align: left;
width: 800px;
margin-left: 80px;
margin-top: 40px;
margin-left: 40px;
margin-bottom: 40px;
margin-top: 20px;
`;

export const WhiteBackgroundDiv = styled.div`
Expand All @@ -254,31 +242,41 @@ export const WhiteBackgroundDiv = styled.div`
box-shadow: 0px 4px 7px 0px rgba(0, 0, 0, 0.1);
`;

export const Wrapper2 = styled.div`
display: flex;
flex-direction: col;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does col work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

align-items: space-evenly;
justify-content: space-around;
`;

export const BottomColumnDiv = styled.div`
display: flex;
flex-direction: row;
align-items: space-evenly;
justify-content: space-around;
width: 100%;
<<<<<<< HEAD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge conflict

margin-left: 20px;
margin-right: 20px;
=======
margin-left: 10px;
>>>>>>> b287da70273f0befb5c5c6b437883b203f43b605
margin-bottom: 30px;
gap: 30px;
gap: 10px;
`;

export const TextDiv = styled.div`
display: flex;
flex-direction: row;
margin-left: 60px;
margin-top: 20px;
margin-bottom: 20px;
margin-left: 20px;
margin-top: 10px;
margin-bottom: 10px;
`;

export const TextDiv1 = styled.div`
display: flex;
flex-direction: row;
padding: 10px;
margin-left: 20px;
margin-top: 15px;
margin-top: 20px;
`;

export const PageDiv = styled.div`
Expand All @@ -287,22 +285,29 @@ export const PageDiv = styled.div`
justify-content: flex-start;
align-items: flex-start;
width: 100%;
position: relative;
margin-bottom: 40px;
`;

export const ShippingDetailsDiv = styled.div`

display: flex;
flex-direction: column;
align-items: flex-start;
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;
gap: 33px;
max-height: 100%;
margin-top: 205px;
<<<<<<< HEAD
margin-top: 75px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conflict

=======
margin-top: 93px;
>>>>>>> b287da70273f0befb5c5c6b437883b203f43b605
margin-bottom: 30px;
margin-right: 40px;
`;
Expand All @@ -320,6 +325,7 @@ export const CenterDiv = styled.div`
display: flex;
align-items: center;
justify-content: center;
position: relative;
width: 100%;
padding: 20px;
`;
11 changes: 6 additions & 5 deletions src/app/orderHistory/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import React, { useEffect, useState } from 'react';
import { Heading1, Body1 } from '@/styles/fonts';
import { Heading2, Body1 } from '@/styles/fonts';
import OrderDetailsWithProducts from '../../components/OrderHistory/OrderHistoryBox';
import { fetchOrderIdsByUserIdSorted } from '../../api/supabase/queries/order_queries';
import Footer from '../../components/FooterFolder/Footer';
Expand All @@ -10,6 +10,7 @@ import {
OutterBox,
NavBarMovedUP,
Fullscreen,
BackButtonDiv,
} from './styles';
import BackButton from '../../components/BackButton/BackButton';

Expand All @@ -29,10 +30,10 @@ function OrderHistory() {
<Fullscreen>
<NavBarMovedUP />
<OutterBox>
<BackButton destination="./profileScreen" />
<div style={{ marginTop: '40px', marginBottom: '20px' }}>
<Heading1>Order History</Heading1>
</div>
<BackButtonDiv>
<BackButton destination="./profileScreen" />
</BackButtonDiv>
<Heading2>Order History</Heading2>
<OrderHistoryContainer>
{orderIds.length > 0 ? (
orderIds.map((orderId: number) => (
Expand Down
16 changes: 14 additions & 2 deletions src/app/orderHistory/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,25 @@ export const NavBarMovedUP = styled(NavBar)`
position: relative;
`;

export const BackButtonDiv = styled.div`
display: flex;
flex-direction: row;
gap: 200px;
margin-bottom: 30px;
margin-top: 50px;
text-align: left;
width: 800px;
padding-right: 40px;
`;

export const OutterBox = styled.div`
width: 800px;
margin-top: 40px;
margin-bottom: 70px;
`;

export const OrderHistoryContainer = styled.div`

display: flex;
flex-direction: column;
align-items: center;
Expand All @@ -28,8 +40,8 @@ export const OrderHistoryContainer = styled.div`
box-shadow: 0px 1px 4px 1px rgba(0, 0, 0, 0.2);
width: 800px; // Width of the outer box
height: auto;
margin-top: 10px;
padding-top: 40px;
margin-top: 20px;
padding-top: 10px;
`;

export const OrderHistoryBox = styled.div`
Expand Down
Loading
Loading