Skip to content

Commit 3267ef5

Browse files
committed
quick commit
1 parent fdaad47 commit 3267ef5

File tree

9 files changed

+19
-10
lines changed

9 files changed

+19
-10
lines changed

src/Components/Content/Content.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function Content() {
3535
<Route path="/studentOverview">
3636
<StudentOverview />
3737
</Route>
38-
<Route path="/singleStudentOverview">
38+
<Route path="/singleStudentOverview/:username">
3939
<SingleStudentOverview />
4040
</Route>
4141
<Route path="/singleStudentMasteryOverview">
@@ -44,7 +44,7 @@ export default function Content() {
4444
<Route path="/singleTargetOverview/:name">
4545
<SingleTargetOverview />
4646
</Route>
47-
<Route path="/singleMissionOverview/:name">
47+
<Route path="/singleMissionOverview/:name/:username">
4848
<SingleMissionOverview />
4949
</Route>
5050
<Route path="/taskList">

src/Components/SingleStudentMasteryOverview/SingleStudentMasteryOverview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ function SingleStudentMasteryOverview() {
509509
firstName: test?.firstName,
510510
lastName: test?.lastName,
511511
};
512-
console.log(inputUser.id);
512+
console.log(inputUser.firstName);
513513

514514
const { data } = useGetTargetProgressQuery({
515515
variables: {

src/Components/SingleStudentOverview/MasteryCard.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ type Props = {
8383
progress: TaskStats[];
8484
status: number;
8585
user: User;
86+
username: string;
8687
};
8788

8889
function getProgressBar(status: number) {
@@ -111,10 +112,10 @@ function getStatusTitle(status: number) {
111112
return 'Mastered';
112113
}
113114

114-
export default function MasteryCard({ name, progress, status, user }: Props) {
115+
export default function MasteryCard({ name, progress, status, user, username }: Props) {
115116
const history = useHistory();
116117
return (
117-
<Link to={{ pathname: `/singleMissionOverview/${name}`, state: user }}>
118+
<Link to={{ pathname: `/singleMissionOverview/${name}/${username}`, state: user }}>
118119
<div className="mission-card">
119120
<div className="mission-card-header" />
120121
<div className="mission-card-body">

src/Components/SingleStudentOverview/SingleMissionOverview.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ function getMissionProgress(missionData: MissionProgress[], name: string) {
140140
function SingleMissionOverview() {
141141
// const { data: users } = useQuery<User>(GET_USERS);
142142
const { name } = useParams<Record<string, string | undefined>>();
143+
// const { username } = useParams<Record<string, string | undefined>>();
144+
const username = 'Google_114813486146105420824';
143145
const classes = useStyles();
144146
const history = useHistory();
145147
console.log(history);
@@ -199,7 +201,7 @@ function SingleMissionOverview() {
199201
// <Link to={`/viewTask/${task.taskId}`} data-testid="task-btn">
200202
<Link
201203
to={{
202-
pathname: `/viewTask/${task.taskId}`,
204+
pathname: `/viewTask/${task.taskId}/${username}`,
203205
state: getTaskObjectiveProgress(task),
204206
}}
205207
data-testid="task-btn"

src/Components/SingleStudentOverview/SingleStudentOverview.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
66
import List from '@material-ui/core/List';
77
import ListItem from '@material-ui/core/ListItem';
88
import styled from 'styled-components';
9-
import { useHistory } from 'react-router-dom';
9+
import { useHistory, useParams } from 'react-router-dom';
1010
import { Divider } from '@material-ui/core';
1111
import StudentPicture from '../../assets/images/images-1.png';
1212
import { User } from '../../interfaces/User';
@@ -133,7 +133,7 @@ function SingleStudentOverview() {
133133
// const { userId } = useParams();
134134
const classes = useStyles();
135135
const history = useHistory();
136-
136+
const { username } = useParams<Record<string, string>>();
137137
const COMP_TASK_PERCENT = 100;
138138

139139
const testVal: any = history.location.state;
@@ -185,6 +185,7 @@ function SingleStudentOverview() {
185185
progress={mission.progress as TaskStats[]}
186186
status={calculateStatus(mission.progress as TaskStats[])}
187187
user={inputUser}
188+
username={username}
188189
/>
189190
))}
190191
</RowDiv>

src/Components/TaskBlocks/FrBlock/FrBlock.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#pointsAwarded {
1+
.indiv-points {
22
width: 25% !important;
33
float: left;
44
}

src/Components/TaskBlocks/FrBlock/FrBlock.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ function FrBlock({
7676
value={values.pointsAwarded}
7777
bsCustomPrefix="d-inline"
7878
id="pointsAwarded"
79+
className="indiv-points"
7980
onChange={handleChange}
8081
onBlur={handleBlur}
8182
/>

src/Components/TaskBlocks/McBlock/McBlock.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ function McBlock({
103103
value={values.pointsAwarded}
104104
bsCustomPrefix="d-inline"
105105
id="pointsAwarded"
106+
className="indiv-points"
106107
onChange={handleChange}
107108
onBlur={handleBlur}
108109
/>

src/Screens/TaskView/Rubric/ObjectiveRubric.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ function ObjectiveRubric({ taskId, username }: { taskId: string; username: strin
3434
{objectiveProgresses.map((objectiveProgress1: TaskObjectiveProgress) => (
3535
<div className="row">
3636
<div className="col-8" style={{ width: '50%' }}>
37-
<MasteryRubricGrading objectiveProgress={objectiveProgress1} username={username} />
37+
<MasteryRubricGrading
38+
objectiveProgress={objectiveProgress1}
39+
username={username}
40+
/>
3841
</div>
3942
<div className="col-4" style={{ paddingTop: '25px', width: '50%' }}>
4043
<Typography>{objectiveProgress1.objective.objectiveName}</Typography>

0 commit comments

Comments
 (0)