diff --git a/src/components/ContentComponents/Konnector/KonnectorLaunch.tsx b/src/components/ContentComponents/Konnector/KonnectorLaunch.tsx index 7ab7567a0a68b7abde854c616d005b0c1ee49d5d..0f19c13582c4f599510ba3f78377b2ab2c324225 100644 --- a/src/components/ContentComponents/Konnector/KonnectorLaunch.tsx +++ b/src/components/ContentComponents/Konnector/KonnectorLaunch.tsx @@ -85,30 +85,13 @@ const KonnectorLaunch: React.FC<KonnectorLaunchProps> = ({ </> ) : ( <> - <div> - {state === ERROR_EVENT ? ( - <div> - {t('KONNECTORCONFIG.ERROR_ACCOUNT_CREATION')} - <StyledButton - type="button" - color="primary" - onClick={handleClick} - > - <div>{t('KONNECTORCONFIG.OK')}</div> - </StyledButton> - </div> - ) : ( - <div> - {t('KONNECTORCONFIG.SUCCESS')} - <StyledButton - type="button" - color="primary" - onClick={handleClick} - > - <div>{t('KONNECTORCONFIG.OK')}</div> - </StyledButton> - </div> - )} + <div className="konnector-info-txt"> + {state === ERROR_EVENT + ? t('KONNECTORCONFIG.ERROR_DATA') + : t('KONNECTORCONFIG.SUCCESS')} + <StyledButton type="button" color="primary" onClick={handleClick}> + <div>{t('KONNECTORCONFIG.OK')}</div> + </StyledButton> </div> </> )} diff --git a/src/components/ContentComponents/Konnector/KonnectorResult.tsx b/src/components/ContentComponents/Konnector/KonnectorResult.tsx index 4da3b219cdb0d5b4753a8325461d5040d51b8861..579fad83e01cf3b08c660cf2894970a65e8d4186 100644 --- a/src/components/ContentComponents/Konnector/KonnectorResult.tsx +++ b/src/components/ContentComponents/Konnector/KonnectorResult.tsx @@ -44,7 +44,9 @@ const KonnectorResult: React.FC<KonnectorResultProps> = ({ if (triggerState) { // TODO - format date console.log('triggerState', triggerState) - setLastExecutionDate(new Date(triggerState.last_execution).toDateString()) + setLastExecutionDate( + new Date(triggerState.last_execution).toLocaleString() + ) setStatus(triggerState.status) handleJobState(triggerState.status) await context.refreshFluidTypes() diff --git a/src/locales/en.json b/src/locales/en.json index 7c4ab690af120c5bec06ea79a30daee778110a9a..7e7682b5f2ad3c4efeff930a38601da6a561de9d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -124,9 +124,10 @@ "PLZ_WAIT": "Veuillez patienter...", "NOT_INSTALLED": "Le connecteur n'est pas installé. Veuillez l'installer en cliquant sur le bouton ci-dessous.", "ERROR_NO_LOGIN_PASSWORD": "Identifiant et mot de passe requis", - "ERROR_ACCOUNT_CREATION": "Une erreur est survenue, veuillez essayer de nouveau", + "ERROR_ACCOUNT_CREATION": "Une erreur est survenue, veuillez essayer de nouveau.", "ERROR_LOGIN_FAILED": "Identifiants invalides", - "SUCCESS": "Félicitations, la connexion a été effectuée", + "SUCCESS": "Félicitations, la connexion a été effectuée.", + "ERROR_DATA": "Une erreur est survenue pendant le rapatriement des données.", "OK": "Ok" }, "INDICATOR": { diff --git a/src/styles/components/_konnector.scss b/src/styles/components/_konnector.scss index 99d669c38b53a2863131140ffb23dae3fc2372bf..b306ca2e4d705caf28e3271065a43e254783a0dc 100644 --- a/src/styles/components/_konnector.scss +++ b/src/styles/components/_konnector.scss @@ -113,31 +113,31 @@ } // KonnectorNotFound -.knotfound{ +.knotfound { margin: 0 1.5rem; @media #{$large-phone} { margin: 0; } - .knotfound-text{ + .knotfound-text { color: $text-bright; padding-top: 1rem; } - .knotfound-button{ + .knotfound-button { margin-bottom: 1rem; } } // KonnectorOAuthForm -.koauthform{ +.koauthform { margin: 0 1.5rem; @media #{$large-phone} { margin: 0; } - .koauthform-text{ + .koauthform-text { color: $text-bright; padding-top: 1rem; } - .koauthform-button{ + .koauthform-button { margin-bottom: 1rem; } } @@ -157,9 +157,14 @@ } } +.konnector-info-txt { + margin-top: 1.5rem; +} + .state-icon { height: 22px; width: 22px; - margin-left: 32px; - margin-bottom: 40px; + position: absolute; + bottom: 8px; + left: 30px; }