feat(p): drop EAN from the OEM detail page

Remove the EAN line from the matched-article cards and stop fetching/
shipping eans in /p/oem (its only consumer was that line). Snapshot
still holds the data; the endpoint just no longer queries it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-10 01:17:22 +03:00
parent 5a13f13e8e
commit c18c513139
3 changed files with 1 additions and 16 deletions

View File

@@ -124,7 +124,6 @@ export class PSourceDbService implements OnModuleInit, OnModuleDestroy {
oe_numbers: POeNumber[];
compatible: PCompatible[];
images: Array<{ url: string; thumb: string | null }>;
eans: string[];
}>
>`
WITH hit AS (
@@ -164,12 +163,7 @@ export class PSourceDbService implements OnModuleInit, OnModuleDestroy {
WHERE article_id = a.id AND image_url LIKE 'http%'
ORDER BY sort_order LIMIT 8
) i
), '[]') AS images,
COALESCE((
SELECT json_agg(e.ean) FROM (
SELECT DISTINCT ean FROM article_ean_numbers WHERE article_id = a.id LIMIT 20
) e
), '[]') AS eans
), '[]') AS images
FROM hit
JOIN articles a ON a.id = hit.article_id
JOIN article_brands b ON b.id = a.brand_id
@@ -189,7 +183,6 @@ export class PSourceDbService implements OnModuleInit, OnModuleDestroy {
name: r.name,
spareInfo: r.spare_info,
images: r.images,
eans: r.eans,
oeNumbers: r.oe_numbers,
compatible: r.compatible,
};
@@ -250,7 +243,6 @@ export class PSourceDbService implements OnModuleInit, OnModuleDestroy {
name: a.name,
spareInfo: a.spareInfo,
images: a.images,
eans: a.eans,
})),
aftermarketParts,
oeCrossReferences,

View File

@@ -27,7 +27,6 @@ export interface PArticle {
name: string | null;
spareInfo: string | null;
images: PImage[];
eans: string[];
oeNumbers: POeNumber[];
compatible: PCompatible[];
}