From 00743fd5708ce4af62039ca7f6422bd22dbd747e Mon Sep 17 00:00:00 2001
From: Alice Di Rico <83651704+Ladirico@users.noreply.github.com>
Date: Mon, 5 Feb 2024 10:12:55 +0100
Subject: [PATCH] fix: [IOPID-1436], [IOPID-1453] Delete helper button and
header title on email validate screen and add logic to show support buttons
in faq screen (#5484)
## Short description
delete helper button and header title on email validate screen and add
logic to show support buttons in faq screen.
## List of changes proposed in this pull request
### [IOPID-1436]: delete helper button and header title on email
validate screen
Delete header title and helper in validate/validated email screens.
### How to test
Run the application and execute the email validation flow
### [IOPID-1453]: add logic to show support buttons in faq screen
Change logic to show support buttons. The buttons for requesting
assistance are only shown if the user has the e-mail validated or if the
user is not yet logged in with SPID/CIE. If the user has not validated
the email, the buttons are not shown.
| not logged | logged with validated email | logged no validated email |
| - | - | - |
|
|
|
|
### How to test
Run the application with [this line
commented](https://github.com/pagopa/io-app/blob/6c076a1fee25c0a0853644d63aa894ff26854aa3/ts/sagas/startup.ts#L492)
in order to disable the blocks that do not allow you to continue in the
app if you do not have a validated email
[IOPID-1436]:
https://pagopa.atlassian.net/browse/IOPID-1436?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[IOPID-1453]:
https://pagopa.atlassian.net/browse/IOPID-1453?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
---
.../NewRemindEmailValidationOverlay.tsx | 5 -
.../components/ZendeskSupportComponent.tsx | 100 ++++++++++--------
ts/store/reducers/assistanceTools.ts | 13 +--
ts/utils/__tests__/supportAssistance.test.ts | 12 +--
ts/utils/supportAssistance.ts | 7 +-
5 files changed, 64 insertions(+), 73 deletions(-)
diff --git a/ts/components/NewRemindEmailValidationOverlay.tsx b/ts/components/NewRemindEmailValidationOverlay.tsx
index 504a705386b..8c2f931172b 100644
--- a/ts/components/NewRemindEmailValidationOverlay.tsx
+++ b/ts/components/NewRemindEmailValidationOverlay.tsx
@@ -213,11 +213,6 @@ const NewRemindEmailValidationOverlay = (props: Props) => {
diff --git a/ts/features/zendesk/components/ZendeskSupportComponent.tsx b/ts/features/zendesk/components/ZendeskSupportComponent.tsx
index 95816b08f05..3917b028915 100644
--- a/ts/features/zendesk/components/ZendeskSupportComponent.tsx
+++ b/ts/features/zendesk/components/ZendeskSupportComponent.tsx
@@ -18,7 +18,10 @@ import {
IOStackNavigationProp
} from "../../../navigation/params/AppParamsList";
import { useIOSelector } from "../../../store/hooks";
-import { profileSelector } from "../../../store/reducers/profile";
+import {
+ isProfileEmailValidatedSelector,
+ profileSelector
+} from "../../../store/reducers/profile";
import { showToast } from "../../../utils/showToast";
import { openWebUrl } from "../../../utils/url";
import ZENDESK_ROUTES from "../navigation/routes";
@@ -48,6 +51,7 @@ const ZendeskSupportComponent = ({
const maybeProfile: O.Option = pot.toOption(profile);
const zendeskRemoteConfig = useIOSelector(zendeskConfigSelector);
const navigation = useNavigation>();
+ const isEmailValidated = useIOSelector(isProfileEmailValidatedSelector);
const handleContactSupportPress = React.useCallback(
() =>
@@ -67,6 +71,8 @@ const ZendeskSupportComponent = ({
]
);
+ const showRequestSupportButtons = isEmailValidated || !pot.isSome(profile);
+
return (
<>