Manage Reservations grid ignores org selector on initial load

Bug #1877187 reported by Jeff Davis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Undecided
Unassigned

Bug Description

On Booking > Manage Reservations, the grid shows reservations for the whole consortium, even though the "Reservation location" org selector defaults to the current working location + descendants. The console shows this error:

ManageReservationsComponent.html:50 ERROR TypeError: this.reloadGrid is not a function
    at ReservationsGridComponent.ngOnChanges (reservations-grid.component.ts:279)
    at checkAndUpdateDirectiveInline (core.js:31905)
    at checkAndUpdateNodeInline (core.js:44366)
    at checkAndUpdateNode (core.js:44305)
    at debugCheckAndUpdateNode (core.js:45327)
    at debugCheckDirectivesFn (core.js:45270)
    at Object.eval [as updateDirectives] (ManageReservationsComponent.html:72)
    at Object.debugUpdateDirectives [as updateDirectives] (core.js:45258)
    at checkAndUpdateView (core.js:44270)
    at callViewAction (core.js:44636)

View permissions for reservations are global (bug 1835127), which exacerbates the problem. Only the initial page load is affected; if you modify the reservation location by unchecking Descendants or whatever, the grid scopes correctly, so there's an easy workaround.

I see this behavior on master (3.5 beta-ish). 3.4 may also be affected.

Tags: booking
tags: added: booking
Revision history for this message
Jane Sandberg (sandbergja) wrote :

I wonder if this is a lifecycle hooks issue, where this.reloadGrid() just needs to be moved out of ngOnInit in eg2/src/app/staff/booking/reservations-grid.component.ts.

If I have time, I'll take a look at this tonight.

Revision history for this message
Jane Sandberg (sandbergja) wrote :

I didn't figure it out. But it seems like there is some issue with the timing of when data comes over from the org-family-select component.

The console error is from an unrelated lifecycle hooks issue. This branch fixes it: collab/sandbergja/lp1877187_manage_reservations_grid_issues

Revision history for this message
Michele Morgan (mmorgan) wrote :

This is still an issue in 3.12, though I am not seeing the console error that Jeff described in the initial report.

Changed in evergreen:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.