From 3f09489382f4802a3fc3d4e919d630d664c77a3a Mon Sep 17 00:00:00 2001 From: kevin olson Date: Sun, 25 Aug 2024 04:34:26 -0500 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=9A=A7=20laying=20some=20ground=20wro?= =?UTF-8?q?k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/pen/PenCard.vue | 2 ++ app/components/shot/ShotDayForm.vue | 31 +++++++++++++++++++ .../migration.sql | 1 + prisma/migrations/migration_lock.toml | 2 +- prisma/schema/meds.prisma | 1 + 5 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 app/components/shot/ShotDayForm.vue rename prisma/migrations/{20240822065859_init => 20240825024141_init}/migration.sql (99%) diff --git a/app/components/pen/PenCard.vue b/app/components/pen/PenCard.vue index be2a1da..17d5242 100644 --- a/app/components/pen/PenCard.vue +++ b/app/components/pen/PenCard.vue @@ -81,6 +81,8 @@ const items = computed(() => { + + diff --git a/app/components/shot/ShotDayForm.vue b/app/components/shot/ShotDayForm.vue new file mode 100644 index 0000000..489fb81 --- /dev/null +++ b/app/components/shot/ShotDayForm.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/prisma/migrations/20240822065859_init/migration.sql b/prisma/migrations/20240825024141_init/migration.sql similarity index 99% rename from prisma/migrations/20240822065859_init/migration.sql rename to prisma/migrations/20240825024141_init/migration.sql index ebb0ad3..94921f3 100644 --- a/prisma/migrations/20240822065859_init/migration.sql +++ b/prisma/migrations/20240825024141_init/migration.sql @@ -17,6 +17,7 @@ CREATE TABLE `pens` ( `userId` BIGINT NOT NULL, `cartridgeId` BIGINT NULL, `color` VARCHAR(191) NOT NULL, + `shotDay` VARCHAR(191) NULL, `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `updatedAt` DATETIME(3) NOT NULL, diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml index 9bee74d..e5a788a 100644 --- a/prisma/migrations/migration_lock.toml +++ b/prisma/migrations/migration_lock.toml @@ -1,3 +1,3 @@ # Please do not edit this file manually # It should be added in your version-control system (i.e. Git) -provider = "mysql" +provider = "mysql" \ No newline at end of file diff --git a/prisma/schema/meds.prisma b/prisma/schema/meds.prisma index 49e57ee..d1886af 100644 --- a/prisma/schema/meds.prisma +++ b/prisma/schema/meds.prisma @@ -20,6 +20,7 @@ model Pen { cartridge Cartridge? @relation(fields: [cartridgeId], references: [id], onDelete: Restrict) cartridgeId BigInt? @unique color String + shotDay String? createdAt DateTime @default(now()) updatedAt DateTime @updatedAt From 3a5e74c69ac37fed2562faa0230255cc9fba22af Mon Sep 17 00:00:00 2001 From: kevin olson Date: Sun, 25 Aug 2024 05:29:30 -0500 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20proper=20shot=20day?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/cartridge/CartridgeModel.vue | 8 ++++- app/components/pen/PenCard.vue | 2 +- app/components/shot/ShotDayForm.vue | 37 ++++++++++++++++----- app/pages/users/index.vue | 2 +- app/utils/shared.ts | 11 ++++++ server/controllers/pen.ts | 15 ++++++--- server/controllers/pens.ts | 6 +++- 7 files changed, 64 insertions(+), 17 deletions(-) diff --git a/app/components/cartridge/CartridgeModel.vue b/app/components/cartridge/CartridgeModel.vue index c66c6de..444f620 100644 --- a/app/components/cartridge/CartridgeModel.vue +++ b/app/components/cartridge/CartridgeModel.vue @@ -1,7 +1,7 @@ diff --git a/app/pages/users/index.vue b/app/pages/users/index.vue index b85a204..dbb39b1 100644 --- a/app/pages/users/index.vue +++ b/app/pages/users/index.vue @@ -61,7 +61,7 @@ const { data: users } = await useFetch>('/api/all/user')