-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reservation rate excel report #338
Reservation rate excel report #338
Conversation
681199a
to
6874a42
Compare
Create the action for fetching the reservation rate report excel. Also add extensions for filenames for all report actions and modify the downloadReport function to not append .docx to filename anymore. This had to be done because all previous reports are .docx but this new one is xlsx.
Conditionally render datepicker in DateTimeRange component. Defaults to always rendering it unless specifying not to render it in controlprops. The Time range part of the DateTimeRange component is nice and useful, so now basically you are able to just render that part.
f77c422
to
0f5e550
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is looking good. I would have prefered having the DateTime component be split up into two different components, since having something called DateTime and then you might only render a Date component can be strange to a developer.
But since I don't know how much refactoring work that would require in this case, I will not require that now.
Just a few things that would be good to check before merging this :)
Good work!
app/shared/modals/reservation-rate-report/ReservationsRateReport.js
Outdated
Show resolved
Hide resolved
app/shared/modals/reservation-rate-report/ReservationsRateReportContainer.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wups, wrong selected state by me :D
0f5e550
to
8e9efab
Compare
I'd also like an opinion/input on the resetting modal state I mentioned in the PR description. |
The warning messages below are due to package called See:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
So the problem is that when the modal is closed the previous state inputted there persist instead of resetting the values? |
Create actions reducers and selectors for Modal.
Create component ReservationRateReportModal. This modal lies in the /reservations page and can be unhidden/shown in the dropdown of <Lataa Raportti> -> Varausasteraportti. This modal will take the basic props the modal itself requires along with units and the action which downloads the report. Within the modal there are fields where the user can select/ input data: Units, Date range and Time range. Unit seletion field is a Typeahead component which is also a new package. Lastly there is the download button which when clicked, will call the api action to download the report.
Errors were mostly due to incorrect proptyping
Install node-sass that is compatible with node version 14.X.X Add a css loader for testing.
8e9efab
to
df247f4
Compare
e3e150d
to
df247f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
ceaf600
to
df247f4
Compare
Remove travis.yml for now so we can merge PRs.
Created capability of downloading the new reservations rate excel report.
Backend PR: andersinno/respa#52
To be done
My components somewhat differ from other components in that my have their own state defined within the components. I don't have too much experience with how things are done in this project with the reducers and the selectors so maybe having their own state is wrong?
Modal location
Unhidden modal with some initial data.
Input some data
Clicking download downloads report
Correct filters in excel file