From 6c922ec9df8c604034607fc1b760fc9cba3609a5 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Thu, 5 Mar 2026 19:04:36 +0000 Subject: [PATCH] Fix intelligence being planning-redundant. --- html/template/sync/download-list.html | 174 ----- html/template/sync/intelligence-root.html | 731 ++++--------------- html/template/sync/planning-root.html | 834 +++++++++++++++------- sync/intelligence.go | 21 +- sync/planning.go | 21 +- 5 files changed, 743 insertions(+), 1038 deletions(-) delete mode 100644 html/template/sync/download-list.html diff --git a/html/template/sync/download-list.html b/html/template/sync/download-list.html deleted file mode 100644 index 82796814..00000000 --- a/html/template/sync/download-list.html +++ /dev/null @@ -1,174 +0,0 @@ -{{ template "sync/layout/authenticated.html" . }} - -{{ define "title" }}Downloads{{ end }} -{{ define "extraheader" }} - -{{ end }} -{{ define "content" }} -
-
- -
-
-
-

- Technician Supervision -

-
-
-
- -
-
Recent Activity
-

Activity logs by technician

-
- -
- -
- -
-
Coverage Maps
-

Area coverage by region

-
- -
- -
- -
-
Performance
-

- Staff evaluations and metrics -

-
- -
-
-
-
- - -
-
-
-

- Inventory Management -

-
-
-
- -
-
Recent Orders
-

- Purchase orders and deliveries -

-
- -
- -
- -
-
Current Stock
-

Inventory levels and status

-
- -
- -
- -
-
Usage Rates
-

Consumption analytics

-
- -
-
-
-
- - -
-
-
-

- Lab Reports -

-
-
-
- -
-
Trap Counts
-

Regional trap data analysis

-
- -
- -
- -
-
Rate Changes
-

Population fluctuation data

-
- -
- -
- -
-
Disease Propagation
-

Health risk assessment data

-
- -
-
-
-
-
-
-{{ end }} diff --git a/html/template/sync/intelligence-root.html b/html/template/sync/intelligence-root.html index bfd0df0a..b2f00af0 100644 --- a/html/template/sync/intelligence-root.html +++ b/html/template/sync/intelligence-root.html @@ -2,618 +2,169 @@ {{ define "title" }}Planning{{ end }} {{ define "extraheader" }} - - - - - - - + .report-item:hover { + background-color: rgba(0, 0, 0, 0.05); + border-left: 4px solid #0d6efd; + } + body { + background-color: #f8f9fa; + } + {{ end }} {{ define "content" }} - -
- -
-
-

Daily Planning Workbench

-
- Signals and leads enter from the left, are investigated in the center, - and transformed into structured field assignments using tools on the - right. -
-
-
- -
- -
-
-
- Incoming Signals & Leads - -
-
- - - - -
-
Species
- - -
Signal Type
- - -
Sort By
- -
- -
- - - - - -
-
- Signals - -
- - - - -
- -
- - -
-
- Mosquito Control Plan Follow-Ups -
- - - - -
- -
- - -
-
Existing Leads
- - - - -
-
-
-
- - -
-
-
- Active Investigation Workbench +
+
+ +
+
+
+

+ Technician Supervision +

-
- +
+ +
+
Recent Activity
+

Activity logs by technician

+
+
-
-
-
-
-
Selected Signals
-
- - - -
    - -
- - -
-
-
-
- -
-
+
+ +
+
Coverage Maps
+

Area coverage by region

+ +
+ +
+ +
+
Performance
+

+ Staff evaluations and metrics +

+
+
- -
-
-
- Transformation Tools + +
+
+
+

+ Inventory Management +

-
-
-
Signal → Lead
- - - +
+
+ +
+
Recent Orders
+

+ Purchase orders and deliveries +

+
+
-
- -
-
Lead → Field Assignment
- - - +
+ +
+
Current Stock
+

Inventory levels and status

+
+
-
+
+ +
+
Usage Rates
+

Consumption analytics

+
+ +
+
+
+
-
-
Assignment Controls
- - - + +
+
+
+

+ Lab Reports +

+
+
+
+ +
+
Trap Counts
+

Regional trap data analysis

+
+ +
+ +
+ +
+
Rate Changes
+

Population fluctuation data

+
+ +
+ +
+ +
+
Disease Propagation
+

Health risk assessment data

+
+
diff --git a/html/template/sync/planning-root.html b/html/template/sync/planning-root.html index 9082ed13..bfd0df0a 100644 --- a/html/template/sync/planning-root.html +++ b/html/template/sync/planning-root.html @@ -6,287 +6,615 @@ type="text/javascript" src="//unpkg.com/maplibre-gl@5.0.1/dist/maplibre-gl.js" > - + + + + + - {{ end }} {{ define "content" }} - -
-
-

Daily Planning Workbench

-
- Signals and leads enter from the left, are investigated in the center, - and transformed into structured field assignments using tools on the - right. -
-
-
- -
- -
-
-
- Incoming Signals & Leads -
-
- -
-
Species
- - -
Signal Type
- - -
Sort By
- -
- -
- - -
-
Signals
- -
-
- Public Report – Service Request #1024 -
-
- Aedes aegypti • Standing Water Complaint -
-
- -
-
- Trap Spike – H3 8828308281fffff -
-
Culex pipiens • Adult Surge
-
- -
-
- Residual Expiring – Parcel 45-233-01 -
-
Reinspection Due
-
-
- -
- - -
-
Mosquito Control Plan Follow-Ups
- -
-
- Plan Follow-Up – Greenway HOA Basin -
-
- Residential Section • Verification Required -
- Plan -
- -
-
- Plan Follow-Up – Ag Irrigation Canal 7B -
-
Ag Section • Monitoring Window
- Plan -
-
- -
- - -
-
Existing Leads
- -
-
Lead #L-204
-
3 Signals • Aedes aegypti
-
- -
-
Lead #L-198
-
2 Signals • Culex pipiens
-
-
+
+ +
+
+

Daily Planning Workbench

+
+ Signals and leads enter from the left, are investigated in the center, + and transformed into structured field assignments using tools on the + right.
- -
-
-
- Active Investigation Workbench -
-
-
- Map Placeholder
- H3 Cells • Parcels • Signal Density • Lead Clusters +
+ +
+
+
+ Incoming Signals & Leads +
+
+ + -
-
-
-
-
Selected Signals
-
3 Signals Selected
-
    -
  • Public Report – Aedes aegypti
  • -
  • Trap Spike – Culex pipiens
  • -
  • Plan Follow-Up – HOA Basin
  • -
+ +
+
Species
+ + +
Signal Type
+ + +
Sort By
+ +
+ +
+ + + + + +
+
+ Signals + +
+ + + +
-
-
-
-
Derived Lead Strength
-
Signal Convergence Score
-
- High Confidence +
+ + +
+
+ Mosquito Control Plan Follow-Ups +
+ + + + +
+ +
+ + +
+
Existing Leads
+ + + + +
+
+
+
+ + +
+
+
+ Active Investigation Workbench +
+
+
+ +
+ +
+
+
+
+
Selected Signals
+
+ + + +
    + +
+ + +
+
+
+
+
- -
-
-
-
Related Communications
-
Inbound & outbound contact
-
    -
  • Resident follow-up requested
  • -
  • HOA notification sent
  • -
-
-
-
- -
-
-
-
Priority Context
-
Risk synthesis
- Elevated Aedes Risk -
-
-
-
- -
-
-
Transformation Tools
-
-
-
Signal → Lead
- - - + +
+
+
+ Transformation Tools
+
+
+
Signal → Lead
+ + + +
-
+
-
-
Lead → Field Assignment
- - - -
+
+
Lead → Field Assignment
+ + + +
-
+
-
-
Assignment Controls
- - - +
+
Assignment Controls
+ + + +
diff --git a/sync/intelligence.go b/sync/intelligence.go index 17a4c841..13f45635 100644 --- a/sync/intelligence.go +++ b/sync/intelligence.go @@ -4,30 +4,13 @@ import ( "context" "net/http" - "github.com/Gleipnir-Technology/nidus-sync/background" "github.com/Gleipnir-Technology/nidus-sync/db/models" "github.com/Gleipnir-Technology/nidus-sync/html" nhttp "github.com/Gleipnir-Technology/nidus-sync/http" - "github.com/rs/zerolog/log" ) -type contentIntelligenceRoot struct { - ArcgisAccessToken string -} +type contentIntelligenceRoot struct{} func getIntelligenceRoot(ctx context.Context, r *http.Request, org *models.Organization, user *models.User) (*html.Response[contentIntelligenceRoot], *nhttp.ErrorWithStatus) { - var oauth_token *models.ArcgisOauthToken - var err error - var access_token string - oauth_token, err = background.GetOAuthForOrg(ctx, org) - if err != nil { - log.Warn().Err(err).Msg("Failed to get oauth") - oauth_token = nil - access_token = "" - } else { - access_token = oauth_token.AccessToken - } - return html.NewResponse("sync/intelligence-root.html", contentIntelligenceRoot{ - ArcgisAccessToken: access_token, - }), nil + return html.NewResponse("sync/intelligence-root.html", contentIntelligenceRoot{}), nil } diff --git a/sync/planning.go b/sync/planning.go index b55df1ea..4ed1d941 100644 --- a/sync/planning.go +++ b/sync/planning.go @@ -4,13 +4,30 @@ import ( "context" "net/http" + "github.com/Gleipnir-Technology/nidus-sync/background" "github.com/Gleipnir-Technology/nidus-sync/db/models" "github.com/Gleipnir-Technology/nidus-sync/html" nhttp "github.com/Gleipnir-Technology/nidus-sync/http" + "github.com/rs/zerolog/log" ) -type contentPlanningRoot struct{} +type contentPlanningRoot struct { + ArcgisAccessToken string +} func getPlanningRoot(ctx context.Context, r *http.Request, org *models.Organization, user *models.User) (*html.Response[contentPlanningRoot], *nhttp.ErrorWithStatus) { - return html.NewResponse("sync/planning-root.html", contentPlanningRoot{}), nil + var oauth_token *models.ArcgisOauthToken + var err error + var access_token string + oauth_token, err = background.GetOAuthForOrg(ctx, org) + if err != nil { + log.Warn().Err(err).Msg("Failed to get oauth") + oauth_token = nil + access_token = "" + } else { + access_token = oauth_token.AccessToken + } + return html.NewResponse("sync/planning-root.html", contentPlanningRoot{ + ArcgisAccessToken: access_token, + }), nil }