Make logbook search to be contextual
Use case is:
- User searches a text and there are several results
- User wants to click on a result to go to the place in time when it was produced
The current behaviour of the searchbox has to be moved to URL-action via react-router. A complex search serializes the search in the following json structure:
[
{
"criteria": "Everywhere",
"search": "keyword",
"selectText": "Everywhere"
},
{
"criteria": "category",
"search": "info",
"selectText": "Category"
},
{
"criteria": "Creation date",
"search": "before",
"date": "05 May 2021",
"selectText": "Creation date",
"momentDate": "2021-05-04T22:00:00.000Z"
},
{
"criteria": "Creation date",
"search": "after",
"date": "13 May 2021",
"selectText": "Creation date",
"momentDate": "2021-05-12T22:00:00.000Z"
}
]
This could potentially be transformed in:
?criteria=everywhere,category,date,date&search=keyword,info,05 May 2021,13 May 2021
Edited by Alejandro De Maria Antolinos