Bug fixeds and merge with test
This commit is contained in:
commit
6fe1f96ef3
|
@ -43,18 +43,12 @@ node
|
||||||
|
|
||||||
stage ("Stopping/Removing Docker")
|
stage ("Stopping/Removing Docker")
|
||||||
{
|
{
|
||||||
step{
|
sh "docker-compose down --rmi 'all'"
|
||||||
env.TAG = env.BUILD_NUMBER - 1;
|
|
||||||
sh "docker-compose down --rmi 'all'"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage ("Generar dockers")
|
stage ("Generar dockers")
|
||||||
{
|
{
|
||||||
step{
|
sh "docker-compose up -d --build"
|
||||||
env.TAG = env.BUILD_NUMBER + 1;
|
|
||||||
sh "docker-compose up -d --build"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,10 +136,8 @@
|
||||||
"menu": {
|
"menu": {
|
||||||
"description": "Credit",
|
"description": "Credit",
|
||||||
"icon": "credit_card"
|
"icon": "credit_card"
|
||||||
},
|
}
|
||||||
"acl": ["manager", "salesAssistant", "teamBoss", "teamManager"]
|
}, {
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "/create",
|
"url": "/create",
|
||||||
"state": "clientCard.credit.create",
|
"state": "clientCard.credit.create",
|
||||||
"component": "vn-client-credit-create",
|
"component": "vn-client-credit-create",
|
||||||
|
|
|
@ -30,7 +30,7 @@ module.exports = Client => {
|
||||||
FROM worker em
|
FROM worker em
|
||||||
JOIN account.user ac ON em.userFk = ac.id
|
JOIN account.user ac ON em.userFk = ac.id
|
||||||
JOIN account.role r ON r.id = ac.role
|
JOIN account.role r ON r.id = ac.role
|
||||||
WHERE ac.active AND r.\`name\` = 'salesPerson' ${where.sql}
|
WHERE ac.active ${where.sql}
|
||||||
ORDER BY em.name ASC
|
ORDER BY em.name ASC
|
||||||
LIMIT ? OFFSET ?`;
|
LIMIT ? OFFSET ?`;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,16 @@
|
||||||
|
const md5 = require('md5');
|
||||||
|
|
||||||
module.exports = function(Self) {
|
module.exports = function(Self) {
|
||||||
// Validations
|
// Validations
|
||||||
|
|
||||||
Self.validatesUniquenessOf('name', {
|
Self.validatesUniquenessOf('name', {
|
||||||
message: 'Ya existe un usuario con ese nombre'
|
message: 'Ya existe un usuario con ese nombre'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Self.observe('before save', (ctx, next) => {
|
||||||
|
if (ctx.currentInstance && ctx.currentInstance.id && ctx.data && ctx.data.password) {
|
||||||
|
ctx.data.password = md5(ctx.data.password);
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -69,6 +69,9 @@ module.exports = fi => {
|
||||||
const dniLetterAscii = parseInt(dniLetterCountry.charCodeAt(0));
|
const dniLetterAscii = parseInt(dniLetterCountry.charCodeAt(0));
|
||||||
let dniValue = false;
|
let dniValue = false;
|
||||||
switch (true) {
|
switch (true) {
|
||||||
|
case (dni.length === 9 && !isNaN(dni)): // dni Portugal (9 digitos)
|
||||||
|
dniValue = true;
|
||||||
|
break;
|
||||||
case (dniLetterAscii >= 88 && dniLetterAscii <= 90): // X-Z
|
case (dniLetterAscii >= 88 && dniLetterAscii <= 90): // X-Z
|
||||||
dniValue = getDniForeign(dniNumeric, dniLetter);
|
dniValue = getDniForeign(dniNumeric, dniLetter);
|
||||||
break;
|
break;
|
||||||
|
@ -81,7 +84,7 @@ module.exports = fi => {
|
||||||
case (dniLetterAscii === 73): // I
|
case (dniLetterAscii === 73): // I
|
||||||
dniValue = getDniItaly(dniLetterCountry);
|
dniValue = getDniItaly(dniLetterCountry);
|
||||||
break;
|
break;
|
||||||
case (dniLetterAscii >= 48 && dniLetterAscii <= 57): // 0- 9
|
case (dni.length === 9 && dniLetterAscii >= 48 && dniLetterAscii <= 57): // 0- 9
|
||||||
dniValue = getDniSpain(dniNumeric, dniLetter);
|
dniValue = getDniSpain(dniNumeric, dniLetter);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue