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

Feedback #1

Open
wants to merge 476 commits into
base: feedback
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
476 commits
Select commit Hold shift + click to select a range
a96e145
Merge pull request #50 from CSCC012023/CAL110-Profile-Page-Other-View
Tasif1 Jul 16, 2023
8a9ca03
CAL-50 Change backend to accomodate filter queries
williamc99 Jul 16, 2023
512e8f0
CAL-50 Remove test functions from artworkController
williamc99 Jul 16, 2023
daaf5de
CAL-50 Text spacing edits
williamc99 Jul 16, 2023
9d3e973
CAL-75_76, created chats DB, added interaction with DB
cassy18 Jul 16, 2023
c82d36a
Merge branch 'main' into CAL-75_76-MessageAPI
Tasif1 Jul 16, 2023
aef8209
Merge pull request #54 from CSCC012023/CAL-75_76-MessageAPI
cassy18 Jul 16, 2023
2f0680b
cal-38 fixed server errors on login / reg pages
ArielleRamgoolie Jul 17, 2023
9800c68
Merge pull request #55 from CSCC012023/Cal-38--Login-/-Registration
ArielleRamgoolie Jul 17, 2023
be0a871
Replaced all music mock data with api request
Maanethdesilva Jul 17, 2023
56503bd
CAL-20 - Added functionality to add/remove artworks
Tasif1 Jul 17, 2023
3da98c4
Merge pull request #53 from CSCC012023/CAL50-ProductPage-Filter-Param…
williamc99 Jul 17, 2023
bf2f2af
CAL-50 Change sort parameters
williamc99 Jul 17, 2023
8fb7eea
Merge pull request #56 from CSCC012023/CAL-121-Replace-mock-data
Maanethdesilva Jul 18, 2023
2198b76
CAL-117-Fetch Music from DB
Tasif1 Jul 18, 2023
ba840cf
proxy fix
Tasif1 Jul 18, 2023
c3b9b0e
Merge branch 'main' of https://github.com/CSCC012023/final-project-s2…
Tasif1 Jul 18, 2023
d7bddfd
Added recommendation engine for music and fixed bug with api
Maanethdesilva Jul 18, 2023
7c1dbe2
CAL-122-Add/Remove-Music
Tasif1 Jul 18, 2023
794a8de
Merge pull request #57 from CSCC012023/CAL-123-Music-Recommendation
Maanethdesilva Jul 18, 2023
3db088b
Cal-119 Error Messages on Login & Registration
ArielleRamgoolie Jul 18, 2023
07edfb8
CAL-20-Added delete confirmation popup
Tasif1 Jul 18, 2023
cea62f8
Merge branch 'main' of https://github.com/CSCC012023/final-project-s2…
Tasif1 Jul 18, 2023
ce62c0d
CAL20 - Added Checking for unique name and artist for music
Tasif1 Jul 18, 2023
c437abb
Merge pull request #39 from CSCC012023/cal45-cal48-front-end
ShadmanT Jul 18, 2023
b637c25
cal-125 Add context for shopping cart
Avstn1 Jul 18, 2023
12107ac
cal-125 Add comments to shopping cart context
Avstn1 Jul 18, 2023
d227eaa
cal-45 Fix container issues
Avstn1 Jul 18, 2023
f1cb273
Merge pull request #59 from CSCC012023/CAL-45-fix-product-page
Avstn1 Jul 18, 2023
ea3eb6a
Merge branch 'main' of https://github.com/CSCC012023/final-project-s2…
Tasif1 Jul 18, 2023
df32fb0
Merge pull request #58 from CSCC012023/Cal-38-Login/Registration
ArielleRamgoolie Jul 18, 2023
5496f84
updated Artworks Schema
Tasif1 Jul 19, 2023
0223125
Added user created page
ArielleRamgoolie Jul 19, 2023
d308384
CAL-126 added onclick functionality for artwork
ShadmanT Jul 19, 2023
5ee224f
CAL-125 Add shopping cart button and functionality
Avstn1 Jul 19, 2023
86dfc54
CAL-125-make-merge-fixes
Avstn1 Jul 19, 2023
45244d0
Merge remote-tracking branch 'origin/CAL-125-shopping-cart' into CAL-…
Avstn1 Jul 19, 2023
a66a6d7
CAL-125 Finish adding ui elements and local storage
Avstn1 Jul 19, 2023
63f9791
CAL-125 Change formatting for price and title
Avstn1 Jul 19, 2023
28ad85d
Merge pull request #61 from CSCC012023/cal-38-Login-/-Registration
ArielleRamgoolie Jul 19, 2023
b21241e
Added check to ensure usernames stay unique when edited
Tasif1 Jul 19, 2023
669fdfd
CAL-126 Product page now gets the correct id of the artwork that is c…
ShadmanT Jul 20, 2023
154ace5
CAL-125 Fix shopping cart offcanvas and format cart items
Avstn1 Jul 20, 2023
014f405
CAL-125 Add checkout button
Avstn1 Jul 20, 2023
fc8d854
refactored Edit Profile Functionality
Tasif1 Jul 20, 2023
47fc83f
Merge pull request #60 from CSCC012023/CAL-20-Add/Remove-Products
Tasif1 Jul 20, 2023
16488e6
CAL-128 Register users to Neo4j
Tasif1 Jul 20, 2023
d59709d
CAL-126 Product Page queries the database and loads the correct product
ShadmanT Jul 21, 2023
5ba759e
CAL-125 Add product type
Avstn1 Jul 21, 2023
dd2a89f
CAL-125 Fix UI compatibility with product page backend
Avstn1 Jul 21, 2023
34e383b
Merge branch 'main' into CAL-126-product-page
ShadmanT Jul 21, 2023
660ad55
CAL-126 Product page work done on routes
ShadmanT Jul 21, 2023
ce540eb
Merge pull request #63 from CSCC012023/CAL-126-product-page
ShadmanT Jul 21, 2023
3934ad5
CAL-125 Merge product page changes from main into shopping cart
Avstn1 Jul 21, 2023
b1fe1ef
CAL-125 Link shopping cart to product page backend
Avstn1 Jul 21, 2023
e85cfd8
Merge pull request #64 from CSCC012023/CAL-125-shopping-cart
ShadmanT Jul 21, 2023
9d08b0d
Merge branch 'main' into CAL-128-Register-users-to-Neo4j
Tasif1 Jul 21, 2023
968fc97
added page for chat creation, functionality for create chat, create g…
cassy18 Jul 21, 2023
6875cc6
docs: add sprint 2 marks
winsyuan Jul 21, 2023
afe61d1
Merge pull request #62 from CSCC012023/CAL-128-Register-users-to-Neo4j
Tasif1 Jul 21, 2023
59e56e3
Create sprint3
ArielleRamgoolie Jul 21, 2023
8283023
Delete sprint3
ArielleRamgoolie Jul 21, 2023
d7be201
Create test
ArielleRamgoolie Jul 21, 2023
55f8682
Add burndown.pdf
ArielleRamgoolie Jul 21, 2023
f0c2531
Add schedule.pdf
ArielleRamgoolie Jul 21, 2023
0d3d557
Add System Design Document
ArielleRamgoolie Jul 21, 2023
a8b4c6d
Delete test
ArielleRamgoolie Jul 21, 2023
102b453
Add iteration-03-plan
ArielleRamgoolie Jul 21, 2023
135d4f2
Add sprint-3-Review.md
ArielleRamgoolie Jul 21, 2023
1b37ab3
Add Updated-PB.md
ArielleRamgoolie Jul 21, 2023
7df11cf
Create README.md
ArielleRamgoolie Jul 21, 2023
6baf16d
Merge branch 'main' into CAL-10-chat-functionality
Tasif1 Jul 21, 2023
fd88ab2
Merge pull request #65 from CSCC012023/CAL-10-chat-functionality
cassy18 Jul 22, 2023
f29d1ad
CAL-125 Fix tailwind overrides
Avstn1 Jul 23, 2023
c12b3de
Merge branch 'main' into CAL-125-fix-shopping-cart
Avstn1 Jul 23, 2023
5405f62
CAL-125 Fix close button
Avstn1 Jul 24, 2023
9c40065
Merge branch 'CAL-125-fix-shopping-cart' of https://github.com/CSCC01…
Avstn1 Jul 24, 2023
8e578cc
testing messaging for logged in user
cassy18 Jul 24, 2023
554fa32
Merge branch 'CAL-125-fix-shopping-cart' of https://github.com/CSCC01…
cassy18 Jul 24, 2023
455ad3b
CAL-132 Fix Navigation Routing for NavBar & Footer
williamc99 Jul 25, 2023
44adb1c
added recommendation api
Maanethdesilva Jul 25, 2023
05daef8
CAL-132 Add routing for "see more" buttons
williamc99 Jul 25, 2023
c2a6e06
CAL-132 Add routing to categories
williamc99 Jul 25, 2023
5e8459c
added function to fetch by categories for art and music api
Maanethdesilva Jul 25, 2023
c8b6dcb
Merge pull request #67 from CSCC012023/CAL-124-Artwork-api-recommenda…
williamc99 Jul 25, 2023
b6c9831
Merge branch 'main' into CAL-15-Categories-api
williamc99 Jul 25, 2023
95a5d11
Merge pull request #68 from CSCC012023/CAL-15-Categories-api
williamc99 Jul 25, 2023
693023a
fixed bug in artworkController.js
ArielleRamgoolie Jul 25, 2023
c32537e
Merge pull request #66 from CSCC012023/CAL-125-fix-shopping-cart
ShadmanT Jul 25, 2023
5b639ad
CAL-125 Add package-lock and package.json
Avstn1 Jul 25, 2023
67e0d70
setting other user profile pic
cassy18 Jul 26, 2023
0d4a5dc
CAL-130 implemented different messaging for different logged in users
cassy18 Jul 26, 2023
6cc491d
Merge pull request #69 from CSCC012023/CAL132-Homepage-Routing
williamc99 Jul 26, 2023
1ee5630
CAL-132 Change Homepage Routing
williamc99 Jul 26, 2023
f96420c
Minor update to chatName
Tasif1 Jul 26, 2023
34ef28c
cal-149-updated login page UI
ArielleRamgoolie Jul 26, 2023
679a854
updated name of new login file for consistency
ArielleRamgoolie Jul 26, 2023
a40faa7
Updated register page UI
ArielleRamgoolie Jul 26, 2023
99d2ab8
Merge branch 'main' into Cal-149-UpdateLogin/RegistrationUI
ArielleRamgoolie Jul 26, 2023
e4181ee
Merge pull request #71 from CSCC012023/Cal-149-UpdateLogin/Registrati…
ArielleRamgoolie Jul 26, 2023
5f6fa81
cal - 149 updated login page route
ArielleRamgoolie Jul 26, 2023
14faec2
Added Artist Names to Products
Tasif1 Jul 26, 2023
e700627
CAL-54 Make ui adjustments
Avstn1 Jul 27, 2023
a4b4151
CAL-54 Set up bidding backend controller, model, and routes
Avstn1 Jul 27, 2023
aba218b
CAL-54 Fix bid object properties
Avstn1 Jul 27, 2023
d934f11
Updated small login page bug
ArielleRamgoolie Jul 27, 2023
60e5acf
Cal-147 Added animation to an updated landing page
ArielleRamgoolie Jul 27, 2023
509eed4
CAL-54 Add bid functions
Avstn1 Jul 27, 2023
ea1df3d
CAL-54 Make bidding page artwork and details dynamic
Avstn1 Jul 27, 2023
0f7415b
CAL-11 Add Seller Dashboard Page and Functionality
williamc99 Jul 27, 2023
c30b81b
CAL-11 Change API link for Seller Dashboard
williamc99 Jul 27, 2023
505f642
CAL-54 Set up bidding post and get requests
Avstn1 Jul 27, 2023
59b1600
CAL-11 Add function to record product clicks
williamc99 Jul 27, 2023
58e271d
CAL-11 Change Homepage to Use DB Artworks
williamc99 Jul 27, 2023
96e5124
CAL-11 Fixed Artwork Routing for Homepage Artworks
williamc99 Jul 27, 2023
81bf665
Merge pull request #72 from CSCC012023/Update-Schemas
williamc99 Jul 27, 2023
3781a08
Merge branch 'main' into CAL11-Sellers-Analytics-Page
williamc99 Jul 27, 2023
26cee3c
Merge pull request #73 from CSCC012023/CAL11-Sellers-Analytics-Page
williamc99 Jul 27, 2023
9cb3a5c
Merge pull request #70 from CSCC012023/CAL-130-logged-in-user-messagi…
cassy18 Jul 27, 2023
1a4bf76
Added header to landing
ArielleRamgoolie Jul 28, 2023
967c0ae
Created api for admin data
Maanethdesilva Jul 29, 2023
3a37686
Created admin analytics page
Maanethdesilva Jul 29, 2023
8d9e1f8
Added artwork analytics
Maanethdesilva Jul 29, 2023
a3d9410
Formatted document nicer
Maanethdesilva Jul 29, 2023
1e0d61b
Update HeaderNavBar.tsx
williamc99 Jul 29, 2023
9386868
Merge pull request #74 from CSCC012023/CAL-134-Admin-analytics(Quiz4)
Maanethdesilva Jul 29, 2023
3a92bed
Updated Product and User schemas to add visits
Tasif1 Jul 29, 2023
9809db6
docs: add sprint 3 marks
winsyuan Jul 29, 2023
ed682d5
Added About and Features Section on LandingPg
ArielleRamgoolie Jul 29, 2023
1086972
Updated landing page content
ArielleRamgoolie Jul 29, 2023
d2e26aa
Finishing touches on about section
ArielleRamgoolie Jul 29, 2023
f904e54
realtime
cassy18 Jul 29, 2023
898f1f0
Added testimonial section
ArielleRamgoolie Jul 30, 2023
aa26bd5
cleaned up code
ArielleRamgoolie Jul 30, 2023
6a158a9
cleaned up code
ArielleRamgoolie Jul 30, 2023
448851d
Updated landing page header
ArielleRamgoolie Jul 30, 2023
46de80c
Updated Message Search Page
Tasif1 Jul 30, 2023
341bfea
updated testimonials data
ArielleRamgoolie Jul 30, 2023
af1823e
Update MessagePage.tsx
Tasif1 Jul 30, 2023
ed72723
Updated margins
ArielleRamgoolie Jul 30, 2023
4b80418
CAL-54 Add to bidding backend
Avstn1 Jul 30, 2023
f2a0ee8
Revamped trending page
Maanethdesilva Jul 30, 2023
49daadc
Merge branch 'main' of https://github.com/CSCC012023/final-project-s2…
cassy18 Jul 30, 2023
763968e
Merge branch 'main' into Cal-147-Landing-Paage-UI
ArielleRamgoolie Jul 30, 2023
e9e1fca
new testing realtime messages
cassy18 Jul 30, 2023
931e01a
Merge pull request #75 from CSCC012023/CAL-154-Update-Message-Page-UI
Tasif1 Jul 30, 2023
00c8579
implemented realtime messaging using socket.io
cassy18 Jul 30, 2023
93245e4
CAL-129 updates to group messaging
cassy18 Jul 30, 2023
07a68b5
Added temporary profile Pic for group chats
Tasif1 Jul 30, 2023
1050888
Merge pull request #78 from CSCC012023/CAL-129-RealTimeMessaging
cassy18 Jul 30, 2023
c94a34a
Added navigation
ArielleRamgoolie Jul 31, 2023
96088ca
Updated Header Navigation
ArielleRamgoolie Jul 31, 2023
778f4ec
Updated Nav Bar Logo Navigation
ArielleRamgoolie Jul 31, 2023
a2b0ced
Updated App Route to new Landing Page
ArielleRamgoolie Jul 31, 2023
580fec3
Updated starting page of app as landing
ArielleRamgoolie Jul 31, 2023
f7ec224
Merge pull request #76 from CSCC012023/Cal-147-Landing-Paage-UI
ArielleRamgoolie Jul 31, 2023
b378aea
updated footer navigation
ArielleRamgoolie Jul 31, 2023
b47f495
Updated Nav Bar Header
ArielleRamgoolie Jul 31, 2023
408fa78
updated landing header
ArielleRamgoolie Jul 31, 2023
8c904a6
Merge pull request #77 from CSCC012023/CAL-153-Trending-page-redesign
ArielleRamgoolie Jul 31, 2023
7d34836
CAL-154 Update Message Page
Tasif1 Aug 1, 2023
b5d3689
Merge pull request #79 from CSCC012023/Cal-146-Minor-UI-Updates
ArielleRamgoolie Aug 1, 2023
2490f43
CAL-54 Fix bid node backend
Avstn1 Aug 1, 2023
de91900
CAL-54 Add additional routes and functions for user retrieval, and up…
Avstn1 Aug 1, 2023
4a3fd1c
CAL-54 Add highest bid function
Avstn1 Aug 1, 2023
e2525a2
CAL-15 Fixed bug with displaying most recent message
Tasif1 Aug 1, 2023
fc22232
Merge pull request #80 from CSCC012023/CAL154-Updated-Message-Page
cassy18 Aug 1, 2023
e948c61
CAL 157 Dynamically change NavBar profile picture
Tasif1 Aug 1, 2023
4532736
CAL-129 get online users from socket and display frontend
cassy18 Aug 1, 2023
a7dd5e0
CAL 157 - Changed spacing on profile button group
Tasif1 Aug 1, 2023
69fc50e
CAL 157 - Added sign out functionality
Tasif1 Aug 1, 2023
0dc6930
Merge pull request #82 from CSCC012023/CAL-157-Dynamic-NavBar
Tasif1 Aug 1, 2023
5f30739
CAL-54 Fix bidding page image height
Avstn1 Aug 1, 2023
90980b5
Updated user card
ArielleRamgoolie Aug 2, 2023
c4d304a
edited forms for adding art/music and edit profile
ArielleRamgoolie Aug 2, 2023
bdc1de3
Edit confirm delete form
ArielleRamgoolie Aug 2, 2023
cfe419a
fixed minor backend bug on profile page
ArielleRamgoolie Aug 2, 2023
b837a43
Create test
ArielleRamgoolie Aug 2, 2023
6da7e85
CAL-125 Add cart item definition and remove href
Avstn1 Aug 2, 2023
313aaeb
CAL-54 Tie users to bid
Avstn1 Aug 2, 2023
cc0fb8e
CAL-54 Add package-lock and package
Avstn1 Aug 2, 2023
d330f94
CAL-54 Add BidProduct information to bidding page
Avstn1 Aug 2, 2023
b9d22c0
CAL-54 Add starting price to initial bid page
Avstn1 Aug 2, 2023
2933140
CAL-54 Make unavailable for bid if not in database
Avstn1 Aug 2, 2023
fc3672a
CAL-54 Make place bid button non-clickable if bid product does not exist
Avstn1 Aug 2, 2023
c491df8
CAL-54 Make fixes to postbid function
Avstn1 Aug 2, 2023
015f4ab
CAL-54 Set up rest of BidProduct and Bid backend
Avstn1 Aug 2, 2023
4d41a50
Added style changes for discover page
Maanethdesilva Aug 2, 2023
32f3489
formatted and removed unused code
Maanethdesilva Aug 2, 2023
abdfbe1
Merge pull request #83 from CSCC012023/Cal-156-Update-User-Profile-Page
ArielleRamgoolie Aug 2, 2023
3416230
CAL-54 Replace menu with headernavbar
Avstn1 Aug 2, 2023
7e93b1e
CAL-54 Change productId to a string
Avstn1 Aug 2, 2023
fefeb43
CAL-54 Change date format
Avstn1 Aug 2, 2023
c50b117
CAL 125 moving over some code from other branch
ShadmanT Aug 2, 2023
b37319d
CAL 125 made a paybutton component
ShadmanT Aug 2, 2023
d48f7d9
Merge pull request #85 from CSCC012023/CAL-141-Discover-page-redesign
Maanethdesilva Aug 3, 2023
8db0886
Update SellerDashboardPage.tsx
williamc99 Aug 3, 2023
3dd13c1
CAL-54 Replace hardcoded startingBid with DB startingBid
Avstn1 Aug 3, 2023
537ef12
CAL-54 Close bidding when past end date
Avstn1 Aug 3, 2023
91ecc3a
CAL-54 Change post and delete bid product attributes
Avstn1 Aug 3, 2023
0648476
CAL-54 Make product non-purchasable if product is a bid product
Avstn1 Aug 3, 2023
0408547
CAL-125 made progress in redirectoring checkout button to stripe chec…
ShadmanT Aug 3, 2023
2dc8a06
Merge pull request #81 from CSCC012023/CAL-129-display-online-users
cassy18 Aug 3, 2023
0d03f89
Merge pull request #84 from CSCC012023/CAL-54-bidding
ShadmanT Aug 3, 2023
e8e2f2d
CAL-125 Stripe API accepts payments now
ShadmanT Aug 3, 2023
fb81d07
Fix package.json imports
williamc99 Aug 4, 2023
bce86bc
CAL-54 Add bidProduct link to DB
Avstn1 Aug 4, 2023
5b58fc5
CAL-54 Make starting bid fixes
Avstn1 Aug 4, 2023
2113d49
Merge CAL-125-fix-shopping-cart into main
Avstn1 Aug 4, 2023
c07122f
CAL-54 Add bidProduct link to DB
Avstn1 Aug 4, 2023
9e4d863
CAL-54 Make starting bid fixes
Avstn1 Aug 4, 2023
4ca17eb
Merge branch 'CAL-54-bidding-2' of https://github.com/CSCC012023/fina…
Avstn1 Aug 4, 2023
486d3fc
Merge CAL-125-fix-shopping-cart into main
Avstn1 Aug 4, 2023
3bf6138
Revert "Merge CAL-125-fix-shopping-cart into main"
Avstn1 Aug 4, 2023
8b9c98d
Merge branch 'main' of https://github.com/CSCC012023/final-project-s2…
Avstn1 Aug 4, 2023
06a7004
CAL-125 Fix package-json files
williamc99 Aug 4, 2023
5d60575
Merge pull request #86 from CSCC012023/CAL-125-fix-shopping-cart
Avstn1 Aug 4, 2023
5a4a521
CAL-54 Add bidProduct link to DB
Avstn1 Aug 4, 2023
f41309e
CAL-54 Make starting bid fixes
Avstn1 Aug 4, 2023
cada6d4
Merge branch 'CAL-54-bidding-2' of https://github.com/CSCC012023/fina…
Avstn1 Aug 4, 2023
bcb98f1
CAL-54 Rebase and make UI changes
Avstn1 Aug 4, 2023
68c96d1
CAL-54 Indent details
Avstn1 Aug 4, 2023
5ed6e67
Merge pull request #87 from CSCC012023/CAL-54-bidding-2
williamc99 Aug 4, 2023
95e807b
CAL 158 Added music page redesign
Maanethdesilva Aug 4, 2023
bcf974d
CAL 158 Added music page redesign
Maanethdesilva Aug 4, 2023
b77f4ed
Merge branch 'CAL-158-MusicPage' of https://github.com/CSCC012023/fin…
Maanethdesilva Aug 4, 2023
7e1c63d
CAL-54 Add alert upon successful bid
Avstn1 Aug 4, 2023
26b0aa6
Merge branch 'main' of https://github.com/CSCC012023/final-project-s2…
Maanethdesilva Aug 4, 2023
44c699b
Merge pull request #89 from CSCC012023/CAL-54-bidding-3
williamc99 Aug 4, 2023
5ae7f52
fixed merge
Maanethdesilva Aug 4, 2023
b1183c5
Merge pull request #88 from CSCC012023/CAL-158-MusicPage
Maanethdesilva Aug 4, 2023
83e9a87
Fixed package.json issues
Maanethdesilva Aug 4, 2023
77b5083
CAL 152 Fixed recommendation page
Maanethdesilva Aug 4, 2023
86ac0b9
CAL 152 Implemented recommendation functionality
Maanethdesilva Aug 4, 2023
7ac7eb9
Merge pull request #90 from CSCC012023/CAL-152-Fixed-recommendation-page
Maanethdesilva Aug 4, 2023
542f8b8
CAL-125 updated checkout-success route
ShadmanT Aug 4, 2023
061d3da
Added System Design Doc
ArielleRamgoolie Aug 4, 2023
aa32e61
Added Updated PB
ArielleRamgoolie Aug 4, 2023
ce73b2f
Added Iteration Plan Doc
ArielleRamgoolie Aug 4, 2023
d08c53d
Added sprint review doc
ArielleRamgoolie Aug 4, 2023
43f27d6
Added Burndown Chart
ArielleRamgoolie Aug 4, 2023
b4d87c9
Delete test
ArielleRamgoolie Aug 4, 2023
97c4c5c
Added schedule.pdf
ArielleRamgoolie Aug 4, 2023
ba59054
docs: add sprint 4 mark
winsyuan Aug 7, 2023
1a34858
made the successful transaction and unsuccessful transaction pages lo…
ShadmanT Aug 8, 2023
499f315
fixed a group chat creation problem
cassy18 Aug 8, 2023
6795ec4
Merge pull request #91 from CSCC012023/MessagePageBugFixes
cassy18 Aug 8, 2023
d850f56
Add Standup Notes to doc folder
williamc99 Aug 10, 2023
04aa2ce
Added Presentation Planning Doc
ArielleRamgoolie Aug 10, 2023
ffd2c0b
docs: sprint 3 & 4 remarks
winsyuan Aug 15, 2023
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
Prev Previous commit
Next Next commit
CAL-154 Update Message Page
Tasif1 committed Aug 1, 2023
commit 7d34836bfbbb7dfca33f63670229b1f7db353081
1 change: 0 additions & 1 deletion src/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/client/package.json
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@
"@types/jest": "^27.5.2",
"@types/react": "^18.2.7",
"@types/react-dom": "^18.2.4",
"aos": "^2.3.4",
"axios": "^1.4.0",
"bootstrap": "^5.3.0",
"http-proxy-middleware": "^2.0.6",
5 changes: 3 additions & 2 deletions src/client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -24,11 +24,12 @@ import TransactionPage from './pages/Transaction/TransactionPage';
import SuccessfulTransactionPage from './pages/Transaction/SuccessfulTransactionPage';
import ErrorPage from './pages/Error/ErrorPage';
import MessagePage from './pages/MessagePage';
import MessageSearch from './pages/MessageSearch';
import UpdatedMessagePage from './pages/MessagePage2'
import Landing2 from './pages/Landing2';
import SellerDashboardPage from './pages/SellerDashboardPage';
import AdminDashboardPage from './pages/AdminDashboardPage';

import MessageSearch from './pages/MessageSearch';
import 'bootstrap/dist/css/bootstrap.min.css';

import UserCreatedPage from './pages/UserCreatedPage';
@@ -90,7 +91,7 @@ function App() {
<Route path="/testing" element={<TestingPage />} />
<Route path="/testing2" element={<TestingPageNeo />} />
<Route path="/error" element={<ErrorPage />} />
<Route path="/message" element={<MessagePage />} />
<Route path="/message" element={<UpdatedMessagePage />} />
<Route path="/message/search" element={<MessageSearch />} />
<Route path="/successful" element={<UserCreatedPage />} />

34 changes: 34 additions & 0 deletions src/client/src/pages/Message/ChatCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React, { useState } from 'react'

interface Props {
chat: {
id: string,
name: string,
pic: string,
users: {
id: string,
name: string,
username: string,
pic: string
}[],
lastMessage: string
isOnline: boolean
}
}

function ChatCard({ chat }: Props) {
return (
<div className="flex flex-row space-x-3 items-center">
<div className="flex relative">
<img src={chat.pic} alt={chat.name} className="w-12 h-12 rounded-full" />
{chat.isOnline && <div className="absolute right-0 bottom-0 w-3 h-3 bg-green-500 rounded-full border-2 border-white"></div>}
</div>
<div className="flex-col hidden md:flex">
<p className="flex font-semibold text-md text-ellipsis overflow-hidden whitespace-nowrap justify-start">{chat.name}</p>
<p className="flex font-light text-sm text-ellipsis overflow-hidden whitespace-nowrap justify-start">{chat.lastMessage}</p>
</div>
</div>
);
}

export default ChatCard;
46 changes: 46 additions & 0 deletions src/client/src/pages/Message/MessageItem.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React from 'react'

interface Props {
message: {
content: string,
sender: {
id: string,
name: string,
pic: string
},
createdAt: string
},
isMine: boolean
}

function MessageItem({ message, isMine }: Props) {
return (
isMine ? (
<div className="flex flex-col w-full items-end">
<div className="flex flex-row space-x-2 items-center">
<p className="flex text-md text-ellipsis overflow-hidden whitespace-nowrap justify-start">{message.sender.name}</p>
<img src={message.sender.pic} alt={message.sender.name} className="w-12 h-12 rounded-full" />
</div>
<div className="flex w-full px-12 justify-end">
<div className="relative text-sm bg-blue-200 px-3 py-2 shadow rounded-xl min-w-[10rem] max-w-[66%]">
{message.content}
</div>
</div>
</div>
) : (
<div className="flex flex-col w-full items-start">
<div className="flex flex-row space-x-2 items-center">
<img src={message.sender.pic} alt={message.sender.name} className="w-12 h-12 rounded-full" />
<p className="flex text-md text-ellipsis overflow-hidden whitespace-nowrap justify-start">{message.sender.name}</p>
</div>
<div className="flex w-full px-12 justify-start">
<div className="relative text-sm bg-gray-200 px-3 py-2 shadow rounded-xl min-w-[10rem] max-w-[66%]">
{message.content}
</div>
</div>
</div>
)
);
}

export default MessageItem;
323 changes: 323 additions & 0 deletions src/client/src/pages/MessagePage2.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,323 @@
import React, { useState, useEffect, useRef } from 'react'
import axios from 'axios'
import { useCookies } from 'react-cookie'
import { useNavigate } from 'react-router-dom';
import { io } from 'socket.io-client'

import { Menu, Transition } from '@headlessui/react'

import HeaderNavBar from '../components/common/HeaderNavBar'
import ChatCard from './Message/ChatCard'
import MessageItem from './Message/MessageItem'


function MessagePage2() {
const [user, setUser] = useState<any>(null);
const [cookies, setCookie, removeCookie] = useCookies(['token']);
const navigate = useNavigate();

const [chats, setChats] = useState<any>([]);
const [displayChats, setDisplayChats] = useState<any>([]); // for search
const [currentChat, setCurrentChat] = useState<any>(null);

const [messages, setMessages] = useState<any>([]);
const [newMessage, setNewMessage] = useState<any>("");
const [arrivalMessage, setArrivalMessage] = useState<any>(null);
const socket = useRef<any>();

const scrollRef = useRef<any>(null);

function scrollToBottom() {
scrollRef?.current?.scrollIntoView({ behavior: "smooth" });
}

function jumpToBottom() {
scrollRef?.current?.scrollIntoView({ behavior: "instant" });
}

function onChatClick(chat: { id: string, name: string, pic: string, users: { id: string, name: string, pic: string }[], lastMessage: string }) {
setCurrentChat(chat);
getCurrentMessages(chat);
}

function searchChats(query: string) {
if (query === "") {
setDisplayChats(chats);
return;
}
setDisplayChats(chats.filter((chat: { name: string }) => chat.name.toLowerCase().includes(query.toLowerCase())));
}

function getIsUserOnline(id: string) {
// Return true or false based on whether the user is online
return true;
}

async function getChats(id: string) {
const { data } = await axios.get(`http://localhost:8080/api/chat/chat/${id}`);
const promiseChats = data.chat.map(async (chat: any) => {
const promiseUsers = chat.users.map(async (user: { _id: string }) => {
const { data } = await axios.get(`http://localhost:8080/api/v0/users/${user._id}`);
return data;
});
const users = await Promise.all(promiseUsers);

const { data } = await axios.get(`http://localhost:8080/api/message/${chat._id}`);
return {
id: chat._id,
name: (chat.users.length === 2) ? users.filter((user) => user.id !== id)[0].name : chat.chatName,
pic: (chat.users.length === 2) ? users.filter((user) => user.id !== id)[0].pic : chat.pic,
users: users.map((user: any) => {
return {
id: user.id,
name: user.name,
username: user.username,
pic: user.pic
}
}),
lastMessage: data.at(-1)?.content,
isOnline: (chat.users.length === 2) ? getIsUserOnline(users.filter((user) => user.id !== id)[0].id) : false
}
});
setChats(await Promise.all(promiseChats));
setDisplayChats(await Promise.all(promiseChats));
}

async function getCurrentMessages(chat: { id: string, users: { id: string, name: string, pic: string }[] }) {
const { data } = await axios.get(`http://localhost:8080/api/message/${chat.id}`);
const promiseMessages = data.map(async (message: any) => {
return {
sender: {
id: message.sender,
name: chat.users.filter((u: { id: string }) => u.id === message.sender)[0].name,
pic: chat.users.filter((u: { id: string }) => u.id === message.sender)[0].pic
},
content: message.content,
createdAt: message.createdAt
}
});
setMessages(await Promise.all(promiseMessages));
}

async function getCurrentUser(id: string) {
const { data } = await axios.get(`http://localhost:8080/api/v0/users/${id}`);
setUser(data);
getChats(id);

socket.current.emit("addUser", id);
socket.current.on("getUsers", (users: any) => {
console.log(users);
});

socket.current.on("getMessage", (data: any) => {
setArrivalMessage({
sender: data.senderId,
content: data.text,
createdAt: Date.now()
});
});
}

async function handleSubmit(e: any) {
e.preventDefault();
if (newMessage === "") return;

const receiverIDs = currentChat.users.filter((u: { id: string }) => u.id !== user.id).map((u: { id: string }) => u.id);
receiverIDs.forEach(async (receiverID: string) => {
socket.current.emit("sendMessage", {
senderId: user.id,
receiverId: receiverID,
text: newMessage,
});
});

const message = {
sender: user.id,
content: newMessage,
chat: currentChat.id
}

const res = await axios.post(`http://localhost:8080/api/message/`, message);
setMessages([...messages, {
sender: {
id: user.id,
name: user.name,
pic: user.pic
},
content: res.data.content,
createdAt: res.data.createdAt
}]);
currentChat.lastMessage = res.data.content;
setNewMessage("");
}

useEffect(() => {
if (arrivalMessage === null) return;
setMessages([...messages, {
sender: {
id: arrivalMessage.sender,
name: currentChat.users.filter((u: { id: string }) => u.id === arrivalMessage.sender)[0].name,
pic: currentChat.users.filter((u: { id: string }) => u.id === arrivalMessage.sender)[0].pic
},
content: arrivalMessage.content,
createdAt: arrivalMessage.createdAt
}]);
currentChat.lastMessage = arrivalMessage.content;
}, [arrivalMessage])

useEffect(() => {
if (messages.length === 0) return;
scrollToBottom();
}, [messages]);

useEffect(() => {
if (user !== null) {
socket.current.emit("addUser", user.id);
socket.current.on("getUsers", (users: any) => {
console.log(users);
});
}
}, [user]);

useEffect(() => {
async function verify() {
if (!cookies.token) {
navigate("/login");
}

const { data } = await axios.post('/api/users/verify', {});
const { status, id } = data;
if (status) {
getCurrentUser(id);
} else {
removeCookie('token');
navigate('/login');
}
}
verify();
socket.current = io("ws://localhost:8900");
}, []);

return (
<div className="flex flex-row">
<HeaderNavBar />
<div className="flex flex-row w-full h-screen pt-16 lg:pt-[7.5rem]">
<div className="flex flex-col flex-shrink-0 w-24 md:w-96 h-full bg-gray-100 relative py-4">
<div className="flex-col space-y-4 pl-6 pr-6 hidden md:flex">
<p className="text-2xl font-semibold">Messages</p>
<div className="w-full relative flex-row">
<div className="pointer-events-none absolute inset-0 pl-2 flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" />
</svg>
</div>
<input className="block w-full bg-white border border-transparent rounded-lg py-2 pl-10 pr-3 text-sm placeholder-gray-400 focus:outline-none focus:bg-gray-200 focus:border-black focus:ring-black focus:text-gray-900 focus:placeholder-gray-500 sm:text-sm"
placeholder="Search" onChange={(e) => searchChats(e.target.value)} />
</div>
</div>
<div className="flex flex-col overflow-y-auto my-4">
{displayChats.map((chat: any) => (
<button key={chat.id} className="py-3 flex items-center relative hover:bg-gradient-to-r from-gray-300 to-transparent focus:outline-none"
onClick={() => onChatClick(chat)}>
<div className="z-10 pl-4 md:pl-6">
<ChatCard chat={chat} />
</div>
{currentChat && currentChat.id === chat.id && (
<div className="absolute h-full w-full bg-gradient-to-r from-gray-300 to-transparent z-0 border-l-4 border-gray-700" />
)}
</button>
))}
</div>
<div className="absolute bottom-0 right-0 mr-4 mb-4 z-20">
<button className="flex items-center justify-center shadow-sm h-12 w-12 bg-darkGrey text-white rounded-full hover:bg-gray-700 active:bg-gray-600 focus:outline-none"
onClick={() => navigate("/message/search")}>
<svg className="w-10 h-10" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
</svg>
</button>
</div>
</div>
{currentChat ? (
<div className="flex flex-col h-full w-full">
<div className="flex flex-row items-center m-4 py-4 px-6 rounded-2xl justify-between shadow">
<div className="flex flex-row space-x-3 items-center">
<div className="flex relative">
<img src={currentChat.pic} alt={currentChat.name} className="w-12 h-12 rounded-full" />
{currentChat.isOnline && <div className="absolute right-0 bottom-0 w-3 h-3 bg-green-500 rounded-full border-2 border-white"></div>}
</div>
<div className="flex flex-col">
<p className="flex font-semibold text-xl text-ellipsis overflow-hidden whitespace-nowrap justify-start">{currentChat.name}</p>
<p className="flex text-md text-elipsis overflow-hidden whitespace-nowrap justify-start">{currentChat.users.filter((u: { id: string }) => u.id !== user.id).map((u: { username: string }) => u.username).join(', ')}</p>
</div>
</div>
<Menu as="div">
<Menu.Button className="flex items-center justify-center bg-gray-100 hover:bg-gray-200 text-gray-400 h-10 w-10 rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M12 6.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 12.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 18.75a.75.75 0 110-1.5.75.75 0 010 1.5z" />
</svg>
</Menu.Button>
<Transition
as={React.Fragment}
enter="transition ease-out duration-100"
enterFrom="transform opacity-0 scale-95"
enterTo="transform opacity-100 scale-100"
leave="transition ease-in duration-75"
leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95">
<Menu.Items className="absolute w-40 mt-1 right-20 bg-white divide-y divide-gray-100 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none">
<div className="px-1 py-1 ">
<Menu.Item>
{({ active }) => (
<button className={`${active ? 'bg-gray-700 text-white' : 'text-gray-900'} group flex rounded-md items-center w-full px-2 py-2 text-sm`}
onClick={() => setCurrentChat(null)}>
Close Chat
</button>
)}
</Menu.Item>
</div>
</Menu.Items>
</Transition>
</Menu>
</div>
<div className="flex flex-col h-full w-full overflow-y-auto p-4 space-y-4"
onLoad={jumpToBottom}>
{messages.length !== 0 ? (
messages.map((message: any) => (
<MessageItem message={message} isMine={message.sender.id === user.id} />
))
) : (
<div className="flex flex-col h-full w-full justify-center items-center">
<p className="text-2xl font-semibold">No messages to show</p>
</div>
)}
<div ref={scrollRef} />
</div>
<form className="w-full p-4 flex flex-row items-center space-x-4"
onSubmit={handleSubmit}>
<div className="w-full relative flex-row">
<div className="pointer-events-none absolute inset-0 pl-4 flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z" />
</svg>
</div>
<input className="block w-full h-12 bg-gray-100 border border-transparent rounded-3xl py-2 pl-14 pr-3 text-sm placeholder-gray-400 focus:outline-none focus:bg-white focus:border-black focus:ring-black focus:text-gray-900 focus:placeholder-gray-500 sm:text-sm"
placeholder="Message" onChange={(e) => setNewMessage(e.target.value)} value={newMessage} />
</div>
<button className="flex items-center justify-center h-12 w-12 rounded-full bg-blue-300 hover:bg-blue-400 active:blue-500 focus:outline-none" type="submit">
<svg className="w-5 h-5 transform rotate-90 -mr-px" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"></path>
</svg>
</button>
</form>
</div>
) : (
<div className="flex flex-col h-full w-full justify-center items-center">
<p className="text-2xl font-semibold">No chat selected</p>
</div>
)}
</div>
</div>
);
}

export default MessagePage2;
2 changes: 1 addition & 1 deletion src/client/src/pages/ProfilePage.tsx
Original file line number Diff line number Diff line change
@@ -208,7 +208,7 @@ function ProfilePage() {
setUser(data);
getArtworksByUsername(data.username);
getMusicByUsername(data.username);
addVisit(data.id);
//addVisit(data.id);
} else {
setPageError(true);
}