Skip to content

Commit 16dffd6

Browse files
authored
Merge pull request #1451 from AppQuality/develop
release-2025-10-14
2 parents 39cb22e + 9178f8a commit 16dffd6

8 files changed

Lines changed: 46 additions & 28 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": {
66
"@analytics/google-tag-manager": "^0.6.0",
77
"@appquality/languages": "1.4.3",
8-
"@appquality/unguess-design-system": "4.0.50--canary.549.d20012e.0",
8+
"@appquality/unguess-design-system": "4.0.50",
99
"@atlaskit/pragmatic-drag-and-drop": "^1.7.4",
1010
"@atlaskit/pragmatic-drag-and-drop-flourish": "^2.0.3",
1111
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",

src/locales/en/translation.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,10 +976,10 @@
976976
"__PLAN_PAGE_MODULE_OTHER_INTERNET_HOME_TEXTAREA_PLACEHOLDER": "Insert any additional internet home providers that are not listed above",
977977
"__PLAN_PAGE_MODULE_OTHER_INTERNET_MOBILE_LABEL_HINT": "Specify additional internet mobile providers for participants",
978978
"__PLAN_PAGE_MODULE_OTHER_INTERNET_MOBILE_TEXTAREA_PLACEHOLDER": "Insert any additional internet mobile providers that are not listed above",
979+
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_EMPTY": "No specified out of scope sections",
979980
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_HINT": "Write here",
980981
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_INFO": "Enter description (max 512 characters)",
981982
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_LABEL": "Specify areas that should be excluded from testing ",
982-
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_EMPTY": "No specified out of scope sections",
983983
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_PLACEHOLDER": "Insert any sections that do not fit within the perimeter of the test.",
984984
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_REMOVE_TOOLTIP_BUTTON": "Delete",
985985
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_TITLE": "Out of scope",
@@ -1110,6 +1110,7 @@
11101110
"__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_LABEL": "Test link",
11111111
"__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_PLACEHOLDER": "https://example.com",
11121112
"__PLAN_PAGE_NAV_GENERIC_MODULE_ERROR": "This item has some errors",
1113+
"__PLAN_PAGE_PAYMENT_FAILED_TOAST_MESSAGE": "Activity returned to draft. Submit your request again to proceed with payment.",
11131114
"__PLAN_PAGE_PURCHASE_SUCCESS": "Purchase successfully completed",
11141115
"__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CANCEL": "Cancel",
11151116
"__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONFIRM": "Save template",
@@ -1141,6 +1142,7 @@
11411142
"__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_PRICE_PREFIX": "From",
11421143
"__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_SUBMITTED_DESCRIPTION": "The activity is currently being processed. Some details may vary or need confirmation",
11431144
"__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_TITLE": "Activity info",
1145+
"__PLAN_PAGE_SUMMARY_TAB_CANCEL_PAYMENT_CARD_ADDITIONAL_INFO": "Your payment is processing on another page. Going back will cancel it and require revalidation.",
11441146
"__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CANCEL_PLAN_CTA": "Return to draft",
11451147
"__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CONFIRM_CTA": "Confirm Activity",
11461148
"__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CONFIRM_CTA_INFO_MESSAGE": "Once confirmed, your activity will begin on the scheduled date",

src/locales/it/translation.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,7 @@
10091009
"__PLAN_PAGE_MODULE_OTHER_INTERNET_HOME_TEXTAREA_PLACEHOLDER": "",
10101010
"__PLAN_PAGE_MODULE_OTHER_INTERNET_MOBILE_LABEL_HINT": "",
10111011
"__PLAN_PAGE_MODULE_OTHER_INTERNET_MOBILE_TEXTAREA_PLACEHOLDER": "",
1012+
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_EMPTY": "",
10121013
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_HINT": "",
10131014
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_INFO": "",
10141015
"__PLAN_PAGE_MODULE_OUT_OF_SCOPE_LABEL": "",
@@ -1142,6 +1143,7 @@
11421143
"__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_LABEL": "",
11431144
"__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_PLACEHOLDER": "",
11441145
"__PLAN_PAGE_NAV_GENERIC_MODULE_ERROR": "",
1146+
"__PLAN_PAGE_PAYMENT_FAILED_TOAST_MESSAGE": "",
11451147
"__PLAN_PAGE_PURCHASE_SUCCESS": "",
11461148
"__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CANCEL": "",
11471149
"__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONFIRM": "",
@@ -1173,6 +1175,7 @@
11731175
"__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_PRICE_PREFIX": "",
11741176
"__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_SUBMITTED_DESCRIPTION": "",
11751177
"__PLAN_PAGE_SUMMARY_TAB_ACTIVITY_INFO_TITLE": "",
1178+
"__PLAN_PAGE_SUMMARY_TAB_CANCEL_PAYMENT_CARD_ADDITIONAL_INFO": "",
11761179
"__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CANCEL_PLAN_CTA": "",
11771180
"__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CONFIRM_CTA": "",
11781181
"__PLAN_PAGE_SUMMARY_TAB_CONFIRMATION_CARD_CONFIRM_CTA_INFO_MESSAGE": "",

src/pages/Plan/summary/components/DetailsCard.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,19 @@ export const DetailsCard = () => {
210210
return <GoToCampaignButton />;
211211
}
212212
if (planComposedStatus === 'Paying') {
213-
return <CancelPlanButton />;
213+
return (
214+
<>
215+
<CancelPlanButton />
216+
<SM
217+
style={{
218+
marginTop: appTheme.space.md,
219+
color: appTheme.palette.grey[600],
220+
}}
221+
>
222+
{t('__PLAN_PAGE_SUMMARY_TAB_CANCEL_PAYMENT_CARD_ADDITIONAL_INFO')}
223+
</SM>
224+
</>
225+
);
214226
}
215227
return (
216228
<>

src/pages/Plan/summary/components/PlanInfo.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,18 @@ export const PlanInfo = () => {
2929
const { planId } = useParams();
3030
const { t } = useTranslation();
3131

32-
const { plan } = usePlan(planId);
32+
const { plan, planComposedStatus } = usePlan(planId);
3333

3434
if (!plan) return null;
3535

3636
if (!plan.price || !plan.from_template) {
3737
return null;
3838
}
39-
39+
if (
40+
planComposedStatus !== 'PrequotedDraft' &&
41+
planComposedStatus !== 'PurchasableDraft'
42+
)
43+
return null;
4044
return (
4145
<WidgetSpecialCard style={{ height: 'auto' }}>
4246
<MD

src/pages/Plan/useSetDraftOnFailed.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import { Notification, useToast } from '@appquality/unguess-design-system';
12
import { useEffect, useMemo } from 'react';
3+
import { useTranslation } from 'react-i18next';
24
import {
35
useLocation,
46
useNavigate,
@@ -20,6 +22,8 @@ export const useSetDraftOnFailed = () => {
2022
}, [location.search, planId]);
2123
const notFoundRoute = useLocalizeRoute('oops');
2224
const [patchStatus, { isLoading }] = usePatchPlansByPidStatusMutation();
25+
const { addToast } = useToast();
26+
const { t } = useTranslation();
2327

2428
useEffect(() => {
2529
const run = () => {
@@ -37,6 +41,18 @@ export const useSetDraftOnFailed = () => {
3741
return next;
3842
});
3943
navigate(location.pathname, { replace: true });
44+
addToast(
45+
({ close }) => (
46+
<Notification
47+
onClose={close}
48+
type="info"
49+
message={t('__PLAN_PAGE_PAYMENT_FAILED_TOAST_MESSAGE')}
50+
closeText={t('__TOAST_CLOSE_TEXT')}
51+
isPrimary
52+
/>
53+
),
54+
{ placement: 'top' }
55+
);
4056
})
4157
.catch((err) => {
4258
console.error(

tests/e2e/plan/draft_plan_info_card.spec.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,6 @@ test.describe('A plan with template and price', () => {
8585
await planPage.open();
8686
});
8787

88-
test('shows the info plan card with template title and price', async () => {
89-
await expect(planPage.elements().draftPlanCardInfo().title()).toBeVisible();
90-
await expect(
91-
planPage.elements().draftPlanCardInfo().templateType()
92-
).toBeVisible();
93-
await expect(
94-
planPage.elements().draftPlanCardInfo().startingPrice()
95-
).toBeVisible();
96-
await expect(
97-
planPage.elements().draftPlanCardInfo().priceWarning()
98-
).toBeVisible();
99-
await expect(
100-
planPage.elements().draftPlanCardInfo().templateTypeValue()
101-
).toHaveText('Professional template');
102-
await expect(
103-
planPage.elements().draftPlanCardInfo().startingPriceValue()
104-
).toHaveText('100 €');
105-
});
106-
10788
test("it's possible to add a module, and remove and still see the plan card info", async () => {
10889
await touchpointsModule.addModule();
10990
await expect(touchpointsModule.elements().module()).toBeVisible();

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@
117117
dependencies:
118118
hls.js "^1.4.8"
119119

120-
"@appquality/unguess-design-system@4.0.50--canary.549.d20012e.0":
121-
version "4.0.50--canary.549.d20012e.0"
122-
resolved "https://registry.yarnpkg.com/@appquality/unguess-design-system/-/unguess-design-system-4.0.50--canary.549.d20012e.0.tgz#2937ea0b3ac71259f2fb66cba781c8fe1ef99abf"
123-
integrity sha512-YQKZDnDi0+6IidyQPw00/x2OKnAIBzg6Ua/4n/PjjQpUIcaOu46o87sjWEQDj1gDqTT+zUgTOGpNtpCCHRTdLw==
120+
"@appquality/unguess-design-system@4.0.50":
121+
version "4.0.50"
122+
resolved "https://registry.yarnpkg.com/@appquality/unguess-design-system/-/unguess-design-system-4.0.50.tgz#1080f1963fc7430848d50f964a76c8fa903d0105"
123+
integrity sha512-bfQnSWAHQyuDroaCRcpvmXn0V2Jtp2N15ukTuYiVAa7Z0g9tOsFskWsiR8IzLoinsEQ0qam0ySqIN6TCcnUbdQ==
124124
dependencies:
125125
"@appquality/stream-player" "1.0.6"
126126
"@nivo/bar" "^0.87.0"

0 commit comments

Comments
 (0)