diff --git a/client/client/src/address-edit/address-edit.html b/client/client/src/address-edit/address-edit.html index a34dddee0..9ca369884 100644 --- a/client/client/src/address-edit/address-edit.html +++ b/client/client/src/address-edit/address-edit.html @@ -6,6 +6,7 @@ data="$ctrl.address" form="form"> +
diff --git a/client/client/src/billing-data/billing-data.html b/client/client/src/billing-data/billing-data.html index 43010880e..a4c2f0b61 100644 --- a/client/client/src/billing-data/billing-data.html +++ b/client/client/src/billing-data/billing-data.html @@ -24,7 +24,10 @@ - + + + + diff --git a/client/client/src/index/index.js b/client/client/src/index/index.js index 85c7a3400..38d9996ca 100644 --- a/client/client/src/index/index.js +++ b/client/client/src/index/index.js @@ -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(); diff --git a/services/client/common/methods/client/addresses.js b/services/client/common/methods/client/addresses.js index d050d5238..b5f792d53 100644 --- a/services/client/common/methods/client/addresses.js +++ b/services/client/common/methods/client/addresses.js @@ -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); + }); }; } \ No newline at end of file diff --git a/services/client/common/models/address.js b/services/client/common/models/address.js index 9d6429490..b72618112 100644 --- a/services/client/common/models/address.js +++ b/services/client/common/models/address.js @@ -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); }); } diff --git a/services/client/common/models/client.js b/services/client/common/models/client.js index 9534218ef..c6f7c6331 100644 --- a/services/client/common/models/client.js +++ b/services/client/common/models/client.js @@ -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', { diff --git a/services/client/common/models/client.json b/services/client/common/models/client.json index da8a76b76..f48a63ff2 100644 --- a/services/client/common/models/client.json +++ b/services/client/common/models/client.json @@ -89,7 +89,7 @@ "type": "Number" }, "vies": { - "type": "Number" + "type": "boolean" }, "isRelevant": { "type": "boolean" diff --git a/services/production/common/models/route.json b/services/production/common/models/route.json new file mode 100644 index 000000000..a9525aaa5 --- /dev/null +++ b/services/production/common/models/route.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/services/production/server/model-config.json b/services/production/server/model-config.json index 2dd14490c..d69260252 100644 --- a/services/production/server/model-config.json +++ b/services/production/server/model-config.json @@ -84,6 +84,10 @@ "MessageInbox": { "dataSource": "vn", "public": true + }, + "Routes": { + "dataSource": "vn", + "public": true } }