drag and drop for columns

This commit is contained in:
Flatlogic Bot 2025-11-19 15:29:24 +00:00
parent 4716cdad69
commit a15f3f4df0
8 changed files with 590 additions and 2 deletions

View File

@ -1 +1,40 @@
// Will be used for drag and drop functionality later.
document.addEventListener('DOMContentLoaded', function () {
const columns = document.querySelectorAll('.kanban-column');
columns.forEach(column => {
new Sortable(column, {
group: 'kanban',
animation: 150,
onEnd: function (evt) {
const item = evt.item;
const newStatus = evt.to.dataset.status;
const taskId = item.dataset.id;
if (newStatus && taskId) {
fetch('update_task_status.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
task_id: taskId,
new_status: newStatus
}),
})
.then(response => response.json())
.then(data => {
if (!data.success) {
console.error('Failed to update task status:', data.message);
// Optionally, move the item back to its original column
evt.from.appendChild(item);
}
})
.catch(error => {
console.error('Error:', error);
evt.from.appendChild(item);
});
}
}
});
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

494
debug.log Normal file
View File

@ -0,0 +1,494 @@
2025-11-19 15:22:34 - update_task_status.php accessed.
2025-11-19 15:22:34 - Request method not allowed: HEAD
2025-11-19 15:22:38 - update_task_status.php accessed.
2025-11-19 15:22:38 - Request method not allowed: HEAD
2025-11-19 15:22:39 - update_task_status.php accessed.
2025-11-19 15:22:39 - Request method not allowed: HEAD
2025-11-19 15:22:39 - update_task_status.php accessed.
2025-11-19 15:22:39 - Request method not allowed: HEAD
2025-11-19 15:22:43 - update_task_status.php accessed.
2025-11-19 15:22:43 - Request method not allowed: HEAD
2025-11-19 15:22:44 - update_task_status.php accessed.
2025-11-19 15:22:44 - Request method not allowed: HEAD
2025-11-19 15:22:44 - update_task_status.php accessed.
2025-11-19 15:22:44 - Request method not allowed: HEAD
2025-11-19 15:22:45 - update_task_status.php accessed.
2025-11-19 15:22:45 - Request method not allowed: HEAD
2025-11-19 15:22:47 - update_task_status.php accessed.
2025-11-19 15:22:47 - Request method not allowed: HEAD
2025-11-19 15:22:48 - update_task_status.php accessed.
2025-11-19 15:22:48 - Request method not allowed: HEAD
2025-11-19 15:22:49 - update_task_status.php accessed.
2025-11-19 15:22:49 - Request method not allowed: HEAD
2025-11-19 15:22:49 - update_task_status.php accessed.
2025-11-19 15:22:49 - Request method not allowed: HEAD
2025-11-19 15:22:50 - update_task_status.php accessed.
2025-11-19 15:22:50 - Request method not allowed: HEAD
2025-11-19 15:22:52 - update_task_status.php accessed.
2025-11-19 15:22:52 - Request method not allowed: HEAD
2025-11-19 15:22:53 - update_task_status.php accessed.
2025-11-19 15:22:53 - Request method not allowed: HEAD
2025-11-19 15:22:54 - update_task_status.php accessed.
2025-11-19 15:22:54 - Request method not allowed: HEAD
2025-11-19 15:22:54 - update_task_status.php accessed.
2025-11-19 15:22:54 - Request method not allowed: HEAD
2025-11-19 15:22:55 - update_task_status.php accessed.
2025-11-19 15:22:55 - Request method not allowed: HEAD
2025-11-19 15:22:57 - update_task_status.php accessed.
2025-11-19 15:22:57 - Request method not allowed: HEAD
2025-11-19 15:22:58 - update_task_status.php accessed.
2025-11-19 15:22:58 - Request method not allowed: HEAD
2025-11-19 15:22:59 - update_task_status.php accessed.
2025-11-19 15:22:59 - Request method not allowed: HEAD
2025-11-19 15:22:59 - update_task_status.php accessed.
2025-11-19 15:22:59 - Request method not allowed: HEAD
2025-11-19 15:22:59 - update_task_status.php accessed.
2025-11-19 15:22:59 - Request method is POST.
2025-11-19 15:22:59 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:22:59 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:22:59 - Task ID and New Status are present. Updating database...
2025-11-19 15:22:59 - Database update successful. Rows affected: 1
2025-11-19 15:23:00 - update_task_status.php accessed.
2025-11-19 15:23:00 - Request method not allowed: HEAD
2025-11-19 15:23:02 - update_task_status.php accessed.
2025-11-19 15:23:02 - Request method not allowed: HEAD
2025-11-19 15:23:04 - update_task_status.php accessed.
2025-11-19 15:23:04 - Request method not allowed: HEAD
2025-11-19 15:23:04 - update_task_status.php accessed.
2025-11-19 15:23:04 - Request method is POST.
2025-11-19 15:23:04 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:23:04 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:23:04 - Task ID and New Status are present. Updating database...
2025-11-19 15:23:04 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:23:04 - update_task_status.php accessed.
2025-11-19 15:23:04 - Request method not allowed: HEAD
2025-11-19 15:23:04 - update_task_status.php accessed.
2025-11-19 15:23:04 - Request method is POST.
2025-11-19 15:23:04 - Raw input: {"task_id":"1","new_status":"To Do"}
2025-11-19 15:23:04 - Parsed input: Task ID = 1, New Status = To Do
2025-11-19 15:23:04 - Task ID and New Status are present. Updating database...
2025-11-19 15:23:04 - Database update successful. Rows affected: 1
2025-11-19 15:23:05 - update_task_status.php accessed.
2025-11-19 15:23:05 - Request method not allowed: HEAD
2025-11-19 15:23:07 - update_task_status.php accessed.
2025-11-19 15:23:07 - Request method not allowed: HEAD
2025-11-19 15:23:08 - update_task_status.php accessed.
2025-11-19 15:23:08 - Request method not allowed: HEAD
2025-11-19 15:23:10 - update_task_status.php accessed.
2025-11-19 15:23:10 - Request method not allowed: HEAD
2025-11-19 15:23:10 - update_task_status.php accessed.
2025-11-19 15:23:10 - Request method is POST.
2025-11-19 15:23:10 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:23:10 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:23:10 - Task ID and New Status are present. Updating database...
2025-11-19 15:23:10 - Database update successful. Rows affected: 1
2025-11-19 15:23:13 - update_task_status.php accessed.
2025-11-19 15:23:13 - Request method not allowed: HEAD
2025-11-19 15:23:13 - update_task_status.php accessed.
2025-11-19 15:23:13 - Request method is POST.
2025-11-19 15:23:13 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:23:13 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:23:13 - Task ID and New Status are present. Updating database...
2025-11-19 15:23:13 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:23:13 - update_task_status.php accessed.
2025-11-19 15:23:13 - Request method not allowed: HEAD
2025-11-19 15:23:18 - update_task_status.php accessed.
2025-11-19 15:23:18 - Request method not allowed: HEAD
2025-11-19 15:23:23 - update_task_status.php accessed.
2025-11-19 15:23:23 - Request method not allowed: HEAD
2025-11-19 15:23:29 - update_task_status.php accessed.
2025-11-19 15:23:29 - Request method not allowed: HEAD
2025-11-19 15:23:34 - update_task_status.php accessed.
2025-11-19 15:23:34 - Request method not allowed: HEAD
2025-11-19 15:23:34 - update_task_status.php accessed.
2025-11-19 15:23:34 - Request method is POST.
2025-11-19 15:23:34 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:23:34 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:23:34 - Task ID and New Status are present. Updating database...
2025-11-19 15:23:34 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:24:07 - update_task_status.php accessed.
2025-11-19 15:24:07 - Request method not allowed: HEAD
2025-11-19 15:24:09 - update_task_status.php accessed.
2025-11-19 15:24:09 - Request method not allowed: HEAD
2025-11-19 15:24:12 - update_task_status.php accessed.
2025-11-19 15:24:12 - Request method not allowed: HEAD
2025-11-19 15:24:14 - update_task_status.php accessed.
2025-11-19 15:24:14 - Request method not allowed: HEAD
2025-11-19 15:24:17 - update_task_status.php accessed.
2025-11-19 15:24:17 - Request method not allowed: HEAD
2025-11-19 15:24:18 - update_task_status.php accessed.
2025-11-19 15:24:18 - Request method not allowed: HEAD
2025-11-19 15:24:20 - update_task_status.php accessed.
2025-11-19 15:24:20 - Request method not allowed: HEAD
2025-11-19 15:24:22 - update_task_status.php accessed.
2025-11-19 15:24:22 - Request method not allowed: HEAD
2025-11-19 15:24:23 - update_task_status.php accessed.
2025-11-19 15:24:23 - Request method not allowed: HEAD
2025-11-19 15:24:25 - update_task_status.php accessed.
2025-11-19 15:24:25 - Request method not allowed: HEAD
2025-11-19 15:24:27 - update_task_status.php accessed.
2025-11-19 15:24:27 - Request method not allowed: HEAD
2025-11-19 15:24:28 - update_task_status.php accessed.
2025-11-19 15:24:28 - Request method not allowed: HEAD
2025-11-19 15:24:30 - update_task_status.php accessed.
2025-11-19 15:24:30 - Request method not allowed: HEAD
2025-11-19 15:24:33 - update_task_status.php accessed.
2025-11-19 15:24:33 - Request method not allowed: HEAD
2025-11-19 15:24:33 - update_task_status.php accessed.
2025-11-19 15:24:33 - Request method is POST.
2025-11-19 15:24:33 - Raw input: {"task_id":"1","new_status":"To Do"}
2025-11-19 15:24:33 - Parsed input: Task ID = 1, New Status = To Do
2025-11-19 15:24:33 - Task ID and New Status are present. Updating database...
2025-11-19 15:24:33 - Database update successful. Rows affected: 1
2025-11-19 15:24:33 - update_task_status.php accessed.
2025-11-19 15:24:33 - Request method not allowed: HEAD
2025-11-19 15:24:35 - update_task_status.php accessed.
2025-11-19 15:24:35 - Request method not allowed: HEAD
2025-11-19 15:24:35 - update_task_status.php accessed.
2025-11-19 15:24:35 - Request method is POST.
2025-11-19 15:24:35 - Raw input: {"task_id":"1","new_status":"To Do"}
2025-11-19 15:24:35 - Parsed input: Task ID = 1, New Status = To Do
2025-11-19 15:24:35 - Task ID and New Status are present. Updating database...
2025-11-19 15:24:35 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:24:38 - update_task_status.php accessed.
2025-11-19 15:24:38 - Request method not allowed: HEAD
2025-11-19 15:24:43 - update_task_status.php accessed.
2025-11-19 15:24:43 - Request method not allowed: HEAD
2025-11-19 15:24:43 - update_task_status.php accessed.
2025-11-19 15:24:43 - Request method is POST.
2025-11-19 15:24:43 - Raw input: {"task_id":"1","new_status":"To Do"}
2025-11-19 15:24:43 - Parsed input: Task ID = 1, New Status = To Do
2025-11-19 15:24:43 - Task ID and New Status are present. Updating database...
2025-11-19 15:24:43 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:24:46 - update_task_status.php accessed.
2025-11-19 15:24:46 - Request method not allowed: HEAD
2025-11-19 15:24:48 - update_task_status.php accessed.
2025-11-19 15:24:48 - Request method not allowed: HEAD
2025-11-19 15:24:52 - update_task_status.php accessed.
2025-11-19 15:24:52 - Request method not allowed: HEAD
2025-11-19 15:24:54 - update_task_status.php accessed.
2025-11-19 15:24:54 - Request method not allowed: HEAD
2025-11-19 15:24:57 - update_task_status.php accessed.
2025-11-19 15:24:57 - Request method not allowed: HEAD
2025-11-19 15:24:59 - update_task_status.php accessed.
2025-11-19 15:24:59 - Request method not allowed: HEAD
2025-11-19 15:25:02 - update_task_status.php accessed.
2025-11-19 15:25:02 - Request method not allowed: HEAD
2025-11-19 15:25:04 - update_task_status.php accessed.
2025-11-19 15:25:04 - Request method not allowed: HEAD
2025-11-19 15:25:07 - update_task_status.php accessed.
2025-11-19 15:25:07 - Request method not allowed: HEAD
2025-11-19 15:25:09 - update_task_status.php accessed.
2025-11-19 15:25:09 - Request method not allowed: HEAD
2025-11-19 15:25:09 - update_task_status.php accessed.
2025-11-19 15:25:09 - Request method not allowed: HEAD
2025-11-19 15:25:10 - update_task_status.php accessed.
2025-11-19 15:25:10 - Request method not allowed: HEAD
2025-11-19 15:25:12 - update_task_status.php accessed.
2025-11-19 15:25:12 - Request method not allowed: HEAD
2025-11-19 15:25:12 - update_task_status.php accessed.
2025-11-19 15:25:12 - Request method is POST.
2025-11-19 15:25:12 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:25:12 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:25:12 - Task ID and New Status are present. Updating database...
2025-11-19 15:25:12 - Database update successful. Rows affected: 1
2025-11-19 15:25:14 - update_task_status.php accessed.
2025-11-19 15:25:14 - Request method not allowed: HEAD
2025-11-19 15:25:14 - update_task_status.php accessed.
2025-11-19 15:25:14 - Request method not allowed: HEAD
2025-11-19 15:25:14 - update_task_status.php accessed.
2025-11-19 15:25:14 - Request method is POST.
2025-11-19 15:25:14 - Raw input: {"task_id":"1","new_status":"Done"}
2025-11-19 15:25:14 - Parsed input: Task ID = 1, New Status = Done
2025-11-19 15:25:14 - Task ID and New Status are present. Updating database...
2025-11-19 15:25:14 - Database update successful. Rows affected: 1
2025-11-19 15:25:15 - update_task_status.php accessed.
2025-11-19 15:25:15 - Request method not allowed: HEAD
2025-11-19 15:25:19 - update_task_status.php accessed.
2025-11-19 15:25:19 - Request method not allowed: HEAD
2025-11-19 15:25:21 - update_task_status.php accessed.
2025-11-19 15:25:21 - Request method not allowed: HEAD
2025-11-19 15:25:24 - update_task_status.php accessed.
2025-11-19 15:25:24 - Request method not allowed: HEAD
2025-11-19 15:25:26 - update_task_status.php accessed.
2025-11-19 15:25:26 - Request method not allowed: HEAD
2025-11-19 15:25:29 - update_task_status.php accessed.
2025-11-19 15:25:29 - Request method not allowed: HEAD
2025-11-19 15:25:31 - update_task_status.php accessed.
2025-11-19 15:25:31 - Request method not allowed: HEAD
2025-11-19 15:25:33 - update_task_status.php accessed.
2025-11-19 15:25:33 - Request method not allowed: HEAD
2025-11-19 15:25:34 - update_task_status.php accessed.
2025-11-19 15:25:34 - Request method not allowed: HEAD
2025-11-19 15:25:34 - update_task_status.php accessed.
2025-11-19 15:25:34 - Request method is POST.
2025-11-19 15:25:34 - Raw input: {"task_id":"2","new_status":"Done"}
2025-11-19 15:25:34 - Parsed input: Task ID = 2, New Status = Done
2025-11-19 15:25:34 - Task ID and New Status are present. Updating database...
2025-11-19 15:25:34 - Database update successful. Rows affected: 1
2025-11-19 15:25:36 - update_task_status.php accessed.
2025-11-19 15:25:36 - Request method not allowed: HEAD
2025-11-19 15:25:36 - update_task_status.php accessed.
2025-11-19 15:25:36 - Request method is POST.
2025-11-19 15:25:36 - Raw input: {"task_id":"2","new_status":"To Do"}
2025-11-19 15:25:36 - Parsed input: Task ID = 2, New Status = To Do
2025-11-19 15:25:36 - Task ID and New Status are present. Updating database...
2025-11-19 15:25:36 - Database update successful. Rows affected: 1
2025-11-19 15:25:39 - update_task_status.php accessed.
2025-11-19 15:25:39 - Request method not allowed: HEAD
2025-11-19 15:25:44 - update_task_status.php accessed.
2025-11-19 15:25:44 - Request method not allowed: HEAD
2025-11-19 15:25:49 - update_task_status.php accessed.
2025-11-19 15:25:49 - Request method not allowed: HEAD
2025-11-19 15:25:52 - update_task_status.php accessed.
2025-11-19 15:25:52 - Request method not allowed: HEAD
2025-11-19 15:25:54 - update_task_status.php accessed.
2025-11-19 15:25:54 - Request method not allowed: HEAD
2025-11-19 15:25:56 - update_task_status.php accessed.
2025-11-19 15:25:56 - Request method not allowed: HEAD
2025-11-19 15:25:59 - update_task_status.php accessed.
2025-11-19 15:25:59 - Request method not allowed: HEAD
2025-11-19 15:26:00 - update_task_status.php accessed.
2025-11-19 15:26:00 - Request method not allowed: HEAD
2025-11-19 15:26:03 - update_task_status.php accessed.
2025-11-19 15:26:03 - Request method not allowed: HEAD
2025-11-19 15:26:05 - update_task_status.php accessed.
2025-11-19 15:26:05 - Request method not allowed: HEAD
2025-11-19 15:26:09 - update_task_status.php accessed.
2025-11-19 15:26:09 - Request method not allowed: HEAD
2025-11-19 15:26:10 - update_task_status.php accessed.
2025-11-19 15:26:10 - Request method not allowed: HEAD
2025-11-19 15:26:12 - update_task_status.php accessed.
2025-11-19 15:26:12 - Request method not allowed: HEAD
2025-11-19 15:26:13 - update_task_status.php accessed.
2025-11-19 15:26:13 - Request method not allowed: HEAD
2025-11-19 15:26:14 - update_task_status.php accessed.
2025-11-19 15:26:14 - Request method not allowed: HEAD
2025-11-19 15:26:16 - update_task_status.php accessed.
2025-11-19 15:26:16 - Request method not allowed: HEAD
2025-11-19 15:26:17 - update_task_status.php accessed.
2025-11-19 15:26:17 - Request method not allowed: HEAD
2025-11-19 15:26:19 - update_task_status.php accessed.
2025-11-19 15:26:19 - Request method not allowed: HEAD
2025-11-19 15:26:21 - update_task_status.php accessed.
2025-11-19 15:26:21 - Request method not allowed: HEAD
2025-11-19 15:26:21 - update_task_status.php accessed.
2025-11-19 15:26:21 - Request method not allowed: HEAD
2025-11-19 15:26:24 - update_task_status.php accessed.
2025-11-19 15:26:24 - Request method not allowed: HEAD
2025-11-19 15:26:26 - update_task_status.php accessed.
2025-11-19 15:26:26 - Request method not allowed: HEAD
2025-11-19 15:26:26 - update_task_status.php accessed.
2025-11-19 15:26:26 - Request method is POST.
2025-11-19 15:26:26 - Raw input: {"task_id":"2","new_status":"In Progress"}
2025-11-19 15:26:26 - Parsed input: Task ID = 2, New Status = In Progress
2025-11-19 15:26:26 - Task ID and New Status are present. Updating database...
2025-11-19 15:26:26 - Database update successful. Rows affected: 1
2025-11-19 15:26:29 - update_task_status.php accessed.
2025-11-19 15:26:29 - Request method not allowed: HEAD
2025-11-19 15:26:29 - update_task_status.php accessed.
2025-11-19 15:26:29 - Request method is POST.
2025-11-19 15:26:29 - Raw input: {"task_id":"3","new_status":"In Progress"}
2025-11-19 15:26:29 - Parsed input: Task ID = 3, New Status = In Progress
2025-11-19 15:26:29 - Task ID and New Status are present. Updating database...
2025-11-19 15:26:29 - Database update successful. Rows affected: 1
2025-11-19 15:26:36 - update_task_status.php accessed.
2025-11-19 15:26:36 - Request method not allowed: HEAD
2025-11-19 15:26:41 - update_task_status.php accessed.
2025-11-19 15:26:41 - Request method not allowed: HEAD
2025-11-19 15:26:43 - update_task_status.php accessed.
2025-11-19 15:26:43 - Request method not allowed: HEAD
2025-11-19 15:26:47 - update_task_status.php accessed.
2025-11-19 15:26:47 - Request method not allowed: HEAD
2025-11-19 15:26:48 - update_task_status.php accessed.
2025-11-19 15:26:48 - Request method not allowed: HEAD
2025-11-19 15:26:52 - update_task_status.php accessed.
2025-11-19 15:26:52 - Request method not allowed: HEAD
2025-11-19 15:26:54 - update_task_status.php accessed.
2025-11-19 15:26:54 - Request method not allowed: HEAD
2025-11-19 15:26:57 - update_task_status.php accessed.
2025-11-19 15:26:57 - Request method not allowed: HEAD
2025-11-19 15:26:59 - update_task_status.php accessed.
2025-11-19 15:26:59 - Request method not allowed: HEAD
2025-11-19 15:27:02 - update_task_status.php accessed.
2025-11-19 15:27:02 - Request method not allowed: HEAD
2025-11-19 15:27:02 - update_task_status.php accessed.
2025-11-19 15:27:02 - Request method is POST.
2025-11-19 15:27:02 - Raw input: {"task_id":"2","new_status":"To Do"}
2025-11-19 15:27:02 - Parsed input: Task ID = 2, New Status = To Do
2025-11-19 15:27:02 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:02 - Database update successful. Rows affected: 1
2025-11-19 15:27:04 - update_task_status.php accessed.
2025-11-19 15:27:04 - Request method not allowed: HEAD
2025-11-19 15:27:09 - update_task_status.php accessed.
2025-11-19 15:27:09 - Request method not allowed: HEAD
2025-11-19 15:27:10 - update_task_status.php accessed.
2025-11-19 15:27:10 - Request method is POST.
2025-11-19 15:27:10 - Raw input: {"task_id":"3","new_status":"To Do"}
2025-11-19 15:27:10 - Parsed input: Task ID = 3, New Status = To Do
2025-11-19 15:27:10 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:10 - Database update successful. Rows affected: 1
2025-11-19 15:27:11 - update_task_status.php accessed.
2025-11-19 15:27:11 - Request method not allowed: HEAD
2025-11-19 15:27:13 - update_task_status.php accessed.
2025-11-19 15:27:13 - Request method not allowed: HEAD
2025-11-19 15:27:18 - update_task_status.php accessed.
2025-11-19 15:27:18 - Request method not allowed: HEAD
2025-11-19 15:27:19 - update_task_status.php accessed.
2025-11-19 15:27:19 - Request method not allowed: HEAD
2025-11-19 15:27:22 - update_task_status.php accessed.
2025-11-19 15:27:22 - Request method not allowed: HEAD
2025-11-19 15:27:23 - update_task_status.php accessed.
2025-11-19 15:27:23 - Request method not allowed: HEAD
2025-11-19 15:27:23 - update_task_status.php accessed.
2025-11-19 15:27:23 - Request method not allowed: HEAD
2025-11-19 15:27:24 - update_task_status.php accessed.
2025-11-19 15:27:24 - Request method not allowed: HEAD
2025-11-19 15:27:27 - update_task_status.php accessed.
2025-11-19 15:27:27 - Request method not allowed: HEAD
2025-11-19 15:27:28 - update_task_status.php accessed.
2025-11-19 15:27:28 - Request method not allowed: HEAD
2025-11-19 15:27:28 - update_task_status.php accessed.
2025-11-19 15:27:28 - Request method not allowed: HEAD
2025-11-19 15:27:28 - update_task_status.php accessed.
2025-11-19 15:27:28 - Request method not allowed: HEAD
2025-11-19 15:27:29 - update_task_status.php accessed.
2025-11-19 15:27:29 - Request method not allowed: HEAD
2025-11-19 15:27:32 - update_task_status.php accessed.
2025-11-19 15:27:32 - Request method not allowed: HEAD
2025-11-19 15:27:33 - update_task_status.php accessed.
2025-11-19 15:27:33 - Request method not allowed: HEAD
2025-11-19 15:27:34 - update_task_status.php accessed.
2025-11-19 15:27:34 - Request method not allowed: HEAD
2025-11-19 15:27:35 - update_task_status.php accessed.
2025-11-19 15:27:35 - Request method not allowed: HEAD
2025-11-19 15:27:37 - update_task_status.php accessed.
2025-11-19 15:27:37 - Request method not allowed: HEAD
2025-11-19 15:27:38 - update_task_status.php accessed.
2025-11-19 15:27:38 - Request method not allowed: HEAD
2025-11-19 15:27:39 - update_task_status.php accessed.
2025-11-19 15:27:39 - Request method not allowed: HEAD
2025-11-19 15:27:39 - update_task_status.php accessed.
2025-11-19 15:27:39 - Request method is POST.
2025-11-19 15:27:39 - Raw input: {"task_id":"3","new_status":"In Progress"}
2025-11-19 15:27:39 - Parsed input: Task ID = 3, New Status = In Progress
2025-11-19 15:27:39 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:39 - Database update successful. Rows affected: 1
2025-11-19 15:27:39 - update_task_status.php accessed.
2025-11-19 15:27:39 - Request method not allowed: HEAD
2025-11-19 15:27:40 - update_task_status.php accessed.
2025-11-19 15:27:40 - Request method not allowed: HEAD
2025-11-19 15:27:40 - update_task_status.php accessed.
2025-11-19 15:27:40 - Request method not allowed: HEAD
2025-11-19 15:27:41 - update_task_status.php accessed.
2025-11-19 15:27:41 - Request method not allowed: HEAD
2025-11-19 15:27:41 - update_task_status.php accessed.
2025-11-19 15:27:41 - Request method not allowed: HEAD
2025-11-19 15:27:42 - update_task_status.php accessed.
2025-11-19 15:27:42 - Request method not allowed: HEAD
2025-11-19 15:27:43 - update_task_status.php accessed.
2025-11-19 15:27:43 - Request method not allowed: HEAD
2025-11-19 15:27:44 - update_task_status.php accessed.
2025-11-19 15:27:44 - Request method not allowed: HEAD
2025-11-19 15:27:45 - update_task_status.php accessed.
2025-11-19 15:27:45 - Request method not allowed: HEAD
2025-11-19 15:27:45 - update_task_status.php accessed.
2025-11-19 15:27:45 - Request method is POST.
2025-11-19 15:27:45 - Raw input: {"task_id":"3","new_status":"In Progress"}
2025-11-19 15:27:45 - Parsed input: Task ID = 3, New Status = In Progress
2025-11-19 15:27:45 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:45 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:27:45 - update_task_status.php accessed.
2025-11-19 15:27:45 - Request method not allowed: HEAD
2025-11-19 15:27:46 - update_task_status.php accessed.
2025-11-19 15:27:46 - Request method not allowed: HEAD
2025-11-19 15:27:47 - update_task_status.php accessed.
2025-11-19 15:27:47 - Request method not allowed: HEAD
2025-11-19 15:27:48 - update_task_status.php accessed.
2025-11-19 15:27:48 - Request method is POST.
2025-11-19 15:27:48 - Raw input: {"task_id":"2","new_status":"In Progress"}
2025-11-19 15:27:48 - Parsed input: Task ID = 2, New Status = In Progress
2025-11-19 15:27:48 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:48 - Database update successful. Rows affected: 1
2025-11-19 15:27:49 - update_task_status.php accessed.
2025-11-19 15:27:49 - Request method not allowed: HEAD
2025-11-19 15:27:49 - update_task_status.php accessed.
2025-11-19 15:27:49 - Request method is POST.
2025-11-19 15:27:49 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:27:49 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:27:49 - Task ID and New Status are present. Updating database...
2025-11-19 15:27:49 - Database update successful. Rows affected: 1
2025-11-19 15:27:49 - update_task_status.php accessed.
2025-11-19 15:27:49 - Request method not allowed: HEAD
2025-11-19 15:27:50 - update_task_status.php accessed.
2025-11-19 15:27:50 - Request method not allowed: HEAD
2025-11-19 15:27:51 - update_task_status.php accessed.
2025-11-19 15:27:51 - Request method not allowed: HEAD
2025-11-19 15:27:54 - update_task_status.php accessed.
2025-11-19 15:27:54 - Request method not allowed: HEAD
2025-11-19 15:27:55 - update_task_status.php accessed.
2025-11-19 15:27:55 - Request method not allowed: HEAD
2025-11-19 15:27:57 - update_task_status.php accessed.
2025-11-19 15:27:57 - Request method not allowed: HEAD
2025-11-19 15:27:58 - update_task_status.php accessed.
2025-11-19 15:27:58 - Request method not allowed: HEAD
2025-11-19 15:28:00 - update_task_status.php accessed.
2025-11-19 15:28:00 - Request method not allowed: HEAD
2025-11-19 15:28:01 - update_task_status.php accessed.
2025-11-19 15:28:01 - Request method not allowed: HEAD
2025-11-19 15:28:02 - update_task_status.php accessed.
2025-11-19 15:28:02 - Request method not allowed: HEAD
2025-11-19 15:28:05 - update_task_status.php accessed.
2025-11-19 15:28:05 - Request method not allowed: HEAD
2025-11-19 15:28:05 - update_task_status.php accessed.
2025-11-19 15:28:05 - Request method is POST.
2025-11-19 15:28:05 - Raw input: {"task_id":"3","new_status":"In Progress"}
2025-11-19 15:28:05 - Parsed input: Task ID = 3, New Status = In Progress
2025-11-19 15:28:05 - Task ID and New Status are present. Updating database...
2025-11-19 15:28:05 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:28:06 - update_task_status.php accessed.
2025-11-19 15:28:06 - Request method not allowed: HEAD
2025-11-19 15:28:06 - update_task_status.php accessed.
2025-11-19 15:28:06 - Request method is POST.
2025-11-19 15:28:06 - Raw input: {"task_id":"2","new_status":"In Progress"}
2025-11-19 15:28:06 - Parsed input: Task ID = 2, New Status = In Progress
2025-11-19 15:28:06 - Task ID and New Status are present. Updating database...
2025-11-19 15:28:06 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:28:07 - update_task_status.php accessed.
2025-11-19 15:28:07 - Request method not allowed: HEAD
2025-11-19 15:28:07 - update_task_status.php accessed.
2025-11-19 15:28:07 - Request method is POST.
2025-11-19 15:28:07 - Raw input: {"task_id":"1","new_status":"In Progress"}
2025-11-19 15:28:07 - Parsed input: Task ID = 1, New Status = In Progress
2025-11-19 15:28:07 - Task ID and New Status are present. Updating database...
2025-11-19 15:28:07 - Database update failed or status unchanged. Rows affected: 0
2025-11-19 15:28:10 - update_task_status.php accessed.
2025-11-19 15:28:10 - Request method not allowed: HEAD
2025-11-19 15:28:17 - update_task_status.php accessed.
2025-11-19 15:28:17 - Request method not allowed: HEAD
2025-11-19 15:28:27 - update_task_status.php accessed.
2025-11-19 15:28:27 - Request method not allowed: HEAD
2025-11-19 15:28:32 - update_task_status.php accessed.
2025-11-19 15:28:32 - Request method not allowed: HEAD
2025-11-19 15:28:37 - update_task_status.php accessed.
2025-11-19 15:28:37 - Request method not allowed: HEAD
2025-11-19 15:28:42 - update_task_status.php accessed.
2025-11-19 15:28:42 - Request method not allowed: HEAD
2025-11-19 15:28:42 - update_task_status.php accessed.
2025-11-19 15:28:42 - Request method not allowed: HEAD
2025-11-19 15:28:46 - update_task_status.php accessed.
2025-11-19 15:28:46 - Request method not allowed: HEAD
2025-11-19 15:28:47 - update_task_status.php accessed.
2025-11-19 15:28:47 - Request method not allowed: HEAD
2025-11-19 15:28:48 - update_task_status.php accessed.
2025-11-19 15:28:48 - Request method not allowed: HEAD
2025-11-19 15:28:49 - update_task_status.php accessed.
2025-11-19 15:28:49 - Request method not allowed: HEAD
2025-11-19 15:28:53 - update_task_status.php accessed.
2025-11-19 15:28:53 - Request method not allowed: HEAD
2025-11-19 15:28:53 - update_task_status.php accessed.
2025-11-19 15:28:53 - Request method is POST.
2025-11-19 15:28:53 - Raw input: {"task_id":"3","new_status":"Done"}
2025-11-19 15:28:53 - Parsed input: Task ID = 3, New Status = Done
2025-11-19 15:28:53 - Task ID and New Status are present. Updating database...
2025-11-19 15:28:53 - Database update successful. Rows affected: 1

View File

@ -26,6 +26,7 @@
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>

View File

@ -24,6 +24,9 @@
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm">
<div class="container-fluid">
<a class="navbar-brand fw-bold" href="#">🚀 Task Manager</a>
<span class="navbar-text">
<?php echo date('Y-m-d H:i:s'); ?>
</span>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#addTaskModal">
<i class="bi bi-plus-lg"></i> Add Task
</button>

View File

@ -62,7 +62,7 @@ foreach ($tasks as $task) {
<div class="kanban-board">
<?php foreach ($tasks_by_status as $status => $tasks_in_status): ?>
<div class="kanban-column">
<div id="kanban-column-<?php echo str_replace(' ', '-', strtolower($status)); ?>" class="kanban-column" data-status="<?php echo htmlspecialchars($status); ?>">
<h3><?php echo htmlspecialchars($status); ?></h3>
<?php foreach ($tasks_in_status as $task): ?>
<div class="task-card" data-id="<?php echo $task['id']; ?>">

51
update_task_status.php Normal file
View File

@ -0,0 +1,51 @@
<?php
require_once 'db/config.php';
// Simple logger
function log_message($message) {
file_put_contents('debug.log', date('Y-m-d H:i:s') . ' - ' . $message . PHP_EOL, FILE_APPEND);
}
log_message('update_task_status.php accessed.');
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
log_message('Request method is POST.');
$input_raw = file_get_contents('php://input');
log_message('Raw input: ' . $input_raw);
$input = json_decode($input_raw, true);
$taskId = $input['task_id'] ?? null;
$newStatus = $input['new_status'] ?? null;
log_message("Parsed input: Task ID = $taskId, New Status = $newStatus");
if ($taskId && $newStatus) {
log_message('Task ID and New Status are present. Updating database...');
try {
$pdo = db();
$stmt = $pdo->prepare("UPDATE tasks SET status = :status WHERE id = :id");
$result = $stmt->execute(['status' => $newStatus, 'id' => $taskId]);
if ($result && $stmt->rowCount() > 0) {
log_message('Database update successful. Rows affected: ' . $stmt->rowCount());
echo json_encode(['success' => true, 'message' => 'Task status updated.']);
} else {
log_message('Database update failed or status unchanged. Rows affected: ' . $stmt->rowCount());
echo json_encode(['success' => false, 'message' => 'Task not found or status unchanged.']);
}
} catch (PDOException $e) {
log_message('Database error: ' . $e->getMessage());
http_response_code(500);
echo json_encode(['success' => false, 'message' => 'Database error: ' . $e->getMessage()]);
}
} else {
log_message('Invalid input. Task ID or New Status is missing.');
http_response_code(400);
echo json_encode(['success' => false, 'message' => 'Invalid input.']);
}
} else {
log_message('Request method not allowed: ' . $_SERVER['REQUEST_METHOD']);
http_response_code(405);
echo json_encode(['success' => false, 'message' => 'Method not allowed.']);
}
?>