This commit is contained in:
2020-02-20 22:35:22 +00:00
parent e2c9d38f24
commit 5976bb1967
3 changed files with 28 additions and 2 deletions

View File

@@ -275,6 +275,7 @@ TAGS - At server if equality compare value is an array of strings then it's assu
---------------------- NON DATALISTVIEW STUFF ---------------------------- ---------------------- NON DATALISTVIEW STUFF ----------------------------
TODO: Add test for *NULL* and not *NULL* in datalistfilter tests as there currently aren't any
TODO: ay-data-list-view initform code shows proper way to initialize and await each step TODO: ay-data-list-view initform code shows proper way to initialize and await each step
- Take that model and look at all the other forms and ensure they work the same way - Take that model and look at all the other forms and ensure they work the same way

View File

@@ -4,7 +4,7 @@
// { // {
// public static class DataListFilterSpecialToken // public static class DataListFilterSpecialToken
// { // {
// public const string Null = "{[null]}"; // public const string Null = "*NULL*";
// public const string Yesterday = "{[yesterday]}"; // public const string Yesterday = "{[yesterday]}";
// public const string Today = "{[today]}"; // public const string Today = "{[today]}";
// public const string Tomorrow = "{[tomorrow]}"; // public const string Tomorrow = "{[tomorrow]}";

View File

@@ -393,12 +393,37 @@ export default {
Dates have special values in tempFilterToken that must be handled specially Dates have special values in tempFilterToken that must be handled specially
if Date tempfiltertoken is *select* then no special value token is in use like YESTERDAY if Date tempfiltertoken is *select* then no special value token is in use like YESTERDAY
everything has special values in the tempfilterOperator of two choices *NOVALUE* or *HASVALUE*, otherwise it's a straight up filter operator
ONLY OTHER POSSIBLE TOKEN:
every type can have in the tempfilterOperator two choices *NOVALUE* or *HASVALUE*,
otherwise it's a straight up filter operator
In all other cases than above tempfilterOperator is relevant and tempFilterValue is relevant In all other cases than above tempfilterOperator is relevant and tempFilterValue is relevant
TODO: sample fragment of each kind as are done I guess TODO: sample fragment of each kind as are done I guess
TODO: DataTAble needs to pre-process filter to substitute tokens on the fly before sending to the server TODO: DataTAble needs to pre-process filter to substitute tokens on the fly before sending to the server
*/ */
var filterItem = { op: null, value: null };
//DATE relative token?
if (item.uiFieldDataType === 1) {
//some kind of relative date token?
if (item.tempFilterToken && item.tempFilterToken != "*select*") {
//special relative token
filterItem.op = "="; //equality
filterItem.value = item.tempFilterToken;
item.filter.items.push(filterItem);
return;
}
}
if(item.tempFilterOperator=="*NOVALUE*"){
filterItem.op="=";
}
item.filter.items.push({
op: item.tempFilterOperator,
value: item.tempFilterValue
});
console.log(item); console.log(item);
}, },
form() { form() {