From 19c1ecef47f93e4cd148d107832849e94eed042c Mon Sep 17 00:00:00 2001 From: egecankomur Date: Tue, 5 May 2026 13:15:50 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20workspace=20settings=20=E2=80=94=20emlak?= =?UTF-8?q?=20fields=20(officeName/phone/email/address),=20add=20createdBy?= =?UTF-8?q?=20to=20createRow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workspace/components/workspace-form.tsx | 141 ++++++------------ .../(dashboard)/settings/workspace/page.tsx | 13 +- src/lib/appwrite/workspace-actions.ts | 21 ++- 3 files changed, 57 insertions(+), 118 deletions(-) diff --git a/src/app/(dashboard)/settings/workspace/components/workspace-form.tsx b/src/app/(dashboard)/settings/workspace/components/workspace-form.tsx index 7e6a758..c9cc010 100644 --- a/src/app/(dashboard)/settings/workspace/components/workspace-form.tsx +++ b/src/app/(dashboard)/settings/workspace/components/workspace-form.tsx @@ -1,7 +1,7 @@ "use client"; import { useActionState, useEffect } from "react"; -import { Building2, Loader2, Receipt, Save } from "lucide-react"; +import { Building2, Loader2, Save } from "lucide-react"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; @@ -13,14 +13,11 @@ import { updateWorkspaceSettingsAction } from "@/lib/appwrite/workspace-actions" import { initialWorkspaceSettingsState } from "@/lib/appwrite/workspace-types"; type Defaults = { - companyName: string; - companyTaxId: string; - companyAddress: string; - companyEmail: string; - companyPhone: string; - defaultVatRate: number; - invoicePrefix: string; - invoiceCounter: number; + officeName: string; + phone: string; + email: string; + address: string; + defaultCurrency: string; }; export function WorkspaceSettingsForm({ @@ -47,128 +44,74 @@ export function WorkspaceSettingsForm({ - Şirket + Ofis Bilgileri - Resmi şirket bilgileriniz. + Müşterilere ve sunumlarda gösterilecek ofis bilgileri.
- + - {state.fieldErrors?.companyName && ( -

{state.fieldErrors.companyName}

+ {state.fieldErrors?.officeName && ( +

{state.fieldErrors.officeName}

)}
- + -
- -
- -
- + - {state.fieldErrors?.companyEmail && ( -

{state.fieldErrors.companyEmail}

- )}
- + + +
+ +
+