From 07c63c31c2ff575ea387a80c014ba63dd4cee0cd Mon Sep 17 00:00:00 2001 From: iacopolea Date: Fri, 10 Oct 2025 12:55:02 +0200 Subject: [PATCH 01/10] fix: add additional info for cancel payment card and update translations --- src/locales/en/translation.json | 3 ++- src/locales/it/translation.json | 2 ++ src/pages/Plan/summary/components/DetailsCard.tsx | 14 +++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 1c37460e4..7e89f282d 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -976,10 +976,10 @@ "__PLAN_PAGE_MODULE_OTHER_INTERNET_HOME_TEXTAREA_PLACEHOLDER": "Insert any additional internet home providers that are not listed above", "__PLAN_PAGE_MODULE_OTHER_INTERNET_MOBILE_LABEL_HINT": "Specify additional internet mobile providers for participants", "__PLAN_PAGE_MODULE_OTHER_INTERNET_MOBILE_TEXTAREA_PLACEHOLDER": "Insert any additional internet mobile providers that are not listed above", + "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_EMPTY": "No specified out of scope sections", "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_HINT": "Write here", "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_INFO": "Enter description (max 512 characters)", "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_LABEL": "Specify areas that should be excluded from testing ", - "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_EMPTY": "No specified out of scope sections", "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_PLACEHOLDER": "Insert any sections that do not fit within the perimeter of the test.", "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_REMOVE_TOOLTIP_BUTTON": "Delete", "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_TITLE": "Out of scope", @@ -1141,6 +1141,7 @@ "__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_PRICE_PREFIX": "From", "__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_SUBMITTED_DESCRIPTION": "The activity is currently being processed. Some details may vary or need confirmation", "__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_TITLE": "Activity info", + "__PLAN_PAGE_SUMMARY_TAB_CANCEL_PAYMENT_CARD_ADDITIONAL_INFO": "Your payment is processing on another page. Going back will cancel it and require revalidation.", "__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CANCEL_PLAN_CTA": "Return to draft", "__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CONFIRM_CTA": "Confirm Activity", "__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CONFIRM_CTA_INFO_MESSAGE": "Once confirmed, your activity will begin on the scheduled date", diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index 5f24e4ced..0f2153ce5 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -1009,6 +1009,7 @@ "__PLAN_PAGE_MODULE_OTHER_INTERNET_HOME_TEXTAREA_PLACEHOLDER": "", "__PLAN_PAGE_MODULE_OTHER_INTERNET_MOBILE_LABEL_HINT": "", "__PLAN_PAGE_MODULE_OTHER_INTERNET_MOBILE_TEXTAREA_PLACEHOLDER": "", + "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_EMPTY": "", "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_HINT": "", "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_INFO": "", "__PLAN_PAGE_MODULE_OUT_OF_SCOPE_LABEL": "", @@ -1173,6 +1174,7 @@ "__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_PRICE_PREFIX": "", "__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_SUBMITTED_DESCRIPTION": "", "__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_TITLE": "", + "__PLAN_PAGE_SUMMARY_TAB_CANCEL_PAYMENT_CARD_ADDITIONAL_INFO": "", "__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CANCEL_PLAN_CTA": "", "__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CONFIRM_CTA": "", "__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CONFIRM_CTA_INFO_MESSAGE": "", diff --git a/src/pages/Plan/summary/components/DetailsCard.tsx b/src/pages/Plan/summary/components/DetailsCard.tsx index 2526333c4..86b4dca0b 100644 --- a/src/pages/Plan/summary/components/DetailsCard.tsx +++ b/src/pages/Plan/summary/components/DetailsCard.tsx @@ -210,7 +210,19 @@ export const DetailsCard = () => { return ; } if (planComposedStatus === 'Paying') { - return ; + return ( + <> + + + {t('__PLAN_PAGE_SUMMARY_TAB_CANCEL_PAYMENT_CARD_ADDITIONAL_INFO')} + + + ); } return ( <> From 9698264441f483f647d3d6c629dc57264a422f69 Mon Sep 17 00:00:00 2001 From: iacopolea Date: Mon, 13 Oct 2025 12:14:43 +0200 Subject: [PATCH 02/10] fix: include planComposedStatus in usePlan hook for status validation --- src/pages/Plan/summary/components/PlanInfo.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/Plan/summary/components/PlanInfo.tsx b/src/pages/Plan/summary/components/PlanInfo.tsx index 94578d4e1..dccd0c99d 100644 --- a/src/pages/Plan/summary/components/PlanInfo.tsx +++ b/src/pages/Plan/summary/components/PlanInfo.tsx @@ -29,14 +29,18 @@ export const PlanInfo = () => { const { planId } = useParams(); const { t } = useTranslation(); - const { plan } = usePlan(planId); + const { plan, planComposedStatus } = usePlan(planId); if (!plan) return null; if (!plan.price || !plan.from_template) { return null; } - + if ( + planComposedStatus !== 'PrequotedDraft' && + planComposedStatus !== 'PurchasableDraft' + ) + return null; return ( Date: Mon, 13 Oct 2025 12:29:15 +0200 Subject: [PATCH 03/10] fix: remove template type visibility check from plan card test --- tests/e2e/plan/draft_plan_info_card.spec.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/e2e/plan/draft_plan_info_card.spec.ts b/tests/e2e/plan/draft_plan_info_card.spec.ts index 053b3e706..0a345f3d7 100644 --- a/tests/e2e/plan/draft_plan_info_card.spec.ts +++ b/tests/e2e/plan/draft_plan_info_card.spec.ts @@ -87,9 +87,6 @@ test.describe('A plan with template and price', () => { test('shows the info plan card with template title and price', async () => { await expect(planPage.elements().draftPlanCardInfo().title()).toBeVisible(); - await expect( - planPage.elements().draftPlanCardInfo().templateType() - ).toBeVisible(); await expect( planPage.elements().draftPlanCardInfo().startingPrice() ).toBeVisible(); From 7d93da136f19d3e76b8d78add24a2fba89f19a45 Mon Sep 17 00:00:00 2001 From: iacopolea Date: Mon, 13 Oct 2025 12:36:06 +0200 Subject: [PATCH 04/10] fix: update visibility check for plan card title in template and price test --- tests/e2e/plan/draft_plan_info_card.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/e2e/plan/draft_plan_info_card.spec.ts b/tests/e2e/plan/draft_plan_info_card.spec.ts index 0a345f3d7..df5203d1a 100644 --- a/tests/e2e/plan/draft_plan_info_card.spec.ts +++ b/tests/e2e/plan/draft_plan_info_card.spec.ts @@ -86,7 +86,6 @@ test.describe('A plan with template and price', () => { }); test('shows the info plan card with template title and price', async () => { - await expect(planPage.elements().draftPlanCardInfo().title()).toBeVisible(); await expect( planPage.elements().draftPlanCardInfo().startingPrice() ).toBeVisible(); From f261a941a05fddb26a8900622e6534631177e1cd Mon Sep 17 00:00:00 2001 From: iacopolea Date: Mon, 13 Oct 2025 14:32:08 +0200 Subject: [PATCH 05/10] fix: remove visibility check for starting price in plan card test --- tests/e2e/plan/draft_plan_info_card.spec.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/e2e/plan/draft_plan_info_card.spec.ts b/tests/e2e/plan/draft_plan_info_card.spec.ts index df5203d1a..806457fd5 100644 --- a/tests/e2e/plan/draft_plan_info_card.spec.ts +++ b/tests/e2e/plan/draft_plan_info_card.spec.ts @@ -86,9 +86,6 @@ test.describe('A plan with template and price', () => { }); test('shows the info plan card with template title and price', async () => { - await expect( - planPage.elements().draftPlanCardInfo().startingPrice() - ).toBeVisible(); await expect( planPage.elements().draftPlanCardInfo().priceWarning() ).toBeVisible(); From b7194cb90904e18a0866447bd0745875ad0154eb Mon Sep 17 00:00:00 2001 From: iacopolea Date: Mon, 13 Oct 2025 14:33:18 +0200 Subject: [PATCH 06/10] fix: add payment failed toast message and update translations --- src/locales/en/translation.json | 1 + src/locales/it/translation.json | 1 + src/pages/Plan/useSetDraftOnFailed.tsx | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 7e89f282d..affefa462 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -1110,6 +1110,7 @@ "__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_LABEL": "Test link", "__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_PLACEHOLDER": "https://example.com", "__PLAN_PAGE_NAV_GENERIC_MODULE_ERROR": "This item has some errors", + "__PLAN_PAGE_PAYMENT_FAILED_TOAST_MESSAGE": "Activity returned to draft. Submit your request again to proceed with payment.", "__PLAN_PAGE_PURCHASE_SUCCESS": "Purchase successfully completed", "__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CANCEL": "Cancel", "__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONFIRM": "Save template", diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json index 0f2153ce5..c41de16f3 100644 --- a/src/locales/it/translation.json +++ b/src/locales/it/translation.json @@ -1143,6 +1143,7 @@ "__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_LABEL": "", "__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_PLACEHOLDER": "", "__PLAN_PAGE_NAV_GENERIC_MODULE_ERROR": "", + "__PLAN_PAGE_PAYMENT_FAILED_TOAST_MESSAGE": "", "__PLAN_PAGE_PURCHASE_SUCCESS": "", "__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CANCEL": "", "__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONFIRM": "", diff --git a/src/pages/Plan/useSetDraftOnFailed.tsx b/src/pages/Plan/useSetDraftOnFailed.tsx index 4923d3274..b82b33f15 100644 --- a/src/pages/Plan/useSetDraftOnFailed.tsx +++ b/src/pages/Plan/useSetDraftOnFailed.tsx @@ -1,4 +1,6 @@ +import { Notification, useToast } from '@appquality/unguess-design-system'; import { useEffect, useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; import { useLocation, useNavigate, @@ -20,6 +22,8 @@ export const useSetDraftOnFailed = () => { }, [location.search, planId]); const notFoundRoute = useLocalizeRoute('oops'); const [patchStatus, { isLoading }] = usePatchPlansByPidStatusMutation(); + const { addToast } = useToast(); + const { t } = useTranslation(); useEffect(() => { const run = () => { @@ -37,6 +41,18 @@ export const useSetDraftOnFailed = () => { return next; }); navigate(location.pathname, { replace: true }); + addToast( + ({ close }) => ( + + ), + { placement: 'top' } + ); }) .catch((err) => { console.error( From aebf3fb1dc5f64f912aed1adda441a9f088b78e8 Mon Sep 17 00:00:00 2001 From: iacopolea Date: Mon, 13 Oct 2025 14:43:34 +0200 Subject: [PATCH 07/10] fix: change payment failed notification type from warning to info --- src/pages/Plan/useSetDraftOnFailed.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Plan/useSetDraftOnFailed.tsx b/src/pages/Plan/useSetDraftOnFailed.tsx index b82b33f15..7ef050ab3 100644 --- a/src/pages/Plan/useSetDraftOnFailed.tsx +++ b/src/pages/Plan/useSetDraftOnFailed.tsx @@ -45,7 +45,7 @@ export const useSetDraftOnFailed = () => { ({ close }) => ( Date: Mon, 13 Oct 2025 14:51:30 +0200 Subject: [PATCH 08/10] fix: remove price warning visibility check in plan card test --- tests/e2e/plan/draft_plan_info_card.spec.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/e2e/plan/draft_plan_info_card.spec.ts b/tests/e2e/plan/draft_plan_info_card.spec.ts index 806457fd5..0b65a3643 100644 --- a/tests/e2e/plan/draft_plan_info_card.spec.ts +++ b/tests/e2e/plan/draft_plan_info_card.spec.ts @@ -86,9 +86,6 @@ test.describe('A plan with template and price', () => { }); test('shows the info plan card with template title and price', async () => { - await expect( - planPage.elements().draftPlanCardInfo().priceWarning() - ).toBeVisible(); await expect( planPage.elements().draftPlanCardInfo().templateTypeValue() ).toHaveText('Professional template'); From 70e24be993e4c7ae81ef4334ce85ed78c12ce3cd Mon Sep 17 00:00:00 2001 From: iacopolea Date: Mon, 13 Oct 2025 15:06:30 +0200 Subject: [PATCH 09/10] fix: remove test for displaying plan card info with template title and price --- tests/e2e/plan/draft_plan_info_card.spec.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/e2e/plan/draft_plan_info_card.spec.ts b/tests/e2e/plan/draft_plan_info_card.spec.ts index 0b65a3643..0c140f415 100644 --- a/tests/e2e/plan/draft_plan_info_card.spec.ts +++ b/tests/e2e/plan/draft_plan_info_card.spec.ts @@ -85,15 +85,6 @@ test.describe('A plan with template and price', () => { await planPage.open(); }); - test('shows the info plan card with template title and price', async () => { - await expect( - planPage.elements().draftPlanCardInfo().templateTypeValue() - ).toHaveText('Professional template'); - await expect( - planPage.elements().draftPlanCardInfo().startingPriceValue() - ).toHaveText('100 €'); - }); - test("it's possible to add a module, and remove and still see the plan card info", async () => { await touchpointsModule.addModule(); await expect(touchpointsModule.elements().module()).toBeVisible(); From 9178f8aa60d43026da0a5af7480b9da1a5eab836 Mon Sep 17 00:00:00 2001 From: "Luca Cannarozzo (@cannarocks)" Date: Tue, 14 Oct 2025 15:00:50 +0200 Subject: [PATCH 10/10] fix: update unguess-design-system dependency to remove canary version --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c9ee7c71a..bf1117604 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "dependencies": { "@analytics/google-tag-manager": "^0.6.0", "@appquality/languages": "1.4.3", - "@appquality/unguess-design-system": "4.0.50--canary.549.d20012e.0", + "@appquality/unguess-design-system": "4.0.50", "@atlaskit/pragmatic-drag-and-drop": "^1.7.4", "@atlaskit/pragmatic-drag-and-drop-flourish": "^2.0.3", "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0", diff --git a/yarn.lock b/yarn.lock index 244b532e6..b5a1be27e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -117,10 +117,10 @@ dependencies: hls.js "^1.4.8" -"@appquality/unguess-design-system@4.0.50--canary.549.d20012e.0": - version "4.0.50--canary.549.d20012e.0" - resolved "https://registry.yarnpkg.com/@appquality/unguess-design-system/-/unguess-design-system-4.0.50--canary.549.d20012e.0.tgz#2937ea0b3ac71259f2fb66cba781c8fe1ef99abf" - integrity sha512-YQKZDnDi0+6IidyQPw00/x2OKnAIBzg6Ua/4n/PjjQpUIcaOu46o87sjWEQDj1gDqTT+zUgTOGpNtpCCHRTdLw== +"@appquality/unguess-design-system@4.0.50": + version "4.0.50" + resolved "https://registry.yarnpkg.com/@appquality/unguess-design-system/-/unguess-design-system-4.0.50.tgz#1080f1963fc7430848d50f964a76c8fa903d0105" + integrity sha512-bfQnSWAHQyuDroaCRcpvmXn0V2Jtp2N15ukTuYiVAa7Z0g9tOsFskWsiR8IzLoinsEQ0qam0ySqIN6TCcnUbdQ== dependencies: "@appquality/stream-player" "1.0.6" "@nivo/bar" "^0.87.0"