FleetCart/Modules/Order/Resources/assets/admin/js/main.js
2023-06-11 13:14:03 +01:00

14 lines
376 B
JavaScript

$('#order-status').change((e) => {
$.ajax({
type: 'PUT',
url: route('admin.orders.status.update', e.currentTarget.dataset.id),
data: { status: e.currentTarget.value },
success: (message) => {
success(message);
},
error: (xhr) => {
error(xhr.responseJSON.message);
},
});
});