|
Lines 176-186
Link Here
|
| 176 |
}; |
176 |
}; |
| 177 |
|
177 |
|
| 178 |
const show_itemtype_column = [% Koha.Preference('AllowHoldItemTypeSelection') ? 1 : 0 | html %]; |
178 |
const show_itemtype_column = [% Koha.Preference('AllowHoldItemTypeSelection') ? 1 : 0 | html %]; |
|
|
179 |
|
| 180 |
var table_settings = [% TablesSettings.GetTableSettings('members', 'holdshistory', 'holdshistory-table', 'json') | $raw %]; |
| 181 |
|
| 182 |
const patron_id = "[% patron.borrowernumber | html %]"; |
| 179 |
</script> |
183 |
</script> |
| 180 |
<script> |
184 |
<script> |
| 181 |
$(document).ready(function() { |
185 |
$(document).ready(function() { |
| 182 |
var table_settings = [% TablesSettings.GetTableSettings('members', 'holdshistory', 'holdshistory-table', 'json') | $raw %]; |
|
|
| 183 |
|
| 184 |
let item_type_column = table_settings.columns.find(c => c.columnname == 'itemtype'); |
186 |
let item_type_column = table_settings.columns.find(c => c.columnname == 'itemtype'); |
| 185 |
if ( !show_itemtype_column ) { |
187 |
if ( !show_itemtype_column ) { |
| 186 |
item_type_column.is_hidden = 1; |
188 |
item_type_column.is_hidden = 1; |
|
Lines 227-233
Link Here
|
| 227 |
|
229 |
|
| 228 |
}; |
230 |
}; |
| 229 |
|
231 |
|
| 230 |
let table_url = '/api/v1/patrons/[% patron.borrowernumber | uri %]/holds'; |
232 |
let table_url = `/api/v1/patrons/${patron_id}/holds`; |
| 231 |
let table_embeds = ['+strings', 'biblio', 'item', 'pickup_library']; |
233 |
let table_embeds = ['+strings', 'biblio', 'item', 'pickup_library']; |
| 232 |
if (old){ |
234 |
if (old){ |
| 233 |
table_url += '?old=1'; |
235 |
table_url += '?old=1'; |
|
Lines 323-329
Link Here
|
| 323 |
return $date(row.cancellation_date) |
325 |
return $date(row.cancellation_date) |
| 324 |
} |
326 |
} |
| 325 |
}, |
327 |
}, |
| 326 |
{ |
328 |
...(show_itemtype_column? |
|
|
329 |
[{ |
| 327 |
data: "item_type_id", |
330 |
data: "item_type_id", |
| 328 |
datatype: "coded_value:item_type", |
331 |
datatype: "coded_value:item_type", |
| 329 |
dataFilter: "item_types", |
332 |
dataFilter: "item_types", |
|
Lines 340-346
Link Here
|
| 340 |
return ""; |
343 |
return ""; |
| 341 |
[% END %] |
344 |
[% END %] |
| 342 |
} |
345 |
} |
| 343 |
}, |
346 |
]:[]), |
| 344 |
{ |
347 |
{ |
| 345 |
data: "status", |
348 |
data: "status", |
| 346 |
searchable: false, |
349 |
searchable: false, |
| 347 |
- |
|
|