From d48eb996697b7fd55c2e8bbe7f0f90d2d5798ed1 Mon Sep 17 00:00:00 2001 From: hunteraraujo Date: Sat, 16 Sep 2023 15:14:34 -0700 Subject: [PATCH] Pass Real Data to callGenerateReport in TaskQueueView This commit updates the `TaskQueueView` to pass real data from the `selectedNodeHierarchy` to the `callGenerateReport` method in `SkillTreeViewModel`. An array of test names is constructed from the reversed node hierarchy, and these names are used as the `tests` field in the `ReportRequestBody`. Note: The `category` field is now an empty string as per the new requirement, and `mock` continues to be set to true. --- frontend/lib/views/task_queue/task_queue_view.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/lib/views/task_queue/task_queue_view.dart b/frontend/lib/views/task_queue/task_queue_view.dart index bbfbd691..d5c81221 100644 --- a/frontend/lib/views/task_queue/task_queue_view.dart +++ b/frontend/lib/views/task_queue/task_queue_view.dart @@ -13,6 +13,10 @@ class TaskQueueView extends StatelessWidget { final reversedHierarchy = viewModel.selectedNodeHierarchy?.reversed.toList() ?? []; + // Convert reversedHierarchy to a list of test names + final List testNames = + reversedHierarchy.map((node) => node.data.name).toList(); + return Material( color: Colors.white, child: Stack( @@ -49,8 +53,8 @@ class TaskQueueView extends StatelessWidget { onPressed: () { // Create a ReportRequestBody with hardcoded values ReportRequestBody reportRequestBody = ReportRequestBody( - category: "coding", - tests: [], + category: "", + tests: testNames, mock: true, );