From 616fa1be790a3962be364fe64d5221256f883365 Mon Sep 17 00:00:00 2001 From: rocketdebris Date: Thu, 6 Nov 2025 16:14:07 -0500 Subject: [PATCH] Merge conflict. --- frontend/src/api.js | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/frontend/src/api.js b/frontend/src/api.js index 089d80f..a10fee6 100644 --- a/frontend/src/api.js +++ b/frontend/src/api.js @@ -178,10 +178,6 @@ class Api { } static async getJobDetails() { - //const data = DataUtils.dummyJobData.map((job) => ({ - // ...job, - // stepProgress: DataUtils.calculateStepProgress(job.steps), - //})); const projects = await this.getDocsList("Project"); const data = []; for (let prj of projects) { @@ -207,6 +203,14 @@ class Api { static async getRouteData() { const data = DataUtils.dummyRouteData; + //const data = []; + const routes = getDocList("Pre-Built Routes"); + for (const rt of routes) { + route = getDetailedDoc("Pre-Built Routes", rt.name); + let tableRow = { + }; + } + console.log("DEBUG: API - getRouteData result: ", data); return data; } @@ -218,7 +222,22 @@ class Api { } static async getTimesheetData() { - const data = DataUtils.dummyTimesheetData; + //const data = DataUtils.dummyTimesheetData; + const data = []; + const timesheets = await this.getDocsList("Timesheet"); + for (const ts of timesheets) { + const timesheet = await this.getDetailedDoc("Timesheet", ts.name); + const tableRow = { + timesheetId: timesheet.name, + employee: timesheet.employee_name, + date: timesheet.date, + customer: timesheet.customer, + totalHours: timesheet.total_hours, + status: timesheet.status, + totalPayFormatted: timesheet.total_costing_amount + } + data.push(tableRow); + } console.log("DEBUG: API - getTimesheetData result: ", data); return data; }