Skip to content
Snippets Groups Projects
Commit 743e29f2 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

fix(conso): Disable half hour check if fluid different from elec

parent 2680d109
No related branches found
No related tags found
2 merge requests!4941.5.1,!489Fix/design fixs
...@@ -55,16 +55,18 @@ const FluidChart: React.FC<FluidChartProps> = ({ ...@@ -55,16 +55,18 @@ const FluidChart: React.FC<FluidChartProps> = ({
let isEnedisConsentValid = true let isEnedisConsentValid = true
async function loadData() { async function loadData() {
const consumptionService = new ConsumptionService(client) const consumptionService = new ConsumptionService(client)
const activateHalfHourLoad = await consumptionService.checkDoctypeEntries( let activateHalfHourLoad = false
FluidType.ELECTRICITY, if (fluidType === FluidType.ELECTRICITY) {
TimeStep.HALF_AN_HOUR activateHalfHourLoad = await consumptionService.checkDoctypeEntries(
) FluidType.ELECTRICITY,
TimeStep.HALF_AN_HOUR
)
}
if (currentTimeStep === TimeStep.HALF_AN_HOUR && activateHalfHourLoad) { if (currentTimeStep === TimeStep.HALF_AN_HOUR && activateHalfHourLoad) {
isEnedisConsentValid = await consumptionService.checkEnedisHalHourConsent( isEnedisConsentValid = await consumptionService.checkEnedisHalHourConsent(
selectedDate selectedDate
) )
} }
if (subscribed) { if (subscribed) {
if (!activateHalfHourLoad) { if (!activateHalfHourLoad) {
setMinuteBlocked(true) setMinuteBlocked(true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment