Implement modal-based front-end in Consultation items management UI #129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connects to #92.
What does this PR do?
This PR comes as part of the batch of UI enhancements that need to be performed regarding the Consultation items management screen.
It adds support for managing Consultation items in modal windows taking advantage of asynchronous requests and the already present
magnificPopup
library. Both creation and edition views can be accessed in modal windows while the old fashioned views are still there as an alternative management workflow.There's room for improvement here but I'd say it's good to keep iterating quickly and see how things are going.
How should this be manually tested?
Just check that any Consultation item can be added or edited in modal windows as in the screenshot below at
http:https://gobierto.dev/admin/budgets/consultations/<consultation_item>/items
:In addition, check that the old fashioned synchronous views are still there (although not looking exactly the same as before to ensure compatibility) in any of the following URLs:
http:https://gobierto.dev/admin/budgets/consultations/<consultation_id>/items/new
http:https://gobierto.dev/admin/budgets/consultations/<consultation_id>/items/<consultation_item_id>/edit
Extra 🎱
Now that we've a pretty stable back-end, I've slightly refactored both
GobiertoBudgetConsultation
'sConsultationForm
andConsultationItemForm
classes for consistency and ease of use.