From f4a2d91be155fd92c1f56bca14c7faa9b5d9fe8c Mon Sep 17 00:00:00 2001 From: Saksham Arora Date: Mon, 11 Dec 2023 18:01:50 +0100 Subject: [PATCH] Fix: Search/Scan Barcode and auto checkout loan --- .../Patron/PatronDetails/ItemsSearch/ItemsSearch.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/pages/backoffice/Patron/PatronDetails/ItemsSearch/ItemsSearch.js b/src/lib/pages/backoffice/Patron/PatronDetails/ItemsSearch/ItemsSearch.js index 5388a5165..b43688c33 100644 --- a/src/lib/pages/backoffice/Patron/PatronDetails/ItemsSearch/ItemsSearch.js +++ b/src/lib/pages/backoffice/Patron/PatronDetails/ItemsSearch/ItemsSearch.js @@ -24,8 +24,13 @@ export default class ItemsSearch extends Component { }; executeSearch = async (queryString, patronPid) => { - const { queryString: propsQueryString, fetchAndCheckoutIfOne } = this.props; + const { + queryString: propsQueryString, + patronDetails, + fetchAndCheckoutIfOne, + } = this.props; queryString = queryString || propsQueryString; + patronPid = patronPid || patronDetails.user_pid; // eslint-disable-next-line react/no-unused-state this.setState({ prevSearchQuery: queryString, executedSearch: true }, () =>