E2602 - Spring - Frontend Changes#161
Closed
ravisatyarsg wants to merge 0 commit intoexpertiza:mainfrom
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the frontend for the Student Task View (E2602) in React + TypeScript. The previous StudentTasks component was incorrectly implemented as a topic signup sheet. This PR replaces it with a correct task list view and adds a new task detail view, both fully integrated with the backend API.ChangesNew files:
src/pages/StudentTasks/StudentTasks.tsx — rewrites the list view to call GET /student_tasks and render a table of all assigned tasks
src/pages/StudentTasks/StudentTaskDetail.tsx — new detail view calling GET /student_tasks/:id, renders assignment info, team, stage timeline, reviewer feedback, submission feedback, and revision request form
src/pages/StudentTasks/StudentTaskColumns.tsx — TanStack column definitions with clickable assignment name links and colored stage badges
src/pages/StudentTasks/studentTaskTypes.ts — TypeScript interfaces matching the backend as_json response shape
src/pages/StudentTasks/tests/StudentTasks.test.tsx — 14 tests for the list view
src/pages/StudentTasks/tests/StudentTaskDetail.test.tsx — 20 tests for the detail view
Modified files:
src/App.tsx — added StudentTaskDetail import and updated the student_tasks/:participantId route to point to the new detail component
Features
Task list table with assignment, course, topic, current stage badge, stage deadline, and review grade columns
Navigation from list to detail via assignment name link or "View Details" button
Detail page with stage timeline (submission → review → feedback phases with status badges), team members, reviewer feedback, submission feedback, and revision request form
Loading state, empty state, and error state handled in both views
Redux alert dispatched on API failure
Both routes protected with ProtectedRoute
Tests (34 total, all passing)
Rendering: task table, column data, stage badges, grade display
Navigation: assignment name click, View Details button click, back button
States: loading, empty, error alert dispatch
Detail rendering: assignment title, course, stage badge, topic, team, timeline, feedback, submission feedback, revision card
Revision form: show/hide, submit disabled when empty, enabled after typing, existing status display
API: correct URL and method called on mount for both components
Testing
npm test
(press 'p' then type 'StudentTask' to filter to E2602 tests)