Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • web-et-numerique/factory/llle_project/ecolyo
1 result
Select Git revision
Show changes
Commits on Source (5)
Showing
with 34 additions and 37 deletions
......@@ -50,6 +50,7 @@ module.exports = {
'no-param-reassign': 'warn',
'spaced-comment': ['error', 'always', { block: { exceptions: ['*'] } }],
'react/self-closing-comp': 'warn',
'react/jsx-curly-brace-presence': ['error'],
// Rule to suggest using useAppDispatch instead of regular useDispatch
'no-restricted-imports': 'off',
......
......@@ -45,13 +45,13 @@ const ActionModal = ({
<Dialog
open={open}
onClose={handleCloseClick}
aria-labelledby={'accessibility-title'}
aria-labelledby="accessibility-title"
classes={{
root: 'modal-root',
paper: 'modal-paper',
}}
>
<div id={'accessibility-title'}>
<div id="accessibility-title">
{t('action_modal.accessibility.window_title')}
</div>
<div className="action-modal">
......
......@@ -28,10 +28,10 @@ const ActionView = () => {
return (
<>
<CozyBar titleKey={'common.title_action'} displayBackArrow={true} />
<CozyBar titleKey="common.title_action" displayBackArrow={true} />
<Header
setHeaderHeight={setHeaderHeight}
desktopTitleKey={'common.title_action'}
desktopTitleKey="common.title_action"
displayBackArrow={true}
/>
<Content heightOffset={headerHeight}>
......
......@@ -111,10 +111,10 @@ const AnalysisView = () => {
return (
<>
<CozyBar titleKey={'common.title_analysis'} />
<CozyBar titleKey="common.title_analysis" />
<Header
setHeaderHeight={setHeaderHeight}
desktopTitleKey={'common.title_analysis'}
desktopTitleKey="common.title_analysis"
>
<DateNavigator
disableNext={isLastDateReached(analysisMonth, TimeStep.MONTH)}
......
......@@ -58,7 +58,7 @@ const FluidPerformanceIndicator = ({
</span>
)}
{performanceIndicator?.percentageVariation !== null && (
<div className={`fpi-comparison`}>
<div className="fpi-comparison">
<span
className={`percent ${positive ? 'positive' : 'negative'}`}
>
......
......@@ -70,7 +70,7 @@ const ElecHalfHourMonthlyAnalysis = ({
/>
)
} else {
return <p className={`text-20-bold no_data`}>{t('analysis.no_data')}</p>
return <p className="text-20-bold no_data">{t('analysis.no_data')}</p>
}
}, [isDataFullyComplete, isWeekend, monthDataloads, t])
......
......@@ -18,13 +18,13 @@ const ElecInfoModal = ({ open, handleCloseClick }: ElecInfoModalProps) => {
<Dialog
open={open}
onClose={handleCloseClick}
aria-labelledby={'accessibility-title'}
aria-labelledby="accessibility-title"
classes={{
root: 'modal-root',
paper: 'modal-paper',
}}
>
<div id={'accessibility-title'}>
<div id="accessibility-title">
{t('elec_info_modal.accessibility.window_title')}
</div>
<IconButton
......
......@@ -148,7 +148,7 @@ const MaxConsumptionCard = ({
{!isLoading && (
<>
{!maxDayData && (
<p className={`text-20-bold no_data`}>{t('analysis.no_data')}</p>
<p className="text-20-bold no_data">{t('analysis.no_data')}</p>
)}
{maxDayData && currentFluid !== undefined && (
<>
......
......@@ -73,7 +73,7 @@ const TotalAnalysisChart = ({
{formatNumberValues(0)}
<span className="euro-unit">{t('FLUID.MULTIFLUID.UNIT')}</span>
</div>
<div className={`text-20-bold no_data`}>{t('analysis.no_data')}</div>
<div className="text-20-bold no_data">{t('analysis.no_data')}</div>
</PieChart>
)
......
......@@ -293,7 +293,7 @@ const ChallengeCardOnGoing = ({
)
} else {
return (
<Button className={`smallCard duelCard duelLocked`} disabled>
<Button className="smallCard duelCard duelLocked" disabled>
<div className="starCount">
<StyledIcon icon={circleStar} size={30} />
<span className="blueNumber">
......
......@@ -22,13 +22,13 @@ const ChallengeNoFluidModal = ({
onClose={(event, reason): void => {
event && reason !== 'backdropClick' && handleCloseClick()
}}
aria-labelledby={'accessibility-title'}
aria-labelledby="accessibility-title"
classes={{
root: 'modal-root',
paper: 'modal-paper',
}}
>
<div id={'accessibility-title'}>
<div id="accessibility-title">
{t('challenge_no_fluid_modal.accessibility.window_title')}
</div>
<div className="noFluidModal">
......
......@@ -105,10 +105,10 @@ const ChallengeView = () => {
return (
<>
<CozyBar titleKey={'common.title_challenge'} />
<CozyBar titleKey="common.title_challenge" />
<Header
setHeaderHeight={setHeaderHeight}
desktopTitleKey={'common.title_challenge'}
desktopTitleKey="common.title_challenge"
/>
<Content heightOffset={headerHeight}>
<div
......
......@@ -112,7 +112,7 @@ function TextAxis({
return (
<text x={width} y="10" dy="0.71em">
<tspan className={style} textAnchor="middle">
{'-'}
-
</tspan>
</text>
)
......
......@@ -87,7 +87,7 @@ const UncomingBar = ({
y="0"
width={getBandWidth()}
height={height + 40}
className={`background-false`}
className="background-false"
fill="#E0E0E0"
/>
</g>
......@@ -107,7 +107,7 @@ const UncomingBar = ({
)}
fill="url(#gradient)"
strokeDasharray="5"
stroke={'#61f0f2'}
stroke="#61f0f2"
onAnimationEnd={onAnimationEnd}
className={barClass}
/>
......
......@@ -17,16 +17,12 @@ jest.mock('components/Content/Content', () => 'mock-content')
describe('ErrorPage component', () => {
it('should be rendered correctly', async () => {
const wrapper = mount(
<ErrorPage text={'test'} returnPage={'ecogestures'} />
)
const wrapper = mount(<ErrorPage text="test" returnPage="ecogestures" />)
expect(toJson(wrapper)).toMatchSnapshot()
})
it('should click on button and be redirected', () => {
const wrapper = mount(
<ErrorPage text={'test'} returnPage={'ecogestures'} />
)
const wrapper = mount(<ErrorPage text="test" returnPage="ecogestures" />)
wrapper.find(Button).simulate('click')
expect(mockedNavigate).toHaveBeenCalledWith('/ecogestures')
})
......
......@@ -21,10 +21,10 @@ const ErrorPage = ({ text, returnPage }: ErrorPageProps) => {
return (
<>
<CozyBar titleKey={'error_page.main'} />
<CozyBar titleKey="error_page.main" />
<Header
setHeaderHeight={setHeaderHeight}
desktopTitleKey={'error_page.main'}
desktopTitleKey="error_page.main"
/>
<Content heightOffset={headerHeight}>
<div className="error-container">
......@@ -34,7 +34,7 @@ const ErrorPage = ({ text, returnPage }: ErrorPageProps) => {
<Button
aria-label={t('error_page.back')}
onClick={() => navigate(`/${returnPage}`)}
variant={'contained'}
variant="contained"
classes={{
root: 'btn-highlight',
label: 'text-18-bold',
......
......@@ -59,7 +59,7 @@ const FormNavigation = ({
<Button
aria-label={t('profile_type.accessibility.button_previous')}
onClick={handlePreviousClick}
className={'profile-navigation-button'}
className="profile-navigation-button"
disabled={
disablePrevButton || step === ProfileTypeStepForm.HOUSING_TYPE
}
......
......@@ -16,11 +16,11 @@ const FormProgress = ({ step, formType }: FormProgressProps) => {
return progress
}
return (
<div className={'profile-type-progress'}>
<div className={'profile-type-progress-label'}>{getProgress()}%</div>
<div className={'profile-type-progress-bar-container'}>
<div className="profile-type-progress">
<div className="profile-type-progress-label">{getProgress()}%</div>
<div className="profile-type-progress-bar-container">
<div
className={'profile-type-progress-bar-content'}
className="profile-type-progress-bar-content"
style={{ width: `${getProgress()}%` }}
/>
</div>
......
......@@ -23,7 +23,7 @@ const EpglBill = () => {
<StyledIcon icon={WaterBillIcon} size={180} />
<p
className={'connection-form-subtitle eglgrandlyon text-16-regular'}
className="connection-form-subtitle eglgrandlyon text-16-regular"
dangerouslySetInnerHTML={{ __html: t('auth.eglgrandlyon.bill') }}
/>
......
......@@ -63,13 +63,13 @@ const ExpiredConsentModal = ({
<Dialog
open={open}
onClose={toggleModal}
aria-labelledby={'accessibility-title'}
aria-labelledby="accessibility-title"
classes={{
root: 'modal-root',
paper: 'modal-paper',
}}
>
<div id={'accessibility-title'}>
<div id="accessibility-title">
{t('consumption_visualizer.modal.window_title')}
</div>
<IconButton
......