feat: unify pdf datasheet architecture and regenerate all products
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 2m18s
Build & Deploy / 🏗️ Build (push) Successful in 3m43s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 4m54s
Build & Deploy / 🔔 Notify (push) Successful in 1s

This commit is contained in:
2026-03-06 23:42:46 +01:00
parent b80136894c
commit 20051244d9
62 changed files with 2026 additions and 49 deletions

View File

@@ -265,14 +265,18 @@ const styles = StyleSheet.create({
interface ProductData {
id: number;
name: string;
shortDescriptionHtml: string;
descriptionHtml: string;
applicationHtml?: string;
images: string[];
featuredImage: string | null;
sku: string;
categories: Array<{ name: string }>;
attributes: Array<{
categoriesLine?: string;
descriptionText?: string;
heroSrc?: string | null;
productUrl?: string;
shortDescriptionHtml?: string;
descriptionHtml?: string;
applicationHtml?: string;
images?: string[];
featuredImage?: string | null;
categories?: Array<{ name: string }>;
attributes?: Array<{
name: string;
options: string[];
}>;
@@ -282,6 +286,9 @@ interface PDFDatasheetProps {
product: ProductData;
locale: 'en' | 'de';
logoUrl?: string;
technicalItems?: any[];
voltageTables?: any[];
legendItems?: any[];
}
// Helper to strip HTML tags
@@ -331,12 +338,10 @@ export const PDFDatasheet: React.FC<PDFDatasheetProps> = ({ product, locale }) =
<View style={styles.productInfoCol}>
<View style={styles.productHero}>
<View style={styles.categories}>
{product.categories.map((cat, index) => (
<Text key={index} style={styles.productMeta}>
{cat.name}
{index < product.categories.length - 1 ? ' • ' : ''}
</Text>
))}
<Text style={styles.productMeta}>
{product.categoriesLine ||
(product.categories || []).map((c) => c.name).join(' • ')}
</Text>
</View>
<Text style={styles.productName}>{product.name}</Text>
</View>