[Feature] Adds timeseries display (#313)

Adds a way to input/display timeseries data to the additional information

Reviewed-on: enviPath/enviPy#313
Reviewed-by: jebus <lorsbach@envipath.com>
Co-authored-by: Tobias O <tobias.olenyi@envipath.com>
Co-committed-by: Tobias O <tobias.olenyi@envipath.com>
This commit is contained in:
2026-02-04 01:01:06 +13:00
committed by jebus
parent d80dfb5ee3
commit dc18b73e08
23 changed files with 1772 additions and 411 deletions

View File

@ -6,7 +6,7 @@
<span
class="label-text"
:class="{
'text-error': hasError,
'text-error': hasValidationError || $store.validationErrors.hasError(fieldName, context),
'text-sm text-base-content/60': isViewMode
}"
x-text="label"
@ -41,11 +41,11 @@
<!-- Edit mode: two inputs with shared unit badge -->
<template x-if="isEditMode">
<div class="flex gap-2 items-center">
<div class="flex items-center gap-2">
<input
type="number"
class="input input-bordered flex-1"
:class="{ 'input-error': hasError }"
:class="{ 'input-error': hasValidationError || $store.validationErrors.hasError(fieldName, context) }"
placeholder="Min"
x-model="start"
/>
@ -53,7 +53,7 @@
<input
type="number"
class="input input-bordered flex-1"
:class="{ 'input-error': hasError }"
:class="{ 'input-error': hasValidationError || $store.validationErrors.hasError(fieldName, context) }"
placeholder="Max"
x-model="end"
/>
@ -64,9 +64,22 @@
</template>
<!-- Errors -->
<template x-if="hasError">
<template
x-if="hasValidationError || $store.validationErrors.hasError(fieldName, context)"
>
<div class="label">
<template x-for="errMsg in errors" :key="errMsg">
<!-- Client-side validation error -->
<template x-if="hasValidationError">
<span class="label-text-alt text-error">
Start value must be less than or equal to end value
</span>
</template>
<!-- Server-side validation errors from store -->
<template
x-for="errMsg in $store.validationErrors.getErrors(fieldName, context)"
:key="errMsg"
>
<span class="label-text-alt text-error" x-text="errMsg"></span>
</template>
</div>