Skip to content

Commit 2a6545a

Browse files
Merge pull request #1416 from AppQuality/develop
release-2025-08-28
2 parents 2adf625 + 916620b commit 2a6545a

File tree

22 files changed

+202
-41
lines changed

22 files changed

+202
-41
lines changed

src/common/components/ServiceTiles/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ const ServiceTiles = ({ onClick, promoTemplates }: ServiceTilesProps) => {
2828
role="list"
2929
title="promo-templates"
3030
>
31-
{promoTemplates.map((template) => {
31+
{promoTemplates.map((template, i) => {
3232
if (!template.strapi) return null;
3333
const { title, price, tags, image, background, pre_title } =
3434
template.strapi;
3535
const outputs = tags.map((output) => {
3636
const { text, icon } = output;
3737
return (
3838
<AdditionalInfoTag
39-
key={text}
39+
key={text.toLowerCase().replace(/\s+/g, '_')}
4040
color={appTheme.palette.grey[700]}
4141
hue="#ffff"
4242
isPill
@@ -53,7 +53,12 @@ const ServiceTiles = ({ onClick, promoTemplates }: ServiceTilesProps) => {
5353
};
5454

5555
return (
56-
<ScrollingGrid.Item key={template.id} role="listitem" title={title}>
56+
<ScrollingGrid.Item
57+
key={template.id}
58+
role="listitem"
59+
title={title}
60+
data-qa={`service-tile-${i}`}
61+
>
5762
<ServiceTile
5863
title={title}
5964
description={pre_title}

src/common/schema.ts

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ export interface paths {
305305
};
306306
};
307307
};
308+
"/companies/sizes": {
309+
get: operations["get-companies-sizes"];
310+
};
308311
"/insights/{iid}": {
309312
get: operations["get-insights-iid"];
310313
delete: operations["delete-insights-iid"];
@@ -623,9 +626,6 @@ export interface paths {
623626
};
624627
};
625628
};
626-
"/companies/sizes": {
627-
get: operations["get-companies-sizes"];
628-
};
629629
}
630630

631631
export interface components {
@@ -1526,6 +1526,7 @@ export interface components {
15261526
};
15271527
/** User */
15281528
User: {
1529+
company_size: string;
15291530
customer_role: string;
15301531
/** Format: email */
15311532
email: string;
@@ -3107,6 +3108,19 @@ export interface operations {
31073108
500: components["responses"]["Error"];
31083109
};
31093110
};
3111+
"get-companies-sizes": {
3112+
responses: {
3113+
/** OK */
3114+
200: {
3115+
content: {
3116+
"application/json": {
3117+
id: number;
3118+
name: string;
3119+
}[];
3120+
};
3121+
};
3122+
};
3123+
};
31103124
"get-insights-iid": {
31113125
parameters: {
31123126
path: {
@@ -3636,6 +3650,7 @@ export interface operations {
36363650
200: {
36373651
content: {
36383652
"application/json": {
3653+
companySize?: string;
36393654
name?: string;
36403655
role?: string;
36413656
surname?: string;
@@ -3648,6 +3663,7 @@ export interface operations {
36483663
requestBody: {
36493664
content: {
36503665
"application/json": {
3666+
companySizeId?: number;
36513667
name?: string;
36523668
password?: {
36533669
current: string;
@@ -4432,19 +4448,6 @@ export interface operations {
44324448
};
44334449
};
44344450
};
4435-
"get-companies-sizes": {
4436-
responses: {
4437-
/** OK */
4438-
200: {
4439-
content: {
4440-
"application/json": {
4441-
id: number;
4442-
name: string;
4443-
}[];
4444-
};
4445-
};
4446-
};
4447-
};
44484451
}
44494452

44504453
export interface external {}

src/features/api/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,12 +1664,14 @@ export type HeadUsersByEmailByEmailApiArg = {
16641664
export type GetUsersMeApiResponse = /** status 200 */ User;
16651665
export type GetUsersMeApiArg = void;
16661666
export type PatchUsersMeApiResponse = /** status 200 OK */ {
1667+
companySize?: string;
16671668
name?: string;
16681669
role?: string;
16691670
surname?: string;
16701671
};
16711672
export type PatchUsersMeApiArg = {
16721673
body: {
1674+
companySizeId?: number;
16731675
name?: string;
16741676
password?: {
16751677
current: string;
@@ -2768,6 +2770,7 @@ export type Feature = {
27682770
slug?: string;
27692771
};
27702772
export type User = {
2773+
company_size: string;
27712774
customer_role: string;
27722775
email: string;
27732776
features?: Feature[];

src/locales/en/translation.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,7 @@
11361136
"__PROFILE_MODAL_NOTIFICATIONS_TOGGLE_TITLE": "Allow notifications",
11371137
"__PROFILE_MODAL_NOTIFICATIONS_UPDATED": "Changes saved",
11381138
"__PROFILE_MODAL_PRIVACY_ITEM_LABEL": "Privacy settings",
1139+
"__PROFILE_PAGE_COMPANY_SIZE_REQUIRED_ERROR": "Company size is required",
11391140
"__PROFILE_PAGE_CONFIRM_PASSWORD_MUST_MATCH_NEW_PASSWORD": "The confirmation password must match the new password",
11401141
"__PROFILE_PAGE_NAME_REQUIRED_ERROR": "Name is required",
11411142
"__PROFILE_PAGE_NAV_ITEM_PASSWORD": "Password settings",
@@ -1151,6 +1152,8 @@
11511152
"__PROFILE_PAGE_TOAST_ERROR_UPDATING_PROFILE": "An error occurred while updating your profile. Please try again.",
11521153
"__PROFILE_PAGE_TOAST_SUCCESS_PASSWORD_UPDATED": "Password updated successfully",
11531154
"__PROFILE_PAGE_UPDATE_SUCCESS": "Profile updated successfully",
1155+
"__PROFILE_PAGE_USER_CARD_COMPANY_SIZE_LABEL": "Company size",
1156+
"__PROFILE_PAGE_USER_CARD_COMPANY_SIZE_PLACEHOLDER": "Select a Company size",
11541157
"__PROFILE_PAGE_USER_CARD_EMAIL_LABEL": "Work email",
11551158
"__PROFILE_PAGE_USER_CARD_LABEL": "Profile settings",
11561159
"__PROFILE_PAGE_USER_CARD_NAME_LABEL": "First name",
@@ -1319,7 +1322,7 @@
13191322
"_CAMPAIGN_WIDGET_UX_TEST_PROGRESS_MONITORING_HEADER": "Test Progress",
13201323
"_CAMPAIGN_WIDGET_UX_USER_ANALYSIS_DESCRIPTION_HEADER": "There are observations on",
13211324
"_CAMPAIGN_WIDGET_UX_USER_ANALYSIS_HEADER": "Analyzed User Contributions",
1322-
"_PAGE_PROFILE_HEADER_TEXT": "Keep your profile up to date: edit your name, role, or password anytime to make UNGUESS truly yours.",
1325+
"_PAGE_PROFILE_HEADER_TEXT": "Manage your profile anytime: check and update your personal information whenever you need.",
13231326
"_PLAN_PAGE_MODULE_LANGUAGE_DESCRIPTION": "You’ll receive feedback in the language you’re selecting",
13241327
"_PLAN_PAGE_MODULE_LANGUAGE_SUBTITLE": "Select participants' preferred language",
13251328
"_PROJECT_PAGE_PLANS_GROUP_SEE_ALL": "View more",

src/locales/it/translation.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,7 @@
11671167
"__PROFILE_MODAL_NOTIFICATIONS_TOGGLE_TITLE": "Vuoi ricevere le notifiche?",
11681168
"__PROFILE_MODAL_NOTIFICATIONS_UPDATED": "Modifiche salvate",
11691169
"__PROFILE_MODAL_PRIVACY_ITEM_LABEL": "Opzioni Privacy",
1170+
"__PROFILE_PAGE_COMPANY_SIZE_REQUIRED_ERROR": "",
11701171
"__PROFILE_PAGE_CONFIRM_PASSWORD_MUST_MATCH_NEW_PASSWORD": "",
11711172
"__PROFILE_PAGE_NAME_REQUIRED_ERROR": "",
11721173
"__PROFILE_PAGE_NAV_ITEM_PASSWORD": "",
@@ -1182,6 +1183,8 @@
11821183
"__PROFILE_PAGE_TOAST_ERROR_UPDATING_PROFILE": "",
11831184
"__PROFILE_PAGE_TOAST_SUCCESS_PASSWORD_UPDATED": "",
11841185
"__PROFILE_PAGE_UPDATE_SUCCESS": "",
1186+
"__PROFILE_PAGE_USER_CARD_COMPANY_SIZE_LABEL": "",
1187+
"__PROFILE_PAGE_USER_CARD_COMPANY_SIZE_PLACEHOLDER": "",
11851188
"__PROFILE_PAGE_USER_CARD_EMAIL_LABEL": "",
11861189
"__PROFILE_PAGE_USER_CARD_LABEL": "",
11871190
"__PROFILE_PAGE_USER_CARD_NAME_LABEL": "",

src/pages/Dashboard/SuggestedCampaigns.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ export const SuggestedCampaigns = () => {
4343
</Row>
4444
<ScrollingGrid id="suggested-campaigns-scrolling-grid">
4545
{!!items.plans.length &&
46-
items.plans.map((plan) => (
47-
<ScrollingGrid.Item key={`suggested_plan_${plan.id}`}>
46+
items.plans.map((plan, i) => (
47+
<ScrollingGrid.Item
48+
key={`suggested_plan_${plan.id}`}
49+
data-qa={`tracked-activity-${i}`}
50+
>
4851
<PlanCard
4952
status={getPlanStatus(plan, t).status}
5053
i18n={{

src/pages/Dashboard/project-items/Plans.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,15 @@ export const Plans = ({ projectId }: { projectId: number }) => {
5656
</Row>
5757
<Separator style={{ margin: `${appTheme.space.md} 0` }} />
5858
<Row>
59-
{plans.map((plan) => (
60-
<Col size={4} xs={12} md={6} lg={4}>
59+
{plans.map((plan, i) => (
60+
<Col
61+
size={4}
62+
xs={12}
63+
md={6}
64+
lg={4}
65+
key={`project_plan_${plan.id}`}
66+
data-qa={`setup-activity-${i}`}
67+
>
6168
<PlanCard
6269
status={getPlanStatus(plan, t).status}
6370
i18n={{

src/pages/JoinPage/useJoinSubmit.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ export function useJoinSubmit(isInvited: boolean) {
1515
const { token, profile } = useParams();
1616
const sendGTMevent = useSendGTMevent({ loggedUser: false });
1717

18+
const templateParam = searchParams.get('template');
19+
let templateId: number | undefined;
20+
21+
if (templateParam !== null) {
22+
const parsed = Number(templateParam);
23+
if (!Number.isInteger(parsed)) {
24+
searchParams.delete('template');
25+
const url = window.location.origin + window.location.pathname;
26+
window.history.replaceState({}, '', url);
27+
window.location.reload();
28+
}
29+
templateId = parsed;
30+
}
31+
1832
const onSubmit = useCallback(
1933
async (
2034
values: JoinFormValues,
@@ -28,7 +42,9 @@ export function useJoinSubmit(isInvited: boolean) {
2842
surname: values.surname,
2943
roleId: values.roleId,
3044
companySizeId: values.companySizeId,
45+
...(templateId !== undefined && { templateId }),
3146
};
47+
3248
sendGTMevent({
3349
event: 'sign-up-flow',
3450
category: `is invited: ${isInvited}`,

src/pages/Plan/common/ModulesBottomNavigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const ModulesBottomNavigation = () => {
7272
<Button
7373
isBasic
7474
size="small"
75-
data-qa={`modules-bottom-navigation-${nextTab}`}
75+
data-qa={`modules-bottom-navigation-${nextTab.name}`}
7676
onClick={() => {
7777
setActiveTab(nextTab);
7878
if (main) {

src/pages/Profile/FormProfile.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const FormProfile = () => {
1616

1717
const initialValues: ProfileFormValues = {
1818
roleId: data?.roleId || 0,
19+
companySizeId: data?.companySizeId || 0,
1920
name: data?.name || '',
2021
surname: data?.surname || '',
2122
email: data?.email || '',
@@ -29,6 +30,9 @@ export const FormProfile = () => {
2930
roleId: Yup.number()
3031
.min(1, t('__PROFILE_PAGE_ROLE_REQUIRED_ERROR'))
3132
.required(t('__PROFILE_PAGE_ROLE_REQUIRED_ERROR')),
33+
companySizeId: Yup.number()
34+
.min(1, t('__PROFILE_PAGE_COMPANY_SIZE_REQUIRED_ERROR'))
35+
.required(t('__PROFILE_PAGE_COMPANY_SIZE_REQUIRED_ERROR')),
3236
});
3337

3438
return (
@@ -45,6 +49,7 @@ export const FormProfile = () => {
4549
name: values.name,
4650
surname: values.surname,
4751
roleId: values.roleId,
52+
companySizeId: values.companySizeId,
4853
},
4954
})
5055
.unwrap()

0 commit comments

Comments
 (0)