Commit c7b20531 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

Merge branch 'fix/design-fixs' into 'dev'

Fix/design fixs

See merge request web-et-numerique/llle_project/ecolyo!489
parents c837ad75 428517c2
......@@ -175,7 +175,10 @@ const Bar = ({
return (
<g>
{height > 0 ? (
<g transform={`translate(${xScaleValue}, -40)`}>
<g
transform={`translate(${xScaleValue}, -40)`}
className="barContainer"
>
<rect
onClick={handleClick}
x="0"
......@@ -194,6 +197,7 @@ const Bar = ({
<g
transform={`translate(${xScaleValue}, ${yScaleValue})`}
fill="#00000"
className="barFill"
>
<defs>
<linearGradient
......
......@@ -55,16 +55,18 @@ const FluidChart: React.FC<FluidChartProps> = ({
let isEnedisConsentValid = true
async function loadData() {
const consumptionService = new ConsumptionService(client)
const activateHalfHourLoad = await consumptionService.checkDoctypeEntries(
FluidType.ELECTRICITY,
TimeStep.HALF_AN_HOUR
)
let activateHalfHourLoad = false
if (fluidType === FluidType.ELECTRICITY) {
activateHalfHourLoad = await consumptionService.checkDoctypeEntries(
FluidType.ELECTRICITY,
TimeStep.HALF_AN_HOUR
)
}
if (currentTimeStep === TimeStep.HALF_AN_HOUR && activateHalfHourLoad) {
isEnedisConsentValid = await consumptionService.checkEnedisHalHourConsent(
selectedDate
)
}
if (subscribed) {
if (!activateHalfHourLoad) {
setMinuteBlocked(true)
......@@ -77,7 +79,7 @@ const FluidChart: React.FC<FluidChartProps> = ({
return () => {
subscribed = false
}
}, [client, fluidStatus, selectedDate, currentTimeStep])
}, [client, fluidStatus, selectedDate, currentTimeStep, fluidType])
useEffect(() => {
if (!isMinuteBlocked && currentTimeStep === TimeStep.HALF_AN_HOUR) {
......
......@@ -63,7 +63,7 @@ const KonnectorModal: React.FC<KonnectorModalProps> = ({
useEffect(() => {
const interval = setInterval(() => {
if (open && !state) {
if (open && (!state || state === LOGIN_SUCCESS_EVENT)) {
setIndex((prev: number) => prev + 1)
}
}, 8000)
......
......@@ -63,6 +63,7 @@ const ProfileTypeFormNumber: React.FC<ProfileTypeFormNumberProps> = ({
value={answer}
name={answerType.attribute}
onChange={e => setAnswer(e.target.value)}
autoFocus
/>
</label>
......
......@@ -21,8 +21,17 @@
fill: $grey-bright;
}
}
.barContainer,
.barFill {
&:hover {
cursor: pointer;
}
}
.background-true {
opacity: 0.1;
&:hover {
cursor: pointer;
}
}
.background-false {
opacity: 0;
......@@ -100,7 +109,7 @@
}
}
.bar-duel {
fill: $blue-light;
fill: $blue-light;
&.selected {
fill: $blue-light;
filter: drop-shadow(0 -0.1rem 0.2rem $blue-light);
......@@ -133,7 +142,7 @@
}
}
.bar-average {
stroke-width:2;
stroke-width: 2;
stroke: $multi-color;
}
/** Animation **/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment