@burdenoff/microfe-theglobalfuel 2026.509.101

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.
Files changed (112) hide show
  1. package/README.md +12 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/generated/global-operations.d.ts +2 -0
  5. package/dist/generated/global-operations.d.ts.map +1 -0
  6. package/dist/generated/global-types.d.ts +18199 -0
  7. package/dist/generated/global-types.d.ts.map +1 -0
  8. package/dist/generated/wspace-operations.d.ts +2 -0
  9. package/dist/generated/wspace-operations.d.ts.map +1 -0
  10. package/dist/generated/wspace-types.d.ts +43046 -0
  11. package/dist/generated/wspace-types.d.ts.map +1 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +5 -0
  15. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  16. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  17. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
  18. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  19. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
  20. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
  21. package/dist/theglobalfuel/TheGlobalFuelRoot.js +175 -0
  22. package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -0
  23. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +2 -0
  24. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
  25. package/dist/theglobalfuel/TheGlobalFuelRoutes.js +91 -0
  26. package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -0
  27. package/dist/theglobalfuel/index.d.ts +5 -0
  28. package/dist/theglobalfuel/index.d.ts.map +1 -0
  29. package/dist/theglobalfuel/index.js +3 -0
  30. package/dist/theglobalfuel/pages/AiIntelligencePage.d.ts +2 -0
  31. package/dist/theglobalfuel/pages/AiIntelligencePage.d.ts.map +1 -0
  32. package/dist/theglobalfuel/pages/AiIntelligencePage.js +190 -0
  33. package/dist/theglobalfuel/pages/AiIntelligencePage.js.map +1 -0
  34. package/dist/theglobalfuel/pages/AnalyticsPage.d.ts +2 -0
  35. package/dist/theglobalfuel/pages/AnalyticsPage.d.ts.map +1 -0
  36. package/dist/theglobalfuel/pages/AnalyticsPage.js +241 -0
  37. package/dist/theglobalfuel/pages/AnalyticsPage.js.map +1 -0
  38. package/dist/theglobalfuel/pages/CompliancePage.d.ts +2 -0
  39. package/dist/theglobalfuel/pages/CompliancePage.d.ts.map +1 -0
  40. package/dist/theglobalfuel/pages/CompliancePage.js +173 -0
  41. package/dist/theglobalfuel/pages/CompliancePage.js.map +1 -0
  42. package/dist/theglobalfuel/pages/DashboardPage.d.ts +2 -0
  43. package/dist/theglobalfuel/pages/DashboardPage.d.ts.map +1 -0
  44. package/dist/theglobalfuel/pages/DashboardPage.js +145 -0
  45. package/dist/theglobalfuel/pages/DashboardPage.js.map +1 -0
  46. package/dist/theglobalfuel/pages/FinancialPage.d.ts +2 -0
  47. package/dist/theglobalfuel/pages/FinancialPage.d.ts.map +1 -0
  48. package/dist/theglobalfuel/pages/FinancialPage.js +204 -0
  49. package/dist/theglobalfuel/pages/FinancialPage.js.map +1 -0
  50. package/dist/theglobalfuel/pages/FleetManagementPage.d.ts +2 -0
  51. package/dist/theglobalfuel/pages/FleetManagementPage.d.ts.map +1 -0
  52. package/dist/theglobalfuel/pages/FleetManagementPage.js +244 -0
  53. package/dist/theglobalfuel/pages/FleetManagementPage.js.map +1 -0
  54. package/dist/theglobalfuel/pages/MarketplacePage.d.ts +2 -0
  55. package/dist/theglobalfuel/pages/MarketplacePage.d.ts.map +1 -0
  56. package/dist/theglobalfuel/pages/MarketplacePage.js +260 -0
  57. package/dist/theglobalfuel/pages/MarketplacePage.js.map +1 -0
  58. package/dist/theglobalfuel/pages/OperationsPage.d.ts +2 -0
  59. package/dist/theglobalfuel/pages/OperationsPage.d.ts.map +1 -0
  60. package/dist/theglobalfuel/pages/OperationsPage.js +190 -0
  61. package/dist/theglobalfuel/pages/OperationsPage.js.map +1 -0
  62. package/dist/theglobalfuel/pages/QualityControlPage.d.ts +2 -0
  63. package/dist/theglobalfuel/pages/QualityControlPage.d.ts.map +1 -0
  64. package/dist/theglobalfuel/pages/QualityControlPage.js +215 -0
  65. package/dist/theglobalfuel/pages/QualityControlPage.js.map +1 -0
  66. package/dist/theglobalfuel/pages/ReportsPage.d.ts +2 -0
  67. package/dist/theglobalfuel/pages/ReportsPage.d.ts.map +1 -0
  68. package/dist/theglobalfuel/pages/ReportsPage.js +247 -0
  69. package/dist/theglobalfuel/pages/ReportsPage.js.map +1 -0
  70. package/dist/theglobalfuel/pages/ResourcesPage.d.ts +2 -0
  71. package/dist/theglobalfuel/pages/ResourcesPage.d.ts.map +1 -0
  72. package/dist/theglobalfuel/pages/ResourcesPage.js +225 -0
  73. package/dist/theglobalfuel/pages/ResourcesPage.js.map +1 -0
  74. package/dist/theglobalfuel/pages/RiskManagementPage.d.ts +2 -0
  75. package/dist/theglobalfuel/pages/RiskManagementPage.d.ts.map +1 -0
  76. package/dist/theglobalfuel/pages/RiskManagementPage.js +230 -0
  77. package/dist/theglobalfuel/pages/RiskManagementPage.js.map +1 -0
  78. package/dist/theglobalfuel/pages/SupplyChainPage.d.ts +2 -0
  79. package/dist/theglobalfuel/pages/SupplyChainPage.d.ts.map +1 -0
  80. package/dist/theglobalfuel/pages/SupplyChainPage.js +214 -0
  81. package/dist/theglobalfuel/pages/SupplyChainPage.js.map +1 -0
  82. package/dist/theglobalfuel/pages/SustainabilityPage.d.ts +2 -0
  83. package/dist/theglobalfuel/pages/SustainabilityPage.d.ts.map +1 -0
  84. package/dist/theglobalfuel/pages/SustainabilityPage.js +261 -0
  85. package/dist/theglobalfuel/pages/SustainabilityPage.js.map +1 -0
  86. package/dist/theglobalfuel/pages/TrainingPage.d.ts +2 -0
  87. package/dist/theglobalfuel/pages/TrainingPage.d.ts.map +1 -0
  88. package/dist/theglobalfuel/pages/TrainingPage.js +253 -0
  89. package/dist/theglobalfuel/pages/TrainingPage.js.map +1 -0
  90. package/dist/theglobalfuel/providers/TheGlobalFuelProvider.d.ts +6 -0
  91. package/dist/theglobalfuel/providers/TheGlobalFuelProvider.d.ts.map +1 -0
  92. package/dist/theglobalfuel/providers/TheGlobalFuelProvider.js +27 -0
  93. package/dist/theglobalfuel/providers/TheGlobalFuelProvider.js.map +1 -0
  94. package/dist/theglobalfuel/store/theglobalfuelStore.d.ts +163 -0
  95. package/dist/theglobalfuel/store/theglobalfuelStore.d.ts.map +1 -0
  96. package/dist/theglobalfuel/store/theglobalfuelStore.js +712 -0
  97. package/dist/theglobalfuel/store/theglobalfuelStore.js.map +1 -0
  98. package/dist/theglobalfuel/types/index.d.ts +51 -0
  99. package/dist/theglobalfuel/types/index.d.ts.map +1 -0
  100. package/dist/theglobalfuel/utils/cn.d.ts +4 -0
  101. package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
  102. package/dist/theglobalfuel/utils/cn.js +10 -0
  103. package/dist/theglobalfuel/utils/cn.js.map +1 -0
  104. package/dist/theglobalfuel/utils/i18n.d.ts +6 -0
  105. package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
  106. package/dist/theglobalfuel/utils/i18n.js +15 -0
  107. package/dist/theglobalfuel/utils/i18n.js.map +1 -0
  108. package/dist/theglobalfuel/utils/navigation.d.ts +2 -0
  109. package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
  110. package/dist/theglobalfuel/utils/navigation.js +8 -0
  111. package/dist/theglobalfuel/utils/navigation.js.map +1 -0
  112. package/package.json +107 -0
@@ -0,0 +1,190 @@
1
+ import { useTheGlobalFuelStore as e } from "../store/theglobalfuelStore.js";
2
+ import { tWithFallback as t } from "../utils/i18n.js";
3
+ import { useI18n as n } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
4
+ import { Activity as r, Factory as i, Gauge as a, TrendingUp as o, Wrench as s } from "lucide-react";
5
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ import { Badge as u, Button as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h, Tabs as g, TabsContent as _, TabsList as v, TabsTrigger as y } from "@burdenoff/fe-libs/ui";
7
+ //#region src/theglobalfuel/pages/OperationsPage.tsx
8
+ function b() {
9
+ let { t: b } = n(), x = (e, n, r) => t(b, e, n, r), { operations: S, facilities: C } = e(), w = S.filter((e) => e.status === "running").length, T = S.filter((e) => e.efficiency > 0), E = T.length > 0 ? T.reduce((e, t) => e + t.efficiency, 0) / T.length : 0, D = (e) => {
10
+ switch (e) {
11
+ case "running": return x("theglobalfuel.operations.status.running", "RUNNING");
12
+ case "scheduled": return x("theglobalfuel.operations.status.scheduled", "SCHEDULED");
13
+ case "completed": return x("theglobalfuel.operations.status.completed", "COMPLETED");
14
+ case "delayed": return x("theglobalfuel.operations.status.delayed", "DELAYED");
15
+ default: return e.toUpperCase();
16
+ }
17
+ }, O = (e) => {
18
+ switch (e) {
19
+ case "operational": return x("theglobalfuel.operations.facilityStatus.operational", "OPERATIONAL");
20
+ case "maintenance": return x("theglobalfuel.operations.facilityStatus.maintenance", "MAINTENANCE");
21
+ case "offline": return x("theglobalfuel.operations.facilityStatus.offline", "OFFLINE");
22
+ default: return e.toUpperCase();
23
+ }
24
+ };
25
+ return /* @__PURE__ */ l("div", {
26
+ className: "space-y-6 p-6",
27
+ children: [
28
+ /* @__PURE__ */ l("div", {
29
+ className: "flex items-center justify-between",
30
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("h1", {
31
+ className: "flex items-center gap-2 text-2xl font-semibold",
32
+ children: [/* @__PURE__ */ c(i, { className: "h-7 w-7 text-blue-600" }), x("theglobalfuel.operations.title", "Refinery & Pipeline Operations")]
33
+ }), /* @__PURE__ */ c("p", {
34
+ className: "mt-1 text-sm text-muted-foreground",
35
+ children: x("theglobalfuel.operations.description", "Crude processing, distillation, pipeline transfers, and storage operations")
36
+ })] }), /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(s, { className: "mr-2 h-4 w-4" }), x("theglobalfuel.operations.actions.scheduleTurnaround", "Schedule Turnaround")] })]
37
+ }),
38
+ /* @__PURE__ */ l("div", {
39
+ className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
40
+ children: [
41
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(m, {
42
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
43
+ children: [/* @__PURE__ */ c(h, {
44
+ className: "text-sm font-medium",
45
+ children: x("theglobalfuel.operations.stats.runningOperations", "Running Operations")
46
+ }), /* @__PURE__ */ c(r, { className: "h-4 w-4 text-green-600" })]
47
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
48
+ className: "text-2xl font-bold",
49
+ children: w
50
+ }), /* @__PURE__ */ c("p", {
51
+ className: "text-xs text-muted-foreground",
52
+ children: x("theglobalfuel.operations.stats.runningOperationsHint", "of {{total}} total", { total: S.length })
53
+ })] })] }),
54
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(m, {
55
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
56
+ children: [/* @__PURE__ */ c(h, {
57
+ className: "text-sm font-medium",
58
+ children: x("theglobalfuel.operations.stats.avgEfficiency", "Avg Efficiency")
59
+ }), /* @__PURE__ */ c(a, { className: "h-4 w-4 text-amber-600" })]
60
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ l("div", {
61
+ className: "text-2xl font-bold",
62
+ children: [E.toFixed(1), "%"]
63
+ }), /* @__PURE__ */ c("p", {
64
+ className: "text-xs text-muted-foreground",
65
+ children: x("theglobalfuel.operations.stats.avgEfficiencyHint", "Across active operations")
66
+ })] })] }),
67
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(m, {
68
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
69
+ children: [/* @__PURE__ */ c(h, {
70
+ className: "text-sm font-medium",
71
+ children: x("theglobalfuel.operations.stats.facilitiesOnline", "Facilities Online")
72
+ }), /* @__PURE__ */ c(i, { className: "h-4 w-4 text-blue-600" })]
73
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
74
+ className: "text-2xl font-bold",
75
+ children: C.filter((e) => e.status === "operational").length
76
+ }), /* @__PURE__ */ c("p", {
77
+ className: "text-xs text-muted-foreground",
78
+ children: x("theglobalfuel.operations.stats.facilitiesOnlineHint", "of {{total}} total", { total: C.length })
79
+ })] })] }),
80
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(m, {
81
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
82
+ children: [/* @__PURE__ */ c(h, {
83
+ className: "text-sm font-medium",
84
+ children: x("theglobalfuel.operations.stats.throughput", "Throughput")
85
+ }), /* @__PURE__ */ c(o, { className: "h-4 w-4 text-cyan-600" })]
86
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
87
+ className: "text-2xl font-bold",
88
+ children: "847K bbl/d"
89
+ }), /* @__PURE__ */ c("p", {
90
+ className: "text-xs text-muted-foreground",
91
+ children: x("theglobalfuel.operations.stats.throughputHint", "+3.2% from last week")
92
+ })] })] })
93
+ ]
94
+ }),
95
+ /* @__PURE__ */ l(g, {
96
+ defaultValue: "operations",
97
+ children: [
98
+ /* @__PURE__ */ l(v, { children: [/* @__PURE__ */ c(y, {
99
+ value: "operations",
100
+ children: x("theglobalfuel.operations.tabs.operations", "Active Operations")
101
+ }), /* @__PURE__ */ c(y, {
102
+ value: "facilities",
103
+ children: x("theglobalfuel.operations.tabs.facilities", "Facilities")
104
+ })] }),
105
+ /* @__PURE__ */ c(_, {
106
+ value: "operations",
107
+ className: "mt-4 space-y-4",
108
+ children: /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, { children: /* @__PURE__ */ c(h, { children: x("theglobalfuel.operations.log.title", "Operations Log") }) }), /* @__PURE__ */ c(p, {
109
+ className: "space-y-3",
110
+ children: S.map((e) => /* @__PURE__ */ l("div", {
111
+ className: "flex items-center justify-between rounded-lg border p-4",
112
+ children: [/* @__PURE__ */ l("div", {
113
+ className: "flex-1",
114
+ children: [/* @__PURE__ */ l("div", {
115
+ className: "mb-1 flex items-center gap-2",
116
+ children: [/* @__PURE__ */ c("p", {
117
+ className: "font-medium",
118
+ children: e.id
119
+ }), /* @__PURE__ */ c(u, {
120
+ variant: "outline",
121
+ className: e.status === "running" ? "text-green-600" : e.status === "delayed" ? "text-red-600" : "text-blue-600",
122
+ children: D(e.status)
123
+ })]
124
+ }), /* @__PURE__ */ l("p", {
125
+ className: "text-sm text-muted-foreground",
126
+ children: [
127
+ e.facility,
128
+ " · ",
129
+ e.type.replace(/_/g, " ")
130
+ ]
131
+ })]
132
+ }), /* @__PURE__ */ l("div", {
133
+ className: "text-right",
134
+ children: [/* @__PURE__ */ c("p", {
135
+ className: "text-sm font-medium",
136
+ children: e.throughput
137
+ }), /* @__PURE__ */ c("p", {
138
+ className: "text-xs text-muted-foreground",
139
+ children: x("theglobalfuel.operations.log.efficiency", "Efficiency: {{value}}%", { value: e.efficiency })
140
+ })]
141
+ })]
142
+ }, e.id))
143
+ })] })
144
+ }),
145
+ /* @__PURE__ */ c(_, {
146
+ value: "facilities",
147
+ className: "mt-4 space-y-4",
148
+ children: /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, { children: /* @__PURE__ */ c(h, { children: x("theglobalfuel.operations.facilities.title", "Facility Overview") }) }), /* @__PURE__ */ c(p, {
149
+ className: "space-y-3",
150
+ children: C.map((e) => /* @__PURE__ */ l("div", {
151
+ className: "flex items-center justify-between rounded-lg border p-4",
152
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("div", {
153
+ className: "mb-1 flex items-center gap-2",
154
+ children: [/* @__PURE__ */ c("p", {
155
+ className: "font-medium",
156
+ children: e.name
157
+ }), /* @__PURE__ */ c(u, {
158
+ variant: "outline",
159
+ className: e.status === "operational" ? "text-green-600" : e.status === "maintenance" ? "text-orange-600" : "text-red-600",
160
+ children: O(e.status)
161
+ })]
162
+ }), /* @__PURE__ */ l("p", {
163
+ className: "text-sm text-muted-foreground",
164
+ children: [
165
+ e.location,
166
+ " · ",
167
+ e.type.replace(/_/g, " ")
168
+ ]
169
+ })] }), /* @__PURE__ */ l("div", {
170
+ className: "text-right",
171
+ children: [/* @__PURE__ */ c("p", {
172
+ className: "text-sm font-medium",
173
+ children: e.capacity
174
+ }), /* @__PURE__ */ c("p", {
175
+ className: "text-xs text-muted-foreground",
176
+ children: x("theglobalfuel.operations.facilities.utilization", "Utilization: {{value}}%", { value: e.utilization })
177
+ })]
178
+ })]
179
+ }, e.id))
180
+ })] })
181
+ })
182
+ ]
183
+ })
184
+ ]
185
+ });
186
+ }
187
+ //#endregion
188
+ export { b as OperationsPage };
189
+
190
+ //# sourceMappingURL=OperationsPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OperationsPage.js","names":[],"sources":["../../../src/theglobalfuel/pages/OperationsPage.tsx"],"sourcesContent":["import { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Badge,\n Button,\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n} from '@burdenoff/fe-libs/ui';\nimport { Factory, Activity, Gauge, Wrench, TrendingUp } from 'lucide-react';\nimport { useTheGlobalFuelStore } from '../store/theglobalfuelStore';\nimport { tWithFallback } from '../utils/i18n';\n\nexport function OperationsPage() {\n const { t } = useI18n();\n const tr = (key: string, fallback: string, params?: Record<string, string | number>): string =>\n tWithFallback(t, key, fallback, params);\n const { operations, facilities } = useTheGlobalFuelStore();\n\n const runningOps = operations.filter((o) => o.status === 'running').length;\n const activeOps = operations.filter((o) => o.efficiency > 0);\n const avgEfficiency =\n activeOps.length > 0 ? activeOps.reduce((a, b) => a + b.efficiency, 0) / activeOps.length : 0;\n\n const operationStatusLabel = (status: string): string => {\n switch (status) {\n case 'running':\n return tr('theglobalfuel.operations.status.running', 'RUNNING');\n case 'scheduled':\n return tr('theglobalfuel.operations.status.scheduled', 'SCHEDULED');\n case 'completed':\n return tr('theglobalfuel.operations.status.completed', 'COMPLETED');\n case 'delayed':\n return tr('theglobalfuel.operations.status.delayed', 'DELAYED');\n default:\n return status.toUpperCase();\n }\n };\n\n const facilityStatusLabel = (status: string): string => {\n switch (status) {\n case 'operational':\n return tr('theglobalfuel.operations.facilityStatus.operational', 'OPERATIONAL');\n case 'maintenance':\n return tr('theglobalfuel.operations.facilityStatus.maintenance', 'MAINTENANCE');\n case 'offline':\n return tr('theglobalfuel.operations.facilityStatus.offline', 'OFFLINE');\n default:\n return status.toUpperCase();\n }\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"flex items-center gap-2 text-2xl font-semibold\">\n <Factory className=\"h-7 w-7 text-blue-600\" />\n {tr('theglobalfuel.operations.title', 'Refinery & Pipeline Operations')}\n </h1>\n <p className=\"mt-1 text-sm text-muted-foreground\">\n {tr(\n 'theglobalfuel.operations.description',\n 'Crude processing, distillation, pipeline transfers, and storage operations'\n )}\n </p>\n </div>\n <Button>\n <Wrench className=\"mr-2 h-4 w-4\" />\n {tr('theglobalfuel.operations.actions.scheduleTurnaround', 'Schedule Turnaround')}\n </Button>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">\n {tr('theglobalfuel.operations.stats.runningOperations', 'Running Operations')}\n </CardTitle>\n <Activity className=\"h-4 w-4 text-green-600\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{runningOps}</div>\n <p className=\"text-xs text-muted-foreground\">\n {tr('theglobalfuel.operations.stats.runningOperationsHint', 'of {{total}} total', {\n total: operations.length,\n })}\n </p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">\n {tr('theglobalfuel.operations.stats.avgEfficiency', 'Avg Efficiency')}\n </CardTitle>\n <Gauge className=\"h-4 w-4 text-amber-600\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{avgEfficiency.toFixed(1)}%</div>\n <p className=\"text-xs text-muted-foreground\">\n {tr('theglobalfuel.operations.stats.avgEfficiencyHint', 'Across active operations')}\n </p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">\n {tr('theglobalfuel.operations.stats.facilitiesOnline', 'Facilities Online')}\n </CardTitle>\n <Factory className=\"h-4 w-4 text-blue-600\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">\n {facilities.filter((f) => f.status === 'operational').length}\n </div>\n <p className=\"text-xs text-muted-foreground\">\n {tr('theglobalfuel.operations.stats.facilitiesOnlineHint', 'of {{total}} total', {\n total: facilities.length,\n })}\n </p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">\n {tr('theglobalfuel.operations.stats.throughput', 'Throughput')}\n </CardTitle>\n <TrendingUp className=\"h-4 w-4 text-cyan-600\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">847K bbl/d</div>\n <p className=\"text-xs text-muted-foreground\">\n {tr('theglobalfuel.operations.stats.throughputHint', '+3.2% from last week')}\n </p>\n </CardContent>\n </Card>\n </div>\n\n <Tabs defaultValue=\"operations\">\n <TabsList>\n <TabsTrigger value=\"operations\">\n {tr('theglobalfuel.operations.tabs.operations', 'Active Operations')}\n </TabsTrigger>\n <TabsTrigger value=\"facilities\">\n {tr('theglobalfuel.operations.tabs.facilities', 'Facilities')}\n </TabsTrigger>\n </TabsList>\n <TabsContent value=\"operations\" className=\"mt-4 space-y-4\">\n <Card>\n <CardHeader>\n <CardTitle>{tr('theglobalfuel.operations.log.title', 'Operations Log')}</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {operations.map((op) => (\n <div\n key={op.id}\n className=\"flex items-center justify-between rounded-lg border p-4\"\n >\n <div className=\"flex-1\">\n <div className=\"mb-1 flex items-center gap-2\">\n <p className=\"font-medium\">{op.id}</p>\n <Badge\n variant=\"outline\"\n className={\n op.status === 'running'\n ? 'text-green-600'\n : op.status === 'delayed'\n ? 'text-red-600'\n : 'text-blue-600'\n }\n >\n {operationStatusLabel(op.status)}\n </Badge>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n {op.facility} &middot; {op.type.replace(/_/g, ' ')}\n </p>\n </div>\n <div className=\"text-right\">\n <p className=\"text-sm font-medium\">{op.throughput}</p>\n <p className=\"text-xs text-muted-foreground\">\n {tr('theglobalfuel.operations.log.efficiency', 'Efficiency: {{value}}%', {\n value: op.efficiency,\n })}\n </p>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </TabsContent>\n <TabsContent value=\"facilities\" className=\"mt-4 space-y-4\">\n <Card>\n <CardHeader>\n <CardTitle>\n {tr('theglobalfuel.operations.facilities.title', 'Facility Overview')}\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {facilities.map((fac) => (\n <div\n key={fac.id}\n className=\"flex items-center justify-between rounded-lg border p-4\"\n >\n <div>\n <div className=\"mb-1 flex items-center gap-2\">\n <p className=\"font-medium\">{fac.name}</p>\n <Badge\n variant=\"outline\"\n className={\n fac.status === 'operational'\n ? 'text-green-600'\n : fac.status === 'maintenance'\n ? 'text-orange-600'\n : 'text-red-600'\n }\n >\n {facilityStatusLabel(fac.status)}\n </Badge>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n {fac.location} &middot; {fac.type.replace(/_/g, ' ')}\n </p>\n </div>\n <div className=\"text-right\">\n <p className=\"text-sm font-medium\">{fac.capacity}</p>\n <p className=\"text-xs text-muted-foreground\">\n {tr(\n 'theglobalfuel.operations.facilities.utilization',\n 'Utilization: {{value}}%',\n { value: fac.utilization }\n )}\n </p>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </TabsContent>\n </Tabs>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAiBA,SAAgB,IAAiB;CAC/B,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,GAAkB,MACzC,EAAc,GAAG,GAAK,GAAU,EAAO,EACnC,EAAE,eAAY,kBAAe,GAAuB,EAEpD,IAAa,EAAW,QAAQ,MAAM,EAAE,WAAW,UAAU,CAAC,QAC9D,IAAY,EAAW,QAAQ,MAAM,EAAE,aAAa,EAAE,EACtD,IACJ,EAAU,SAAS,IAAI,EAAU,QAAQ,GAAG,MAAM,IAAI,EAAE,YAAY,EAAE,GAAG,EAAU,SAAS,GAExF,KAAwB,MAA2B;AACvD,UAAQ,GAAR;GACE,KAAK,UACH,QAAO,EAAG,2CAA2C,UAAU;GACjE,KAAK,YACH,QAAO,EAAG,6CAA6C,YAAY;GACrE,KAAK,YACH,QAAO,EAAG,6CAA6C,YAAY;GACrE,KAAK,UACH,QAAO,EAAG,2CAA2C,UAAU;GACjE,QACE,QAAO,EAAO,aAAa;;IAI3B,KAAuB,MAA2B;AACtD,UAAQ,GAAR;GACE,KAAK,cACH,QAAO,EAAG,uDAAuD,cAAc;GACjF,KAAK,cACH,QAAO,EAAG,uDAAuD,cAAc;GACjF,KAAK,UACH,QAAO,EAAG,mDAAmD,UAAU;GACzE,QACE,QAAO,EAAO,aAAa;;;AAIjC,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAd,CACE,kBAAC,GAAD,EAAS,WAAU,yBAA0B,CAAA,EAC5C,EAAG,kCAAkC,iCAAiC,CACpE;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Af,CACE,kBAAC,KAAD;UAAG,WAAU;oBAAuB,EAAI;UAAa,CAAA,EACrD,kBAAC,KAAD;UAAG,WAAU;oBACV,EACC,mDACA,2BACA,EAAE,OAAO,EAAI,aAAa,CAC3B;UACC,CAAA,CACA;WACF;UAjCC,EAAI,GAiCL,CACN;OACU,CAAA,CACT,EAAA,CAAA;MACK,CAAA;KACT;;GACH"}
@@ -0,0 +1,2 @@
1
+ export declare function QualityControlPage(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=QualityControlPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QualityControlPage.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/pages/QualityControlPage.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,kBAAkB,4CA+KjC"}
@@ -0,0 +1,215 @@
1
+ import { useTheGlobalFuelStore as e } from "../store/theglobalfuelStore.js";
2
+ import { AlertTriangle as t, Award as n, CheckCircle as r, FileCheck as i, Microscope as a, TrendingUp as o, XCircle as s } from "lucide-react";
3
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { Badge as u, Button as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h, Tabs as g, TabsContent as _, TabsList as v, TabsTrigger as y } from "@burdenoff/fe-libs/ui";
5
+ //#region src/theglobalfuel/pages/QualityControlPage.tsx
6
+ function b() {
7
+ let { qualityTests: b } = e(), x = (b.filter((e) => e.status === "passed").length / b.length * 100).toFixed(1);
8
+ return /* @__PURE__ */ l("div", {
9
+ className: "space-y-6 p-6",
10
+ children: [
11
+ /* @__PURE__ */ l("div", {
12
+ className: "flex items-center justify-between",
13
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("h1", {
14
+ className: "flex items-center gap-2 text-2xl font-semibold",
15
+ children: [/* @__PURE__ */ c(a, { className: "h-7 w-7 text-blue-600" }), "Quality Control & Testing"]
16
+ }), /* @__PURE__ */ c("p", {
17
+ className: "mt-1 text-sm text-muted-foreground",
18
+ children: "Petroleum product lab results, ASTM standards, and certification management"
19
+ })] }), /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(i, { className: "mr-2 h-4 w-4" }), "New Test"] })]
20
+ }),
21
+ /* @__PURE__ */ l("div", {
22
+ className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
23
+ children: [
24
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(m, {
25
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
26
+ children: [/* @__PURE__ */ c(h, {
27
+ className: "text-sm font-medium",
28
+ children: "Pass Rate"
29
+ }), /* @__PURE__ */ c(o, { className: "h-4 w-4 text-green-600" })]
30
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ l("div", {
31
+ className: "text-2xl font-bold",
32
+ children: [x, "%"]
33
+ }), /* @__PURE__ */ c("p", {
34
+ className: "text-xs text-muted-foreground",
35
+ children: "+1.2% from last month"
36
+ })] })] }),
37
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(m, {
38
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
39
+ children: [/* @__PURE__ */ c(h, {
40
+ className: "text-sm font-medium",
41
+ children: "Total Tests"
42
+ }), /* @__PURE__ */ c(a, { className: "h-4 w-4 text-blue-600" })]
43
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
44
+ className: "text-2xl font-bold",
45
+ children: b.length
46
+ }), /* @__PURE__ */ c("p", {
47
+ className: "text-xs text-muted-foreground",
48
+ children: "This period"
49
+ })] })] }),
50
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(m, {
51
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
52
+ children: [/* @__PURE__ */ c(h, {
53
+ className: "text-sm font-medium",
54
+ children: "Certifications"
55
+ }), /* @__PURE__ */ c(n, { className: "h-4 w-4 text-purple-600" })]
56
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
57
+ className: "text-2xl font-bold",
58
+ children: "4"
59
+ }), /* @__PURE__ */ c("p", {
60
+ className: "text-xs text-muted-foreground",
61
+ children: "ASTM, EPA, ISO active"
62
+ })] })] }),
63
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ l(m, {
64
+ className: "flex flex-row items-center justify-between space-y-0 pb-2",
65
+ children: [/* @__PURE__ */ c(h, {
66
+ className: "text-sm font-medium",
67
+ children: "Avg Test Time"
68
+ }), /* @__PURE__ */ c(a, { className: "h-4 w-4 text-orange-600" })]
69
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
70
+ className: "text-2xl font-bold",
71
+ children: "3.2 hrs"
72
+ }), /* @__PURE__ */ c("p", {
73
+ className: "text-xs text-muted-foreground",
74
+ children: "Per sample"
75
+ })] })] })
76
+ ]
77
+ }),
78
+ /* @__PURE__ */ l(g, {
79
+ defaultValue: "tests",
80
+ children: [
81
+ /* @__PURE__ */ l(v, { children: [/* @__PURE__ */ c(y, {
82
+ value: "tests",
83
+ children: "Lab Tests"
84
+ }), /* @__PURE__ */ c(y, {
85
+ value: "certs",
86
+ children: "Certifications"
87
+ })] }),
88
+ /* @__PURE__ */ c(_, {
89
+ value: "tests",
90
+ className: "mt-4",
91
+ children: /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, { children: /* @__PURE__ */ c(h, { children: "Recent Test Results" }) }), /* @__PURE__ */ c(p, {
92
+ className: "space-y-6",
93
+ children: b.map((e) => /* @__PURE__ */ l("div", {
94
+ className: `rounded-lg border-2 p-4 ${e.status === "passed" ? "border-green-200 bg-green-50" : e.status === "warning" ? "border-yellow-200 bg-yellow-50" : "border-red-200 bg-red-50"}`,
95
+ children: [/* @__PURE__ */ c("div", {
96
+ className: "mb-3 flex items-start justify-between",
97
+ children: /* @__PURE__ */ l("div", { children: [
98
+ /* @__PURE__ */ l("div", {
99
+ className: "mb-1 flex items-center gap-2",
100
+ children: [/* @__PURE__ */ c("h4", {
101
+ className: "font-semibold",
102
+ children: e.id
103
+ }), /* @__PURE__ */ l(u, {
104
+ variant: "outline",
105
+ className: e.status === "passed" ? "text-green-600" : e.status === "warning" ? "text-yellow-600" : "text-red-600",
106
+ children: [
107
+ e.status === "passed" && /* @__PURE__ */ c(r, { className: "mr-1 h-3 w-3" }),
108
+ e.status === "warning" && /* @__PURE__ */ c(t, { className: "mr-1 h-3 w-3" }),
109
+ e.status === "failed" && /* @__PURE__ */ c(s, { className: "mr-1 h-3 w-3" }),
110
+ e.status.toUpperCase()
111
+ ]
112
+ })]
113
+ }),
114
+ /* @__PURE__ */ l("p", {
115
+ className: "text-sm text-muted-foreground",
116
+ children: [
117
+ "Batch: ",
118
+ e.batchId,
119
+ " · ",
120
+ e.product
121
+ ]
122
+ }),
123
+ /* @__PURE__ */ l("p", {
124
+ className: "text-xs text-muted-foreground",
125
+ children: [
126
+ e.testDate,
127
+ " · ",
128
+ e.technician
129
+ ]
130
+ })
131
+ ] })
132
+ }), /* @__PURE__ */ c("div", {
133
+ className: "grid grid-cols-2 gap-3 md:grid-cols-4",
134
+ children: Object.entries(e.metrics).map(([e, n]) => /* @__PURE__ */ l("div", {
135
+ className: `rounded border p-3 ${n.result === "pass" ? "border-green-200" : n.result === "warning" ? "border-yellow-200" : "border-red-200"}`,
136
+ children: [
137
+ /* @__PURE__ */ l("div", {
138
+ className: "mb-1 flex items-start justify-between",
139
+ children: [/* @__PURE__ */ c("span", {
140
+ className: "text-xs capitalize text-muted-foreground",
141
+ children: e.replace(/([A-Z])/g, " $1")
142
+ }), n.result === "pass" ? /* @__PURE__ */ c(r, { className: "h-4 w-4 text-green-600" }) : n.result === "warning" ? /* @__PURE__ */ c(t, { className: "h-4 w-4 text-yellow-600" }) : /* @__PURE__ */ c(s, { className: "h-4 w-4 text-red-600" })]
143
+ }),
144
+ /* @__PURE__ */ l("div", {
145
+ className: "text-lg font-bold",
146
+ children: [
147
+ n.value,
148
+ " ",
149
+ n.unit
150
+ ]
151
+ }),
152
+ /* @__PURE__ */ l("div", {
153
+ className: "text-xs text-muted-foreground",
154
+ children: ["Spec: ", n.spec]
155
+ })
156
+ ]
157
+ }, e))
158
+ })]
159
+ }, e.id))
160
+ })] })
161
+ }),
162
+ /* @__PURE__ */ c(_, {
163
+ value: "certs",
164
+ className: "mt-4",
165
+ children: /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, { children: /* @__PURE__ */ c(h, { children: "Active Certifications" }) }), /* @__PURE__ */ c(p, {
166
+ className: "space-y-3",
167
+ children: [
168
+ {
169
+ name: "ASTM D975 (Diesel)",
170
+ status: "Active",
171
+ expiry: "2026-01-15"
172
+ },
173
+ {
174
+ name: "ASTM D4814 (Gasoline)",
175
+ status: "Active",
176
+ expiry: "2026-03-20"
177
+ },
178
+ {
179
+ name: "ASTM D1655 (Jet Fuel)",
180
+ status: "Active",
181
+ expiry: "2025-06-10"
182
+ },
183
+ {
184
+ name: "EPA Tier 3 Compliance",
185
+ status: "Renewal Pending",
186
+ expiry: "2025-09-01"
187
+ }
188
+ ].map((e) => /* @__PURE__ */ l("div", {
189
+ className: "flex items-center justify-between rounded-lg border p-4",
190
+ children: [/* @__PURE__ */ l("div", {
191
+ className: "flex items-center gap-3",
192
+ children: [/* @__PURE__ */ c(n, { className: "h-6 w-6 text-purple-600" }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
193
+ className: "font-semibold",
194
+ children: e.name
195
+ }), /* @__PURE__ */ l("p", {
196
+ className: "text-xs text-muted-foreground",
197
+ children: ["Expires: ", e.expiry]
198
+ })] })]
199
+ }), /* @__PURE__ */ c(u, {
200
+ variant: "outline",
201
+ className: e.status === "Active" ? "text-green-600" : "text-orange-600",
202
+ children: e.status.toUpperCase()
203
+ })]
204
+ }, e.name))
205
+ })] })
206
+ })
207
+ ]
208
+ })
209
+ ]
210
+ });
211
+ }
212
+ //#endregion
213
+ export { b as QualityControlPage };
214
+
215
+ //# sourceMappingURL=QualityControlPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QualityControlPage.js","names":[],"sources":["../../../src/theglobalfuel/pages/QualityControlPage.tsx"],"sourcesContent":["import {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Badge,\n Button,\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n} from '@burdenoff/fe-libs/ui';\nimport {\n Microscope,\n CheckCircle,\n XCircle,\n AlertTriangle,\n TrendingUp,\n Award,\n FileCheck,\n} from 'lucide-react';\nimport { useTheGlobalFuelStore } from '../store/theglobalfuelStore';\n\nexport function QualityControlPage() {\n const { qualityTests } = useTheGlobalFuelStore();\n const passed = qualityTests.filter((t) => t.status === 'passed').length;\n const passRate = ((passed / qualityTests.length) * 100).toFixed(1);\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"flex items-center gap-2 text-2xl font-semibold\">\n <Microscope className=\"h-7 w-7 text-blue-600\" />\n Quality Control &amp; Testing\n </h1>\n <p className=\"mt-1 text-sm text-muted-foreground\">\n Petroleum product lab results, ASTM standards, and certification management\n </p>\n </div>\n <Button>\n <FileCheck className=\"mr-2 h-4 w-4\" />\n New Test\n </Button>\n </div>\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-4\">\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Pass Rate</CardTitle>\n <TrendingUp className=\"h-4 w-4 text-green-600\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{passRate}%</div>\n <p className=\"text-xs text-muted-foreground\">+1.2% from last month</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Total Tests</CardTitle>\n <Microscope className=\"h-4 w-4 text-blue-600\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">{qualityTests.length}</div>\n <p className=\"text-xs text-muted-foreground\">This period</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Certifications</CardTitle>\n <Award className=\"h-4 w-4 text-purple-600\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">4</div>\n <p className=\"text-xs text-muted-foreground\">ASTM, EPA, ISO active</p>\n </CardContent>\n </Card>\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0 pb-2\">\n <CardTitle className=\"text-sm font-medium\">Avg Test Time</CardTitle>\n <Microscope className=\"h-4 w-4 text-orange-600\" />\n </CardHeader>\n <CardContent>\n <div className=\"text-2xl font-bold\">3.2 hrs</div>\n <p className=\"text-xs text-muted-foreground\">Per sample</p>\n </CardContent>\n </Card>\n </div>\n <Tabs defaultValue=\"tests\">\n <TabsList>\n <TabsTrigger value=\"tests\">Lab Tests</TabsTrigger>\n <TabsTrigger value=\"certs\">Certifications</TabsTrigger>\n </TabsList>\n <TabsContent value=\"tests\" className=\"mt-4\">\n <Card>\n <CardHeader>\n <CardTitle>Recent Test Results</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-6\">\n {qualityTests.map((test) => (\n <div\n key={test.id}\n className={`rounded-lg border-2 p-4 ${test.status === 'passed' ? 'border-green-200 bg-green-50' : test.status === 'warning' ? 'border-yellow-200 bg-yellow-50' : 'border-red-200 bg-red-50'}`}\n >\n <div className=\"mb-3 flex items-start justify-between\">\n <div>\n <div className=\"mb-1 flex items-center gap-2\">\n <h4 className=\"font-semibold\">{test.id}</h4>\n <Badge\n variant=\"outline\"\n className={\n test.status === 'passed'\n ? 'text-green-600'\n : test.status === 'warning'\n ? 'text-yellow-600'\n : 'text-red-600'\n }\n >\n {test.status === 'passed' && <CheckCircle className=\"mr-1 h-3 w-3\" />}\n {test.status === 'warning' && <AlertTriangle className=\"mr-1 h-3 w-3\" />}\n {test.status === 'failed' && <XCircle className=\"mr-1 h-3 w-3\" />}\n {test.status.toUpperCase()}\n </Badge>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n Batch: {test.batchId} &middot; {test.product}\n </p>\n <p className=\"text-xs text-muted-foreground\">\n {test.testDate} &middot; {test.technician}\n </p>\n </div>\n </div>\n <div className=\"grid grid-cols-2 gap-3 md:grid-cols-4\">\n {Object.entries(test.metrics).map(([key, m]) => (\n <div\n key={key}\n className={`rounded border p-3 ${m.result === 'pass' ? 'border-green-200' : m.result === 'warning' ? 'border-yellow-200' : 'border-red-200'}`}\n >\n <div className=\"mb-1 flex items-start justify-between\">\n <span className=\"text-xs capitalize text-muted-foreground\">\n {key.replace(/([A-Z])/g, ' $1')}\n </span>\n {m.result === 'pass' ? (\n <CheckCircle className=\"h-4 w-4 text-green-600\" />\n ) : m.result === 'warning' ? (\n <AlertTriangle className=\"h-4 w-4 text-yellow-600\" />\n ) : (\n <XCircle className=\"h-4 w-4 text-red-600\" />\n )}\n </div>\n <div className=\"text-lg font-bold\">\n {m.value} {m.unit}\n </div>\n <div className=\"text-xs text-muted-foreground\">Spec: {m.spec}</div>\n </div>\n ))}\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n </TabsContent>\n <TabsContent value=\"certs\" className=\"mt-4\">\n <Card>\n <CardHeader>\n <CardTitle>Active Certifications</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {[\n { name: 'ASTM D975 (Diesel)', status: 'Active', expiry: '2026-01-15' },\n { name: 'ASTM D4814 (Gasoline)', status: 'Active', expiry: '2026-03-20' },\n { name: 'ASTM D1655 (Jet Fuel)', status: 'Active', expiry: '2025-06-10' },\n { name: 'EPA Tier 3 Compliance', status: 'Renewal Pending', expiry: '2025-09-01' },\n ].map((c) => (\n <div\n key={c.name}\n className=\"flex items-center justify-between rounded-lg border p-4\"\n >\n <div className=\"flex items-center gap-3\">\n <Award className=\"h-6 w-6 text-purple-600\" />\n <div>\n <p className=\"font-semibold\">{c.name}</p>\n <p className=\"text-xs text-muted-foreground\">Expires: {c.expiry}</p>\n </div>\n </div>\n <Badge\n variant=\"outline\"\n className={c.status === 'Active' ? 'text-green-600' : 'text-orange-600'}\n >\n {c.status.toUpperCase()}\n </Badge>\n </div>\n ))}\n </CardContent>\n </Card>\n </TabsContent>\n </Tabs>\n </div>\n );\n}\n"],"mappings":";;;;;AAuBA,SAAgB,IAAqB;CACnC,IAAM,EAAE,oBAAiB,GAAuB,EAE1C,KADS,EAAa,QAAQ,MAAM,EAAE,WAAW,SAAS,CAAC,SACrC,EAAa,SAAU,KAAK,QAAQ,EAAE;AAElE,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAd,CACE,kBAAC,GAAD,EAAY,WAAU,yBAA0B,CAAA,EAAA,4BAE7C;QACL,kBAAC,KAAD;KAAG,WAAU;eAAqC;KAE9C,CAAA,CACA,EAAA,CAAA,EACN,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAW,WAAU,gBAAiB,CAAA,EAAA,WAE/B,EAAA,CAAA,CACL;;GACN,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;MAAY,WAAU;gBAAtB,CACE,kBAAC,GAAD;OAAW,WAAU;iBAAsB;OAAqB,CAAA,EAChE,kBAAC,GAAD,EAAY,WAAU,0BAA2B,CAAA,CACtC;SACb,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CAAqC,GAAS,IAAO;SACrD,kBAAC,KAAD;MAAG,WAAU;gBAAgC;MAAyB,CAAA,CAC1D,EAAA,CAAA,CACT,EAAA,CAAA;KACP,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;MAAY,WAAU;gBAAtB,CACE,kBAAC,GAAD;OAAW,WAAU;iBAAsB;OAAuB,CAAA,EAClE,kBAAC,GAAD,EAAY,WAAU,yBAA0B,CAAA,C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sPage(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=ReportsPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReportsPage.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/pages/ReportsPage.tsx"],"names":[],"mappings":"AA8FA,wBAAgB,WAAW,4CA4I1B"}