#15 WIP fixed requested changes
gitea/salix/1625-worker_department_treeview This commit looks good
Details
gitea/salix/1625-worker_department_treeview This commit looks good
Details
This commit is contained in:
parent
770a60546a
commit
4025c624b3
|
@ -108,5 +108,5 @@
|
|||
"This postal code is not valid": "This postal code is not valid",
|
||||
"is invalid": "is invalid",
|
||||
"The postcode doesn't exists. Ensure you put the correct format": "El código postal no existe. Asegúrate de ponerlo con el formato correcto",
|
||||
"The department name can't be repeated": "The department name can't be repeated"
|
||||
"The department name can't be repeated": "El nombre del departamento no puede repetirse"
|
||||
}
|
|
@ -2,7 +2,7 @@ module.exports = Self => {
|
|||
Self.remoteMethod('getLeaves', {
|
||||
description: 'Returns the nodes for a department',
|
||||
accepts: [{
|
||||
arg: 'parentFk',
|
||||
arg: 'parentId',
|
||||
type: 'Number',
|
||||
description: 'Get the children of the specified father',
|
||||
}, {
|
||||
|
@ -20,10 +20,10 @@ module.exports = Self => {
|
|||
}
|
||||
});
|
||||
|
||||
Self.getLeaves = async(parentFk = null, search) => {
|
||||
Self.getLeaves = async(parentId = null, search) => {
|
||||
let [res] = await Self.rawSql(
|
||||
`CALL department_getLeaves(?, ?)`,
|
||||
[parentFk, search]
|
||||
[parentId, search]
|
||||
);
|
||||
|
||||
let map = new Map();
|
||||
|
@ -41,7 +41,7 @@ module.exports = Self => {
|
|||
}
|
||||
}
|
||||
|
||||
let leaves = map.get(parentFk);
|
||||
let leaves = map.get(parentId);
|
||||
setLeaves(leaves);
|
||||
|
||||
return leaves || [];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = Self => {
|
||||
Self.remoteMethod('removeChild', {
|
||||
description: 'Returns the first shipped and landed possible for params',
|
||||
description: 'Removes a child department',
|
||||
accessType: 'WRITE',
|
||||
accepts: [{
|
||||
arg: 'id',
|
||||
|
|
|
@ -13,7 +13,7 @@ class Controller {
|
|||
}
|
||||
|
||||
onFetch(item) {
|
||||
const params = item ? {parentFk: item.id} : null;
|
||||
const params = item ? {parentId: item.id} : null;
|
||||
return this.$.model.applyFilter({}, params).then(() => {
|
||||
return this.$.model.data;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue