edisonywh / backoffice

Admin tool built with the PETAL stack
MIT License
217 stars 15 forks source link

Implement filtering engine for Ecto resolver #10

Closed edisonywh closed 3 years ago

edisonywh commented 3 years ago

With this commit, Ecto resolver can now understand complex filtering like this:

/admin/users?inserted_at[from]=2020-12-30&inserted_at[to]=2020-12-31 /admin/users?id=[gte]60 /admin/users?order_by=[desc]id

But this is only the first step, the next step is to build a UI to go along with it.

This commit also breaks the current search field, which previously searches across multiple fields as specified by users, whereas the new filtering engine expects search per field.

Partially fixes #5