diff --git a/.gitignore b/.gitignore index 5917c13d05e815e3e477c50fc10aa7ed09630e0d..e6fb68796bfcfb3f3ba053c98ca1192e326e4863 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ scripts/AAAA* scripts/config.js scripts/data/ .token.json +AAAA* # Report public/report.html diff --git a/src/components/App.tsx b/src/components/App.tsx index a4b354b0a8198b8e88cb157c9341022a021e6390..cd290bbd0ef71a50fd8b192df69b06379bd2b480 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -18,9 +18,7 @@ interface AppProps { } export const App = ({ tracker }: AppProps) => { - const { onboarding, isProfileEcogestureCompleted } = useSelector( - (state: AppStore) => state.ecolyo.profile - ) + const { onboarding } = useSelector((state: AppStore) => state.ecolyo.profile) const { termsStatus } = useSelector((state: AppStore) => state.ecolyo.global) const isDev = new EnvironmentService().isLocal() diff --git a/src/components/Challenge/ChallengeCardDone.tsx b/src/components/Challenge/ChallengeCardDone.tsx index 9bcb3e36f99ffc04327b8fb64df99d6429681a64..74c094636db04e5a10f59194ff0b4d07649d38f5 100644 --- a/src/components/Challenge/ChallengeCardDone.tsx +++ b/src/components/Challenge/ChallengeCardDone.tsx @@ -5,7 +5,6 @@ import classNames from 'classnames' import { formatNumberValues, importIconbyId } from 'utils/utils' import { UserChallenge } from 'models' import { UserChallengeSuccess } from 'enum/userChallenge.enum' -import { DateTime } from 'luxon' import defaultIcon from 'assets/icons/visu/duelResult/default.svg' import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import { useHistory } from 'react-router-dom' diff --git a/src/components/Connection/SGEConnect/SgeConnect.scss b/src/components/Connection/SGEConnect/SgeConnect.scss index f3d4efd554adb256b003656ecdbd1b6147a79d95..1a2d9a29ff2ace0b5ee51be74a21d3c837605e80 100644 --- a/src/components/Connection/SGEConnect/SgeConnect.scss +++ b/src/components/Connection/SGEConnect/SgeConnect.scss @@ -1,7 +1,6 @@ @import 'src/styles/base/color'; @import 'src/styles/base/mixins'; .sge-view { - // background: $dark-2; box-sizing: border-box; min-height: inherit; width: inherit; @@ -17,6 +16,10 @@ display: block; margin-top: 1rem; margin-bottom: 0.625rem; + cursor: pointer; + span span { + color: $gold-shadow; + } } #zipCode { max-width: 115px; diff --git a/src/components/Connection/SGEConnect/SgeConnectView.tsx b/src/components/Connection/SGEConnect/SgeConnectView.tsx index 0aac63fb4b8e5fe8a241db77ac4e1c8a39e95bfc..3ca4f7369a30dffde112dee2b36a7b64592cfca3 100644 --- a/src/components/Connection/SGEConnect/SgeConnectView.tsx +++ b/src/components/Connection/SGEConnect/SgeConnectView.tsx @@ -68,6 +68,9 @@ const SgeConnectView: React.FC = () => { const updatedState = { ...currentSgeState, shouldLaunchAccount: true, + // switch to false in case the form fails and the user have to give its consent again + dataConsent: false, + pdlConfirm: false, } setcurrentSgeState(updatedState) dispatch(updateSgeStore(updatedState)) diff --git a/src/components/Connection/SGEConnect/SgeInit.tsx b/src/components/Connection/SGEConnect/SgeInit.tsx index 94b1463429e2cf4a8f814929c1dbb97bc91dc9fe..594a42eb06f44fab9806203d1f9e2420bb4930dd 100644 --- a/src/components/Connection/SGEConnect/SgeInit.tsx +++ b/src/components/Connection/SGEConnect/SgeInit.tsx @@ -1,7 +1,6 @@ import React, { useEffect } from 'react' - import { Account, FluidStatus } from 'models' -import { Icon, useI18n } from 'cozy-ui/transpiled/react/I18n' +import { useI18n } from 'cozy-ui/transpiled/react/I18n' import { Button } from '@material-ui/core' import { decoreText } from 'utils/decoreText' import ElectricityBillIcon from 'assets/icons/visu/partnerSteps/electricity_bill.svg' diff --git a/src/components/Connection/SGEConnect/StepAddress.spec.tsx b/src/components/Connection/SGEConnect/StepAddress.spec.tsx index 1feceb56978266b535db4e84d1ff66368ed4e910..dd8b7fbdfc20ed56cddb82dfe43a08f3a4cb2e98 100644 --- a/src/components/Connection/SGEConnect/StepAddress.spec.tsx +++ b/src/components/Connection/SGEConnect/StepAddress.spec.tsx @@ -4,7 +4,6 @@ import configureStore from 'redux-mock-store' import { Provider } from 'react-redux' import { globalStateData } from '../../../../tests/__mocks__/globalStateData.mock' import toJson from 'enzyme-to-json' -import SgeModalHint from './SgeModalHint' import StepAddress from './StepAddress' jest.mock('cozy-ui/transpiled/react/I18n', () => { diff --git a/src/components/Duel/lastDuelModal.tsx b/src/components/Duel/lastDuelModal.tsx index 5ebd3f2e8252d86472169d7fad0e95559d8a4bfe..97ac7a1a5f389b4b409bc55a46fb8d4052a801c6 100644 --- a/src/components/Duel/lastDuelModal.tsx +++ b/src/components/Duel/lastDuelModal.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react' +import React from 'react' import './lastDuelModal.scss' import { useI18n } from 'cozy-ui/transpiled/react/I18n' import Dialog from '@material-ui/core/Dialog' diff --git a/src/components/Export/exportDoneModal.tsx b/src/components/Export/exportDoneModal.tsx index 94c27041689b8cbddc2eb00e279605f42d2870bf..6de9ff9ce3c7632d6cc0f7e94b9581408027ae82 100644 --- a/src/components/Export/exportDoneModal.tsx +++ b/src/components/Export/exportDoneModal.tsx @@ -68,9 +68,6 @@ const ExportDoneModal: React.FC<ExportDoneModalProps> = ({ <div className="text-16-bold text"> {t('export.modal_done.error2')} </div> - <div className="text-16-normal text"> - {t('export.modal_done.error3')} - </div> </> )} diff --git a/src/components/Options/__snapshots__/exportOptions.spec.tsx.snap b/src/components/Options/__snapshots__/exportOptions.spec.tsx.snap index dbfa6739f19219a3cedc42d0b6223edfe3208825..eef4c6b133b447691229c8fad44c5d2d4d95784a 100644 --- a/src/components/Options/__snapshots__/exportOptions.spec.tsx.snap +++ b/src/components/Options/__snapshots__/exportOptions.spec.tsx.snap @@ -414,117 +414,6 @@ exports[`exportOptions component should be rendered correctly 1`] = ` > export.no_data </div> - <div - className="inline-button" - > - <WithStyles(ForwardRef(Button)) - aria-label="unsubscribe.button_accessibility" - classes={ - Object { - "label": "text-16-normal", - "root": "btn-secondary-negative", - } - } - disabled={true} - onClick={[Function]} - type="submit" - > - <ForwardRef(Button) - aria-label="unsubscribe.button_accessibility" - classes={ - Object { - "colorInherit": "MuiButton-colorInherit", - "contained": "MuiButton-contained", - "containedPrimary": "MuiButton-containedPrimary", - "containedSecondary": "MuiButton-containedSecondary", - "containedSizeLarge": "MuiButton-containedSizeLarge", - "containedSizeSmall": "MuiButton-containedSizeSmall", - "disableElevation": "MuiButton-disableElevation", - "disabled": "Mui-disabled", - "endIcon": "MuiButton-endIcon", - "focusVisible": "Mui-focusVisible", - "fullWidth": "MuiButton-fullWidth", - "iconSizeLarge": "MuiButton-iconSizeLarge", - "iconSizeMedium": "MuiButton-iconSizeMedium", - "iconSizeSmall": "MuiButton-iconSizeSmall", - "label": "MuiButton-label text-16-normal", - "outlined": "MuiButton-outlined", - "outlinedPrimary": "MuiButton-outlinedPrimary", - "outlinedSecondary": "MuiButton-outlinedSecondary", - "outlinedSizeLarge": "MuiButton-outlinedSizeLarge", - "outlinedSizeSmall": "MuiButton-outlinedSizeSmall", - "root": "MuiButton-root btn-secondary-negative", - "sizeLarge": "MuiButton-sizeLarge", - "sizeSmall": "MuiButton-sizeSmall", - "startIcon": "MuiButton-startIcon", - "text": "MuiButton-text", - "textPrimary": "MuiButton-textPrimary", - "textSecondary": "MuiButton-textSecondary", - "textSizeLarge": "MuiButton-textSizeLarge", - "textSizeSmall": "MuiButton-textSizeSmall", - } - } - disabled={true} - onClick={[Function]} - type="submit" - > - <WithStyles(ForwardRef(ButtonBase)) - aria-label="unsubscribe.button_accessibility" - className="MuiButton-root btn-secondary-negative MuiButton-text Mui-disabled" - component="button" - disabled={true} - focusRipple={true} - focusVisibleClassName="Mui-focusVisible" - onClick={[Function]} - type="submit" - > - <ForwardRef(ButtonBase) - aria-label="unsubscribe.button_accessibility" - className="MuiButton-root btn-secondary-negative MuiButton-text Mui-disabled" - classes={ - Object { - "disabled": "Mui-disabled", - "focusVisible": "Mui-focusVisible", - "root": "MuiButtonBase-root", - } - } - component="button" - disabled={true} - focusRipple={true} - focusVisibleClassName="Mui-focusVisible" - onClick={[Function]} - type="submit" - > - <button - aria-label="unsubscribe.button_accessibility" - className="MuiButtonBase-root MuiButton-root btn-secondary-negative MuiButton-text Mui-disabled Mui-disabled" - disabled={true} - onBlur={[Function]} - onClick={[Function]} - onDragLeave={[Function]} - onFocus={[Function]} - onKeyDown={[Function]} - onKeyUp={[Function]} - onMouseDown={[Function]} - onMouseLeave={[Function]} - onMouseUp={[Function]} - onTouchEnd={[Function]} - onTouchMove={[Function]} - onTouchStart={[Function]} - tabIndex={-1} - type="submit" - > - <span - className="MuiButton-label text-16-normal" - > - export.button_download - </span> - </button> - </ForwardRef(ButtonBase)> - </WithStyles(ForwardRef(ButtonBase))> - </ForwardRef(Button)> - </WithStyles(ForwardRef(Button))> - </div> </div> </ForwardRef(AccordionDetails)> </WithStyles(ForwardRef(AccordionDetails))> diff --git a/src/components/Options/exportOptions.tsx b/src/components/Options/exportOptions.tsx index 12542a58e6e533acd6f74e6af08f51ab2b65d1b4..77daa36271557f62eb7f4532564a9d835f338f94 100644 --- a/src/components/Options/exportOptions.tsx +++ b/src/components/Options/exportOptions.tsx @@ -153,23 +153,22 @@ const ExportOptions: React.FC = () => { {t('export.no_data')} </div> ) : ( - fluidCheckbox() + <> + {fluidCheckbox()} + <Button + aria-label={t('unsubscribe.button_accessibility')} + onClick={() => setIsExportStartModal(true)} + classes={{ + root: 'btn-secondary-negative', + label: 'text-16-normal', + }} + type="submit" + disabled={answer.length === 0} + > + {t('export.button_download')} + </Button> + </> )} - - <div className="inline-button"> - <Button - aria-label={t('unsubscribe.button_accessibility')} - onClick={() => setIsExportStartModal(true)} - classes={{ - root: 'btn-secondary-negative', - label: 'text-16-normal', - }} - type="submit" - disabled={answer.length === 0} - > - {t('export.button_download')} - </Button> - </div> </AccordionDetails> </Accordion> </div> diff --git a/src/locales/fr.json b/src/locales/fr.json index dca268023a7c4f59f675e9eac97e18d125495263..95fab822fc39f25b352db68ad0d58239d7ed3a4c 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -148,7 +148,7 @@ "lastName": "Nom", "pdlTitle": "Numéro de votre compteur électrique (PDL)", "pdlLabel": "N° (14 chiffes)", - "pdlHint": "Où trouver le n° de PDL ?", + "pdlHint": "Où trouver le n° de PDL\u00a0?", "addressTitle": "Adresse du titulaire", "address": "Numéro et voie", "zipCode": "Code postal", @@ -163,7 +163,7 @@ "consentCheck2": "J’atteste être le titulaire du point de livraison (PDL) renseigné à l’étape précédente", "modalHint": { "accessibility": "Titre de la modale", - "title": "Où trouver le n° de PDL ?", + "title": "Où trouver le n° de PDL\u00a0?", "button": "J'ai compris", "button-accessibility": "Bouton valider" } @@ -1170,7 +1170,7 @@ "accessibility_title": "Commencer le téléchargement", "text1": "Vous allez télécharger des données personnelles, Ecolyo n’est plus responsable de celles-ci une fois téléchargées", "text2": "Les données seront téléchargées sous forme de document excel (.xls)", - "text3": "Lancer le téléchargement?", + "text3": "Lancer le téléchargement\u00a0?", "button_cancel": "Annuler" }, "modal_loading": { @@ -1185,7 +1185,6 @@ "text2": "Vous pouvez maintenant retrouver l’historique de vos données sur votre appareil", "error1": "Aïe !", "error2": "Il semblerait qu’une erreur se soit produite lors du téléchargement de vos données.", - "error3": "Essayez à nouveau de vous connecter plus tard.", "button_close": "Fermer", "button_close_error": "Revenir plus tard" }