BoxLang 🚀 A New JVM Dynamic Language Learn More...
Use Preside annotation:
@useQuickFilter to declare that object use quick filter.
@quickFilterFields property_name_1,property_name_2 to declare which fields will be used for quick filter. If dont use @quickFilterFields, all properties with type="date" / "datetime" / relationship="many-to-one" / enum will be applied for quickFilter.
Notice: If in project already extends "preside.system.handlers.admin.DataManager", please change it to "app.extensions.preside-ext-maysoft-quick-filter.handlers.admin.DataManager"
Example:
/**
* @labelField labelName
* @dataApiEnabled true
* @datamanagerGridFields account_noofid,street,ward,district,province,datemodified
* @datamanagerDefaultSortOrder datemodified desc
* @dataManagerGroup Location
* @dataApiFilterFields account_noofid,temporary_id,shipping_unit,province,district,ward,street
* @useQuickFilter true
* @quickFilterFields province,district,ward
*/
component extends="app.preside-objects.core.rmh_core" {
property name="province" relationship="many-to-one" relatedTo="province";
property name="district" relationship="many-to-one" relatedTo="district" control="objectPicker" object="district" filterBy="province";
property name="ward" relationship="many-to-one" relatedTo="ward" control="objectpicker" object="ward" filterBy="district" ;
property name="street" type="string" dbtype="varchar";
property name="labelName" formula="Concat(street,', ',${prefix}ward.full_name,', ',${prefix}district.full_name,', ',${prefix}province.full_name)" control="hidden";
property name="account_noofid" type="string" dbtype="varchar" control="none";
property name="temporary_id" type="string" dbtype="varchar" control="none" maxLength=35;
property name="shipping_unit" relationship="many-to-one" relatedTo="shipping_unit" control="none";
}
The control for Date is https://www.daterangepicker.com/#:~:text=A%20JavaScript%20component%20for%20choosing%20date%20ranges%2C%20dates%20and%20times.&text=Originally%20created%20for%20reports%20at,like%20%22Last%2030%20Days%22.
$
box install preside-ext-maysoft-quick-filter