refactor(ui): align business and portal actions
This commit is contained in:
@@ -54,9 +54,8 @@ export function InvoicesClient({ invoices }: { invoices: InvoiceRow[] }) {
|
|||||||
<div className="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
|
<div className="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-3xl font-bold tracking-tight text-foreground">Faturalar</h1>
|
<h1 className="text-3xl font-bold tracking-tight text-foreground">Faturalar</h1>
|
||||||
<p className="text-muted-foreground mt-1">Müşteri faturalarınızı ve ödemeleri takip edin.</p>
|
|
||||||
</div>
|
</div>
|
||||||
<Button onClick={() => setIsAddModalOpen(true)} className="gap-2">
|
<Button variant="default" effect="shine" onClick={() => setIsAddModalOpen(true)} className="gap-2">
|
||||||
<Plus className="h-4 w-4" /> Yeni Fatura
|
<Plus className="h-4 w-4" /> Yeni Fatura
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -107,7 +106,7 @@ export function InvoicesClient({ invoices }: { invoices: InvoiceRow[] }) {
|
|||||||
<td className="p-4 align-middle text-right">
|
<td className="p-4 align-middle text-right">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button variant="ghost" className="h-8 w-8 p-0">
|
<Button size="icon-sm" effect="shine" variant="secondary" >
|
||||||
<span className="sr-only">Menüyü aç</span>
|
<span className="sr-only">Menüyü aç</span>
|
||||||
<MoreHorizontal className="h-4 w-4" />
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -148,7 +147,7 @@ export function InvoicesClient({ invoices }: { invoices: InvoiceRow[] }) {
|
|||||||
<h3 className="text-lg font-bold mb-4 text-foreground">Yeni Fatura Ekle</h3>
|
<h3 className="text-lg font-bold mb-4 text-foreground">Yeni Fatura Ekle</h3>
|
||||||
<p className="text-sm text-muted-foreground mb-6">Bu özellik şu an geliştirme aşamasındadır.</p>
|
<p className="text-sm text-muted-foreground mb-6">Bu özellik şu an geliştirme aşamasındadır.</p>
|
||||||
<div className="flex justify-end">
|
<div className="flex justify-end">
|
||||||
<Button variant="outline" onClick={() => setIsAddModalOpen(false)}>Kapat</Button>
|
<Button effect="shine" variant="secondary" onClick={() => setIsAddModalOpen(false)}>Kapat</Button>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -52,9 +52,8 @@ export function ProposalsClient({ proposals }: { proposals: ProposalRow[] }) {
|
|||||||
<div className="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
|
<div className="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-3xl font-bold tracking-tight text-foreground">Teklifler</h1>
|
<h1 className="text-3xl font-bold tracking-tight text-foreground">Teklifler</h1>
|
||||||
<p className="text-muted-foreground mt-1">Müşterilerinize sunduğunuz teklifleri yönetin.</p>
|
|
||||||
</div>
|
</div>
|
||||||
<Button onClick={() => setIsAddModalOpen(true)} className="gap-2">
|
<Button variant="default" effect="shine" onClick={() => setIsAddModalOpen(true)} className="gap-2">
|
||||||
<Plus className="h-4 w-4" /> Yeni Teklif
|
<Plus className="h-4 w-4" /> Yeni Teklif
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -106,7 +105,7 @@ export function ProposalsClient({ proposals }: { proposals: ProposalRow[] }) {
|
|||||||
<td className="p-4 align-middle text-right">
|
<td className="p-4 align-middle text-right">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button variant="ghost" className="h-8 w-8 p-0">
|
<Button size="icon-sm" effect="shine" variant="secondary" >
|
||||||
<span className="sr-only">Menüyü aç</span>
|
<span className="sr-only">Menüyü aç</span>
|
||||||
<MoreHorizontal className="h-4 w-4" />
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -148,7 +147,7 @@ export function ProposalsClient({ proposals }: { proposals: ProposalRow[] }) {
|
|||||||
<h3 className="text-lg font-bold mb-4 text-foreground">Yeni Teklif Ekle</h3>
|
<h3 className="text-lg font-bold mb-4 text-foreground">Yeni Teklif Ekle</h3>
|
||||||
<p className="text-sm text-muted-foreground mb-6">Bu özellik şu an geliştirme aşamasındadır.</p>
|
<p className="text-sm text-muted-foreground mb-6">Bu özellik şu an geliştirme aşamasındadır.</p>
|
||||||
<div className="flex justify-end">
|
<div className="flex justify-end">
|
||||||
<Button variant="outline" onClick={() => setIsAddModalOpen(false)}>Kapat</Button>
|
<Button effect="shine" variant="secondary" onClick={() => setIsAddModalOpen(false)}>Kapat</Button>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -58,9 +58,8 @@ export function SubscriptionsClient({ subscriptions }: { subscriptions: Subscrip
|
|||||||
<div className="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
|
<div className="flex flex-col gap-4 md:flex-row md:items-center md:justify-between">
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-3xl font-bold tracking-tight text-foreground">Abonelikler ve Masraflar</h1>
|
<h1 className="text-3xl font-bold tracking-tight text-foreground">Abonelikler ve Masraflar</h1>
|
||||||
<p className="text-muted-foreground mt-1">Sabit giderlerinizi ve tekrarlayan ödemelerinizi yönetin.</p>
|
|
||||||
</div>
|
</div>
|
||||||
<Button onClick={() => setIsAddModalOpen(true)} className="gap-2">
|
<Button variant="default" effect="shine" onClick={() => setIsAddModalOpen(true)} className="gap-2">
|
||||||
<Plus className="h-4 w-4" /> Yeni Abonelik
|
<Plus className="h-4 w-4" /> Yeni Abonelik
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,7 +130,7 @@ export function SubscriptionsClient({ subscriptions }: { subscriptions: Subscrip
|
|||||||
<td className="p-4 align-middle text-right">
|
<td className="p-4 align-middle text-right">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button variant="ghost" className="h-8 w-8 p-0">
|
<Button size="icon-sm" effect="shine" variant="secondary" >
|
||||||
<span className="sr-only">Menüyü aç</span>
|
<span className="sr-only">Menüyü aç</span>
|
||||||
<MoreHorizontal className="h-4 w-4" />
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -172,7 +171,7 @@ export function SubscriptionsClient({ subscriptions }: { subscriptions: Subscrip
|
|||||||
<h3 className="text-lg font-bold mb-4 text-foreground">Yeni Abonelik Ekle</h3>
|
<h3 className="text-lg font-bold mb-4 text-foreground">Yeni Abonelik Ekle</h3>
|
||||||
<p className="text-sm text-muted-foreground mb-6">Bu özellik şu an geliştirme aşamasındadır.</p>
|
<p className="text-sm text-muted-foreground mb-6">Bu özellik şu an geliştirme aşamasındadır.</p>
|
||||||
<div className="flex justify-end">
|
<div className="flex justify-end">
|
||||||
<Button variant="outline" onClick={() => setIsAddModalOpen(false)}>Kapat</Button>
|
<Button effect="shine" variant="secondary" onClick={() => setIsAddModalOpen(false)}>Kapat</Button>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
+1
-5
@@ -6,8 +6,7 @@ import { tr } from "date-fns/locale";
|
|||||||
import { requirePortalBackend } from "@/server/web/portal";
|
import { requirePortalBackend } from "@/server/web/portal";
|
||||||
|
|
||||||
export default async function PortalDashboardPage() {
|
export default async function PortalDashboardPage() {
|
||||||
const { context, actor, service } = await requirePortalBackend();
|
const { actor, service } = await requirePortalBackend();
|
||||||
const client = service.getClient(actor, context.profile.clientId!);
|
|
||||||
const projects = service.listProjects(actor);
|
const projects = service.listProjects(actor);
|
||||||
const activeProjects = projects.filter((project) => project.status !== "completed" && project.status !== "cancelled");
|
const activeProjects = projects.filter((project) => project.status !== "completed" && project.status !== "cancelled");
|
||||||
const completedProjects = projects.filter((project) => project.status === "completed");
|
const completedProjects = projects.filter((project) => project.status === "completed");
|
||||||
@@ -20,9 +19,6 @@ export default async function PortalDashboardPage() {
|
|||||||
<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">Müşteri Paneli</h1>
|
<h1 className="text-3xl font-semibold tracking-normal text-foreground">Müşteri Paneli</h1>
|
||||||
<p className="mt-1 max-w-2xl text-sm text-muted-foreground">
|
|
||||||
Hoş geldiniz, {client.name}. Aktif projelerinizi ve ilerlemeleri buradan takip edin.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ export function PortalProjectClient({ project, sections, tasks, revisions }: Por
|
|||||||
<div className="flex flex-col gap-4 md:flex-row md:items-start justify-between">
|
<div className="flex flex-col gap-4 md:flex-row md:items-start justify-between">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<h1 className="text-3xl font-bold text-foreground">{project.name}</h1>
|
<h1 className="text-3xl font-bold text-foreground">{project.name}</h1>
|
||||||
{project.description && <p className="text-muted-foreground">{project.description}</p>}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-2 md:items-end">
|
<div className="flex flex-col gap-2 md:items-end">
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
@@ -87,7 +86,7 @@ export function PortalProjectClient({ project, sections, tasks, revisions }: Por
|
|||||||
{hasRevisionQuota ? (
|
{hasRevisionQuota ? (
|
||||||
<Dialog open={openRevision} onOpenChange={setOpenRevision}>
|
<Dialog open={openRevision} onOpenChange={setOpenRevision}>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button className="gap-2 shrink-0">
|
<Button variant="default" effect="shine" className="gap-2 shrink-0">
|
||||||
<RefreshCw className="h-4 w-4" /> Revizyon Talep Et
|
<RefreshCw className="h-4 w-4" /> Revizyon Talep Et
|
||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
@@ -108,8 +107,8 @@ export function PortalProjectClient({ project, sections, tasks, revisions }: Por
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button type="button" variant="ghost" onClick={() => setOpenRevision(false)}>İptal</Button>
|
<Button effect="shine" type="button" variant="secondary" onClick={() => setOpenRevision(false)}>İptal</Button>
|
||||||
<Button type="submit" disabled={isSubmitting}>
|
<Button variant="default" effect="shine" type="submit" disabled={isSubmitting}>
|
||||||
{isSubmitting && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
|
{isSubmitting && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
|
||||||
Talebi Gönder
|
Talebi Gönder
|
||||||
</Button>
|
</Button>
|
||||||
@@ -118,7 +117,7 @@ export function PortalProjectClient({ project, sections, tasks, revisions }: Por
|
|||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
) : (
|
) : (
|
||||||
<Button disabled className="gap-2 shrink-0 opacity-50">
|
<Button variant="default" effect="shine" disabled className="gap-2 shrink-0 opacity-50">
|
||||||
<RefreshCw className="h-4 w-4" /> Revizyon Hakkı Bitti
|
<RefreshCw className="h-4 w-4" /> Revizyon Hakkı Bitti
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
@@ -239,7 +238,7 @@ export function PortalProjectClient({ project, sections, tasks, revisions }: Por
|
|||||||
<MessageSquare className="h-8 w-8 text-muted-foreground/50" />
|
<MessageSquare className="h-8 w-8 text-muted-foreground/50" />
|
||||||
<p>Henüz bir revizyon talebi oluşturmadınız.</p>
|
<p>Henüz bir revizyon talebi oluşturmadınız.</p>
|
||||||
{hasRevisionQuota && (
|
{hasRevisionQuota && (
|
||||||
<Button variant="outline" size="sm" onClick={() => setOpenRevision(true)}>Yeni Talep Oluştur</Button>
|
<Button effect="shine" variant="secondary" size="sm" onClick={() => setOpenRevision(true)}>Yeni Talep Oluştur</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ export default async function PortalProjectsPage() {
|
|||||||
<div className="mx-auto flex max-w-7xl flex-col gap-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
|
<div className="mx-auto flex max-w-7xl flex-col gap-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<h1 className="text-3xl font-semibold tracking-tight">Projeleriniz</h1>
|
<h1 className="text-3xl font-semibold tracking-tight">Projeleriniz</h1>
|
||||||
<p className="text-muted-foreground">Size atanan tüm projeleri buradan inceleyebilirsiniz.</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ export default async function PortalRevisionsPage() {
|
|||||||
<div className="mx-auto flex max-w-7xl flex-col gap-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
|
<div className="mx-auto flex max-w-7xl flex-col gap-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<h1 className="text-3xl font-semibold tracking-tight">Revizyon Taleplerim</h1>
|
<h1 className="text-3xl font-semibold tracking-tight">Revizyon Taleplerim</h1>
|
||||||
<p className="text-muted-foreground">İlettiğiniz tüm revizyon taleplerinin güncel durumunu buradan takip edebilirsiniz.</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ export default async function PortalTasksPage() {
|
|||||||
<div className="mx-auto flex max-w-7xl flex-col gap-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
|
<div className="mx-auto flex max-w-7xl flex-col gap-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<h1 className="text-3xl font-semibold tracking-tight">Yapılan Görevler</h1>
|
<h1 className="text-3xl font-semibold tracking-tight">Yapılan Görevler</h1>
|
||||||
<p className="text-muted-foreground">Sizinle paylaşılan aktif ve tamamlanmış görevleri buradan takip edebilirsiniz.</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user