Skip to content

Commit bc4306e

Browse files
committed
remve FE log code, import, comment, update progress
1 parent bf12324 commit bc4306e

File tree

6 files changed

+10
-45
lines changed

6 files changed

+10
-45
lines changed

springAssignmentSystem/doc/progress.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,5 @@
102102
- https://youtu.be/d_YH4TnLuhk?si=BmgFG1gWJvDLp5kO
103103

104104
- 20231012
105-
- https://youtu.be/d_YH4TnLuhk?si=BmgFG1gWJvDLp5kO
105+
- https://youtu.be/d_YH4TnLuhk?si=BmgFG1gWJvDLp5kO
106+
- progress : 16:22

springAssignmentSystem/frontend/frontend_app/src/AssignmentView/index.js

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
import React, { useEffect, useInsertionEffect, useState, useRef } from "react";
1+
import React, { useEffect, useState, useRef } from "react";
22
import { useLocalState } from "../util/useLocalStorage";
33
import ajax from "../Services/fetchService";
44
import { Link } from "react-router-dom";
5-
import { Badge, Button, Container } from "react-bootstrap";
6-
5+
import { Button, Container } from "react-bootstrap";
76
import Col from "react-bootstrap/Col";
87
import Form from "react-bootstrap/Form";
98
import Row from "react-bootstrap/Row";
10-
119
import ButtonGroup from "react-bootstrap/ButtonGroup";
1210
import Dropdown from "react-bootstrap/Dropdown";
1311
import DropdownButton from "react-bootstrap/DropdownButton";
14-
1512
import StatusBadge from "../StatusBadge";
1613

1714
const AssignmentView = () => {
@@ -45,7 +42,6 @@ const AssignmentView = () => {
4542

4643
function saveAssignment() {
4744
// call BE API save assignment
48-
4945
// https://youtu.be/2XRQzR4y2yM?si=aiNeLhS3SXsU18HE&t=833
5046
// means when submit an assignment at the first time
5147
if (assignment.status === assignmentStatuses[0].status) {
@@ -103,11 +99,9 @@ const AssignmentView = () => {
10399
// https://youtu.be/K-ywr1I1mr0?si=nFWaN1mbJ8cKub_r&t=845
104100
.then((assignmentsResponse) => {
105101
let assignmentsData = assignmentsResponse.assignment;
106-
107-
console.log("BE response assignmentsData = " + assignmentsData);
108-
console.log("BE response branch = " + assignmentsData.branch);
109-
console.log("BE response githubUrl = " + assignmentsData.githubUrl);
110-
102+
// console.log("BE response assignmentsData = " + assignmentsData);
103+
// console.log("BE response branch = " + assignmentsData.branch);
104+
// console.log("BE response githubUrl = " + assignmentsData.githubUrl);
111105
if (assignmentsData.branch === null) {
112106
assignmentsData.branch = "";
113107
}
@@ -140,9 +134,6 @@ const AssignmentView = () => {
140134
)}
141135
</Col>
142136
<Col>
143-
{/* <Badge pill bg="info" style={{ fontSize: "1.3em" }}>
144-
{assignment.status}
145-
</Badge> */}
146137
<div className="d-flex align-items-start">
147138
<StatusBadge text={assignment.status} />
148139
</div>
@@ -189,14 +180,6 @@ const AssignmentView = () => {
189180
{assignmentEnum.assignmentNum}
190181
</Dropdown.Item>
191182
))}
192-
193-
{/* <Dropdown.Item eventKey="1">Action</Dropdown.Item>
194-
<Dropdown.Item eventKey="2">Another action</Dropdown.Item>
195-
<Dropdown.Item eventKey="3" active>
196-
Active Item
197-
</Dropdown.Item> */}
198-
{/* <Dropdown.Divider />
199-
<Dropdown.Item eventKey="4">Separated link</Dropdown.Item> */}
200183
</DropdownButton>
201184
</Col>
202185
</Form.Group>

springAssignmentSystem/frontend/frontend_app/src/CodeReviewAssignmentView/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ const CodeReviewerAssignmentView = () => {
4949

5050
// https://youtu.be/2XRQzR4y2yM?si=aiNeLhS3SXsU18HE&t=833
5151
// means when submit an assignment at the first time
52-
5352
// https://youtu.be/SOyfQCsOvO4?si=Eu1z9CWZO0c-e3Zq&t=816
5453

5554
console.log(
@@ -101,9 +100,9 @@ const CodeReviewerAssignmentView = () => {
101100
.then((assignmentsResponse) => {
102101
let assignmentsData = assignmentsResponse.assignment;
103102

104-
console.log("BE response assignmentsData = " + assignmentsData);
105-
console.log("BE response branch = " + assignmentsData.branch);
106-
console.log("BE response githubUrl = " + assignmentsData.githubUrl);
103+
// console.log("BE response assignmentsData = " + assignmentsData);
104+
// console.log("BE response branch = " + assignmentsData.branch);
105+
// console.log("BE response githubUrl = " + assignmentsData.githubUrl);
107106

108107
if (assignmentsData.branch === null) {
109108
assignmentsData.branch = "";

springAssignmentSystem/frontend/frontend_app/src/CodeReviewerDashBoard/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import React, { useEffect, useState } from "react";
55
import { useLocalState } from "../util/useLocalStorage";
66
import { Link } from "react-router-dom";
77
import ajax from "../Services/fetchService";
8-
// import Card from "react-bootstrap/Card";
98
import { Button, Card, Col, Row, Badge, Container } from "react-bootstrap";
109
import { useNavigate } from "react-router-dom";
1110
import StatusBadge from "../StatusBadge";

springAssignmentSystem/frontend/frontend_app/src/Dashboard/index.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import React, { useEffect, useState } from "react";
55
import { useLocalState } from "../util/useLocalStorage";
66
import { Link } from "react-router-dom";
77
import ajax from "../Services/fetchService";
8-
// import Card from "react-bootstrap/Card";
98
import { Button, Card, Col, Row, Badge } from "react-bootstrap";
109
import { useNavigate } from "react-router-dom";
1110
import StatusBadge from "../StatusBadge";
@@ -40,20 +39,6 @@ const Dashboard = () => {
4039
console.log("createAssignment ...");
4140
// V2
4241
ajax("/api/assignments/", "POST", getJwt)
43-
// V1
44-
// fetch("/api/assignments/", {
45-
// headers: {
46-
// "Content-type": "application/json",
47-
// Authentication: `Bearer ${getJwt}`,
48-
// },
49-
// method: "POST",
50-
// body: JSON.stringify({ user: "admin-user" }),
51-
// })
52-
// .then((response) => {
53-
// if (response.status === 200) {
54-
// return response.json();
55-
// }
56-
// })
5742
.then((assignment) => {
5843
console.log("BE response = " + assignment);
5944
// redirect to new assignment URL

springAssignmentSystem/frontend/frontend_app/src/Services/fetchService.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//import { useLocalState } from "../util/useLocalStorage";
2-
31
// https://youtu.be/w6YUDqKiT8I?si=fzulkygkBkmQOTDh&t=863
42

53
function ajax(url, requestMethod, jwt, requestBody) {

0 commit comments

Comments
 (0)