From da7747610c75bc2e5d7121609712a7c4d476c719 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Fri, 13 Feb 2026 13:30:20 -0700 Subject: [PATCH] Use GBP price as the store-readiness signal Setting a GBP price in Directus is the intentional signal that an artwork is for sale. USD-only items (264 with images) are imported historical catalog data not meant for the store. The store now shows the 19 artworks that have name + image + GBP price set. Co-Authored-By: Claude Opus 4.6 --- frontend/src/lib/directus.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/frontend/src/lib/directus.ts b/frontend/src/lib/directus.ts index 2c661df..66342be 100644 --- a/frontend/src/lib/directus.ts +++ b/frontend/src/lib/directus.ts @@ -241,17 +241,15 @@ export async function getArtworks(options?: { forSale?: boolean; }): Promise { // When forSale is true, build a compound filter requiring: - // - name set, image set, and at least one price (GBP or USD) > 0 - // This means artworks automatically appear in the store once their - // required fields are populated, and disappear when status changes to sold/archived. + // - name set, image uploaded, and GBP price set (> 0) + // Setting a GBP price is the signal that an artwork is for sale. + // Artworks automatically appear in the store once these fields are populated + // in Directus, and move to sold section when status changes to 'sold'. if (options?.forSale) { const conditions: Record[] = [ { name: { _nnull: true, _nempty: true } }, { image: { _nnull: true } }, - { _or: [ - { price_gbp: { _gt: 0 } }, - { price_usd: { _gt: 0 } }, - ]}, + { price_gbp: { _gt: 0 } }, ]; if (options?.status) conditions.push({ status: { _eq: options.status } }); if (options?.series) conditions.push({ series: { _eq: options.series } });