diff --git a/app/(dashboard)/clients/[id]/client-detail-client.tsx b/app/(dashboard)/clients/[id]/client-detail-client.tsx index 08b1669..32cd893 100644 --- a/app/(dashboard)/clients/[id]/client-detail-client.tsx +++ b/app/(dashboard)/clients/[id]/client-detail-client.tsx @@ -96,7 +96,7 @@ export function ClientDetailClient({ client, activities }: { client: ClientDetai } return ( -
+
{/* Header Info */}
diff --git a/app/(dashboard)/clients/clients-client.tsx b/app/(dashboard)/clients/clients-client.tsx index 816c693..c441b76 100644 --- a/app/(dashboard)/clients/clients-client.tsx +++ b/app/(dashboard)/clients/clients-client.tsx @@ -250,8 +250,8 @@ export function ClientsClient({ {filteredClients.length > 0 ? ( -
-
+
+
Müşteri İletişim Aşama diff --git a/app/(dashboard)/projects/[id]/project-detail-client.tsx b/app/(dashboard)/projects/[id]/project-detail-client.tsx index f006a76..de70d60 100644 --- a/app/(dashboard)/projects/[id]/project-detail-client.tsx +++ b/app/(dashboard)/projects/[id]/project-detail-client.tsx @@ -297,14 +297,14 @@ export function ProjectDetailClient({ setActiveTab("finance")}> Finans - {revisions.length > 0 && ( - setActiveTab("revisions")}> - Revizyonlar + setActiveTab("revisions")}> + Revizyonlar + {revisions.filter(r => r.status === 'pending').length > 0 && ( {revisions.filter(r => r.status === 'pending').length} - - )} + )} +
{activeTab === "planning" ? ( diff --git a/app/(dashboard)/projects/projects-client.tsx b/app/(dashboard)/projects/projects-client.tsx index 0c11192..52ee628 100644 --- a/app/(dashboard)/projects/projects-client.tsx +++ b/app/(dashboard)/projects/projects-client.tsx @@ -659,14 +659,24 @@ function ProjectFormFields({
- +
+ { + const el = document.getElementById(`progress-val-${project?.id || "new"}`); + if (el) el.textContent = `%${e.target.value}`; + }} + /> + + %{project?.progress ?? 0} + +
diff --git a/app/portal/projects/[id]/portal-project-client.tsx b/app/portal/projects/[id]/portal-project-client.tsx index ac9b71e..22e97d5 100644 --- a/app/portal/projects/[id]/portal-project-client.tsx +++ b/app/portal/projects/[id]/portal-project-client.tsx @@ -9,6 +9,8 @@ import { CheckCircle2, Clock, MessageSquare, Loader2, RefreshCw } from "lucide-r import toast from "react-hot-toast"; import { createRevisionRequest } from "./actions"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "poyraz-ui/molecules"; + export function PortalProjectClient({ project, sections, tasks, revisions, clientId }: any) { const [isSubmitting, setIsSubmitting] = useState(false); const [openRevision, setOpenRevision] = useState(false); @@ -32,7 +34,7 @@ export function PortalProjectClient({ project, sections, tasks, revisions, clien const pendingRevisions = revisions.filter((r: any) => r.status === 'pending' || r.status === 'in_progress').length; return ( -
+
{/* Header Info */}
@@ -84,22 +86,91 @@ export function PortalProjectClient({ project, sections, tasks, revisions, clien
-
-
- {/* Project Planning / Milestones */} + + + + Genel Bakış + + + Plan & Aşamalar + + + Revizyonlar + {pendingRevisions > 0 && ( + {pendingRevisions} + )} + + + + +
+ + +

İlerleme Durumu

+
+
+ %{project.progress} +
+
+
+
+

Projenizin anlık tamamlanma oranı.

+
+ + + + + +

+ Yapılan İşler +

+ {tasks.length === 0 ? ( +

Listelenecek görev bulunmuyor.

+ ) : ( +
    + {tasks.map((task: any) => ( +
  • + {task.status === 'completed' || task.status === 'done' ? ( + + ) : ( +
    + )} +
    + + {task.title} + + {task.date && ( +
    + {format(new Date(task.date), 'd MMM yyyy', { locale: tr })} +
    + )} +
    +
  • + ))} +
+ )} +
+
+
+ + + - +

Proje Planı & Aşamalar

{sections.length === 0 ? (

Henüz bir plan yüklenmemiş.

) : ( -
+
{sections.map((section: any) => ( -
+

{section.title}

- {section.type === 'milestone' ? 'Milestone' : section.type === 'deliverable' ? 'Teslimat' : 'Not'} + {section.type === 'milestone' ? 'Aşama' : section.type === 'deliverable' ? 'Teslimat' : 'Not'}

{section.content}

@@ -109,91 +180,49 @@ export function PortalProjectClient({ project, sections, tasks, revisions, clien )} + - {/* Revisions */} - {revisions.length > 0 && ( - - -

Revizyon Talepleriniz

+ + + +
+

Revizyon Talepleriniz

+
Kalan Hak: {project.revision_quota !== null ? project.revision_quota : 'Sınırsız'}
+
+ + {revisions.length === 0 ? ( +
+ +

Henüz bir revizyon talebi oluşturmadınız.

+ +
+ ) : (
{revisions.map((rev: any) => ( -
-
+
+
- + {format(new Date(rev.created_at), "d MMM yyyy, HH:mm", { locale: tr })}
+ } className="capitalize"> {rev.status === 'pending' ? 'Bekliyor' : rev.status === 'in_progress' ? 'İşleniyor' : rev.status === 'completed' ? 'Tamamlandı' : 'Reddedildi'}
-

{rev.description}

+

{rev.description}

))}
- - - )} -
- - {/* Right Sidebar */} -
- - -

İlerleme Durumu

-
-
- %{project.progress} -
-
-
-
-
- - - - - -

- Tamamlanan İşler -

- {tasks.length === 0 ? ( -

Listelenecek açık görev bulunmuyor.

- ) : ( -
    - {tasks.map((task: any) => ( -
  • - {task.status === 'completed' ? ( - - ) : ( -
    - )} -
    - - {task.title} - - {task.date && ( -
    - {format(new Date(task.date), 'd MMM yyyy', { locale: tr })} -
    - )} -
    -
  • - ))} -
)}
-
-
+ +
); } diff --git a/components/layout/portal-shell.tsx b/components/layout/portal-shell.tsx index 2da89d4..49990af 100644 --- a/components/layout/portal-shell.tsx +++ b/components/layout/portal-shell.tsx @@ -1,7 +1,7 @@ "use client"; import { signOut } from "@/app/login/actions"; -import { Button } from "poyraz-ui/atoms"; +import { Button, Card, CardContent } from "poyraz-ui/atoms"; import { DropdownMenu, DropdownMenuContent, @@ -120,39 +120,7 @@ function AppSidebar({ variant="bordered" className="flex h-dvh max-h-dvh flex-col overflow-hidden rounded-none border-0" > - -
-
-
- -
-
- Genel Durum - Proje İlerlemesi -
-
- -
-
- %{progress} Tamamlandı -
-
-
-
-
-
-
- -
-
- - - - - + {portalSidebarData.map((group, groupIndex) => (
@@ -194,7 +162,27 @@ function AppSidebar({ - + + + +
Proje İlerlemesi
+
+
+ %{progress} Tamamlandı +
+
+
+
+
+
+
+
+ + +