This commit is contained in:
@@ -45,6 +45,9 @@ CURRENT TODOs
|
|||||||
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
||||||
|
|
||||||
todo: grid relative date tokens need to be substituted before query sent to server
|
todo: grid relative date tokens need to be substituted before query sent to server
|
||||||
|
todo: when making change to listview filter for saved datalistview and then returning to datatable it's *not* using the latest changes
|
||||||
|
- maybe it thinks because it has an ID and that ID is the same that it doesn't need to refresh?
|
||||||
|
- or maybe the cached local copy of that datalistview is not set (if there is one for saved dlv?)
|
||||||
|
|
||||||
todo: Make functional user settings form with all overrides so can test shit out
|
todo: Make functional user settings form with all overrides so can test shit out
|
||||||
|
|
||||||
|
|||||||
@@ -514,12 +514,15 @@ export default {
|
|||||||
//this puts a pin in it then resets it after the fetch is completed
|
//this puts a pin in it then resets it after the fetch is completed
|
||||||
var preSelected = [...vm.selected];
|
var preSelected = [...vm.selected];
|
||||||
|
|
||||||
|
//untokenize ListView date token criteria (if there are any)
|
||||||
|
var untokenizedListView = untokenizeListView(vm.listView);
|
||||||
|
|
||||||
window.$gz.api
|
window.$gz.api
|
||||||
.upsert(vm.apiBaseUrl, {
|
.upsert(vm.apiBaseUrl, {
|
||||||
offset: listOptions.Offset,
|
offset: listOptions.Offset,
|
||||||
limit: listOptions.Limit,
|
limit: listOptions.Limit,
|
||||||
dataListKey: vm.dataListKey,
|
dataListKey: vm.dataListKey,
|
||||||
listView: vm.listView
|
listView: untokenizedListView
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.error != undefined) {
|
if (res.error != undefined) {
|
||||||
@@ -893,4 +896,19 @@ function loadFormSettings(vm) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////
|
||||||
|
//
|
||||||
|
function untokenizeListView(lv) {
|
||||||
|
//[{"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;
|
||||||
|
}
|
||||||
|
console.log(lv);
|
||||||
|
console.log(JSON.parse(lv));
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -635,6 +635,7 @@ export default {
|
|||||||
if (item.tempFilterToken && item.tempFilterToken != "*select*") {
|
if (item.tempFilterToken && item.tempFilterToken != "*select*") {
|
||||||
//special relative token
|
//special relative token
|
||||||
filterItem.op = "="; //equality
|
filterItem.op = "="; //equality
|
||||||
|
filterItem.token = true;
|
||||||
filterItem.value = item.tempFilterToken;
|
filterItem.value = item.tempFilterToken;
|
||||||
filterItemSet = true;
|
filterItemSet = true;
|
||||||
}
|
}
|
||||||
@@ -1526,10 +1527,14 @@ function generateListViewFromEdited(vm) {
|
|||||||
}
|
}
|
||||||
for (var j = 0; j < ev.filter.items.length; j++) {
|
for (var j = 0; j < ev.filter.items.length; j++) {
|
||||||
var evfi = ev.filter.items[j];
|
var evfi = ev.filter.items[j];
|
||||||
f.items.push({
|
var thisFilterItem = {
|
||||||
op: evfi.op,
|
op: evfi.op,
|
||||||
value: evfi.value
|
value: evfi.value
|
||||||
});
|
};
|
||||||
|
if (evfi.token) {
|
||||||
|
thisFilterItem.token = true;
|
||||||
|
}
|
||||||
|
f.items.push(thisFilterItem);
|
||||||
}
|
}
|
||||||
o.filter = f;
|
o.filter = f;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user