refactor(ui): standardize operation page actions
This commit is contained in:
@@ -158,7 +158,7 @@ export default function AIChatPage() {
|
|||||||
<MessageSquare className="h-4 w-4" />
|
<MessageSquare className="h-4 w-4" />
|
||||||
Sohbetler
|
Sohbetler
|
||||||
</h2>
|
</h2>
|
||||||
<Button variant="outline" size="icon" className="h-8 w-8" onClick={() => {
|
<Button effect="shine" variant="secondary" size="icon-sm" onClick={() => {
|
||||||
handleNewChat();
|
handleNewChat();
|
||||||
setIsMobileSessionsOpen(false);
|
setIsMobileSessionsOpen(false);
|
||||||
}}>
|
}}>
|
||||||
@@ -173,31 +173,31 @@ export default function AIChatPage() {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
sessions.map((session) => (
|
sessions.map((session) => (
|
||||||
<button
|
<div key={session.id} className="group flex items-center gap-1">
|
||||||
key={session.id}
|
<Button effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => {
|
variant={activeSessionId === session.id ? "default" : "secondary"}
|
||||||
setActiveSessionId(session.id);
|
onClick={() => {
|
||||||
setIsMobileSessionsOpen(false);
|
setActiveSessionId(session.id);
|
||||||
}}
|
setIsMobileSessionsOpen(false);
|
||||||
className={`group flex w-full items-center justify-between rounded-sm p-3 text-left transition-colors ${
|
}}
|
||||||
activeSessionId === session.id
|
className="min-w-0 flex-1 justify-start px-3"
|
||||||
? "bg-primary/10 text-primary"
|
>
|
||||||
: "text-foreground hover:bg-muted/50"
|
<span className="truncate text-sm font-medium">
|
||||||
}`}
|
{session.title || "İsimsiz sohbet"}
|
||||||
>
|
</span>
|
||||||
<span className="truncate pr-2 text-sm font-medium">
|
</Button>
|
||||||
{session.title || "İsimsiz sohbet"}
|
<Button effect="shine"
|
||||||
</span>
|
type="button"
|
||||||
<span
|
variant="secondary"
|
||||||
role="button"
|
size="icon-sm"
|
||||||
tabIndex={0}
|
aria-label={`${session.title || "İsimsiz sohbet"} sohbetini sil`}
|
||||||
onClick={(event) => void handleDeleteSession(session.id, event)}
|
onClick={(event) => void handleDeleteSession(session.id, event)}
|
||||||
className="rounded-sm p-1 opacity-0 transition-all hover:bg-rose-50 hover:text-rose-600 lg:group-hover:opacity-100"
|
className="text-destructive opacity-0 transition-opacity lg:group-hover:opacity-100"
|
||||||
>
|
>
|
||||||
<Trash2 className="h-3.5 w-3.5" />
|
<Trash2 className="h-3.5 w-3.5" />
|
||||||
</span>
|
</Button>
|
||||||
</button>
|
</div>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -236,10 +236,9 @@ export default function AIChatPage() {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-sm font-semibold text-foreground">AI Asistan</h1>
|
<h1 className="text-sm font-semibold text-foreground">AI Asistan</h1>
|
||||||
<p className="text-xs text-muted-foreground">Kayıtlı verilerin hakkında soru sor.</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Button variant="outline" size="sm" className="h-8 md:hidden text-xs px-3" onClick={() => setIsMobileSessionsOpen(true)}>
|
<Button effect="shine" variant="secondary" size="sm" className="md:hidden text-xs px-3" onClick={() => setIsMobileSessionsOpen(true)}>
|
||||||
<MessageSquare className="h-3.5 w-3.5 mr-1.5" /> Sohbetler
|
<MessageSquare className="h-3.5 w-3.5 mr-1.5" /> Sohbetler
|
||||||
</Button>
|
</Button>
|
||||||
</header>
|
</header>
|
||||||
@@ -304,11 +303,11 @@ export default function AIChatPage() {
|
|||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
/>
|
/>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<Button type="button" variant="outline" size="icon" className="shrink-0 h-9 w-9" onClick={() => void stop()}>
|
<Button effect="shine" type="button" variant="secondary" size="icon" className="shrink-0" onClick={() => void stop()}>
|
||||||
<span className="h-3 w-3 bg-current" />
|
<span className="h-3 w-3 bg-current" />
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Button type="submit" size="icon" className="shrink-0 h-9 w-9" disabled={!input.trim()}>
|
<Button variant="default" effect="shine" type="submit" size="icon" className="shrink-0" disabled={!input.trim()}>
|
||||||
<Send className="h-4 w-4" />
|
<Send className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ export function ClientDetailClient({ client, activities }: { client: ClientDetai
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-3xl font-bold text-foreground">{client.name}</h1>
|
<h1 className="text-3xl font-bold text-foreground">{client.name}</h1>
|
||||||
{client.company_name && <p className="text-muted-foreground mt-1">{client.company_name}</p>}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-2 items-center">
|
<div className="flex gap-2 items-center">
|
||||||
@@ -113,7 +112,7 @@ export function ClientDetailClient({ client, activities }: { client: ClientDetai
|
|||||||
{!client.client_auth_id && (
|
{!client.client_auth_id && (
|
||||||
<Dialog open={createUserOpen} onOpenChange={setCreateUserOpen}>
|
<Dialog open={createUserOpen} onOpenChange={setCreateUserOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button variant="outline" size="sm" className="gap-2 ml-2 border-dashed">
|
<Button effect="shine" variant="secondary" size="sm" className="gap-2 ml-2 border-dashed">
|
||||||
<UserPlus className="h-4 w-4" /> Portal Hesabı Aç
|
<UserPlus className="h-4 w-4" /> Portal Hesabı Aç
|
||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
@@ -135,9 +134,9 @@ export function ClientDetailClient({ client, activities }: { client: ClientDetai
|
|||||||
<Label htmlFor="invitation-url">Davet bağlantısı</Label>
|
<Label htmlFor="invitation-url">Davet bağlantısı</Label>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<Input id="invitation-url" value={invitationUrl} readOnly />
|
<Input id="invitation-url" value={invitationUrl} readOnly />
|
||||||
<Button
|
<Button effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
size="icon"
|
size="icon"
|
||||||
aria-label="Davet bağlantısını kopyala"
|
aria-label="Davet bağlantısını kopyala"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
@@ -153,8 +152,8 @@ export function ClientDetailClient({ client, activities }: { client: ClientDetai
|
|||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button type="button" variant="ghost" onClick={() => setCreateUserOpen(false)}>İptal</Button>
|
<Button effect="shine" type="button" variant="secondary" onClick={() => setCreateUserOpen(false)}>İptal</Button>
|
||||||
<Button type="submit" disabled={isCreatingUser || Boolean(invitationUrl)}>
|
<Button variant="default" effect="shine" type="submit" disabled={isCreatingUser || Boolean(invitationUrl)}>
|
||||||
{isCreatingUser && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
|
{isCreatingUser && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
|
||||||
Davet Oluştur
|
Davet Oluştur
|
||||||
</Button>
|
</Button>
|
||||||
@@ -226,7 +225,7 @@ export function ClientDetailClient({ client, activities }: { client: ClientDetai
|
|||||||
|
|
||||||
<Dialog open={openDialog} onOpenChange={setOpenDialog}>
|
<Dialog open={openDialog} onOpenChange={setOpenDialog}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button size="sm" className="gap-2">
|
<Button variant="default" effect="shine" size="sm" className="gap-2">
|
||||||
<Plus className="h-4 w-4" /> Aktivite Ekle
|
<Plus className="h-4 w-4" /> Aktivite Ekle
|
||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
@@ -262,7 +261,7 @@ export function ClientDetailClient({ client, activities }: { client: ClientDetai
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button type="submit" disabled={isAddingActivity}>
|
<Button variant="default" effect="shine" type="submit" disabled={isAddingActivity}>
|
||||||
{isAddingActivity ? "Ekleniyor..." : "Ekle"}
|
{isAddingActivity ? "Ekleniyor..." : "Ekle"}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
|
|||||||
@@ -167,9 +167,6 @@ export function ClientsClient({
|
|||||||
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
||||||
CRM & Müşteriler
|
CRM & Müşteriler
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
||||||
Potansiyel müşterilerini pipeline üzerinden takip et ve müşteri ilişkilerini yönet.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ClientDialog mode="create" />
|
<ClientDialog mode="create" />
|
||||||
@@ -331,7 +328,7 @@ function DraggableClientCard({
|
|||||||
{client.name}
|
{client.name}
|
||||||
</PendingLink>
|
</PendingLink>
|
||||||
<div onPointerDown={(e) => e.stopPropagation()}>
|
<div onPointerDown={(e) => e.stopPropagation()}>
|
||||||
<ClientDialog mode="edit" client={client} trigger={<Button variant="ghost" className="h-6 w-6 p-0"><Pencil className="h-3 w-3" /></Button>} />
|
<ClientDialog mode="edit" client={client} trigger={<Button size="icon-sm" effect="shine" variant="secondary" ><Pencil className="h-3 w-3" /></Button>} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{client.company_name && <p className="text-xs text-muted-foreground mb-2 pointer-events-none">{client.company_name}</p>}
|
{client.company_name && <p className="text-xs text-muted-foreground mb-2 pointer-events-none">{client.company_name}</p>}
|
||||||
@@ -412,11 +409,11 @@ function ClientRow({ client }: { client: ClientListItem }) {
|
|||||||
|
|
||||||
<div className="flex justify-end gap-2">
|
<div className="flex justify-end gap-2">
|
||||||
<PendingLink href={`/clients/${client.id}`} className="inline-flex" showSpinner>
|
<PendingLink href={`/clients/${client.id}`} className="inline-flex" showSpinner>
|
||||||
<Button variant="ghost" className="h-9 w-9 p-0">
|
<Button size="icon" effect="shine" variant="secondary" >
|
||||||
<ArrowRight className="h-4 w-4" />
|
<ArrowRight className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</PendingLink>
|
</PendingLink>
|
||||||
<ClientDialog mode="edit" client={client} trigger={<Button variant="outline" className="h-9 min-w-20 gap-2 px-3"><Pencil className="h-4 w-4" /> Düzenle</Button>} />
|
<ClientDialog mode="edit" client={client} trigger={<Button effect="shine" variant="secondary" className="min-w-20 gap-2 px-3"><Pencil className="h-4 w-4" /> Düzenle</Button>} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -457,9 +454,9 @@ function ClientDialog({
|
|||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
{trigger || (
|
{trigger || (
|
||||||
<Button
|
<Button effect="shine"
|
||||||
variant={mode === "create" ? "default" : "outline"}
|
variant={mode === "create" ? "default" : "secondary"}
|
||||||
className="h-9 min-w-24 gap-2 px-3"
|
className="min-w-24 gap-2 px-3"
|
||||||
>
|
>
|
||||||
{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" />}
|
||||||
{mode === "create" ? "Müşteri ekle" : "Düzenle"}
|
{mode === "create" ? "Müşteri ekle" : "Düzenle"}
|
||||||
@@ -483,7 +480,7 @@ function ClientDialog({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogFooter className="shrink-0 border-t border-border bg-background p-5">
|
<DialogFooter className="shrink-0 border-t border-border bg-background p-5">
|
||||||
<Button type="submit" disabled={isSubmitting} className="w-full gap-2 sm:w-auto">
|
<Button variant="default" effect="shine" 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"
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ export function ProjectDetailClient({
|
|||||||
<div className="mx-auto flex max-w-7xl flex-col gap-6">
|
<div className="mx-auto flex max-w-7xl flex-col gap-6">
|
||||||
<div className="flex flex-col gap-4 border-b border-border pb-5 lg:flex-row lg:items-end lg:justify-between">
|
<div className="flex flex-col gap-4 border-b border-border pb-5 lg:flex-row lg:items-end lg:justify-between">
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<Button asChild variant="ghost" className="h-8 gap-2 px-0 text-muted-foreground">
|
<Button size="sm" effect="shine" asChild variant="secondary" className="gap-2 px-0 text-muted-foreground">
|
||||||
<PendingLink href="/projects" className="flex items-center gap-2" showSpinner>
|
<PendingLink href="/projects" className="flex items-center gap-2" showSpinner>
|
||||||
<ArrowLeft className="h-4 w-4" />
|
<ArrowLeft className="h-4 w-4" />
|
||||||
Projelere dön
|
Projelere dön
|
||||||
@@ -213,9 +213,6 @@ export function ProjectDetailClient({
|
|||||||
{statusLabels[project.status]}
|
{statusLabels[project.status]}
|
||||||
</Badge>
|
</Badge>
|
||||||
</div>
|
</div>
|
||||||
<p className="mt-1 max-w-3xl text-sm text-muted-foreground">
|
|
||||||
{project.description || "Bu proje için kısa açıklama eklenmedi."}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -226,7 +223,7 @@ export function ProjectDetailClient({
|
|||||||
<form action={completeProjectRecord}>
|
<form action={completeProjectRecord}>
|
||||||
<input type="hidden" name="id" value={project.id} />
|
<input type="hidden" name="id" value={project.id} />
|
||||||
<PendingSubmitButton
|
<PendingSubmitButton
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
className="gap-2"
|
className="gap-2"
|
||||||
idleIcon={<CheckCircle2 className="h-4 w-4" />}
|
idleIcon={<CheckCircle2 className="h-4 w-4" />}
|
||||||
pendingChildren="Tamamlanıyor"
|
pendingChildren="Tamamlanıyor"
|
||||||
@@ -457,8 +454,8 @@ function PlanningSectionCard({ section }: { section: ProjectPlanningSectionItem
|
|||||||
<input type="hidden" name="id" value={section.id} />
|
<input type="hidden" name="id" value={section.id} />
|
||||||
<input type="hidden" name="project_id" value={section.project_id} />
|
<input type="hidden" name="project_id" value={section.project_id} />
|
||||||
<PendingSubmitButton
|
<PendingSubmitButton
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
className="h-9 px-3 text-rose-600"
|
className="px-3 text-rose-600"
|
||||||
idleIcon={<Trash2 className="h-4 w-4" />}
|
idleIcon={<Trash2 className="h-4 w-4" />}
|
||||||
aria-label="Sil"
|
aria-label="Sil"
|
||||||
/>
|
/>
|
||||||
@@ -505,9 +502,9 @@ function SectionDialog({
|
|||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button
|
<Button effect="shine"
|
||||||
variant={mode === "create" ? "default" : "outline"}
|
variant={mode === "create" ? "default" : "secondary"}
|
||||||
className="h-9 gap-2 px-3"
|
className="gap-2 px-3"
|
||||||
>
|
>
|
||||||
{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" />}
|
||||||
{mode === "create" ? "Alan ekle" : null}
|
{mode === "create" ? "Alan ekle" : null}
|
||||||
@@ -574,7 +571,7 @@ function SectionDialog({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button type="submit" disabled={isSubmitting} className="gap-2">
|
<Button variant="default" effect="shine" type="submit" disabled={isSubmitting} className="gap-2">
|
||||||
{isSubmitting ? "Kaydediliyor" : "Kaydet"}
|
{isSubmitting ? "Kaydediliyor" : "Kaydet"}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
@@ -652,19 +649,19 @@ function TaskPanel({
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-2 sm:flex-row">
|
<div className="flex flex-col gap-2 sm:flex-row">
|
||||||
<div className="flex rounded-sm border border-border p-1">
|
<div className="flex rounded-sm border border-border p-1">
|
||||||
<Button
|
<Button size="sm" effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant={view === "list" ? "default" : "ghost"}
|
variant={view === "list" ? "default" : "secondary"}
|
||||||
className="h-8 gap-2 px-3"
|
className="gap-2 px-3"
|
||||||
onClick={() => setView("list")}
|
onClick={() => setView("list")}
|
||||||
>
|
>
|
||||||
<LayoutList className="h-4 w-4" />
|
<LayoutList className="h-4 w-4" />
|
||||||
Liste
|
Liste
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button size="sm" effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant={view === "kanban" ? "default" : "ghost"}
|
variant={view === "kanban" ? "default" : "secondary"}
|
||||||
className="h-8 gap-2 px-3"
|
className="gap-2 px-3"
|
||||||
onClick={() => setView("kanban")}
|
onClick={() => setView("kanban")}
|
||||||
>
|
>
|
||||||
<KanbanSquare className="h-4 w-4" />
|
<KanbanSquare className="h-4 w-4" />
|
||||||
@@ -720,12 +717,12 @@ function TaskPanel({
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex justify-start lg:justify-end">
|
<div className="flex justify-start lg:justify-end">
|
||||||
{task.status !== "done" ? (
|
{task.status !== "done" ? (
|
||||||
<Button
|
<Button effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
disabled={pendingTaskIds.has(task.id)}
|
disabled={pendingTaskIds.has(task.id)}
|
||||||
aria-busy={pendingTaskIds.has(task.id)}
|
aria-busy={pendingTaskIds.has(task.id)}
|
||||||
className="h-9 gap-2 px-3"
|
className="gap-2 px-3"
|
||||||
onClick={() => handleTaskStatusChange(task.id, "done")}
|
onClick={() => handleTaskStatusChange(task.id, "done")}
|
||||||
>
|
>
|
||||||
{pendingTaskIds.has(task.id) ? (
|
{pendingTaskIds.has(task.id) ? (
|
||||||
@@ -830,11 +827,12 @@ function ProjectTaskKanban({
|
|||||||
<Badge className={priorityClasses[task.priority]}>{task.priority}</Badge>
|
<Badge className={priorityClasses[task.priority]}>{task.priority}</Badge>
|
||||||
{task.status !== "done" ? (
|
{task.status !== "done" ? (
|
||||||
<Button
|
<Button
|
||||||
|
size="icon-sm"
|
||||||
|
effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
disabled={pendingTaskIds.has(task.id)}
|
disabled={pendingTaskIds.has(task.id)}
|
||||||
aria-busy={pendingTaskIds.has(task.id)}
|
aria-busy={pendingTaskIds.has(task.id)}
|
||||||
className="h-8 w-8 p-0"
|
|
||||||
title="Tamamla"
|
title="Tamamla"
|
||||||
aria-label="Tamamla"
|
aria-label="Tamamla"
|
||||||
onClick={() => onTaskStatusChange(task.id, "done")}
|
onClick={() => onTaskStatusChange(task.id, "done")}
|
||||||
@@ -881,7 +879,7 @@ function ProjectSettingsDialog({ project }: { project: ProjectDetail }) {
|
|||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button variant="outline" className="h-9 gap-2 px-3">
|
<Button effect="shine" variant="secondary" className="gap-2 px-3">
|
||||||
<Settings2 className="h-4 w-4" />
|
<Settings2 className="h-4 w-4" />
|
||||||
<span className="hidden sm:inline">Ayarlar</span>
|
<span className="hidden sm:inline">Ayarlar</span>
|
||||||
</Button>
|
</Button>
|
||||||
@@ -942,7 +940,7 @@ function ProjectSettingsDialog({ project }: { project: ProjectDetail }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button type="submit" disabled={isSubmitting}>
|
<Button variant="default" effect="shine" type="submit" disabled={isSubmitting}>
|
||||||
{isSubmitting ? "Kaydediliyor..." : "Kaydet"}
|
{isSubmitting ? "Kaydediliyor..." : "Kaydet"}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
@@ -977,7 +975,7 @@ function ProjectTaskDialog({
|
|||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button className="h-9 gap-2 px-3">
|
<Button variant="default" effect="shine" className="gap-2 px-3">
|
||||||
<Plus className="h-4 w-4" />
|
<Plus className="h-4 w-4" />
|
||||||
Görev ekle
|
Görev ekle
|
||||||
</Button>
|
</Button>
|
||||||
@@ -1091,7 +1089,7 @@ function ProjectTaskDialog({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button type="submit" disabled={isSubmitting} className="gap-2">
|
<Button variant="default" effect="shine" type="submit" disabled={isSubmitting} className="gap-2">
|
||||||
<Plus className="h-4 w-4" />
|
<Plus className="h-4 w-4" />
|
||||||
{isSubmitting ? "Kaydediliyor" : "Görevi ekle"}
|
{isSubmitting ? "Kaydediliyor" : "Görevi ekle"}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -1217,10 +1215,10 @@ function TabButton({
|
|||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant={active ? "default" : "ghost"}
|
variant={active ? "default" : "secondary"}
|
||||||
className="h-9 px-4"
|
className="px-4"
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -119,9 +119,6 @@ export function ProjectsClient({ projects, clients }: ProjectsClientProps) {
|
|||||||
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
||||||
Projeler
|
Projeler
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
||||||
Müşteri işleri ve kişisel side projectleri aynı yerde takip et.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
@@ -154,19 +151,19 @@ export function ProjectsClient({ projects, clients }: ProjectsClientProps) {
|
|||||||
className="sm:w-80"
|
className="sm:w-80"
|
||||||
/>
|
/>
|
||||||
<div className="flex rounded-sm border border-border p-1">
|
<div className="flex rounded-sm border border-border p-1">
|
||||||
<Button
|
<Button size="sm" effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant={view === "grid" ? "default" : "ghost"}
|
variant={view === "grid" ? "default" : "secondary"}
|
||||||
className="h-8 gap-2 px-3"
|
className="gap-2 px-3"
|
||||||
onClick={() => setView("grid")}
|
onClick={() => setView("grid")}
|
||||||
>
|
>
|
||||||
<LayoutGrid className="h-4 w-4" />
|
<LayoutGrid className="h-4 w-4" />
|
||||||
Kart
|
Kart
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button size="sm" effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant={view === "list" ? "default" : "ghost"}
|
variant={view === "list" ? "default" : "secondary"}
|
||||||
className="h-8 gap-2 px-3"
|
className="gap-2 px-3"
|
||||||
onClick={() => setView("list")}
|
onClick={() => setView("list")}
|
||||||
>
|
>
|
||||||
<List className="h-4 w-4" />
|
<List className="h-4 w-4" />
|
||||||
@@ -367,9 +364,10 @@ function ProjectActions({
|
|||||||
>
|
>
|
||||||
{showDetail ? (
|
{showDetail ? (
|
||||||
<Button
|
<Button
|
||||||
|
size="icon"
|
||||||
|
effect="shine"
|
||||||
asChild
|
asChild
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
className="h-9 w-9 p-0"
|
|
||||||
title="Detaya git"
|
title="Detaya git"
|
||||||
aria-label="Detaya git"
|
aria-label="Detaya git"
|
||||||
>
|
>
|
||||||
@@ -383,8 +381,8 @@ function ProjectActions({
|
|||||||
<form action={completeProjectRecord}>
|
<form action={completeProjectRecord}>
|
||||||
<input type="hidden" name="id" value={project.id} />
|
<input type="hidden" name="id" value={project.id} />
|
||||||
<PendingSubmitButton
|
<PendingSubmitButton
|
||||||
variant="outline"
|
size="icon"
|
||||||
className="h-9 w-9 p-0"
|
variant="secondary"
|
||||||
title="Tamamla"
|
title="Tamamla"
|
||||||
aria-label="Tamamla"
|
aria-label="Tamamla"
|
||||||
idleIcon={<CheckCircle2 className="h-4 w-4" />}
|
idleIcon={<CheckCircle2 className="h-4 w-4" />}
|
||||||
@@ -433,9 +431,10 @@ function ProjectDialog({
|
|||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button
|
<Button effect="shine"
|
||||||
variant={mode === "create" ? "default" : "outline"}
|
variant={mode === "create" ? "default" : "secondary"}
|
||||||
className={iconOnly ? "h-9 w-9 p-0" : "h-9 min-w-24 gap-2 px-3"}
|
size={iconOnly ? "icon" : "default"}
|
||||||
|
className={iconOnly ? undefined : "min-w-24 gap-2 px-3"}
|
||||||
title={mode === "create" ? "Proje ekle" : "Düzenle"}
|
title={mode === "create" ? "Proje ekle" : "Düzenle"}
|
||||||
aria-label={mode === "create" ? "Proje ekle" : "Düzenle"}
|
aria-label={mode === "create" ? "Proje ekle" : "Düzenle"}
|
||||||
>
|
>
|
||||||
@@ -463,7 +462,7 @@ function ProjectDialog({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogFooter className="shrink-0 border-t border-border bg-background p-5">
|
<DialogFooter className="shrink-0 border-t border-border bg-background p-5">
|
||||||
<Button type="submit" disabled={isSubmitting} className="w-full gap-2 sm:w-auto">
|
<Button variant="default" effect="shine" 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"
|
||||||
@@ -787,7 +786,7 @@ function AIProjectRiskDialog({ projectId }: { projectId?: string }) {
|
|||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button variant="outline" className="gap-2 bg-indigo-50 text-indigo-700 border-indigo-200 hover:bg-indigo-100 hover:text-indigo-800">
|
<Button effect="shine" variant="secondary" className="gap-2">
|
||||||
<Brain className="h-4 w-4" />
|
<Brain className="h-4 w-4" />
|
||||||
AI Risk Analizi
|
AI Risk Analizi
|
||||||
</Button>
|
</Button>
|
||||||
@@ -806,7 +805,7 @@ function AIProjectRiskDialog({ projectId }: { projectId?: string }) {
|
|||||||
<div className="py-4">
|
<div className="py-4">
|
||||||
{!result && !loading && (
|
{!result && !loading && (
|
||||||
<div className="text-center py-10">
|
<div className="text-center py-10">
|
||||||
<Button onClick={handleAnalyze} className="gap-2 bg-indigo-600 hover:bg-indigo-700 text-white">
|
<Button variant="default" effect="shine" onClick={handleAnalyze} className="gap-2">
|
||||||
<Brain className="h-4 w-4" />
|
<Brain className="h-4 w-4" />
|
||||||
Raporu Oluştur
|
Raporu Oluştur
|
||||||
</Button>
|
</Button>
|
||||||
@@ -829,8 +828,8 @@ function AIProjectRiskDialog({ projectId }: { projectId?: string }) {
|
|||||||
|
|
||||||
{result && (
|
{result && (
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button variant="outline" onClick={() => setOpen(false)}>Kapat</Button>
|
<Button effect="shine" variant="secondary" onClick={() => setOpen(false)}>Kapat</Button>
|
||||||
<Button variant="default" onClick={handleAnalyze} className="gap-2">
|
<Button effect="shine" variant="default" onClick={handleAnalyze} className="gap-2">
|
||||||
<Brain className="h-4 w-4" />
|
<Brain className="h-4 w-4" />
|
||||||
Yeniden Oluştur
|
Yeniden Oluştur
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -261,9 +261,6 @@ export default function SettingsPage() {
|
|||||||
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
||||||
Ayarlar
|
Ayarlar
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
||||||
Workspace markanızı, profilinizi, görünümü ve sistem tercihlerinizi yönetin.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -273,18 +270,16 @@ export default function SettingsPage() {
|
|||||||
{tabs.map((tab) => {
|
{tabs.map((tab) => {
|
||||||
const Icon = tab.icon;
|
const Icon = tab.icon;
|
||||||
return (
|
return (
|
||||||
<button
|
<Button effect="shine"
|
||||||
key={tab.name}
|
key={tab.name}
|
||||||
|
type="button"
|
||||||
|
variant={activeTab === tab.name ? "default" : "secondary"}
|
||||||
onClick={() => setActiveTab(tab.name)}
|
onClick={() => setActiveTab(tab.name)}
|
||||||
className={`flex shrink-0 items-center gap-3 px-4 py-3 rounded-md text-sm font-medium transition-colors text-left ${
|
className="h-auto shrink-0 justify-start gap-3 px-4 py-3 text-left"
|
||||||
activeTab === tab.name
|
|
||||||
? "bg-primary/10 text-primary"
|
|
||||||
: "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
||||||
}`}
|
|
||||||
>
|
>
|
||||||
<Icon className="h-4 w-4" />
|
<Icon className="h-4 w-4" />
|
||||||
{tab.name}
|
{tab.name}
|
||||||
</button>
|
</Button>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
@@ -448,7 +443,7 @@ export default function SettingsPage() {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div className="flex items-center gap-3 border-t border-border pt-6">
|
<div className="flex items-center gap-3 border-t border-border pt-6">
|
||||||
<Button type="submit" loading={isSavingBranding} className="gap-2">
|
<Button variant="default" effect="shine" type="submit" loading={isSavingBranding} className="gap-2">
|
||||||
<Upload className="h-4 w-4" aria-hidden="true" />
|
<Upload className="h-4 w-4" aria-hidden="true" />
|
||||||
Genel ayarları kaydet
|
Genel ayarları kaydet
|
||||||
</Button>
|
</Button>
|
||||||
@@ -561,7 +556,7 @@ export default function SettingsPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-4 pt-4">
|
<div className="flex items-center gap-4 pt-4">
|
||||||
<Button type="submit" className="gap-2">
|
<Button variant="default" effect="shine" type="submit" className="gap-2">
|
||||||
<Save className="h-4 w-4" /> Profili Kaydet
|
<Save className="h-4 w-4" /> Profili Kaydet
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -584,7 +579,7 @@ export default function SettingsPage() {
|
|||||||
<Input id="password" name="password" type="password" minLength={8} placeholder="En az 8 karakter" required />
|
<Input id="password" name="password" type="password" minLength={8} placeholder="En az 8 karakter" required />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-4 pt-4">
|
<div className="flex items-center gap-4 pt-4">
|
||||||
<Button type="submit" className="gap-2">
|
<Button variant="default" effect="shine" type="submit" className="gap-2">
|
||||||
<Save className="h-4 w-4" /> Şifreyi Güncelle
|
<Save className="h-4 w-4" /> Şifreyi Güncelle
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -644,7 +639,7 @@ export default function SettingsPage() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="flex items-center gap-4 pt-4">
|
<div className="flex items-center gap-4 pt-4">
|
||||||
<Button onClick={handleSaveAI} className="gap-2">
|
<Button variant="default" effect="shine" onClick={handleSaveAI} className="gap-2">
|
||||||
<Save className="h-4 w-4" /> Ayarları Kaydet
|
<Save className="h-4 w-4" /> Ayarları Kaydet
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -725,9 +720,9 @@ function BrandingAssetField({
|
|||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
/>
|
/>
|
||||||
{hasCustomAsset ? (
|
{hasCustomAsset ? (
|
||||||
<Button
|
<Button effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant="ghost"
|
variant="secondary"
|
||||||
size="sm"
|
size="sm"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={() => onRemove(asset)}
|
onClick={() => onRemove(asset)}
|
||||||
|
|||||||
@@ -184,9 +184,6 @@ export function TasksClient({ tasks, clients, projects }: TasksClientProps) {
|
|||||||
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
||||||
Görevler
|
Görevler
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
||||||
Proje ve müşteri bağlantılı işleri liste veya basit kanban ile takip et.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TaskDialog mode="create" clients={clients} projects={projects} />
|
<TaskDialog mode="create" clients={clients} projects={projects} />
|
||||||
@@ -230,19 +227,19 @@ export function TasksClient({ tasks, clients, projects }: TasksClientProps) {
|
|||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<div className="flex rounded-sm border border-border p-1">
|
<div className="flex rounded-sm border border-border p-1">
|
||||||
<Button
|
<Button size="sm" effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant={view === "list" ? "default" : "ghost"}
|
variant={view === "list" ? "default" : "secondary"}
|
||||||
className="h-8 gap-2 px-3"
|
className="gap-2 px-3"
|
||||||
onClick={() => setView("list")}
|
onClick={() => setView("list")}
|
||||||
>
|
>
|
||||||
<LayoutList className="h-4 w-4" />
|
<LayoutList className="h-4 w-4" />
|
||||||
Liste
|
Liste
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button size="sm" effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant={view === "kanban" ? "default" : "ghost"}
|
variant={view === "kanban" ? "default" : "secondary"}
|
||||||
className="h-8 gap-2 px-3"
|
className="gap-2 px-3"
|
||||||
onClick={() => setView("kanban")}
|
onClick={() => setView("kanban")}
|
||||||
>
|
>
|
||||||
<KanbanSquare className="h-4 w-4" />
|
<KanbanSquare className="h-4 w-4" />
|
||||||
@@ -490,12 +487,12 @@ function TaskActions({
|
|||||||
<div className={compact ? "flex justify-end gap-1" : "flex justify-start gap-2 lg:justify-end"}>
|
<div className={compact ? "flex justify-end gap-1" : "flex justify-start gap-2 lg:justify-end"}>
|
||||||
<TaskDialog mode="edit" task={task} clients={clients} projects={projects} />
|
<TaskDialog mode="edit" task={task} clients={clients} projects={projects} />
|
||||||
{task.status !== "done" ? (
|
{task.status !== "done" ? (
|
||||||
<Button
|
<Button effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
disabled={isPending}
|
disabled={isPending}
|
||||||
aria-busy={isPending}
|
aria-busy={isPending}
|
||||||
className="h-9 min-w-24 gap-2 px-3"
|
className="min-w-24 gap-2 px-3"
|
||||||
onClick={() => onTaskStatusChange(task.id, "done")}
|
onClick={() => onTaskStatusChange(task.id, "done")}
|
||||||
>
|
>
|
||||||
{isPending ? (
|
{isPending ? (
|
||||||
@@ -506,12 +503,12 @@ function TaskActions({
|
|||||||
{!compact ? (isPending ? "Tamamlanıyor" : "Tamamla") : null}
|
{!compact ? (isPending ? "Tamamlanıyor" : "Tamamla") : null}
|
||||||
</Button>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
<Button
|
<Button effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
disabled={isPending}
|
disabled={isPending}
|
||||||
aria-busy={isPending}
|
aria-busy={isPending}
|
||||||
className="h-9 gap-2 px-3 text-rose-600"
|
className="gap-2 px-3 text-rose-600"
|
||||||
onClick={() => onTaskDelete(task.id)}
|
onClick={() => onTaskDelete(task.id)}
|
||||||
>
|
>
|
||||||
{isPending ? (
|
{isPending ? (
|
||||||
@@ -560,9 +557,9 @@ function TaskDialog({
|
|||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button
|
<Button effect="shine"
|
||||||
variant={mode === "create" ? "default" : "outline"}
|
variant={mode === "create" ? "default" : "secondary"}
|
||||||
className="h-9 min-w-24 gap-2 px-3"
|
className="min-w-24 gap-2 px-3"
|
||||||
>
|
>
|
||||||
{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" />}
|
||||||
{mode === "create" ? "Görev ekle" : "Düzenle"}
|
{mode === "create" ? "Görev ekle" : "Düzenle"}
|
||||||
@@ -583,7 +580,7 @@ function TaskDialog({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogFooter className="shrink-0 border-t border-border bg-background p-5">
|
<DialogFooter className="shrink-0 border-t border-border bg-background p-5">
|
||||||
<Button type="submit" disabled={isSubmitting} className="w-full gap-2 sm:w-auto">
|
<Button variant="default" effect="shine" 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