Skip to content

Commit

Permalink
chore: EE license trial info on settings etc. (formbricks#2681)
Browse files Browse the repository at this point in the history
(cherry picked from commit af09e31)
  • Loading branch information
jobenjada authored and mmopinodo committed Jun 12, 2024
1 parent ce90753 commit 2919c6b
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { LoadSegmentModal } from "@formbricks/ui/Targeting/LoadSegmentModal";
import { SaveAsNewSegmentModal } from "@formbricks/ui/Targeting/SaveAsNewSegmentModal";
import { SegmentTitle } from "@formbricks/ui/Targeting/SegmentTitle";
import { TargetingIndicator } from "@formbricks/ui/Targeting/TargetingIndicator";
import { UpgradePlanNotice } from "@formbricks/ui/UpgradePlanNotice";

import {
cloneBasicSegmentAction,
Expand All @@ -47,6 +48,7 @@ export const TargetingCard = ({
attributeClasses,
segments,
initialSegment,
isFormbricksCloud,
}: TargetingCardProps) => {
const router = useRouter();
const [segment, setSegment] = useState<TSegment | null>(localSurvey.segment);
Expand Down Expand Up @@ -357,6 +359,21 @@ export const TargetingCard = ({
</Button>
)}
</div>
<div className="-mt-1.5">
{isFormbricksCloud ? (
<UpgradePlanNotice
message="For advanced targeting, please"
textForUrl="upgrade to the User Identification plan."
url={`/environments/${environmentId}/settings/billing`}
/>
) : (
<UpgradePlanNotice
message="For advanced targeting, please"
textForUrl="request an Enterprise license."
url={`/environments/${environmentId}/settings/enterprise`}
/>
)}
</div>
</div>

{!!segment && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const ActivityTimeline = ({

{!isUserTargetingEnabled ? (
<UpgradePlanNotice
message="Upgrade to the User Targeting plan to store action history."
textForUrl="Upgrade now."
message="Upgrade your plan to store action history."
textForUrl="More info."
url={`/environments/${environment.id}/settings/billing`}
/>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ export const BasicCreateSegmentModal = ({
{isFormbricksCloud ? (
<UpgradePlanNotice
message="For advanced targeting, please"
textForUrl="upgrade to the User Identification plan."
textForUrl="upgrade your plan."
url={`/environments/${environmentId}/settings/billing`}
/>
) : (
<UpgradePlanNotice
message="For advanced targeting, please"
textForUrl="request an Enterprise license."
url="https://formbricks.com/docs/self-hosting/enterprise"
textForUrl="request an Enterprise License."
url={`/environments/${environmentId}/settings/enterprise`}
/>
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ export const BasicSegmentSettings = ({
{isFormbricksCloud ? (
<UpgradePlanNotice
message="For advanced targeting, please"
textForUrl="upgrade to the User Identification plan."
textForUrl="upgrade your plan."
url={`/environments/${environmentId}/settings/billing`}
/>
) : (
<UpgradePlanNotice
message="For advanced targeting, please"
textForUrl="request an Enterprise license."
url="https://formbricks.com/docs/self-hosting/enterprise"
textForUrl="request an Enterprise License."
url={`/environments/${environmentId}/settings/enterprise`}
/>
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
ChevronRightIcon,
Cog,
CreditCardIcon,
KeyIcon,
LogOutIcon,
MessageCircle,
MousePointerClick,
Expand Down Expand Up @@ -186,6 +187,12 @@ export const MainNavigation = ({
hidden: !isFormbricksCloud || isPricingDisabled,
icon: CreditCardIcon,
},
{
label: "License",
href: `/environments/${environment.id}/settings/enterprise`,
hidden: isFormbricksCloud || isPricingDisabled,
icon: KeyIcon,
},
{
label: "Documentation",
href: "https://formbricks.com/docs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ const Page = async ({ params }) => {

const paidFeatures = [
{
title: "Team Roles (Admin, Editor, Developer, etc.)",
title: "Multi-Language Surveys",
comingSoon: false,
onRequest: false,
},
{
title: "Advanced Targeting and Segmentation (In-app Surveys)",
title: "Team Access Roles (Admin, Editor, Developer, etc.)",
comingSoon: false,
onRequest: false,
},
{
title: "Multi-Language Surveys",
title: "Advanced Targeting and Segmentation (In-app Surveys)",
comingSoon: false,
onRequest: false,
},
Expand All @@ -76,11 +76,6 @@ const Page = async ({ params }) => {
comingSoon: false,
onRequest: true,
},
{
title: "Extensive Whitelabeling",
comingSoon: false,
onRequest: true,
},
{
title: "Custom Feature Development",
comingSoon: false,
Expand Down Expand Up @@ -140,7 +135,7 @@ const Page = async ({ params }) => {
</svg>
<div className="mx-auto text-center lg:mx-0 lg:flex-auto lg:py-16 lg:text-left">
<h2 className="text-2xl font-bold text-white sm:text-3xl">
Unlock the full power of Formbricks.
Unlock the full power of Formbricks. Free for 30 days.
</h2>
<p className="text-md mt-6 leading-8 text-slate-300">
Keep full control over your data privacy and security.
Expand Down Expand Up @@ -172,15 +167,17 @@ const Page = async ({ params }) => {
</li>
))}
</ul>
<p className="my-6 text-sm text-slate-500">
Please request all Enterprise License info incl. pricing here:
<p className="my-6 text-sm text-slate-700">
No call needed, no strings attached: Request a free 30-day trial license to test all features
by filling out this form:
</p>
<Button
variant="darkCTA"
href="https://app.formbricks.com/s/clvupq3y205i5yrm3sm9v1xt5"
target="_blank">
Request Enterprise License Info
Request 30-day Trial License
</Button>
<p className="mt-2 text-xs text-slate-500">No credit card. No sales call. Just test it :)</p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export const IndividualInviteTab = ({
) : (
<UpgradePlanNotice
message="To manage access roles for your team,"
url="https://formbricks.com/docs/self-hosting/enterprise"
textForUrl="get a enterprise license."
url={`/environments/${environmentId}/settings/enterprise`}
textForUrl="get an Enterprise License."
/>
))}
</div>
Expand Down
19 changes: 17 additions & 2 deletions packages/ee/multiLanguage/components/MultiLanguageCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Button } from "@formbricks/ui/Button";
import { ConfirmationModal } from "@formbricks/ui/ConfirmationModal";
import { Label } from "@formbricks/ui/Label";
import { Switch } from "@formbricks/ui/Switch";
import { UpgradePlanNotice } from "@formbricks/ui/UpgradePlanNotice";

import { DefaultLanguageSelect } from "./DefaultLanguageSelect";
import { SecondaryLanguageSelect } from "./SecondaryLanguageSelect";
Expand All @@ -25,6 +26,7 @@ interface MultiLanguageCardProps {
activeQuestionId: string | null;
setActiveQuestionId: (questionId: string | null) => void;
isMultiLanguageAllowed?: boolean;
isFormbricksCloud: boolean;
setSelectedLanguageCode: (language: string) => void;
}

Expand All @@ -44,6 +46,7 @@ export const MultiLanguageCard: FC<MultiLanguageCardProps> = ({
setActiveQuestionId,
setLocalSurvey,
isMultiLanguageAllowed,
isFormbricksCloud,
setSelectedLanguageCode,
}) => {
const environmentId = localSurvey.environmentId;
Expand Down Expand Up @@ -211,7 +214,19 @@ export const MultiLanguageCard: FC<MultiLanguageCardProps> = ({
</Collapsible.CollapsibleTrigger>
<Collapsible.CollapsibleContent className="px-4 pb-6">
<div className="space-y-4">
{
{!isMultiLanguageAllowed && !isFormbricksCloud && !isMultiLanguageActivated ? (
<UpgradePlanNotice
message="To enable multi-language surveys, you need an active"
url={`/environments/${environmentId}/settings/enterprise`}
textForUrl="Enterprise License."
/>
) : !isMultiLanguageAllowed && isFormbricksCloud && !isMultiLanguageActivated ? (
<UpgradePlanNotice
message="To enable multi-language surveys,"
url={`/environments/${environmentId}/settings/billing`}
textForUrl="please upgrade your plan."
/>
) : (
<>
{product.languages.length <= 1 && (
<div className="mb-4 text-sm italic text-slate-500">
Expand Down Expand Up @@ -259,7 +274,7 @@ export const MultiLanguageCard: FC<MultiLanguageCardProps> = ({
</Button>
</Link>
</>
}
)}

<ConfirmationModal
title={confirmationModalInfo.title}
Expand Down

0 comments on commit 2919c6b

Please sign in to comment.