When we filter a course page for a particular prof, we expect to only see information / reviews of this prof for this course and nothing else.
The current behavior is to show all course reviews that are not tagged to a prof, along with that particular prof's reviews. Hence filtering for profs that dont have reviews still unexpectedly show reviews in the review section as those reviews are only written for courses and do not have a corresponsing reviewedProfessor
Changes
update reviews trpc procedure's primsa query when fetching for reviews belonging to this course when filtered by a particular prof
Implementation Details
query for reviews with prof slug only when slug exists in the input param of the trpc procedure, otherwise, get all course reviews
How to Test
head to /course/COR-IS1702
filter on profs with 0 reviews
no longer see reviews on review section
Preview / Screenshots
No Filter
Filtering for Prof with Reviews
Stats are different from no filter version as there are course reviews that arent reviewed with a prof
closes #180
Context
When we filter a course page for a particular prof, we expect to only see information / reviews of this prof for this course and nothing else.
The current behavior is to show all course reviews that are not tagged to a prof, along with that particular prof's reviews. Hence filtering for profs that dont have reviews still unexpectedly show reviews in the review section as those reviews are only written for courses and do not have a corresponsing
reviewedProfessor
Changes
update reviews trpc procedure's primsa query when fetching for reviews belonging to this course when filtered by a particular prof
Implementation Details
query for reviews with prof slug only when slug exists in the input param of the trpc procedure, otherwise, get all course reviews
How to Test
/course/COR-IS1702
Preview / Screenshots
No Filter
Filtering for Prof with Reviews
Stats are different from no filter version as there are course reviews that arent reviewed with a prof
Filtering for Prof with Reviews
Checklist