Uecko_ERP/packages/rdx-criteria
david a264f43b95 feat: enhance proforma listing and archiving functionality
- Updated proforma listing behavior to utilize `Criteria filters[]` for managing archived and active proformas.
- Removed `archived` query parameter from backend; frontend now manages `archiveView` state.
- Implemented new filters for `archived_at` and `status` in the proforma listing API.
- Adjusted proforma creation and deletion contracts to reflect changes in archiving logic.
- Introduced new utility functions for building proforma listing criteria based on UI state.
- Updated frontend components to support new filtering options and maintain state in the URL.
- Added SQL index for improved performance on proforma queries.
- Created new TypeScript types for managing proforma list filters and criteria.
2026-07-29 22:24:53 +02:00
..
src feat: enhance proforma listing and archiving functionality 2026-07-29 22:24:53 +02:00
package.json v0.9.4 2026-07-15 18:52:45 +02:00
readme.md Criteria -> quickSearch 2025-09-30 12:59:32 +02:00
tsconfig.json Clientes y Facturas de cliente 2025-10-30 19:26:57 +01:00

💻 Usage

The criteria converter expect an url with the following format:

  • filters: An array of filters. Composed by:
    • field: The field to filter by.
    • operator: The operator to apply. You can see here the valid operators list.
    • value: The value to filter by.
  • orderBy: The field to order by.
  • order: The order to apply. asc or desc.
  • pageSize: The number of items per page.
  • pageNumber: The page number.

Valid operators

  • EQUALS: Equal
  • NOT_EQUALS: Not equal
  • GREATER_THAN: Greater than
  • GREATER_THAN_OR_EQUAL: Greater than or equal
  • LOWER_THAN: Less than
  • LOWER_THAN_OR_EQUAL: Less than or equal
  • CONTAINS: Contains. It will translate to like in SQL.
  • NOT_CONTAINS: Not contains. It will translate to not like in SQL.

Url examples

Url with one filter and no order or pagination:

http://localhost:3000/api/users?filters[0][field]=name&filters[0][operator]=CONTAINS&filters[0][value]=Javi

Url with two filter, order and pagination:

http://localhost:3000/api/users
     ?filters[0][field]=name&filters[0][operator]=CONTAINS&filters[0][value]=Javi
     &filters[1][field]=email&filters[1][operator]=CONTAINS&filters[1][value]=gmail
     &orderBy=name
     &order=asc
     &pageSize=10
     &pageNumber=2