planner v2 vc. porovnani
Some checks failed
CI and deploy / migration-check (push) Failing after 20s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-05-15 23:03:32 +02:00
parent d89d8b1e3a
commit 7490ac3d70
11 changed files with 900 additions and 29 deletions

View File

@@ -6,7 +6,7 @@ import type {
SitePvForecastCalibrationRow,
} from '../types/siteConfiguration'
import type { Notification } from '../types/dashboard'
import type { CurrentPlanResponse, RunPlanResponse } from '../types/plan'
import type { CurrentPlanResponse, PlanningCompareResponse, RunPlanResponse } from '../types/plan'
const client: AxiosInstance = axios.create({
baseURL: '/api/v1',
@@ -124,6 +124,13 @@ export async function getCurrentPlan(siteId: number): Promise<CurrentPlanRespons
return data
}
export async function getPlanCompare(siteId: number): Promise<PlanningCompareResponse> {
const { data } = await client.get<PlanningCompareResponse>(`/sites/${siteId}/plan/compare`, {
timeout: 60_000,
})
return data
}
/** Řada FVE předpovědi (součet polí) po 15 min — doplnění grafu za horizont uloženého plánu. */
export type ForecastPvSlotRow = {
interval_start: string