Skip to content

Commit 07ddc07

Browse files
authored
Resolution of any value error within [student_id] - Issue #334 (#351)
* renaming Modal import post file name change > > Co-authored-by: Yun Whitman <savannahwhitman1@gmail.com> * rename Modal for clarity and error resolution > > Co-authored-by: Yun Whitman <savannahwhitman1@gmail.com> * removing outdated test comment
1 parent e4d027b commit 07ddc07

File tree

2 files changed

+94
-20
lines changed

2 files changed

+94
-20
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
.editForm {
2+
width: 100%;
3+
}
4+
5+
.modalContent {
6+
position: absolute;
7+
top: 25%;
8+
left: 50%;
9+
transform: translate(-50%);
10+
width: 400;
11+
background-color: white;
12+
border: 1px solid #000;
13+
border-radius: 10px;
14+
box-shadow: 24;
15+
padding: 3rem;
16+
}
17+
18+
.editModalContent {
19+
position: absolute;
20+
top: 50%;
21+
left: 50%;
22+
transform: translate(-50%, -50%);
23+
width: 80%;
24+
height: auto;
25+
background-color: white;
26+
border: 1px solid var(--on-primary-container);
27+
border-radius: 10px;
28+
box-shadow: 24;
29+
padding: 2rem;
30+
color: var(--on-primary-container);
31+
font-family: var(--inter);
32+
}
33+
34+
.editModalHeader {
35+
font-family: var(--quicksand);
36+
font-weight: var(--semibold);
37+
font-size: var(--h4);
38+
text-align: center;
39+
}
40+
41+
.editModalContainer {
42+
background-color: #ffffff;
43+
border-radius: 10px;
44+
padding: 10px 20px;
45+
}
46+
47+
.editModalTextfield {
48+
width: 100%;
49+
}
50+
51+
.editModalContainerButtons {
52+
margin-top: 1rem;
53+
padding: 10px 20px;
54+
}
55+
56+
.editModalButtonWrap {
57+
display: flex;
58+
justify-content: space-between;
59+
width: 100%;
60+
}
61+
62+
/* Small Devices, Tablets */
63+
@media only screen and (min-width: 768px) {
64+
.editModalContent {
65+
width: 60%;
66+
}
67+
}
68+
69+
/* Medium Devices, Desktops */
70+
@media only screen and (min-width: 992px) {
71+
.editModalContent {
72+
width: 40%;
73+
}
74+
}

src/pages/students/[student_id].tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import $Image from "../../styles/Image.module.css";
1010
import $button from "@/components/design_system/button/Button.module.css";
1111
import $Form from "../../styles/Form.module.css";
1212
import $input from "@/styles/Input.module.css";
13-
import $Modal from "@/components/design_system/modal/Modal.module.css";
13+
import $CompassModal from "../../components/design_system/modal/CompassModal.module.css";
1414
import $StudentPage from "../../styles/StudentPage.module.css";
1515

1616
import * as React from "react";
@@ -159,51 +159,51 @@ const ViewStudentPage = () => {
159159
aria-labelledby="modal-modal-title"
160160
aria-describedby="modal-modal-description"
161161
>
162-
<Box className={$Modal.editModalContent}>
163-
<p id="modal-modal-title" className={$Modal.editModalHeader}>
162+
<Box className={$CompassModal.editModalContent}>
163+
<p id="modal-modal-title" className={$CompassModal.editModalHeader}>
164164
Editing {student?.first_name || "Student"}&apos;s Profile
165165
</p>
166166
<Typography id="modal-modal-description" sx={{ mt: 2 }}>
167167
<Stack gap={0.5} sx={{ width: "100%" }}>
168168
<form
169-
className={$Modal.editForm}
169+
className={$CompassModal.editForm}
170170
id="edit"
171171
onSubmit={handleEditStudent}
172172
>
173173
<Stack gap={0.5}>
174-
<Container className={$Modal.editModalContainer}>
174+
<Container className={$CompassModal.editModalContainer}>
175175
<TextField
176-
className={$Modal.editModalTextfield}
176+
className={$CompassModal.editModalTextfield}
177177
label="First Name"
178178
type="text"
179179
name="firstName"
180180
defaultValue={student?.first_name || ""}
181181
required
182182
/>
183183
</Container>
184-
<Container className={$Modal.editModalContainer}>
184+
<Container className={$CompassModal.editModalContainer}>
185185
<TextField
186-
className={$Modal.editModalTextfield}
186+
className={$CompassModal.editModalTextfield}
187187
label="Last Name"
188188
type="text"
189189
name="lastName"
190190
defaultValue={student?.last_name || ""}
191191
required
192192
/>
193193
</Container>
194-
<Container className={$Modal.editModalContainer}>
194+
<Container className={$CompassModal.editModalContainer}>
195195
<TextField
196-
className={$Modal.editModalTextfield}
196+
className={$CompassModal.editModalTextfield}
197197
label="Email"
198198
type="text"
199199
name="email"
200200
defaultValue={student?.email || ""}
201201
required
202202
/>
203203
</Container>
204-
<Container className={$Modal.editModalContainer}>
204+
<Container className={$CompassModal.editModalContainer}>
205205
<TextField
206-
className={$Modal.editModalTextfield}
206+
className={$CompassModal.editModalTextfield}
207207
label="Grade"
208208
type="number"
209209
name="grade"
@@ -213,9 +213,9 @@ const ViewStudentPage = () => {
213213
</Container>
214214
{activeIep != null && (
215215
<div>
216-
<Container className={$Modal.editModalContainer}>
216+
<Container className={$CompassModal.editModalContainer}>
217217
<TextField
218-
className={$Modal.editModalTextfield}
218+
className={$CompassModal.editModalTextfield}
219219
label="IEP Start Date"
220220
type="date"
221221
name="start_date"
@@ -224,9 +224,9 @@ const ViewStudentPage = () => {
224224
required
225225
/>
226226
</Container>
227-
<Container className={$Modal.editModalContainer}>
227+
<Container className={$CompassModal.editModalContainer}>
228228
<TextField
229-
className={$Modal.editModalTextfield}
229+
className={$CompassModal.editModalTextfield}
230230
label="IEP End Date"
231231
type="date"
232232
name="end_date"
@@ -240,8 +240,8 @@ const ViewStudentPage = () => {
240240
</Stack>
241241
</form>
242242

243-
<Container className={$Modal.editModalContainerButtons}>
244-
<Box className={$Modal.editModalButtonWrap}>
243+
<Container className={$CompassModal.editModalContainerButtons}>
244+
<Box className={$CompassModal.editModalButtonWrap}>
245245
<Button
246246
onClick={handleMainState}
247247
className={`${$button.secondary}`}
@@ -344,7 +344,7 @@ const ViewStudentPage = () => {
344344
aria-labelledby="archiving-student"
345345
aria-describedby="archiving-current-student"
346346
>
347-
<Box className={$Modal.modalContent}>
347+
<Box className={$CompassModal.modalContent}>
348348
<p className={$StudentPage.centerText}>
349349
Are you sure you want to archive
350350
</p>
@@ -377,7 +377,7 @@ const ViewStudentPage = () => {
377377
aria-labelledby="create-student-iep"
378378
aria-describedby="modal for creating student iep"
379379
>
380-
<Box className={$Modal.modalContent}>
380+
<Box className={$CompassModal.modalContent}>
381381
<p className={$StudentPage.centerText}>Create an IEP for</p>
382382
<p className={$StudentPage.centerText}>
383383
<b>

0 commit comments

Comments
 (0)