mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-12 00:02:53 +00:00
Fixed non-CET price presentation
This commit is contained in:
parent
f323c5a4f6
commit
a2f0b33f7d
@ -140,17 +140,17 @@
|
||||
{#if uiVisibility(sysinfo.ui.p, data.p && !Number.isNaN(data.p))}
|
||||
{#if importPrices?.importExportPriceDifferent && (data.om || data.e > 0)}
|
||||
<div class="cnt gwf">
|
||||
<PricePlot title="{translations.dashboard?.price_import ?? "Price import"}" json={importPrices}/>
|
||||
<PricePlot title="{translations.dashboard?.price_import ?? "Price import"}" json={importPrices} sysinfo={sysinfo}/>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="cnt gwf">
|
||||
<PricePlot title={translations.dashboard?.price ?? "Price"} json={importPrices}/>
|
||||
<PricePlot title={translations.dashboard?.price ?? "Price"} json={importPrices} sysinfo={sysinfo}/>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if importPrices?.importExportPriceDifferent && (data.om || data.e > 0) && uiVisibility(sysinfo.ui.p, data.pe && !Number.isNaN(data.pe))}
|
||||
<div class="cnt gwf">
|
||||
<PricePlot title={translations.dashboard?.price_export ?? "Price export"} json={exportPrices}/>
|
||||
<PricePlot title={translations.dashboard?.price_export ?? "Price export"} json={exportPrices} sysinfo={sysinfo}/>
|
||||
</div>
|
||||
{/if}
|
||||
{#if uiVisibility(sysinfo.ui.d, dayPlot)}
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
|
||||
export let title;
|
||||
export let json;
|
||||
export let sysinfo;
|
||||
|
||||
let config = {};
|
||||
let max;
|
||||
@ -40,6 +41,7 @@
|
||||
let values = [];
|
||||
min = max = 0;
|
||||
let i = Math.floor(((cur.getHours()*60) + cur.getMinutes()) / json?.resolution);
|
||||
addHours(cur, sysinfo.clock_offset - ((24 + cur.getHours() - cur.getUTCHours())%24));
|
||||
cur.setMinutes(Math.floor(cur.getMinutes()/json?.resolution)*json?.resolution,0,0);
|
||||
while(i < json?.prices?.length) {
|
||||
val = json.prices[i];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user