js/tables/bookings.js unconditionally called AdditionalFilters.init()
for 'filter-completed' and 'filter-cancelled' on every page load where
the script is included. patron-detail-tabs.inc only renders those
filter elements (and #bookings_table itself) when the patron has at
least one booking, past or present. For any patron with no booking
history, this produced two console.debug 'Element not found' messages
on moremember.pl and circ/circulation.pl.
Guard the ready handler on the presence of #bookings_table, mirroring
the existing pattern in holds.js.
Test plan:
1) Open moremember.pl for a patron with no bookings; confirm no
AdditionalFilters console messages appear.
2) Open moremember.pl / circ/circulation.pl for a patron with
bookings; confirm the Bookings tab, filters, and table still work
as before.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>