Bug #97 - Show dash when no secured credit
This commit is contained in:
parent
b864a8382c
commit
688881fac4
|
@ -5,16 +5,18 @@
|
||||||
<div pad-medium class="data">
|
<div pad-medium class="data">
|
||||||
<h6>{{$ctrl.client.name}}</h6>
|
<h6>{{$ctrl.client.name}}</h6>
|
||||||
<div>
|
<div>
|
||||||
<span translate>Id</span> {{$ctrl.client.id}}
|
<span class="label" translate>Id</span> {{$ctrl.client.id}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span translate>Phone</span> {{$ctrl.client.phone | phone}}
|
<span class="label" translate>Phone</span> {{$ctrl.client.phone | phone}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span translate>Credit</span> {{$ctrl.client.credit | number:2}}€
|
<span class="label" translate>Credit</span> {{$ctrl.client.credit | currency:'€':2}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span translate>Secured credit</span> {{$ctrl.client.creditInsurance || 0 | number:2}}€
|
<span class="label" translate>Secured credit</span>
|
||||||
|
<span ng-if="$ctrl.client.creditInsurance">{{$ctrl.client.creditInsurance | currency:'€':2}}</span>
|
||||||
|
<span ng-if="!$ctrl.client.creditInsurance">-</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
vn-client-descriptor {
|
vn-client-descriptor {
|
||||||
.data span {
|
.data .label {
|
||||||
font-size: .9em;
|
font-size: .9em;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ module.exports = fiWithCountry => {
|
||||||
|
|
||||||
let validators = {
|
let validators = {
|
||||||
es: {
|
es: {
|
||||||
regExp: /^ES[A-Z0-9]\d{7}[A-Z0-9]$/,
|
regExp: /^[A-Z0-9]\d{7}[A-Z0-9]$/,
|
||||||
validate: () => {
|
validate: () => {
|
||||||
let isCif = /[A-W]/.test(fi.charAt(0));
|
let isCif = /[A-W]/.test(fi.charAt(0));
|
||||||
let lastDigit = fi.charAt(len - 1);
|
let lastDigit = fi.charAt(len - 1);
|
||||||
|
@ -55,13 +55,13 @@ module.exports = fiWithCountry => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pt: {
|
pt: {
|
||||||
regExp: /^PT\d{9}$/
|
regExp: /^\d{9}$/
|
||||||
},
|
},
|
||||||
fr: {
|
fr: {
|
||||||
regExp: /^FR[A-Z0-9]{2}\d{9}$/
|
regExp: /^[A-Z0-9]{2}\d{9}$/
|
||||||
},
|
},
|
||||||
it: {
|
it: {
|
||||||
regExp: /^IT\d{11}$/
|
regExp: /^\d{11}$/
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -70,6 +70,6 @@ module.exports = fiWithCountry => {
|
||||||
if (!validator)
|
if (!validator)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return validator.regExp.test(fiWithCountry)
|
return validator.regExp.test(fi)
|
||||||
&& (!validator.validate || validator.validate());
|
&& (!validator.validate || validator.validate());
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue