Lines 165-172
Link Here
|
165 |
//Remove item type column settings |
165 |
//Remove item type column settings |
166 |
table_settings['columns'] = table_settings['columns'].filter(function(c){return c['columnname'] != 'itemtype';}); |
166 |
table_settings['columns'] = table_settings['columns'].filter(function(c){return c['columnname'] != 'itemtype';}); |
167 |
[% END %] |
167 |
[% END %] |
168 |
let current_holds_table = build_holds_table("#table_holdshistory"); |
168 |
const hold_cancellation_reasons = {}; |
169 |
let old_holds_table = build_holds_table("#table_oldholdshistory", 1); |
169 |
$.getJSON("/api/v1/authorised_value_categories/HOLD_CANCELLATION/authorised_values?_per_page=-1") |
|
|
170 |
.done(function(data) { |
171 |
// Convert the array into an associative array for ease of lookup |
172 |
data.forEach(function(item) { |
173 |
if (item.value !== undefined) { |
174 |
hold_cancellation_reasons[item.value] = item.description; |
175 |
} |
176 |
}); |
177 |
|
178 |
let current_holds_table = build_holds_table("#table_holdshistory"); |
179 |
let old_holds_table = build_holds_table("#table_oldholdshistory", 1); |
180 |
}); |
170 |
function build_holds_table(table_id, old){ |
181 |
function build_holds_table(table_id, old){ |
171 |
let additional_filters = { |
182 |
let additional_filters = { |
172 |
"-or": function(){ |
183 |
"-or": function(){ |
Lines 320-326
Link Here
|
320 |
} else if (row.cancellation_date) { |
331 |
} else if (row.cancellation_date) { |
321 |
let r = _("Cancelled"); |
332 |
let r = _("Cancelled"); |
322 |
if (row.cancellation_reason){ |
333 |
if (row.cancellation_reason){ |
323 |
r += "(%s)".format("FIXME"); //FIXME Add HOLD_CANCELLATION description |
334 |
r += " ( %s )".format(hold_cancellation_reasons[row.cancellation_reason]); |
324 |
} |
335 |
} |
325 |
return r; |
336 |
return r; |
326 |
} else if (row.status == 'W') { |
337 |
} else if (row.status == 'W') { |
327 |
- |
|
|