Lines 1843-1851
Link Here
|
1843 |
method: "GET", |
1843 |
method: "GET", |
1844 |
dataType: "json", |
1844 |
dataType: "json", |
1845 |
success: function (data) { |
1845 |
success: function (data) { |
1846 |
if (data.length > 0) { |
1846 |
// Filter for exact matches only |
|
|
1847 |
let exactMatches = data.filter(item => item.external_id === externalID); |
1848 |
if (exactMatches.length > 0) { |
1847 |
let resultHtml = ""; |
1849 |
let resultHtml = ""; |
1848 |
$.each(data, function (index, item) { |
1850 |
$.each(exactMatches, function (index, item) { |
1849 |
resultHtml += ` |
1851 |
resultHtml += ` |
1850 |
<div class="alert alert-success"> |
1852 |
<div class="alert alert-success"> |
1851 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
1853 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
Lines 1871-1877
Link Here
|
1871 |
event.preventDefault(); |
1873 |
event.preventDefault(); |
1872 |
$('#move_hold_biblio_confirm').prop('disabled' , true ); |
1874 |
$('#move_hold_biblio_confirm').prop('disabled' , true ); |
1873 |
|
1875 |
|
1874 |
let biblioID = $("#biblio_id").val(); |
1876 |
let biblioID = parseInt( $("#biblio_id").val() ); |
1875 |
let apiUrl = `/api/v1/biblios?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`; |
1877 |
let apiUrl = `/api/v1/biblios?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`; |
1876 |
$.ajax({ |
1878 |
$.ajax({ |
1877 |
url: apiUrl, |
1879 |
url: apiUrl, |
Lines 1881-1889
Link Here
|
1881 |
'Accept': 'application/json' |
1883 |
'Accept': 'application/json' |
1882 |
}, |
1884 |
}, |
1883 |
success: function (data) { |
1885 |
success: function (data) { |
1884 |
if (data.length > 0) { |
1886 |
// Filter for exact matches only |
|
|
1887 |
let exactMatches = data.filter(item => item.biblio_id === biblioID); |
1888 |
|
1889 |
|
1890 |
if (exactMatches.length > 0) { |
1885 |
let resultHtml = ""; |
1891 |
let resultHtml = ""; |
1886 |
$.each(data, function (index, item) { |
1892 |
$.each(exactMatches, function (index, item) { |
1887 |
resultHtml += ` |
1893 |
resultHtml += ` |
1888 |
<div class="alert alert-success"> |
1894 |
<div class="alert alert-success"> |
1889 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
1895 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
Lines 1896-1905
Link Here
|
1896 |
$("#biblioResultMessage").html(resultHtml); |
1902 |
$("#biblioResultMessage").html(resultHtml); |
1897 |
} else { |
1903 |
} else { |
1898 |
$("#biblioResultMessage").html(` |
1904 |
$("#biblioResultMessage").html(` |
1899 |
<div class="alert alert-warning">No item found with barcode: ${biblioID}.</div> |
1905 |
<div class="alert alert-warning">No record found with biblionumber: ${biblioID}.</div> |
1900 |
`); |
1906 |
`); |
1901 |
} |
1907 |
} |
1902 |
}, |
1908 |
} |
1903 |
}); |
1909 |
}); |
1904 |
}); |
1910 |
}); |
1905 |
|
1911 |
|
Lines 2033-2039
Link Here
|
2033 |
$('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length)); |
2039 |
$('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length)); |
2034 |
$('#cancel_hold_alert').show(); |
2040 |
$('#cancel_hold_alert').show(); |
2035 |
localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')); |
2041 |
localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')); |
2036 |
$('#item_record_choice').prop('disabled' , count ); |
2042 |
$('#item_record_choice').prop('disabled' , !$('.select_hold:checked').length ); |
2037 |
}); |
2043 |
}); |
2038 |
|
2044 |
|
2039 |
$('.holds_table .select_hold').click(function() { |
2045 |
$('.holds_table .select_hold').click(function() { |
Lines 2044-2050
Link Here
|
2044 |
$('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length)); |
2050 |
$('#cancel_hold_alert').html( MSG_CANCEL_ALERT.format($('.holds_table .select_hold:checked').length)); |
2045 |
$('#cancel_hold_alert').show(); |
2051 |
$('#cancel_hold_alert').show(); |
2046 |
localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')); |
2052 |
localStorage.selectedHolds = $('.holds_table .select_hold:checked').toArray().map(el => $(el).data('id')); |
2047 |
$('#item_record_choice').prop('disabled' , count ); |
2053 |
$('#item_record_choice').prop('disabled' , !$('.select_hold:checked').length ); |
2048 |
}); |
2054 |
}); |
2049 |
|
2055 |
|
2050 |
$('.move_hold_item').click(function(e) { |
2056 |
$('.move_hold_item').click(function(e) { |
2051 |
- |
|
|