Actualiser js/admin.js
This commit is contained in:
+3
-1
@@ -416,13 +416,15 @@ function normalizeVideothequeRow(row) {
|
|||||||
let ean = row['ean_isbn13'] || row['EAN'] || row['ean'] || row['Barcode'] || row['UPC'] || row['upc_isbn10'] || '';
|
let ean = row['ean_isbn13'] || row['EAN'] || row['ean'] || row['Barcode'] || row['UPC'] || row['upc_isbn10'] || '';
|
||||||
if (ean) ean = String(ean).replace(/[^0-9]/g, '');
|
if (ean) ean = String(ean).replace(/[^0-9]/g, '');
|
||||||
|
|
||||||
|
// ✅ NOUVEAU : Récupérer aussi le titre du CSV
|
||||||
let title = row['title'] ? String(row['title']).trim() : '';
|
let title = row['title'] ? String(row['title']).trim() : '';
|
||||||
|
|
||||||
|
// On garde la ligne si on a au moins un EAN ou un titre
|
||||||
if (!ean && !title) return null;
|
if (!ean && !title) return null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
ean: ean,
|
ean: ean,
|
||||||
title: title
|
title: title // ✅ Titre envoyé au backend
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user