Bugs fixed: postalCode, credit list and validate DNI
This commit is contained in:
parent
e1a565ae1f
commit
1b4fd50929
|
@ -121,8 +121,7 @@
|
||||||
"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",
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<vn-textfield vn-one label="Street address" field="$ctrl.address.street"></vn-textfield>
|
<vn-textfield vn-one label="Street address" field="$ctrl.address.street"></vn-textfield>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-textfield vn-one label="Postcode" field="$ctrl.address.postcode"></vn-textfield>
|
<vn-textfield vn-one label="Postcode" field="$ctrl.address.postalCode"></vn-textfield>
|
||||||
<vn-textfield vn-one label="Town/City" field="$ctrl.address.city"></vn-textfield>
|
<vn-textfield vn-one label="Town/City" field="$ctrl.address.city"></vn-textfield>
|
||||||
<vn-autocomplete vn-one
|
<vn-autocomplete vn-one
|
||||||
field="$ctrl.address.provinceFk"
|
field="$ctrl.address.provinceFk"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<vn-textfield vn-one label="Street" field="$ctrl.address.street"></vn-textfield>
|
<vn-textfield vn-one label="Street" field="$ctrl.address.street"></vn-textfield>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-textfield vn-one label="Postcode" field="$ctrl.address.postcode"></vn-textfield>
|
<vn-textfield vn-one label="Postcode" field="$ctrl.address.postalCode"></vn-textfield>
|
||||||
<vn-textfield vn-one label="City" field="$ctrl.address.city"></vn-textfield>
|
<vn-textfield vn-one label="City" field="$ctrl.address.city"></vn-textfield>
|
||||||
<vn-autocomplete vn-one
|
<vn-autocomplete vn-one
|
||||||
initial-data="$ctrl.address.province"
|
initial-data="$ctrl.address.province"
|
||||||
|
|
|
@ -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