Allow marking wishes as fulfilled

This commit is contained in:
Jay Trees 2022-04-19 08:57:27 +02:00
parent 1037ccef66
commit 62ec209a5f
5 changed files with 33 additions and 3 deletions

View file

@ -296,6 +296,27 @@ $(function () {
}
});
/**
* Mark as Fulfilled
*/
$(document).on('click', '.wish-fulfilled', function() {
var button = $(this);
var card = button.closest('.card');
button.api({
action : 'update wish status',
method : 'PUT',
data : {
wish_id : card.attr('data-id'),
wish_status : wish_status_fulfilled,
},
on : 'now',
onSuccess : function(response, element, xhr) {
card.closest('.column').fadeOut();
},
});
});
/**
* Delete Wish
*/