This commit is contained in:
2020-03-04 16:00:32 +00:00
parent f483c08b6d
commit bc050e85fc
2 changed files with 43 additions and 12 deletions

View File

@@ -912,19 +912,20 @@ function loadFormSettings(vm) {
////////////////////
//
function untokenizeListView(lv) {
//it has one or more tokens
//iterate the array and build a new array with substituted tokens with the correct date and time in them
console.log(lv);
//console.log(JSON.parse(lv));
console.log("test:thisweek");
console.log(relativeDatefilterCalculator.tokenToDates("*thisweek*"));
//[{"fld":"widgetname"},{"fld":"widgetstartdate","filter":{"items":[{"op":"=","value":"*past90days*","token":true}]}},{"fld":"widgetenddate"}]
if (lv == null) {
return lv;
}
//See if it has any date tokens
if (lv.indexOf('"token":true') == -1) {
return;
return lv;
}
//it has one or more tokens
//iterate the array and build a new array with substituted tokens with the correct date and time in them
console.log(lv);
//console.log(JSON.parse(lv));
console.log("test:lastweek");
console.log(relativeDatefilterCalculator.tokenToDates("*lastweek*"));
return lv;
}
</script>