aggiornamenti su PCB

This commit is contained in:
Surya Paolo
2024-10-22 15:26:29 +02:00
parent 0d466f01b6
commit 27aa42507a
8 changed files with 33 additions and 31 deletions

View File

@@ -131,11 +131,11 @@ async function completaSettaggioProduct_AndProductInfo(arrcampi_productInfo, arr
}
if (!rec.hasOwnProperty('img') && product.code) {
productInfo.imagefile = 'upload/products/' + product.code + '.jpg';
productInfo.imagefile = product.code + '.jpg';
} else {
if (rec.hasOwnProperty('img')) {
if (rec['img']) {
productInfo.imagefile = 'upload/products/' + rec['img'];
productInfo.imagefile = rec['img'];
} else {
productInfo.imagefile = '';
}
@@ -823,7 +823,8 @@ router.post('/import', authenticate, async (req, res) => {
link: product.link,
idCatProds: [],
idSubCatProds: [],
img: 'upload/products/' + product.code + '.jpg',
// img: 'upload/products/' + product.code + '.jpg',
imagefile: product.code + '.jpg',
weight: product.weight,
unit: tools.getIdUnitsByText(product.unit),
productTypes: shared_consts.PRODUCTTYPE.PRODUCT,