Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Degree and Semester fields from application form #2

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions backend/src/db/migrations/0000_empty_texas_twister.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ CREATE TABLE IF NOT EXISTS "applications" (
"email" varchar(255) NOT NULL,
"phone" varchar(50),
"course_id" integer NOT NULL,
"semester" integer,
"degree" varchar(50),
"experience" varchar,
"status" "applicationstatus" DEFAULT 'pending' NOT NULL,
"messaged" boolean DEFAULT false,
Expand Down
12 changes: 0 additions & 12 deletions backend/src/db/migrations/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,6 @@
"primaryKey": false,
"notNull": true
},
"semester": {
"name": "semester",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"degree": {
"name": "degree",
"type": "varchar(50)",
"primaryKey": false,
"notNull": false
},
"experience": {
"name": "experience",
"type": "varchar",
Expand Down
2 changes: 0 additions & 2 deletions backend/src/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ export const applications = pgTable('applications', {
courseId: integer('course_id')
.notNull()
.references(() => courses.id),
semester: integer('semester'),
degree: varchar('degree', { length: 50 }),
experience: varchar('experience'),
status: applicationStatus('status').notNull().default('pending'),
messaged: boolean('messaged').default(false),
Expand Down
4 changes: 0 additions & 4 deletions backend/src/models/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export const InsertApplication = BaseSchema.pick({
email: true,
phone: true,
courseId: true,
semester: true,
degree: true,
}).extend({
fields: z.array(z.number().int().positive()),
})
Expand All @@ -25,8 +23,6 @@ export const UpdateApplication = BaseSchema.partial()
email: true,
phone: true,
courseId: true,
semester: true,
degree: true,
messaged: true,
talked: true,
clubBriefed: true,
Expand Down
9 changes: 0 additions & 9 deletions frontend/app/components/ApplicationDetailDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,6 @@ const onSubmit = handleSubmit(async (values) => {
<small class="sm:col-span-2">Please provide your private email address, not your THA email address.</small>
<FormInputText name="phone" label="Phone" class="sm:col-span-2" />

<FormInputText name="degree" label="Degree" />
<FormInputNumber
name="semester"
label="Semester"
:use-grouping="false"
:min="0"
show-buttons
/>

<FormSelect
name="courseId"
label="Course"
Expand Down
2 changes: 0 additions & 2 deletions frontend/app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ function closeDetailDialog(): void {
<Column field="firstName" header="First name" sortable />
<Column field="lastName" header="Last name" sortable />
<Column field="course.name" header="Course" sortable />
<Column field="semester" header="Semester" sortable />
<Column field="degree" header="Degree" sortable />
<Column field="fields" header="Fields" sortable>
<template #body="slotProps">
{{ formatFields(slotProps.data.fields) }}
Expand Down
2 changes: 0 additions & 2 deletions frontend/app/types/applicaion.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ export const AddApplication = z.object({
lastName: z.string().max(100),
email: z.string().email().max(255),
phone: z.string().max(50).nullish(),
semester: z.number().nullish(),
degree: z.string().max(50).nullish(),
courseId: z.number(),
fields: z.array(z.number()),
messaged: z.boolean().optional(),
Expand Down