feat(backend): migrate freelancer and portal runtimes

This commit is contained in:
poyrazavsever
2026-07-17 00:16:38 +03:00
parent 561af11b70
commit 678c0236db
41 changed files with 5293 additions and 2324 deletions
+8 -3
View File
@@ -1,14 +1,19 @@
import { PortalShell } from "@/components/layout/portal-shell";
import { requireClientUser } from "@/server/auth/session";
import { getPublicBranding } from "@/server/branding/runtime";
import { requirePortalBackend } from "@/server/web/portal";
export default async function PortalLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const { user, profile } = await requireClientUser();
const { context, actor, service } = await requirePortalBackend();
const { user, profile } = context;
const branding = getPublicBranding();
const projects = service.listProjects(actor);
const progress = projects.length
? Math.round(projects.reduce((sum, project) => sum + project.progress, 0) / projects.length)
: 0;
const displayName = profile.displayName || user.name || user.email.split("@")[0] || "Müşteri";
const shortName =
@@ -34,7 +39,7 @@ export default async function PortalLayout({
shortName,
avatarUrl: user.image || null,
}}
progress={0}
progress={progress}
>
{children}
</PortalShell>