diff -r 86289b0c4a27 -r 08c0343b622b www/js/inv_yeasts.js --- a/www/js/inv_yeasts.js Sun Jul 04 12:16:25 2021 +0200 +++ b/www/js/inv_yeasts.js Sun Jul 04 14:25:52 2021 +0200 @@ -114,8 +114,13 @@ cache: false, data: data, type: 'POST', - success: function(data, status, xhr) { - commit(true); + success: function(data) { + if (data.error) { + console.log('delete: ' + data.msg); + alert('Fout: ' + data.msg); + } else { + console.log('delete: success'); + } location.reload(true); }, error: function(jqXHR, textStatus, errorThrown) { commit(false); } @@ -129,8 +134,13 @@ cache: false, data: data, type: 'POST', - success: function(data, status, xhr) { - commit(true); + success: function(data) { + if (data.error) { + console.log('insert: ' + data.msg); + alert('Fout: ' + data.msg); + } else { + console.log('insert: success'); + } location.reload(true); }, error: function(jqXHR, textStatus, errorThrown) { commit(false); } @@ -144,8 +154,13 @@ cache: false, data: data, type: 'POST', - success: function(data, status, xhr) { - commit(true); + success: function(data) { + if (data.error) { + console.log('updaterow: ' + data.msg); + alert('Fout: ' + data.msg); + } else { + console.log('updaterow: success'); + } location.reload(true); }, error: function(jqXHR, textStatus, errorThrown) { commit(false); }