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 1931-1945 Link Here
1931
1931
1932
                let biblioID = $("#biblio_id").val();
1932
                let biblioID = $("#biblio_id").val();
1933
                let apiUrl = `/api/v1/items?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`;
1933
                let apiUrl = `/api/v1/items?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`;
1934
1935
                $.ajax({
1934
                $.ajax({
1936
                    url: apiUrl,
1935
                    url: apiUrl,
1937
                    method: "GET",
1936
                    method: "GET",
1938
                    dataType: "json",
1937
                    dataType: "json",
1939
                    success: function (data) {
1938
                    success: function (data) {
1940
                        if (data.length > 0) {
1939
                        if (data.length > 0) {
1940
                            const unique_data = data.filter((item, index, self) =>
1941
                                index === self.findIndex(t => t.biblio_id === item.biblio_id)
1942
                            );
1941
                            let resultHtml = "";
1943
                            let resultHtml = "";
1942
                            $.each(data, function (index, item) {
1944
                            $.each(unique_data, function (index, item) {
1943
                                resultHtml += `
1945
                                resultHtml += `
1944
                                    <div class="alert alert-success">
1946
                                    <div class="alert alert-success">
1945
                                        <strong>Biblionumber:</strong> ${item.biblio_id} <br>
1947
                                        <strong>Biblionumber:</strong> ${item.biblio_id} <br>
1946
- 

Return to bug 31698