diff --git a/custom_ui/api/db/tasks.py b/custom_ui/api/db/tasks.py index e53dd37..8bcae60 100644 --- a/custom_ui/api/db/tasks.py +++ b/custom_ui/api/db/tasks.py @@ -12,7 +12,7 @@ def set_task_status(task_name, new_status): return build_success_response(f"Task {task_name} status updated to {new_status}.") except Exception as e: return build_error_response(str(e), 500) - + @frappe.whitelist() def get_job_task_list(job_id=""): @@ -61,10 +61,12 @@ def get_tasks_table_data(filters={}, sortings=[], page=1, page_size=10): fields=["*"], filters=processed_filters, limit=page_size, - start=page * page_size, + start=(page-1) * page_size, order_by=processed_sortings ) + print("TASKS?", tasks, page, page_size) + tableRows = [] for task in tasks: tableRow = {} diff --git a/frontend/src/components/pages/Tasks.vue b/frontend/src/components/pages/Tasks.vue index 1e9515e..0e7a9ec 100644 --- a/frontend/src/components/pages/Tasks.vue +++ b/frontend/src/components/pages/Tasks.vue @@ -21,18 +21,22 @@