Closed chahat closed 4 years ago
Search functionality was implemented in a basic scenario, without sub-scenarios. We have not got declared requirements for this feature. Time was not spent on additional implementations. Created Improvement task: https://jira.hiendsys.ru/browse/FCO-486
Search is in header and does not have access to the filter, so it would require larger change to query the asset on the filter date. Also since the table is searchable in itself, it can be left as it is. if a user wants to search asset on current date, he clears all filters and then uses table search however if he wants to search an asset in general then he uses the header search and that always direct to the latest available date.
However the second problem was that the date in the url is not reflected in the filter date. For example currently you are on 31/07/2020 then you use date to go back to 30/06/2020, now search for apple . Clicking apple will set the url to latest available date (lets assume it was 31/07/2020) but the date field remains on 30/06/2020. So you are seeing data on the latest available date whereas the filterDate is not on the latest available date.
Fixed with FCO-Frontend#077c4b6 setInt should use the date from the url since that is the chosenDate and is not available in the filterPreset, datepicker should issue patchValue to set dateTo from filter. the former is ued when the page loads fro the first time with a date in the url, the later is used when already datepicker has been initialized and now when you have changed the date before search. the search will always set date to latestAvailableDate, former change patches that to the datepicker