Lines 1901-1909
Link Here
|
1901 |
method: "GET", |
1901 |
method: "GET", |
1902 |
dataType: "json", |
1902 |
dataType: "json", |
1903 |
success: function (data) { |
1903 |
success: function (data) { |
1904 |
if (data.length > 0) { |
1904 |
// Filter for exact matches only |
|
|
1905 |
let exactMatches = data.filter(item => item.external_id === externalID); |
1906 |
if (exactMatches.length > 0) { |
1905 |
let resultHtml = ""; |
1907 |
let resultHtml = ""; |
1906 |
$.each(data, function (index, item) { |
1908 |
$.each(exactMatches, function (index, item) { |
1907 |
resultHtml += ` |
1909 |
resultHtml += ` |
1908 |
<div class="alert alert-success"> |
1910 |
<div class="alert alert-success"> |
1909 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
1911 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
Lines 1929-1935
Link Here
|
1929 |
event.preventDefault(); |
1931 |
event.preventDefault(); |
1930 |
$('#move_hold_biblio_confirm').prop('disabled' , true ); |
1932 |
$('#move_hold_biblio_confirm').prop('disabled' , true ); |
1931 |
|
1933 |
|
1932 |
let biblioID = $("#biblio_id").val(); |
1934 |
let biblioID = parseInt( $("#biblio_id").val() ); |
1933 |
let apiUrl = `/api/v1/biblios?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`; |
1935 |
let apiUrl = `/api/v1/biblios?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`; |
1934 |
$.ajax({ |
1936 |
$.ajax({ |
1935 |
url: apiUrl, |
1937 |
url: apiUrl, |
Lines 1939-1947
Link Here
|
1939 |
'Accept': 'application/json' |
1941 |
'Accept': 'application/json' |
1940 |
}, |
1942 |
}, |
1941 |
success: function (data) { |
1943 |
success: function (data) { |
1942 |
if (data.length > 0) { |
1944 |
// Filter for exact matches only |
|
|
1945 |
let exactMatches = data.filter(item => item.biblio_id === biblioID); |
1946 |
|
1947 |
|
1948 |
if (exactMatches.length > 0) { |
1943 |
let resultHtml = ""; |
1949 |
let resultHtml = ""; |
1944 |
$.each(data, function (index, item) { |
1950 |
$.each(exactMatches, function (index, item) { |
1945 |
resultHtml += ` |
1951 |
resultHtml += ` |
1946 |
<div class="alert alert-success"> |
1952 |
<div class="alert alert-success"> |
1947 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
1953 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
Lines 1954-1963
Link Here
|
1954 |
$("#biblioResultMessage").html(resultHtml); |
1960 |
$("#biblioResultMessage").html(resultHtml); |
1955 |
} else { |
1961 |
} else { |
1956 |
$("#biblioResultMessage").html(` |
1962 |
$("#biblioResultMessage").html(` |
1957 |
<div class="alert alert-warning">No item found with barcode: ${biblioID}.</div> |
1963 |
<div class="alert alert-warning">No record found with biblionumber: ${biblioID}.</div> |
1958 |
`); |
1964 |
`); |
1959 |
} |
1965 |
} |
1960 |
}, |
1966 |
} |
1961 |
}); |
1967 |
}); |
1962 |
}); |
1968 |
}); |
1963 |
|
1969 |
|
Lines 2093-2099
Link Here
|
2093 |
$('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length)); |
2099 |
$('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length)); |
2094 |
$('#cancel_hold_alert').show(); |
2100 |
$('#cancel_hold_alert').show(); |
2095 |
localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')); |
2101 |
localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')); |
2096 |
$('#item_record_choice').prop('disabled' , count ); |
2102 |
$('#item_record_choice').prop('disabled' , !$('.select_hold:checked').length ); |
2097 |
}); |
2103 |
}); |
2098 |
|
2104 |
|
2099 |
$('.holds_table .select_hold').click(function() { |
2105 |
$('.holds_table .select_hold').click(function() { |
Lines 2105-2111
Link Here
|
2105 |
$('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length)); |
2111 |
$('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length)); |
2106 |
$('#cancel_hold_alert').show(); |
2112 |
$('#cancel_hold_alert').show(); |
2107 |
localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')); |
2113 |
localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')); |
2108 |
$('#item_record_choice').prop('disabled' , count ); |
2114 |
$('#item_record_choice').prop('disabled' , !$('.select_hold:checked').length ); |
2109 |
}); |
2115 |
}); |
2110 |
|
2116 |
|
2111 |
$('.move_hold_item').click(function(e) { |
2117 |
$('.move_hold_item').click(function(e) { |
2112 |
- |
|
|