Itheum / data-dex

DApp with suite of web3 tools to trade personal data on MultiversX
https://datadex.itheum.io
GNU General Public License v3.0
466 stars 6 forks source link

Data NFT Details: AGE field filter doesn't correctly check value to filter results. #386

Closed fuzzyduke closed 1 year ago

fuzzyduke commented 1 year ago

Description:

  1. Placing "AGE" as 2 or 7 returns the same results for output of 27 days which is wrong. Also please consider a greater or less than for age as then it becomes more relevant.

image

damienen commented 1 year ago

There's multiple ways to do this and it requires some archtiectural decisions:

  1. We can use a new library to implement an age filter with a date RANGE picker the same way it's implemented on the MultiversX mainnet explorer
  2. We can use two normal Date Pickers in order to select a min and a max separately'
  3. We can leave this be as right now a fuzzy search is implemented and it could be helpful and intuitive to just write "360 days" when you want to search for old transactions even though there's this inconvenient
newbreedofgeek commented 1 year ago

this can move to future work

damienen commented 1 year ago

You can take inspiration from MX's mainnet explorer

damienen commented 1 year ago

If it takes too long ping me and we can discuss a simplified version.

bucurdavid commented 1 year ago

Have you any idea of a package that I can use?

bucurdavid commented 1 year ago

As I understand in the Filter class code, it takes a value (string or number) and it filters based on that. I think even using a date picker will not work with the current implementation of the Filter class because it will update the value and filter on that specific date.

damienen commented 1 year ago

Good job! Love the implementation