Skip to content
Snippets Groups Projects
Commit 405a3f17 authored by Pierre Ecarlat's avatar Pierre Ecarlat
Browse files

fix: Handle the refuse status for grdf

parent 5f3901d0
No related branches found
No related tags found
1 merge request!1286fix: Handle the refuse status for grdf
......@@ -159,6 +159,7 @@
"usageevent",
"Usain",
"userchallenge",
"WEBAUTH",
"weektype"
],
"typescript.tsdk": "node_modules/typescript/lib",
......
......@@ -92,6 +92,9 @@ const KonnectorViewerCard = ({
const isWaitingForConsent =
fluidType === FluidType.GAS &&
currentFluidStatus.status === FluidState.CHALLENGE_ASKED
const emailHasBeenIgnored =
fluidType === FluidType.GAS &&
currentFluidStatus.status === FluidState.EMAIL_IGNORED
const fluidService = useMemo(() => new FluidService(client), [client])
const accountService = useMemo(() => new AccountService(client), [client])
......@@ -465,7 +468,7 @@ const KonnectorViewerCard = ({
return (
<div className="konnector-section-root">
{isWaitingForConsent && <GrdfWaitConsent />}
{!isWaitingForConsent && !showOfflineData && (
{(!isWaitingForConsent || emailHasBeenIgnored) && !showOfflineData && (
<Connection fluidType={fluidType} />
)}
{!isWaitingForConsent && showOfflineData && (
......
......@@ -13,4 +13,5 @@ export enum FluidState {
ERROR = 'ERROR',
LOGIN_FAILED = 'LOGIN_FAILED',
CHALLENGE_ASKED = 'CHALLENGE_ASKED',
EMAIL_IGNORED = 'EMAIL_IGNORED',
}
......@@ -4,6 +4,7 @@ export enum KonnectorError {
USER_ACTION_NEEDED = 'USER_ACTION_NEEDED',
TERMS_VERSION_MISMATCH = 'TERMS_VERSION_MISMATCH',
CHALLENGE_ASKED = 'CHALLENGE_ASKED',
EMAIL_IGNORED = 'USER_ACTION_NEEDED.WEBAUTH_REQUIRED',
UNKNOWN_ERROR = 'UNKNOWN_ERROR',
CRITICAL = 'exit status 1',
MISSING_SECRET = "Cannot read property 'secret' of null",
......
......@@ -31,6 +31,9 @@ export default class FluidService {
if (state?.last_error === 'CHALLENGE_ASKED') {
return FluidState.CHALLENGE_ASKED
}
if (state?.last_error === 'EMAIL_IGNORED') {
return FluidState.EMAIL_IGNORED
}
return FluidState.ERROR
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment