Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
a59f6c9
feat: enhance E2E tests with new Browser module and update plan state…
iacopolea Sep 3, 2025
784e940
Implement code changes to enhance functionality and improve performance
iacopolea Sep 3, 2025
7a967a0
fix: update payment status message for clarity
iacopolea Sep 3, 2025
6190b57
fix: update button disabled state to include 'paying' status
iacopolea Sep 3, 2025
1ac1160
feat: add @emotion/is-prop-valid dependency and update App component …
iacopolea Sep 5, 2025
e613e34
feat: add a save plan configuration step in request quotation handlin…
iacopolea Sep 8, 2025
474c8f5
refactor: remove unnecessary return statement in Controls component
iacopolea Sep 8, 2025
3aa9b80
Merge pull request #1428 from AppQuality/UN-1766-save-draft-prima-di-…
d-beezee Sep 9, 2025
96fb623
Merge pull request #1427 from AppQuality/remove-styled-components-war…
d-beezee Sep 9, 2025
51f4b4d
feat: add rules evaluation endpoint and integrate it into request quo…
iacopolea Sep 9, 2025
5fa4b8d
chore update examples
iacopolea Sep 9, 2025
2d7379e
feat: add evaluation rules handling in request quotation flow and upd…
iacopolea Sep 9, 2025
cb23435
chore validate
iacopolea Sep 9, 2025
ba044f9
Merge pull request #1429 from AppQuality/UN-1767-Modale-submit-activi…
d-beezee Sep 9, 2025
7fcfba5
wip: add plan info card
Kariamos Sep 4, 2025
a09a69a
wip: add card to show plan price and template
Kariamos Sep 4, 2025
33f2002
typo
Kariamos Sep 4, 2025
2ee23b4
feat: add title key for activity info in translations
Kariamos Sep 5, 2025
e650809
feat: add draft plan info card tests and related methods in PlanPage
Kariamos Sep 5, 2025
89d613f
refactor: clean up imports and update title translation key in PlanIn…
Kariamos Sep 5, 2025
3dc60a6
refactor: replace ContainerCard with WidgetSpecialCard in PlanInfo co…
Kariamos Sep 5, 2025
f5b2ba2
refactor: replace Message component with Alert in PlanInfo
Kariamos Sep 5, 2025
0cef5ac
feat: update draft activity info translations for English and Italian
Kariamos Sep 5, 2025
cfb9931
feat: replace Alert with GlobalAlert and add external link for more i…
Kariamos Sep 5, 2025
5a37a71
feat: add link text for more info in draft activity info for English …
Kariamos Sep 5, 2025
76ce761
feat: update link text for price warning in PlanInfo component
Kariamos Sep 5, 2025
7cb5420
feat: add current setup information to draft activity info translatio…
Kariamos Sep 5, 2025
d3a3c65
feat: add current setup information to PlanInfo component
Kariamos Sep 5, 2025
8a65eff
feat: add starting price info text to draft activity info translation…
Kariamos Sep 5, 2025
32c15d0
feat: update PlanInfo component to include starting price info and re…
Kariamos Sep 5, 2025
e0a86c5
feat: remove unused Title import and adjust WidgetSpecialCard style
Kariamos Sep 8, 2025
bf0adfd
feat: add data attributes for template type and price warning element…
Kariamos Sep 8, 2025
8bc1b53
feat: replace Label with LG for template type display in PlanInfo com…
Kariamos Sep 9, 2025
74aade5
feat: remove data-qa attribute from WidgetSpecialCard in DetailsCard …
Kariamos Sep 9, 2025
c558cfe
feat: replace Label with LG for starting price and current setup in P…
Kariamos Sep 9, 2025
705da4a
feat: add draft only template without price details in JSON format
Kariamos Sep 9, 2025
2c342c3
feat: add test cases for plans without price and with template, inclu…
Kariamos Sep 9, 2025
109a87a
fix test: add mockGetNewPlan method and update routing fallback in Pl…
iacopolea Sep 10, 2025
efcdada
fix: update path for mock API response in PlanCreationInterface
iacopolea Sep 10, 2025
66f7fe0
fix: update URL expectation in project page empty state test to inclu…
iacopolea Sep 10, 2025
92e7595
refactor: remove unused styled components and clean up PlanInfo compo…
iacopolea Sep 10, 2025
df408e1
Merge branch 'develop' into UN-1716-REACT-plan-paying-read-only
iacopolea Sep 10, 2025
1034e0b
Merge pull request #1424 from AppQuality/UN-1742
iacopolea Sep 10, 2025
fb9aa15
Merge pull request #1421 from AppQuality/UN-1716-REACT-plan-paying-re…
Kariamos Sep 10, 2025
3f9580d
feat: update translation strings and modal behavior for request submi…
iacopolea Sep 10, 2025
46d7383
chore: remove unused imports in SendRequestModal component
iacopolea Sep 10, 2025
e561fce
Merge pull request #1430 from AppQuality/UN-1767-Modale-submit-activi…
iacopolea Sep 16, 2025
cf97b89
refactor: update PlanInfo component structure and styling for improve…
Kariamos Sep 18, 2025
f42ffe1
refactor: replace Col with StickyCol for PlanInfo component to enhanc…
Kariamos Sep 18, 2025
9898349
refactor: remove bold styling from current setup label in PlanInfo co…
Kariamos Sep 18, 2025
81dfb7a
refactor: replace StickyCol with Col in SummaryBody component for lay…
Kariamos Sep 19, 2025
8255b7c
refactor: replace Col with StickyCol in SummaryBody and vice versa in…
Kariamos Sep 19, 2025
98a9262
Merge pull request #1432 from AppQuality/fix-plan-price-card
Kariamos Sep 19, 2025
d956749
feat: enhance usePlan hook to include template and campaign fetching …
iacopolea Sep 12, 2025
42a3786
refactor: remove unused imports from usePlan hook
iacopolea Sep 12, 2025
394637a
refactor: update usePlan hook integration across components to utiliz…
iacopolea Sep 16, 2025
3e3756a
fix: update Cta button disabled condition to use planComposedStatus f…
iacopolea Sep 17, 2025
78f60af
fix: ensure planComposedStatus is correctly formatted for status mapp…
iacopolea Sep 17, 2025
79fb420
refactor: remove unused import of expect in paying.spec.ts
iacopolea Sep 17, 2025
f78f44a
feat: implement global alert system based on plan composed status
iacopolea Sep 17, 2025
2c0cb6b
fix: integrate planComposedStatus into useRequestQuotation and Confir…
iacopolea Sep 17, 2025
b522716
fix: update activity notes visibility and alert conditions based on p…
iacopolea Sep 17, 2025
0e2b467
fix: conditionally render SaveTemplateCard based on planComposedStatus
iacopolea Sep 17, 2025
ccd38d3
fix: update global alert messages and conditions for PurchasedPlan st…
iacopolea Sep 17, 2025
2e56e15
fix: update OpsCheck status handling and related UI messages in Activ…
iacopolea Sep 17, 2025
8c1501b
fix: add 'OpsCheck' status to disable button in Cta component
iacopolea Sep 18, 2025
d769c7a
chore validate
iacopolea Sep 18, 2025
5e43705
fix: conditionally render IconButtonMenu based on planComposedStatus
iacopolea Sep 19, 2025
4eeb7b4
fix: integrate GoToCampaignButton for PurchasedPlan status in Details…
iacopolea Sep 19, 2025
77862bd
fix: refine conditional rendering for SaveTemplateCard based on planC…
iacopolea Sep 19, 2025
83bb07e
fix: add payment confirmation card and integrate BuyButton in Confirm…
iacopolea Sep 19, 2025
48b3be7
fix: add confirmation message to BuyButton in DetailsCard for Purchas…
iacopolea Sep 19, 2025
74300c8
fix: remove email contact from OPSCHECK description in plan introduct…
iacopolea Sep 19, 2025
fce1e45
fix: refactor DetailsCard to use getCta function for conditional rend…
iacopolea Sep 19, 2025
11ad5fa
fix: simplify return statement in getCta function for PurchasedPlan s…
iacopolea Sep 19, 2025
ca7ffb2
fix: remove unused import of getPlanStatus in ConfirmPlanButton compo…
iacopolea Sep 19, 2025
531a735
fix: comment out confirmActivityCTA visibility check in approved.spec.ts
iacopolea Sep 19, 2025
b290b4b
Merge pull request #1431 from AppQuality/UN-1811-pagina-di-feedback-d…
d-beezee Sep 22, 2025
03bfb18
refactor: move usePlan hook and update import paths across multiple c…
iacopolea Sep 23, 2025
775775d
feat: update plan status handling and localization, add usePlanStatus…
iacopolea Sep 23, 2025
f9dca5f
fix: include planCampaign and planTemplate in useMemo dependencies fo…
iacopolea Sep 24, 2025
df8cab3
chore: update canary version of @appquality/unguess-design-system
iacopolea Sep 24, 2025
70cddc0
chore: update @appquality/unguess-design-system version in yarn.lock
iacopolea Sep 24, 2025
05ae24f
chore: update @appquality/unguess-design-system version in package.js…
iacopolea Sep 24, 2025
b6fba69
chore: update @appquality/unguess-design-system version in package.js…
iacopolea Sep 25, 2025
ab29a66
feat: add plan card labels for confirmation, finalization, and viewin…
iacopolea Sep 25, 2025
0a7d103
fix: update hint text for browser selection to clarify participant di…
sinatragianpaolo Sep 29, 2025
2f7bdc3
Merge pull request #1435 from AppQuality/UN-1593
d-beezee Sep 29, 2025
bba1fa6
rework(module-before-starting): change button to icon button + tooltip
sinatragianpaolo Sep 29, 2025
5699765
rework(module-goal): change button to icon button + tooltip
sinatragianpaolo Sep 29, 2025
a0c7ec2
rework(module-touchpoints): change button to icon button + tooltip
sinatragianpaolo Sep 29, 2025
2c32158
rework(module-browser): change button to icon button + tooltip
sinatragianpaolo Sep 29, 2025
df4b008
rework(module-target-note): change button to icon button + tooltip
sinatragianpaolo Sep 29, 2025
7cd1753
rework(module-target-size): change button to icon button + tooltip
sinatragianpaolo Sep 29, 2025
d0067ea
rework(modules-tab-tasks): replace buttons with icon buttons and tool…
sinatragianpaolo Sep 29, 2025
70b9e5d
rework(modules): replace delete buttons with icon buttons and tooltip…
sinatragianpaolo Sep 29, 2025
4838909
rework(modules): update translation keys for task removal confirmatio…
sinatragianpaolo Sep 29, 2025
be6e53b
rework(module-gender): add data-qa attribute for remove gender module…
sinatragianpaolo Sep 29, 2025
3b7ae70
fix: add validation for work email in signup form
d-beezee Sep 30, 2025
84807e6
fix: store utm_source in sessionStorage and pass it to analytics trac…
cannarocks Sep 30, 2025
d2fdd08
fix: update userpilot token handling and improve loaded state check
cannarocks Sep 30, 2025
019c69d
Merge pull request #1437 from AppQuality/UN-1747
cannarocks Sep 30, 2025
0936337
Merge pull request #1438 from AppQuality/send-utm-source-to-analytics
cannarocks Sep 30, 2025
cb5e8ac
rework(tasks): add data-qa attribute to remove task button and update…
Kariamos Sep 30, 2025
a206f96
Merge pull request #1433 from AppQuality/UN-1803-Modifica-Copy-Status
iacopolea Sep 30, 2025
aff69fb
feat: UN-1808 add custom feature button and update translations for p…
iacopolea Sep 25, 2025
c380294
feat: add expert review tooltip and warning to AddBlockButton component
iacopolea Sep 26, 2025
b667e6a
feat: implement ExpertReviewWarning component and integrate it into A…
iacopolea Sep 26, 2025
d105691
feat: add alert for custom participant numbers requiring expert revie…
iacopolea Sep 26, 2025
36f5460
feat: include planComposedStatus in usePlan hook for conditional rend…
iacopolea Sep 26, 2025
934f251
chore validate
iacopolea Sep 26, 2025
d6f1ad1
fix: update plan ID in test data and modify URL expectation to includ…
iacopolea Sep 30, 2025
ff41dfa
fix: update plan ID in test data and add mock for new plan in dashboa…
iacopolea Sep 30, 2025
1227c0c
feat: integrate PlanCreationInterface and update URL expectation to i…
iacopolea Sep 30, 2025
bb44858
fix: update URL expectation in tests to use 'setup' tab instead of 's…
iacopolea Sep 30, 2025
430a307
fix: update version of unguess-design-system dependency
iacopolea Sep 30, 2025
737b9f7
rework(locality): add data-qa attribute to remove locality button and…
Kariamos Sep 30, 2025
f8e7219
Merge pull request #1434 from AppQuality/UN-1806-template-pre-quotato…
iacopolea Sep 30, 2025
7a3b4f0
fix: return Cta component in getCta function for better readability
iacopolea Sep 30, 2025
19bb3c8
fix: refactor conditional rendering in DetailsCard component for clarity
iacopolea Sep 30, 2025
26ef9e1
fix: update version of unguess-design-system dependency
iacopolea Sep 30, 2025
5d9ce9e
fix: streamline userpilot initialization and simplify loaded state check
cannarocks Sep 30, 2025
1b7ada1
Merge pull request #1440 from AppQuality/send-utm-source-to-analytics
cannarocks Sep 30, 2025
6ff544e
Merge pull request #1439 from AppQuality/UN-1806-template-pre-quotato…
iacopolea Sep 30, 2025
b93ca2e
feat: implement payment failure handling and refactor Plan component …
iacopolea Oct 1, 2025
0790b10
Merge pull request #1441 from AppQuality/rimbalzello
d-beezee Oct 1, 2025
02e73d2
feat: add DateInThePastAlertModal and integrate date validation in Bu…
iacopolea Oct 1, 2025
fd9e244
chore: validate
iacopolea Oct 1, 2025
e9e88fb
fix: update tooltip content and refine plan status checks in IconButt…
iacopolea Oct 2, 2025
50ae498
Merge branch 'develop' into UN-1556
iacopolea Oct 6, 2025
a4a08ba
Merge pull request #1442 from AppQuality/modale-data-pre-pagamento
d-beezee Oct 6, 2025
987561c
Merge pull request #1436 from AppQuality/UN-1556
iacopolea Oct 6, 2025
acab138
refactor: remove campaign query and simplify plan status handling in …
iacopolea Oct 6, 2025
1431419
fix: remove campaign loading checks from usePlan hook
iacopolea Oct 6, 2025
4f1e951
fix: simplify approved plan status handling in usePlan hook
iacopolea Oct 6, 2025
29029fc
chore validate
iacopolea Oct 6, 2025
a0b869b
chore: validate
iacopolea Oct 6, 2025
7c19608
Merge pull request #1443 from AppQuality/fix-vari-2
d-beezee Oct 6, 2025
46175ee
fix: add CheckoutItem tag to API slice and enhance endpoints
iacopolea Oct 6, 2025
8bf0fa5
fix: add translation for duplicate touchpoint form factors and update…
d-beezee Oct 6, 2025
2fcd732
Merge pull request #1444 from AppQuality/fix-vari-2
d-beezee Oct 6, 2025
b109482
fix: improve error handling for checkout item and refactor plan statu…
d-beezee Oct 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"dependencies": {
"@analytics/google-tag-manager": "^0.6.0",
"@appquality/languages": "1.4.3",
"@appquality/unguess-design-system": "4.0.49",
"@appquality/unguess-design-system": "4.0.50--canary.549.d20012e.0",
"@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",
"@emotion/is-prop-valid": "^1.4.0",
"@headwayapp/react-widget": "^0.0.4",
"@reduxjs/toolkit": "^1.8.0",
"@sentry/react": "^8.32.0",
Expand Down
2 changes: 1 addition & 1 deletion src/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const analytics = Analytics({
}),
}),
userpilot({
token: isDev() ? 'STG-NX-54e88e10' : 'NX-54e88e10',
token: 'NX-54e88e10',
}),
],
}),
Expand Down
76 changes: 45 additions & 31 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,63 @@ import {
ThemeProvider,
ToastProvider,
} from '@appquality/unguess-design-system';
import isPropValid from '@emotion/is-prop-valid';
import Helmet from 'react-helmet';
import { useTranslation } from 'react-i18next';
import { Provider } from 'react-redux';
import analytics from 'src/analytics';
import { appTheme } from 'src/app/theme';
import { AnalyticsProvider } from 'use-analytics';
import Pages from 'src/common/Pages';
import analytics from 'src/analytics';
import { StyleSheetManager } from 'styled-components';
import { AnalyticsProvider } from 'use-analytics';
import '../i18n';
import { store } from './store';

// This implements the default behavior from styled-components v5
function shouldForwardProp(propName: string, target: any) {
if (typeof target === 'string') {
// For HTML elements, forward the prop if it is a valid HTML attribute
return isPropValid(propName);
}
// For other elements, forward all props
return true;
}

const App = () => {
const { t } = useTranslation();
return (
<Provider store={store}>
<AnalyticsProvider instance={analytics}>
<ThemeProvider theme={appTheme}>
<GlobalStyle />
<Helmet>
<meta
property="og:title"
content={`UNGUESS - ${t('__APP_META_PAYOFF')}`}
/>
<title>UNGUESS - {t('__APP_META_PAYOFF')}</title>
<meta name="description" content={t('__APP_META_DESCRIPTION')} />
</Helmet>
<ToastProvider
limit={5}
zIndex={500}
placementProps={{
top: {
style: {
top:
parseInt(appTheme.components.chrome.header.height, 10) +
appTheme.space.base * 4,
<StyleSheetManager shouldForwardProp={shouldForwardProp}>
<Provider store={store}>
<AnalyticsProvider instance={analytics}>
<ThemeProvider theme={appTheme}>
<GlobalStyle />
<Helmet>
<meta
property="og:title"
content={`UNGUESS - ${t('__APP_META_PAYOFF')}`}
/>
<title>UNGUESS - {t('__APP_META_PAYOFF')}</title>
<meta name="description" content={t('__APP_META_DESCRIPTION')} />
</Helmet>
<ToastProvider
limit={5}
zIndex={500}
placementProps={{
top: {
style: {
top:
parseInt(appTheme.components.chrome.header.height, 10) +
appTheme.space.base * 4,
},
},
},
}}
>
<Pages />
</ToastProvider>
</ThemeProvider>
</AnalyticsProvider>
</Provider>
}}
>
<Pages />
</ToastProvider>
</ThemeProvider>
</AnalyticsProvider>
</Provider>
</StyleSheetManager>
);
};

Expand Down
6 changes: 6 additions & 0 deletions src/assets/icons/dashboard_customize.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/common/Track.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const Track = ({
const { data: userData, isLoading, isSuccess } = useGetUsersMeQuery();
const { activeWorkspace } = useActiveWorkspace();
const { track, identify, page } = useAnalytics();
const utmSource = sessionStorage.getItem('utmSource');
const location = useLocation();

const defaultMeta = [
Expand Down Expand Up @@ -63,6 +64,7 @@ export const Track = ({
email: userData.email,
company: activeWorkspace.company,
workspace: activeWorkspace,
...((utmSource && { utm_source: utmSource }) || {}),
});

track(
Expand Down
12 changes: 10 additions & 2 deletions src/common/analytics-plugins/userpilot.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { User } from 'src/features/api';
import { Userpilot } from 'userpilot';
import { isDev } from '../isDevEnvironment';

declare global {
interface Window {
Expand Down Expand Up @@ -28,7 +29,14 @@ export default function userpilotPlugin(pluginSettings: UserpilotConfig) {
name: 'userpilot',
config: { ...pluginSettings },
initialize: ({ config }: { config: UserpilotConfig }) => {
Userpilot.initialize(config.token);
if (isDev()) {
const previewEnabled = localStorage.getItem('userpilot_ug_preview');
if (previewEnabled !== null) {
Userpilot.initialize(config.token);
}
} else {
Userpilot.initialize(config.token);
}
},
identify: ({ payload }: { payload: IIdentifyPayload }) => {
const { userId, traits } = payload;
Expand Down Expand Up @@ -56,6 +64,6 @@ export default function userpilotPlugin(pluginSettings: UserpilotConfig) {
Userpilot.track(event, { ...properties, userId });
},

loaded: () => !!window.userpilot,
loaded: () => true,
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding the loaded function to always return true may cause issues if Userpilot isn't actually loaded. Consider implementing proper loaded state detection.

Suggested change
loaded: () => true,
loaded: () =>
typeof window !== 'undefined' &&
window.userpilot !== undefined &&
typeof window.userpilot.initialized === 'number' &&
window.userpilot.initialized > 0,

Copilot uses AI. Check for mistakes.
};
}
43 changes: 42 additions & 1 deletion src/common/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,15 @@ export interface paths {
};
};
};
"/plans/{pid}/rules-evaluation": {
/** Usefull endpoint when a purchasable plan have some failed rules */
get: operations["get-plans-pid-rules-evaluation"];
parameters: {
path: {
pid: string;
};
};
};
"/plans/{pid}/status": {
/** */
patch: operations["patch-workspaces-wid-plans-pid-status"];
Expand Down Expand Up @@ -1424,6 +1433,16 @@ export interface components {
name: string;
workspaceId: number;
};
/**
* PurchasablePlanRules
* @enum {string}
*/
PurchasablePlanRules:
| "number_of_modules"
| "module_type"
| "number_of_testers"
| "number_of_tasks"
| "task_type";
/** Report */
Report: {
creation_date?: string;
Expand Down Expand Up @@ -3344,8 +3363,12 @@ export interface operations {
config: {
modules: components["schemas"]["Module"][];
};
from_template?: {
id: number;
title: string;
};
id: number;
is_frozen?: number;
price?: string;
project: {
id: number;
name: string;
Expand Down Expand Up @@ -3421,6 +3444,24 @@ export interface operations {
500: components["responses"]["Error"];
};
};
/** Usefull endpoint when a purchasable plan have some failed rules */
"get-plans-pid-rules-evaluation": {
parameters: {
path: {
pid: string;
};
};
responses: {
/** OK */
200: {
content: {
"application/json": {
failed: components["schemas"]["PurchasablePlanRules"][];
};
};
};
};
};
/** */
"patch-workspaces-wid-plans-pid-status": {
parameters: {
Expand Down
2 changes: 2 additions & 0 deletions src/features/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export const apiSlice = createApi({
'Archive',
'Plans',
'Users',
'EvaluationRules',
'CheckoutItem',
],
endpoints: () => ({}),
});
10 changes: 8 additions & 2 deletions src/features/api/apiTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,16 @@ unguessApi.enhanceEndpoints({
},
},
patchPlansByPid: {
invalidatesTags: ['Plans'],
invalidatesTags: ['Plans', 'EvaluationRules'],
},
postWorkspacesByWidPlans: {
invalidatesTags: ['Plans'],
},
patchPlansByPidStatus: {
invalidatesTags: ['Plans', 'Projects'],
invalidatesTags: ['Plans', 'Projects', 'CheckoutItem'],
},
getPlansByPidCheckoutItem: {
providesTags: ['CheckoutItem'],
},
deleteProjectsByPid: {
invalidatesTags: ['Projects'],
Expand All @@ -324,6 +327,9 @@ unguessApi.enhanceEndpoints({
getWorkspacesByWidTemplates: {
providesTags: ['Templates'],
},
getPlansByPidRulesEvaluation: {
providesTags: ['EvaluationRules'],
},
},
});

Expand Down
29 changes: 26 additions & 3 deletions src/features/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,12 @@ const injectedRtkApi = api.injectEndpoints({
>({
query: (queryArg) => ({ url: `/plans/${queryArg.pid}/checkoutItem` }),
}),
getPlansByPidRulesEvaluation: build.query<
GetPlansByPidRulesEvaluationApiResponse,
GetPlansByPidRulesEvaluationApiArg
>({
query: (queryArg) => ({ url: `/plans/${queryArg.pid}/rules-evaluation` }),
}),
patchPlansByPidStatus: build.mutation<
PatchPlansByPidStatusApiResponse,
PatchPlansByPidStatusApiArg
Expand Down Expand Up @@ -1553,8 +1559,12 @@ export type GetPlansByPidApiResponse = /** status 200 OK */ {
config: {
modules: Module[];
};
from_template?: {
id: number;
title: string;
};
id: number;
is_frozen?: number;
price?: string;
project: {
id: number;
name: string;
Expand Down Expand Up @@ -1587,6 +1597,12 @@ export type GetPlansByPidCheckoutItemApiResponse = /** status 200 OK */ {
export type GetPlansByPidCheckoutItemApiArg = {
pid: string;
};
export type GetPlansByPidRulesEvaluationApiResponse = /** status 200 OK */ {
failed: PurchasablePlanRules[];
};
export type GetPlansByPidRulesEvaluationApiArg = {
pid: string;
};
export type PatchPlansByPidStatusApiResponse = /** status 200 OK */ {};
export type PatchPlansByPidStatusApiArg = {
pid: string;
Expand Down Expand Up @@ -2670,8 +2686,7 @@ export type OutputModuleTouchpointsAppTablet = {
kind: 'app';
os: {
ios?: string;
linux?: string;
windows?: string;
android?: string;
};
};
export type OutputModuleTouchpointsAppSmartphone = {
Expand Down Expand Up @@ -2811,6 +2826,13 @@ export type Module =
| ModuleGasSupply
| ModuleAnnualIncomeRange;
export type PlanStatus = 'pending_review' | 'draft' | 'approved' | 'paying';
export type PurchasablePlanRules =
| 'number_of_modules'
| 'module_type'
| 'number_of_testers'
| 'number_of_tasks'
| 'task_type'
| 'duplicate_touchpoint_form_factors';
export type Project = {
campaigns_count: number;
description?: string;
Expand Down Expand Up @@ -2991,6 +3013,7 @@ export const {
useGetPlansByPidQuery,
usePatchPlansByPidMutation,
useGetPlansByPidCheckoutItemQuery,
useGetPlansByPidRulesEvaluationQuery,
usePatchPlansByPidStatusMutation,
usePostProjectsMutation,
useDeleteProjectsByPidMutation,
Expand Down
1 change: 1 addition & 0 deletions src/features/modules/useRequestQuotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const useRequestQuotation = () => {
if (getPlanStatus() === 'pending_review') {
return true;
}

// if the user is already submitting, return true
if (isSubmitting || isLoading) {
return true;
Expand Down
Loading
Loading