CE-798 - fix typing 'o' bug in quick filters; add missing 'start of' in expression toString calls

This commit is contained in:
2024-02-15 20:21:47 -06:00
parent fc45b5bed8
commit 967c557a58
2 changed files with 12 additions and 3 deletions

View File

@ -64,7 +64,6 @@ class FilterUtils
let rs = [];
for (let i = 0; i < param.length; i++)
{
console.log(param[i]);
if (param[i] && param[i].id && param[i].label)
{
/////////////////////////////////////////////////////////////
@ -361,7 +360,12 @@ class FilterUtils
else if (value.type == "ThisOrLastPeriod")
{
const expression = new ThisOrLastPeriodExpression(value);
labels.push(expression.toString());
let startOfPrefix = "";
if(fieldMetaData.type == QFieldType.DATE_TIME || expression.timeUnit != "DAYS")
{
startOfPrefix = "start of ";
}
labels.push(`${startOfPrefix}${expression.toString()}`);
}
else if(fieldMetaData.type == QFieldType.BOOLEAN)
{