Closed hancush closed 2 years ago
Great catch! @smcalilly and I will get on this today.
The current code attempts to get the year from the url request.
but the data selector does not update the url, instead we use javascript to update the values of the date in a bunch of places.
to me, it seems a bit more correct for the date selector to update the url, otherwise the you have urls that don't take you to the page you are looking at now. (if you select a previous year, the url does not change and will show the year you first navigated to).
modifying the URL could a number of other things simpler, but we lose the AJAX stuff. that's a pretty big change.
So, while i think it would be good to have cool urls, that's a bigger change than we should make right now.
@smcalilly please add a little javascript to https://github.com/datamade/bga-payroll/blob/78aea94ef7c71db923d41a66684c323ee022682d/bga_database/static/js/employer.js
to update the date year in the download url instead of trying to get the year from the url.
(See selected year vs. location of the data download link at bottom left.)