diff --git a/.gitignore b/.gitignore index 7f5b38cc..c67172a8 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,8 @@ pids *.seed *.pid.lock + + # Directory for instrumented libs generated by jscoverage/JSCover lib-cov diff --git a/client/src/pages/A1InternshipRequestForm.js b/client/src/pages/A1InternshipRequestForm.js index 82950c9c..ee307f08 100644 --- a/client/src/pages/A1InternshipRequestForm.js +++ b/client/src/pages/A1InternshipRequestForm.js @@ -20,7 +20,6 @@ const outcomeDescriptions = [ "Apply computer science algorithms to create practical solutions", ]; -// Signature font options const signatureFonts = [ { name: "Dancing Script", class: "font-dancing-script" }, { name: "Great Vibes", class: "font-great-vibes" }, @@ -29,7 +28,7 @@ const signatureFonts = [ { name: "Caveat", class: "font-caveat" } ]; -// Signature Font Picker Component + const SignatureInput = ({ id, value, onChange, disabled, placeholder }) => { const [showFonts, setShowFonts] = useState(false); const [selectedFont, setSelectedFont] = useState(signatureFonts[0].class); @@ -91,7 +90,7 @@ const SignatureInput = ({ id, value, onChange, disabled, placeholder }) => { const A1InternshipRequestForm = ({ userRole = "student" }) => { const initialState = { interneeName: "", - soonerId: "", + // soonerId: "", interneeEmail: "", workplaceName: "", website: "", @@ -102,10 +101,8 @@ const A1InternshipRequestForm = ({ userRole = "student" }) => { advisorJobTitle: "", advisorEmail: "", interneeSignature: "", - advisorSignature: "", - coordinatorApproval: "", creditHours: "", - tasks: Array(5).fill({ description: "", outcomes: [] }), // Updated for outcomes + tasks: Array(5).fill({ description: "", outcomes: [] }), supervisorComments: "", coordinatorComments: "", }; @@ -223,15 +220,15 @@ const A1InternshipRequestForm = ({ userRole = "student" }) => { const validateForm = () => { const namePattern = /^[A-Za-z\s]+$/; - const numberPattern = /^[0-9]+$/; + // const numberPattern = /^[0-9]+$/; const phonePattern = /^[0-9]{10}$/; const emailPattern = /^[\w.-]+@([\w-]+\.)+[\w-]{2,4}$/; const newErrors = {}; if (!formData.interneeName) newErrors.interneeName = "Internee name is required"; else if (!namePattern.test(formData.interneeName)) newErrors.interneeName = "Name should contain only letters and spaces"; - if (!formData.soonerId) newErrors.soonerId = "Sooner ID is required"; - else if (!numberPattern.test(formData.soonerId)) newErrors.soonerId = "Sooner ID should be numeric"; + //if (!formData.soonerId) newErrors.soonerId = "Sooner ID is required"; + //else if (!numberPattern.test(formData.soonerId)) newErrors.soonerId = "Sooner ID should be numeric"; if (!formData.interneeEmail) newErrors.interneeEmail = "Email is required"; else if (!emailPattern.test(formData.interneeEmail)) newErrors.interneeEmail = "Invalid email format"; if (!formData.workplaceName) newErrors.workplaceName = "Workplace name is required"; @@ -247,12 +244,6 @@ const A1InternshipRequestForm = ({ userRole = "student" }) => { else if (!emailPattern.test(formData.advisorEmail)) newErrors.advisorEmail = "Invalid supervisor email format"; if (!formData.interneeSignature) newErrors.interneeSignature = "Internee signature is required"; else if (!namePattern.test(formData.interneeSignature)) newErrors.interneeSignature = "Signature should contain only letters and spaces"; - if (formData.advisorSignature && !namePattern.test(formData.advisorSignature)) { - newErrors.advisorSignature = "Signature should contain only letters and spaces"; - } - if (formData.coordinatorApproval && !namePattern.test(formData.coordinatorApproval)) { - newErrors.coordinatorApproval = "Approval should contain only letters and spaces"; - } if (!formData.creditHours) newErrors.creditHours = "Please select credit hours"; const tasksFilled = formData.tasks.filter((task) => task.description.trim() !== "").length >= 3; if (!tasksFilled) newErrors.tasks = "At least 3 tasks are required"; @@ -354,7 +345,7 @@ const A1InternshipRequestForm = ({ userRole = "student" }) => { - Name*:
+ First Name*:
{ - - Sooner ID*:
- - {errors.soonerId &&
{errors.soonerId}
} - - - Website:
- - {errors.website &&
{errors.website}
} - - - Job Title:
- - - + + + Last Name:
+ + {errors.website &&
{errors.website}
} + + + + + Website:
+ + {errors.website &&
{errors.website}
} + + + + + Job Title:
+ + + + Email*:
@@ -431,7 +425,7 @@ const A1InternshipRequestForm = ({ userRole = "student" }) => { value={formData.interneeEmail} onChange={handleInputChange} disabled - // disabled={!isFieldEditable("interneeEmail")} + /> {errors.interneeEmail &&
{errors.interneeEmail}
} @@ -559,7 +553,7 @@ const A1InternshipRequestForm = ({ userRole = "student" }) => { - - - - - {/* -
+ Internee Signature*:
{
{errors.interneeSignature &&
{errors.interneeSignature}
}
- Internship Supervisor Signature:
-
- -
- {errors.advisorSignature &&
{errors.advisorSignature}
} -
- Internship Coordinator Approval:
-
- -
- {errors.coordinatorApproval &&
{errors.coordinatorApproval}
} -
-
-