Merge branch 'master' of ssh://git.verdnatura.es:/var/lib/git/salix

This commit is contained in:
nelo 2017-01-18 14:48:50 +01:00
commit ce055f4f3e
10 changed files with 22 additions and 13 deletions

View File

@ -11,14 +11,18 @@ export const COMPONENT = {
json => { json => {
this.address = json.data; this.address = json.data;
this.copyAddress(); this.copyAddress();
 } }
); );
$http.get('/client/api/Agencies').then( $http.get('/client/api/Agencies').then(
json => this.agencies = json.data json => {
this.agencies = json.data;
}
); );
$http.get('/client/api/Provinces').then( $http.get('/client/api/Provinces').then(
json => this.provinces = json.data json => {
this.provinces = json.data;
}
); );
this.submit = function() { this.submit = function() {
@ -29,7 +33,6 @@ export const COMPONENT = {
this.copyAddress(); this.copyAddress();
} }
); );
} }
}; };

View File

@ -2,13 +2,13 @@
<vn-card> <vn-card>
<vn-vertical pad-large> <vn-vertical pad-large>
<vn-title>Web access</vn-title> <vn-title>Web access</vn-title>
<vn-check label="Web access enabled" field="web.account.active"></vn-check> <vn-check label="Acceso Web" field="web.account.active"></vn-check>
<vn-textfield label="User" class="margin-medium-top" field="web.account.user" focus></vn-textfield> <vn-textfield label="Usuario" class="margin-medium-top" field="web.account.name" focus></vn-textfield>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Save"></vn-submit> <vn-submit label="Guardar"></vn-submit>
<vn-button label="Change password" vn-dialog="vn-client-change-password"></vn-button> <vn-button label="Cambiar password" vn-dialog="vn-client-change-password"></vn-button>
</vn-button-bar> </vn-button-bar>
</form> </form>
<vn-dialog-confirm object="web.account" object-old="web.accountOld" state="web.state"></vn-dialog-confirm> <vn-dialog-confirm object="web.account" object-old="web.accountOld" state="web.state"></vn-dialog-confirm>

View File

@ -15,7 +15,7 @@ export const COMPONENT = {
this.submit = function() { this.submit = function() {
if (!equalsObject(this.account, this.accountOld)) { if (!equalsObject(this.account, this.accountOld)) {
this.client.modify = "WebAccess"; this.client.modify = "WebAccess";
$http.put(`/client/api/Accounts/${this.account.id}`, this.account).then( $http.put('/client/api/Accounts', this.account).then(
json => { json => {
this.account = json.data; this.account = json.data;
self.copyAccount(); self.copyAccount();

View File

@ -9,7 +9,7 @@
"Country": 3, "Country": 3,
"Province": 3, "Province": 3,
"Agency": 4, "Agency": 4,
"Account": 15, "Account": 20,
"ClientObservation": 1265 "ClientObservation": 1265
}, },
"models": { "models": {
@ -53,9 +53,9 @@
"3": "{\"name\":\"DHL\",\"id\":3}" "3": "{\"name\":\"DHL\",\"id\":3}"
}, },
"Account": { "Account": {
"1": "{\"id\":1,\"password\":\"12\"}", "1": "{\"id\":1,\"password\":\"joselito\",\"name\":\"asdf\"}",
"12": "{\"id\":12,\"name\":\"prueba12\",\"active\":true,\"user\":\"juanete\"}", "14": "{\"id\":14,\"active\":true,\"name\":\"f\"}",
"13": "{\"id\":13,\"name\":\"manu\",\"active\":false,\"user\":\"joselito\"}" "15": "{\"id\":15,\"name\":\"asdf\"}"
}, },
"ClientObservation": { "ClientObservation": {
"1258": "{\"text\":\"Nota de prueba 1\",\"creationDate\":\"2017-01-17T15:24:23.320Z\",\"client\":12,\"salesPerson\":\"user\",\"id\":1258}", "1258": "{\"text\":\"Nota de prueba 1\",\"creationDate\":\"2017-01-17T15:24:23.320Z\",\"client\":12,\"salesPerson\":\"user\",\"id\":1258}",

View File

@ -1,6 +1,7 @@
{ {
"name": "Agency", "name": "Agency",
"base": "PersistedModel", "base": "PersistedModel",
"validateUpsert": true,
"properties": { "properties": {
"id": { "id": {
"type": "Number", "type": "Number",

View File

@ -1,6 +1,7 @@
{ {
"name": "Country", "name": "Country",
"base": "PersistedModel", "base": "PersistedModel",
"validateUpsert": true,
"properties": { "properties": {
"id": { "id": {
"type": "Number", "type": "Number",

View File

@ -1,6 +1,7 @@
{ {
"name": "PaymentMethod", "name": "PaymentMethod",
"base": "PersistedModel", "base": "PersistedModel",
"validateUpsert": true,
"properties": { "properties": {
"id": { "id": {
"type": "Number", "type": "Number",

View File

@ -1,6 +1,7 @@
{ {
"name": "Province", "name": "Province",
"base": "PersistedModel", "base": "PersistedModel",
"validateUpsert": true,
"properties": { "properties": {
"id": { "id": {
"type": "Number", "type": "Number",

View File

@ -1,6 +1,7 @@
{ {
"name": "SalesPerson", "name": "SalesPerson",
"base": "PersistedModel", "base": "PersistedModel",
"validateUpsert": true,
"properties": { "properties": {
"id": { "id": {
"type": "Number", "type": "Number",

View File

@ -1,6 +1,7 @@
{ {
"name": "Account", "name": "Account",
"base": "PersistedModel", "base": "PersistedModel",
"validateUpsert": true,
"properties": { "properties": {
"id": { "id": {
"type": "Number", "type": "Number",