diff --git a/backend/src/dashboard/main.py b/backend/src/dashboard/main.py index bc6e8f7..66f3af4 100644 --- a/backend/src/dashboard/main.py +++ b/backend/src/dashboard/main.py @@ -3,15 +3,17 @@ import dash_bootstrap_components as dbc import pandas as pd from datetime import datetime, timedelta from dash import ctx +import json +import os -from backend.src.dashboard.services.file_manager import FileManager -from backend.src.dashboard.services.json_reader import jsonReader -from backend.src.dashboard.components.pivot_charts import build_pivot_tables_and_charts, week_start_monday +# from backend.src.dashboard.services.file_manager import FileManager +# from backend.src.dashboard.services.json_reader import jsonReader +# from backend.src.dashboard.components.pivot_charts import build_pivot_tables_and_charts, week_start_monday -# from dashboard.services.file_manager import FileManager -# from dashboard.services.json_reader import jsonReader -# from dashboard.components.pivot_charts import build_pivot_tables_and_charts, week_start_monday +from dashboard.services.file_manager import FileManager +from dashboard.services.json_reader import jsonReader +from dashboard.components.pivot_charts import build_pivot_tables_and_charts, week_start_monday SAFE_DELIM = "\\\\" @@ -27,9 +29,15 @@ def current_week_start(): # ----------------------------------------------------- # Load & Build Master DF # ----------------------------------------------------- -def build_master_df(): - s3 = FileManager() - key, path, data = s3.download_and_read_latest() +def build_master_df(local=False): + local=True + if local is False: + s3 = FileManager() + key, path, data = s3.download_and_read_latest() + else: + file_path = os.path.join(os.path.dirname(__file__), "data.json") + with open(file_path, "r") as f: + data = json.load(f) hubspot_data = jsonReader(data) frames = [] diff --git a/backend/src/dashboard/services/hubspot_client_async.py b/backend/src/dashboard/services/hubspot_client_async.py index ccafdea..e5c972a 100644 --- a/backend/src/dashboard/services/hubspot_client_async.py +++ b/backend/src/dashboard/services/hubspot_client_async.py @@ -124,6 +124,9 @@ class HubSpotClientAsync: 'design_planned_week', 'retrofit_design_status', 'design_completion_date', + 'item_id__monday_com_', + 'funding_type', + 'coordination_status__stage_1_', ] )