Put con id del cliente

Recuperamos account en el get del client.
This commit is contained in:
nelo 2017-01-24 14:24:51 +01:00
parent ab7342e6a0
commit 910d0da9b5
3 changed files with 3 additions and 5 deletions

View File

@ -35,8 +35,7 @@ export const COMPONENT = {
if (!equalsObject(this.client, this.clientOld)) {
var newClient = modified(this.client, this.clientOld);
newClient.modify = "BasicData";
newClient.id = this.clientOld.id;
$http.put('/client/api/Clients', newClient).then(
$http.put(`/client/api/Clients/${this.clientOld.id}`, newClient).then(
json => {
copyObject(json.data, this.client);
this.copyClient();

View File

@ -10,7 +10,7 @@ export const COMPONENT = {
controllerAs: 'card',
controller: function($http, $stateParams) {
this.client = null;
$http.get(`/client/api/Clients/${$stateParams.id}`).then(
$http.get(`/client/api/Clients/${$stateParams.id}?filter[include][account]`).then(
json => this.client = json.data
);

View File

@ -16,8 +16,7 @@ export const COMPONENT = {
if (!equalsObject(this.client, this.clientOld)) {
var newClient = modified(this.client, this.clientOld);
newClient.modify = "FiscalData";
newClient.id = this.clientOld.id;
$http.put('/client/api/Clients', this.client).then(
$http.put(`/client/api/Clients/${this.clientOld.id}`, newClient).then(
json => {
this.client = json.data;
this.copyClient();