fix ranniho neprodeje do site
Some checks failed
CI and deploy / migration-check (push) Failing after 42s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-05-21 10:02:19 +02:00
parent 27323fd77a
commit 44a06b6288
9 changed files with 123 additions and 5 deletions

View File

@@ -342,7 +342,9 @@ function deyeModeBadge(i: PlanningIntervalDto): { label: string; klass: string;
}
let variant = 'max/max'
if (grid_w < 0 && battery_w >= 0) {
if (exportMode === 'PV_SURPLUS' && grid_w < 0) {
variant = 'FVE→síť'
} else if (grid_w < 0 && battery_w >= 0) {
variant = exportMode === 'PV_SURPLUS' ? 'FVE→síť' : 'export'
}
else if (grid_w > 0 && battery_w <= 0) variant = 'držet bat. (109=0)'
@@ -394,6 +396,7 @@ type ChartRow = {
pv_a_w: number
battery_soc_target_pct: number | null
battery_setpoint_w: number
grid_setpoint_w: number
compare_battery_setpoint_w?: number | null
effective_buy_price: number | null
raw: PlanningIntervalDto
@@ -731,6 +734,7 @@ export default function Planning() {
pv_a_w: pvChartFveW(i, nowMs),
battery_soc_target_pct: i.battery_soc_target_pct,
battery_setpoint_w: i.battery_setpoint_w ?? 0,
grid_setpoint_w: i.grid_setpoint_w ?? 0,
compare_battery_setpoint_w: compareMap.get(i.interval_start)?.battery_setpoint_w ?? null,
effective_buy_price: i.effective_buy_price,
raw: i,
@@ -1213,6 +1217,16 @@ export default function Planning() {
/>
))}
</Bar>
<Line
yAxisId="power"
type="monotone"
dataKey="grid_setpoint_w"
name="Síť W (+odb / exp)"
stroke="#f87171"
dot={false}
strokeWidth={2}
connectNulls
/>
<Line
yAxisId="power"
type="monotone"