Skip to content
Snippets Groups Projects
Commit 3373f5c5 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

fix USER_ACTION_NEEDED_ACCOUNT_REMOVED

parent d94b20b5
No related branches found
No related tags found
2 merge requests!1154feat: GRDF consent email,!1137feat(grdf)!: update error messages
......@@ -256,7 +256,7 @@ const KonnectorModal = ({
<div className="headerError text-20-bold">
{t('konnector_modal.error_txt')}
</div>
<div className="title text-20-bold">
<div className="title text-16-bold">
{t('konnector_modal.error_consent_form_gas_title')}
</div>
<div className="err-data-2">
......@@ -265,7 +265,9 @@ const KonnectorModal = ({
</div>
)}
{error !== KonnectorError.LOGIN_FAILED &&
error !== KonnectorError.TERMS_VERSION_MISMATCH && (
error !== KonnectorError.TERMS_VERSION_MISMATCH &&
error !==
KonnectorError.USER_ACTION_NEEDED_ACCOUNT_REMOVED && (
// DEFAULT CASE
<div className="konnector-config">
<Icon icon={errorIcon} size={48} />
......
......@@ -7,10 +7,10 @@ import { Account } from 'models'
import React, { useCallback } from 'react'
import { useNavigate } from 'react-router-dom'
import AccountService from 'services/account.service'
import { useAppDispatch } from 'store/hooks'
import { openFeedbackModal } from 'store/modal/modal.slice'
import './konnectorModal.scss'
declare let __SAU_ISSUE_DIRECT_LINK__: string
interface KonnectorModalFooterProps {
state: string | null
error: KonnectorError | null
......@@ -31,7 +31,6 @@ const KonnectorModalFooter = ({
const { t } = useI18n()
const client = useClient()
const navigate = useNavigate()
const dispatch = useAppDispatch()
const handleSGELoginRetry = useCallback(() => {
handleCloseClick(state === SUCCESS_EVENT)
......@@ -107,7 +106,12 @@ const KonnectorModalFooter = ({
return (
<Button
aria-label={t('konnector_modal.accessibility.button_close')}
onClick={() => dispatch(openFeedbackModal(true))}
onClick={() => {
window.open(
`${__SAU_ISSUE_DIRECT_LINK__}?version=${client.appMetadata.version}`
)
handleCloseClick(state === SUCCESS_EVENT)
}}
className="btnPrimary"
>
<div>{t('konnector_modal.button_contact')}</div>
......
......@@ -176,7 +176,9 @@ const KonnectorViewerCard = ({
konnectorErrorDescription === KonnectorError.LOGIN_FAILED ||
konnectorErrorDescription === KonnectorError.UNKNOWN_ERROR ||
konnectorErrorDescription === KonnectorError.CRITICAL ||
konnectorErrorDescription === KonnectorError.MISSING_SECRET
konnectorErrorDescription === KonnectorError.MISSING_SECRET ||
konnectorErrorDescription ===
KonnectorError.USER_ACTION_NEEDED_ACCOUNT_REMOVED
// CASE FOR ENEDIS CODE INSEE ERROR
const isEnedisCodeInseeError =
......
......@@ -6,7 +6,7 @@ export enum KonnectorError {
UNKNOWN_ERROR = 'UNKNOWN_ERROR',
CRITICAL = 'exit status 1',
MISSING_SECRET = "Cannot read property 'secret' of null",
USER_ACTION_NEEDED_ACCOUNT_REMOVED = 'USER_ACTION_NEEDED_ACCOUNT_REMOVED',
USER_ACTION_NEEDED_ACCOUNT_REMOVED = 'USER_ACTION_NEEDED.ACCOUNT_REMOVED',
}
export enum KonnectorUpdate {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment