@burdenoff/microfe-movethewheels 2026.804.1 → 2026.822.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CarbonFootprintPanel.js +108 -0
- package/dist/components/UpcomingDemandPanel.js +184 -0
- package/dist/components/index.js +1 -0
- package/dist/generated/wspace-operations.d.ts +147 -0
- package/dist/generated/wspace-types.d.ts +63 -0
- package/dist/hooks/useAnalytics.js +45 -4
- package/dist/hooks/useDemandForecast.js +54 -0
- package/dist/index.js +29 -28
- package/dist/movethewheels/components/CarbonFootprintPanel.d.ts +7 -0
- package/dist/movethewheels/components/UpcomingDemandPanel.d.ts +13 -0
- package/dist/movethewheels/components/index.d.ts +1 -0
- package/dist/movethewheels/hooks/index.d.ts +1 -1
- package/dist/movethewheels/hooks/useAnalytics.d.ts +22 -0
- package/dist/movethewheels/hooks/useDemandForecast.d.ts +39 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/leaf.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js +11 -0
- package/dist/pages/AnalyticsPage.js +82 -69
- package/package.json +2 -2
- package/src/generated/wspace-operations.ts +177 -0
- package/src/generated/wspace-types.ts +74 -0
- package/src/movethewheels/components/CarbonFootprintPanel.tsx +133 -0
- package/src/movethewheels/components/UpcomingDemandPanel.tsx +237 -0
- package/src/movethewheels/components/index.ts +3 -0
- package/src/movethewheels/hooks/index.ts +2 -0
- package/src/movethewheels/hooks/useAnalytics.ts +86 -0
- package/src/movethewheels/hooks/useDemandForecast.ts +161 -0
- package/src/movethewheels/pages/AnalyticsPage.tsx +27 -0
- package/src/operations/wspace/movethewheels/queries/forecast.graphql +47 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Leaf as e } from "../node_modules/lucide-react/dist/esm/icons/leaf.js";
|
|
2
|
+
import { Truck as t } from "../node_modules/lucide-react/dist/esm/icons/truck.js";
|
|
3
|
+
import { useEmissionsSummary as n } from "../hooks/useAnalytics.js";
|
|
4
|
+
import { Card as r, CardContent as i, CardHeader as a, CardTitle as o } from "./ui.js";
|
|
5
|
+
import { MetricCard as s, MetricGrid as c } from "./MetricCard.js";
|
|
6
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
+
//#region src/movethewheels/components/CarbonFootprintPanel.tsx
|
|
8
|
+
function d(e) {
|
|
9
|
+
return e >= 1e3 ? `${(e / 1e3).toFixed(2)} t` : `${e.toFixed(1)} kg`;
|
|
10
|
+
}
|
|
11
|
+
function f(e) {
|
|
12
|
+
return e >= 1e3 ? `${(e / 1e3).toFixed(1)}k km` : `${e.toFixed(1)} km`;
|
|
13
|
+
}
|
|
14
|
+
function p() {
|
|
15
|
+
let { summary: p, isLoading: m, error: h } = n();
|
|
16
|
+
if (h) return /* @__PURE__ */ l(r, {
|
|
17
|
+
className: "border-status-error-border",
|
|
18
|
+
children: /* @__PURE__ */ l(i, {
|
|
19
|
+
className: "p-6 text-center",
|
|
20
|
+
children: /* @__PURE__ */ l("p", {
|
|
21
|
+
className: "text-sm text-status-error-text",
|
|
22
|
+
children: "Couldn't load emissions data"
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
if (m) return /* @__PURE__ */ u(r, { children: [/* @__PURE__ */ l(a, { children: /* @__PURE__ */ u(o, {
|
|
27
|
+
className: "flex items-center gap-2",
|
|
28
|
+
children: [/* @__PURE__ */ l(e, {
|
|
29
|
+
size: 18,
|
|
30
|
+
className: "text-status-success-text"
|
|
31
|
+
}), "Carbon footprint"]
|
|
32
|
+
}) }), /* @__PURE__ */ l(i, { children: /* @__PURE__ */ l(c, {
|
|
33
|
+
columns: 3,
|
|
34
|
+
children: Array.from({ length: 3 }).map((e, t) => /* @__PURE__ */ l("div", { className: "h-24 rounded-xl bg-bg-sunken motion-safe:animate-pulse" }, t))
|
|
35
|
+
}) })] });
|
|
36
|
+
let g = p.totalDistanceKm > 0;
|
|
37
|
+
return /* @__PURE__ */ u(r, { children: [/* @__PURE__ */ l(a, { children: /* @__PURE__ */ u(o, {
|
|
38
|
+
className: "flex items-center gap-2",
|
|
39
|
+
children: [/* @__PURE__ */ l(e, {
|
|
40
|
+
size: 18,
|
|
41
|
+
className: "text-status-success-text"
|
|
42
|
+
}), "Carbon footprint"]
|
|
43
|
+
}) }), /* @__PURE__ */ u(i, {
|
|
44
|
+
className: "space-y-6",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ u(c, {
|
|
47
|
+
columns: 3,
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ l(s, {
|
|
50
|
+
label: "Total CO2e",
|
|
51
|
+
value: d(p.totalCo2eKg),
|
|
52
|
+
icon: /* @__PURE__ */ l(e, { size: 20 }),
|
|
53
|
+
accent: "success"
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ l(s, {
|
|
56
|
+
label: "Total distance",
|
|
57
|
+
value: f(p.totalDistanceKm),
|
|
58
|
+
icon: /* @__PURE__ */ l(t, { size: 20 }),
|
|
59
|
+
accent: "blue"
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ l(s, {
|
|
62
|
+
label: "Avg intensity",
|
|
63
|
+
value: `${(p.averageCo2eKgPerKm * 1e3).toFixed(1)} g/km`,
|
|
64
|
+
icon: /* @__PURE__ */ l(e, { size: 20 }),
|
|
65
|
+
accent: "warning"
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}),
|
|
69
|
+
g && p.byVehicle.length > 0 && /* @__PURE__ */ u("div", {
|
|
70
|
+
className: "space-y-3",
|
|
71
|
+
children: [/* @__PURE__ */ l("h4", {
|
|
72
|
+
className: "text-sm font-medium text-text-secondary",
|
|
73
|
+
children: "By vehicle"
|
|
74
|
+
}), /* @__PURE__ */ l("div", {
|
|
75
|
+
className: "space-y-2",
|
|
76
|
+
children: p.byVehicle.filter((e) => e.totalDistanceKm > 0 || e.co2eKg > 0).slice(0, 5).map((e) => /* @__PURE__ */ u("div", {
|
|
77
|
+
className: "flex items-center justify-between rounded-lg bg-bg-sunken px-3 py-2",
|
|
78
|
+
children: [/* @__PURE__ */ u("div", {
|
|
79
|
+
className: "flex items-center gap-2",
|
|
80
|
+
children: [/* @__PURE__ */ l(t, {
|
|
81
|
+
size: 16,
|
|
82
|
+
className: "text-text-secondary"
|
|
83
|
+
}), /* @__PURE__ */ l("span", {
|
|
84
|
+
className: "text-sm font-medium text-text-primary",
|
|
85
|
+
children: e.vehicleNumber ?? "Unassigned"
|
|
86
|
+
})]
|
|
87
|
+
}), /* @__PURE__ */ u("div", {
|
|
88
|
+
className: "text-right",
|
|
89
|
+
children: [/* @__PURE__ */ l("p", {
|
|
90
|
+
className: "text-sm font-medium text-text-primary",
|
|
91
|
+
children: d(e.co2eKg)
|
|
92
|
+
}), /* @__PURE__ */ l("p", {
|
|
93
|
+
className: "text-xs text-text-secondary",
|
|
94
|
+
children: f(e.totalDistanceKm)
|
|
95
|
+
})]
|
|
96
|
+
})]
|
|
97
|
+
}, e.vehicleId ?? "unassigned"))
|
|
98
|
+
})]
|
|
99
|
+
}),
|
|
100
|
+
!g && /* @__PURE__ */ l("p", {
|
|
101
|
+
className: "text-sm text-text-secondary",
|
|
102
|
+
children: "No route distance recorded yet. Assign vehicles and distances to routes to see emissions estimates."
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
})] });
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { p as CarbonFootprintPanel };
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { Calendar as e } from "../node_modules/lucide-react/dist/esm/icons/calendar.js";
|
|
2
|
+
import { CircleAlert as t } from "../node_modules/lucide-react/dist/esm/icons/circle-alert.js";
|
|
3
|
+
import { TrendingDown as n } from "../node_modules/lucide-react/dist/esm/icons/trending-down.js";
|
|
4
|
+
import { TrendingUp as r } from "../node_modules/lucide-react/dist/esm/icons/trending-up.js";
|
|
5
|
+
import { Card as i, CardContent as a, CardHeader as o, CardTitle as s, Skeleton as c } from "./ui.js";
|
|
6
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
+
//#region src/movethewheels/components/UpcomingDemandPanel.tsx
|
|
8
|
+
var d = (e) => {
|
|
9
|
+
let t = new Date(e);
|
|
10
|
+
return Number.isNaN(t.getTime()) ? e : t.toLocaleDateString(void 0, {
|
|
11
|
+
month: "short",
|
|
12
|
+
day: "numeric"
|
|
13
|
+
});
|
|
14
|
+
}, f = (e, t) => [...e.filter((e) => e.periodStart === t)].sort((e, t) => t.predictedVolume - e.predictedVolume).slice(0, 3), p = (e, t) => [...e.filter((e) => e.periodStart === t)].sort((e, t) => t.predictedRevenue - e.predictedRevenue).slice(0, 3), m = (e, t) => e.filter((e) => e.periodStart === t).reduce((e, t) => e + t.predictedVolume, 0), h = (e) => e <= 0 ? "Not enough history" : `${Math.round(e * 100)}% confidence`;
|
|
15
|
+
function g({ laneForecast: n, customerForecast: r, laneVariance: g, customerVariance: y, isLoading: b, error: x, onRetry: S }) {
|
|
16
|
+
if (x && !b) return /* @__PURE__ */ l(i, {
|
|
17
|
+
className: "border-status-error-border",
|
|
18
|
+
children: /* @__PURE__ */ u(a, {
|
|
19
|
+
className: "p-6 text-center space-y-3",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ l("p", {
|
|
22
|
+
className: "text-status-error-text font-medium",
|
|
23
|
+
children: "Couldn't load demand forecast"
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ l("p", {
|
|
26
|
+
className: "text-sm text-text-secondary",
|
|
27
|
+
children: x.message
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ l("button", {
|
|
30
|
+
type: "button",
|
|
31
|
+
onClick: S,
|
|
32
|
+
className: "text-sm font-medium text-primary hover:underline",
|
|
33
|
+
children: "Retry"
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
if (b) return /* @__PURE__ */ u(i, { children: [/* @__PURE__ */ l(o, { children: /* @__PURE__ */ l(s, { children: "Upcoming demand" }) }), /* @__PURE__ */ u(a, {
|
|
39
|
+
className: "space-y-4",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ l(c, { className: "h-16 w-full" }),
|
|
42
|
+
/* @__PURE__ */ l(c, { className: "h-16 w-full" }),
|
|
43
|
+
/* @__PURE__ */ l(c, { className: "h-16 w-full" })
|
|
44
|
+
]
|
|
45
|
+
})] });
|
|
46
|
+
let C = n[0]?.periodStart ?? r[0]?.periodStart ?? null;
|
|
47
|
+
if (!C || n.length === 0) return /* @__PURE__ */ u(i, { children: [/* @__PURE__ */ l(o, { children: /* @__PURE__ */ u(s, {
|
|
48
|
+
className: "flex items-center gap-2",
|
|
49
|
+
children: [/* @__PURE__ */ l(e, {
|
|
50
|
+
size: 18,
|
|
51
|
+
"aria-hidden": "true"
|
|
52
|
+
}), "Upcoming demand"]
|
|
53
|
+
}) }), /* @__PURE__ */ l(a, { children: /* @__PURE__ */ u("div", {
|
|
54
|
+
className: "flex items-start gap-2 rounded-lg border border-border/60 bg-muted/40 p-4 text-sm text-text-secondary",
|
|
55
|
+
children: [/* @__PURE__ */ l(t, {
|
|
56
|
+
size: 16,
|
|
57
|
+
"aria-hidden": "true",
|
|
58
|
+
className: "mt-0.5 shrink-0"
|
|
59
|
+
}), /* @__PURE__ */ l("p", { children: "Not enough history to forecast next week yet. Once you have at least 4 weeks of completed orders, this panel will surface demand by lane and customer." })]
|
|
60
|
+
}) })] });
|
|
61
|
+
let w = f(n, C), T = p(n, C), E = f(r, C), D = m(n, C), O = [...g, ...y].sort((e, t) => Math.abs(t.volumeVariance) - Math.abs(e.volumeVariance)).slice(0, 3);
|
|
62
|
+
return /* @__PURE__ */ u(i, { children: [/* @__PURE__ */ l(o, { children: /* @__PURE__ */ u(s, {
|
|
63
|
+
className: "flex items-center gap-2",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ l(e, {
|
|
66
|
+
size: 18,
|
|
67
|
+
"aria-hidden": "true"
|
|
68
|
+
}),
|
|
69
|
+
"Upcoming demand — week of ",
|
|
70
|
+
d(C)
|
|
71
|
+
]
|
|
72
|
+
}) }), /* @__PURE__ */ u(a, {
|
|
73
|
+
className: "space-y-4",
|
|
74
|
+
children: [/* @__PURE__ */ u("div", {
|
|
75
|
+
className: "flex items-baseline justify-between rounded-lg border border-border/60 bg-muted/40 px-4 py-3",
|
|
76
|
+
children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
|
|
77
|
+
className: "text-xs uppercase tracking-wide text-text-secondary",
|
|
78
|
+
children: "Predicted jobs (all lanes)"
|
|
79
|
+
}), /* @__PURE__ */ l("p", {
|
|
80
|
+
className: "text-2xl font-bold",
|
|
81
|
+
children: D
|
|
82
|
+
})] }), /* @__PURE__ */ l("p", {
|
|
83
|
+
className: "text-xs text-text-secondary",
|
|
84
|
+
children: w[0] ? h(w[0].confidence) : ""
|
|
85
|
+
})]
|
|
86
|
+
}), /* @__PURE__ */ u("div", {
|
|
87
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ l(_, {
|
|
90
|
+
title: "Top lanes (volume)",
|
|
91
|
+
rows: w
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ l(_, {
|
|
94
|
+
title: "Top lanes (revenue)",
|
|
95
|
+
rows: T
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ l(_, {
|
|
98
|
+
title: "Top customers (volume)",
|
|
99
|
+
rows: E
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ l(v, { rows: O })
|
|
102
|
+
]
|
|
103
|
+
})]
|
|
104
|
+
})] });
|
|
105
|
+
}
|
|
106
|
+
function _({ title: e, rows: t }) {
|
|
107
|
+
return t.length === 0 ? /* @__PURE__ */ u("div", {
|
|
108
|
+
className: "rounded-lg border border-border/60 p-4",
|
|
109
|
+
children: [/* @__PURE__ */ l("p", {
|
|
110
|
+
className: "text-sm font-medium mb-2",
|
|
111
|
+
children: e
|
|
112
|
+
}), /* @__PURE__ */ l("p", {
|
|
113
|
+
className: "text-xs text-text-secondary",
|
|
114
|
+
children: "No forecasts yet for this week."
|
|
115
|
+
})]
|
|
116
|
+
}) : /* @__PURE__ */ u("div", {
|
|
117
|
+
className: "rounded-lg border border-border/60 p-4",
|
|
118
|
+
children: [/* @__PURE__ */ l("p", {
|
|
119
|
+
className: "text-sm font-medium mb-3",
|
|
120
|
+
children: e
|
|
121
|
+
}), /* @__PURE__ */ l("ul", {
|
|
122
|
+
className: "space-y-2",
|
|
123
|
+
children: t.map((e) => /* @__PURE__ */ u("li", {
|
|
124
|
+
className: "flex items-center justify-between text-sm",
|
|
125
|
+
children: [/* @__PURE__ */ l("span", {
|
|
126
|
+
className: "truncate font-medium",
|
|
127
|
+
children: e.scopeKey
|
|
128
|
+
}), /* @__PURE__ */ u("span", {
|
|
129
|
+
className: "ml-2 shrink-0 text-text-secondary",
|
|
130
|
+
children: [
|
|
131
|
+
e.predictedVolume,
|
|
132
|
+
" jobs ·",
|
|
133
|
+
" ",
|
|
134
|
+
new Intl.NumberFormat(void 0, {
|
|
135
|
+
style: "currency",
|
|
136
|
+
currency: "USD",
|
|
137
|
+
maximumFractionDigits: 0
|
|
138
|
+
}).format(e.predictedRevenue)
|
|
139
|
+
]
|
|
140
|
+
})]
|
|
141
|
+
}, `${e.scopeType}-${e.scopeKey}`))
|
|
142
|
+
})]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function v({ rows: e }) {
|
|
146
|
+
return /* @__PURE__ */ u("div", {
|
|
147
|
+
className: "rounded-lg border border-border/60 p-4",
|
|
148
|
+
children: [/* @__PURE__ */ l("p", {
|
|
149
|
+
className: "text-sm font-medium mb-3",
|
|
150
|
+
children: "Recent forecast variance"
|
|
151
|
+
}), e.length === 0 ? /* @__PURE__ */ l("p", {
|
|
152
|
+
className: "text-xs text-text-secondary",
|
|
153
|
+
children: "No closed periods to compare yet."
|
|
154
|
+
}) : /* @__PURE__ */ l("ul", {
|
|
155
|
+
className: "space-y-2",
|
|
156
|
+
children: e.map((e) => {
|
|
157
|
+
let t = e.volumeVariance > 0, i = t ? r : n, a = t ? "text-emerald-600 dark:text-emerald-400" : "text-rose-600 dark:text-rose-400";
|
|
158
|
+
return /* @__PURE__ */ u("li", {
|
|
159
|
+
className: "flex items-center justify-between text-sm",
|
|
160
|
+
children: [/* @__PURE__ */ u("span", {
|
|
161
|
+
className: "flex items-center gap-2 truncate",
|
|
162
|
+
children: [/* @__PURE__ */ l(i, {
|
|
163
|
+
size: 14,
|
|
164
|
+
className: a,
|
|
165
|
+
"aria-hidden": "true"
|
|
166
|
+
}), /* @__PURE__ */ l("span", {
|
|
167
|
+
className: "truncate font-medium",
|
|
168
|
+
children: e.scopeKey
|
|
169
|
+
})]
|
|
170
|
+
}), /* @__PURE__ */ u("span", {
|
|
171
|
+
className: `ml-2 shrink-0 ${a}`,
|
|
172
|
+
children: [
|
|
173
|
+
t ? "+" : "",
|
|
174
|
+
e.volumeVariance,
|
|
175
|
+
" jobs"
|
|
176
|
+
]
|
|
177
|
+
})]
|
|
178
|
+
}, `${e.scopeType}-${e.scopeKey}-${e.periodStart}`);
|
|
179
|
+
})
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
export { g as UpcomingDemandPanel };
|
package/dist/components/index.js
CHANGED
|
@@ -1404,6 +1404,62 @@ export type GetWarehouseQuery = {
|
|
|
1404
1404
|
}>;
|
|
1405
1405
|
} | null;
|
|
1406
1406
|
};
|
|
1407
|
+
export type GetMovethewheelsDemandForecastByLaneQueryVariables = Types.Exact<{
|
|
1408
|
+
weeks: Types.Scalars['Int']['input'];
|
|
1409
|
+
}>;
|
|
1410
|
+
export type GetMovethewheelsDemandForecastByLaneQuery = {
|
|
1411
|
+
__typename?: 'Query';
|
|
1412
|
+
demandForecastByLane: Array<{
|
|
1413
|
+
__typename?: 'MtwDemandForecastPoint';
|
|
1414
|
+
scopeType: Types.DemandForecastScope;
|
|
1415
|
+
scopeKey: string;
|
|
1416
|
+
periodStart: string;
|
|
1417
|
+
periodEnd: string;
|
|
1418
|
+
predictedVolume: number;
|
|
1419
|
+
predictedRevenue: number;
|
|
1420
|
+
actualVolume?: number | null;
|
|
1421
|
+
actualRevenue?: number | null;
|
|
1422
|
+
confidence: number;
|
|
1423
|
+
}>;
|
|
1424
|
+
};
|
|
1425
|
+
export type GetMovethewheelsDemandForecastByCustomerQueryVariables = Types.Exact<{
|
|
1426
|
+
weeks: Types.Scalars['Int']['input'];
|
|
1427
|
+
}>;
|
|
1428
|
+
export type GetMovethewheelsDemandForecastByCustomerQuery = {
|
|
1429
|
+
__typename?: 'Query';
|
|
1430
|
+
demandForecastByCustomer: Array<{
|
|
1431
|
+
__typename?: 'MtwDemandForecastPoint';
|
|
1432
|
+
scopeType: Types.DemandForecastScope;
|
|
1433
|
+
scopeKey: string;
|
|
1434
|
+
periodStart: string;
|
|
1435
|
+
periodEnd: string;
|
|
1436
|
+
predictedVolume: number;
|
|
1437
|
+
predictedRevenue: number;
|
|
1438
|
+
actualVolume?: number | null;
|
|
1439
|
+
actualRevenue?: number | null;
|
|
1440
|
+
confidence: number;
|
|
1441
|
+
}>;
|
|
1442
|
+
};
|
|
1443
|
+
export type GetMovethewheelsDemandForecastVarianceQueryVariables = Types.Exact<{
|
|
1444
|
+
scopeType: Types.DemandForecastScope;
|
|
1445
|
+
limit: Types.Scalars['Int']['input'];
|
|
1446
|
+
}>;
|
|
1447
|
+
export type GetMovethewheelsDemandForecastVarianceQuery = {
|
|
1448
|
+
__typename?: 'Query';
|
|
1449
|
+
demandForecastVariance: Array<{
|
|
1450
|
+
__typename?: 'MtwDemandForecastVariance';
|
|
1451
|
+
scopeType: Types.DemandForecastScope;
|
|
1452
|
+
scopeKey: string;
|
|
1453
|
+
periodStart: string;
|
|
1454
|
+
periodEnd: string;
|
|
1455
|
+
predictedVolume: number;
|
|
1456
|
+
actualVolume: number;
|
|
1457
|
+
volumeVariance: number;
|
|
1458
|
+
predictedRevenue: number;
|
|
1459
|
+
actualRevenue: number;
|
|
1460
|
+
revenueVariance: number;
|
|
1461
|
+
}>;
|
|
1462
|
+
};
|
|
1407
1463
|
export type ListInventoryItemsQueryVariables = Types.Exact<{
|
|
1408
1464
|
filter?: Types.InputMaybe<Types.InventoryFilterInput>;
|
|
1409
1465
|
pagination?: Types.InputMaybe<Types.PaginationInput>;
|
|
@@ -3232,6 +3288,97 @@ export type GetWarehouseQueryHookResult = ReturnType<typeof useGetWarehouseQuery
|
|
|
3232
3288
|
export type GetWarehouseLazyQueryHookResult = ReturnType<typeof useGetWarehouseLazyQuery>;
|
|
3233
3289
|
export type GetWarehouseSuspenseQueryHookResult = ReturnType<typeof useGetWarehouseSuspenseQuery>;
|
|
3234
3290
|
export type GetWarehouseQueryResult = Apollo.QueryResult<Types.GetWarehouseQuery, Types.GetWarehouseQueryVariables>;
|
|
3291
|
+
export declare const GetMovethewheelsDemandForecastByLaneDocument: Apollo.DocumentNode;
|
|
3292
|
+
/**
|
|
3293
|
+
* __useGetMovethewheelsDemandForecastByLaneQuery__
|
|
3294
|
+
*
|
|
3295
|
+
* To run a query within a React component, call `useGetMovethewheelsDemandForecastByLaneQuery` and pass it any options that fit your needs.
|
|
3296
|
+
* When your component renders, `useGetMovethewheelsDemandForecastByLaneQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
3297
|
+
* you can use to render your UI.
|
|
3298
|
+
*
|
|
3299
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
3300
|
+
*
|
|
3301
|
+
* @example
|
|
3302
|
+
* const { data, loading, error } = useGetMovethewheelsDemandForecastByLaneQuery({
|
|
3303
|
+
* variables: {
|
|
3304
|
+
* weeks: // value for 'weeks'
|
|
3305
|
+
* },
|
|
3306
|
+
* });
|
|
3307
|
+
*/
|
|
3308
|
+
export declare function useGetMovethewheelsDemandForecastByLaneQuery(baseOptions: ApolloReactHooks.QueryHookOptions<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables> & ({
|
|
3309
|
+
variables: Types.GetMovethewheelsDemandForecastByLaneQueryVariables;
|
|
3310
|
+
skip?: boolean;
|
|
3311
|
+
} | {
|
|
3312
|
+
skip: boolean;
|
|
3313
|
+
})): ApolloReactHooks.useQuery.Result<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables, "empty" | "complete" | "streaming", Types.GetMovethewheelsDemandForecastByLaneQueryVariables>;
|
|
3314
|
+
export declare function useGetMovethewheelsDemandForecastByLaneLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>): ApolloReactHooks.useLazyQuery.ResultTuple<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables, "empty" | "complete" | "streaming">;
|
|
3315
|
+
export declare function useGetMovethewheelsDemandForecastByLaneSuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>;
|
|
3316
|
+
export declare function useGetMovethewheelsDemandForecastByLaneSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastByLaneQuery | undefined, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>;
|
|
3317
|
+
export type GetMovethewheelsDemandForecastByLaneQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByLaneQuery>;
|
|
3318
|
+
export type GetMovethewheelsDemandForecastByLaneLazyQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByLaneLazyQuery>;
|
|
3319
|
+
export type GetMovethewheelsDemandForecastByLaneSuspenseQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByLaneSuspenseQuery>;
|
|
3320
|
+
export type GetMovethewheelsDemandForecastByLaneQueryResult = Apollo.QueryResult<Types.GetMovethewheelsDemandForecastByLaneQuery, Types.GetMovethewheelsDemandForecastByLaneQueryVariables>;
|
|
3321
|
+
export declare const GetMovethewheelsDemandForecastByCustomerDocument: Apollo.DocumentNode;
|
|
3322
|
+
/**
|
|
3323
|
+
* __useGetMovethewheelsDemandForecastByCustomerQuery__
|
|
3324
|
+
*
|
|
3325
|
+
* To run a query within a React component, call `useGetMovethewheelsDemandForecastByCustomerQuery` and pass it any options that fit your needs.
|
|
3326
|
+
* When your component renders, `useGetMovethewheelsDemandForecastByCustomerQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
3327
|
+
* you can use to render your UI.
|
|
3328
|
+
*
|
|
3329
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
3330
|
+
*
|
|
3331
|
+
* @example
|
|
3332
|
+
* const { data, loading, error } = useGetMovethewheelsDemandForecastByCustomerQuery({
|
|
3333
|
+
* variables: {
|
|
3334
|
+
* weeks: // value for 'weeks'
|
|
3335
|
+
* },
|
|
3336
|
+
* });
|
|
3337
|
+
*/
|
|
3338
|
+
export declare function useGetMovethewheelsDemandForecastByCustomerQuery(baseOptions: ApolloReactHooks.QueryHookOptions<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables> & ({
|
|
3339
|
+
variables: Types.GetMovethewheelsDemandForecastByCustomerQueryVariables;
|
|
3340
|
+
skip?: boolean;
|
|
3341
|
+
} | {
|
|
3342
|
+
skip: boolean;
|
|
3343
|
+
})): ApolloReactHooks.useQuery.Result<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables, "empty" | "complete" | "streaming", Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>;
|
|
3344
|
+
export declare function useGetMovethewheelsDemandForecastByCustomerLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>): ApolloReactHooks.useLazyQuery.ResultTuple<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables, "empty" | "complete" | "streaming">;
|
|
3345
|
+
export declare function useGetMovethewheelsDemandForecastByCustomerSuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>;
|
|
3346
|
+
export declare function useGetMovethewheelsDemandForecastByCustomerSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastByCustomerQuery | undefined, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>;
|
|
3347
|
+
export type GetMovethewheelsDemandForecastByCustomerQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByCustomerQuery>;
|
|
3348
|
+
export type GetMovethewheelsDemandForecastByCustomerLazyQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByCustomerLazyQuery>;
|
|
3349
|
+
export type GetMovethewheelsDemandForecastByCustomerSuspenseQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastByCustomerSuspenseQuery>;
|
|
3350
|
+
export type GetMovethewheelsDemandForecastByCustomerQueryResult = Apollo.QueryResult<Types.GetMovethewheelsDemandForecastByCustomerQuery, Types.GetMovethewheelsDemandForecastByCustomerQueryVariables>;
|
|
3351
|
+
export declare const GetMovethewheelsDemandForecastVarianceDocument: Apollo.DocumentNode;
|
|
3352
|
+
/**
|
|
3353
|
+
* __useGetMovethewheelsDemandForecastVarianceQuery__
|
|
3354
|
+
*
|
|
3355
|
+
* To run a query within a React component, call `useGetMovethewheelsDemandForecastVarianceQuery` and pass it any options that fit your needs.
|
|
3356
|
+
* When your component renders, `useGetMovethewheelsDemandForecastVarianceQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
3357
|
+
* you can use to render your UI.
|
|
3358
|
+
*
|
|
3359
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
3360
|
+
*
|
|
3361
|
+
* @example
|
|
3362
|
+
* const { data, loading, error } = useGetMovethewheelsDemandForecastVarianceQuery({
|
|
3363
|
+
* variables: {
|
|
3364
|
+
* scopeType: // value for 'scopeType'
|
|
3365
|
+
* limit: // value for 'limit'
|
|
3366
|
+
* },
|
|
3367
|
+
* });
|
|
3368
|
+
*/
|
|
3369
|
+
export declare function useGetMovethewheelsDemandForecastVarianceQuery(baseOptions: ApolloReactHooks.QueryHookOptions<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables> & ({
|
|
3370
|
+
variables: Types.GetMovethewheelsDemandForecastVarianceQueryVariables;
|
|
3371
|
+
skip?: boolean;
|
|
3372
|
+
} | {
|
|
3373
|
+
skip: boolean;
|
|
3374
|
+
})): ApolloReactHooks.useQuery.Result<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables, "empty" | "complete" | "streaming", Types.GetMovethewheelsDemandForecastVarianceQueryVariables>;
|
|
3375
|
+
export declare function useGetMovethewheelsDemandForecastVarianceLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>): ApolloReactHooks.useLazyQuery.ResultTuple<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables, "empty" | "complete" | "streaming">;
|
|
3376
|
+
export declare function useGetMovethewheelsDemandForecastVarianceSuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>;
|
|
3377
|
+
export declare function useGetMovethewheelsDemandForecastVarianceSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetMovethewheelsDemandForecastVarianceQuery | undefined, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>;
|
|
3378
|
+
export type GetMovethewheelsDemandForecastVarianceQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastVarianceQuery>;
|
|
3379
|
+
export type GetMovethewheelsDemandForecastVarianceLazyQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastVarianceLazyQuery>;
|
|
3380
|
+
export type GetMovethewheelsDemandForecastVarianceSuspenseQueryHookResult = ReturnType<typeof useGetMovethewheelsDemandForecastVarianceSuspenseQuery>;
|
|
3381
|
+
export type GetMovethewheelsDemandForecastVarianceQueryResult = Apollo.QueryResult<Types.GetMovethewheelsDemandForecastVarianceQuery, Types.GetMovethewheelsDemandForecastVarianceQueryVariables>;
|
|
3235
3382
|
export declare const ListInventoryItemsDocument: Apollo.DocumentNode;
|
|
3236
3383
|
/**
|
|
3237
3384
|
* __useListInventoryItemsQuery__
|
|
@@ -9117,6 +9117,10 @@ export declare enum DeliveryChannelType {
|
|
|
9117
9117
|
Storage = "STORAGE",
|
|
9118
9118
|
Webhook = "WEBHOOK"
|
|
9119
9119
|
}
|
|
9120
|
+
export declare enum DemandForecastScope {
|
|
9121
|
+
Customer = "CUSTOMER",
|
|
9122
|
+
Lane = "LANE"
|
|
9123
|
+
}
|
|
9120
9124
|
export type DependencyHealth = {
|
|
9121
9125
|
__typename?: 'DependencyHealth';
|
|
9122
9126
|
message: Scalars['String']['output'];
|
|
@@ -18999,6 +19003,31 @@ export type MovethewheelsReportFilterInput = {
|
|
|
18999
19003
|
status?: InputMaybe<Scalars['String']['input']>;
|
|
19000
19004
|
type?: InputMaybe<Scalars['String']['input']>;
|
|
19001
19005
|
};
|
|
19006
|
+
export type MtwDemandForecastPoint = {
|
|
19007
|
+
__typename?: 'MtwDemandForecastPoint';
|
|
19008
|
+
actualRevenue?: Maybe<Scalars['Float']['output']>;
|
|
19009
|
+
actualVolume?: Maybe<Scalars['Int']['output']>;
|
|
19010
|
+
confidence: Scalars['Float']['output'];
|
|
19011
|
+
periodEnd: Scalars['DateTime']['output'];
|
|
19012
|
+
periodStart: Scalars['DateTime']['output'];
|
|
19013
|
+
predictedRevenue: Scalars['Float']['output'];
|
|
19014
|
+
predictedVolume: Scalars['Int']['output'];
|
|
19015
|
+
scopeKey: Scalars['String']['output'];
|
|
19016
|
+
scopeType: DemandForecastScope;
|
|
19017
|
+
};
|
|
19018
|
+
export type MtwDemandForecastVariance = {
|
|
19019
|
+
__typename?: 'MtwDemandForecastVariance';
|
|
19020
|
+
actualRevenue: Scalars['Float']['output'];
|
|
19021
|
+
actualVolume: Scalars['Int']['output'];
|
|
19022
|
+
periodEnd: Scalars['DateTime']['output'];
|
|
19023
|
+
periodStart: Scalars['DateTime']['output'];
|
|
19024
|
+
predictedRevenue: Scalars['Float']['output'];
|
|
19025
|
+
predictedVolume: Scalars['Int']['output'];
|
|
19026
|
+
revenueVariance: Scalars['Float']['output'];
|
|
19027
|
+
scopeKey: Scalars['String']['output'];
|
|
19028
|
+
scopeType: DemandForecastScope;
|
|
19029
|
+
volumeVariance: Scalars['Int']['output'];
|
|
19030
|
+
};
|
|
19002
19031
|
/**
|
|
19003
19032
|
* Base Mutation type with placeholder field.
|
|
19004
19033
|
* Extended by individual mutation files.
|
|
@@ -20753,6 +20782,7 @@ export type Mutation = {
|
|
|
20753
20782
|
/** Reactivate an archived workspace (sets status to ACTIVE) */
|
|
20754
20783
|
reactivateWorkspace: Workspace;
|
|
20755
20784
|
rebuildKnowledgeBaseIndex: Scalars['Boolean']['output'];
|
|
20785
|
+
recalculateDemandForecasts: Scalars['Int']['output'];
|
|
20756
20786
|
/**
|
|
20757
20787
|
* Recalculate resource usage for the current workspace.
|
|
20758
20788
|
* Workspace ID is read from gateway context (x-workspace-id header).
|
|
@@ -28817,6 +28847,13 @@ export type MutationReactivateWorkspaceArgs = {
|
|
|
28817
28847
|
export type MutationRebuildKnowledgeBaseIndexArgs = {
|
|
28818
28848
|
knowledgeBaseId: Scalars['ID']['input'];
|
|
28819
28849
|
};
|
|
28850
|
+
/**
|
|
28851
|
+
* Base Mutation type with placeholder field.
|
|
28852
|
+
* Extended by individual mutation files.
|
|
28853
|
+
*/
|
|
28854
|
+
export type MutationRecalculateDemandForecastsArgs = {
|
|
28855
|
+
weeksOfHistory?: InputMaybe<Scalars['Int']['input']>;
|
|
28856
|
+
};
|
|
28820
28857
|
/**
|
|
28821
28858
|
* Base Mutation type with placeholder field.
|
|
28822
28859
|
* Extended by individual mutation files.
|
|
@@ -36315,6 +36352,10 @@ export type Query = {
|
|
|
36315
36352
|
deadLetterQueueEntry?: Maybe<DeadLetterQueue>;
|
|
36316
36353
|
decryptSecret?: Maybe<DecryptedSecret>;
|
|
36317
36354
|
defaultVibeDeck?: Maybe<VibeDeck>;
|
|
36355
|
+
/** Demand forecasting / S&OP v1 (BOFF-4393). Heuristic next-week forecasts. */
|
|
36356
|
+
demandForecastByCustomer: Array<MtwDemandForecastPoint>;
|
|
36357
|
+
demandForecastByLane: Array<MtwDemandForecastPoint>;
|
|
36358
|
+
demandForecastVariance: Array<MtwDemandForecastVariance>;
|
|
36318
36359
|
/** Check the health status of all system dependencies */
|
|
36319
36360
|
dependenciesHealth: HealthCheckResponse;
|
|
36320
36361
|
/**
|
|
@@ -38601,6 +38642,28 @@ export type QueryDeadLetterQueueEntryArgs = {
|
|
|
38601
38642
|
export type QueryDecryptSecretArgs = {
|
|
38602
38643
|
id: Scalars['ID']['input'];
|
|
38603
38644
|
};
|
|
38645
|
+
/**
|
|
38646
|
+
* Base Query type with placeholder field.
|
|
38647
|
+
* Extended by individual query files.
|
|
38648
|
+
*/
|
|
38649
|
+
export type QueryDemandForecastByCustomerArgs = {
|
|
38650
|
+
weeks?: InputMaybe<Scalars['Int']['input']>;
|
|
38651
|
+
};
|
|
38652
|
+
/**
|
|
38653
|
+
* Base Query type with placeholder field.
|
|
38654
|
+
* Extended by individual query files.
|
|
38655
|
+
*/
|
|
38656
|
+
export type QueryDemandForecastByLaneArgs = {
|
|
38657
|
+
weeks?: InputMaybe<Scalars['Int']['input']>;
|
|
38658
|
+
};
|
|
38659
|
+
/**
|
|
38660
|
+
* Base Query type with placeholder field.
|
|
38661
|
+
* Extended by individual query files.
|
|
38662
|
+
*/
|
|
38663
|
+
export type QueryDemandForecastVarianceArgs = {
|
|
38664
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
38665
|
+
scopeType: DemandForecastScope;
|
|
38666
|
+
};
|
|
38604
38667
|
/**
|
|
38605
38668
|
* Base Query type with placeholder field.
|
|
38606
38669
|
* Extended by individual query files.
|
|
@@ -287,8 +287,8 @@ function m() {
|
|
|
287
287
|
error: n
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
var h = "\n query GetMovethewheelsFinanceMetrics {\n financeMetrics {\n revenue {\n totalRevenue\n deliveredRevenue\n averageOrderValue\n }\n fuelCost\n openInvoices\n }\n }\n";
|
|
291
|
-
function
|
|
290
|
+
var h = "\n query GetMovethewheelsFinanceMetrics {\n financeMetrics {\n revenue {\n totalRevenue\n deliveredRevenue\n averageOrderValue\n }\n fuelCost\n openInvoices\n }\n }\n", g = "\n query GetMovethewheelsEmissionsSummary {\n emissionsSummary {\n totalCo2eKg\n totalDistanceKm\n averageCo2eKgPerKm\n byVehicle {\n vehicleId\n vehicleNumber\n totalDistanceKm\n co2eKg\n }\n }\n }\n";
|
|
291
|
+
function _() {
|
|
292
292
|
let { apiGatewayUrl: o, authToken: s, workspaceToken: c, workspaceId: l, tenantId: u, currentUser: d } = e(), [f, p] = a({
|
|
293
293
|
totalRevenue: 0,
|
|
294
294
|
deliveredRevenue: 0,
|
|
@@ -337,7 +337,7 @@ function g() {
|
|
|
337
337
|
}, [b])
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function v() {
|
|
341
341
|
let { analytics: e, isLoading: t, error: n } = u();
|
|
342
342
|
return {
|
|
343
343
|
performanceData: i(() => ({
|
|
@@ -348,5 +348,46 @@ function _() {
|
|
|
348
348
|
error: n
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
+
function y() {
|
|
352
|
+
let { apiGatewayUrl: o, authToken: s, workspaceToken: c, workspaceId: l, tenantId: u, currentUser: d } = e(), [f, p] = a({
|
|
353
|
+
totalCo2eKg: 0,
|
|
354
|
+
totalDistanceKm: 0,
|
|
355
|
+
averageCo2eKgPerKm: 0,
|
|
356
|
+
byVehicle: []
|
|
357
|
+
}), [m, h] = a(!1), [_, v] = a(null), y = i(() => ({
|
|
358
|
+
apiGatewayUrl: o,
|
|
359
|
+
authToken: s,
|
|
360
|
+
workspaceToken: c,
|
|
361
|
+
workspaceId: l,
|
|
362
|
+
tenantId: u,
|
|
363
|
+
actorId: d?.id
|
|
364
|
+
}), [
|
|
365
|
+
o,
|
|
366
|
+
s,
|
|
367
|
+
c,
|
|
368
|
+
l,
|
|
369
|
+
u,
|
|
370
|
+
d?.id
|
|
371
|
+
]), b = n(async () => {
|
|
372
|
+
h(!0), v(null);
|
|
373
|
+
try {
|
|
374
|
+
p((await t(y, g)).emissionsSummary);
|
|
375
|
+
} catch (e) {
|
|
376
|
+
v(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load emissions summary"));
|
|
377
|
+
} finally {
|
|
378
|
+
h(!1);
|
|
379
|
+
}
|
|
380
|
+
}, [y]);
|
|
381
|
+
return r(() => {
|
|
382
|
+
b();
|
|
383
|
+
}, [b]), {
|
|
384
|
+
summary: f,
|
|
385
|
+
isLoading: m,
|
|
386
|
+
error: _,
|
|
387
|
+
refetch: n(() => {
|
|
388
|
+
b();
|
|
389
|
+
}, [b])
|
|
390
|
+
};
|
|
391
|
+
}
|
|
351
392
|
//#endregion
|
|
352
|
-
export { u as useAnalytics, d as useDashboardMetrics,
|
|
393
|
+
export { u as useAnalytics, d as useDashboardMetrics, y as useEmissionsSummary, _ as useFinanceMetrics, m as useFleetAnalytics, p as useOrderAnalytics, v as usePerformanceAnalytics, f as useRevenueAnalytics };
|