refs #5640 fix mayus quit function

This commit is contained in:
Carlos Satorres 2023-07-14 13:35:13 +02:00
parent fa3745820d
commit 87f125453d
4 changed files with 20 additions and 10 deletions

View File

@ -305,5 +305,7 @@
"The renew period has not been exceeded": "El periodo de renovación no ha sido superado", "The renew period has not been exceeded": "El periodo de renovación no ha sido superado",
"Valid priorities": "Prioridades válidas: %d", "Valid priorities": "Prioridades válidas: %d",
"Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}", "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 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, { Self.validateAsync('socialName', socialNameIsUnique, {
message: 'The company name must be unique' message: 'The company name must be unique'
}); });

View File

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

View File

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