View | Details | Raw Unified | Return to bug 31698
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-3 / +4 lines)
Lines 1842-1856 Link Here
1842
1842
1843
                let biblioID = $("#biblio_id").val();
1843
                let biblioID = $("#biblio_id").val();
1844
                let apiUrl = `/api/v1/items?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`;
1844
                let apiUrl = `/api/v1/items?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`;
1845
1846
                $.ajax({
1845
                $.ajax({
1847
                    url: apiUrl,
1846
                    url: apiUrl,
1848
                    method: "GET",
1847
                    method: "GET",
1849
                    dataType: "json",
1848
                    dataType: "json",
1850
                    success: function (data) {
1849
                    success: function (data) {
1851
                        if (data.length > 0) {
1850
                        if (data.length > 0) {
1851
                            const unique_data = data.filter((item, index, self) =>
1852
                                index === self.findIndex(t => t.biblio_id === item.biblio_id)
1853
                            );
1852
                            let resultHtml = "";
1854
                            let resultHtml = "";
1853
                            $.each(data, function (index, item) {
1855
                            $.each(unique_data, function (index, item) {
1854
                                resultHtml += `
1856
                                resultHtml += `
1855
                                    <div class="alert alert-success">
1857
                                    <div class="alert alert-success">
1856
                                        <strong>Biblionumber:</strong> ${item.biblio_id} <br>
1858
                                        <strong>Biblionumber:</strong> ${item.biblio_id} <br>
1857
- 

Return to bug 31698