shelvings errors

This commit is contained in:
alexmorenograu 2021-03-15 10:56:07 +01:00
parent 904eb5e8b2
commit 1ef83438fb
5 changed files with 7 additions and 7 deletions

View File

@ -20,7 +20,7 @@ function bindShelving(barcode, shelving, level){
"Authorization": key
}
})
console.log(body)
console.log("ETIQUETA: ",body)
})();
})();
}

View File

@ -6,8 +6,8 @@ const insertDB = require('./db/insertDB')
function bindShelvingTag(barcode, shelving, level){
if(filter.filterBarcode(barcode)){
if(filter.filterShelving(shelving)){
insertShelving.insertShelving(shelving, level);
bindShelving.bindShelving(barcode, shelving, level);
insertShelving.insertShelving(shelving, level);
insertDB.insertDB(barcode, shelving, level);
}else{
console.log("¡MATRICULA INCORRECTA!")
@ -17,8 +17,8 @@ function bindShelvingTag(barcode, shelving, level){
}
}
///DATOS INTRODUCIDOS POR EL USUARIO////
var barcode = "A0A3B820690F"; //valido = "A0A3B82"+ 4 CARACTERES HEXADECIMALES (0-F)
var shelving = "BCD"; //valido = 3 CARACTERES LETRAS (A-Z)
var barcode = "A0A3B8225DDC"; //valido = "A0A3B82"+ 4 CARACTERES HEXADECIMALES (0-F)
var shelving = "ZZZ"; //valido = 3 CARACTERES LETRAS (A-Z)
var level = "1";
bindShelvingTag(barcode, shelving, level);
//////////////////////////////////////

View File

@ -3,7 +3,7 @@ const filter = require('./filter');
const select = require('./db/selectDB')
var barcode = "A0A3B820690F";
var shelving = "ABC";///introducida por el usuario
var shelving = "BCD";///introducida por el usuario
var collectionFk = '254';

View File

@ -3,7 +3,7 @@ function filterBarcode(toFilter){
return exp.test(toFilter)
}
function filterShelving(toFilter){
const exp = /^[A-F][A-F][A-F]$/
const exp = /^[A-Z][A-Z][A-Z]$/
return exp.test(toFilter)
}
exports.filterBarcode = filterBarcode;

View File

@ -27,7 +27,7 @@ function insertShelving(shelving, level){
"Authorization": key
}
})
console.log(body)
console.log("CARRO: ",body)
})();
})();
}