From 2d5de5c1d5bffca2b376740ecc064c4b799b4cb1 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 2 Feb 2021 23:56:50 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 5 ++--- ayanova/src/api/gzutil.js | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index d995e34a..ffdc4811 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -15,9 +15,8 @@ LISTVIEW REPLACE CURRENT <----HERE not THERE ---v Server accepts request clientnow,listview,filterid and applies any relative filter calcs in sqlWhere generator at server TODO (round 1): SERVER - Accept filter request from client with clientNow time - CLIENT - Send ClientNow with datatable request + DataListSqlFilterCriteriaBuilder - modify to handle date tokens using client timestamp (old filter code already put back in comment form) + CLIENT Implement filter UI to construct local filter object that is temporary and stored in session state doesn't have to do anything specific yet, just handles the filtering into an object for the next stage Construct a filter string json in the format easiest to consume at server diff --git a/ayanova/src/api/gzutil.js b/ayanova/src/api/gzutil.js index fdd25117..93543c57 100644 --- a/ayanova/src/api/gzutil.js +++ b/ayanova/src/api/gzutil.js @@ -599,10 +599,21 @@ export default { // https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isString // isString: function(str) { - if (str && typeof str.valueOf() === "string") { + //modified from above, due to bug (I think) + //posted case here: https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore/issues/304 + if (str == null) { + return false; + } + + if (str == "") { return true; } - return false; + let temp = str.valueOf(); + if (typeof temp === "string") { + return true; + } else { + return false; + } }, /////////////////////////////////////////////// //