add specs

This commit is contained in:
viehlieb 2025-05-22 12:27:25 +02:00
parent e902aa0d5a
commit 45db0575b1
46 changed files with 714 additions and 238 deletions

View file

@ -90,18 +90,20 @@ $(document).off('change', '[class^="ajax-update-all-link-"] select').on('change'
});
});
$(document).off('change', '[class^="ajax-update-link-"] select').on('change', '[class^="ajax-update-link-"] select', function () {
$(document).off('change', '.ajax-update-sepa-select').on('change', '.ajax-update-sepa-select', function () {
var selectedValue = $(this).val();
var url = $(this).closest('a').attr('href');
var url = $(this).data('url');
console.log(url);
console.log(selectedValue);
$.ajax({
url: url,
method: 'PATCH',
data: { sepa_sequence_type: selectedValue },
success: function (response) {
// Handle success response
console.log("succeeded");
},
error: function (error) {
console.log(error);
console.error(error);
}
});
});
@ -132,6 +134,7 @@ $(document).on('ready turbolinks:load', function () {
});
$(document).on('click', '.merge-orders-btn', function () {
const url = $(this).data('url');
const selectedOrderIds = $('input[name="order_ids_for_multi_order[]"]:checked').map(function () {
return $(this).val();