add specs
This commit is contained in:
parent
e902aa0d5a
commit
45db0575b1
46 changed files with 714 additions and 238 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue