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>
This commit is contained in:
Nick Clemens 2025-04-23 15:02:59 +00:00 committed by Katrin Fischer
parent 8a628fd131
commit 6db083163d
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 6 additions and 2 deletions

View File

@ -201,13 +201,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",