Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generic <UpgradeScreen> component #6594

Merged
merged 22 commits into from Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e45bf93
first attempt of <UpgradeScreen>
PeerRich Jan 19, 2023
930a148
changes to icons
PeerRich Jan 19, 2023
d0130ec
reverted changes back to initial state, needs fix: teams not showing
PeerRich Jan 20, 2023
b05623b
Merge remote-tracking branch 'origin/main' into upgradeScreen2
sean-brydon Jan 20, 2023
a54bfea
WIP
sean-brydon Jan 20, 2023
69ee010
Fix weird reactnode error
sean-brydon Jan 20, 2023
aa4348f
Fix loading text
sean-brydon Jan 20, 2023
0ceb0f4
added upgradeTip to routing forms
PeerRich Jan 20, 2023
816be70
icon colors
PeerRich Jan 20, 2023
249cd3d
create and use hook to check if user has team plan
Jan 20, 2023
5e78029
use useTeamPlan for upgradeTeamsBadge
Jan 20, 2023
c917f44
replace huge svg with compressed jpeg
PeerRich Jan 20, 2023
166f2e0
responsive fixes
PeerRich Jan 20, 2023
77cd1dc
Update packages/ui/components/badge/UpgradeTeamsBadge.tsx
CarinaWolli Jan 20, 2023
fdcc932
Merge branch 'upgradeScreen2' of https://github.com/calcom/cal.com in…
PeerRich Jan 20, 2023
b0c74ca
Merge branch 'main' into upgradeScreen2
emrysal Jan 21, 2023
af547d6
Merge branch 'main' into upgradeScreen2
emrysal Jan 21, 2023
adcf3c6
Merge remote-tracking branch 'origin/main' into upgradeScreen2
hariombalhara Jan 23, 2023
ab163ef
Give team plan features to E2E tests
hariombalhara Jan 23, 2023
077fe40
Allow option to make a user part of team int ests
hariombalhara Jan 23, 2023
340d166
Remove flash of paywall for team user
hariombalhara Jan 23, 2023
27b213b
Add team user for typeform tests as well
hariombalhara Jan 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 7 additions & 6 deletions apps/web/pages/settings/my-account/appearance.tsx
Expand Up @@ -4,6 +4,7 @@ import { Controller, useForm } from "react-hook-form";

import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout";
import { APP_NAME } from "@calcom/lib/constants";
import { useHasTeamPlan } from "@calcom/lib/hooks/useHasTeamPlan";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import {
Expand Down Expand Up @@ -49,7 +50,8 @@ const AppearanceView = () => {
const session = useSession();
const utils = trpc.useContext();
const { data: user, isLoading } = trpc.viewer.me.useQuery();
const { data: dataHasTeamPlan, isLoading: isLoadingHasTeamPlan } = trpc.viewer.teams.hasTeamPlan.useQuery();

const hasTeamPlan = useHasTeamPlan();

const formMethods = useForm({
defaultValues: {
Expand All @@ -74,8 +76,7 @@ const AppearanceView = () => {
},
});

if (isLoading || isLoadingHasTeamPlan)
return <SkeletonLoader title={t("appearance")} description={t("appearance_description")} />;
if (isLoading) return <SkeletonLoader title={t("appearance")} description={t("appearance_description")} />;
hariombalhara marked this conversation as resolved.
Show resolved Hide resolved

if (!user) return null;

Expand Down Expand Up @@ -182,18 +183,18 @@ const AppearanceView = () => {
<p className="font-semibold ltr:mr-2 rtl:ml-2">
{t("disable_cal_branding", { appName: APP_NAME })}
</p>
{!dataHasTeamPlan?.hasTeamPlan && <UpgradeTeamsBadge />}
<UpgradeTeamsBadge />
</div>
<p className="mt-0.5 text-gray-600">{t("removes_cal_branding", { appName: APP_NAME })}</p>
</div>
<div className="flex-none">
<Switch
id="hideBranding"
disabled={!dataHasTeamPlan?.hasTeamPlan}
disabled={!hasTeamPlan}
onCheckedChange={(checked) =>
formMethods.setValue("hideBranding", checked, { shouldDirty: true })
}
checked={!dataHasTeamPlan?.hasTeamPlan ? false : value}
checked={hasTeamPlan ? value : false}
/>
</div>
</div>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion apps/web/public/static/locales/en/common.json
Expand Up @@ -1238,6 +1238,7 @@
"to": "To",
"workflow_turned_on_successfully": "{{workflowName}} workflow turned {{offOn}} successfully",
"download_responses": "Download Responses",
"download_responses_description": "Download all responses to your form in CSV format.",
"download": "Download",
"create_your_first_form": "Create your first form",
"create_your_first_form_description": "With Routing Forms you can ask qualifying questions and route to the correct person or event type.",
Expand Down Expand Up @@ -1280,6 +1281,8 @@
"routing_forms_send_email_owner": "Send Email to Owner",
"routing_forms_send_email_owner_description": "Sends an email to the owner when the form is submitted",
"add_new_form": "Add new form",
"create_your_first_route": "Create your first route",
"route_to_the_right_person": "Route to the right person based on the answers to your form",
"form_description": "Create your form to route a booker",
"copy_link_to_form": "Copy link to form",
"theme": "Theme",
Expand Down Expand Up @@ -1513,5 +1516,9 @@
"install_google_meet": "Install Google Meet",
"install_google_calendar": "Install Google Calendar",
"sender_name": "Sender name",
"no_recordings_found": "No recordings found"
"no_recordings_found": "No recordings found",
"reporting": "Reporting",
"reporting_feature": "See all incoming from data and download it as a CSV",
"teams_plan_required": "Teams plan required",
"routing_forms_are_a_great_way": "Routing forms are a great way to route your incoming leads to the right person. Upgrade to a Teams plan to access this feature."
}