diff --git a/resources/views/tasks/kanban.blade.php b/resources/views/tasks/kanban.blade.php index ba48759f3ac8..8142d7c397aa 100644 --- a/resources/views/tasks/kanban.blade.php +++ b/resources/views/tasks/kanban.blade.php @@ -389,6 +389,32 @@ } self.saveEditTask = function() { + var description = (self.description() || '').trim(); + if (! description) { + return false; + } + $.ajax({ + dataType: 'json', + type: 'put', + data: self.toData(), + url: '{{ url('/tasks') }}/' + self.public_id(), + accepts: { + json: 'application/json' + }, + success: function(response) { + console.log('success'); + console.log(response); + }, + error: function(error) { + console.log('error'); + console.log(error); + }, + }).always(function() { + setTimeout(function() { + model.is_sending_request(false); + }, 1000); + }); + self.endTaskEdit(); }