mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
CE-1068: fixed bug around filter variables on possible value
This commit is contained in:
@ -110,6 +110,7 @@ class FilterUtils
|
|||||||
|
|
||||||
let values = criteria.values;
|
let values = criteria.values;
|
||||||
let hasFilterVariable = false;
|
let hasFilterVariable = false;
|
||||||
|
|
||||||
if (field.possibleValueSourceName)
|
if (field.possibleValueSourceName)
|
||||||
{
|
{
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -123,6 +124,9 @@ class FilterUtils
|
|||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
if (values && values.length > 0 && values[0] !== null && values[0] !== undefined && values[0] !== "")
|
if (values && values.length > 0 && values[0] !== null && values[0] !== undefined && values[0] !== "")
|
||||||
{
|
{
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
// do not do this lookup if the field is a filter variable expression //
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
if (values[0].type && values[0].type == "FilterVariableExpression")
|
if (values[0].type && values[0].type == "FilterVariableExpression")
|
||||||
{
|
{
|
||||||
hasFilterVariable = true;
|
hasFilterVariable = true;
|
||||||
@ -142,11 +146,7 @@ class FilterUtils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasFilterVariable)
|
if (values && values.length)
|
||||||
{
|
|
||||||
values[0] = new FilterVariableExpression({fieldName: field.name, valueIndex: 0});
|
|
||||||
}
|
|
||||||
else if (values && values.length)
|
|
||||||
{
|
{
|
||||||
for (let i = 0; i < values.length; i++)
|
for (let i = 0; i < values.length; i++)
|
||||||
{
|
{
|
||||||
@ -245,6 +245,10 @@ class FilterUtils
|
|||||||
{
|
{
|
||||||
return (new ThisOrLastPeriodExpression(value));
|
return (new ThisOrLastPeriodExpression(value));
|
||||||
}
|
}
|
||||||
|
else if (value.type == "FilterVariableExpression")
|
||||||
|
{
|
||||||
|
return (new FilterVariableExpression(value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (null);
|
return (null);
|
||||||
|
Reference in New Issue
Block a user