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
KG - Step 2B: Calendar Query and Rendering Need Improvement Part 3 - Initial Load #1031
Conversation
@@ -105,7 +105,7 @@ def show_move_visits | |||
@consolidated = params[:consolidated] | |||
@merged = params[:merged] | |||
@statuses_hidden = params[:statuses_hidden] | |||
@arm = Arm.eager_load(:visit_groups).find( params[:arm_id] ) | |||
@arm = Arm.find( params[:arm_id] ) |
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.
Bug: Eager load prevented the move visits visit groups from ordering by position
@@ -19,6 +19,7 @@ | |||
-# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
.modal-dialog.modal-md | |||
.modal-content | |||
= hidden_field_tag :arm_id, arm.id |
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.
Bug: arm_id
was not being found by javascript when changing the selected visit
@@ -22,6 +22,6 @@ $("#modal_place #modal_errors").html("<%= escape_javascript(render( 'shared/moda | |||
<% else %> | |||
$('.visit-group-<%=@visit_group.id%>:visible').replaceWith("<%= j render 'service_calendars/master_calendar/pppv/visit_group', visit_group: @visit_group, tab: params[:tab], page: @page, pages: @pages, portal: @portal, review: @review, admin: @admin, merged: @merged, consolidated: @consolidated, statuses_hidden: params[:statuses_hidden] %>") | |||
$('.visit-group-select:visible').html("<%= j render 'service_calendars/master_calendar/pppv/visit_group_page_select', service_request: @service_request, sub_service_request: @sub_service_request, arm: @visit_group.arm, tab: params[:tab], page: @page, pages: @pages, portal: @portal, review: @review, admin: @admin, merged: @merged, consolidated: @consolidated, statuses_hidden: params[:statuses_hidden] %>") | |||
$('#visits-select-for-<%=@visit_group.arm_id%>').selectpicker() | |||
$('#visits-select-for-<%=@visit_group.arm_id%>.selectpicker').selectpicker() |
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.
Bug: Selector was not finding the select
for some reason. @jwiel86 and I looked into this and could not figure out why. Adding .selectpicker
seemed to fix it for some reason. Again, don't really understand why...
Pivotal:
https://www.pivotaltracker.com/story/show/147048549
Focusing on optimizing the PPPV and OTF calendars through a mix of eager loading and refactors.
Note: Reopened after removing refactor code of the previous parts of this story to make review easier. Will post those changes in another PR after this is approved and merged.