Errores en relaciones solucionados
This commit is contained in:
parent
89f397da2c
commit
ebb59d1eef
|
@ -7,7 +7,7 @@ export const COMPONENT = {
|
|||
controllerAs: 'card',
|
||||
controller: function($http, $stateParams) {
|
||||
this.client = null;
|
||||
$http.get(`/client/api/Clients/${$stateParams.id}?filter[include][accountFk]`).then(
|
||||
$http.get(`/client/api/Clients/${$stateParams.id}?filter[include][account]`).then(
|
||||
json => this.client = json.data
|
||||
);
|
||||
|
||||
|
|
|
@ -44,17 +44,17 @@
|
|||
},
|
||||
"validations": [],
|
||||
"relations": {
|
||||
"provinceFk": {
|
||||
"province": {
|
||||
"type": "belongsTo",
|
||||
"model": "Province",
|
||||
"foreignKey": "provinceFk"
|
||||
},
|
||||
"clientFk": {
|
||||
"client": {
|
||||
"type": "belongsTo",
|
||||
"model": "Client",
|
||||
"foreignKey": "clientFk"
|
||||
},
|
||||
"defaultAgencyFk": {
|
||||
"defaultAgency": {
|
||||
"type": "belongsTo",
|
||||
"model": "Agency",
|
||||
"foreignKey": "defaultAgencyFk"
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
}
|
||||
},
|
||||
"relations": {
|
||||
"agencyFk": {
|
||||
"agency": {
|
||||
"type": "belongsTo",
|
||||
"model": "Agency",
|
||||
"foreignKey": "agencyFk"
|
||||
},
|
||||
"agencyTypeFk": {
|
||||
"agencyType": {
|
||||
"type": "belongsTo",
|
||||
"model": "AgencyType",
|
||||
"foreignKey": "agencyTypeFk"
|
||||
|
|
|
@ -94,46 +94,48 @@
|
|||
"isRelevant": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"typeFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
"accountingAccount": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"validations": [],
|
||||
"relations": {
|
||||
"accountFk": {
|
||||
"account": {
|
||||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "id"
|
||||
},
|
||||
"payMethodFk": {
|
||||
"payMethod": {
|
||||
"type": "belongsTo",
|
||||
"model": "PayMethod",
|
||||
"foreignKey": "payMethodFk"
|
||||
},
|
||||
"salesPersonFk": {
|
||||
"salesPerson": {
|
||||
"type": "belongsTo",
|
||||
"model": "Employee",
|
||||
"foreignKey": "salesPersonFk"
|
||||
},
|
||||
"provinceFk":{
|
||||
"province":{
|
||||
"type": "belongsTo",
|
||||
"model": "Province",
|
||||
"foreignKey": "provinceFk"
|
||||
},
|
||||
"countryFk":{
|
||||
"country":{
|
||||
"type": "belongsTo",
|
||||
"model": "Country",
|
||||
"foreignKey": "countryFk"
|
||||
},
|
||||
"contactChannelFk":{
|
||||
"contactChannel":{
|
||||
"type": "belongsTo",
|
||||
"model": "ContactChannel",
|
||||
"foreignKey": "contactChannelFk"
|
||||
},
|
||||
"addressesFk": {
|
||||
"type": {
|
||||
"type": "belongsTo",
|
||||
"model": "ClientType",
|
||||
"foreignKey": "typeFk"
|
||||
},
|
||||
"addresses": {
|
||||
"type": "hasMany",
|
||||
"model": "Address",
|
||||
"foreignKey": "clientFk"
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
}
|
||||
},
|
||||
"relations": {
|
||||
"employeeFk": {
|
||||
"employee": {
|
||||
"type": "belongsTo",
|
||||
"model": "Employee",
|
||||
"foreignKey": "employeeFk"
|
||||
},
|
||||
"clientFk": {
|
||||
"client": {
|
||||
"type": "hasOne",
|
||||
"model": "Client",
|
||||
"foreignKey": "id"
|
||||
|
|
|
@ -20,12 +20,12 @@
|
|||
}
|
||||
},
|
||||
"relations": {
|
||||
"currencyFk": {
|
||||
"currency": {
|
||||
"type": "belongsTo",
|
||||
"model": "Currency",
|
||||
"foreignKey": "currencyFk"
|
||||
},
|
||||
"realCountryFk": {
|
||||
"realCountry": {
|
||||
"type": "belongsTo",
|
||||
"model": "Country",
|
||||
"foreignKey": "realCountryFk"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
}
|
||||
},
|
||||
"relations": {
|
||||
"userFk": {
|
||||
"user": {
|
||||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "userFk"
|
||||
|
|
|
@ -14,17 +14,17 @@
|
|||
}
|
||||
},
|
||||
"relations": {
|
||||
"countryFk": {
|
||||
"country": {
|
||||
"type": "belongsTo",
|
||||
"model": "Country",
|
||||
"foreignKey": "countryFk"
|
||||
},
|
||||
"warehouseFk": {
|
||||
"warehouse": {
|
||||
"type": "belongsTo",
|
||||
"model": "Warehouse",
|
||||
"foreignKey": "warehouseFk"
|
||||
},
|
||||
"zoneFk": {
|
||||
"zone": {
|
||||
"type": "belongsTo",
|
||||
"model": "Zone",
|
||||
"foreignKey": "zoneFk"
|
||||
|
|
Loading…
Reference in New Issue