refactor(ui): simplify dashboard headers and actions
This commit is contained in:
@@ -48,9 +48,6 @@ export function AnalyticsClient({ data }: AnalyticsClientProps) {
|
|||||||
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
||||||
Performans ve Finans Analizi
|
Performans ve Finans Analizi
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
||||||
Müşteri bazlı gelirler, görev tamamlama oranları ve proje ilerleme grafikleri.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
|
|||||||
@@ -91,9 +91,6 @@ export function CalendarClient({ events, clients, projects, tasks }: CalendarCli
|
|||||||
<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>
|
<div>
|
||||||
<h1 className="text-3xl font-semibold tracking-normal text-foreground">Takvim</h1>
|
<h1 className="text-3xl font-semibold tracking-normal text-foreground">Takvim</h1>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
||||||
Toplantı, odak bloğu, deadline, kişisel ve finans etkinliklerini yönet.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CalendarEventDialog
|
<CalendarEventDialog
|
||||||
@@ -116,13 +113,13 @@ export function CalendarClient({ events, clients, projects, tasks }: CalendarCli
|
|||||||
<p className="text-sm text-muted-foreground">{events.length} etkinlik</p>
|
<p className="text-sm text-muted-foreground">{events.length} etkinlik</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<Button type="button" variant="outline" onClick={() => shiftMonth(-1)}>
|
<Button effect="shine" type="button" variant="secondary" onClick={() => shiftMonth(-1)}>
|
||||||
Önceki
|
Önceki
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="button" variant="outline" onClick={() => setMonthDate(new Date())}>
|
<Button effect="shine" type="button" variant="secondary" onClick={() => setMonthDate(new Date())}>
|
||||||
Bugün
|
Bugün
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="button" variant="outline" onClick={() => shiftMonth(1)}>
|
<Button effect="shine" type="button" variant="secondary" onClick={() => shiftMonth(1)}>
|
||||||
Sonraki
|
Sonraki
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -143,13 +140,15 @@ export function CalendarClient({ events, clients, projects, tasks }: CalendarCli
|
|||||||
const isSelected = selectedDate === day.key;
|
const isSelected = selectedDate === day.key;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<Button effect="shine"
|
||||||
key={day.key}
|
key={day.key}
|
||||||
type="button"
|
type="button"
|
||||||
|
variant={isSelected ? "default" : "secondary"}
|
||||||
onClick={() => setSelectedDate(day.key)}
|
onClick={() => setSelectedDate(day.key)}
|
||||||
className={`min-h-28 border-b border-r border-border p-2 text-left transition-colors last:border-r-0 hover:bg-muted/40 ${
|
radius="none"
|
||||||
!day.inMonth ? "bg-muted/20 text-muted-foreground" : "bg-background"
|
className={`min-h-28 w-full justify-start whitespace-normal border-b border-r p-2 text-left last:border-r-0 ${
|
||||||
} ${isSelected ? "ring-2 ring-inset ring-primary" : ""}`}
|
!day.inMonth ? "opacity-60" : ""
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
<div className="mb-2 flex items-center justify-between">
|
<div className="mb-2 flex items-center justify-between">
|
||||||
<span className="text-sm font-medium">{day.date.getDate()}</span>
|
<span className="text-sm font-medium">{day.date.getDate()}</span>
|
||||||
@@ -167,7 +166,7 @@ export function CalendarClient({ events, clients, projects, tasks }: CalendarCli
|
|||||||
<div className="text-xs text-muted-foreground">+{dayEvents.length - 3}</div>
|
<div className="text-xs text-muted-foreground">+{dayEvents.length - 3}</div>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</Button>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
@@ -251,7 +250,7 @@ function EventList({
|
|||||||
<CalendarEventDialog mode="edit" event={event} clients={clients} projects={projects} tasks={tasks} />
|
<CalendarEventDialog mode="edit" event={event} clients={clients} projects={projects} tasks={tasks} />
|
||||||
<form action={deleteCalendarEventRecord}>
|
<form action={deleteCalendarEventRecord}>
|
||||||
<input type="hidden" name="id" value={event.id} />
|
<input type="hidden" name="id" value={event.id} />
|
||||||
<Button type="submit" variant="outline" className="h-9 gap-2 text-rose-600">
|
<Button effect="shine" type="submit" variant="secondary" className="gap-2 text-rose-600">
|
||||||
<Trash2 className="h-4 w-4" />
|
<Trash2 className="h-4 w-4" />
|
||||||
Sil
|
Sil
|
||||||
</Button>
|
</Button>
|
||||||
@@ -303,7 +302,7 @@ function CalendarEventDialog({
|
|||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button className="h-9 gap-2" variant={mode === "create" ? "default" : "outline"}>
|
<Button effect="shine" className="gap-2" variant={mode === "create" ? "default" : "secondary"}>
|
||||||
{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" ? "Etkinlik ekle" : "Düzenle"}
|
{mode === "create" ? "Etkinlik ekle" : "Düzenle"}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -321,7 +320,7 @@ function CalendarEventDialog({
|
|||||||
</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 ? "Kaydediliyor" : mode === "create" ? "Etkinliği ekle" : "Değişiklikleri kaydet"}
|
{isSubmitting ? "Kaydediliyor" : mode === "create" ? "Etkinliği ekle" : "Değişiklikleri kaydet"}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -69,9 +69,6 @@ export function DashboardClient({ data }: DashboardClientProps) {
|
|||||||
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
||||||
Dashboard
|
Dashboard
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
||||||
İş performansını, gelirlerini ve günlük durumunu takip et.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
|
|||||||
@@ -148,9 +148,6 @@ export function FinanceClient({ transactions, clients, projects }: FinanceClient
|
|||||||
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
||||||
Finans işlemleri
|
Finans işlemleri
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
||||||
Gelir, gider, ödeme durumu ve proje/müşteri bağlantılarını takip et.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<AIFinanceDialog />
|
<AIFinanceDialog />
|
||||||
@@ -170,20 +167,20 @@ export function FinanceClient({ transactions, clients, projects }: FinanceClient
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex shrink-0 gap-2">
|
<div className="flex shrink-0 gap-2">
|
||||||
<Button
|
<Button
|
||||||
|
effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
size="icon"
|
size="icon"
|
||||||
className="h-9 w-9"
|
|
||||||
aria-label="Önceki finans özet kartları"
|
aria-label="Önceki finans özet kartları"
|
||||||
onClick={() => scrollSummary(-1)}
|
onClick={() => scrollSummary(-1)}
|
||||||
>
|
>
|
||||||
<ChevronLeft className="h-4 w-4" />
|
<ChevronLeft className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
effect="shine"
|
||||||
type="button"
|
type="button"
|
||||||
variant="outline"
|
variant="secondary"
|
||||||
size="icon"
|
size="icon"
|
||||||
className="h-9 w-9"
|
|
||||||
aria-label="Sonraki finans özet kartları"
|
aria-label="Sonraki finans özet kartları"
|
||||||
onClick={() => scrollSummary(1)}
|
onClick={() => scrollSummary(1)}
|
||||||
>
|
>
|
||||||
@@ -207,7 +204,7 @@ export function FinanceClient({ transactions, clients, projects }: FinanceClient
|
|||||||
scrollSummary(1);
|
scrollSummary(1);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
className="tiny-scrollbar flex snap-x snap-mandatory gap-3 overflow-x-auto scroll-smooth pb-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
className="flex snap-x snap-mandatory gap-3 overflow-x-auto scroll-smooth pb-3 [scrollbar-width:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 [&::-webkit-scrollbar]:hidden"
|
||||||
>
|
>
|
||||||
{summaryCards.map((card) => (
|
{summaryCards.map((card) => (
|
||||||
<StatCard
|
<StatCard
|
||||||
@@ -350,7 +347,7 @@ function TransactionRow({
|
|||||||
<FinanceDialog mode="edit" transaction={transaction} clients={clients} projects={projects} />
|
<FinanceDialog mode="edit" transaction={transaction} clients={clients} projects={projects} />
|
||||||
<form action={deleteFinanceTransactionRecord}>
|
<form action={deleteFinanceTransactionRecord}>
|
||||||
<input type="hidden" name="id" value={transaction.id} />
|
<input type="hidden" name="id" value={transaction.id} />
|
||||||
<Button type="submit" variant="outline" className="h-9 gap-2 text-rose-600">
|
<Button effect="shine" type="submit" variant="secondary" className="gap-2 text-rose-600">
|
||||||
<Trash2 className="h-4 w-4" />
|
<Trash2 className="h-4 w-4" />
|
||||||
Sil
|
Sil
|
||||||
</Button>
|
</Button>
|
||||||
@@ -395,7 +392,7 @@ function FinanceDialog({
|
|||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button variant={mode === "create" ? "default" : "outline"} className="h-9 gap-2">
|
<Button effect="shine" variant={mode === "create" ? "default" : "secondary"} className="gap-2">
|
||||||
{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" ? "İşlem ekle" : "Düzenle"}
|
{mode === "create" ? "İşlem ekle" : "Düzenle"}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -411,7 +408,7 @@ function FinanceDialog({
|
|||||||
<FinanceFormFields transaction={transaction} clients={clients} projects={projects} />
|
<FinanceFormFields transaction={transaction} clients={clients} projects={projects} />
|
||||||
</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 ? "Kaydediliyor" : mode === "create" ? "İşlemi ekle" : "Değişiklikleri kaydet"}
|
{isSubmitting ? "Kaydediliyor" : mode === "create" ? "İşlemi ekle" : "Değişiklikleri kaydet"}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -657,7 +654,7 @@ function AIFinanceDialog() {
|
|||||||
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 Analizi
|
AI Analizi
|
||||||
</Button>
|
</Button>
|
||||||
@@ -676,7 +673,7 @@ function AIFinanceDialog() {
|
|||||||
<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>
|
||||||
@@ -699,8 +696,8 @@ function AIFinanceDialog() {
|
|||||||
|
|
||||||
{result && (
|
{result && (
|
||||||
<DialogFooter className="gap-2 sm:gap-0">
|
<DialogFooter className="gap-2 sm:gap-0">
|
||||||
<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>
|
||||||
|
|||||||
@@ -81,9 +81,6 @@ export function JournalClient({ logs }: JournalClientProps) {
|
|||||||
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
<h1 className="text-3xl font-semibold tracking-normal text-foreground">
|
||||||
Mood ve enerji
|
Mood ve enerji
|
||||||
</h1>
|
</h1>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
||||||
Günlük ruh hali, enerji ve çalışma memnuniyetini takip ederek kişisel kapasite trendini gör.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-col gap-2 sm:flex-row">
|
<div className="flex flex-col gap-2 sm:flex-row">
|
||||||
@@ -233,7 +230,7 @@ function DailyLogRow({ log }: { log: DailyLogItem }) {
|
|||||||
<DailyLogDialog mode="edit" log={log} />
|
<DailyLogDialog mode="edit" log={log} />
|
||||||
<form action={deleteDailyLogRecord}>
|
<form action={deleteDailyLogRecord}>
|
||||||
<input type="hidden" name="id" value={log.id} />
|
<input type="hidden" name="id" value={log.id} />
|
||||||
<Button type="submit" variant="outline" className="h-9 gap-2 text-rose-600">
|
<Button effect="shine" type="submit" variant="secondary" className="gap-2 text-rose-600">
|
||||||
<Trash2 className="h-4 w-4" />
|
<Trash2 className="h-4 w-4" />
|
||||||
Sil
|
Sil
|
||||||
</Button>
|
</Button>
|
||||||
@@ -269,7 +266,7 @@ function DailyLogDialog({ mode, log }: { mode: "create" | "edit"; log?: DailyLog
|
|||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={setOpen}>
|
<Dialog open={open} onOpenChange={setOpen}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button variant={mode === "create" ? "default" : "outline"} className="h-9 gap-2">
|
<Button effect="shine" variant={mode === "create" ? "default" : "secondary"} className="gap-2">
|
||||||
{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ünlük ekle" : "Düzenle"}
|
{mode === "create" ? "Günlük ekle" : "Düzenle"}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -289,7 +286,7 @@ function DailyLogDialog({ mode, log }: { mode: "create" | "edit"; log?: DailyLog
|
|||||||
</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">
|
||||||
{isSubmitting ? "Kaydediliyor" : mode === "create" ? "Kaydı ekle" : "Değişiklikleri kaydet"}
|
{isSubmitting ? "Kaydediliyor" : mode === "create" ? "Kaydı ekle" : "Değişiklikleri kaydet"}
|
||||||
</Button>
|
</Button>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
@@ -320,21 +317,18 @@ function DailyLogFormFields({ log }: { log?: DailyLogItem }) {
|
|||||||
label="Mood skoru"
|
label="Mood skoru"
|
||||||
value={moodScore}
|
value={moodScore}
|
||||||
onChange={setMoodScore}
|
onChange={setMoodScore}
|
||||||
tone="primary"
|
|
||||||
/>
|
/>
|
||||||
<ScorePicker
|
<ScorePicker
|
||||||
name="energy_score"
|
name="energy_score"
|
||||||
label="Enerji skoru"
|
label="Enerji skoru"
|
||||||
value={energyScore}
|
value={energyScore}
|
||||||
onChange={setEnergyScore}
|
onChange={setEnergyScore}
|
||||||
tone="green"
|
|
||||||
/>
|
/>
|
||||||
<ScorePicker
|
<ScorePicker
|
||||||
name="work_satisfaction_score"
|
name="work_satisfaction_score"
|
||||||
label="Çalışma memnuniyeti"
|
label="Çalışma memnuniyeti"
|
||||||
value={satisfactionScore}
|
value={satisfactionScore}
|
||||||
onChange={setSatisfactionScore}
|
onChange={setSatisfactionScore}
|
||||||
tone="blue"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="grid gap-2">
|
<div className="grid gap-2">
|
||||||
@@ -355,13 +349,11 @@ function ScorePicker({
|
|||||||
label,
|
label,
|
||||||
value,
|
value,
|
||||||
onChange,
|
onChange,
|
||||||
tone,
|
|
||||||
}: {
|
}: {
|
||||||
name: string;
|
name: string;
|
||||||
label: string;
|
label: string;
|
||||||
value: number;
|
value: number;
|
||||||
onChange: (value: number) => void;
|
onChange: (value: number) => void;
|
||||||
tone: "primary" | "green" | "blue";
|
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className="grid gap-2">
|
<div className="grid gap-2">
|
||||||
@@ -372,18 +364,15 @@ function ScorePicker({
|
|||||||
<input type="hidden" name={name} value={value} />
|
<input type="hidden" name={name} value={value} />
|
||||||
<div className="grid grid-cols-5 gap-2">
|
<div className="grid grid-cols-5 gap-2">
|
||||||
{[1, 2, 3, 4, 5].map((score) => (
|
{[1, 2, 3, 4, 5].map((score) => (
|
||||||
<button
|
<Button
|
||||||
|
effect="shine"
|
||||||
key={score}
|
key={score}
|
||||||
type="button"
|
type="button"
|
||||||
|
variant={value === score ? "default" : "secondary"}
|
||||||
onClick={() => onChange(score)}
|
onClick={() => onChange(score)}
|
||||||
className={`h-10 rounded-sm border text-sm font-semibold transition-colors ${
|
|
||||||
value === score
|
|
||||||
? getScoreActiveClass(tone)
|
|
||||||
: "border-border bg-background text-muted-foreground hover:border-primary/40"
|
|
||||||
}`}
|
|
||||||
>
|
>
|
||||||
{score}
|
{score}
|
||||||
</button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -446,12 +435,6 @@ function average(values: number[]) {
|
|||||||
return values.reduce((sum, value) => sum + value, 0) / values.length;
|
return values.reduce((sum, value) => sum + value, 0) / values.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getScoreActiveClass(tone: "primary" | "green" | "blue") {
|
|
||||||
if (tone === "green") return "border-emerald-600 bg-emerald-600 text-white";
|
|
||||||
if (tone === "blue") return "border-blue-600 bg-blue-600 text-white";
|
|
||||||
return "border-primary bg-primary text-primary-foreground";
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatDate(value: string) {
|
function formatDate(value: string) {
|
||||||
return new Intl.DateTimeFormat("tr-TR", {
|
return new Intl.DateTimeFormat("tr-TR", {
|
||||||
day: "2-digit",
|
day: "2-digit",
|
||||||
|
|||||||
Reference in New Issue
Block a user