Skip to content

Commit

Permalink
Merge pull request #2 from GoliathLabs/remove-degree-semester-fields
Browse files Browse the repository at this point in the history
Remove Degree and Semester fields from application form
  • Loading branch information
GoliathLabs authored Jan 6, 2025
2 parents 3c2d6f8 + 9d68ae9 commit 3b61cba
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 33 deletions.
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

0 comments on commit 3b61cba

Please sign in to comment.