Zone.getLeaves refactor & fixes
gitea/salix/master This commit looks good
Details
gitea/salix/master This commit looks good
Details
This commit is contained in:
parent
e0ffef70b1
commit
05fec10cf2
|
@ -29,7 +29,7 @@ module.exports = Self => {
|
|||
|
||||
Self.getLeaves = async(zoneFk, parentFk = null, search) => {
|
||||
let [res] = await Self.rawSql(
|
||||
`CALL zoneGeo_getLeaves(?, ?, ?)`,
|
||||
`CALL zone_getLeaves(?, ?, ?)`,
|
||||
[zoneFk, parentFk, search]
|
||||
);
|
||||
|
||||
|
@ -51,6 +51,6 @@ module.exports = Self => {
|
|||
let leaves = map.get(parentFk);
|
||||
setLeaves(leaves);
|
||||
|
||||
return leaves;
|
||||
return leaves || [];
|
||||
};
|
||||
};
|
|
@ -1,3 +0,0 @@
|
|||
module.exports = Self => {
|
||||
require('../methods/zone-geo/getLeaves')(Self);
|
||||
};
|
|
@ -1,6 +1,7 @@
|
|||
module.exports = Self => {
|
||||
require('../methods/zone/clone')(Self);
|
||||
require('../methods/zone/editPrices')(Self);
|
||||
require('../methods/zone/getLeaves')(Self);
|
||||
|
||||
Self.validatesPresenceOf('warehouseFk', {
|
||||
message: `Warehouse cannot be blank`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="/agency/api/ZoneGeos/getLeaves"
|
||||
url="/agency/api/Zones/getLeaves"
|
||||
filter="::$ctrl.filter"
|
||||
params="{zoneFk: $ctrl.$stateParams.id}"
|
||||
auto-load="false">
|
||||
|
|
Loading…
Reference in New Issue