diff --git a/prisma/migrations/20240611081720_init/migration.sql b/prisma/migrations/20240611081720_init/migration.sql deleted file mode 100644 index e89dbc8..0000000 --- a/prisma/migrations/20240611081720_init/migration.sql +++ /dev/null @@ -1,25 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" TEXT NOT NULL, - "email" TEXT NOT NULL, - "name" TEXT NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Response" ( - "id" TEXT NOT NULL, - "type" TEXT NOT NULL, - "question" TEXT NOT NULL, - "response" TEXT NOT NULL, - "userId" TEXT NOT NULL, - - CONSTRAINT "Response_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); - --- AddForeignKey -ALTER TABLE "Response" ADD CONSTRAINT "Response_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/20240612193058_update/migration.sql b/prisma/migrations/20240612193058_update/migration.sql deleted file mode 100644 index 094068b..0000000 --- a/prisma/migrations/20240612193058_update/migration.sql +++ /dev/null @@ -1,8 +0,0 @@ -/* - Warnings: - - - You are about to drop the column `type` on the `Response` table. All the data in the column will be lost. - -*/ --- AlterTable -ALTER TABLE "Response" DROP COLUMN "type"; diff --git a/prisma/migrations/20240617064507_update/migration.sql b/prisma/migrations/20240617064507_update/migration.sql deleted file mode 100644 index cb1d153..0000000 --- a/prisma/migrations/20240617064507_update/migration.sql +++ /dev/null @@ -1,22 +0,0 @@ -/* - Warnings: - - - A unique constraint covering the columns `[registrationNumber]` on the table `User` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[phoneNumber]` on the table `User` will be added. If there are existing duplicate values, this will fail. - - Added the required column `firstPreference` to the `User` table without a default value. This is not possible if the table is not empty. - - Added the required column `phoneNumber` to the `User` table without a default value. This is not possible if the table is not empty. - - Added the required column `registrationNumber` to the `User` table without a default value. This is not possible if the table is not empty. - - Added the required column `secondPreference` to the `User` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE "User" ADD COLUMN "firstPreference" TEXT NOT NULL, -ADD COLUMN "phoneNumber" TEXT NOT NULL, -ADD COLUMN "registrationNumber" TEXT NOT NULL, -ADD COLUMN "secondPreference" TEXT NOT NULL; - --- CreateIndex -CREATE UNIQUE INDEX "User_registrationNumber_key" ON "User"("registrationNumber"); - --- CreateIndex -CREATE UNIQUE INDEX "User_phoneNumber_key" ON "User"("phoneNumber"); diff --git a/prisma/migrations/20240617065824_update/migration.sql b/prisma/migrations/20240617065824_update/migration.sql deleted file mode 100644 index 25bdf5e..0000000 --- a/prisma/migrations/20240617065824_update/migration.sql +++ /dev/null @@ -1,5 +0,0 @@ --- AlterTable -ALTER TABLE "User" ALTER COLUMN "firstPreference" DROP NOT NULL, -ALTER COLUMN "phoneNumber" DROP NOT NULL, -ALTER COLUMN "registrationNumber" DROP NOT NULL, -ALTER COLUMN "secondPreference" DROP NOT NULL; diff --git a/prisma/migrations/20240617153032_update/migration.sql b/prisma/migrations/20240617153032_update/migration.sql deleted file mode 100644 index 6a1b199..0000000 --- a/prisma/migrations/20240617153032_update/migration.sql +++ /dev/null @@ -1,8 +0,0 @@ -/* - Warnings: - - - Added the required column `dept` to the `Response` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE "Response" ADD COLUMN "dept" TEXT NOT NULL; diff --git a/prisma/migrations/20240617160424_update/migration.sql b/prisma/migrations/20240617160424_update/migration.sql deleted file mode 100644 index aba06cd..0000000 --- a/prisma/migrations/20240617160424_update/migration.sql +++ /dev/null @@ -1,11 +0,0 @@ -/* - Warnings: - - - Added the required column `limit` to the `Response` table without a default value. This is not possible if the table is not empty. - - Added the required column `required` to the `Response` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE "Response" ADD COLUMN "limit" INTEGER NOT NULL, -ADD COLUMN "options" TEXT[], -ADD COLUMN "required" BOOLEAN NOT NULL; diff --git a/prisma/migrations/20240617161752_update/migration.sql b/prisma/migrations/20240617161752_update/migration.sql deleted file mode 100644 index 3efb0d8..0000000 --- a/prisma/migrations/20240617161752_update/migration.sql +++ /dev/null @@ -1,10 +0,0 @@ -/* - Warnings: - - - The `options` column on the `Response` table would be dropped and recreated. This will lead to data loss if there is data in the column. - -*/ --- AlterTable -ALTER TABLE "Response" ALTER COLUMN "limit" DROP NOT NULL, -DROP COLUMN "options", -ADD COLUMN "options" JSONB; diff --git a/prisma/migrations/20240617162023_update/migration.sql b/prisma/migrations/20240617162023_update/migration.sql deleted file mode 100644 index 606e529..0000000 --- a/prisma/migrations/20240617162023_update/migration.sql +++ /dev/null @@ -1,8 +0,0 @@ -/* - Warnings: - - - Added the required column `type` to the `Response` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE "Response" ADD COLUMN "type" TEXT NOT NULL; diff --git a/prisma/migrations/20240617162100_update/migration.sql b/prisma/migrations/20240617162100_update/migration.sql deleted file mode 100644 index df754f9..0000000 --- a/prisma/migrations/20240617162100_update/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE "Response" ALTER COLUMN "required" DROP NOT NULL; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml deleted file mode 100644 index fbffa92..0000000 --- a/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "postgresql" \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma deleted file mode 100644 index 8119fee..0000000 --- a/prisma/schema.prisma +++ /dev/null @@ -1,40 +0,0 @@ -generator client { - provider = "prisma-client-js" -} - -datasource db { - provider = "postgresql" - url = env("DATABASE_URL") - directUrl = env("DIRECT_URL") -} - -model User { - id String @id @default(uuid()) - - email String @unique - name String - - registrationNumber String? @unique - phoneNumber String? @unique - - firstPreference String? - secondPreference String? - - responses Response[] -} - -model Response { - id String @id @default(uuid()) - - question String - response String - - dept String - type String - options Json? - limit Int? - required Boolean? - - user User @relation(fields: [userId], references: [id]) - userId String -} diff --git a/src/lib/components/forms/Navbar.svelte b/src/lib/components/forms/Navbar.svelte deleted file mode 100644 index 0b37b2c..0000000 --- a/src/lib/components/forms/Navbar.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/src/lib/components/forms/questions/Checkbox.svelte b/src/lib/components/forms/questions/Checkbox.svelte deleted file mode 100644 index 9891e56..0000000 --- a/src/lib/components/forms/questions/Checkbox.svelte +++ /dev/null @@ -1,64 +0,0 @@ - - -
- {#each fields as field} -
- - - {field} - -
- {/each} -
diff --git a/src/lib/components/forms/questions/Radio.svelte b/src/lib/components/forms/questions/Radio.svelte deleted file mode 100644 index 5999fe3..0000000 --- a/src/lib/components/forms/questions/Radio.svelte +++ /dev/null @@ -1,50 +0,0 @@ - - -
- {#each fields as field} -
- - - {field} - -
- {/each} -
diff --git a/src/lib/components/forms/questions/Text.svelte b/src/lib/components/forms/questions/Text.svelte deleted file mode 100644 index 44fb0fb..0000000 --- a/src/lib/components/forms/questions/Text.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/src/lib/components/forms/questions/Textarea.svelte b/src/lib/components/forms/questions/Textarea.svelte deleted file mode 100644 index 2df53ac..0000000 --- a/src/lib/components/forms/questions/Textarea.svelte +++ /dev/null @@ -1,25 +0,0 @@ - - - diff --git a/src/lib/components/home/Departments.svelte b/src/lib/components/home/Departments.svelte deleted file mode 100644 index 6d6a452..0000000 --- a/src/lib/components/home/Departments.svelte +++ /dev/null @@ -1,43 +0,0 @@ - - -
-
- Departments -
- -
-
- {#each settings.club.departments as element} -
-
- {element.name} -
-
{element.name}
-
{element.description}
-
- {element.head} - - - -
-
-
-
- {/each} -
-
-
diff --git a/src/lib/components/home/Principles.svelte b/src/lib/components/home/Principles.svelte deleted file mode 100644 index 3019507..0000000 --- a/src/lib/components/home/Principles.svelte +++ /dev/null @@ -1,20 +0,0 @@ - - -
-
- Principles -
- -
- {#each settings.club.principles as element} -
- {element.name} - {element.description} -
- {/each} -
-
diff --git a/src/lib/stores.ts b/src/lib/stores.ts deleted file mode 100644 index 491a780..0000000 --- a/src/lib/stores.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { writable } from 'svelte/store'; - -import type { User } from '../app.d.ts'; - -export const user = writable(null); diff --git a/src/lib/supabase.ts b/src/lib/supabase.ts deleted file mode 100644 index bc75f62..0000000 --- a/src/lib/supabase.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { createClient } from '@supabase/supabase-js'; -import { PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_ANON_KEY } from '$env/static/public'; - -export const supabase = createClient(PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_ANON_KEY); diff --git a/src/lib/utils.ts b/src/lib/utils.ts deleted file mode 100644 index 441c17d..0000000 --- a/src/lib/utils.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function generateUUID() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - const r = (Math.random() * 16) | 0, - v = c == 'x' ? r : (r & 0x3) | 0x8; - return v.toString(16); - }); -} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 4b6b5f4..a6c0ee5 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,21 +1,7 @@
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index d562240..eb093f9 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,13 +1,8 @@
diff --git a/src/routes/auth/+page.svelte b/src/routes/auth/+page.svelte deleted file mode 100644 index f1478f3..0000000 --- a/src/routes/auth/+page.svelte +++ /dev/null @@ -1,123 +0,0 @@ - - -
-
- {action.charAt(0).toUpperCase() + action.slice(1)} - -
- {#if action !== 'login'} -
- - -
- {/if} -
- - -
-
- - -
-
-
- - -
-
- -
-
-
diff --git a/src/routes/details/+layout.svelte b/src/routes/details/+layout.svelte deleted file mode 100644 index 4a048f4..0000000 --- a/src/routes/details/+layout.svelte +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/src/routes/details/+page.svelte b/src/routes/details/+page.svelte deleted file mode 100644 index 7ec82e4..0000000 --- a/src/routes/details/+page.svelte +++ /dev/null @@ -1,232 +0,0 @@ - - -{#if loading === true} -
-{:else} -
-
-
- {#if start} - Hey {$user?.name}! Let's get to know you a bit better... - {:else if questionIdx === 0} -
- - -
- {:else if questionIdx === 1} -
- - -
- {:else if questionIdx === 2} -
- - {#each questions[2].options as option} - {#if option === firstPreference} -
- { - firstPreference = option; - }} - class="p-2 rounded-lg bg-background-lighter accent-primary" - /> - -
- {:else} -
- { - firstPreference = option; - }} - class="p-2 rounded-lg bg-background-lighter accent-primary" - /> - -
- {/if} - {/each} -
- {:else if questionIdx === 3} -
- - {#each questions[2].options as option} - {#if option === secondPreference} -
- { - secondPreference = option; - }} - class="p-2 rounded-lg bg-background-lighter accent-primary" - /> - -
- {:else} -
- { - secondPreference = option; - }} - class="p-2 rounded-lg bg-background-lighter accent-primary" - /> - -
- {/if} - {/each} -
- {:else} - That's great! Let's proceed to answering questions per department... - {/if} -
-
- -
- {#if start === false} - - {/if} - {#if questionIdx <= 3 || (!start && questionIdx === 4)} - - {/if} -
-
-{/if} diff --git a/src/routes/form/+layout.svelte b/src/routes/form/+layout.svelte deleted file mode 100644 index 04d95e1..0000000 --- a/src/routes/form/+layout.svelte +++ /dev/null @@ -1,10 +0,0 @@ - - -
- -
- -
-
diff --git a/src/routes/form/+page.svelte b/src/routes/form/+page.svelte deleted file mode 100644 index 48438e4..0000000 --- a/src/routes/form/+page.svelte +++ /dev/null @@ -1,246 +0,0 @@ - - -{#if loading === true} -
-{:else} -
- - -
-
- -
- {#if selected === 'firstPref'} - {#each firstPrefResponses as question, i} -
- {i + 1}. {question.question} - {question.required ? 'required' : ''} -
- {#if question.type === 'text'} - - {:else if question.type === 'textarea'} -