|
Lines 439-451
$(document).ready(function () {
Link Here
|
| 439 |
$("#deleteVendorForm").on("submit", function (e) { |
439 |
$("#deleteVendorForm").on("submit", function (e) { |
| 440 |
e.preventDefault(); |
440 |
e.preventDefault(); |
| 441 |
var id = $("#booksellerid").val(); |
441 |
var id = $("#booksellerid").val(); |
| 442 |
let options = { |
442 |
const client = APIClient.acquisition; |
| 443 |
url: "/api/v1/acquisitions/vendors/" + id, |
443 |
client.vendors.delete(id).then( |
| 444 |
method: "DELETE", |
444 |
success => { |
| 445 |
contentType: "application/json", |
445 |
window.location.href = "/cgi-bin/koha/acquisition/vendors"; |
| 446 |
}; |
446 |
}, |
| 447 |
$.ajax(options).then(function (thing, result) { |
447 |
error => {} |
| 448 |
window.location.href = "/cgi-bin/koha/acquisition/vendors"; |
448 |
); |
| 449 |
}); |
|
|
| 450 |
}); |
449 |
}); |
| 451 |
}); |
450 |
}); |
| 452 |
- |
|
|