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

Hotfix: Fix users not being able to submit a second feedback #218

Closed
wants to merge 42 commits into from
Closed
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
26952ea
feedback API
SheepTester Mar 29, 2024
6626c15
Merge remote-tracking branch 'origin/main' into sean/event-feedback
SheepTester Mar 30, 2024
fe1ffcb
Feedback form
SheepTester Mar 30, 2024
225dbb5
Create a separate event page:
SheepTester Mar 30, 2024
0579659
Improve feedback submitting experience
SheepTester Mar 30, 2024
5327b01
Feedback page
SheepTester Mar 30, 2024
3758afa
Add statuses
SheepTester Mar 30, 2024
643f232
Switch to ack/ignore buttons
SheepTester Mar 30, 2024
6c0dbe2
Link to feedback page from event modal
SheepTester Mar 30, 2024
b333864
Merge remote-tracking branch 'origin/main' into sean/event-feedback
SheepTester Mar 30, 2024
efe0b0d
Fix event page
SheepTester Mar 30, 2024
fc6684d
Merge remote-tracking branch 'origin/main' into sean/event-feedback
SheepTester Mar 31, 2024
ada0ab0
Restrict view feedback link in admin page
SheepTester Mar 31, 2024
77b2769
Sort feedback by unacknowledged first, if admin
SheepTester Mar 31, 2024
da44726
Update to handle API changes
SheepTester Mar 31, 2024
c372591
Keep most of the theme toggle mounted so only the indicator flickers in
SheepTester Mar 31, 2024
2cce335
Improve "Give feedback" button design
SheepTester Mar 31, 2024
c4b7fd5
Add feedback filter options to getFeedback
SheepTester Mar 31, 2024
62a0d4d
Improve design of some search/filter inputs
SheepTester Mar 31, 2024
bc39690
Add filters to feedback
SheepTester Mar 31, 2024
8d796fa
Actually filter feedback
SheepTester Mar 31, 2024
14df1fb
Show event in feedback card
SheepTester Mar 31, 2024
d4d05eb
tell users to send feedback if they have no feedback
SheepTester Mar 31, 2024
dfd1a2c
show submitted feedback on event page, improve standalone eventdetail…
SheepTester Mar 31, 2024
5f4bc6f
Sort feedback chronologically or SUBMITTED first
SheepTester Mar 31, 2024
fde1cb4
Where did you hear about this event?
SheepTester Mar 31, 2024
e9e22a0
Merge remote-tracking branch 'origin/main' into sean/event-feedback
SheepTester Mar 31, 2024
dab0fb9
Fix type errors I introduced in api types update
SheepTester Mar 31, 2024
96afd31
Show/hide event info separately from user
SheepTester Mar 31, 2024
4614781
Merge remote-tracking branch 'origin/main' into sean/event-feedback
SheepTester Mar 31, 2024
42d950f
i'm about to create a bunch of components for feedback form so move f…
SheepTester Mar 31, 2024
88fdfe1
Feedback question implementation
SheepTester Mar 31, 2024
5de68dc
style checkbox/radio
SheepTester Mar 31, 2024
ed34a4e
adjustments
SheepTester Mar 31, 2024
c7946d5
Add "Add Feedback" button to checkin modal
SheepTester Mar 31, 2024
b29d13d
Merge branch 'main' into sean/event-feedback
SheepTester Apr 1, 2024
a41521f
remove question, adjust response spacing
SheepTester Apr 1, 2024
0f2b3ee
Merge branch 'sean/event-feedback' of https://github.com/acmucsd/memb…
SheepTester Apr 1, 2024
a527c3e
swap add feedback and close buttons in checkin modal
SheepTester Apr 1, 2024
fe07d09
make feedback elevated
SheepTester Apr 1, 2024
eff5f9c
Hotfix: Reduce reliance on backend's feedback filters
SheepTester Apr 1, 2024
1a441de
Merge remote-tracking branch 'origin/main' into sean/event-feedback
SheepTester Apr 2, 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
9 changes: 6 additions & 3 deletions src/pages/events/[uuid].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,21 @@ const getServerSidePropsFunc: GetServerSidePropsWithUser = async ({ params, req,
const token = CookieService.getServerCookie(CookieType.ACCESS_TOKEN, { req, res });

try {
const [event, attendances, [feedback = null]] = await Promise.all([
const [event, attendances, feedback] = await Promise.all([
EventAPI.getEvent(uuid, token),
UserAPI.getAttendancesForCurrentUser(token),
FeedbackAPI.getFeedback(token, { user: user.uuid, event: uuid }),
FeedbackAPI.getFeedback(token),
]);
return {
props: {
title: event.title,
token,
event,
attended: attendances.some(attendance => attendance.event.uuid === uuid),
feedback,
feedback:
feedback.find(
feedback => feedback.event.uuid === uuid && feedback.user.uuid === user.uuid
) ?? null,
},
};
} catch {
Expand Down
Loading