@burdenoff/microfe-ecoimpacthub 2026.704.3 → 2026.704.5
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/ecoimpacthub/pages/DashboardPage.js +345 -189
- package/dist/ecoimpacthub/pages/DashboardPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js +58 -0
- package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js +70 -0
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/MethodBadge.js +51 -0
- package/dist/ecoimpacthub/pages/_shared/MethodBadge.js.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/TaxonChip.js +29 -0
- package/dist/ecoimpacthub/pages/_shared/TaxonChip.js.map +1 -0
- package/dist/ecoimpacthub/pages/badges.js +71 -0
- package/dist/ecoimpacthub/pages/badges.js.map +1 -0
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.js +341 -300
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/carbonVisuals.js +89 -0
- package/dist/ecoimpacthub/pages/carbonVisuals.js.map +1 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js +252 -218
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js +15 -12
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js +168 -0
- package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js.map +1 -0
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js +30 -17
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.js +236 -219
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js +248 -212
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/reports/ReportsPage.js +119 -118
- package/dist/ecoimpacthub/pages/reports/ReportsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js +498 -370
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/SitesPage.js +109 -99
- package/dist/ecoimpacthub/pages/sites/SitesPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js +64 -0
- package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js.map +1 -0
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js +275 -259
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/species/SpeciesPage.js +235 -177
- package/dist/ecoimpacthub/pages/species/SpeciesPage.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +305 -0
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js.map +1 -0
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +44 -33
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ChartUtils.js +31 -23
- package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { PageLayout as e } from "../../components/PageLayout.js";
|
|
2
2
|
import { MetricsCard as t } from "../../components/MetricsCard.js";
|
|
3
|
-
import { formatCo2e as n, formatDate as
|
|
4
|
-
import { StatusBadge as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { useEcoCarbonEntries as
|
|
9
|
-
import { useCursorPager as
|
|
3
|
+
import { formatCo2e as n, formatDate as r, formatEnumLabel as i, formatNumber as a, formatPercent as o } from "../../utils/formatters.js";
|
|
4
|
+
import { StatusBadge as s } from "../../components/StatusBadge.js";
|
|
5
|
+
import { ErrorView as c, LoadingView as l } from "../../components/StateViews.js";
|
|
6
|
+
import { EmptyState as ee } from "../../components/EmptyState.js";
|
|
7
|
+
import { Meter as te, SCOPE_HUE as ne, ScopeSplitBar as re } from "../carbonVisuals.js";
|
|
8
|
+
import { useEcoCarbonEntries as ie, useEcoCarbonTotals as ae, useEcoCreateEmissionFactor as oe, useEcoCreateReductionTarget as se, useEcoEmissionFactors as ce, useEcoRecordCarbonEntry as le, useEcoReductionTargets as ue, useEcoSetReductionTargetStatus as de, useEcoSites as fe, useEcoVerifyCarbonEntry as pe } from "../../hooks/useEcoImpactHubApi.js";
|
|
9
|
+
import { useCursorPager as me } from "../../hooks/useCursorPager.js";
|
|
10
10
|
import "../../hooks/index.js";
|
|
11
|
-
import { DataTable as
|
|
12
|
-
import { Tabs as
|
|
13
|
-
import { Pagination as
|
|
14
|
-
import { useMemo as
|
|
15
|
-
import { Factory as
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import { Button as
|
|
11
|
+
import { DataTable as u } from "../../components/DataTable.js";
|
|
12
|
+
import { Tabs as he } from "../../components/Tabs.js";
|
|
13
|
+
import { Pagination as ge } from "../../components/Pagination.js";
|
|
14
|
+
import { useMemo as _e, useState as d } from "react";
|
|
15
|
+
import { Factory as f, Flame as ve, Leaf as ye, Plus as p, Target as be, Truck as xe, Zap as Se } from "lucide-react";
|
|
16
|
+
import { Fragment as Ce, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
17
|
+
import { Button as g, Input as _, Label as v, ResponsiveDialog as we, ResponsiveDialogContent as y, ResponsiveDialogDescription as Te, ResponsiveDialogFooter as b, ResponsiveDialogHeader as x, ResponsiveDialogTitle as S, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D, Textarea as Ee } from "@burdenoff/fe-libs/ui";
|
|
18
18
|
//#region src/ecoimpacthub/pages/carbon/CarbonPage.tsx
|
|
19
19
|
var O = [
|
|
20
20
|
"SCOPE_1",
|
|
21
21
|
"SCOPE_2",
|
|
22
22
|
"SCOPE_3"
|
|
23
|
-
],
|
|
23
|
+
], De = [
|
|
24
24
|
"DRAFT",
|
|
25
25
|
"RECORDED",
|
|
26
26
|
"VERIFIED",
|
|
27
27
|
"ADJUSTED"
|
|
28
|
-
],
|
|
28
|
+
], Oe = [
|
|
29
29
|
"PROPOSED",
|
|
30
30
|
"ACTIVE",
|
|
31
31
|
"ACHIEVED",
|
|
32
32
|
"MISSED",
|
|
33
33
|
"RETIRED"
|
|
34
|
-
],
|
|
34
|
+
], ke = 25, Ae = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), k = {
|
|
35
35
|
category: "",
|
|
36
36
|
scope: "SCOPE_1",
|
|
37
37
|
activityValue: "",
|
|
@@ -56,60 +56,80 @@ var O = [
|
|
|
56
56
|
targetYear: "",
|
|
57
57
|
unit: "",
|
|
58
58
|
description: ""
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
}, je = (e) => Math.max(0, Math.min(100, e)), Me = {
|
|
60
|
+
PROPOSED: "var(--color-text-tertiary)",
|
|
61
|
+
ACTIVE: "var(--color-action-primary-bg)",
|
|
62
|
+
ACHIEVED: "var(--color-status-success-text)",
|
|
63
|
+
MISSED: "var(--color-status-error-text)",
|
|
64
|
+
RETIRED: "var(--color-text-tertiary)"
|
|
65
|
+
}, M = (e, t, n) => {
|
|
66
|
+
if (e == null || t == null || t <= 0) return;
|
|
67
|
+
let r = e / t * 100;
|
|
68
|
+
return /* @__PURE__ */ h("div", {
|
|
69
|
+
className: "space-y-2",
|
|
70
|
+
children: [/* @__PURE__ */ m(te, {
|
|
71
|
+
value: r,
|
|
72
|
+
color: ne[n],
|
|
73
|
+
height: 4
|
|
74
|
+
}), /* @__PURE__ */ h("p", {
|
|
75
|
+
className: "text-xs tabular-nums text-text-tertiary",
|
|
76
|
+
children: [o(r), " of total"]
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
function N() {
|
|
81
|
+
let [o, ne] = d("ledger"), [N, Ne] = d("ALL"), [P, Pe] = d("ALL"), [F, Fe] = d("ALL"), I = me(), [L, Ie] = d("ALL"), [R, Le] = d("ALL"), [Re, z] = d(!1), [B, V] = d(k), [ze, H] = d(!1), [U, W] = d(A), [Be, G] = d(!1), [K, q] = d(j), [J, Y] = d(null), Ve = fe({ pagination: {
|
|
62
82
|
limit: 100,
|
|
63
83
|
offset: 0
|
|
64
|
-
} }),
|
|
84
|
+
} }), He = _e(() => {
|
|
65
85
|
let e = {};
|
|
66
|
-
for (let t of
|
|
86
|
+
for (let t of Ve.data?.items ?? []) e[t.id] = t.name;
|
|
67
87
|
return e;
|
|
68
|
-
}, [
|
|
88
|
+
}, [Ve.data]), X = ae(), Z = ie({
|
|
69
89
|
scope: N === "ALL" ? void 0 : N,
|
|
70
90
|
siteId: F === "ALL" ? void 0 : F,
|
|
71
91
|
status: P === "ALL" ? void 0 : P,
|
|
72
92
|
pagination: {
|
|
73
|
-
limit:
|
|
93
|
+
limit: ke,
|
|
74
94
|
cursor: I.cursor
|
|
75
95
|
}
|
|
76
|
-
}),
|
|
96
|
+
}), Ue = Z.data?.items ?? [], We = ce(), Q = ce(L === "ALL" ? void 0 : L), Ge = Q.data ?? [], $ = ue(R === "ALL" ? void 0 : R), Ke = $.data ?? [], qe = le(), Je = pe(), Ye = oe(), Xe = se(), Ze = de(), Qe = () => {
|
|
77
97
|
V({
|
|
78
98
|
...k,
|
|
79
|
-
periodStart:
|
|
99
|
+
periodStart: Ae()
|
|
80
100
|
}), Y(null), z(!0);
|
|
81
|
-
},
|
|
101
|
+
}, $e = () => {
|
|
82
102
|
W(A), Y(null), H(!0);
|
|
83
|
-
},
|
|
103
|
+
}, et = () => {
|
|
84
104
|
q(j), Y(null), G(!0);
|
|
85
|
-
},
|
|
105
|
+
}, tt = async () => {
|
|
86
106
|
if (!B.category.trim() || !B.activityValue || !B.activityUnit.trim()) {
|
|
87
107
|
Y("Category, activity value and unit are required.");
|
|
88
108
|
return;
|
|
89
109
|
}
|
|
90
110
|
Y(null);
|
|
91
111
|
try {
|
|
92
|
-
await
|
|
112
|
+
await qe.mutateAsync({
|
|
93
113
|
category: B.category.trim(),
|
|
94
114
|
scope: B.scope,
|
|
95
115
|
activityValue: Number(B.activityValue),
|
|
96
116
|
activityUnit: B.activityUnit.trim(),
|
|
97
117
|
factorId: B.factorId || null,
|
|
98
118
|
siteId: B.siteId || null,
|
|
99
|
-
periodStart: new Date(B.periodStart ||
|
|
119
|
+
periodStart: new Date(B.periodStart || Ae()).toISOString(),
|
|
100
120
|
notes: B.notes.trim() || null
|
|
101
121
|
}), z(!1), V(k);
|
|
102
122
|
} catch (e) {
|
|
103
123
|
Y(e instanceof Error ? e.message : "Failed to record carbon entry.");
|
|
104
124
|
}
|
|
105
|
-
},
|
|
125
|
+
}, nt = async () => {
|
|
106
126
|
if (!U.name.trim() || !U.activityUnit.trim() || !U.factorKgco2e) {
|
|
107
127
|
Y("Name, activity unit and factor value are required.");
|
|
108
128
|
return;
|
|
109
129
|
}
|
|
110
130
|
Y(null);
|
|
111
131
|
try {
|
|
112
|
-
await
|
|
132
|
+
await Ye.mutateAsync({
|
|
113
133
|
name: U.name.trim(),
|
|
114
134
|
scope: U.scope,
|
|
115
135
|
activityUnit: U.activityUnit.trim(),
|
|
@@ -120,14 +140,18 @@ function M() {
|
|
|
120
140
|
} catch (e) {
|
|
121
141
|
Y(e instanceof Error ? e.message : "Failed to create emission factor.");
|
|
122
142
|
}
|
|
123
|
-
},
|
|
143
|
+
}, rt = async () => {
|
|
124
144
|
if (!K.name.trim() || !K.metric.trim() || !K.baselineValue || !K.baselineYear || !K.targetValue || !K.targetYear || !K.unit.trim()) {
|
|
125
145
|
Y("All fields except description are required.");
|
|
126
146
|
return;
|
|
127
147
|
}
|
|
148
|
+
if (Number(K.targetYear) <= Number(K.baselineYear)) {
|
|
149
|
+
Y("Target year must be later than the baseline year.");
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
128
152
|
Y(null);
|
|
129
153
|
try {
|
|
130
|
-
await
|
|
154
|
+
await Xe.mutateAsync({
|
|
131
155
|
name: K.name.trim(),
|
|
132
156
|
metric: K.metric.trim(),
|
|
133
157
|
baselineValue: Number(K.baselineValue),
|
|
@@ -140,11 +164,11 @@ function M() {
|
|
|
140
164
|
} catch (e) {
|
|
141
165
|
Y(e instanceof Error ? e.message : "Failed to create reduction target.");
|
|
142
166
|
}
|
|
143
|
-
},
|
|
167
|
+
}, it = [
|
|
144
168
|
{
|
|
145
169
|
key: "category",
|
|
146
170
|
header: "Category",
|
|
147
|
-
render: (e) => /* @__PURE__ */
|
|
171
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
148
172
|
className: "font-medium text-text-primary",
|
|
149
173
|
children: e.category
|
|
150
174
|
})
|
|
@@ -152,7 +176,7 @@ function M() {
|
|
|
152
176
|
{
|
|
153
177
|
key: "scope",
|
|
154
178
|
header: "Scope",
|
|
155
|
-
render: (e) => /* @__PURE__ */
|
|
179
|
+
render: (e) => /* @__PURE__ */ m(s, { status: e.scope })
|
|
156
180
|
},
|
|
157
181
|
{
|
|
158
182
|
key: "activity",
|
|
@@ -160,10 +184,10 @@ function M() {
|
|
|
160
184
|
align: "right",
|
|
161
185
|
hideOnMobile: !0,
|
|
162
186
|
sortValue: (e) => e.activityValue,
|
|
163
|
-
render: (e) => /* @__PURE__ */
|
|
187
|
+
render: (e) => /* @__PURE__ */ h("span", {
|
|
164
188
|
className: "tabular-nums text-text-secondary",
|
|
165
189
|
children: [
|
|
166
|
-
|
|
190
|
+
a(e.activityValue),
|
|
167
191
|
" ",
|
|
168
192
|
e.activityUnit
|
|
169
193
|
]
|
|
@@ -174,7 +198,7 @@ function M() {
|
|
|
174
198
|
header: "CO₂e",
|
|
175
199
|
align: "right",
|
|
176
200
|
sortValue: (e) => e.co2eKg,
|
|
177
|
-
render: (e) => /* @__PURE__ */
|
|
201
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
178
202
|
className: "tabular-nums font-medium text-text-primary",
|
|
179
203
|
children: n(e.co2eKg)
|
|
180
204
|
})
|
|
@@ -182,23 +206,23 @@ function M() {
|
|
|
182
206
|
{
|
|
183
207
|
key: "status",
|
|
184
208
|
header: "Status",
|
|
185
|
-
render: (e) => /* @__PURE__ */
|
|
209
|
+
render: (e) => /* @__PURE__ */ m(s, { status: e.status })
|
|
186
210
|
},
|
|
187
211
|
{
|
|
188
212
|
key: "period",
|
|
189
213
|
header: "Period",
|
|
190
214
|
align: "right",
|
|
191
215
|
hideOnMobile: !0,
|
|
192
|
-
render: (e) => /* @__PURE__ */
|
|
216
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
193
217
|
className: "text-text-tertiary",
|
|
194
|
-
children:
|
|
218
|
+
children: r(e.periodStart)
|
|
195
219
|
})
|
|
196
220
|
},
|
|
197
221
|
{
|
|
198
222
|
key: "factor",
|
|
199
223
|
header: "Factor",
|
|
200
224
|
hideOnMobile: !0,
|
|
201
|
-
render: (e) => /* @__PURE__ */
|
|
225
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
202
226
|
className: "text-text-secondary",
|
|
203
227
|
children: e.factor?.name ?? "—"
|
|
204
228
|
})
|
|
@@ -207,19 +231,19 @@ function M() {
|
|
|
207
231
|
key: "verify",
|
|
208
232
|
header: "",
|
|
209
233
|
align: "right",
|
|
210
|
-
render: (e) => e.status === "VERIFIED" ? null : /* @__PURE__ */
|
|
234
|
+
render: (e) => e.status === "VERIFIED" ? null : /* @__PURE__ */ m(g, {
|
|
211
235
|
size: "sm",
|
|
212
236
|
variant: "outline",
|
|
213
|
-
onClick: () =>
|
|
214
|
-
disabled:
|
|
237
|
+
onClick: () => Je.mutate(e.id),
|
|
238
|
+
disabled: Je.isPending,
|
|
215
239
|
children: "Verify"
|
|
216
240
|
})
|
|
217
241
|
}
|
|
218
|
-
],
|
|
242
|
+
], at = [
|
|
219
243
|
{
|
|
220
244
|
key: "name",
|
|
221
245
|
header: "Factor",
|
|
222
|
-
render: (e) => /* @__PURE__ */
|
|
246
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
223
247
|
className: "font-medium text-text-primary",
|
|
224
248
|
children: e.name
|
|
225
249
|
})
|
|
@@ -227,7 +251,7 @@ function M() {
|
|
|
227
251
|
{
|
|
228
252
|
key: "scope",
|
|
229
253
|
header: "Scope",
|
|
230
|
-
render: (e) => /* @__PURE__ */
|
|
254
|
+
render: (e) => /* @__PURE__ */ m(s, { status: e.scope })
|
|
231
255
|
},
|
|
232
256
|
{
|
|
233
257
|
key: "value",
|
|
@@ -235,10 +259,10 @@ function M() {
|
|
|
235
259
|
align: "right",
|
|
236
260
|
hideOnMobile: !0,
|
|
237
261
|
sortValue: (e) => e.factorKgco2e,
|
|
238
|
-
render: (e) => /* @__PURE__ */
|
|
262
|
+
render: (e) => /* @__PURE__ */ h("span", {
|
|
239
263
|
className: "tabular-nums text-text-secondary",
|
|
240
264
|
children: [
|
|
241
|
-
|
|
265
|
+
a(e.factorKgco2e),
|
|
242
266
|
" kg/",
|
|
243
267
|
e.activityUnit
|
|
244
268
|
]
|
|
@@ -248,7 +272,7 @@ function M() {
|
|
|
248
272
|
key: "source",
|
|
249
273
|
header: "Source",
|
|
250
274
|
hideOnMobile: !0,
|
|
251
|
-
render: (e) => /* @__PURE__ */
|
|
275
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
252
276
|
className: "text-text-secondary",
|
|
253
277
|
children: e.source ?? "—"
|
|
254
278
|
})
|
|
@@ -258,7 +282,7 @@ function M() {
|
|
|
258
282
|
header: "Valid year",
|
|
259
283
|
align: "right",
|
|
260
284
|
hideOnMobile: !0,
|
|
261
|
-
render: (e) => /* @__PURE__ */
|
|
285
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
262
286
|
className: "tabular-nums text-text-tertiary",
|
|
263
287
|
children: e.validYear ?? "—"
|
|
264
288
|
})
|
|
@@ -267,13 +291,13 @@ function M() {
|
|
|
267
291
|
key: "active",
|
|
268
292
|
header: "Active",
|
|
269
293
|
align: "right",
|
|
270
|
-
render: (e) => e.isActive ? /* @__PURE__ */
|
|
294
|
+
render: (e) => e.isActive ? /* @__PURE__ */ m(s, { status: "OK" }) : /* @__PURE__ */ m(s, { status: "Inactive" })
|
|
271
295
|
}
|
|
272
|
-
],
|
|
296
|
+
], ot = [
|
|
273
297
|
{
|
|
274
298
|
key: "name",
|
|
275
299
|
header: "Target",
|
|
276
|
-
render: (e) => /* @__PURE__ */
|
|
300
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
277
301
|
className: "font-medium text-text-primary",
|
|
278
302
|
children: e.name
|
|
279
303
|
})
|
|
@@ -282,7 +306,7 @@ function M() {
|
|
|
282
306
|
key: "metric",
|
|
283
307
|
header: "Metric",
|
|
284
308
|
hideOnMobile: !0,
|
|
285
|
-
render: (e) => /* @__PURE__ */
|
|
309
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
286
310
|
className: "text-text-secondary",
|
|
287
311
|
children: e.metric
|
|
288
312
|
})
|
|
@@ -291,10 +315,10 @@ function M() {
|
|
|
291
315
|
key: "baseline",
|
|
292
316
|
header: "Baseline",
|
|
293
317
|
hideOnMobile: !0,
|
|
294
|
-
render: (e) => /* @__PURE__ */
|
|
318
|
+
render: (e) => /* @__PURE__ */ h("span", {
|
|
295
319
|
className: "tabular-nums text-text-secondary",
|
|
296
320
|
children: [
|
|
297
|
-
|
|
321
|
+
a(e.baselineValue),
|
|
298
322
|
" ",
|
|
299
323
|
e.unit,
|
|
300
324
|
" @",
|
|
@@ -306,10 +330,10 @@ function M() {
|
|
|
306
330
|
key: "target",
|
|
307
331
|
header: "Target",
|
|
308
332
|
hideOnMobile: !0,
|
|
309
|
-
render: (e) => /* @__PURE__ */
|
|
333
|
+
render: (e) => /* @__PURE__ */ h("span", {
|
|
310
334
|
className: "tabular-nums text-text-secondary",
|
|
311
335
|
children: [
|
|
312
|
-
|
|
336
|
+
a(e.targetValue),
|
|
313
337
|
" ",
|
|
314
338
|
e.unit,
|
|
315
339
|
" @",
|
|
@@ -321,14 +345,16 @@ function M() {
|
|
|
321
345
|
key: "reduction",
|
|
322
346
|
header: "Planned reduction",
|
|
323
347
|
render: (e) => {
|
|
324
|
-
let t = e.baselineValue > 0 ?
|
|
325
|
-
return /* @__PURE__ */
|
|
326
|
-
className: "flex min-w-[
|
|
327
|
-
children: [/* @__PURE__ */
|
|
348
|
+
let t = e.baselineValue > 0 ? je((e.baselineValue - e.targetValue) / e.baselineValue * 100) : 0;
|
|
349
|
+
return /* @__PURE__ */ h("div", {
|
|
350
|
+
className: "flex min-w-[10rem] items-center gap-3",
|
|
351
|
+
children: [/* @__PURE__ */ m(te, {
|
|
328
352
|
value: t,
|
|
353
|
+
color: Me[e.status] ?? "var(--color-action-primary-bg)",
|
|
354
|
+
height: 8,
|
|
329
355
|
className: "flex-1"
|
|
330
|
-
}), /* @__PURE__ */
|
|
331
|
-
className: "w-11 shrink-0 text-right text-sm tabular-nums text-text-
|
|
356
|
+
}), /* @__PURE__ */ h("span", {
|
|
357
|
+
className: "w-11 shrink-0 text-right text-sm font-semibold tabular-nums text-text-primary",
|
|
332
358
|
children: [Math.round(t), "%"]
|
|
333
359
|
})]
|
|
334
360
|
});
|
|
@@ -337,260 +363,275 @@ function M() {
|
|
|
337
363
|
{
|
|
338
364
|
key: "status",
|
|
339
365
|
header: "Status",
|
|
340
|
-
render: (e) => /* @__PURE__ */
|
|
366
|
+
render: (e) => /* @__PURE__ */ m(s, { status: e.status })
|
|
341
367
|
},
|
|
342
368
|
{
|
|
343
369
|
key: "setStatus",
|
|
344
370
|
header: "",
|
|
345
371
|
align: "right",
|
|
346
|
-
render: (e) => /* @__PURE__ */
|
|
372
|
+
render: (e) => /* @__PURE__ */ h(C, {
|
|
347
373
|
value: e.status,
|
|
348
|
-
onValueChange: (t) =>
|
|
374
|
+
onValueChange: (t) => Ze.mutate({
|
|
349
375
|
id: e.id,
|
|
350
376
|
status: t
|
|
351
377
|
}),
|
|
352
|
-
children: [/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ m(E, {
|
|
353
379
|
className: "h-8 w-36",
|
|
354
|
-
children: /* @__PURE__ */
|
|
355
|
-
}), /* @__PURE__ */
|
|
380
|
+
children: /* @__PURE__ */ m(D, {})
|
|
381
|
+
}), /* @__PURE__ */ m(w, { children: Oe.map((e) => /* @__PURE__ */ m(T, {
|
|
356
382
|
value: e,
|
|
357
|
-
children:
|
|
383
|
+
children: i(e)
|
|
358
384
|
}, e)) })]
|
|
359
385
|
})
|
|
360
386
|
}
|
|
361
|
-
],
|
|
387
|
+
], st = [
|
|
362
388
|
{
|
|
363
389
|
value: "ledger",
|
|
364
390
|
label: "Ledger",
|
|
365
|
-
icon: /* @__PURE__ */
|
|
391
|
+
icon: /* @__PURE__ */ m(f, { className: "h-4 w-4" })
|
|
366
392
|
},
|
|
367
393
|
{
|
|
368
394
|
value: "factors",
|
|
369
395
|
label: "Emission factors",
|
|
370
|
-
icon: /* @__PURE__ */
|
|
396
|
+
icon: /* @__PURE__ */ m(ye, { className: "h-4 w-4" }),
|
|
371
397
|
count: Q.data?.length
|
|
372
398
|
},
|
|
373
399
|
{
|
|
374
400
|
value: "targets",
|
|
375
401
|
label: "Reduction targets",
|
|
376
|
-
icon: /* @__PURE__ */
|
|
402
|
+
icon: /* @__PURE__ */ m(be, { className: "h-4 w-4" }),
|
|
377
403
|
count: $.data?.length
|
|
378
404
|
}
|
|
379
405
|
];
|
|
380
|
-
return /* @__PURE__ */
|
|
406
|
+
return /* @__PURE__ */ h(e, {
|
|
381
407
|
title: "Carbon & Sustainability",
|
|
382
408
|
description: "Carbon ledger, emission factors & science-based reduction targets — GHG Protocol Scope 1 / 2 / 3.",
|
|
383
|
-
actions:
|
|
384
|
-
onClick:
|
|
385
|
-
children: [/* @__PURE__ */ p
|
|
386
|
-
}) :
|
|
387
|
-
onClick:
|
|
388
|
-
children: [/* @__PURE__ */ p
|
|
389
|
-
}) : /* @__PURE__ */
|
|
390
|
-
onClick:
|
|
391
|
-
children: [/* @__PURE__ */ p
|
|
409
|
+
actions: o === "ledger" ? /* @__PURE__ */ h(g, {
|
|
410
|
+
onClick: Qe,
|
|
411
|
+
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " Record entry"]
|
|
412
|
+
}) : o === "factors" ? /* @__PURE__ */ h(g, {
|
|
413
|
+
onClick: $e,
|
|
414
|
+
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " New factor"]
|
|
415
|
+
}) : /* @__PURE__ */ h(g, {
|
|
416
|
+
onClick: et,
|
|
417
|
+
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " New target"]
|
|
392
418
|
}),
|
|
393
419
|
children: [
|
|
394
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ h("div", {
|
|
395
421
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
396
422
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
icon: /* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ m(t, {
|
|
424
|
+
icon: /* @__PURE__ */ m(f, { className: "h-5 w-5" }),
|
|
399
425
|
value: X.data ? n(X.data.total) : "—",
|
|
400
426
|
label: "Total footprint",
|
|
401
|
-
featured: !0
|
|
427
|
+
featured: !0,
|
|
428
|
+
footer: X.data && X.data.total > 0 ? /* @__PURE__ */ h("div", {
|
|
429
|
+
className: "space-y-2",
|
|
430
|
+
children: [/* @__PURE__ */ m(re, {
|
|
431
|
+
scope1: X.data.scope1,
|
|
432
|
+
scope2: X.data.scope2,
|
|
433
|
+
scope3: X.data.scope3,
|
|
434
|
+
height: 6
|
|
435
|
+
}), /* @__PURE__ */ m("p", {
|
|
436
|
+
className: "text-xs text-text-tertiary",
|
|
437
|
+
children: "Scope 1 · 2 · 3 split"
|
|
438
|
+
})]
|
|
439
|
+
}) : void 0
|
|
402
440
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
icon: /* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ m(t, {
|
|
442
|
+
icon: /* @__PURE__ */ m(ve, { className: "h-5 w-5" }),
|
|
405
443
|
value: X.data ? n(X.data.scope1) : "—",
|
|
406
|
-
label: "Scope 1 · Direct"
|
|
444
|
+
label: "Scope 1 · Direct",
|
|
445
|
+
footer: M(X.data?.scope1, X.data?.total, "SCOPE_1")
|
|
407
446
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
-
icon: /* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ m(t, {
|
|
448
|
+
icon: /* @__PURE__ */ m(Se, { className: "h-5 w-5" }),
|
|
410
449
|
value: X.data ? n(X.data.scope2) : "—",
|
|
411
|
-
label: "Scope 2 · Purchased energy"
|
|
450
|
+
label: "Scope 2 · Purchased energy",
|
|
451
|
+
footer: M(X.data?.scope2, X.data?.total, "SCOPE_2")
|
|
412
452
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
icon: /* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ m(t, {
|
|
454
|
+
icon: /* @__PURE__ */ m(xe, { className: "h-5 w-5" }),
|
|
415
455
|
value: X.data ? n(X.data.scope3) : "—",
|
|
416
|
-
label: "Scope 3 · Value chain"
|
|
456
|
+
label: "Scope 3 · Value chain",
|
|
457
|
+
footer: M(X.data?.scope3, X.data?.total, "SCOPE_3")
|
|
417
458
|
})
|
|
418
459
|
]
|
|
419
460
|
}),
|
|
420
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ m("div", {
|
|
421
462
|
className: "mt-6",
|
|
422
|
-
children: /* @__PURE__ */
|
|
423
|
-
items:
|
|
424
|
-
value:
|
|
425
|
-
onChange:
|
|
463
|
+
children: /* @__PURE__ */ m(he, {
|
|
464
|
+
items: st,
|
|
465
|
+
value: o,
|
|
466
|
+
onChange: ne
|
|
426
467
|
})
|
|
427
468
|
}),
|
|
428
|
-
|
|
469
|
+
o === "ledger" && /* @__PURE__ */ h("div", {
|
|
429
470
|
className: "mt-6",
|
|
430
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ h("div", {
|
|
431
472
|
className: "mb-5 flex flex-wrap items-center gap-3",
|
|
432
473
|
children: [
|
|
433
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ h(C, {
|
|
434
475
|
value: N,
|
|
435
476
|
onValueChange: (e) => {
|
|
436
|
-
|
|
477
|
+
Ne(e), I.reset();
|
|
437
478
|
},
|
|
438
|
-
children: [/* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ m(E, {
|
|
439
480
|
className: "w-40",
|
|
440
|
-
children: /* @__PURE__ */
|
|
441
|
-
}), /* @__PURE__ */
|
|
481
|
+
children: /* @__PURE__ */ m(D, { placeholder: "All scopes" })
|
|
482
|
+
}), /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, {
|
|
442
483
|
value: "ALL",
|
|
443
484
|
children: "All scopes"
|
|
444
|
-
}), O.map((e) => /* @__PURE__ */
|
|
485
|
+
}), O.map((e) => /* @__PURE__ */ m(T, {
|
|
445
486
|
value: e,
|
|
446
|
-
children:
|
|
487
|
+
children: i(e)
|
|
447
488
|
}, e))] })]
|
|
448
489
|
}),
|
|
449
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ h(C, {
|
|
450
491
|
value: P,
|
|
451
492
|
onValueChange: (e) => {
|
|
452
|
-
|
|
493
|
+
Pe(e), I.reset();
|
|
453
494
|
},
|
|
454
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ m(E, {
|
|
455
496
|
className: "w-40",
|
|
456
|
-
children: /* @__PURE__ */
|
|
457
|
-
}), /* @__PURE__ */
|
|
497
|
+
children: /* @__PURE__ */ m(D, { placeholder: "All statuses" })
|
|
498
|
+
}), /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, {
|
|
458
499
|
value: "ALL",
|
|
459
500
|
children: "All statuses"
|
|
460
|
-
}),
|
|
501
|
+
}), De.map((e) => /* @__PURE__ */ m(T, {
|
|
461
502
|
value: e,
|
|
462
|
-
children:
|
|
503
|
+
children: i(e)
|
|
463
504
|
}, e))] })]
|
|
464
505
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ h(C, {
|
|
466
507
|
value: F,
|
|
467
508
|
onValueChange: (e) => {
|
|
468
|
-
|
|
509
|
+
Fe(e), I.reset();
|
|
469
510
|
},
|
|
470
|
-
children: [/* @__PURE__ */
|
|
511
|
+
children: [/* @__PURE__ */ m(E, {
|
|
471
512
|
className: "w-48",
|
|
472
|
-
children: /* @__PURE__ */
|
|
473
|
-
}), /* @__PURE__ */
|
|
513
|
+
children: /* @__PURE__ */ m(D, { placeholder: "All sites" })
|
|
514
|
+
}), /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, {
|
|
474
515
|
value: "ALL",
|
|
475
516
|
children: "All sites"
|
|
476
|
-
}), Object.entries(
|
|
517
|
+
}), Object.entries(He).map(([e, t]) => /* @__PURE__ */ m(T, {
|
|
477
518
|
value: e,
|
|
478
519
|
children: t
|
|
479
520
|
}, e))] })]
|
|
480
521
|
})
|
|
481
522
|
]
|
|
482
|
-
}), Z.isLoading ? /* @__PURE__ */
|
|
523
|
+
}), Z.isLoading ? /* @__PURE__ */ m(l, { label: "Loading carbon ledger…" }) : Z.isError ? /* @__PURE__ */ m(c, {
|
|
483
524
|
message: "Couldn't load carbon entries.",
|
|
484
525
|
onRetry: () => Z.refetch()
|
|
485
|
-
}) :
|
|
526
|
+
}) : Ue.length === 0 ? /* @__PURE__ */ m(ee, {
|
|
486
527
|
illustration: "empty-data",
|
|
487
|
-
icon: /* @__PURE__ */
|
|
528
|
+
icon: /* @__PURE__ */ m(f, { className: "h-10 w-10" }),
|
|
488
529
|
title: "No carbon entries",
|
|
489
530
|
description: N === "ALL" && P === "ALL" && F === "ALL" ? "Record activity to build your Scope 1–3 emissions ledger." : "No entries match these filters.",
|
|
490
|
-
action: /* @__PURE__ */
|
|
491
|
-
onClick:
|
|
492
|
-
children: [/* @__PURE__ */ p
|
|
531
|
+
action: /* @__PURE__ */ h(g, {
|
|
532
|
+
onClick: Qe,
|
|
533
|
+
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " Record entry"]
|
|
493
534
|
})
|
|
494
|
-
}) : /* @__PURE__ */
|
|
495
|
-
columns:
|
|
496
|
-
rows:
|
|
535
|
+
}) : /* @__PURE__ */ h(Ce, { children: [/* @__PURE__ */ m(u, {
|
|
536
|
+
columns: it,
|
|
537
|
+
rows: Ue,
|
|
497
538
|
rowKey: (e) => e.id
|
|
498
|
-
}), /* @__PURE__ */
|
|
539
|
+
}), /* @__PURE__ */ m(ge, {
|
|
499
540
|
page: I.page,
|
|
500
|
-
pageSize:
|
|
501
|
-
itemCount:
|
|
541
|
+
pageSize: ke,
|
|
542
|
+
itemCount: Ue.length,
|
|
502
543
|
hasMore: Z.data?.pageInfo?.hasMore ?? !1,
|
|
503
544
|
onPageChange: (e) => I.onPageChange(e, Z.data?.pageInfo?.cursor)
|
|
504
545
|
})] })]
|
|
505
546
|
}),
|
|
506
|
-
|
|
547
|
+
o === "factors" && /* @__PURE__ */ h("div", {
|
|
507
548
|
className: "mt-6",
|
|
508
|
-
children: [/* @__PURE__ */
|
|
549
|
+
children: [/* @__PURE__ */ m("div", {
|
|
509
550
|
className: "mb-5 flex flex-wrap items-center gap-3",
|
|
510
|
-
children: /* @__PURE__ */
|
|
551
|
+
children: /* @__PURE__ */ h(C, {
|
|
511
552
|
value: L,
|
|
512
|
-
onValueChange: (e) =>
|
|
513
|
-
children: [/* @__PURE__ */
|
|
553
|
+
onValueChange: (e) => Ie(e),
|
|
554
|
+
children: [/* @__PURE__ */ m(E, {
|
|
514
555
|
className: "w-40",
|
|
515
|
-
children: /* @__PURE__ */
|
|
516
|
-
}), /* @__PURE__ */
|
|
556
|
+
children: /* @__PURE__ */ m(D, { placeholder: "All scopes" })
|
|
557
|
+
}), /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, {
|
|
517
558
|
value: "ALL",
|
|
518
559
|
children: "All scopes"
|
|
519
|
-
}), O.map((e) => /* @__PURE__ */
|
|
560
|
+
}), O.map((e) => /* @__PURE__ */ m(T, {
|
|
520
561
|
value: e,
|
|
521
|
-
children:
|
|
562
|
+
children: i(e)
|
|
522
563
|
}, e))] })]
|
|
523
564
|
})
|
|
524
|
-
}), Q.isLoading ? /* @__PURE__ */
|
|
565
|
+
}), Q.isLoading ? /* @__PURE__ */ m(l, { label: "Loading emission factors…" }) : Q.isError ? /* @__PURE__ */ m(c, {
|
|
525
566
|
message: "Couldn't load emission factors.",
|
|
526
567
|
onRetry: () => Q.refetch()
|
|
527
|
-
}) :
|
|
568
|
+
}) : Ge.length === 0 ? /* @__PURE__ */ m(ee, {
|
|
528
569
|
illustration: "empty-data",
|
|
529
|
-
icon: /* @__PURE__ */
|
|
570
|
+
icon: /* @__PURE__ */ m(ye, { className: "h-10 w-10" }),
|
|
530
571
|
title: "No emission factors",
|
|
531
572
|
description: L === "ALL" ? "Add emission factors (kg CO₂e per activity unit) to convert activity into CO₂e." : "No emission factors match this scope.",
|
|
532
|
-
action: /* @__PURE__ */
|
|
533
|
-
onClick:
|
|
534
|
-
children: [/* @__PURE__ */ p
|
|
573
|
+
action: /* @__PURE__ */ h(g, {
|
|
574
|
+
onClick: $e,
|
|
575
|
+
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " New factor"]
|
|
535
576
|
})
|
|
536
|
-
}) : /* @__PURE__ */
|
|
537
|
-
columns:
|
|
538
|
-
rows:
|
|
577
|
+
}) : /* @__PURE__ */ m(u, {
|
|
578
|
+
columns: at,
|
|
579
|
+
rows: Ge,
|
|
539
580
|
rowKey: (e) => e.id
|
|
540
581
|
})]
|
|
541
582
|
}),
|
|
542
|
-
|
|
583
|
+
o === "targets" && /* @__PURE__ */ h("div", {
|
|
543
584
|
className: "mt-6",
|
|
544
|
-
children: [/* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ m("div", {
|
|
545
586
|
className: "mb-5 flex flex-wrap items-center gap-3",
|
|
546
|
-
children: /* @__PURE__ */
|
|
587
|
+
children: /* @__PURE__ */ h(C, {
|
|
547
588
|
value: R,
|
|
548
|
-
onValueChange: (e) =>
|
|
549
|
-
children: [/* @__PURE__ */
|
|
589
|
+
onValueChange: (e) => Le(e),
|
|
590
|
+
children: [/* @__PURE__ */ m(E, {
|
|
550
591
|
className: "w-44",
|
|
551
|
-
children: /* @__PURE__ */
|
|
552
|
-
}), /* @__PURE__ */
|
|
592
|
+
children: /* @__PURE__ */ m(D, { placeholder: "All statuses" })
|
|
593
|
+
}), /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, {
|
|
553
594
|
value: "ALL",
|
|
554
595
|
children: "All statuses"
|
|
555
|
-
}),
|
|
596
|
+
}), Oe.map((e) => /* @__PURE__ */ m(T, {
|
|
556
597
|
value: e,
|
|
557
|
-
children:
|
|
598
|
+
children: i(e)
|
|
558
599
|
}, e))] })]
|
|
559
600
|
})
|
|
560
|
-
}), $.isLoading ? /* @__PURE__ */
|
|
601
|
+
}), $.isLoading ? /* @__PURE__ */ m(l, { label: "Loading reduction targets…" }) : $.isError ? /* @__PURE__ */ m(c, {
|
|
561
602
|
message: "Couldn't load reduction targets.",
|
|
562
603
|
onRetry: () => $.refetch()
|
|
563
|
-
}) :
|
|
604
|
+
}) : Ke.length === 0 ? /* @__PURE__ */ m(ee, {
|
|
564
605
|
illustration: "empty-data",
|
|
565
|
-
icon: /* @__PURE__ */
|
|
606
|
+
icon: /* @__PURE__ */ m(be, { className: "h-10 w-10" }),
|
|
566
607
|
title: "No reduction targets",
|
|
567
608
|
description: R === "ALL" ? "Set science-based reduction targets to track progress against a baseline." : "No targets match this status.",
|
|
568
|
-
action: /* @__PURE__ */
|
|
569
|
-
onClick:
|
|
570
|
-
children: [/* @__PURE__ */ p
|
|
609
|
+
action: /* @__PURE__ */ h(g, {
|
|
610
|
+
onClick: et,
|
|
611
|
+
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " New target"]
|
|
571
612
|
})
|
|
572
|
-
}) : /* @__PURE__ */
|
|
573
|
-
columns:
|
|
574
|
-
rows:
|
|
613
|
+
}) : /* @__PURE__ */ m(u, {
|
|
614
|
+
columns: ot,
|
|
615
|
+
rows: Ke,
|
|
575
616
|
rowKey: (e) => e.id
|
|
576
617
|
})]
|
|
577
618
|
}),
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
open:
|
|
619
|
+
/* @__PURE__ */ m(we, {
|
|
620
|
+
open: Re,
|
|
580
621
|
onOpenChange: (e) => {
|
|
581
622
|
z(e), e || (V(k), Y(null));
|
|
582
623
|
},
|
|
583
|
-
children: /* @__PURE__ */
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
/* @__PURE__ */
|
|
624
|
+
children: /* @__PURE__ */ h(y, { children: [
|
|
625
|
+
/* @__PURE__ */ h(x, { children: [/* @__PURE__ */ m(S, { children: "Record carbon entry" }), /* @__PURE__ */ m(Te, { children: "Log an activity — CO₂e is computed server-side from activity value × emission factor." })] }),
|
|
626
|
+
/* @__PURE__ */ h("div", {
|
|
586
627
|
className: "grid gap-4 py-2",
|
|
587
628
|
children: [
|
|
588
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ h("div", {
|
|
589
630
|
className: "grid gap-1.5",
|
|
590
|
-
children: [/* @__PURE__ */
|
|
631
|
+
children: [/* @__PURE__ */ m(v, {
|
|
591
632
|
htmlFor: "ceCategory",
|
|
592
633
|
children: "Category *"
|
|
593
|
-
}), /* @__PURE__ */
|
|
634
|
+
}), /* @__PURE__ */ m(_, {
|
|
594
635
|
id: "ceCategory",
|
|
595
636
|
value: B.category,
|
|
596
637
|
onChange: (e) => V({
|
|
@@ -600,33 +641,33 @@ function M() {
|
|
|
600
641
|
placeholder: "Diesel generators"
|
|
601
642
|
})]
|
|
602
643
|
}),
|
|
603
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ h("div", {
|
|
604
645
|
className: "grid gap-2 sm:grid-cols-2",
|
|
605
|
-
children: [/* @__PURE__ */
|
|
646
|
+
children: [/* @__PURE__ */ h("div", {
|
|
606
647
|
className: "grid gap-1.5",
|
|
607
|
-
children: [/* @__PURE__ */
|
|
648
|
+
children: [/* @__PURE__ */ m(v, {
|
|
608
649
|
htmlFor: "ceScope",
|
|
609
650
|
children: "Scope"
|
|
610
|
-
}), /* @__PURE__ */
|
|
651
|
+
}), /* @__PURE__ */ h(C, {
|
|
611
652
|
value: B.scope,
|
|
612
653
|
onValueChange: (e) => V({
|
|
613
654
|
...B,
|
|
614
655
|
scope: e
|
|
615
656
|
}),
|
|
616
|
-
children: [/* @__PURE__ */
|
|
657
|
+
children: [/* @__PURE__ */ m(E, {
|
|
617
658
|
id: "ceScope",
|
|
618
|
-
children: /* @__PURE__ */
|
|
619
|
-
}), /* @__PURE__ */
|
|
659
|
+
children: /* @__PURE__ */ m(D, {})
|
|
660
|
+
}), /* @__PURE__ */ m(w, { children: O.map((e) => /* @__PURE__ */ m(T, {
|
|
620
661
|
value: e,
|
|
621
|
-
children:
|
|
662
|
+
children: i(e)
|
|
622
663
|
}, e)) })]
|
|
623
664
|
})]
|
|
624
|
-
}), /* @__PURE__ */
|
|
665
|
+
}), /* @__PURE__ */ h("div", {
|
|
625
666
|
className: "grid gap-1.5",
|
|
626
|
-
children: [/* @__PURE__ */
|
|
667
|
+
children: [/* @__PURE__ */ m(v, {
|
|
627
668
|
htmlFor: "cePeriod",
|
|
628
669
|
children: "Period start"
|
|
629
|
-
}), /* @__PURE__ */
|
|
670
|
+
}), /* @__PURE__ */ m(_, {
|
|
630
671
|
id: "cePeriod",
|
|
631
672
|
type: "date",
|
|
632
673
|
value: B.periodStart,
|
|
@@ -637,14 +678,14 @@ function M() {
|
|
|
637
678
|
})]
|
|
638
679
|
})]
|
|
639
680
|
}),
|
|
640
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ h("div", {
|
|
641
682
|
className: "grid gap-2 sm:grid-cols-2",
|
|
642
|
-
children: [/* @__PURE__ */
|
|
683
|
+
children: [/* @__PURE__ */ h("div", {
|
|
643
684
|
className: "grid gap-1.5",
|
|
644
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ m(v, {
|
|
645
686
|
htmlFor: "ceValue",
|
|
646
687
|
children: "Activity value *"
|
|
647
|
-
}), /* @__PURE__ */
|
|
688
|
+
}), /* @__PURE__ */ m(_, {
|
|
648
689
|
id: "ceValue",
|
|
649
690
|
type: "number",
|
|
650
691
|
min: "0",
|
|
@@ -656,12 +697,12 @@ function M() {
|
|
|
656
697
|
}),
|
|
657
698
|
placeholder: "1200"
|
|
658
699
|
})]
|
|
659
|
-
}), /* @__PURE__ */
|
|
700
|
+
}), /* @__PURE__ */ h("div", {
|
|
660
701
|
className: "grid gap-1.5",
|
|
661
|
-
children: [/* @__PURE__ */
|
|
702
|
+
children: [/* @__PURE__ */ m(v, {
|
|
662
703
|
htmlFor: "ceUnit",
|
|
663
704
|
children: "Activity unit *"
|
|
664
|
-
}), /* @__PURE__ */
|
|
705
|
+
}), /* @__PURE__ */ m(_, {
|
|
665
706
|
id: "ceUnit",
|
|
666
707
|
value: B.activityUnit,
|
|
667
708
|
onChange: (e) => V({
|
|
@@ -672,54 +713,54 @@ function M() {
|
|
|
672
713
|
})]
|
|
673
714
|
})]
|
|
674
715
|
}),
|
|
675
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ h("div", {
|
|
676
717
|
className: "grid gap-2 sm:grid-cols-2",
|
|
677
|
-
children: [/* @__PURE__ */
|
|
718
|
+
children: [/* @__PURE__ */ h("div", {
|
|
678
719
|
className: "grid gap-1.5",
|
|
679
|
-
children: [/* @__PURE__ */
|
|
720
|
+
children: [/* @__PURE__ */ m(v, {
|
|
680
721
|
htmlFor: "ceFactor",
|
|
681
722
|
children: "Emission factor"
|
|
682
|
-
}), /* @__PURE__ */
|
|
723
|
+
}), /* @__PURE__ */ h(C, {
|
|
683
724
|
value: B.factorId,
|
|
684
725
|
onValueChange: (e) => V({
|
|
685
726
|
...B,
|
|
686
727
|
factorId: e
|
|
687
728
|
}),
|
|
688
|
-
children: [/* @__PURE__ */
|
|
729
|
+
children: [/* @__PURE__ */ m(E, {
|
|
689
730
|
id: "ceFactor",
|
|
690
|
-
children: /* @__PURE__ */
|
|
691
|
-
}), /* @__PURE__ */
|
|
731
|
+
children: /* @__PURE__ */ m(D, { placeholder: "Optional" })
|
|
732
|
+
}), /* @__PURE__ */ m(w, { children: (We.data ?? []).map((e) => /* @__PURE__ */ m(T, {
|
|
692
733
|
value: e.id,
|
|
693
734
|
children: e.name
|
|
694
735
|
}, e.id)) })]
|
|
695
736
|
})]
|
|
696
|
-
}), /* @__PURE__ */
|
|
737
|
+
}), /* @__PURE__ */ h("div", {
|
|
697
738
|
className: "grid gap-1.5",
|
|
698
|
-
children: [/* @__PURE__ */
|
|
739
|
+
children: [/* @__PURE__ */ m(v, {
|
|
699
740
|
htmlFor: "ceSite",
|
|
700
741
|
children: "Site"
|
|
701
|
-
}), /* @__PURE__ */
|
|
742
|
+
}), /* @__PURE__ */ h(C, {
|
|
702
743
|
value: B.siteId,
|
|
703
744
|
onValueChange: (e) => V({
|
|
704
745
|
...B,
|
|
705
746
|
siteId: e
|
|
706
747
|
}),
|
|
707
|
-
children: [/* @__PURE__ */
|
|
748
|
+
children: [/* @__PURE__ */ m(E, {
|
|
708
749
|
id: "ceSite",
|
|
709
|
-
children: /* @__PURE__ */
|
|
710
|
-
}), /* @__PURE__ */
|
|
750
|
+
children: /* @__PURE__ */ m(D, { placeholder: "Optional" })
|
|
751
|
+
}), /* @__PURE__ */ m(w, { children: Object.entries(He).map(([e, t]) => /* @__PURE__ */ m(T, {
|
|
711
752
|
value: e,
|
|
712
753
|
children: t
|
|
713
754
|
}, e)) })]
|
|
714
755
|
})]
|
|
715
756
|
})]
|
|
716
757
|
}),
|
|
717
|
-
/* @__PURE__ */
|
|
758
|
+
/* @__PURE__ */ h("div", {
|
|
718
759
|
className: "grid gap-1.5",
|
|
719
|
-
children: [/* @__PURE__ */
|
|
760
|
+
children: [/* @__PURE__ */ m(v, {
|
|
720
761
|
htmlFor: "ceNotes",
|
|
721
762
|
children: "Notes"
|
|
722
|
-
}), /* @__PURE__ */
|
|
763
|
+
}), /* @__PURE__ */ m(Ee, {
|
|
723
764
|
id: "ceNotes",
|
|
724
765
|
rows: 2,
|
|
725
766
|
value: B.notes,
|
|
@@ -730,39 +771,39 @@ function M() {
|
|
|
730
771
|
placeholder: "Optional context about this entry."
|
|
731
772
|
})]
|
|
732
773
|
}),
|
|
733
|
-
J && /* @__PURE__ */
|
|
774
|
+
J && /* @__PURE__ */ m("p", {
|
|
734
775
|
className: "text-sm text-status-error-text",
|
|
735
776
|
children: J
|
|
736
777
|
})
|
|
737
778
|
]
|
|
738
779
|
}),
|
|
739
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ h(b, { children: [/* @__PURE__ */ m(g, {
|
|
740
781
|
variant: "outline",
|
|
741
782
|
onClick: () => z(!1),
|
|
742
783
|
children: "Cancel"
|
|
743
|
-
}), /* @__PURE__ */
|
|
744
|
-
onClick:
|
|
745
|
-
disabled:
|
|
746
|
-
children:
|
|
784
|
+
}), /* @__PURE__ */ m(g, {
|
|
785
|
+
onClick: tt,
|
|
786
|
+
disabled: qe.isPending,
|
|
787
|
+
children: qe.isPending ? "Recording…" : "Record entry"
|
|
747
788
|
})] })
|
|
748
789
|
] })
|
|
749
790
|
}),
|
|
750
|
-
/* @__PURE__ */
|
|
751
|
-
open:
|
|
791
|
+
/* @__PURE__ */ m(we, {
|
|
792
|
+
open: ze,
|
|
752
793
|
onOpenChange: (e) => {
|
|
753
794
|
H(e), e || (W(A), Y(null));
|
|
754
795
|
},
|
|
755
|
-
children: /* @__PURE__ */
|
|
756
|
-
/* @__PURE__ */
|
|
757
|
-
/* @__PURE__ */
|
|
796
|
+
children: /* @__PURE__ */ h(y, { children: [
|
|
797
|
+
/* @__PURE__ */ h(x, { children: [/* @__PURE__ */ m(S, { children: "New emission factor" }), /* @__PURE__ */ m(Te, { children: "Define kg CO₂e per activity unit — used to convert ledger activity into CO₂e." })] }),
|
|
798
|
+
/* @__PURE__ */ h("div", {
|
|
758
799
|
className: "grid gap-4 py-2",
|
|
759
800
|
children: [
|
|
760
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ h("div", {
|
|
761
802
|
className: "grid gap-1.5",
|
|
762
|
-
children: [/* @__PURE__ */
|
|
803
|
+
children: [/* @__PURE__ */ m(v, {
|
|
763
804
|
htmlFor: "efName",
|
|
764
805
|
children: "Name *"
|
|
765
|
-
}), /* @__PURE__ */
|
|
806
|
+
}), /* @__PURE__ */ m(_, {
|
|
766
807
|
id: "efName",
|
|
767
808
|
value: U.name,
|
|
768
809
|
onChange: (e) => W({
|
|
@@ -772,33 +813,33 @@ function M() {
|
|
|
772
813
|
placeholder: "Diesel (stationary combustion)"
|
|
773
814
|
})]
|
|
774
815
|
}),
|
|
775
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ h("div", {
|
|
776
817
|
className: "grid gap-2 sm:grid-cols-2",
|
|
777
|
-
children: [/* @__PURE__ */
|
|
818
|
+
children: [/* @__PURE__ */ h("div", {
|
|
778
819
|
className: "grid gap-1.5",
|
|
779
|
-
children: [/* @__PURE__ */
|
|
820
|
+
children: [/* @__PURE__ */ m(v, {
|
|
780
821
|
htmlFor: "efScope",
|
|
781
822
|
children: "Scope"
|
|
782
|
-
}), /* @__PURE__ */
|
|
823
|
+
}), /* @__PURE__ */ h(C, {
|
|
783
824
|
value: U.scope,
|
|
784
825
|
onValueChange: (e) => W({
|
|
785
826
|
...U,
|
|
786
827
|
scope: e
|
|
787
828
|
}),
|
|
788
|
-
children: [/* @__PURE__ */
|
|
829
|
+
children: [/* @__PURE__ */ m(E, {
|
|
789
830
|
id: "efScope",
|
|
790
|
-
children: /* @__PURE__ */
|
|
791
|
-
}), /* @__PURE__ */
|
|
831
|
+
children: /* @__PURE__ */ m(D, {})
|
|
832
|
+
}), /* @__PURE__ */ m(w, { children: O.map((e) => /* @__PURE__ */ m(T, {
|
|
792
833
|
value: e,
|
|
793
|
-
children:
|
|
834
|
+
children: i(e)
|
|
794
835
|
}, e)) })]
|
|
795
836
|
})]
|
|
796
|
-
}), /* @__PURE__ */
|
|
837
|
+
}), /* @__PURE__ */ h("div", {
|
|
797
838
|
className: "grid gap-1.5",
|
|
798
|
-
children: [/* @__PURE__ */
|
|
839
|
+
children: [/* @__PURE__ */ m(v, {
|
|
799
840
|
htmlFor: "efUnit",
|
|
800
841
|
children: "Activity unit *"
|
|
801
|
-
}), /* @__PURE__ */
|
|
842
|
+
}), /* @__PURE__ */ m(_, {
|
|
802
843
|
id: "efUnit",
|
|
803
844
|
value: U.activityUnit,
|
|
804
845
|
onChange: (e) => W({
|
|
@@ -809,14 +850,14 @@ function M() {
|
|
|
809
850
|
})]
|
|
810
851
|
})]
|
|
811
852
|
}),
|
|
812
|
-
/* @__PURE__ */
|
|
853
|
+
/* @__PURE__ */ h("div", {
|
|
813
854
|
className: "grid gap-2 sm:grid-cols-2",
|
|
814
|
-
children: [/* @__PURE__ */
|
|
855
|
+
children: [/* @__PURE__ */ h("div", {
|
|
815
856
|
className: "grid gap-1.5",
|
|
816
|
-
children: [/* @__PURE__ */
|
|
857
|
+
children: [/* @__PURE__ */ m(v, {
|
|
817
858
|
htmlFor: "efFactor",
|
|
818
859
|
children: "Factor (kg CO₂e / unit) *"
|
|
819
|
-
}), /* @__PURE__ */
|
|
860
|
+
}), /* @__PURE__ */ m(_, {
|
|
820
861
|
id: "efFactor",
|
|
821
862
|
type: "number",
|
|
822
863
|
min: "0",
|
|
@@ -828,12 +869,12 @@ function M() {
|
|
|
828
869
|
}),
|
|
829
870
|
placeholder: "2.68"
|
|
830
871
|
})]
|
|
831
|
-
}), /* @__PURE__ */
|
|
872
|
+
}), /* @__PURE__ */ h("div", {
|
|
832
873
|
className: "grid gap-1.5",
|
|
833
|
-
children: [/* @__PURE__ */
|
|
874
|
+
children: [/* @__PURE__ */ m(v, {
|
|
834
875
|
htmlFor: "efYear",
|
|
835
876
|
children: "Valid year"
|
|
836
|
-
}), /* @__PURE__ */
|
|
877
|
+
}), /* @__PURE__ */ m(_, {
|
|
837
878
|
id: "efYear",
|
|
838
879
|
type: "number",
|
|
839
880
|
step: "1",
|
|
@@ -846,12 +887,12 @@ function M() {
|
|
|
846
887
|
})]
|
|
847
888
|
})]
|
|
848
889
|
}),
|
|
849
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ h("div", {
|
|
850
891
|
className: "grid gap-1.5",
|
|
851
|
-
children: [/* @__PURE__ */
|
|
892
|
+
children: [/* @__PURE__ */ m(v, {
|
|
852
893
|
htmlFor: "efSource",
|
|
853
894
|
children: "Source"
|
|
854
|
-
}), /* @__PURE__ */
|
|
895
|
+
}), /* @__PURE__ */ m(_, {
|
|
855
896
|
id: "efSource",
|
|
856
897
|
value: U.source,
|
|
857
898
|
onChange: (e) => W({
|
|
@@ -861,41 +902,41 @@ function M() {
|
|
|
861
902
|
placeholder: "DEFRA / IPCC / EPA"
|
|
862
903
|
})]
|
|
863
904
|
}),
|
|
864
|
-
J && /* @__PURE__ */
|
|
905
|
+
J && /* @__PURE__ */ m("p", {
|
|
865
906
|
className: "text-sm text-status-error-text",
|
|
866
907
|
children: J
|
|
867
908
|
})
|
|
868
909
|
]
|
|
869
910
|
}),
|
|
870
|
-
/* @__PURE__ */
|
|
911
|
+
/* @__PURE__ */ h(b, { children: [/* @__PURE__ */ m(g, {
|
|
871
912
|
variant: "outline",
|
|
872
913
|
onClick: () => H(!1),
|
|
873
914
|
children: "Cancel"
|
|
874
|
-
}), /* @__PURE__ */
|
|
875
|
-
onClick:
|
|
876
|
-
disabled:
|
|
877
|
-
children:
|
|
915
|
+
}), /* @__PURE__ */ m(g, {
|
|
916
|
+
onClick: nt,
|
|
917
|
+
disabled: Ye.isPending,
|
|
918
|
+
children: Ye.isPending ? "Creating…" : "Create factor"
|
|
878
919
|
})] })
|
|
879
920
|
] })
|
|
880
921
|
}),
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
-
open:
|
|
922
|
+
/* @__PURE__ */ m(we, {
|
|
923
|
+
open: Be,
|
|
883
924
|
onOpenChange: (e) => {
|
|
884
925
|
G(e), e || (q(j), Y(null));
|
|
885
926
|
},
|
|
886
|
-
children: /* @__PURE__ */
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
-
/* @__PURE__ */
|
|
927
|
+
children: /* @__PURE__ */ h(y, { children: [
|
|
928
|
+
/* @__PURE__ */ h(x, { children: [/* @__PURE__ */ m(S, { children: "New reduction target" }), /* @__PURE__ */ m(Te, { children: "Commit to a measurable reduction from a baseline to a target year." })] }),
|
|
929
|
+
/* @__PURE__ */ h("div", {
|
|
889
930
|
className: "grid gap-4 py-2",
|
|
890
931
|
children: [
|
|
891
|
-
/* @__PURE__ */
|
|
932
|
+
/* @__PURE__ */ h("div", {
|
|
892
933
|
className: "grid gap-2 sm:grid-cols-2",
|
|
893
|
-
children: [/* @__PURE__ */
|
|
934
|
+
children: [/* @__PURE__ */ h("div", {
|
|
894
935
|
className: "grid gap-1.5",
|
|
895
|
-
children: [/* @__PURE__ */
|
|
936
|
+
children: [/* @__PURE__ */ m(v, {
|
|
896
937
|
htmlFor: "rtName",
|
|
897
938
|
children: "Name *"
|
|
898
|
-
}), /* @__PURE__ */
|
|
939
|
+
}), /* @__PURE__ */ m(_, {
|
|
899
940
|
id: "rtName",
|
|
900
941
|
value: K.name,
|
|
901
942
|
onChange: (e) => q({
|
|
@@ -904,12 +945,12 @@ function M() {
|
|
|
904
945
|
}),
|
|
905
946
|
placeholder: "Net-zero operations"
|
|
906
947
|
})]
|
|
907
|
-
}), /* @__PURE__ */
|
|
948
|
+
}), /* @__PURE__ */ h("div", {
|
|
908
949
|
className: "grid gap-1.5",
|
|
909
|
-
children: [/* @__PURE__ */
|
|
950
|
+
children: [/* @__PURE__ */ m(v, {
|
|
910
951
|
htmlFor: "rtMetric",
|
|
911
952
|
children: "Metric *"
|
|
912
|
-
}), /* @__PURE__ */
|
|
953
|
+
}), /* @__PURE__ */ m(_, {
|
|
913
954
|
id: "rtMetric",
|
|
914
955
|
value: K.metric,
|
|
915
956
|
onChange: (e) => q({
|
|
@@ -920,15 +961,15 @@ function M() {
|
|
|
920
961
|
})]
|
|
921
962
|
})]
|
|
922
963
|
}),
|
|
923
|
-
/* @__PURE__ */
|
|
964
|
+
/* @__PURE__ */ h("div", {
|
|
924
965
|
className: "grid gap-2 sm:grid-cols-3",
|
|
925
966
|
children: [
|
|
926
|
-
/* @__PURE__ */
|
|
967
|
+
/* @__PURE__ */ h("div", {
|
|
927
968
|
className: "grid gap-1.5",
|
|
928
|
-
children: [/* @__PURE__ */
|
|
969
|
+
children: [/* @__PURE__ */ m(v, {
|
|
929
970
|
htmlFor: "rtBaseVal",
|
|
930
971
|
children: "Baseline value *"
|
|
931
|
-
}), /* @__PURE__ */
|
|
972
|
+
}), /* @__PURE__ */ m(_, {
|
|
932
973
|
id: "rtBaseVal",
|
|
933
974
|
type: "number",
|
|
934
975
|
step: "any",
|
|
@@ -940,12 +981,12 @@ function M() {
|
|
|
940
981
|
placeholder: "1000"
|
|
941
982
|
})]
|
|
942
983
|
}),
|
|
943
|
-
/* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ h("div", {
|
|
944
985
|
className: "grid gap-1.5",
|
|
945
|
-
children: [/* @__PURE__ */
|
|
986
|
+
children: [/* @__PURE__ */ m(v, {
|
|
946
987
|
htmlFor: "rtBaseYear",
|
|
947
988
|
children: "Baseline year *"
|
|
948
|
-
}), /* @__PURE__ */
|
|
989
|
+
}), /* @__PURE__ */ m(_, {
|
|
949
990
|
id: "rtBaseYear",
|
|
950
991
|
type: "number",
|
|
951
992
|
step: "1",
|
|
@@ -957,12 +998,12 @@ function M() {
|
|
|
957
998
|
placeholder: "2024"
|
|
958
999
|
})]
|
|
959
1000
|
}),
|
|
960
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ h("div", {
|
|
961
1002
|
className: "grid gap-1.5",
|
|
962
|
-
children: [/* @__PURE__ */
|
|
1003
|
+
children: [/* @__PURE__ */ m(v, {
|
|
963
1004
|
htmlFor: "rtUnit",
|
|
964
1005
|
children: "Unit *"
|
|
965
|
-
}), /* @__PURE__ */
|
|
1006
|
+
}), /* @__PURE__ */ m(_, {
|
|
966
1007
|
id: "rtUnit",
|
|
967
1008
|
value: K.unit,
|
|
968
1009
|
onChange: (e) => q({
|
|
@@ -974,14 +1015,14 @@ function M() {
|
|
|
974
1015
|
})
|
|
975
1016
|
]
|
|
976
1017
|
}),
|
|
977
|
-
/* @__PURE__ */
|
|
1018
|
+
/* @__PURE__ */ h("div", {
|
|
978
1019
|
className: "grid gap-2 sm:grid-cols-2",
|
|
979
|
-
children: [/* @__PURE__ */
|
|
1020
|
+
children: [/* @__PURE__ */ h("div", {
|
|
980
1021
|
className: "grid gap-1.5",
|
|
981
|
-
children: [/* @__PURE__ */
|
|
1022
|
+
children: [/* @__PURE__ */ m(v, {
|
|
982
1023
|
htmlFor: "rtTargetVal",
|
|
983
1024
|
children: "Target value *"
|
|
984
|
-
}), /* @__PURE__ */
|
|
1025
|
+
}), /* @__PURE__ */ m(_, {
|
|
985
1026
|
id: "rtTargetVal",
|
|
986
1027
|
type: "number",
|
|
987
1028
|
step: "any",
|
|
@@ -992,12 +1033,12 @@ function M() {
|
|
|
992
1033
|
}),
|
|
993
1034
|
placeholder: "0"
|
|
994
1035
|
})]
|
|
995
|
-
}), /* @__PURE__ */
|
|
1036
|
+
}), /* @__PURE__ */ h("div", {
|
|
996
1037
|
className: "grid gap-1.5",
|
|
997
|
-
children: [/* @__PURE__ */
|
|
1038
|
+
children: [/* @__PURE__ */ m(v, {
|
|
998
1039
|
htmlFor: "rtTargetYear",
|
|
999
1040
|
children: "Target year *"
|
|
1000
|
-
}), /* @__PURE__ */
|
|
1041
|
+
}), /* @__PURE__ */ m(_, {
|
|
1001
1042
|
id: "rtTargetYear",
|
|
1002
1043
|
type: "number",
|
|
1003
1044
|
step: "1",
|
|
@@ -1010,12 +1051,12 @@ function M() {
|
|
|
1010
1051
|
})]
|
|
1011
1052
|
})]
|
|
1012
1053
|
}),
|
|
1013
|
-
/* @__PURE__ */
|
|
1054
|
+
/* @__PURE__ */ h("div", {
|
|
1014
1055
|
className: "grid gap-1.5",
|
|
1015
|
-
children: [/* @__PURE__ */
|
|
1056
|
+
children: [/* @__PURE__ */ m(v, {
|
|
1016
1057
|
htmlFor: "rtDesc",
|
|
1017
1058
|
children: "Description"
|
|
1018
|
-
}), /* @__PURE__ */
|
|
1059
|
+
}), /* @__PURE__ */ m(Ee, {
|
|
1019
1060
|
id: "rtDesc",
|
|
1020
1061
|
rows: 2,
|
|
1021
1062
|
value: K.description,
|
|
@@ -1026,20 +1067,20 @@ function M() {
|
|
|
1026
1067
|
placeholder: "Optional context about this target."
|
|
1027
1068
|
})]
|
|
1028
1069
|
}),
|
|
1029
|
-
J && /* @__PURE__ */
|
|
1070
|
+
J && /* @__PURE__ */ m("p", {
|
|
1030
1071
|
className: "text-sm text-status-error-text",
|
|
1031
1072
|
children: J
|
|
1032
1073
|
})
|
|
1033
1074
|
]
|
|
1034
1075
|
}),
|
|
1035
|
-
/* @__PURE__ */
|
|
1076
|
+
/* @__PURE__ */ h(b, { children: [/* @__PURE__ */ m(g, {
|
|
1036
1077
|
variant: "outline",
|
|
1037
1078
|
onClick: () => G(!1),
|
|
1038
1079
|
children: "Cancel"
|
|
1039
|
-
}), /* @__PURE__ */
|
|
1040
|
-
onClick:
|
|
1041
|
-
disabled:
|
|
1042
|
-
children:
|
|
1080
|
+
}), /* @__PURE__ */ m(g, {
|
|
1081
|
+
onClick: rt,
|
|
1082
|
+
disabled: Xe.isPending,
|
|
1083
|
+
children: Xe.isPending ? "Creating…" : "Create target"
|
|
1043
1084
|
})] })
|
|
1044
1085
|
] })
|
|
1045
1086
|
})
|
|
@@ -1047,6 +1088,6 @@ function M() {
|
|
|
1047
1088
|
});
|
|
1048
1089
|
}
|
|
1049
1090
|
//#endregion
|
|
1050
|
-
export {
|
|
1091
|
+
export { N as CarbonPage };
|
|
1051
1092
|
|
|
1052
1093
|
//# sourceMappingURL=CarbonPage.js.map
|