Closed aleene closed 7 years ago
Compatability check might be required before the user adds a search element. If it is not compatable, the user can be alerted "Adding this search element to your search invalidates a previously defined search element (abort or continue?)". Upon adding the search element the incompatible one is removed. Create a single addSearch( element: SearchComponent, value: Any) function. And an isAddable( element: SearchComponent) function. In SearchTemplate I can add a flag to indicate whether the search has become unique, ie can be searched in basic- or advanced-mode only. Any new addition must then be checked. Otherwise no check is needed.
Added the simple search url creation to OFF and the selector. Added a calculated type variable to SearchTemplate, which checks the search variables to seen if we have a simple or advanced query. Add isHidden to cell tags.
Barcode needs a barcode type selector (EAN-8, UPC-12, EAN-13), which is used to pad the barcode.
If the user has set a barcode allow him to set the length. Add a padded() to BarcodeType. Add check for numbers only the textField.
Hide or disable incompatible search options in simple search. So the user can see what he loses.
If advanced disable barcode, entry date, edit date.
Seems all done. (Except palm oil and partial dates and multilingual
The advanced search does not implement all search possibilities (barcode, multilingual, palm oil stuff, nutrition score levels, roles (photographer, informer, contributor), last edit date, entry date). Some are however supported in the basic search. Implement this as well and warn for incompatibilities.