Bug 38395: Only embed deleted_biblios for old holds

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6db083163d)
This commit is contained in:
Nick Clemens 2025-04-23 15:02:59 +00:00 committed by Paul Derscheid
parent 72e52478ff
commit 1d6731025d
1 changed files with 6 additions and 2 deletions

View File

@ -213,13 +213,17 @@
};
let table_url = '/api/v1/patrons/[% patron.borrowernumber | uri %]/holds';
if (old){table_url += '?old=1'}
let table_embeds = ['biblio', 'item', 'pickup_library', 'pickup_library.branchname'];
if (old){
table_url += '?old=1';
table_embeds.push('deleted_biblio');
}
return $(table_id).kohaTable({
ajax: {
url: table_url,
},
order: [],
embed: ['biblio', 'deleted_biblio', 'item', 'pickup_library', 'pickup_library.branchname'],
embed: table_embeds,
columns: [
{
data: "biblio.title:biblio.subtitle:biblio.medium",