Manage Reservations grid ignores org selector on initial load

Bug #1877187 reported by Jeff Davis on 2020-05-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
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: added: booking
Jane Sandberg (sandbej) 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.

Jane Sandberg (sandbej) 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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers