refs #5640 oldBranch #1638

Merged
carlossa merged 13 commits from 5640-mayusFiscalDate into dev 2023-08-03 09:52:17 +00:00
4 changed files with 20 additions and 10 deletions
Showing only changes of commit 87f125453d - Show all commits

View File

@ -305,5 +305,7 @@
"The renew period has not been exceeded": "El periodo de renovación no ha sido superado",
"Valid priorities": "Prioridades válidas: %d",
"Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}",
"You cannot assign an alias that you are not assigned to": "No puede asignar un alias que no tenga asignado"
}
"You cannot assign an alias that you are not assigned to": "No puede asignar un alias que no tenga asignado",
"Social name should be uppercase": "Social name should be uppercase",
"Street should be uppercase": "Street should be uppercase"
}

View File

@ -36,6 +36,20 @@ module.exports = Self => {
min: 3, max: 10
});
Self.validatesFormatOf('street', {
message: 'Street should be uppercase',
allowNull: false,
allowBlank: false,
with: /^[^a-z]*$/
});
Self.validatesFormatOf('socialName', {
message: 'Social name should be uppercase',
allowNull: false,
allowBlank: false,
with: /^[^a-z]*$/
});
Self.validateAsync('socialName', socialNameIsUnique, {
message: 'The company name must be unique'
});

View File

@ -33,7 +33,7 @@
ng-model="$ctrl.client.socialName"
info="Only letters, numbers and spaces can be used"
required="true"
ng-keyup="$ctrl.mayus($event)"
ng-keyup="$ctrl.client.socialName = $ctrl.client.socialName.toUpperCase()"
rule>
</vn-textfield>
<vn-textfield
@ -47,7 +47,7 @@
vn-two
label="Street"
ng-model="$ctrl.client.street"
ng-keyup="$ctrl.mayus($event)"
ng-keyup="$ctrl.client.street = $ctrl.client.street.toUpperCase()"
rule>
</vn-textfield>
</vn-horizontal>

View File

@ -177,12 +177,6 @@ export default class Controller extends Section {
this.client.provinceFk = response.provinceFk;
this.client.countryFk = response.countryFk;
}
mayus(event) {
let input = event.target;
let inputValue = input.value;
input.value = inputValue.toUpperCase();
}
}
ngModule.vnComponent('vnClientFiscalData', {