From 9497cc72ce5dd49db45d6e41d4bca109583f6871 Mon Sep 17 00:00:00 2001
From: egecankomur
Date: Tue, 5 May 2026 20:47:40 +0300
Subject: [PATCH] =?UTF-8?q?feat:=20sunum=20sayfas=C4=B1nda=20dan=C4=B1?=
=?UTF-8?q?=C5=9Fman=20ad=C4=B1=20ve=20=C5=9Firket=20ad=C4=B1=20g=C3=B6ste?=
=?UTF-8?q?r?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Header'da ilan sayısının yanına creator adı + şirket adı eklendi.
Footer'da 'Kovak Emlak CRM' yerine dinamik ad/şirket yazıyor.
users.get(createdBy) + teams.get(tenantId) ile çekilir;
her ikisi de allSettled ile hata toleranslı.
---
src/app/sunum/[token]/page.tsx | 32 ++++++++++++++++++++++++++++----
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/app/sunum/[token]/page.tsx b/src/app/sunum/[token]/page.tsx
index f99ebdf..c6173f8 100644
--- a/src/app/sunum/[token]/page.tsx
+++ b/src/app/sunum/[token]/page.tsx
@@ -18,7 +18,7 @@ interface Props {
export default async function SunumPage({ params }: Props) {
const { token } = await params;
- const { tablesDB } = createAdminClient();
+ const { tablesDB, teams, users } = createAdminClient();
const result = await tablesDB.listRows({
databaseId: DATABASE_ID,
@@ -46,6 +46,13 @@ export default async function SunumPage({ params }: Props) {
void incrementPresentationViewCount(presentation.$id, presentation.viewCount ?? 0);
+ const [creatorResult, teamResult] = await Promise.allSettled([
+ users.get(presentation.createdBy),
+ teams.get(presentation.tenantId),
+ ]);
+ const creatorName = creatorResult.status === "fulfilled" ? creatorResult.value.name : null;
+ const companyName = teamResult.status === "fulfilled" ? teamResult.value.name : null;
+
let propertyIds: string[] = [];
try {
propertyIds = JSON.parse(presentation.propertyIds) as string[];
@@ -78,11 +85,18 @@ export default async function SunumPage({ params }: Props) {
{presentation.notes}
)}
-
+
{properties.length}
- ilan listelendi
+ ilan
+ {(creatorName || companyName) && (
+
+ {creatorName && {creatorName}}
+ {creatorName && companyName && ·}
+ {companyName && {companyName}}
+
+ )}
@@ -102,7 +116,17 @@ export default async function SunumPage({ params }: Props) {
{/* Footer */}
);