Skip to content

Commit

Permalink
[makeup Exam] Added semester select to form.
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuel-Palestino committed Jan 20, 2024
1 parent 4047771 commit 819f84a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
28 changes: 27 additions & 1 deletion app/ui/makeup_exam/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { MakeUpExam } from "@/src/models/MakeUpExam"
import { Card, CardBody } from "@nextui-org/card"
import { Input } from "@nextui-org/input"
import { Radio, RadioGroup } from "@nextui-org/radio"
import { Button } from "@nextui-org/react"
import { Button } from "@nextui-org/button"
import { Select, SelectItem } from "@nextui-org/select"
import { Controller, useForm } from "react-hook-form"
import { PDFWrapper } from "../PDFWrapper"
import { Format } from "@/app/printingFormats/makeup_exam/Format"
Expand All @@ -27,6 +28,7 @@ export const Form = () => {
group: '',
percentageOfScholarship: 100,
courses: '',
semester: 'Primero',
makeUpExamNumber: 1,
retakenCourses: 0,

Expand Down Expand Up @@ -127,6 +129,30 @@ export const Form = () => {
)}
/>

<Controller
name="semester"
control={control}
render={({ field }) => (
<Select
label="Semestre"
isRequired
{...field}
selectedKeys={[field.value]}
>
<SelectItem key="Primero" value="Primero">Primero</SelectItem>
<SelectItem key="Segundo" value="Segundo">Segundo</SelectItem>
<SelectItem key="Tercero" value="Tercero">Tercero</SelectItem>
<SelectItem key="Cuarto" value="Cuarto">Cuarto</SelectItem>
<SelectItem key="Quinto" value="Quinto">Quinto</SelectItem>
<SelectItem key="Sexto" value="Sexto">Sexto</SelectItem>
<SelectItem key="Séptimo" value="Séptimo">Séptimo</SelectItem>
<SelectItem key="Octavo" value="Octavo">Octavo</SelectItem>
<SelectItem key="Noveno" value="Noveno">Noveno</SelectItem>
<SelectItem key="Décimo" value="Décimo">Décimo</SelectItem>
</Select>
)}
/>

<Controller
name="makeUpExamNumber"
control={control}
Expand Down
1 change: 1 addition & 0 deletions src/models/MakeUpExam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface MakeUpExam {
group: string
percentageOfScholarship: number
courses: string
semester: string
makeUpExamNumber: number
retakenCourses: number
}

0 comments on commit 819f84a

Please sign in to comment.