Put con id del cliente
Recuperamos account en el get del client.
This commit is contained in:
parent
ab7342e6a0
commit
910d0da9b5
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue