From 2b78485a613f223f81f6363dfd86bb853b73928e Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 21 Jun 2023 07:39:00 +0200 Subject: [PATCH] Cleanup edit thing --- public/v1/js/ff/rules/create-edit.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/public/v1/js/ff/rules/create-edit.js b/public/v1/js/ff/rules/create-edit.js index 3955315a3e..16b99fe032 100644 --- a/public/v1/js/ff/rules/create-edit.js +++ b/public/v1/js/ff/rules/create-edit.js @@ -403,6 +403,15 @@ function createAutoComplete(input, URL) { url: URL + urlParamSplit + 'uid=' + uid, filter: function (list) { return $.map(list, function (item) { + if (item.hasOwnProperty('active') && item.active === true) { + return {name: item.name}; + } + if (item.hasOwnProperty('active') && item.active === false) { + return; + } + if (item.hasOwnProperty('active')) { + console.log(item.active); + } return {name: item.name}; }); } @@ -412,6 +421,15 @@ function createAutoComplete(input, URL) { wildcard: '%QUERY', filter: function (list) { return $.map(list, function (item) { + if (item.hasOwnProperty('active') && item.active === true) { + return {name: item.name}; + } + if (item.hasOwnProperty('active') && item.active === false) { + return; + } + if (item.hasOwnProperty('active')) { + console.log(item.active); + } return {name: item.name}; }); }