Merge branch 'dev' of https://git.verdnatura.es/salix into dev
This commit is contained in:
commit
76d9546355
|
@ -6,6 +6,7 @@
|
|||
data="$ctrl.address"
|
||||
form="form">
|
||||
</vn-watcher>
|
||||
<mg-ajax path="/client/api/Addresses/{{edit.params.addressId}}" actions="$ctrl.address=edit.model" options="mgEdit"></mg-ajax>
|
||||
<form name="form" ng-submit="watcher.submitBack()" pad-medium>
|
||||
<vn-card>
|
||||
<vn-vertical pad-large>
|
||||
|
|
|
@ -24,7 +24,10 @@
|
|||
<vn-textfield vn-one label="Descuento" field="$ctrl.client.discount"></vn-textfield>
|
||||
<vn-textfield vn-one label="Crédito" field="$ctrl.client.credit"></vn-textfield>
|
||||
<vn-textfield vn-one label="Crédito asegurado" field="$ctrl.client.creditInsurance"></vn-textfield>
|
||||
<vn-check vn-three label="Recargo de equivalencia" field="$ctrl.client.equalizationTax"></vn-check>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-check vn-one label="Recargo de equivalencia" field="$ctrl.client.equalizationTax"></vn-check>
|
||||
<vn-check vn-one label="Vies" field="$ctrl.client.vies"></vn-check>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
|
|
|
@ -3,6 +3,9 @@ import './style.css';
|
|||
import './item-client';
|
||||
|
||||
export default class Controller {
|
||||
constructor() {
|
||||
this.model = {};
|
||||
}
|
||||
search(index) {
|
||||
index.filter.search = this.model.search;
|
||||
index.accept();
|
||||
|
|
|
@ -41,9 +41,7 @@ module.exports = function(Client){
|
|||
};
|
||||
|
||||
Client.app.models.Address.find(filter, function(err, instances) {
|
||||
if(!err) {
|
||||
cb(null, instances);
|
||||
}
|
||||
})
|
||||
(err)? cb(err, null) : cb(null, instances);
|
||||
});
|
||||
};
|
||||
}
|
|
@ -25,7 +25,7 @@ module.exports = function(Address) {
|
|||
function getAddress(ctx, data, next){
|
||||
var address = Address.findOne( {where: { id: data.id}}, function (err, address){
|
||||
if(address)
|
||||
callbackGetAddress(ctx, data, address, next)
|
||||
callbackGetAddress(ctx, data, address, next);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -29,15 +29,18 @@ module.exports = function(Client) {
|
|||
Client.validatesFormatOf('postcode', {
|
||||
message: 'El código postal solo debe contener números',
|
||||
allowNull: true,
|
||||
allowBlank: true,
|
||||
with: /^\d+$/
|
||||
});
|
||||
Client.validatesFormatOf('email', {
|
||||
message: 'Correo electrónico inválido',
|
||||
allowNull: true,
|
||||
allowBlank: true,
|
||||
with: /^[\w|\.|\-]+@\w[\w|\.|\-]*\w(,[\w|\.|\-]+@\w[\w|\.|\-]*\w)*$/
|
||||
});
|
||||
Client.validatesLengthOf('postcode', {
|
||||
allowNull: true,
|
||||
allowBlank: true,
|
||||
min: 3, max: 10
|
||||
});
|
||||
Client.validatesLengthOf('iban', {
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
"type": "Number"
|
||||
},
|
||||
"vies": {
|
||||
"type": "Number"
|
||||
"type": "boolean"
|
||||
},
|
||||
"isRelevant": {
|
||||
"type": "boolean"
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "Route",
|
||||
"base": "MyModel",
|
||||
"validateUpsert": true,
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"date": {
|
||||
"type": "date"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"accessType": "READ",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "ALLOW"
|
||||
},
|
||||
{
|
||||
"accessType": "WRITE",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "DENY"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -84,6 +84,10 @@
|
|||
"MessageInbox": {
|
||||
"dataSource": "vn",
|
||||
"public": true
|
||||
},
|
||||
"Routes": {
|
||||
"dataSource": "vn",
|
||||
"public": true
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue