Created ability for Admins to review deleted tasks and restore them if needed

This commit is contained in:
NPS Agent
2026-05-12 09:53:51 +09:30
parent 60a1cf1b67
commit 62cfeb0da4
8 changed files with 115 additions and 24 deletions
+12
View File
@@ -126,6 +126,10 @@ class ApiService {
return this.request('/tasks');
}
async getDeletedTasks() {
return this.request('/tasks/deleted');
}
async getAudit() {
return this.request('/audit');
}
@@ -148,6 +152,14 @@ class ApiService {
return data;
}
async restoreTask(id) {
const data = await this.request(`/tasks/${id}/restore`, {
method: 'POST',
});
this.notify();
return data;
}
async deleteTask(id) {
const data = await this.request(`/tasks/${id}`, {
method: 'DELETE',