Skip to content

Commit

Permalink
fix progress review style issues which were byproduct of mobile resty…
Browse files Browse the repository at this point in the history
…ling
  • Loading branch information
Maddy Carter authored and Maddy Carter committed Oct 16, 2023
1 parent 6504eed commit d5a78c6
Show file tree
Hide file tree
Showing 8 changed files with 1,874 additions and 1,856 deletions.
2,777 changes: 1,389 additions & 1,388 deletions .firebase/hosting.YnVpbGQ.cache

Large diffs are not rendered by default.

25 changes: 0 additions & 25 deletions env.production

This file was deleted.

5 changes: 5 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@
"destination": "/unplugged.html",
"type": 301
},
{
"source": "/yb",
"destination": "/yb.html",
"type": 301
},
{
"source": "/socratic",
"destination": "/socratic.html",
Expand Down
242 changes: 122 additions & 120 deletions src/components/ProgressReviews/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { withFirebase } from "../Firebase";
import * as ROLES from "../../constants/roles";
import TCSEditor from "../TCSEditor";
import { v4 as uuidv4 } from "uuid";
import "./progress.scss";

class ProgressReviews extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -216,141 +217,142 @@ class ProgressReviews extends React.Component {
</div>
<div className="main-content">
<h1>Student Progress</h1>
<div className="grid-container">
{profiles
.sort((profile) => profile.DisplayName)
.filter(
(profile) =>
(classFilter ? classMembers.includes(profile.key) : true) &&
(textFilter.length == 0 ||
profile.Username.toLowerCase().includes(
textFilter.toLowerCase()
) ||
profile.DisplayName.toLowerCase().includes(
textFilter.toLowerCase()
))
)
.map((profile) => (
<>
{!!activeProgress.uid &&
activeProgress.uid === profile.key &&
activeProgress.progresses
.filter((progress) => true)
.map((progress, pIndex) => (
<div
id={profile.key + progress.untutorial.key}
className="project"
>
<div className="aside">
<h3
dangerouslySetInnerHTML={{
__html: progress.untutorial.Title,
}}
/>

{profiles
.sort((profile) => profile.DisplayName)
.filter(
(profile) =>
(classFilter ? classMembers.includes(profile.key) : true) &&
(textFilter.length == 0 ||
profile.Username.toLowerCase().includes(
textFilter.toLowerCase()
) ||
profile.DisplayName.toLowerCase().includes(
textFilter.toLowerCase()
))
)
.map((profile) => (
<>
{!!activeProgress.uid &&
activeProgress.uid === profile.key &&
activeProgress.progresses
.filter((progress) => true)
.map((progress, pIndex) => (
<div
id={profile.key + progress.untutorial.key}
className="project"
>
<div className="aside">
<h3
dangerouslySetInnerHTML={{
__html: progress.untutorial.Title,
}}
/>

<p style={{ fontSize: "14px" }}>Started</p>
<p style={{ fontSize: "14px" }}>Started</p>

{!!progress.URL && progress.URL != "" && (
<a href={progress.URL} target={"_blank"}>
View Project
</a>
)}
</div>
{!!progress.URL && progress.URL != "" && (
<a href={progress.URL} target={"_blank"}>
View Project
</a>
)}
</div>

{progress.steps.length > 0 &&
progress.steps.map((step, i) => (
<>
{(!pendingFilter ||
(pendingFilter &&
step.Status === "PENDING")) && (
<div id={progress.untutorial.key + "" + i}>
<div className="status">
Step {i + 1}
{progress.untutorial.steps[i].Title
? `: ${progress.untutorial.steps[i].Title}`
: ""}
<span
className={
step.Status === "PENDING"
? "pending"
: step.Status === "APPROVED"
? "approved"
: "todo"
}
></span>
</div>
{step.Status == "PENDING" && (
<div className="giveFeedback">
<textarea
id={
"feedback-" +
progress.untutorial.key +
"" +
i
}
type="text"
value={step.Comments}
placeholder="Feedback..."
onChange={(event) =>
this.onFeedbackUpdate(
profile.key,
progress.untutorial.key,
pIndex,
i,
event.target.value
)
{progress.steps.length > 0 &&
progress.steps.map((step, i) => (
<>
{(!pendingFilter ||
(pendingFilter &&
step.Status === "PENDING")) && (
<div id={progress.untutorial.key + "" + i}>
<div className="status">
Step {i + 1}
{progress.untutorial.steps[i].Title
? `: ${progress.untutorial.steps[i].Title}`
: ""}
<span
className={
step.Status === "PENDING"
? "pending"
: step.Status === "APPROVED"
? "approved"
: "todo"
}
/>
<div>
<button
className="approve"
></span>
</div>
{step.Status == "PENDING" && (
<div className="giveFeedback">
<textarea
id={
"approve-" +
"feedback-" +
progress.untutorial.key +
"" +
i
}
onClick={() =>
this.approveStep(
activeProgress.uid,
type="text"
value={step.Comments}
placeholder="Feedback..."
onChange={(event) =>
this.onFeedbackUpdate(
profile.key,
progress.untutorial.key,
pIndex,
i
i,
event.target.value
)
}
>
Approve
</button>
<button
className="disapprove"
id={
"disapprove-" +
progress.untutorial.key +
"" +
i
}
onClick={() =>
this.disapproveStep(
activeProgress.uid,
progress.untutorial.key,
pIndex,
/>
<div>
<button
className="approve"
id={
"approve-" +
progress.untutorial.key +
"" +
i
)
}
>
Send Back
</button>
}
onClick={() =>
this.approveStep(
activeProgress.uid,
progress.untutorial.key,
pIndex,
i
)
}
>
Approve
</button>
<button
className="disapprove"
id={
"disapprove-" +
progress.untutorial.key +
"" +
i
}
onClick={() =>
this.disapproveStep(
activeProgress.uid,
progress.untutorial.key,
pIndex,
i
)
}
>
Send Back
</button>
</div>
</div>
</div>
)}
</div>
)}
</>
))}
</div>
))}
</>
))}
)}
</div>
)}
</>
))}
</div>
))}
</>
))}
</div>
</div>
</div>
</section>
Expand Down
10 changes: 10 additions & 0 deletions src/components/ProgressReviews/progress.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.main-content {
display: block !important;
margin: 0 !important;
div {
margin: 0 !important;
}
button {
margin: 10px;
}
}
Loading

0 comments on commit d5a78c6

Please sign in to comment.