Fix: Update all Product references from showOnProducts to showAsReadyMade

- Updated src/app/page.tsx to use showAsReadyMade for ready-made products
- Updated src/app/products/page.tsx to use showAsReadyMade for product filtering
- Updated src/app/products/[slug]/page.tsx to check showAsReadyMade
- Category model retains showOnProducts for catalog filtering

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-20 18:28:06 +01:00
co-authored by Claude Haiku 4.5
parent 8fe99d9d35
commit aa092f80a0
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ export default async function HomePage() {
const featured = products.map((p) => toProductDTO(p, activePromotions));
const readyMadeRows = await prisma.product.findMany({
where: { showOnProducts: true },
where: { showAsReadyMade: true },
take: 4,
orderBy: { createdAt: 'asc' },
});
+1 -1
View File
@@ -9,7 +9,7 @@ export default async function StandardProductPage({ params }: { params: { slug:
const activePromotions = await fetchActivePromotions();
const row = await prisma.product.findUnique({ where: { slug: params.slug } });
if (!row || !row.showOnProducts) notFound();
if (!row || !row.showAsReadyMade) notFound();
const product = toProductDTO(row, activePromotions, 'plain');
+1 -1
View File
@@ -38,7 +38,7 @@ export default async function ReadyMadeProductsPage({ searchParams }: { searchPa
// Full palette across ready-made products only, for the swatch filter.
const allProducts = await prisma.product.findMany({
where: { showOnProducts: true },
where: { showAsReadyMade: true },
select: { colors: true },
});
const paletteSet = new Set<string>();