Lines 1812-1820
Link Here
|
1812 |
method: "GET", |
1812 |
method: "GET", |
1813 |
dataType: "json", |
1813 |
dataType: "json", |
1814 |
success: function (data) { |
1814 |
success: function (data) { |
1815 |
if (data.length > 0) { |
1815 |
// Filter for exact matches only |
|
|
1816 |
let exactMatches = data.filter(item => item.external_id === externalID); |
1817 |
if (exactMatches.length > 0) { |
1816 |
let resultHtml = ""; |
1818 |
let resultHtml = ""; |
1817 |
$.each(data, function (index, item) { |
1819 |
$.each(exactMatches, function (index, item) { |
1818 |
resultHtml += ` |
1820 |
resultHtml += ` |
1819 |
<div class="alert alert-success"> |
1821 |
<div class="alert alert-success"> |
1820 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
1822 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
Lines 1840-1846
Link Here
|
1840 |
event.preventDefault(); |
1842 |
event.preventDefault(); |
1841 |
$('#move_hold_biblio_confirm').prop('disabled' , true ); |
1843 |
$('#move_hold_biblio_confirm').prop('disabled' , true ); |
1842 |
|
1844 |
|
1843 |
let biblioID = $("#biblio_id").val(); |
1845 |
let biblioID = parseInt( $("#biblio_id").val() ); |
1844 |
let apiUrl = `/api/v1/biblios?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`; |
1846 |
let apiUrl = `/api/v1/biblios?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`; |
1845 |
$.ajax({ |
1847 |
$.ajax({ |
1846 |
url: apiUrl, |
1848 |
url: apiUrl, |
Lines 1850-1858
Link Here
|
1850 |
'Accept': 'application/json' |
1852 |
'Accept': 'application/json' |
1851 |
}, |
1853 |
}, |
1852 |
success: function (data) { |
1854 |
success: function (data) { |
1853 |
if (data.length > 0) { |
1855 |
// Filter for exact matches only |
|
|
1856 |
let exactMatches = data.filter(item => item.biblio_id === biblioID); |
1857 |
|
1858 |
|
1859 |
if (exactMatches.length > 0) { |
1854 |
let resultHtml = ""; |
1860 |
let resultHtml = ""; |
1855 |
$.each(data, function (index, item) { |
1861 |
$.each(exactMatches, function (index, item) { |
1856 |
resultHtml += ` |
1862 |
resultHtml += ` |
1857 |
<div class="alert alert-success"> |
1863 |
<div class="alert alert-success"> |
1858 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
1864 |
<strong>Biblionumber:</strong> ${item.biblio_id} <br> |
Lines 1865-1874
Link Here
|
1865 |
$("#biblioResultMessage").html(resultHtml); |
1871 |
$("#biblioResultMessage").html(resultHtml); |
1866 |
} else { |
1872 |
} else { |
1867 |
$("#biblioResultMessage").html(` |
1873 |
$("#biblioResultMessage").html(` |
1868 |
<div class="alert alert-warning">No item found with barcode: ${biblioID}.</div> |
1874 |
<div class="alert alert-warning">No record found with biblionumber: ${biblioID}.</div> |
1869 |
`); |
1875 |
`); |
1870 |
} |
1876 |
} |
1871 |
}, |
1877 |
} |
1872 |
}); |
1878 |
}); |
1873 |
}); |
1879 |
}); |
1874 |
|
1880 |
|
1875 |
- |
|
|