Welcome to SvelteKit
-Visit svelte.dev/docs/kit to read the documentation
+ + +diff --git a/prisma/migrations/20251124231609_add_year_budget/migration.sql b/prisma/migrations/20251124231609_add_year_budget/migration.sql new file mode 100644 index 0000000..2aec976 --- /dev/null +++ b/prisma/migrations/20251124231609_add_year_budget/migration.sql @@ -0,0 +1,12 @@ +-- RedefineTables +PRAGMA defer_foreign_keys=ON; +PRAGMA foreign_keys=OFF; +CREATE TABLE "new_Year" ( + "year" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + "budget" REAL NOT NULL DEFAULT 3000 +); +INSERT INTO "new_Year" ("year") SELECT "year" FROM "Year"; +DROP TABLE "Year"; +ALTER TABLE "new_Year" RENAME TO "Year"; +PRAGMA foreign_keys=ON; +PRAGMA defer_foreign_keys=OFF; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 746b4e3..1fc1006 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -10,7 +10,8 @@ datasource db { } model Year { - year Int @id + year Int @id + budget Float @default(3000) people Person[] } diff --git a/src/lib/components/atoms/Modal.svelte b/src/lib/components/atoms/Modal.svelte new file mode 100644 index 0000000..741c4d0 --- /dev/null +++ b/src/lib/components/atoms/Modal.svelte @@ -0,0 +1,31 @@ + + +
{gift.description}
+ + {gift.url} + {#if !editing} + {#each gift.url?.split('\n') as line} + + {line} + + {/each} + {/if} ++ Prezenty dla {data?.people?.length || 0} osób +
+Dodaj osoby, aby móc śledzić ich prezenty!
+Visit svelte.dev/docs/kit to read the documentation
+ + +