bug fixed in edit addresses
This commit is contained in:
parent
bb4c43c2bd
commit
d4a0cf205d
|
@ -36,7 +36,7 @@
|
|||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete vn-one
|
||||
initial-data="$ctrl.address.defaultAgencyFk"
|
||||
initial-data="$ctrl.address.defaultAgency"
|
||||
field="$ctrl.address.defaultAgencyFk"
|
||||
url="/client/api/AgencyModes"
|
||||
show-field="name"
|
||||
|
|
|
@ -25,12 +25,19 @@ module.exports = function(Self) {
|
|||
|
||||
Self.beforeRemote('findById', function(ctx, modelInstance, next) {
|
||||
ctx.args.filter = {
|
||||
include: {
|
||||
include: [{
|
||||
relation: "province",
|
||||
scope: {
|
||||
fields: ["id", "name"]
|
||||
}
|
||||
},
|
||||
{
|
||||
relation: "defaultAgency",
|
||||
scope: {
|
||||
fields: ["id", "name"]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
next();
|
||||
});
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
},
|
||||
"defaultAgency": {
|
||||
"type": "belongsTo",
|
||||
"model": "Agency",
|
||||
"model": "AgencyMode",
|
||||
"foreignKey": "defaultAgencyFk"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue