From b23da4405b0899f4b66736f54a05fc06b369e9f7 Mon Sep 17 00:00:00 2001
From: Paul Derscheid <paul.derscheid@lmscloud.de>
Date: Mon, 5 Aug 2024 12:37:05 +0000
Subject: [PATCH] Bug 37141: (follow-up) Move filter_expired to outer scope

This allows access by the bookings-tab and the expired_filter click handlers
which are both required for the state change to work.

Signed-off-by: David Nind <david@davidnind.com>
---
 koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js b/koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js
index 7461ce9488..22af9db15c 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js
@@ -3,8 +3,8 @@
 var bookings_table;
 $(document).ready(function () {
     // Load bookings table on tab selection
+    let filter_expired = true;
     $("#bookings-tab").on("click", function () {
-        let filter_expired = true;
         let additional_filters = {
             patron_id: patron_borrowernumber,
             end_date: function () {
-- 
2.39.2