From c8caccf9d51ddaf46a5842ce3862106eecef364b Mon Sep 17 00:00:00 2001 From: Thad Miller Date: Mon, 16 Feb 2026 19:54:20 -0500 Subject: [PATCH 1/3] [feat] bootstrap modal added --- src/assets/css/_bootstrap.scss | 2 +- src/layouts/Main.astro | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/assets/css/_bootstrap.scss b/src/assets/css/_bootstrap.scss index d251a04..f4eef0f 100644 --- a/src/assets/css/_bootstrap.scss +++ b/src/assets/css/_bootstrap.scss @@ -31,7 +31,7 @@ // @import 'bootstrap/scss/forms'; @import 'bootstrap/scss/grid'; // @import 'bootstrap/scss/list-group'; -// @import 'bootstrap/scss/modal'; +@import 'bootstrap/scss/modal'; // @import 'bootstrap/scss/navbar'; // @import 'bootstrap/scss/offcanvas'; // @import 'bootstrap/scss/pagination'; diff --git a/src/layouts/Main.astro b/src/layouts/Main.astro index dd41b03..47b8a70 100644 --- a/src/layouts/Main.astro +++ b/src/layouts/Main.astro @@ -13,5 +13,20 @@ import '/src/assets/css/main.scss'; + \ No newline at end of file From 1a95eb93b0cb6448e484b2b58d8dc6a2a165d153 Mon Sep 17 00:00:00 2001 From: Thad Miller Date: Mon, 16 Feb 2026 20:15:00 -0500 Subject: [PATCH 2/3] [feat] rounding price over $100 --- src/pages/pokemon.astro | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/pages/pokemon.astro b/src/pages/pokemon.astro index 6a2e8ec..024cbb1 100644 --- a/src/pages/pokemon.astro +++ b/src/pages/pokemon.astro @@ -16,6 +16,17 @@ const pokemon = await db.query.cards.findMany({ } }); +const formatPrice = (price:any) => { + if (price === null) { + return "N/A"; + } + price = Number(price); + if (price >= 100) { + return `${Math.round(price)}`; + } + return `${price.toFixed(2)}`; +}; + const order = ["Near Mint", "Lightly Played", "Moderately Played", "Heavily Played", "Damaged"]; --- @@ -46,7 +57,7 @@ const order = ["Near Mint", "Lightly Played", "Moderately Played", "Heavily Play .map((price) => (
{price.condition.split(' ').map((w) => w[0]).join('')} -
${price.marketPrice} +
${formatPrice(price.marketPrice)}
))} From f990d70540f2770d69170723ea2777a951dc514c Mon Sep 17 00:00:00 2001 From: Thad Miller Date: Tue, 17 Feb 2026 07:08:02 -0500 Subject: [PATCH 3/3] [feat] Set relationship added and displayed --- src/db/relations.ts | 8 +++++++- src/pages/pokemon.astro | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/db/relations.ts b/src/db/relations.ts index 0514596..2c3df63 100644 --- a/src/db/relations.ts +++ b/src/db/relations.ts @@ -10,7 +10,13 @@ export const relations = defineRelations(schema, (r) => ({ }, cards: { prices: r.many.skus(), + set: r.one.sets({ + from: r.cards.setId, + to: r.sets.setId, + }), + }, + sets: { + cards: r.many.cards(), }, - })); diff --git a/src/pages/pokemon.astro b/src/pages/pokemon.astro index 024cbb1..d7b5e62 100644 --- a/src/pages/pokemon.astro +++ b/src/pages/pokemon.astro @@ -13,6 +13,7 @@ const pokemon = await db.query.cards.findMany({ limit: 320, with: { prices: true, + set: true, } }); @@ -42,11 +43,12 @@ const order = ["Near Mint", "Lightly Played", "Moderately Played", "Heavily Play {pokemon.map((card) => (
{card.productName} -
{card.productName}
+
{card.productName}
{card.number}
+
{card.set?.setName}
{card.prices .slice()