+
+ {toastMessage && (
+
+ {toastMessage}
+
+ )}
+
+ {team && !team.data.team ?
+ (
+
Team Information for {team.data.assignment.name}
+
You no longer have a team!
+
+
) :
+ team?.data.team &&
+
+
+
Team
+
+ {!editMode ? (
+
+ {" "}
+ {teamName}{" "}
+
+ ) : (
+
+ )}
+
+
for {team.data.assignment.name}
+ {!editMode && (
)}
+
+
+
Team members
+
+
+
+ | Username |
+ Name |
+ Email address |
+ Review action |
+
+
+
+ {team &&
+ team.data.team.members.map((participant: any) => (
+
+ | {participant.user.username} |
+ {participant.user.fullName} |
+ {participant.user.email} |
+
+ {participant.id !== Number(studentId) &&
+ Review
+ }
+ |
+
+ ))}
+
+
+
+
+
+
+
Invite a teammate
+ {team.data.team.team_size < team?.data.assignment.max_team_size ?
:
+
You cannot invite new members as there is no room on your team.
}
+
+
+ {team.data.team.sign_up_topic && team.data.team.signed_up_team &&
+
Advertise for teammates
+ {adExist ?
+
+
+
+
+ | Topic |
+ Desired Qualifications |
+ Action |
+
+
+
+
+ | {team.data.team.sign_up_topic.topic_name} |
+
+
+ {items.map((item, index) => (
+
+ {item}
+
+ ))}
+
+ |
+
+
+ Manage Advertisement
+
+ |
+
+
+
+
:
+
+ Create advertisement
+ }
+
}
+
+
}
+
+ {sentInvitations && sentInvitations.data.length > 0 &&
+
Sent invitations
+ {sentInvitations && sentInvitations.data.length > 0 && (
+
+
+
+ | Username |
+ Name |
+ Email address |
+ Action |
+
+
+
+ {
+ sentInvitations.data.map((invite: any) => (
+
+ | {invite.to_participant.user.name} |
+ {invite.to_participant.user.full_name} |
+ {invite.to_participant.user.email} |
+
+ {invite.reply_status === 'W' ?
+ :
+ replyStatus(invite.reply_status)}
+ |
+
+ ))}
+
+
+ )}
+
}
+ {receivedInvitations && receivedInvitations.data.length > 0 &&
+
Received invitations
+ {receivedInvitations && receivedInvitations.data.length > 0 && (
+
+
+
+ | Team |
+ Action |
+
+
+
+ {
+ receivedInvitations.data.map((invite: any) => (
+
+ | {invite.from_team.name} |
+
+ {invite.reply_status === 'W' ?
+ <>
+
+ |
+
+ > :
+ replyStatus(invite.reply_status)
+ }
+ |
+
+ ))}
+
+
+ )}
+
}
+
+ );
+};
+
+export default StudentTeamView;
\ No newline at end of file
diff --git a/src/pages/Student Teams/TeammateReview.tsx b/src/pages/Student Teams/TeammateReview.tsx
new file mode 100644
index 00000000..c1c90df0
--- /dev/null
+++ b/src/pages/Student Teams/TeammateReview.tsx
@@ -0,0 +1,89 @@
+import React, { useState, FormEvent } from 'react';
+import { Form, Button, FormControl } from 'react-bootstrap';
+
+const TeammateReview = () => {
+ const [lateCount, setLateCount] = useState(0); // State to track the number of times a teammate was late
+ const [comments, setComments] = useState(''); // State for storing user comments
+
+ // Inline CSS styles for component styling
+ const styles = {
+ container: {
+ fontFamily: 'Arial, sans-serif',
+ maxWidth: '1000px',
+ margin: '0 auto',
+ padding: '20px',
+ fontSize: '0.85rem',
+ },
+ header: {
+ marginBottom: '20px',
+ fontSize: '2rem',
+ },
+ formLabel: {
+ fontSize: '0.85rem',
+ fontWeight: 'bold',
+ marginBottom: '10px',
+ },
+ formControl: {
+ fontSize: '0.85rem',
+ borderColor: 'black',
+ borderRadius: '3px',
+ },
+ submitButton: {
+ backgroundColor: 'transparent',
+ borderColor: '#000',
+ borderStyle: 'solid',
+ borderRadius: '0px',
+ color: '#000',
+ fontSize: '0.85rem',
+ padding: '2px 5px',
+ marginTop: '20px',
+ },
+ starRating: {
+ cursor: 'pointer',
+ fontSize: '1.5rem', // Larger font size for better clickability and visibility
+ },
+ };
+
+ // Handles form submission
+ const handleSubmit = (e: FormEvent) => {
+ e.preventDefault();
+ // Redirect to the view page after submitting the review
+ };
+
+ return (
+