diff --git a/src/components/ContainerComponents/FluidChartContainer/FluidChartContainer.tsx b/src/components/ContainerComponents/FluidChartContainer/FluidChartContainer.tsx index 5837e30ee3193f234c59a47f9519943497e32b24..679caa1b4021a3b570cd626d5206f16de97060aa 100644 --- a/src/components/ContainerComponents/FluidChartContainer/FluidChartContainer.tsx +++ b/src/components/ContainerComponents/FluidChartContainer/FluidChartContainer.tsx @@ -52,6 +52,7 @@ const FluidChartContainer: React.FC<FluidChartContainerProps> = ({ FluidType.ELECTRICITY, TimeStep.HALF_AN_HOUR )) + const data = await consumptionDataManager.fetchLastDateData(fluidTypes) const dataWithAllFluids = await consumptionDataManager.fetchLastDateData( fluidTypes, @@ -112,23 +113,27 @@ 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 === TimeStep.HALF_AN_HOUR && ( + <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} </> ) diff --git a/src/services/consumptionDataManagerService.ts b/src/services/consumptionDataManagerService.ts index ff2d6ec33e0e4b35a9c6df861ede69c0b3f33605..b203ecb491b6e8db3d992536e511e790cf11a23d 100644 --- a/src/services/consumptionDataManagerService.ts +++ b/src/services/consumptionDataManagerService.ts @@ -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 diff --git a/src/styles/base/_layout.scss b/src/styles/base/_layout.scss index e3665c494934bda5a4f1ff5ebc4d96f1e5d882c5..c7cc19fdf95b2df2683a60b4ef3612ea6d744663 100644 --- a/src/styles/base/_layout.scss +++ b/src/styles/base/_layout.scss @@ -122,30 +122,6 @@ body { } } -.cta-box { - background-color:rgba(18, 18, 18, 0.7); - position: absolute; - - padding: 1.5rem 1rem 1rem 0rem; - z-index: 1; - display: flex; - justify-content: center; - flex-direction: column; - height: 50%; - .cta-box-header { - text-align: center; - font-weight: bold; - letter-spacing: 0.2px; - margin-bottom: 1.5em; - color: $text-bright; - } - .cta-box-button { - margin-left: auto; - margin-right: auto; - width: 80%; - } -} - [role='main'] { /* width */ &::-webkit-scrollbar { diff --git a/src/styles/components/_fluid.scss b/src/styles/components/_fluid.scss index 33cc49178ee5a8c52c6d61d3a6419b2b58e366bb..eefc82bf4df61ae03de2099b596aa8fa7a899322 100644 --- a/src/styles/components/_fluid.scss +++ b/src/styles/components/_fluid.scss @@ -90,7 +90,7 @@ } } } - + .fv-footer-challenge { width: 100%; max-width: 58.75rem; @@ -126,3 +126,45 @@ } } } + +// Enedis Half Hour Load Activation +.cta-box { + 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: 29rem; + width: 100vw; + } + @media #{$tablet} { + width: 100vw; + } + + .cta-box-header { + text-align: center; + font-weight: bold; + 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: 50%; + @media #{$large-phone} { + width: 80%; + } + } +} diff --git a/src/styles/components/_oauth.scss b/src/styles/components/_oauth.scss index 7e305641fd84873ee25f6c141bdeb0777d38b093..6e85346fac53804cb39dc80a2fa13607d6b555e0 100644 --- a/src/styles/components/_oauth.scss +++ b/src/styles/components/_oauth.scss @@ -12,5 +12,6 @@ display: flex; flex-direction: column; align-items: flex-start; + text-align: left; } } \ No newline at end of file