BoxLang 🚀 A New JVM Dynamic Language Learn More...

Preside extension - Maysoft quick filter

v1.0.10 Preside Extensions

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";
}

Example

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.

  •   Khanh Nguyen
  • Published
  • 1.0.10 is the latest of 2 release(s)
    Published
  • Published on {{ getFullDate("2023-09-05T07:49:19Z") }}

$ box install preside-ext-maysoft-quick-filter

No collaborators yet.
 
5.00 / 1
  • {{ getFullDate("2023-05-09T11:49:41Z") }}
  • {{ getFullDate("2023-09-05T07:49:19Z") }}
  • 686
  • 59