diff --git a/app/(dashboard)/analytics/analytics-client.tsx b/app/(dashboard)/analytics/analytics-client.tsx index a3f61fe..a814b69 100644 --- a/app/(dashboard)/analytics/analytics-client.tsx +++ b/app/(dashboard)/analytics/analytics-client.tsx @@ -58,8 +58,8 @@ export function AnalyticsClient({ data }: AnalyticsClientProps) { const projectIncomeData = Array.from(projectIncomeMap.values()); // Task completion stats - const completedTasks = filteredTasks.filter(t => t.status === "completed").length; - const activeTasks = filteredTasks.filter(t => t.status !== "completed" && t.status !== "cancelled").length; + const completedTasks = filteredTasks.filter(t => t.status === "done").length; + const activeTasks = filteredTasks.filter(t => t.status !== "done" && t.status !== "cancelled").length; const taskStatusData = [ { name: "Tamamlanan", value: completedTasks }, diff --git a/app/(dashboard)/calendar/calendar-client.tsx b/app/(dashboard)/calendar/calendar-client.tsx index df5a60b..6c4db1b 100644 --- a/app/(dashboard)/calendar/calendar-client.tsx +++ b/app/(dashboard)/calendar/calendar-client.tsx @@ -19,6 +19,7 @@ import { SelectItem, SelectTrigger, SelectValue, + toast, } from "poyraz-ui/molecules"; import { CalendarDays, Clock, Pencil, Plus, Trash2 } from "lucide-react"; import { useMemo, useState } from "react"; @@ -293,6 +294,13 @@ function CalendarEventDialog({ try { await action(formData); setOpen(false); + toast.success(mode === "create" ? "Etkinlik eklendi." : "Etkinlik güncellendi."); + } catch (error) { + toast.error( + error instanceof Error + ? error.message + : "Etkinlik kaydedilirken beklenmeyen bir hata oluştu.", + ); } finally { setIsSubmitting(false); } @@ -306,20 +314,21 @@ function CalendarEventDialog({ {mode === "create" ? "Etkinlik ekle" : "Düzenle"} - -
+ + {event ? : null} - + {mode === "create" ? "Yeni etkinlik" : "Etkinliği düzenle"} Takvim etkinliğini proje, görev veya müşteriyle ilişkilendir. -
+
- - diff --git a/app/(dashboard)/clients/clients-client.tsx b/app/(dashboard)/clients/clients-client.tsx index 4020563..c040ffe 100644 --- a/app/(dashboard)/clients/clients-client.tsx +++ b/app/(dashboard)/clients/clients-client.tsx @@ -25,6 +25,7 @@ import { TabsContent, TabsList, TabsTrigger, + toast, } from "poyraz-ui/molecules"; import { Archive, @@ -133,8 +134,14 @@ export function ClientsClient({ try { await updateClientPipelineStage(clientId, newStage as any); + toast.success("Müşteri aşaması güncellendi."); } catch (error) { setLocalClients(clients); + toast.error( + error instanceof Error + ? error.message + : "Müşteri aşaması güncellenemedi.", + ); } } @@ -440,6 +447,13 @@ function ClientDialog({ try { await action(formData); setOpen(false); + toast.success(mode === "create" ? "Müşteri eklendi." : "Müşteri güncellendi."); + } catch (error) { + toast.error( + error instanceof Error + ? error.message + : "Müşteri kaydedilirken beklenmeyen bir hata oluştu.", + ); } finally { setIsSubmitting(false); } @@ -458,10 +472,10 @@ function ClientDialog({ )} - - + + {client ? : null} - + {mode === "create" ? "Yeni müşteri" : "Müşteriyi düzenle"} @@ -470,10 +484,12 @@ function ClientDialog({ - +
+ +
- - - - + + {transaction ? : null} - + {mode === "create" ? "Yeni finans işlemi" : "Finans işlemini düzenle"} Gelir veya gider kaydını müşteri/proje bağlantısıyla kaydet. -
+
- - diff --git a/app/(dashboard)/journal/journal-client.tsx b/app/(dashboard)/journal/journal-client.tsx index 7c07fb4..6ffdfef 100644 --- a/app/(dashboard)/journal/journal-client.tsx +++ b/app/(dashboard)/journal/journal-client.tsx @@ -14,6 +14,7 @@ import { DialogHeader, DialogTitle, DialogTrigger, + toast, } from "poyraz-ui/molecules"; import { Activity, @@ -259,6 +260,13 @@ function DailyLogDialog({ mode, log }: { mode: "create" | "edit"; log?: DailyLog try { await action(formData); setOpen(false); + toast.success(mode === "create" ? "Günlük eklendi." : "Günlük güncellendi."); + } catch (error) { + toast.error( + error instanceof Error + ? error.message + : "Günlük kaydedilirken beklenmeyen bir hata oluştu.", + ); } finally { setIsSubmitting(false); } @@ -272,22 +280,22 @@ function DailyLogDialog({ mode, log }: { mode: "create" | "edit"; log?: DailyLog {mode === "create" ? "Günlük ekle" : "Düzenle"} - - + + {log ? : null} - + {mode === "create" ? "Yeni günlük kayıt" : "Günlük kaydı düzenle"} Günün mood, enerji ve çalışma memnuniyeti skorlarını kaydet. -
+
- - diff --git a/app/(dashboard)/projects/projects-client.tsx b/app/(dashboard)/projects/projects-client.tsx index 758097b..ed8d457 100644 --- a/app/(dashboard)/projects/projects-client.tsx +++ b/app/(dashboard)/projects/projects-client.tsx @@ -448,17 +448,17 @@ function ProjectDialog({ {iconOnly ? null : mode === "create" ? "Proje ekle" : "Düzenle"} - - + + {project ? : null} - + {mode === "create" ? "Yeni proje" : "Projeyi düzenle"} Müşteri projelerini ve kişisel side projectleri aynı modelde takip et. -
+
- -