|
Lines 2198-2203
async function load_patron_holds_table(biblio_id, split_data) {
Link Here
|
| 2198 |
.attr("aria-hidden", true) |
2198 |
.attr("aria-hidden", true) |
| 2199 |
); |
2199 |
); |
| 2200 |
}, |
2200 |
}, |
|
|
2201 |
onChange: function (selectedDates, dateStr, instance) { |
| 2202 |
let hold_id = $(instance.input).attr("data-id"); |
| 2203 |
let current_date = $(instance.input).attr("data-suspend-date"); |
| 2204 |
dateStr = dateStr ? dateStr : null; |
| 2205 |
if (current_date != dateStr) { |
| 2206 |
let params = |
| 2207 |
dateStr !== null && dateStr !== "" |
| 2208 |
? JSON.stringify({ end_date: dateStr }) |
| 2209 |
: null; |
| 2210 |
$.ajax({ |
| 2211 |
method: "POST", |
| 2212 |
url: |
| 2213 |
"/api/v1/holds/" + |
| 2214 |
encodeURIComponent(hold_id) + |
| 2215 |
"/suspension", |
| 2216 |
contentType: "application/json", |
| 2217 |
data: params, |
| 2218 |
success: function (data) { |
| 2219 |
holdsQueueTable.api().ajax.reload(null, false); |
| 2220 |
$(instance.input).attr( |
| 2221 |
"data-suspend-date", |
| 2222 |
dateStr |
| 2223 |
); |
| 2224 |
}, |
| 2225 |
error: function (jqXHR, textStatus, errorThrown) { |
| 2226 |
holdsQueueTable.api().ajax.reload(null, false); |
| 2227 |
}, |
| 2228 |
}); |
| 2229 |
} |
| 2230 |
}, |
| 2201 |
}); |
2231 |
}); |
| 2202 |
$(".toggle-suspend." + table_class).one("click", function (e) { |
2232 |
$(".toggle-suspend." + table_class).one("click", function (e) { |
| 2203 |
e.preventDefault(); |
2233 |
e.preventDefault(); |
| 2204 |
- |
|
|