fix: ui of reschedule dialog (#5691)
Signed-off-by: Udit Takkar <[email protected]> Signed-off-by: Udit Takkar <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
1 file changed
+39
-49
@@ -2,17 +2,7 @@ import { Dispatch, SetStateAction, useState } from "react";
|
|||||||
|
|
||||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||||
import { trpc } from "@calcom/trpc/react";
|
import { trpc } from "@calcom/trpc/react";
|
||||||
import {
|
import { Button, Dialog, DialogContent, Icon, showToast, TextArea } from "@calcom/ui";
|
||||||
Button,
|
|
||||||
Dialog,
|
|
||||||
DialogClose,
|
|
||||||
DialogContent,
|
|
||||||
DialogFooter,
|
|
||||||
DialogHeader,
|
|
||||||
Icon,
|
|
||||||
showToast,
|
|
||||||
TextArea,
|
|
||||||
} from "@calcom/ui";
|
|
||||||
|
|
||||||
interface IRescheduleDialog {
|
interface IRescheduleDialog {
|
||||||
isOpenDialog: boolean;
|
isOpenDialog: boolean;
|
||||||
@@ -40,44 +30,44 @@ export const RescheduleDialog = (props: IRescheduleDialog) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={isOpenDialog} onOpenChange={setIsOpenDialog}>
|
<Dialog open={isOpenDialog} onOpenChange={setIsOpenDialog}>
|
||||||
<DialogContent>
|
<DialogContent
|
||||||
<div className="flex flex-row space-x-3">
|
Icon={Icon.FiClock}
|
||||||
<div className="flex h-10 w-10 flex-shrink-0 justify-center rounded-full bg-[#FAFAFA]">
|
useOwnActionButtons
|
||||||
<Icon.FiClock className="m-auto h-6 w-6" />
|
title={t("send_reschedule_request")}
|
||||||
</div>
|
description={t("reschedule_modal_description")}>
|
||||||
<div className="pt-1">
|
<div>
|
||||||
<DialogHeader title={t("send_reschedule_request")} />
|
<p className="text-sm font-medium text-black">
|
||||||
|
{t("reason_for_reschedule_request")}
|
||||||
<p className="-mt-8 text-sm text-gray-500">{t("reschedule_modal_description")}</p>
|
<span className="font-normal text-gray-500"> (Optional)</span>
|
||||||
<p className="mt-6 mb-2 text-sm font-bold text-black">
|
</p>
|
||||||
{t("reason_for_reschedule_request")}
|
<TextArea
|
||||||
<span className="font-normal text-gray-500"> (Optional)</span>
|
data-testid="reschedule_reason"
|
||||||
</p>
|
name={t("reschedule_reason")}
|
||||||
<TextArea
|
value={rescheduleReason}
|
||||||
data-testid="reschedule_reason"
|
onChange={(e) => setRescheduleReason(e.target.value)}
|
||||||
name={t("reschedule_reason")}
|
className="mt-2"
|
||||||
value={rescheduleReason}
|
/>
|
||||||
onChange={(e) => setRescheduleReason(e.target.value)}
|
</div>
|
||||||
className="mb-5 sm:mb-6"
|
<div className="flex justify-end space-x-2">
|
||||||
/>
|
<Button
|
||||||
|
onClick={() => {
|
||||||
<DialogFooter>
|
setRescheduleReason("");
|
||||||
<DialogClose asChild>
|
setIsOpenDialog(false);
|
||||||
<Button color="secondary">{t("cancel")}</Button>
|
}}
|
||||||
</DialogClose>
|
color="secondary">
|
||||||
<Button
|
{t("cancel")}
|
||||||
data-testid="send_request"
|
</Button>
|
||||||
disabled={isLoading}
|
<Button
|
||||||
onClick={() => {
|
data-testid="send_request"
|
||||||
rescheduleApi({
|
disabled={isLoading}
|
||||||
bookingId,
|
onClick={() => {
|
||||||
rescheduleReason,
|
rescheduleApi({
|
||||||
});
|
bookingId,
|
||||||
}}>
|
rescheduleReason,
|
||||||
{t("send_reschedule_request")}
|
});
|
||||||
</Button>
|
}}>
|
||||||
</DialogFooter>
|
{t("send_reschedule_request")}
|
||||||
</div>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|||||||
Reference in new issue
Block a user