Skip to content
Snippets Groups Projects
Commit 6cd710a7 authored by Romain CREY's avatar Romain CREY
Browse files

fix: half hour warning

parent e38a2e87
No related branches found
No related tags found
3 merge requests!28Merge fix from dev,!27Dev,!19Features/us135 cta enedis activation
......@@ -52,6 +52,8 @@ const FluidChartContainer: React.FC<FluidChartContainerProps> = ({
FluidType.ELECTRICITY,
TimeStep.HALF_AN_HOUR
))
console.log(activateHalfHourLoad)
const data = await consumptionDataManager.fetchLastDateData(fluidTypes)
const dataWithAllFluids = await consumptionDataManager.fetchLastDateData(
fluidTypes,
......@@ -112,23 +114,25 @@ const FluidChartContainer: React.FC<FluidChartContainerProps> = ({
return (
<>
{isLoaded ? (
<div className="fc-root">
<div className="fc-content">
{isMinuteBlocked && timeStep === 10 && <ActivateHalfHourLoad />}
<FluidChartContent
referenceDate={referenceDate}
lastDataDate={lastDataDate}
lastDateWithAllData={lastDateWithAllData}
fluidTypes={fluidTypes}
timeStep={timeStep}
multiFluid={multiFluid}
currentChallenge={challenge}
consumptionDataManager={consumptionDataManager}
isDataLoaded={isLoaded}
handleDetailedDate={handleDetailedDate}
></FluidChartContent>
<>
{isMinuteBlocked && timeStep === 10 && <ActivateHalfHourLoad />}
<div className="fc-root">
<div className="fc-content">
<FluidChartContent
referenceDate={referenceDate}
lastDataDate={lastDataDate}
lastDateWithAllData={lastDateWithAllData}
fluidTypes={fluidTypes}
timeStep={timeStep}
multiFluid={multiFluid}
currentChallenge={challenge}
consumptionDataManager={consumptionDataManager}
isDataLoaded={isLoaded}
handleDetailedDate={handleDetailedDate}
></FluidChartContent>
</div>
</div>
</div>
</>
) : null}
</>
)
......
......@@ -292,7 +292,7 @@ export default class ConsumptionDataManager implements IConsumptionDataManager {
timeStep: TimeStep
): Promise<boolean> {
const queryResult = await this._queryRunner.getEntries(fluideType, timeStep)
if (queryResult.length > 0) {
if (queryResult.data.length > 0) {
return true
}
return false
......
......@@ -90,7 +90,7 @@
}
}
}
.fv-footer-challenge {
width: 100%;
max-width: 58.75rem;
......@@ -129,18 +129,24 @@
// Enedis Half Hour Load Activation
.cta-box {
background-color:rgba(18, 18, 18, 0.7);
background-color: rgba(18, 18, 18, 0.8);
position: absolute;
left: 0;
width: calc(100vw - 220px);
padding: 0rem 1rem 0rem 0rem;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 37.5rem;
@media #{$large-phone} {
height: 26.5rem;
height: 29rem;
width: 100vw;
}
@media #{$tablet} {
width: 100vw;
}
height: 34.5rem;
.cta-box-header {
text-align: center;
......@@ -148,10 +154,17 @@
letter-spacing: 0.2px;
margin-bottom: 1.5em;
color: $text-bright;
width: 50%;
@media #{$large-phone} {
width: 80%;
}
}
.cta-box-button {
margin-left: auto;
margin-right: auto;
width: 80%;
width: 50%;
@media #{$large-phone} {
width: 80%;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment