@@ -2010,6 +2150,74 @@ function RecordQuery({table, launchProcess}: Props): JSX.Element
}
+
+
+
+ Fields that are frequently used for filter conditions can be added here for quick access.
+ Use the add_circle_outline button to add a field.
+ To remove a field, click it and then use the highlight_off button.
+ } placement="left">
+ Quick Filter:
+
+ {
+ metaData && tableMetaData &&
+ <>
+
+ openAddQuickFilterMenu(e)} size="small" disableRipple>add_circle_outline
+
+
+ >
+ }
+ {
+ tableMetaData &&
+ [...quickFilterFieldNames.values()].map((fieldName) =>
+ {
+ // todo - join fields...
+ // todo - sometimes i want contains (client.name, for example...)
+
+ const [field, tableForField] = TableUtils.getFieldAndTable(tableMetaData, fieldName);
+ let defaultOperator = field?.possibleValueSourceName ? QCriteriaOperator.IN : QCriteriaOperator.EQUALS
+ if(field?.type == QFieldType.DATE_TIME || field?.type == QFieldType.DATE)
+ {
+ defaultOperator = QCriteriaOperator.GREATER_THAN;
+ }
+
+ return (
+ field &&
+ )
+ })
+ }
+
+