Alert to describe exclusion of options (#2770)

* Alert to describe exclusion of options

* Update apps/web/pages/event-types/[type].tsx

Co-authored-by: Omar López <[email protected]>

* Update apps/web/components/eventtype/RecurringEventController.tsx

Co-authored-by: Omar López <[email protected]>

* Formatting

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Omar López <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-05-16 18:50:53 +00:00
1 parent 3421af10a9
commit 81d917e27a
3 files changed
+56 -46

No files matched your search

@@ -1,10 +1,11 @@
import { Collapsible, CollapsibleContent } from "@radix-ui/react-collapsible";
import React, { useState } from "react";
import { useState } from "react";
import { UseFormReturn } from "react-hook-form";
import { Frequency as RRuleFrequency } from "rrule";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { RecurringEvent } from "@calcom/types/Calendar";
import { Alert } from "@calcom/ui/Alert";
import Select from "@components/ui/form/Select";
@@ -40,15 +41,17 @@ export default function RecurringEventController({
}));
return (
<>
{!paymentEnabled && (
<div className="block items-start sm:flex">
<div className="min-w-48 mb-4 sm:mb-0">
<label htmlFor="recurringEvent" className="flex text-sm font-medium text-neutral-700">
{t("recurring_event")}
</label>
</div>
<div className="w-full">
<div className="block items-start sm:flex">
<div className="min-w-48 mb-4 sm:mb-0">
<label htmlFor="recurringEvent" className="flex text-sm font-medium text-neutral-700">
{t("recurring_event")}
</label>
</div>
<div className={!paymentEnabled ? "w-full" : ""}>
{paymentEnabled ? (
<Alert severity="warning" title={t("warning_payment_recurring_event")} />
) : (
<>
<div className="relative flex items-start">
<div className="flex h-5 items-center">
<input
@@ -136,9 +139,9 @@ export default function RecurringEventController({
</div>
</CollapsibleContent>
</Collapsible>
</div>
</div>
)}
</>
</>
)}
</div>
</div>
);
}