refactor: improve TaskDialog layout and styling for better user experience
This commit is contained in:
@@ -445,22 +445,22 @@ function TaskDialog({
|
|||||||
{mode === "create" ? "Görev ekle" : "Düzenle"}
|
{mode === "create" ? "Görev ekle" : "Düzenle"}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent className="max-h-[min(680px,calc(100dvh-6rem))] overflow-hidden sm:max-w-xl data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95">
|
<DialogContent className="flex max-h-[calc(100dvh-2rem)] w-[calc(100vw-2rem)] flex-col overflow-hidden p-0 sm:max-h-[min(680px,calc(100dvh-4rem))] sm:max-w-xl data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95">
|
||||||
<form action={handleSubmit} className="flex max-h-[min(640px,calc(100dvh-9rem))] flex-col">
|
<form action={handleSubmit} className="flex min-h-0 flex-1 flex-col overflow-hidden">
|
||||||
{task ? <input type="hidden" name="id" value={task.id} /> : null}
|
{task ? <input type="hidden" name="id" value={task.id} /> : null}
|
||||||
<DialogHeader className="shrink-0 pb-5">
|
<DialogHeader className="shrink-0 px-5 pb-4 pt-5 pr-12">
|
||||||
<DialogTitle>{mode === "create" ? "Yeni görev" : "Görevi düzenle"}</DialogTitle>
|
<DialogTitle>{mode === "create" ? "Yeni görev" : "Görevi düzenle"}</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
Görevi proje, müşteri, öncelik ve son tarih bilgileriyle kaydet.
|
Görevi proje, müşteri, öncelik ve son tarih bilgileriyle kaydet.
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
<div className="tiny-scrollbar min-h-0 flex-1 overflow-y-auto pr-2">
|
<div className="tiny-scrollbar min-h-0 flex-1 overflow-y-auto px-5 pb-5">
|
||||||
<TaskFormFields task={task} clients={clients} projects={projects} />
|
<TaskFormFields task={task} clients={clients} projects={projects} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogFooter className="shrink-0 border-t border-border pt-5">
|
<DialogFooter className="shrink-0 border-t border-border bg-background p-5">
|
||||||
<Button type="submit" disabled={isSubmitting} className="gap-2">
|
<Button type="submit" disabled={isSubmitting} className="w-full gap-2 sm:w-auto">
|
||||||
{mode === "create" ? <Plus className="h-4 w-4" /> : <Pencil className="h-4 w-4" />}
|
{mode === "create" ? <Plus className="h-4 w-4" /> : <Pencil className="h-4 w-4" />}
|
||||||
{isSubmitting
|
{isSubmitting
|
||||||
? "Kaydediliyor"
|
? "Kaydediliyor"
|
||||||
|
|||||||
Reference in New Issue
Block a user