Fix #4457 (remove event type action buttons) (#4472)

* Fix #4457 (remove event type action buttons)

* Configured backPath

Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
This commit is contained in:
Alex van Andel
2022-09-14 22:11:31 +00:00
committed by GitHub
co-authored by Joe Au-Yeung Bailey Pumfleet
parent e29d9cd545
commit 2281c7cf9f
2 changed files with 2 additions and 13 deletions
@@ -154,6 +154,7 @@ function EventTypeSingleLayout({
return (
<Shell
backPath="/event-types"
title={t("event_type_title", { eventTypeTitle: eventType.title })}
heading={eventType.title}
subtitle={eventType.description || ""}
+1 -13
View File
@@ -17,7 +17,7 @@ import prisma from "@calcom/prisma";
import { trpc } from "@calcom/trpc/react";
import type { RecurringEvent } from "@calcom/types/Calendar";
import { Form } from "@calcom/ui/form/fields";
import { Button, showToast } from "@calcom/ui/v2";
import { showToast } from "@calcom/ui/v2";
import { asStringOrThrow } from "@lib/asStringOrNull";
import { getSession } from "@lib/auth";
@@ -37,8 +37,6 @@ import EventWorkflowsTab from "@components/v2/eventtype/EventWorkfowsTab";
import { getTranslation } from "@server/lib/i18n";
const TABS_WITHOUT_ACTION_BUTTONS = ["workflows", "availability"];
export type FormValues = {
title: string;
eventTitle: string;
@@ -245,16 +243,6 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
<div ref={animationParentRef} className="space-y-6">
{tabMap[tabName]}
</div>
{!TABS_WITHOUT_ACTION_BUTTONS.includes(tabName) && (
<div className="mt-4 flex justify-end space-x-2 rtl:space-x-reverse">
<Button href="/event-types" color="secondary" tabIndex={-1}>
{t("cancel")}
</Button>
<Button type="submit" data-testid="update-eventtype" disabled={updateMutation.isLoading}>
{t("update")}
</Button>
</div>
)}
</Form>
</EventTypeSingleLayout>
);