- posso fare upload dell'immagine del prodotto dalla lista

- corretto import dati
This commit is contained in:
Surya Paolo
2024-03-02 22:53:29 +01:00
parent 1017a3dfe2
commit 789e3fde41
6 changed files with 78 additions and 37 deletions

View File

@@ -475,6 +475,7 @@ module.exports = {
listimages: 1024,
exact: 2048,
image: 3000,
image_and_filename: 3100,
nationality: 4096,
intcode: 5000,
multioption: 6000,
@@ -4734,7 +4735,7 @@ module.exports = {
const result = [];
text = text.replace(",", ".");
const regex = /^(\d+\.?\d*)\s*(ml|gr|l|kg)\s*$/; // Aggiunto un punto dopo \d+ per accettare anche i numeri con la virgola
const regex = /^(\d+\.?\d*)\s*(ml|gr|l|kg|uova)\s*$/; // Aggiunto un punto dopo \d+ per accettare anche i numeri con la virgola
const match = regex.exec(text);
if (match) {
@@ -4778,7 +4779,30 @@ module.exports = {
},
removeescape(inputString) {
return inputString.replace('\\', '').replace(/"/g, '')
// return inputString.replace(/\\/g, '').replace(/"/g, '');
if (inputString)
return inputString.replace(/\\/g, '').replace(/"/g, '');
else
return '';
},
escapeQuotes(stringa) {
if (stringa)
return stringa.replace(/"/g, '\\"');
else
return '';
},
replaceQuotesWithSingleQuotes(jsonString) {
if (jsonString)
return jsonString.replace(/"/g, "'");
else
return '';
},
ripulisciCampo(stringa) {
let mystr = this.replaceQuotesWithSingleQuotes(stringa);
return mystr;
},
convertToNumeroVirgola(valstr) {

View File

@@ -407,6 +407,11 @@ module.exports = {
short: 'p',
value: 10,
},
{
label: 'Uova',
short: 'uova',
value: 15,
},
],
@@ -974,25 +979,29 @@ module.exports = {
],
},
CAMPI_TYPE: {
STRING: 1,
},
CAMPI_PRODUCTINFO: [
'name',
'code',
'description',
'link_scheda',
'idCatProds',
'idSubCatProds',
'weight',
'weight_lordo',
'unit',
'unit_lordo',
'size',
'vegan',
'sfuso',
'img',
'link',
'ingredienti',
'valori_nutrizionali',
'note',
{name: 'name', type: ''},
{name: 'code', type: ''},
{name: 'description', type: 1},
{name: 'link_scheda', type: ''},
{name: 'idCatProds', type: ''},
{name: 'idSubCatProds', type: ''},
{name: 'weight', type: ''},
{name: 'weight_lordo', type: ''},
{name: 'unit', type: ''},
{name: 'unit_lordo', type: ''},
{name: 'size', type: ''},
{name: 'vegan', type: ''},
{name: 'sfuso', type: ''},
{name: 'img', type: ''},
{name: 'link', type: ''},
{name: 'ingredienti', type: ''},
{name: 'valori_nutrizionali', type: ''},
{name: 'note', type: ''},
],
CAMPI_PRODUCT: [