Skip to content
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

Merged
merged 21 commits into from Aug 3, 2017

Conversation

kayla-glick
Copy link
Contributor

@kayla-glick kayla-glick commented Jul 27, 2017

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.

@@ -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] )
Copy link
Contributor Author

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
Copy link
Contributor Author

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()
Copy link
Contributor Author

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...

@Stuart-Johnson Stuart-Johnson merged commit 1c4434f into v3.0.0 Aug 3, 2017
@Stuart-Johnson Stuart-Johnson deleted the kg-calendar_optimization_pt_3_slimmed branch August 3, 2017 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants