Usunięcie confirm

pull/878/head
Mord0reK 2025-11-16 20:41:03 +07:00 committed by GitHub
parent 9b900b640b
commit c516bf812b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 6 deletions

@ -17,10 +17,10 @@ export default function(widget) {
const row = this.closest('tr');
const taskID = parseInt(row.dataset.taskId);
if (!confirm('Czy na pewno chcesz oznaczyć to zadanie jako wykonane?')) {
this.checked = false;
return;
}
// if (!confirm('Czy na pewno chcesz oznaczyć to zadanie jako wykonane?')) {
// this.checked = false;
// return;
//}
// Call API to complete task
fetch(`${pageData.baseURL}/api/vikunja/${widgetID}/complete-task`, {
@ -241,8 +241,6 @@ function openEditModal(widgetID, taskID, title, dueDate, currentLabelIDs, row) {
}
}
// Refresh page to show updated labels
alert('Zadanie zostało zaktualizowane. Strona zostanie odświeżona.');
location.reload();
} catch (error) {
console.error('Error updating task:', error);