From e669dcc14de2160cc6b39fca2afb1c488bc18c69 Mon Sep 17 00:00:00 2001
From: meglerhagen
Date: Thu, 22 Aug 2024 21:33:45 +0200
Subject: [PATCH] update components to @propdock
---
.../(analytics)/analytics/[id]/dcf/page.tsx | 5 +-
.../app/(analytics)/analytics/[id]/page.tsx | 5 +-
.../analytics/[id]/sensitivity/page.tsx | 3 +-
.../src/app/(analytics)/analytics/loading.tsx | 10 +-
.../src/app/(analytics)/analytics/page.tsx | 7 +-
apps/www/src/app/(auth)/login/page.tsx | 20 ++--
apps/www/src/app/(auth)/register/page.tsx | 3 +-
.../(dashboard)/dashboard/billing/page.tsx | 32 +++---
.../src/app/(dashboard)/dashboard/loading.tsx | 10 +-
.../dashboard/notifications/page.tsx | 35 ++++---
apps/www/src/app/(marketing)/open/loading.tsx | 4 +-
.../src/app/(marketing)/pricing/loading.tsx | 4 +-
apps/www/src/app/(marketing)/pricing/page.tsx | 20 ++--
.../property/[id]/building/page.tsx | 5 +-
.../src/app/(property)/property/[id]/page.tsx | 5 +-
.../src/app/(property)/property/loading.tsx | 10 +-
.../property-OLD/[id]/loading.tsx | 10 +-
.../property-OLD/[id]/pictures/loading.tsx | 4 +-
.../property-OLD/[id]/pictures/page.tsx | 37 +++----
.../src/app/(settings)/settings/api/page.tsx | 9 +-
.../import/_components/ConnectorButton.tsx | 3 +-
.../app/(settings)/settings/import/page.tsx | 13 ++-
.../src/app/(settings)/settings/loading.tsx | 10 +-
.../(tenant)/tenant/[id]/building/page.tsx | 9 +-
.../tenant/[id]/contactperson/page.tsx | 7 +-
.../_components/BuildingFormContract.tsx | 15 ++-
.../_components/ReusableFormTemplate.tsx | 33 +++----
.../kpi/_components/KpiDetailsForm.tsx | 25 +++--
.../tenant/[id]/contract/kpi/page.tsx | 5 +-
.../_components/LandlordDetailsForm.tsx | 17 ++--
.../tenant/[id]/contract/landlord/page.tsx | 3 +-
.../mva/_components/MvaDetailsForm.tsx | 17 ++--
.../tenant/[id]/contract/mva/page.tsx | 5 +-
.../_components/SummaryDetailsForm.tsx | 3 +-
.../tenant/[id]/contract/summary/page.tsx | 3 +-
.../tenant/_components/TenantDetailsForm.tsx | 17 ++--
.../tenant/[id]/contract/tenant/page.tsx | 5 +-
.../terms/_components/TermsDetailsForm.tsx | 21 ++--
.../tenant/[id]/contract/terms/page.tsx | 5 +-
.../time/_components/TimeDetailsForm.tsx | 27 +++--
.../tenant/[id]/contract/time/page.tsx | 5 +-
.../app/(tenant)/tenant/[id]/finance/page.tsx | 9 +-
.../app/(tenant)/tenant/[id]/invoice/page.tsx | 3 +-
.../www/src/app/(tenant)/tenant/[id]/page.tsx | 3 +-
apps/www/src/app/(tenant)/tenant/loading.tsx | 10 +-
.../analyse/AnalysisDetailsTable.tsx | 7 +-
.../components/analyse/AnalysisDiagramDCF.tsx | 25 +++--
.../components/analyse/AnalysisInfoCard.tsx | 15 ++-
.../components/analyse/AnalysisTableDCF.tsx | 9 +-
.../analyse/EditAnalysisNameCard.tsx | 23 +++--
.../src/components/analyse/EditIncomeCard.tsx | 27 +++--
.../components/analyse/EditKpiCard.tsx.tsx | 17 ++--
.../components/analyse/EditMarketDataCard.tsx | 17 ++--
.../components/analyse/EditOwnerCostsCard.tsx | 17 ++--
.../src/components/analyse/EditROICard.tsx | 19 ++--
.../analyse/EditRentableAreaCard.tsx | 17 ++--
.../components/analyse/EditVacancyCard.tsx | 21 ++--
.../analyse/SensitivityAnalysisTable.tsx | 4 +-
.../components/buttons/AddAnalysisSheet.tsx | 17 ++--
.../components/buttons/AddApiKeyButton.tsx | 13 ++-
.../components/buttons/AddBuildingButton.tsx | 49 +++++----
.../components/buttons/AddBuildingSheet.tsx | 19 ++--
.../components/buttons/AddChannelButton.tsx | 47 +++++----
.../src/components/buttons/AddFloorSheet.tsx | 25 +++--
.../buttons/AddOfficeSpaceSheet.tsx | 53 +++++-----
.../components/buttons/AddProjectButton.tsx | 45 +++++----
.../components/buttons/AddPropertyButton.tsx | 17 ++--
.../buttons/AddTenantDropdownButton.tsx | 8 +-
.../buttons/AddTenantSheet copy.tsx | 17 ++--
.../components/buttons/AddWorkspaceButton.tsx | 45 +++++----
.../components/buttons/CreatEventButton.tsx | 99 +++++++++----------
.../www/src/components/buttons/DocsButton.tsx | 9 +-
.../buttons/EditContactPersonSheet.tsx | 15 ++-
.../buttons/EditContractDetails.tsx | 27 +++--
.../buttons/EditFloorDetailsSheet.tsx | 59 ++++++-----
.../buttons/EditOfficeSpaceSheet.tsx | 17 ++--
.../components/buttons/EditTenantSheet.tsx | 17 ++--
.../buttons/GenerateDescriptionButton2.tsx | 41 ++++----
.../buttons/GenerateDescriptionsButton.tsx | 25 +++--
.../components/buttons/GetStartedButton.tsx | 31 +++---
.../src/components/buttons/LanguageButton.tsx | 14 +--
.../components/buttons/SeeTenantsComboBox.tsx | 67 +++++++------
.../src/components/buttons/SubmitProperty.tsx | 13 ++-
.../components/buttons/ViewDetailsButton.tsx | 13 ++-
.../src/components/channels/ChannelCard2.tsx | 23 +++--
.../dashboard/DashboardCardsTop.tsx | 5 +-
.../DashboardTableBestProperties.tsx | 21 ++--
.../DashboardTableLeaseExpiration.tsx | 7 +-
.../EventDashboardDetailsSheet.tsx | 47 +++++----
.../EventsDashboardCards.tsx | 12 +--
.../EventsDashboardDetails.tsx | 51 +++++-----
.../EventsDashboardTable.tsx | 25 +++--
.../dashboard/charts/EventsTrendOverTime.tsx | 31 +++---
.../dashboard/charts/UserGrowthChart.tsx | 21 ++--
.../dashboard/descriptiondisplay.tsx | 35 ++++---
.../src/components/dashboard/herosection.tsx | 21 ++--
.../src/components/dashboard/herosection2.tsx | 23 +++--
apps/www/src/components/dashboard/test.tsx | 16 +--
.../dashboard/updatepropertyform2.tsx | 49 +++++----
.../components/dev/testbuttonpoweroffice.tsx | 3 +-
apps/www/src/components/docs/search.tsx | 16 +--
.../editor/toolbar/editor-toolbar.tsx | 21 ++--
.../components/editor/toolbar/format-type.tsx | 57 ++++++-----
.../esign/_components/DragAndDrop.tsx | 3 +-
.../esign/_components/ESignGeneralForm .tsx | 17 ++--
.../esign/_components/FileUploader.tsx | 5 +-
.../esign/_components/FileUploader2.tsx | 7 +-
.../components/esign/esignMainComponent.tsx | 3 +-
.../src/components/filetree/tree-view-api.tsx | 4 +-
.../components/forms/billing-form-button.tsx | 27 +++--
.../src/components/forms/language-form2.tsx | 63 ++++++------
.../components/forms/select-input-form.tsx | 67 +++++++------
.../components/forms/update-property-form.tsx | 27 +++--
.../src/components/forms/user-auth-form.tsx | 58 +++++------
.../src/components/forms/user-mobile-form.tsx | 13 ++-
.../src/components/forms/user-name-form.tsx | 13 ++-
.../src/components/landing/cta-section.tsx | 69 +++++++------
.../landing/events-section-landing.tsx | 23 +++--
.../components/landing/hero-section-new.tsx | 21 ++--
.../src/components/landing/hero-section.tsx | 23 +++--
.../src/components/layout/language-modal.tsx | 35 ++++---
.../www/src/components/layout/mode-toggle.tsx | 18 ++--
apps/www/src/components/layout/navbar.tsx | 3 +-
.../src/components/layout/sign-in-modal.tsx | 3 +-
.../components/layout/user-account-nav.tsx | 15 ++-
apps/www/src/components/maps/PropertyMap.tsx | 53 +++++-----
.../notifications/NotificationAlert.tsx | 67 +++++++------
apps/www/src/components/open-page/Open.tsx | 4 +-
.../components/open-page/OpenCardsSection.tsx | 19 ++--
.../open-page/OpenMiddleSection.tsx | 4 +-
.../components/open-page/OpenTableTeam.tsx | 29 +++---
.../components/open-page/OpenUsersDiagram.tsx | 8 +-
.../components/open-page/OpenUsersFunding.tsx | 8 +-
.../components/open-page/OpenUsersText.tsx | 4 +-
.../properties/NoPhotoPlaceholder copy.tsx | 10 +-
.../properties/NoSummaryPlaceholder.tsx | 8 +-
.../components/properties/Propertiestable.tsx | 39 ++++----
.../src/components/shared/card-skeleton.tsx | 6 +-
apps/www/src/components/shared/modal.tsx | 26 ++---
.../www/src/components/shared/user-avatar.tsx | 14 +--
.../components/table/dashboard/columns.tsx | 9 +-
.../dashboard/data-table-faceted-filter.tsx | 42 ++++----
.../table/dashboard/data-table-toolbar.tsx | 23 +++--
.../dashboard/data-table-view-options.tsx | 21 ++--
.../components/table/dashboard/data-table.tsx | 27 +++--
.../components/table/floors/floors-table.tsx | 27 +++--
apps/www/src/components/table/info-card.tsx | 15 ++-
.../src/components/table/tenant/columns.tsx | 13 ++-
.../components/tenant/TenantSendInvoice.tsx | 41 ++++----
apps/www/src/components/ui/bento-grid.tsx | 35 ++++---
.../components/ui/bento-section-landing.tsx | 7 +-
apps/www/src/components/ui/feature-card.tsx | 21 ++--
apps/www/src/components/users/EmailButton.tsx | 22 ++---
.../src/components/users/UserCardsSection.tsx | 5 +-
.../components/users/UserChartActivity.tsx | 27 ++---
.../components/users/UserContactPerson.tsx | 2 +-
.../src/components/users/UserEmailCard.tsx | 14 +--
.../components/users/UsersDashboardTable.tsx | 13 ++-
158 files changed, 1534 insertions(+), 1661 deletions(-)
diff --git a/apps/www/src/app/(analytics)/analytics/[id]/dcf/page.tsx b/apps/www/src/app/(analytics)/analytics/[id]/dcf/page.tsx
index 453b37cd..7e1bc064 100644
--- a/apps/www/src/app/(analytics)/analytics/[id]/dcf/page.tsx
+++ b/apps/www/src/app/(analytics)/analytics/[id]/dcf/page.tsx
@@ -1,13 +1,12 @@
import Link from "next/link"
import { getAnalysisDetails } from "@/actions/get-analysis-details"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
-} from "@dingify/ui/components/tabs"
+} from "@propdock/ui/components/tabs"
import { AnalysisDiagramDCF } from "@/components/analyse/AnalysisDiagramDCF"
import { AnalysisTableDCF } from "@/components/analyse/AnalysisTableDCF"
diff --git a/apps/www/src/app/(analytics)/analytics/[id]/page.tsx b/apps/www/src/app/(analytics)/analytics/[id]/page.tsx
index 59cd3c80..993dedde 100644
--- a/apps/www/src/app/(analytics)/analytics/[id]/page.tsx
+++ b/apps/www/src/app/(analytics)/analytics/[id]/page.tsx
@@ -1,13 +1,12 @@
import Link from "next/link"
import { getAnalysisDetails } from "@/actions/get-analysis-details"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
-} from "@dingify/ui/components/tabs"
+} from "@propdock/ui/components/tabs"
import { AnalysisDetailsTable } from "@/components/analyse/AnalysisDetailsTable"
import { AnalysisInfoCard } from "@/components/analyse/AnalysisInfoCard"
diff --git a/apps/www/src/app/(analytics)/analytics/[id]/sensitivity/page.tsx b/apps/www/src/app/(analytics)/analytics/[id]/sensitivity/page.tsx
index 5898b258..21034aff 100644
--- a/apps/www/src/app/(analytics)/analytics/[id]/sensitivity/page.tsx
+++ b/apps/www/src/app/(analytics)/analytics/[id]/sensitivity/page.tsx
@@ -1,7 +1,6 @@
import Link from "next/link"
import { getAnalysisDetails } from "@/actions/get-analysis-details"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import { SensitivityAnalysisTable } from "@/components/analyse/SensitivityAnalysisTable"
import { DashboardHeader } from "@/components/dashboard/header"
diff --git a/apps/www/src/app/(analytics)/analytics/loading.tsx b/apps/www/src/app/(analytics)/analytics/loading.tsx
index ea4980b5..9de0452f 100644
--- a/apps/www/src/app/(analytics)/analytics/loading.tsx
+++ b/apps/www/src/app/(analytics)/analytics/loading.tsx
@@ -1,8 +1,8 @@
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { CardSkeleton } from "@/components/shared/card-skeleton";
+import { DashboardHeader } from "@/components/dashboard/header"
+import { DashboardShell } from "@/components/dashboard/shell"
+import { CardSkeleton } from "@/components/shared/card-skeleton"
export default function DashboardLoading() {
return (
@@ -17,5 +17,5 @@ export default function DashboardLoading() {
- );
+ )
}
diff --git a/apps/www/src/app/(analytics)/analytics/page.tsx b/apps/www/src/app/(analytics)/analytics/page.tsx
index 7de68352..74eb2d64 100644
--- a/apps/www/src/app/(analytics)/analytics/page.tsx
+++ b/apps/www/src/app/(analytics)/analytics/page.tsx
@@ -2,13 +2,12 @@
import Link from "next/link"
import { redirect } from "next/navigation"
import { getAnalyses } from "@/actions/get-analyst"
-
import {
Card,
CardContent,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Table,
TableBody,
@@ -16,13 +15,13 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
-} from "@dingify/ui/components/tabs"
+} from "@propdock/ui/components/tabs"
import { authOptions } from "@/lib/auth"
import { prisma } from "@/lib/db"
diff --git a/apps/www/src/app/(auth)/login/page.tsx b/apps/www/src/app/(auth)/login/page.tsx
index acc5523b..1830f0c8 100644
--- a/apps/www/src/app/(auth)/login/page.tsx
+++ b/apps/www/src/app/(auth)/login/page.tsx
@@ -1,16 +1,16 @@
-import type { Metadata } from "next";
-import { Suspense } from "react";
-import Link from "next/link";
-import { UserAuthForm } from "@/components/forms/user-auth-form";
-import { Icons } from "@/components/shared/icons";
-import { cn } from "@/lib/utils";
+import type { Metadata } from "next"
+import { Suspense } from "react"
+import Link from "next/link"
+import { buttonVariants } from "@propdock/ui/components/button"
-import { buttonVariants } from "@dingify/ui/components/button";
+import { cn } from "@/lib/utils"
+import { UserAuthForm } from "@/components/forms/user-auth-form"
+import { Icons } from "@/components/shared/icons"
export const metadata: Metadata = {
title: "Login",
description: "Login to your account",
-};
+}
export default function LoginPage() {
return (
@@ -19,7 +19,7 @@ export default function LoginPage() {
href="/"
className={cn(
buttonVariants({ variant: "outline", size: "sm" }),
- "absolute left-4 top-4 md:left-8 md:top-8"
+ "absolute left-4 top-4 md:left-8 md:top-8",
)}
>
<>
@@ -50,5 +50,5 @@ export default function LoginPage() {
- );
+ )
}
diff --git a/apps/www/src/app/(auth)/register/page.tsx b/apps/www/src/app/(auth)/register/page.tsx
index d6fafe96..8dbbf3e6 100644
--- a/apps/www/src/app/(auth)/register/page.tsx
+++ b/apps/www/src/app/(auth)/register/page.tsx
@@ -1,7 +1,6 @@
import { Suspense } from "react"
import Link from "next/link"
-
-import { buttonVariants } from "@dingify/ui/components/button"
+import { buttonVariants } from "@propdock/ui/components/button"
import { cn } from "@/lib/utils"
import { UserAuthForm } from "@/components/forms/user-auth-form"
diff --git a/apps/www/src/app/(dashboard)/dashboard/billing/page.tsx b/apps/www/src/app/(dashboard)/dashboard/billing/page.tsx
index 852aa160..619ed4ad 100644
--- a/apps/www/src/app/(dashboard)/dashboard/billing/page.tsx
+++ b/apps/www/src/app/(dashboard)/dashboard/billing/page.tsx
@@ -1,33 +1,33 @@
-import { redirect } from "next/navigation";
-import { BillingInfo } from "@/components/billing-info";
-import { LanugageButton } from "@/components/buttons/LanguageButton";
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { Icons } from "@/components/shared/icons";
-import { authOptions } from "@/lib/auth";
-import { getCurrentUser } from "@/lib/session";
-import { getUserSubscriptionPlan } from "@/lib/subscription";
-
+import { redirect } from "next/navigation"
import {
Alert,
AlertDescription,
AlertTitle,
-} from "@dingify/ui/components/alert";
+} from "@propdock/ui/components/alert"
+
+import { authOptions } from "@/lib/auth"
+import { getCurrentUser } from "@/lib/session"
+import { getUserSubscriptionPlan } from "@/lib/subscription"
+import { BillingInfo } from "@/components/billing-info"
+import { LanugageButton } from "@/components/buttons/LanguageButton"
+import { DashboardHeader } from "@/components/dashboard/header"
+import { DashboardShell } from "@/components/dashboard/shell"
+import { Icons } from "@/components/shared/icons"
export const metadata = {
title: "Dingity Billing - Subscription Management",
description:
"Access and manage your billing information, view subscription plans, and update payment methods on Dingity's Billing page.",
-};
+}
export default async function BillingPage() {
- const user = await getCurrentUser();
+ const user = await getCurrentUser()
if (!user) {
- redirect(authOptions.pages?.signIn || "/login");
+ redirect(authOptions.pages?.signIn || "/login")
}
- const subscriptionPlan = await getUserSubscriptionPlan(user.id);
+ const subscriptionPlan = await getUserSubscriptionPlan(user.id)
return (
@@ -57,5 +57,5 @@ export default async function BillingPage() {
{/* */}
- );
+ )
}
diff --git a/apps/www/src/app/(dashboard)/dashboard/loading.tsx b/apps/www/src/app/(dashboard)/dashboard/loading.tsx
index ea4980b5..9de0452f 100644
--- a/apps/www/src/app/(dashboard)/dashboard/loading.tsx
+++ b/apps/www/src/app/(dashboard)/dashboard/loading.tsx
@@ -1,8 +1,8 @@
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { CardSkeleton } from "@/components/shared/card-skeleton";
+import { DashboardHeader } from "@/components/dashboard/header"
+import { DashboardShell } from "@/components/dashboard/shell"
+import { CardSkeleton } from "@/components/shared/card-skeleton"
export default function DashboardLoading() {
return (
@@ -17,5 +17,5 @@ export default function DashboardLoading() {
- );
+ )
}
diff --git a/apps/www/src/app/(dashboard)/dashboard/notifications/page.tsx b/apps/www/src/app/(dashboard)/dashboard/notifications/page.tsx
index e876e684..0e1254ca 100644
--- a/apps/www/src/app/(dashboard)/dashboard/notifications/page.tsx
+++ b/apps/www/src/app/(dashboard)/dashboard/notifications/page.tsx
@@ -1,7 +1,6 @@
-import { redirect } from "next/navigation";
-import { getMetricsForUser } from "@/actions/Dingify/get-metrics-user";
-import { getNotificationSettings } from "@/actions/Dingify/get-notification-settings";
-
+import { redirect } from "next/navigation"
+import { getMetricsForUser } from "@/actions/Dingify/get-metrics-user"
+import { getNotificationSettings } from "@/actions/Dingify/get-notification-settings"
import {
Card,
CardContent,
@@ -9,31 +8,31 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
-import { authOptions } from "@/lib/auth";
-import { getCurrentUser } from "@/lib/session";
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { LanguageForm2 } from "@/components/forms/language-form2";
-import { UserNameForm } from "@/components/forms/user-name-form";
-import { NotificationAlert } from "@/components/notifications/NotificationAlert";
+import { authOptions } from "@/lib/auth"
+import { getCurrentUser } from "@/lib/session"
+import { DashboardHeader } from "@/components/dashboard/header"
+import { DashboardShell } from "@/components/dashboard/shell"
+import { LanguageForm2 } from "@/components/forms/language-form2"
+import { UserNameForm } from "@/components/forms/user-name-form"
+import { NotificationAlert } from "@/components/notifications/NotificationAlert"
export const metadata = {
title: "Dingify Notifications - Customize Your Alerts",
description:
"Adjust your Dingify notification settings for a personalized real-time monitoring experience. Manage alert preferences, notification channels, and more.",
-};
+}
export default async function SettingsPage() {
- const user = await getCurrentUser();
+ const user = await getCurrentUser()
if (!user) {
- redirect(authOptions.pages?.signIn || "/login");
+ redirect(authOptions.pages?.signIn || "/login")
}
// How to get the metrics for the user
- const metrics = await getMetricsForUser();
- const settings = await getNotificationSettings();
+ const metrics = await getMetricsForUser()
+ const settings = await getNotificationSettings()
return (
@@ -43,5 +42,5 @@ export default async function SettingsPage() {
/>
- );
+ )
}
diff --git a/apps/www/src/app/(marketing)/open/loading.tsx b/apps/www/src/app/(marketing)/open/loading.tsx
index 3795ac10..04d15b4a 100644
--- a/apps/www/src/app/(marketing)/open/loading.tsx
+++ b/apps/www/src/app/(marketing)/open/loading.tsx
@@ -1,4 +1,4 @@
-import { Skeleton } from "@dingify/ui/components/skeleton";
+import { Skeleton } from "@propdock/ui/components/skeleton"
export default function Loading() {
return (
@@ -24,5 +24,5 @@ export default function Loading() {
- );
+ )
}
diff --git a/apps/www/src/app/(marketing)/pricing/loading.tsx b/apps/www/src/app/(marketing)/pricing/loading.tsx
index 3795ac10..04d15b4a 100644
--- a/apps/www/src/app/(marketing)/pricing/loading.tsx
+++ b/apps/www/src/app/(marketing)/pricing/loading.tsx
@@ -1,4 +1,4 @@
-import { Skeleton } from "@dingify/ui/components/skeleton";
+import { Skeleton } from "@propdock/ui/components/skeleton"
export default function Loading() {
return (
@@ -24,5 +24,5 @@ export default function Loading() {
- );
+ )
}
diff --git a/apps/www/src/app/(marketing)/pricing/page.tsx b/apps/www/src/app/(marketing)/pricing/page.tsx
index 8e4424a0..14b5114b 100644
--- a/apps/www/src/app/(marketing)/pricing/page.tsx
+++ b/apps/www/src/app/(marketing)/pricing/page.tsx
@@ -1,22 +1,22 @@
-import { PricingCards } from "@/components/pricing-cards";
-import { PricingFaq } from "@/components/pricing-faq";
-import { getCurrentUser } from "@/lib/session";
-import { getUserSubscriptionPlan } from "@/lib/subscription";
+import { Skeleton } from "@propdock/ui/components/skeleton"
-import { Skeleton } from "@dingify/ui/components/skeleton";
+import { getCurrentUser } from "@/lib/session"
+import { getUserSubscriptionPlan } from "@/lib/subscription"
+import { PricingCards } from "@/components/pricing-cards"
+import { PricingFaq } from "@/components/pricing-faq"
export const metadata = {
title: "Dingify Pricing - Tailored Plans for Your Monitoring Needs",
description:
"Explore competitive pricing plans for Dingify. Find the perfect package to enhance your real-time monitoring, event tracking, and data analytics.",
-};
+}
export default async function PricingPage() {
- const user = await getCurrentUser();
- let subscriptionPlan;
+ const user = await getCurrentUser()
+ let subscriptionPlan
if (user) {
- subscriptionPlan = await getUserSubscriptionPlan(user.id);
+ subscriptionPlan = await getUserSubscriptionPlan(user.id)
}
return (
@@ -25,5 +25,5 @@ export default async function PricingPage() {
- );
+ )
}
diff --git a/apps/www/src/app/(property)/property/[id]/building/page.tsx b/apps/www/src/app/(property)/property/[id]/building/page.tsx
index 1324175b..da672b86 100644
--- a/apps/www/src/app/(property)/property/[id]/building/page.tsx
+++ b/apps/www/src/app/(property)/property/[id]/building/page.tsx
@@ -1,13 +1,12 @@
import Link from "next/link"
import { getPropertyDetails } from "@/actions/get-property-details"
-
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import { AddBuildingSheet } from "@/components/buttons/AddBuildingSheet"
import { DashboardHeader } from "@/components/dashboard/header"
@@ -65,7 +64,7 @@ export default async function PropertyPage({
) : (
-
+
{propertyDetails.buildings.map((building) => (
diff --git a/apps/www/src/app/(property)/property/[id]/page.tsx b/apps/www/src/app/(property)/property/[id]/page.tsx
index 6ddc304d..6326f3ae 100644
--- a/apps/www/src/app/(property)/property/[id]/page.tsx
+++ b/apps/www/src/app/(property)/property/[id]/page.tsx
@@ -1,7 +1,6 @@
import Link from "next/link"
import { getPropertyDetails } from "@/actions/get-property-details"
-
-import { Badge } from "@dingify/ui/components/badge"
+import { Badge } from "@propdock/ui/components/badge"
import {
Card,
CardContent,
@@ -9,7 +8,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import { AddBuildingSheet } from "@/components/buttons/AddBuildingSheet"
import { DashboardHeader } from "@/components/dashboard/header"
diff --git a/apps/www/src/app/(property)/property/loading.tsx b/apps/www/src/app/(property)/property/loading.tsx
index ea4980b5..9de0452f 100644
--- a/apps/www/src/app/(property)/property/loading.tsx
+++ b/apps/www/src/app/(property)/property/loading.tsx
@@ -1,8 +1,8 @@
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { CardSkeleton } from "@/components/shared/card-skeleton";
+import { DashboardHeader } from "@/components/dashboard/header"
+import { DashboardShell } from "@/components/dashboard/shell"
+import { CardSkeleton } from "@/components/shared/card-skeleton"
export default function DashboardLoading() {
return (
@@ -17,5 +17,5 @@ export default function DashboardLoading() {
- );
+ )
}
diff --git a/apps/www/src/app/(property-OLD)/property-OLD/[id]/loading.tsx b/apps/www/src/app/(property-OLD)/property-OLD/[id]/loading.tsx
index 3b3d0d49..bb1ef2e1 100644
--- a/apps/www/src/app/(property-OLD)/property-OLD/[id]/loading.tsx
+++ b/apps/www/src/app/(property-OLD)/property-OLD/[id]/loading.tsx
@@ -1,8 +1,8 @@
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { CardSkeleton } from "@/components/shared/card-skeleton";
+import { Button } from "@propdock/ui/components/button"
-import { Button } from "@dingify/ui/components/button";
+import { DashboardHeader } from "@/components/dashboard/header"
+import { DashboardShell } from "@/components/dashboard/shell"
+import { CardSkeleton } from "@/components/shared/card-skeleton"
export default function DashboardLoading() {
return (
@@ -17,5 +17,5 @@ export default function DashboardLoading() {
- );
+ )
}
diff --git a/apps/www/src/app/(property-OLD)/property-OLD/[id]/pictures/loading.tsx b/apps/www/src/app/(property-OLD)/property-OLD/[id]/pictures/loading.tsx
index eab671fd..022da6f3 100644
--- a/apps/www/src/app/(property-OLD)/property-OLD/[id]/pictures/loading.tsx
+++ b/apps/www/src/app/(property-OLD)/property-OLD/[id]/pictures/loading.tsx
@@ -1,4 +1,4 @@
-import { Skeleton } from "@dingify/ui/components/skeleton";
+import { Skeleton } from "@propdock/ui/components/skeleton"
export default function PicturesLoading() {
return (
@@ -28,5 +28,5 @@ export default function PicturesLoading() {
- );
+ )
}
diff --git a/apps/www/src/app/(property-OLD)/property-OLD/[id]/pictures/page.tsx b/apps/www/src/app/(property-OLD)/property-OLD/[id]/pictures/page.tsx
index 10ae2be3..a9c07352 100644
--- a/apps/www/src/app/(property-OLD)/property-OLD/[id]/pictures/page.tsx
+++ b/apps/www/src/app/(property-OLD)/property-OLD/[id]/pictures/page.tsx
@@ -1,23 +1,24 @@
-import React from "react";
-import Link from "next/link";
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import NoPhotoPlaceholder from "@/components/properties/NoPhotoPlaceholder copy";
-import PropertyImageWithOptions from "@/components/properties/PropertyImageWithOptions";
+import React from "react"
+import Link from "next/link"
+import { Button } from "@propdock/ui/components/button"
-import { prisma } from "@dingify/db";
-import { Button } from "@dingify/ui/components/button";
+import { prisma } from "@dingify/db"
-const MAX_PHOTOS = 20; // Set the maximum number of photos allowed
+import { DashboardHeader } from "@/components/dashboard/header"
+import { DashboardShell } from "@/components/dashboard/shell"
+import NoPhotoPlaceholder from "@/components/properties/NoPhotoPlaceholder copy"
+import PropertyImageWithOptions from "@/components/properties/PropertyImageWithOptions"
+
+const MAX_PHOTOS = 20 // Set the maximum number of photos allowed
export default async function PropertyPage({ params }) {
- const propertyId = params.id;
+ const propertyId = params.id
// Fetch property data
- const propertyData = await getPropertyData(propertyId);
- const hasPhotos = (propertyData?.images.length ?? 0) > 0;
- const canAddMorePhotos = (propertyData?.images.length ?? 0) < MAX_PHOTOS;
- MAX_PHOTOS;
+ const propertyData = await getPropertyData(propertyId)
+ const hasPhotos = (propertyData?.images.length ?? 0) > 0
+ const canAddMorePhotos = (propertyData?.images.length ?? 0) < MAX_PHOTOS
+ MAX_PHOTOS
// Function to get property data
async function getPropertyData(id) {
@@ -25,10 +26,10 @@ export default async function PropertyPage({ params }) {
return await prisma.property.findUnique({
where: { id },
include: { images: true },
- });
+ })
} catch (error) {
- console.error("Error fetching property:", error);
- return null;
+ console.error("Error fetching property:", error)
+ return null
}
}
@@ -58,5 +59,5 @@ export default async function PropertyPage({ params }) {
- );
+ )
}
diff --git a/apps/www/src/app/(settings)/settings/api/page.tsx b/apps/www/src/app/(settings)/settings/api/page.tsx
index 9c656741..994fb807 100644
--- a/apps/www/src/app/(settings)/settings/api/page.tsx
+++ b/apps/www/src/app/(settings)/settings/api/page.tsx
@@ -1,9 +1,7 @@
// pages/settings/api.js
import { redirect } from "next/navigation"
-import { getServerSession } from "next-auth"
-
-import { Badge } from "@dingify/ui/components/badge"
-import { Separator } from "@dingify/ui/components/separator"
+import { Badge } from "@propdock/ui/components/badge"
+import { Separator } from "@propdock/ui/components/separator"
import {
Table,
TableBody,
@@ -11,7 +9,8 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
+import { getServerSession } from "next-auth"
import { authOptions } from "@/lib/auth"
import { prisma } from "@/lib/db"
diff --git a/apps/www/src/app/(settings)/settings/import/_components/ConnectorButton.tsx b/apps/www/src/app/(settings)/settings/import/_components/ConnectorButton.tsx
index 53872f52..b0771ece 100644
--- a/apps/www/src/app/(settings)/settings/import/_components/ConnectorButton.tsx
+++ b/apps/www/src/app/(settings)/settings/import/_components/ConnectorButton.tsx
@@ -2,11 +2,10 @@
import React, { useState } from "react"
import { deleteWsApiKey } from "@/actions/delete-ws-api-key"
+import { Button } from "@propdock/ui/components/button"
import axios from "axios"
import { toast } from "sonner"
-import { Button } from "@dingify/ui/components/button"
-
interface ConnectorButtonProps {
serviceName: string
status: string
diff --git a/apps/www/src/app/(settings)/settings/import/page.tsx b/apps/www/src/app/(settings)/settings/import/page.tsx
index 3dbcea3d..9fbad0ca 100644
--- a/apps/www/src/app/(settings)/settings/import/page.tsx
+++ b/apps/www/src/app/(settings)/settings/import/page.tsx
@@ -1,10 +1,7 @@
import { redirect } from "next/navigation"
import { getWsApiKeys } from "@/actions/get-ws-api-keys"
-import { ChevronDownIcon, PackageIcon, XIcon } from "lucide-react"
-import { getServerSession } from "next-auth"
-
-import { Badge } from "@dingify/ui/components/badge"
-import { Button } from "@dingify/ui/components/button"
+import { Badge } from "@propdock/ui/components/badge"
+import { Button } from "@propdock/ui/components/button"
import {
DropdownMenu,
DropdownMenuContent,
@@ -12,7 +9,7 @@ import {
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu"
+} from "@propdock/ui/components/dropdown-menu"
import {
Table,
TableBody,
@@ -20,7 +17,9 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
+import { ChevronDownIcon, PackageIcon, XIcon } from "lucide-react"
+import { getServerSession } from "next-auth"
import { authOptions } from "@/lib/auth"
import { prisma } from "@/lib/db"
diff --git a/apps/www/src/app/(settings)/settings/loading.tsx b/apps/www/src/app/(settings)/settings/loading.tsx
index ea4980b5..9de0452f 100644
--- a/apps/www/src/app/(settings)/settings/loading.tsx
+++ b/apps/www/src/app/(settings)/settings/loading.tsx
@@ -1,8 +1,8 @@
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { CardSkeleton } from "@/components/shared/card-skeleton";
+import { DashboardHeader } from "@/components/dashboard/header"
+import { DashboardShell } from "@/components/dashboard/shell"
+import { CardSkeleton } from "@/components/shared/card-skeleton"
export default function DashboardLoading() {
return (
@@ -17,5 +17,5 @@ export default function DashboardLoading() {
- );
+ )
}
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/building/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/building/page.tsx
index b0775749..d5c43014 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/building/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/building/page.tsx
@@ -1,14 +1,13 @@
import { getTenantDetails } from "@/actions/get-tenant-details"
-import { format } from "date-fns"
-import { Building, Settings } from "lucide-react"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
+import { format } from "date-fns"
+import { Building, Settings } from "lucide-react"
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contactperson/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contactperson/page.tsx
index 993bcf4e..9599d474 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contactperson/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contactperson/page.tsx
@@ -1,13 +1,12 @@
import { getTenantDetails } from "@/actions/get-tenant-details"
-import { Settings } from "lucide-react"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
+import { Settings } from "lucide-react"
import { AddContactPersonSheet } from "@/components/buttons/AddContactPersonSheet"
import { EditContactPersonSheet } from "@/components/buttons/EditContactPersonSheet"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/building/_components/BuildingFormContract.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/building/_components/BuildingFormContract.tsx
index ce47e2cf..a3418c9a 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/building/_components/BuildingFormContract.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/building/_components/BuildingFormContract.tsx
@@ -3,11 +3,7 @@
import { useEffect, useState } from "react"
import { createContract } from "@/actions/create-contract"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -15,7 +11,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -23,14 +19,17 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
+} from "@propdock/ui/components/form"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define the validation schema
const ContractSchema = z.object({
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/building/_components/ReusableFormTemplate.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/building/_components/ReusableFormTemplate.tsx
index 4c6ce5c4..06f9c36b 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/building/_components/ReusableFormTemplate.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/building/_components/ReusableFormTemplate.tsx
@@ -3,13 +3,8 @@
import { useState } from "react"
import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
-import { CalendarIcon } from "@radix-ui/react-icons"
-import { format } from "date-fns"
-import { useForm } from "react-hook-form"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
-import { Calendar } from "@dingify/ui/components/calendar"
+import { Button } from "@propdock/ui/components/button"
+import { Calendar } from "@propdock/ui/components/calendar"
import {
Card,
CardContent,
@@ -17,8 +12,8 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
-import { Checkbox } from "@dingify/ui/components/checkbox"
+} from "@propdock/ui/components/card"
+import { Checkbox } from "@propdock/ui/components/checkbox"
import {
Form,
FormControl,
@@ -27,24 +22,28 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
-import { Label } from "@dingify/ui/components/label"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
+import { Label } from "@propdock/ui/components/label"
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@dingify/ui/components/popover"
+} from "@propdock/ui/components/popover"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
-import { Switch } from "@dingify/ui/components/switch"
-import { Textarea } from "@dingify/ui/components/textarea"
-import { toast } from "@dingify/ui/components/use-toast"
+} from "@propdock/ui/components/select"
+import { Switch } from "@propdock/ui/components/switch"
+import { Textarea } from "@propdock/ui/components/textarea"
+import { toast } from "@propdock/ui/components/use-toast"
+import { CalendarIcon } from "@radix-ui/react-icons"
+import { format } from "date-fns"
+import { useForm } from "react-hook-form"
+import { z } from "zod"
import { cn } from "@/lib/utils"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/kpi/_components/KpiDetailsForm.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/kpi/_components/KpiDetailsForm.tsx
index de16fdeb..d23ee020 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/kpi/_components/KpiDetailsForm.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/kpi/_components/KpiDetailsForm.tsx
@@ -3,14 +3,8 @@
import { useState } from "react"
import { updateContract } from "@/actions/update-contract" // Import the update function
import { zodResolver } from "@hookform/resolvers/zod"
-import { CalendarIcon } from "@radix-ui/react-icons"
-import { format, parseISO } from "date-fns"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
-import { Calendar } from "@dingify/ui/components/calendar"
+import { Button } from "@propdock/ui/components/button"
+import { Calendar } from "@propdock/ui/components/calendar"
import {
Card,
CardContent,
@@ -18,7 +12,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -26,20 +20,25 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@dingify/ui/components/popover"
+} from "@propdock/ui/components/popover"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
+import { CalendarIcon } from "@radix-ui/react-icons"
+import { format, parseISO } from "date-fns"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
import { cn } from "@/lib/utils"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/kpi/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/kpi/page.tsx
index cacffc35..dd5beebb 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/kpi/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/kpi/page.tsx
@@ -1,9 +1,8 @@
import React from "react"
import Link from "next/link"
import { getTenantDetails } from "@/actions/get-tenant-details"
-
-import { Button } from "@dingify/ui/components/button"
-import { Card } from "@dingify/ui/components/card"
+import { Button } from "@propdock/ui/components/button"
+import { Card } from "@propdock/ui/components/card"
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/landlord/_components/LandlordDetailsForm.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/landlord/_components/LandlordDetailsForm.tsx
index 9f221610..7bf8189f 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/landlord/_components/LandlordDetailsForm.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/landlord/_components/LandlordDetailsForm.tsx
@@ -3,11 +3,7 @@
import { useEffect, useState } from "react"
import { updateContract } from "@/actions/update-contract" // Import the update function
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -15,7 +11,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -23,15 +19,18 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define validation schema
const LandlordSchema = z.object({
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/landlord/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/landlord/page.tsx
index a1b3c102..8cb44790 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/landlord/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/landlord/page.tsx
@@ -1,8 +1,7 @@
import React from "react"
import Link from "next/link"
import { getTenantDetails } from "@/actions/get-tenant-details"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/mva/_components/MvaDetailsForm.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/mva/_components/MvaDetailsForm.tsx
index ec1dbcbe..4b660593 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/mva/_components/MvaDetailsForm.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/mva/_components/MvaDetailsForm.tsx
@@ -3,11 +3,7 @@
import { useEffect, useState } from "react"
import { updateContract } from "@/actions/update-contract"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -15,7 +11,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -24,15 +20,18 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define validation schema
const VatTermsSchema = z.object({
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/mva/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/mva/page.tsx
index 41ce1502..5c8c9ff7 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/mva/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/mva/page.tsx
@@ -1,9 +1,8 @@
import React from "react"
import Link from "next/link"
import { getTenantDetails } from "@/actions/get-tenant-details"
-
-import { Button } from "@dingify/ui/components/button"
-import { Card } from "@dingify/ui/components/card"
+import { Button } from "@propdock/ui/components/button"
+import { Card } from "@propdock/ui/components/card"
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/summary/_components/SummaryDetailsForm.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/summary/_components/SummaryDetailsForm.tsx
index 5727798c..cdb9666a 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/summary/_components/SummaryDetailsForm.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/summary/_components/SummaryDetailsForm.tsx
@@ -1,11 +1,10 @@
import React from "react"
-
import {
Card,
CardContent,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
export function SummaryDetailsForm({ tenantDetails }) {
return (
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/summary/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/summary/page.tsx
index b9021f6f..7df30281 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/summary/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/summary/page.tsx
@@ -1,7 +1,6 @@
import React from "react"
import { getTenantDetails } from "@/actions/get-tenant-details"
-
-import { Card } from "@dingify/ui/components/card"
+import { Card } from "@propdock/ui/components/card"
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/tenant/_components/TenantDetailsForm.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/tenant/_components/TenantDetailsForm.tsx
index ca242a8b..c292df0d 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/tenant/_components/TenantDetailsForm.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/tenant/_components/TenantDetailsForm.tsx
@@ -3,11 +3,7 @@
import { useEffect, useState } from "react"
import { updateContract } from "@/actions/update-contract" // Import the update function
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -15,7 +11,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -23,15 +19,18 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define validation schema
const ContactSchema = z.object({
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/tenant/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/tenant/page.tsx
index adb4e822..16332871 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/tenant/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/tenant/page.tsx
@@ -1,9 +1,8 @@
import React from "react"
import Link from "next/link"
import { getTenantDetails } from "@/actions/get-tenant-details"
-
-import { Button } from "@dingify/ui/components/button"
-import { Card } from "@dingify/ui/components/card"
+import { Button } from "@propdock/ui/components/button"
+import { Card } from "@propdock/ui/components/card"
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/terms/_components/TermsDetailsForm.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/terms/_components/TermsDetailsForm.tsx
index 001d5ff1..e26c5460 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/terms/_components/TermsDetailsForm.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/terms/_components/TermsDetailsForm.tsx
@@ -3,12 +3,7 @@
import { useEffect, useState } from "react"
import { updateContract } from "@/actions/update-contract" // Import the update function
import { zodResolver } from "@hookform/resolvers/zod"
-import { addYears, format, parseISO } from "date-fns"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -16,7 +11,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -24,16 +19,20 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
-import { Switch } from "@dingify/ui/components/switch"
+} from "@propdock/ui/components/select"
+import { Switch } from "@propdock/ui/components/switch"
+import { addYears, format, parseISO } from "date-fns"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define validation schema
const TermsSchema = z.object({
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/terms/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/terms/page.tsx
index 5157cd88..bd4680f6 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/terms/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/terms/page.tsx
@@ -1,9 +1,8 @@
import React from "react"
import Link from "next/link"
import { getTenantDetails } from "@/actions/get-tenant-details"
-
-import { Button } from "@dingify/ui/components/button"
-import { Card } from "@dingify/ui/components/card"
+import { Button } from "@propdock/ui/components/button"
+import { Card } from "@propdock/ui/components/card"
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/time/_components/TimeDetailsForm.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/time/_components/TimeDetailsForm.tsx
index 224a6053..23220eec 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/time/_components/TimeDetailsForm.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/time/_components/TimeDetailsForm.tsx
@@ -3,14 +3,8 @@
import { useEffect, useState } from "react"
import { updateContract } from "@/actions/update-contract" // Import the update function
import { zodResolver } from "@hookform/resolvers/zod"
-import { CalendarIcon } from "@radix-ui/react-icons"
-import { addYears, format, parseISO } from "date-fns"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
-import { Calendar } from "@dingify/ui/components/calendar"
+import { Button } from "@propdock/ui/components/button"
+import { Calendar } from "@propdock/ui/components/calendar"
import {
Card,
CardContent,
@@ -18,7 +12,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -26,21 +20,26 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@dingify/ui/components/popover"
+} from "@propdock/ui/components/popover"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
-import { Switch } from "@dingify/ui/components/switch"
+} from "@propdock/ui/components/select"
+import { Switch } from "@propdock/ui/components/switch"
+import { CalendarIcon } from "@radix-ui/react-icons"
+import { addYears, format, parseISO } from "date-fns"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
import { cn } from "@/lib/utils"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/contract/time/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/contract/time/page.tsx
index a8463899..7a0acb35 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/contract/time/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/contract/time/page.tsx
@@ -1,9 +1,8 @@
import React from "react"
import Link from "next/link"
import { getTenantDetails } from "@/actions/get-tenant-details"
-
-import { Button } from "@dingify/ui/components/button"
-import { Card } from "@dingify/ui/components/card"
+import { Button } from "@propdock/ui/components/button"
+import { Card } from "@propdock/ui/components/card"
import { DashboardHeader } from "@/components/dashboard/header"
import { DashboardShell } from "@/components/dashboard/shell"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/finance/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/finance/page.tsx
index 80bba058..50cd849a 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/finance/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/finance/page.tsx
@@ -1,15 +1,14 @@
import { getContractDetails } from "@/actions/get-contract-details"
import { getTenantDetails } from "@/actions/get-tenant-details"
-import { format } from "date-fns"
-import { Building, Home, Settings } from "lucide-react"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
+import { format } from "date-fns"
+import { Building, Home, Settings } from "lucide-react"
import { EditContractSheet } from "@/components/buttons/EditContractDetails"
import { DashboardHeader } from "@/components/dashboard/header"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/invoice/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/invoice/page.tsx
index 5cc5ff22..93507ca9 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/invoice/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/invoice/page.tsx
@@ -1,10 +1,9 @@
import Link from "next/link"
import { getTenantDetails } from "@/actions/get-tenant-details"
import { getWsApiKeys } from "@/actions/get-ws-api-keys"
+import { Button } from "@propdock/ui/components/button"
import { getServerSession } from "next-auth/next"
-import { Button } from "@dingify/ui/components/button"
-
import { authOptions } from "@/lib/auth"
import { prisma } from "@/lib/db"
import { poweroffice } from "@/lib/poweroffice-sdk"
diff --git a/apps/www/src/app/(tenant)/tenant/[id]/page.tsx b/apps/www/src/app/(tenant)/tenant/[id]/page.tsx
index 38bc29d7..63fbfc2b 100644
--- a/apps/www/src/app/(tenant)/tenant/[id]/page.tsx
+++ b/apps/www/src/app/(tenant)/tenant/[id]/page.tsx
@@ -1,7 +1,6 @@
import Link from "next/link"
import { getTenantDetails } from "@/actions/get-tenant-details"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import { AddContactPersonSheet } from "@/components/buttons/AddContactPersonSheet"
import { DashboardHeader } from "@/components/dashboard/header"
diff --git a/apps/www/src/app/(tenant)/tenant/loading.tsx b/apps/www/src/app/(tenant)/tenant/loading.tsx
index ea4980b5..9de0452f 100644
--- a/apps/www/src/app/(tenant)/tenant/loading.tsx
+++ b/apps/www/src/app/(tenant)/tenant/loading.tsx
@@ -1,8 +1,8 @@
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { CardSkeleton } from "@/components/shared/card-skeleton";
+import { DashboardHeader } from "@/components/dashboard/header"
+import { DashboardShell } from "@/components/dashboard/shell"
+import { CardSkeleton } from "@/components/shared/card-skeleton"
export default function DashboardLoading() {
return (
@@ -17,5 +17,5 @@ export default function DashboardLoading() {
- );
+ )
}
diff --git a/apps/www/src/components/analyse/AnalysisDetailsTable.tsx b/apps/www/src/components/analyse/AnalysisDetailsTable.tsx
index dcb4d5bc..ac02bdd3 100644
--- a/apps/www/src/components/analyse/AnalysisDetailsTable.tsx
+++ b/apps/www/src/components/analyse/AnalysisDetailsTable.tsx
@@ -1,12 +1,10 @@
-import { format } from "date-fns"
-
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Table,
TableBody,
@@ -14,7 +12,8 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
+import { format } from "date-fns"
interface AnalysisDetailsTableProps {
details: any
diff --git a/apps/www/src/components/analyse/AnalysisDiagramDCF.tsx b/apps/www/src/components/analyse/AnalysisDiagramDCF.tsx
index adfe6d83..3f588d30 100644
--- a/apps/www/src/components/analyse/AnalysisDiagramDCF.tsx
+++ b/apps/www/src/components/analyse/AnalysisDiagramDCF.tsx
@@ -1,16 +1,5 @@
"use client"
-import { TrendingUp } from "lucide-react"
-import {
- Bar,
- BarChart,
- Label,
- Rectangle,
- ReferenceLine,
- XAxis,
- YAxis,
-} from "recharts"
-
import {
Card,
CardContent,
@@ -18,13 +7,23 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
ChartConfig,
ChartContainer,
ChartTooltip,
ChartTooltipContent,
-} from "@dingify/ui/components/chart"
+} from "@propdock/ui/components/chart"
+import { TrendingUp } from "lucide-react"
+import {
+ Bar,
+ BarChart,
+ Label,
+ Rectangle,
+ ReferenceLine,
+ XAxis,
+ YAxis,
+} from "recharts"
interface AnalysisDiagramDCFProps {
details: {
diff --git a/apps/www/src/components/analyse/AnalysisInfoCard.tsx b/apps/www/src/components/analyse/AnalysisInfoCard.tsx
index fb1631dc..68e8ebd2 100644
--- a/apps/www/src/components/analyse/AnalysisInfoCard.tsx
+++ b/apps/www/src/components/analyse/AnalysisInfoCard.tsx
@@ -1,8 +1,5 @@
-import { format } from "date-fns"
-import { File, MoveVerticalIcon, Pencil, Trash } from "lucide-react"
-
-import { Badge } from "@dingify/ui/components/badge"
-import { Button } from "@dingify/ui/components/button"
+import { Badge } from "@propdock/ui/components/badge"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -10,15 +7,17 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu"
-import { Separator } from "@dingify/ui/components/separator"
+} from "@propdock/ui/components/dropdown-menu"
+import { Separator } from "@propdock/ui/components/separator"
+import { format } from "date-fns"
+import { File, MoveVerticalIcon, Pencil, Trash } from "lucide-react"
export function AnalysisInfoCard({ analysisDetails }) {
const handleDelete = () => {
diff --git a/apps/www/src/components/analyse/AnalysisTableDCF.tsx b/apps/www/src/components/analyse/AnalysisTableDCF.tsx
index ef78edb7..0ebaba79 100644
--- a/apps/www/src/components/analyse/AnalysisTableDCF.tsx
+++ b/apps/www/src/components/analyse/AnalysisTableDCF.tsx
@@ -1,12 +1,10 @@
-import { differenceInDays } from "date-fns"
-
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Table,
TableBody,
@@ -14,13 +12,14 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
-} from "@dingify/ui/components/tooltip"
+} from "@propdock/ui/components/tooltip"
+import { differenceInDays } from "date-fns"
interface AnalysisTableDCFProps {
details: {
diff --git a/apps/www/src/components/analyse/EditAnalysisNameCard.tsx b/apps/www/src/components/analyse/EditAnalysisNameCard.tsx
index 6507926d..fa402a26 100644
--- a/apps/www/src/components/analyse/EditAnalysisNameCard.tsx
+++ b/apps/www/src/components/analyse/EditAnalysisNameCard.tsx
@@ -3,21 +3,15 @@
import { useState } from "react"
import { updateAnalysis } from "@/actions/update-analysis"
import { zodResolver } from "@hookform/resolvers/zod"
-import { CalendarIcon } from "@radix-ui/react-icons"
-import { format } from "date-fns"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
-import { Calendar } from "@dingify/ui/components/calendar"
+import { Button } from "@propdock/ui/components/button"
+import { Calendar } from "@propdock/ui/components/calendar"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -25,13 +19,18 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@dingify/ui/components/popover"
+} from "@propdock/ui/components/popover"
+import { CalendarIcon } from "@radix-ui/react-icons"
+import { format } from "date-fns"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
import { cn } from "@/lib/utils"
diff --git a/apps/www/src/components/analyse/EditIncomeCard.tsx b/apps/www/src/components/analyse/EditIncomeCard.tsx
index eccbf223..ee2aab57 100644
--- a/apps/www/src/components/analyse/EditIncomeCard.tsx
+++ b/apps/www/src/components/analyse/EditIncomeCard.tsx
@@ -7,19 +7,14 @@ import {
updateIncomeUnit,
} from "@/actions/update-analysis"
import { zodResolver } from "@hookform/resolvers/zod"
-import { MinusCircle, PlusCircle } from "lucide-react"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -27,14 +22,14 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
-import { Label } from "@dingify/ui/components/label"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
+import { Label } from "@propdock/ui/components/label"
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@dingify/ui/components/popover"
+} from "@propdock/ui/components/popover"
import {
Table,
TableBody,
@@ -43,13 +38,17 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
-import { Textarea } from "@dingify/ui/components/textarea"
+} from "@propdock/ui/components/table"
+import { Textarea } from "@propdock/ui/components/textarea"
import {
Tooltip,
TooltipContent,
TooltipTrigger,
-} from "@dingify/ui/components/tooltip"
+} from "@propdock/ui/components/tooltip"
+import { MinusCircle, PlusCircle } from "lucide-react"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
import { cn } from "@/lib/utils"
diff --git a/apps/www/src/components/analyse/EditKpiCard.tsx.tsx b/apps/www/src/components/analyse/EditKpiCard.tsx.tsx
index 3785d9d7..a4d18ed2 100644
--- a/apps/www/src/components/analyse/EditKpiCard.tsx.tsx
+++ b/apps/www/src/components/analyse/EditKpiCard.tsx.tsx
@@ -3,19 +3,14 @@
import { useState } from "react"
import { updateAnalysis } from "@/actions/update-analysis"
import { zodResolver } from "@hookform/resolvers/zod"
-import { Percent } from "lucide-react" // Add this import
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -23,8 +18,12 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
+import { Percent } from "lucide-react" // Add this import
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
const FormSchema = z.object({
kpi1: z
diff --git a/apps/www/src/components/analyse/EditMarketDataCard.tsx b/apps/www/src/components/analyse/EditMarketDataCard.tsx
index 3df108de..39b5f265 100644
--- a/apps/www/src/components/analyse/EditMarketDataCard.tsx
+++ b/apps/www/src/components/analyse/EditMarketDataCard.tsx
@@ -3,18 +3,14 @@
import { useState } from "react"
import { updateAnalysis } from "@/actions/update-analysis"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -22,9 +18,12 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
-import { Switch } from "@dingify/ui/components/switch"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
+import { Switch } from "@propdock/ui/components/switch"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
const FormSchema = z.object({
marketRentOffice: z
diff --git a/apps/www/src/components/analyse/EditOwnerCostsCard.tsx b/apps/www/src/components/analyse/EditOwnerCostsCard.tsx
index 9ba85c8d..d15eb7d5 100644
--- a/apps/www/src/components/analyse/EditOwnerCostsCard.tsx
+++ b/apps/www/src/components/analyse/EditOwnerCostsCard.tsx
@@ -3,18 +3,14 @@
import { useState } from "react"
import { updateAnalysis } from "@/actions/update-analysis"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -22,9 +18,12 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
-import { Switch } from "@dingify/ui/components/switch"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
+import { Switch } from "@propdock/ui/components/switch"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
const FormSchema = z.object({
ownerCostsMethod: z.boolean().default(false).optional(),
diff --git a/apps/www/src/components/analyse/EditROICard.tsx b/apps/www/src/components/analyse/EditROICard.tsx
index 1103f78b..e64628a9 100644
--- a/apps/www/src/components/analyse/EditROICard.tsx
+++ b/apps/www/src/components/analyse/EditROICard.tsx
@@ -3,19 +3,14 @@
import { useState } from "react"
import { updateAnalysis } from "@/actions/update-analysis"
import { zodResolver } from "@hookform/resolvers/zod"
-import { Percent } from "lucide-react"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -23,9 +18,13 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
-import { Switch } from "@dingify/ui/components/switch"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
+import { Switch } from "@propdock/ui/components/switch"
+import { Percent } from "lucide-react"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
const FormSchema = z.object({
useCalcROI: z.boolean().default(false).optional(),
diff --git a/apps/www/src/components/analyse/EditRentableAreaCard.tsx b/apps/www/src/components/analyse/EditRentableAreaCard.tsx
index 67c7ffde..2c20c147 100644
--- a/apps/www/src/components/analyse/EditRentableAreaCard.tsx
+++ b/apps/www/src/components/analyse/EditRentableAreaCard.tsx
@@ -3,19 +3,14 @@
import { useState } from "react"
import { updateAnalysis } from "@/actions/update-analysis"
import { zodResolver } from "@hookform/resolvers/zod"
-import { Percent } from "lucide-react"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -23,8 +18,12 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
+import { Percent } from "lucide-react"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
const FormSchema = z.object({
rentableArea: z
diff --git a/apps/www/src/components/analyse/EditVacancyCard.tsx b/apps/www/src/components/analyse/EditVacancyCard.tsx
index 295123ee..c808aac7 100644
--- a/apps/www/src/components/analyse/EditVacancyCard.tsx
+++ b/apps/www/src/components/analyse/EditVacancyCard.tsx
@@ -3,19 +3,14 @@
import { useState } from "react"
import { updateAnalysis } from "@/actions/update-analysis"
import { zodResolver } from "@hookform/resolvers/zod"
-import { Pencil, Trash2 } from "lucide-react"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Form,
FormControl,
@@ -23,15 +18,15 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
import {
Table,
TableBody,
@@ -39,7 +34,11 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
+import { Pencil, Trash2 } from "lucide-react"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
const FormSchema = z.object({
year: z.string().min(1, "År er påkrevd"),
diff --git a/apps/www/src/components/analyse/SensitivityAnalysisTable.tsx b/apps/www/src/components/analyse/SensitivityAnalysisTable.tsx
index 444cb76e..8f635cf7 100644
--- a/apps/www/src/components/analyse/SensitivityAnalysisTable.tsx
+++ b/apps/www/src/components/analyse/SensitivityAnalysisTable.tsx
@@ -4,7 +4,7 @@ import {
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Table,
TableBody,
@@ -12,7 +12,7 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
interface SensitivityAnalysisTableProps {
analysis: {
diff --git a/apps/www/src/components/buttons/AddAnalysisSheet.tsx b/apps/www/src/components/buttons/AddAnalysisSheet.tsx
index 16f4c346..74209b44 100644
--- a/apps/www/src/components/buttons/AddAnalysisSheet.tsx
+++ b/apps/www/src/components/buttons/AddAnalysisSheet.tsx
@@ -5,11 +5,7 @@ import { createAnalysis } from "@/actions/create-analyse"
import { getBuildings } from "@/actions/get-buildings" // Import this function
import { getProperties } from "@/actions/get-properties"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Form,
FormControl,
@@ -17,15 +13,15 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
import {
Sheet,
SheetContent,
@@ -34,7 +30,10 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet"
+} from "@propdock/ui/components/sheet"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
const AnalysisSchema = z.object({
name: z.string().min(1, "Navn er påkrevd"),
diff --git a/apps/www/src/components/buttons/AddApiKeyButton.tsx b/apps/www/src/components/buttons/AddApiKeyButton.tsx
index 34683bde..90fe4984 100644
--- a/apps/www/src/components/buttons/AddApiKeyButton.tsx
+++ b/apps/www/src/components/buttons/AddApiKeyButton.tsx
@@ -2,9 +2,7 @@
import { useEffect, useState } from "react"
import { createApiKey } from "@/actions/create-api-key"
-import { toast } from "sonner"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Dialog,
DialogContent,
@@ -13,14 +11,15 @@ import {
DialogHeader,
DialogTitle,
DialogTrigger,
-} from "@dingify/ui/components/dialog"
-import { Input } from "@dingify/ui/components/input"
-import { Label } from "@dingify/ui/components/label"
+} from "@propdock/ui/components/dialog"
+import { Input } from "@propdock/ui/components/input"
+import { Label } from "@propdock/ui/components/label"
import {
Tooltip,
TooltipContent,
TooltipTrigger,
-} from "@dingify/ui/components/tooltip"
+} from "@propdock/ui/components/tooltip"
+import { toast } from "sonner"
export function AddApiKeyButton() {
const [apiKey, setApiKey] = useState("")
diff --git a/apps/www/src/components/buttons/AddBuildingButton.tsx b/apps/www/src/components/buttons/AddBuildingButton.tsx
index 051fddba..fe0f4dac 100644
--- a/apps/www/src/components/buttons/AddBuildingButton.tsx
+++ b/apps/www/src/components/buttons/AddBuildingButton.tsx
@@ -1,13 +1,9 @@
-"use client";
+"use client"
-import { useState } from "react";
-import { createBuilding } from "@/actions/create-building";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { useForm } from "react-hook-form";
-import { toast } from "sonner";
-import { z } from "zod";
-
-import { Button } from "@dingify/ui/components/button";
+import { useState } from "react"
+import { createBuilding } from "@/actions/create-building"
+import { zodResolver } from "@hookform/resolvers/zod"
+import { Button } from "@propdock/ui/components/button"
import {
Dialog,
DialogContent,
@@ -16,7 +12,7 @@ import {
DialogHeader,
DialogTitle,
DialogTrigger,
-} from "@dingify/ui/components/dialog";
+} from "@propdock/ui/components/dialog"
import {
Form,
FormControl,
@@ -24,8 +20,11 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form";
-import { Input } from "@dingify/ui/components/input";
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define the validation schema
const BuildingSchema = z.object({
@@ -35,10 +34,10 @@ const BuildingSchema = z.object({
bnr: z.number().optional(),
snr: z.number().optional(),
fnr: z.number().optional(),
-});
+})
export function AddBuildingButton({ propertyId }) {
- const [isLoading, setIsLoading] = useState(false);
+ const [isLoading, setIsLoading] = useState(false)
const form = useForm({
resolver: zodResolver(BuildingSchema),
defaultValues: {
@@ -49,28 +48,28 @@ export function AddBuildingButton({ propertyId }) {
snr: undefined,
fnr: undefined,
},
- });
+ })
const onSubmit = async (data) => {
- setIsLoading(true);
+ setIsLoading(true)
try {
- const result = await createBuilding(propertyId, data);
+ const result = await createBuilding(propertyId, data)
if (!result.success) {
- throw new Error(result.error || "Failed to save building.");
+ throw new Error(result.error || "Failed to save building.")
}
- toast.success(`Byggningen "${data.name}" ble lagret.`);
- form.reset();
+ toast.success(`Byggningen "${data.name}" ble lagret.`)
+ form.reset()
// Optionally, refresh the page or update the state to show the new building
} catch (error) {
- toast.error(error.message);
- console.error(error);
+ toast.error(error.message)
+ console.error(error)
} finally {
- setIsLoading(false);
+ setIsLoading(false)
}
- };
+ }
return (
- );
+ )
}
diff --git a/apps/www/src/components/buttons/AddBuildingSheet.tsx b/apps/www/src/components/buttons/AddBuildingSheet.tsx
index db789647..ea900b89 100644
--- a/apps/www/src/components/buttons/AddBuildingSheet.tsx
+++ b/apps/www/src/components/buttons/AddBuildingSheet.tsx
@@ -3,12 +3,7 @@
import { useEffect, useRef, useState } from "react"
import { createBuilding } from "@/actions/create-building"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import fetchProperties from "src/lib/address-search"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
DropdownMenu,
DropdownMenuContent,
@@ -16,7 +11,7 @@ import {
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu"
+} from "@propdock/ui/components/dropdown-menu"
import {
Form,
FormControl,
@@ -24,8 +19,8 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Sheet,
SheetContent,
@@ -34,7 +29,11 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet"
+} from "@propdock/ui/components/sheet"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import fetchProperties from "src/lib/address-search"
+import { z } from "zod"
// Define the validation schema
const BuildingSchema = z.object({
diff --git a/apps/www/src/components/buttons/AddChannelButton.tsx b/apps/www/src/components/buttons/AddChannelButton.tsx
index 57982e4f..b72db4d4 100644
--- a/apps/www/src/components/buttons/AddChannelButton.tsx
+++ b/apps/www/src/components/buttons/AddChannelButton.tsx
@@ -1,11 +1,9 @@
-"use client";
+"use client"
-import { useState } from "react";
-import { useRouter } from "next/navigation";
-import { createChannel } from "@/actions/Dingify/create-channel";
-import { toast } from "sonner";
-
-import { Button } from "@dingify/ui/components/button";
+import { useState } from "react"
+import { useRouter } from "next/navigation"
+import { createChannel } from "@/actions/Dingify/create-channel"
+import { Button } from "@propdock/ui/components/button"
import {
Dialog,
DialogContent,
@@ -14,37 +12,38 @@ import {
DialogHeader,
DialogTitle,
DialogTrigger,
-} from "@dingify/ui/components/dialog";
-import { Input } from "@dingify/ui/components/input";
-import { Label } from "@dingify/ui/components/label";
+} from "@propdock/ui/components/dialog"
+import { Input } from "@propdock/ui/components/input"
+import { Label } from "@propdock/ui/components/label"
+import { toast } from "sonner"
export function AddChannelButton() {
- const [channelName, setChannelName] = useState("");
- const [isLoading, setIsLoading] = useState(false);
- const router = useRouter();
+ const [channelName, setChannelName] = useState("")
+ const [isLoading, setIsLoading] = useState(false)
+ const router = useRouter()
const handleSubmit = async (event) => {
- event.preventDefault();
- setIsLoading(true);
+ event.preventDefault()
+ setIsLoading(true)
try {
- const result = await createChannel(channelName);
+ const result = await createChannel(channelName)
if (!result.success) {
- throw new Error(result.error || "Failed to add channel");
+ throw new Error(result.error || "Failed to add channel")
}
- toast.success(`Channel "${channelName}" created successfully.`);
+ toast.success(`Channel "${channelName}" created successfully.`)
// Optionally, you can refresh the page or navigate to the new channel
- router.push(`/dashboard/channels/${result.channel?.id}`);
+ router.push(`/dashboard/channels/${result.channel?.id}`)
} catch (error) {
- toast.error(error.message);
- console.error(error);
+ toast.error(error.message)
+ console.error(error)
} finally {
- setIsLoading(false);
+ setIsLoading(false)
}
- };
+ }
return (
- );
+ )
}
diff --git a/apps/www/src/components/buttons/AddFloorSheet.tsx b/apps/www/src/components/buttons/AddFloorSheet.tsx
index f629727f..3573160f 100644
--- a/apps/www/src/components/buttons/AddFloorSheet.tsx
+++ b/apps/www/src/components/buttons/AddFloorSheet.tsx
@@ -3,14 +3,9 @@
import { useEffect, useState } from "react"
import { createFloor } from "@/actions/create-floor"
import { zodResolver } from "@hookform/resolvers/zod"
-import { Loader2Icon } from "lucide-react"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
-import { Card, CardContent } from "@dingify/ui/components/card"
-import { Checkbox } from "@dingify/ui/components/checkbox"
+import { Button } from "@propdock/ui/components/button"
+import { Card, CardContent } from "@propdock/ui/components/card"
+import { Checkbox } from "@propdock/ui/components/checkbox"
import {
Form,
FormControl,
@@ -19,10 +14,10 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
-import { Label } from "@dingify/ui/components/label"
-import { Separator } from "@dingify/ui/components/separator"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
+import { Label } from "@propdock/ui/components/label"
+import { Separator } from "@propdock/ui/components/separator"
import {
Sheet,
SheetContent,
@@ -31,7 +26,11 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet"
+} from "@propdock/ui/components/sheet"
+import { Loader2Icon } from "lucide-react"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
import { PlusIcon } from "../shared/icons"
diff --git a/apps/www/src/components/buttons/AddOfficeSpaceSheet.tsx b/apps/www/src/components/buttons/AddOfficeSpaceSheet.tsx
index 2483dd8f..b2e17288 100644
--- a/apps/www/src/components/buttons/AddOfficeSpaceSheet.tsx
+++ b/apps/www/src/components/buttons/AddOfficeSpaceSheet.tsx
@@ -1,14 +1,10 @@
-"use client";
+"use client"
-import { useState } from "react";
-import { createOfficeSpace } from "@/actions/create-office-space";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { useForm } from "react-hook-form";
-import { toast } from "sonner";
-import { z } from "zod";
-
-import { Button } from "@dingify/ui/components/button";
-import { Checkbox } from "@dingify/ui/components/checkbox";
+import { useState } from "react"
+import { createOfficeSpace } from "@/actions/create-office-space"
+import { zodResolver } from "@hookform/resolvers/zod"
+import { Button } from "@propdock/ui/components/button"
+import { Checkbox } from "@propdock/ui/components/checkbox"
import {
Form,
FormControl,
@@ -16,8 +12,8 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form";
-import { Input } from "@dingify/ui/components/input";
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Sheet,
SheetContent,
@@ -26,17 +22,20 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet";
+} from "@propdock/ui/components/sheet"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define the validation schema
const OfficeSpaceSchema = z.object({
name: z.string().min(1, "Office space name is required"),
sizeKvm: z.number().min(1, "Size in KVM is required"),
isRented: z.boolean(),
-});
+})
export function AddOfficeSpaceSheet({ floorId }) {
- const [isLoading, setIsLoading] = useState(false);
+ const [isLoading, setIsLoading] = useState(false)
const form = useForm({
resolver: zodResolver(OfficeSpaceSchema),
defaultValues: {
@@ -44,34 +43,34 @@ export function AddOfficeSpaceSheet({ floorId }) {
sizeKvm: "",
isRented: false,
},
- });
+ })
const onSubmit = async (data) => {
- setIsLoading(true);
+ setIsLoading(true)
try {
// Convert sizeKvm to a number
const formData = {
...data,
sizeKvm: Number(data.sizeKvm),
- };
+ }
- const result = await createOfficeSpace(floorId, formData);
+ const result = await createOfficeSpace(floorId, formData)
if (!result.success) {
- throw new Error(result.error || "Failed to save office space.");
+ throw new Error(result.error || "Failed to save office space.")
}
- toast.success(`Office space "${formData.name}" was saved.`);
- form.reset();
+ toast.success(`Office space "${formData.name}" was saved.`)
+ form.reset()
// Optionally, refresh the page or update the state to show the new office space
} catch (error) {
- toast.error(error.message);
- console.error(error);
+ toast.error(error.message)
+ console.error(error)
} finally {
- setIsLoading(false);
+ setIsLoading(false)
}
- };
+ }
return (
@@ -147,5 +146,5 @@ export function AddOfficeSpaceSheet({ floorId }) {
- );
+ )
}
diff --git a/apps/www/src/components/buttons/AddProjectButton.tsx b/apps/www/src/components/buttons/AddProjectButton.tsx
index 0d79ebc9..500bcba4 100644
--- a/apps/www/src/components/buttons/AddProjectButton.tsx
+++ b/apps/www/src/components/buttons/AddProjectButton.tsx
@@ -1,11 +1,9 @@
-"use client";
+"use client"
-import { useState } from "react";
-import { useRouter } from "next/navigation";
-import { createProjectAndChannel } from "@/actions/Dingify/create-project-and-channel";
-import { toast } from "sonner";
-
-import { Button } from "@dingify/ui/components/button";
+import { useState } from "react"
+import { useRouter } from "next/navigation"
+import { createProjectAndChannel } from "@/actions/Dingify/create-project-and-channel"
+import { Button } from "@propdock/ui/components/button"
import {
Dialog,
DialogContent,
@@ -14,36 +12,37 @@ import {
DialogHeader,
DialogTitle,
DialogTrigger,
-} from "@dingify/ui/components/dialog";
-import { Input } from "@dingify/ui/components/input";
-import { Label } from "@dingify/ui/components/label";
+} from "@propdock/ui/components/dialog"
+import { Input } from "@propdock/ui/components/input"
+import { Label } from "@propdock/ui/components/label"
+import { toast } from "sonner"
export function AddProjectButton() {
- const [projectName, setProjectName] = useState("");
- const [isLoading, setIsLoading] = useState(false);
- const router = useRouter();
+ const [projectName, setProjectName] = useState("")
+ const [isLoading, setIsLoading] = useState(false)
+ const router = useRouter()
const handleSubmit = async (event) => {
- event.preventDefault();
- setIsLoading(true);
+ event.preventDefault()
+ setIsLoading(true)
try {
- const result = await createProjectAndChannel(projectName);
+ const result = await createProjectAndChannel(projectName)
if (!result.success) {
- throw new Error(result.error || "Failed to add project");
+ throw new Error(result.error || "Failed to add project")
}
- toast.success(`Project "${projectName}" created successfully.`);
+ toast.success(`Project "${projectName}" created successfully.`)
// router.push(`/project/${result.project?.id}`);
} catch (error) {
- toast.error(error.message);
- console.error(error);
+ toast.error(error.message)
+ console.error(error)
} finally {
- setIsLoading(false);
+ setIsLoading(false)
}
- };
+ }
return (
- );
+ )
}
diff --git a/apps/www/src/components/buttons/AddPropertyButton.tsx b/apps/www/src/components/buttons/AddPropertyButton.tsx
index 063ac882..2b28627b 100644
--- a/apps/www/src/components/buttons/AddPropertyButton.tsx
+++ b/apps/www/src/components/buttons/AddPropertyButton.tsx
@@ -4,11 +4,7 @@ import { useState } from "react"
import { useRouter } from "next/navigation"
import { createProperty } from "@/actions/create-property"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Form,
FormControl,
@@ -16,15 +12,15 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
import {
Sheet,
SheetContent,
@@ -33,7 +29,10 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet"
+} from "@propdock/ui/components/sheet"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define the validation schema
const PropertySchema = z.object({
diff --git a/apps/www/src/components/buttons/AddTenantDropdownButton.tsx b/apps/www/src/components/buttons/AddTenantDropdownButton.tsx
index f39d55b1..53a21053 100644
--- a/apps/www/src/components/buttons/AddTenantDropdownButton.tsx
+++ b/apps/www/src/components/buttons/AddTenantDropdownButton.tsx
@@ -1,4 +1,4 @@
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
import {
DropdownMenu,
DropdownMenuContent,
@@ -6,7 +6,7 @@ import {
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu";
+} from "@propdock/ui/components/dropdown-menu"
export default function AddTenantDropdownButton() {
return (
@@ -26,7 +26,7 @@ export default function AddTenantDropdownButton() {
Option 4
- );
+ )
}
function ChevronDownIcon(props) {
@@ -45,5 +45,5 @@ function ChevronDownIcon(props) {
>
- );
+ )
}
diff --git a/apps/www/src/components/buttons/AddTenantSheet copy.tsx b/apps/www/src/components/buttons/AddTenantSheet copy.tsx
index 3ff69eab..9cb5b118 100644
--- a/apps/www/src/components/buttons/AddTenantSheet copy.tsx
+++ b/apps/www/src/components/buttons/AddTenantSheet copy.tsx
@@ -4,11 +4,7 @@ import { useEffect, useState } from "react"
import { createTenant } from "@/actions/create-tenant"
import { getProperties } from "@/actions/get-properties"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Form,
FormControl,
@@ -16,15 +12,15 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
import {
Sheet,
SheetContent,
@@ -33,7 +29,10 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet"
+} from "@propdock/ui/components/sheet"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
const TenantSchema = z.object({
name: z.string().min(1, "Navn er påkrevd"),
diff --git a/apps/www/src/components/buttons/AddWorkspaceButton.tsx b/apps/www/src/components/buttons/AddWorkspaceButton.tsx
index 80b5fee6..47b1ae47 100644
--- a/apps/www/src/components/buttons/AddWorkspaceButton.tsx
+++ b/apps/www/src/components/buttons/AddWorkspaceButton.tsx
@@ -1,11 +1,9 @@
-"use client";
+"use client"
-import { useState } from "react";
-import { useRouter } from "next/navigation";
-import { createWorkspace } from "@/actions/create-workspace";
-import { toast } from "sonner";
-
-import { Button } from "@dingify/ui/components/button";
+import { useState } from "react"
+import { useRouter } from "next/navigation"
+import { createWorkspace } from "@/actions/create-workspace"
+import { Button } from "@propdock/ui/components/button"
import {
Dialog,
DialogContent,
@@ -14,34 +12,35 @@ import {
DialogHeader,
DialogTitle,
DialogTrigger,
-} from "@dingify/ui/components/dialog";
-import { Input } from "@dingify/ui/components/input";
-import { Label } from "@dingify/ui/components/label";
+} from "@propdock/ui/components/dialog"
+import { Input } from "@propdock/ui/components/input"
+import { Label } from "@propdock/ui/components/label"
+import { toast } from "sonner"
export function AddWorkspaceButton() {
- const [workspaceName, setWorkspaceName] = useState("");
- const [isLoading, setIsLoading] = useState(false);
- const router = useRouter();
+ const [workspaceName, setWorkspaceName] = useState("")
+ const [isLoading, setIsLoading] = useState(false)
+ const router = useRouter()
const handleSubmit = async (event) => {
- event.preventDefault();
- setIsLoading(true);
+ event.preventDefault()
+ setIsLoading(true)
try {
- const result = await createWorkspace(workspaceName);
+ const result = await createWorkspace(workspaceName)
if (!result.success) {
- throw new Error(result.error || "Feil ved oppretting av workspace.");
+ throw new Error(result.error || "Feil ved oppretting av workspace.")
}
- toast.success(`Workspace "${workspaceName}" ble lagt til.`);
+ toast.success(`Workspace "${workspaceName}" ble lagt til.`)
} catch (error) {
- toast.error(error.message);
- console.error(error);
+ toast.error(error.message)
+ console.error(error)
} finally {
- setIsLoading(false);
+ setIsLoading(false)
}
- };
+ }
return (
- );
+ )
}
diff --git a/apps/www/src/components/buttons/CreatEventButton.tsx b/apps/www/src/components/buttons/CreatEventButton.tsx
index a6a78071..1250d649 100644
--- a/apps/www/src/components/buttons/CreatEventButton.tsx
+++ b/apps/www/src/components/buttons/CreatEventButton.tsx
@@ -1,16 +1,9 @@
-"use client";
-
-import { useEffect, useState } from "react";
-import { createEvent } from "@/actions/Dingify/create-event"; // Import the createEvent action
-import { getUserData } from "@/actions/Dingify/get-user-details";
-import { CopyIcon } from "@radix-ui/react-icons";
-import { CopyToClipboard } from "react-copy-to-clipboard";
-import { Light as SyntaxHighlighter } from "react-syntax-highlighter";
-import json from "react-syntax-highlighter/dist/esm/languages/hljs/json";
-import { dracula } from "react-syntax-highlighter/dist/esm/styles/hljs";
-import { toast } from "sonner"; // Import toast from sonner
-
-import { Button } from "@dingify/ui/components/button";
+"use client"
+
+import { useEffect, useState } from "react"
+import { createEvent } from "@/actions/Dingify/create-event" // Import the createEvent action
+import { getUserData } from "@/actions/Dingify/get-user-details"
+import { Button } from "@propdock/ui/components/button"
import {
Dialog,
DialogContent,
@@ -19,62 +12,68 @@ import {
DialogHeader,
DialogTitle,
DialogTrigger,
-} from "@dingify/ui/components/dialog";
+} from "@propdock/ui/components/dialog"
+import { CopyIcon } from "@radix-ui/react-icons"
+import { CopyToClipboard } from "react-copy-to-clipboard"
+import { Light as SyntaxHighlighter } from "react-syntax-highlighter"
+import json from "react-syntax-highlighter/dist/esm/languages/hljs/json"
+import { dracula } from "react-syntax-highlighter/dist/esm/styles/hljs"
+import { toast } from "sonner" // Import toast from sonner
-import { Confetti } from "../ui/confetti";
+import { Confetti } from "../ui/confetti"
-SyntaxHighlighter.registerLanguage("json", json);
+SyntaxHighlighter.registerLanguage("json", json)
const handleClick = () => {
- const duration = 2.5 * 1000;
- const animationEnd = Date.now() + duration;
- const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: 0 };
+ const duration = 2.5 * 1000
+ const animationEnd = Date.now() + duration
+ const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: 0 }
- const randomInRange = (min, max) => Math.random() * (max - min) + min;
+ const randomInRange = (min, max) => Math.random() * (max - min) + min
const interval = window.setInterval(() => {
- const timeLeft = animationEnd - Date.now();
+ const timeLeft = animationEnd - Date.now()
if (timeLeft <= 0) {
- return clearInterval(interval);
+ return clearInterval(interval)
}
- const particleCount = 50 * (timeLeft / duration);
+ const particleCount = 50 * (timeLeft / duration)
Confetti({
...defaults,
particleCount,
origin: { x: randomInRange(0.1, 0.3), y: Math.random() - 0.2 },
- });
+ })
Confetti({
...defaults,
particleCount,
origin: { x: randomInRange(0.7, 0.9), y: Math.random() - 0.2 },
- });
- }, 250);
-};
+ })
+ }, 250)
+}
export function CreateEventButton() {
- const [isLoading, setIsLoading] = useState(false);
- const [copied, setCopied] = useState(false);
- const [isOpen, setIsOpen] = useState(false);
- const [apiKey, setApiKey] = useState("");
+ const [isLoading, setIsLoading] = useState(false)
+ const [copied, setCopied] = useState(false)
+ const [isOpen, setIsOpen] = useState(false)
+ const [apiKey, setApiKey] = useState("")
useEffect(() => {
async function fetchUserData() {
try {
- const data = await getUserData();
- setApiKey(data.apiKey as string);
+ const data = await getUserData()
+ setApiKey(data.apiKey as string)
} catch (error) {
- console.error("Failed to fetch user data", error);
+ console.error("Failed to fetch user data", error)
}
}
- fetchUserData();
- }, []);
+ fetchUserData()
+ }, [])
const handleButtonClick = async (event) => {
- event.preventDefault();
- setIsLoading(true);
+ event.preventDefault()
+ setIsLoading(true)
// Hardcoded event data for now; modify this to collect data from a form if needed
const eventData = {
@@ -83,23 +82,23 @@ export function CreateEventButton() {
user_id: "user-123",
icon: "🤩",
notify: true,
- };
+ }
try {
- await createEvent(eventData); // Call the createEvent action with event data
- handleClick();
- setIsOpen(false); // Close the dialog after the event is created
+ await createEvent(eventData) // Call the createEvent action with event data
+ handleClick()
+ setIsOpen(false) // Close the dialog after the event is created
} catch (error) {
- console.error("Error creating event", error);
+ console.error("Error creating event", error)
} finally {
- setIsLoading(false);
+ setIsLoading(false)
}
- };
+ }
const handleCopy = () => {
- setCopied(true);
- toast.success("cURL command copied to clipboard.");
- };
+ setCopied(true)
+ toast.success("cURL command copied to clipboard.")
+ }
const curlCommand = `
curl -X POST https://api.dingify.workers.dev/api/events \\
@@ -116,7 +115,7 @@ export function CreateEventButton() {
"cycle": "monthly"
}
}'
- `;
+ `
return (
<>
@@ -160,5 +159,5 @@ export function CreateEventButton() {
>
- );
+ )
}
diff --git a/apps/www/src/components/buttons/DocsButton.tsx b/apps/www/src/components/buttons/DocsButton.tsx
index 91dca83e..542947e2 100644
--- a/apps/www/src/components/buttons/DocsButton.tsx
+++ b/apps/www/src/components/buttons/DocsButton.tsx
@@ -1,8 +1,7 @@
-import Link from "next/link";
+import Link from "next/link"
+import { buttonVariants } from "@propdock/ui/components/button"
-import { buttonVariants } from "@dingify/ui/components/button";
-
-import { cn } from "@/lib/utils";
+import { cn } from "@/lib/utils"
export function DocsButton() {
return (
@@ -12,5 +11,5 @@ export function DocsButton() {
>
Explore Docs
- );
+ )
}
diff --git a/apps/www/src/components/buttons/EditContactPersonSheet.tsx b/apps/www/src/components/buttons/EditContactPersonSheet.tsx
index 85e0babb..2b0765ec 100644
--- a/apps/www/src/components/buttons/EditContactPersonSheet.tsx
+++ b/apps/www/src/components/buttons/EditContactPersonSheet.tsx
@@ -4,11 +4,7 @@ import { useState } from "react"
import { deleteContactPerson } from "@/actions/delete-contact-person"
import { updateContactPerson } from "@/actions/update-contact-person"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Form,
FormControl,
@@ -17,8 +13,8 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Sheet,
SheetClose,
@@ -28,7 +24,10 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet"
+} from "@propdock/ui/components/sheet"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define the validation schema
const ContactPersonSchema = z.object({
diff --git a/apps/www/src/components/buttons/EditContractDetails.tsx b/apps/www/src/components/buttons/EditContractDetails.tsx
index bbaaef74..940619f3 100644
--- a/apps/www/src/components/buttons/EditContractDetails.tsx
+++ b/apps/www/src/components/buttons/EditContractDetails.tsx
@@ -3,15 +3,8 @@
import { useState } from "react"
import { updateContractDetails } from "@/actions/update-contract-details"
import { zodResolver } from "@hookform/resolvers/zod"
-import { CalendarIcon } from "@radix-ui/react-icons"
-import { format, parseISO } from "date-fns"
-import { nb } from "date-fns/locale"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
-import { Calendar } from "@dingify/ui/components/calendar"
+import { Button } from "@propdock/ui/components/button"
+import { Calendar } from "@propdock/ui/components/calendar"
import {
Form,
FormControl,
@@ -19,20 +12,20 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@dingify/ui/components/popover"
+} from "@propdock/ui/components/popover"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
import {
Sheet,
SheetClose,
@@ -42,7 +35,13 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet"
+} from "@propdock/ui/components/sheet"
+import { CalendarIcon } from "@radix-ui/react-icons"
+import { format, parseISO } from "date-fns"
+import { nb } from "date-fns/locale"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
import { currencies } from "@/lib/currencies"
import { cn } from "@/lib/utils"
diff --git a/apps/www/src/components/buttons/EditFloorDetailsSheet.tsx b/apps/www/src/components/buttons/EditFloorDetailsSheet.tsx
index f43dca31..85d1af05 100644
--- a/apps/www/src/components/buttons/EditFloorDetailsSheet.tsx
+++ b/apps/www/src/components/buttons/EditFloorDetailsSheet.tsx
@@ -1,14 +1,10 @@
-"use client";
+"use client"
-import { useState } from "react";
-import { useParams } from "next/navigation";
-import { updateFloorDetails } from "@/actions/update-floor-details";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { useForm } from "react-hook-form";
-import { toast } from "sonner";
-import { z } from "zod";
-
-import { Button } from "@dingify/ui/components/button";
+import { useState } from "react"
+import { useParams } from "next/navigation"
+import { updateFloorDetails } from "@/actions/update-floor-details"
+import { zodResolver } from "@hookform/resolvers/zod"
+import { Button } from "@propdock/ui/components/button"
import {
Form,
FormControl,
@@ -16,8 +12,8 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form";
-import { Input } from "@dingify/ui/components/input";
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Sheet,
SheetContent,
@@ -26,56 +22,59 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet";
+} from "@propdock/ui/components/sheet"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define the validation schema
const EditFloorDetailsSchema = z.object({
number: z.number().min(1, "Floor number is required"),
maxTotalKvm: z.number().min(1, "Total KVM is required"),
-});
+})
export function EditFloorDetailsSheet({
floorId,
currentNumber,
currentMaxTotalKvm,
}) {
- const [isLoading, setIsLoading] = useState(false);
+ const [isLoading, setIsLoading] = useState(false)
const form = useForm({
resolver: zodResolver(EditFloorDetailsSchema),
defaultValues: {
number: currentNumber,
maxTotalKvm: currentMaxTotalKvm,
},
- });
- const params = useParams();
+ })
+ const params = useParams()
const propertyId = Array.isArray(params.propertyId)
? params.propertyId[0]
- : params.propertyId;
+ : params.propertyId
const buildingId = Array.isArray(params.buildingId)
? params.buildingId[0]
- : params.buildingId;
- const currentPath = `/property/${propertyId}/building/${buildingId}`;
+ : params.buildingId
+ const currentPath = `/property/${propertyId}/building/${buildingId}`
const onSubmit = async (data) => {
- setIsLoading(true);
+ setIsLoading(true)
try {
- const result = await updateFloorDetails(floorId, data, currentPath);
+ const result = await updateFloorDetails(floorId, data, currentPath)
if (!result.success) {
- throw new Error(result.error || "Failed to update floor details.");
+ throw new Error(result.error || "Failed to update floor details.")
}
- toast.success(`Floor details updated.`);
- form.reset();
+ toast.success(`Floor details updated.`)
+ form.reset()
// Optionally, refresh the page or update the state to show the updated floor details
} catch (error) {
- toast.error(error.message);
- console.error(error);
+ toast.error(error.message)
+ console.error(error)
} finally {
- setIsLoading(false);
+ setIsLoading(false)
}
- };
+ }
return (
@@ -138,5 +137,5 @@ export function EditFloorDetailsSheet({
- );
+ )
}
diff --git a/apps/www/src/components/buttons/EditOfficeSpaceSheet.tsx b/apps/www/src/components/buttons/EditOfficeSpaceSheet.tsx
index 32542416..1d7da8ff 100644
--- a/apps/www/src/components/buttons/EditOfficeSpaceSheet.tsx
+++ b/apps/www/src/components/buttons/EditOfficeSpaceSheet.tsx
@@ -3,12 +3,8 @@
import { useState } from "react"
import { updateOfficeSpace } from "@/actions/update-office-space"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
-import { Checkbox } from "@dingify/ui/components/checkbox"
+import { Button } from "@propdock/ui/components/button"
+import { Checkbox } from "@propdock/ui/components/checkbox"
import {
Form,
FormControl,
@@ -16,8 +12,8 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Sheet,
SheetContent,
@@ -26,7 +22,10 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet"
+} from "@propdock/ui/components/sheet"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define the validation schema
const EditOfficeSpaceSchema = z.object({
diff --git a/apps/www/src/components/buttons/EditTenantSheet.tsx b/apps/www/src/components/buttons/EditTenantSheet.tsx
index 7f651b4f..4a7b7e87 100644
--- a/apps/www/src/components/buttons/EditTenantSheet.tsx
+++ b/apps/www/src/components/buttons/EditTenantSheet.tsx
@@ -3,11 +3,7 @@ import { getBuildings } from "@/actions/get-buildings"
import { getProperties } from "@/actions/get-properties"
import { updateTenant } from "@/actions/update-tenant"
import { zodResolver } from "@hookform/resolvers/zod"
-import { useForm } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Form,
FormControl,
@@ -15,15 +11,15 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select"
+} from "@propdock/ui/components/select"
import {
Sheet,
SheetContent,
@@ -32,7 +28,10 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet"
+} from "@propdock/ui/components/sheet"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
const TenantSchema = z.object({
name: z.string().min(1, "Navn er påkrevd"),
diff --git a/apps/www/src/components/buttons/GenerateDescriptionButton2.tsx b/apps/www/src/components/buttons/GenerateDescriptionButton2.tsx
index c1b1732e..debfd52e 100644
--- a/apps/www/src/components/buttons/GenerateDescriptionButton2.tsx
+++ b/apps/www/src/components/buttons/GenerateDescriptionButton2.tsx
@@ -1,40 +1,39 @@
-import { useState } from "react";
-import { generateDescription } from "@/actions/Dingify/generate-description";
-import { updatePropertyDescription } from "@/actions/Dingify/update-property-description";
-import { updatePropertyStatus } from "@/actions/Dingify/update-property-status";
-import { Loader2 as Spinner } from "lucide-react";
-
-import { Button } from "@dingify/ui/components/button";
+import { useState } from "react"
+import { generateDescription } from "@/actions/Dingify/generate-description"
+import { updatePropertyDescription } from "@/actions/Dingify/update-property-description"
+import { updatePropertyStatus } from "@/actions/Dingify/update-property-status"
+import { Button } from "@propdock/ui/components/button"
+import { Loader2 as Spinner } from "lucide-react"
const GenerateDescriptionButton2 = ({ propertyId, onDescriptionGenerated }) => {
- const [isLoading, setIsLoading] = useState(false);
+ const [isLoading, setIsLoading] = useState(false)
async function handleGenerateDescription() {
- console.log("Generating description..."); // Log when the process starts
- setIsLoading(true);
+ console.log("Generating description...") // Log when the process starts
+ setIsLoading(true)
try {
- const description = await generateDescription(propertyId);
- console.log("Generated description:", description);
- onDescriptionGenerated(description);
+ const description = await generateDescription(propertyId)
+ console.log("Generated description:", description)
+ onDescriptionGenerated(description)
// Update the property description
const updateproperty = await updatePropertyDescription(
propertyId,
description,
- );
+ )
// If description update is successful, update the status to DONE
if (updateproperty.success) {
const statusUpdateResult = await updatePropertyStatus(
propertyId,
"DONE",
- );
- console.log("Status updated to DONE:", statusUpdateResult);
+ )
+ console.log("Status updated to DONE:", statusUpdateResult)
}
} catch (error) {
- console.error("Error generating description:", error);
+ console.error("Error generating description:", error)
}
- setIsLoading(false);
+ setIsLoading(false)
}
return (
@@ -47,7 +46,7 @@ const GenerateDescriptionButton2 = ({ propertyId, onDescriptionGenerated }) => {
"Generate Description"
)}
- );
-};
+ )
+}
-export default GenerateDescriptionButton2;
+export default GenerateDescriptionButton2
diff --git a/apps/www/src/components/buttons/GenerateDescriptionsButton.tsx b/apps/www/src/components/buttons/GenerateDescriptionsButton.tsx
index de20d176..1f72865c 100644
--- a/apps/www/src/components/buttons/GenerateDescriptionsButton.tsx
+++ b/apps/www/src/components/buttons/GenerateDescriptionsButton.tsx
@@ -1,27 +1,26 @@
-"use client";
+"use client"
-import React from "react";
-import { generateDescription } from "@/actions/Dingify/generate-description";
-
-import { Button } from "@dingify/ui/components/button";
+import React from "react"
+import { generateDescription } from "@/actions/Dingify/generate-description"
+import { Button } from "@propdock/ui/components/button"
const GenerateDescriptionButton = ({ propertyId }) => {
async function handleGenerateDescription() {
try {
// Replace this with the actual API call to your server function
- const description = await generateDescription(propertyId);
- console.log("Generated Property Description:", description);
+ const description = await generateDescription(propertyId)
+ console.log("Generated Property Description:", description)
- const descriptionObject = JSON.parse(description);
- console.log("Generated Property Description:", descriptionObject);
+ const descriptionObject = JSON.parse(description)
+ console.log("Generated Property Description:", descriptionObject)
} catch (error) {
- console.error("Error generating description:", error);
+ console.error("Error generating description:", error)
}
}
return (
- );
-};
+ )
+}
-export default GenerateDescriptionButton;
+export default GenerateDescriptionButton
diff --git a/apps/www/src/components/buttons/GetStartedButton.tsx b/apps/www/src/components/buttons/GetStartedButton.tsx
index 35677354..04a74914 100644
--- a/apps/www/src/components/buttons/GetStartedButton.tsx
+++ b/apps/www/src/components/buttons/GetStartedButton.tsx
@@ -1,27 +1,26 @@
-"use client";
+"use client"
-import { useRouter } from "next/navigation";
-import { ArrowRightIcon } from "@radix-ui/react-icons";
-import { useSession } from "next-auth/react";
+import { useRouter } from "next/navigation"
+import { Button, buttonVariants } from "@propdock/ui/components/button"
+import { ArrowRightIcon } from "@radix-ui/react-icons"
+import { useSession } from "next-auth/react"
-import { Button, buttonVariants } from "@dingify/ui/components/button";
-
-import { cn } from "@/lib/utils";
-import { useSigninModal } from "@/hooks/use-signin-modal";
+import { cn } from "@/lib/utils"
+import { useSigninModal } from "@/hooks/use-signin-modal"
export function GetStartedButton() {
- const signInModal = useSigninModal();
- const { data: session } = useSession();
- const router = useRouter();
+ const signInModal = useSigninModal()
+ const { data: session } = useSession()
+ const router = useRouter()
const handleClick = () => {
if (!session) {
- signInModal.onOpen();
- return;
+ signInModal.onOpen()
+ return
}
- router.push("/dashboard");
- };
+ router.push("/dashboard")
+ }
return (
- );
+ )
}
diff --git a/apps/www/src/components/buttons/LanguageButton.tsx b/apps/www/src/components/buttons/LanguageButton.tsx
index 0bb075db..dc7095ba 100644
--- a/apps/www/src/components/buttons/LanguageButton.tsx
+++ b/apps/www/src/components/buttons/LanguageButton.tsx
@@ -1,13 +1,13 @@
-"use client";
+"use client"
-import { useLanguageModal } from "@/hooks/use-language-modal";
-import { useSigninModal } from "@/hooks/use-signin-modal";
-import { cn } from "@/lib/utils";
+import { Button, buttonVariants } from "@propdock/ui/components/button"
-import { Button, buttonVariants } from "@dingify/ui/components/button";
+import { cn } from "@/lib/utils"
+import { useLanguageModal } from "@/hooks/use-language-modal"
+import { useSigninModal } from "@/hooks/use-signin-modal"
export function LanugageButton({ userId }) {
- const signInModal = useLanguageModal();
+ const signInModal = useLanguageModal()
return (
- );
+ )
}
diff --git a/apps/www/src/components/buttons/SeeTenantsComboBox.tsx b/apps/www/src/components/buttons/SeeTenantsComboBox.tsx
index 5c1fa6e2..27f42593 100644
--- a/apps/www/src/components/buttons/SeeTenantsComboBox.tsx
+++ b/apps/www/src/components/buttons/SeeTenantsComboBox.tsx
@@ -1,12 +1,9 @@
-"use client";
+"use client"
-import * as React from "react";
-import { assignTenantToOfficeSpace } from "@/actions/create-tenant-to-office-space";
-import { getTenantsComboBox } from "@/actions/get-tenants-combo-box";
-import { CaretSortIcon, CheckIcon } from "@radix-ui/react-icons";
-import { toast } from "sonner";
-
-import { Button } from "@dingify/ui/components/button";
+import * as React from "react"
+import { assignTenantToOfficeSpace } from "@/actions/create-tenant-to-office-space"
+import { getTenantsComboBox } from "@/actions/get-tenants-combo-box"
+import { Button } from "@propdock/ui/components/button"
import {
Command,
CommandEmpty,
@@ -14,56 +11,58 @@ import {
CommandInput,
CommandItem,
CommandList,
-} from "@dingify/ui/components/command";
+} from "@propdock/ui/components/command"
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@dingify/ui/components/popover";
+} from "@propdock/ui/components/popover"
+import { CaretSortIcon, CheckIcon } from "@radix-ui/react-icons"
+import { toast } from "sonner"
-import { cn } from "@/lib/utils";
+import { cn } from "@/lib/utils"
interface Tenant {
- id: number;
- name: string;
- orgnr: number | null;
- numEmployees: number;
- building: { name: string };
- floor: { number: number } | null;
- officeSpace: { name: string } | null;
+ id: number
+ name: string
+ orgnr: number | null
+ numEmployees: number
+ building: { name: string }
+ floor: { number: number } | null
+ officeSpace: { name: string } | null
}
export function SeeTenantsComboBox({ officeSpaceId, workspaceId }) {
- const [open, setOpen] = React.useState(false);
- const [value, setValue] = React.useState(null);
- const [tenants, setTenants] = React.useState([]);
+ const [open, setOpen] = React.useState(false)
+ const [value, setValue] = React.useState(null)
+ const [tenants, setTenants] = React.useState([])
React.useEffect(() => {
async function fetchTenants() {
- const response = await getTenantsComboBox(workspaceId);
+ const response = await getTenantsComboBox(workspaceId)
if (response.success) {
- setTenants(response.tenants || []); // Ensure tenants is always an array
+ setTenants(response.tenants || []) // Ensure tenants is always an array
} else {
- toast.error("Failed to fetch tenants.");
+ toast.error("Failed to fetch tenants.")
}
}
- fetchTenants();
- }, [workspaceId]);
+ fetchTenants()
+ }, [workspaceId])
const handleSelect = async (tenantId: number) => {
try {
- const result = await assignTenantToOfficeSpace(officeSpaceId, tenantId);
+ const result = await assignTenantToOfficeSpace(officeSpaceId, tenantId)
if (result.success) {
- toast.success("Tenant assigned successfully.");
- setValue(tenantId); // Set the selected tenant value
+ toast.success("Tenant assigned successfully.")
+ setValue(tenantId) // Set the selected tenant value
} else {
- throw new Error(result.error);
+ throw new Error(result.error)
}
} catch (error) {
- toast.error(error.message || "Failed to assign tenant.");
+ toast.error(error.message || "Failed to assign tenant.")
}
- setOpen(false);
- };
+ setOpen(false)
+ }
return (
@@ -106,5 +105,5 @@ export function SeeTenantsComboBox({ officeSpaceId, workspaceId }) {
- );
+ )
}
diff --git a/apps/www/src/components/buttons/SubmitProperty.tsx b/apps/www/src/components/buttons/SubmitProperty.tsx
index e8dcb394..decfbdb8 100644
--- a/apps/www/src/components/buttons/SubmitProperty.tsx
+++ b/apps/www/src/components/buttons/SubmitProperty.tsx
@@ -1,6 +1,5 @@
-import Link from "next/link";
-
-import { Button } from "@dingify/ui/components/button";
+import Link from "next/link"
+import { Button } from "@propdock/ui/components/button"
import {
Dialog,
DialogContent,
@@ -9,9 +8,9 @@ import {
DialogHeader,
DialogTitle,
DialogTrigger,
-} from "@dingify/ui/components/dialog";
-import { Input } from "@dingify/ui/components/input";
-import { Label } from "@dingify/ui/components/label";
+} from "@propdock/ui/components/dialog"
+import { Input } from "@propdock/ui/components/input"
+import { Label } from "@propdock/ui/components/label"
export function SubmitProperty() {
return (
@@ -33,5 +32,5 @@ export function SubmitProperty() {
- );
+ )
}
diff --git a/apps/www/src/components/buttons/ViewDetailsButton.tsx b/apps/www/src/components/buttons/ViewDetailsButton.tsx
index d822fd4b..c765b7fb 100644
--- a/apps/www/src/components/buttons/ViewDetailsButton.tsx
+++ b/apps/www/src/components/buttons/ViewDetailsButton.tsx
@@ -1,15 +1,13 @@
-"use client";
+"use client"
-import { BellIcon, InfoIcon } from "lucide-react";
-
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
import {
Dialog,
DialogContent,
@@ -17,7 +15,8 @@ import {
DialogFooter,
DialogHeader,
DialogTrigger,
-} from "@dingify/ui/components/dialog";
+} from "@propdock/ui/components/dialog"
+import { BellIcon, InfoIcon } from "lucide-react"
export function ViewDetailsButton({ event }) {
return (
@@ -87,5 +86,5 @@ export function ViewDetailsButton({ event }) {
- );
+ )
}
diff --git a/apps/www/src/components/channels/ChannelCard2.tsx b/apps/www/src/components/channels/ChannelCard2.tsx
index 3be086b7..2f078d22 100644
--- a/apps/www/src/components/channels/ChannelCard2.tsx
+++ b/apps/www/src/components/channels/ChannelCard2.tsx
@@ -1,18 +1,11 @@
-import {
- ChevronDownIcon,
- CircleIcon,
- PlusIcon,
- StarIcon,
-} from "@radix-ui/react-icons";
-
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
import {
DropdownMenu,
DropdownMenuCheckboxItem,
@@ -21,8 +14,14 @@ import {
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu";
-import { Separator } from "@dingify/ui/components/separator";
+} from "@propdock/ui/components/dropdown-menu"
+import { Separator } from "@propdock/ui/components/separator"
+import {
+ ChevronDownIcon,
+ CircleIcon,
+ PlusIcon,
+ StarIcon,
+} from "@radix-ui/react-icons"
export function ChannelCard2({ channelDetails }) {
return (
@@ -87,5 +86,5 @@ export function ChannelCard2({ channelDetails }) {
))}
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/DashboardCardsTop.tsx b/apps/www/src/components/dashboard/DashboardCardsTop.tsx
index b8d8f672..cf92f1c2 100644
--- a/apps/www/src/components/dashboard/DashboardCardsTop.tsx
+++ b/apps/www/src/components/dashboard/DashboardCardsTop.tsx
@@ -1,11 +1,10 @@
-import { format } from "date-fns"
-
import {
Card,
CardContent,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
+import { format } from "date-fns"
export default function DashboardCardsTop({ dashboardData }) {
return (
diff --git a/apps/www/src/components/dashboard/DashboardTableBestProperties.tsx b/apps/www/src/components/dashboard/DashboardTableBestProperties.tsx
index 51a79f85..f6357741 100644
--- a/apps/www/src/components/dashboard/DashboardTableBestProperties.tsx
+++ b/apps/www/src/components/dashboard/DashboardTableBestProperties.tsx
@@ -1,7 +1,6 @@
-import * as React from "react";
-import Link from "next/link";
-
-import { Button, buttonVariants } from "@dingify/ui/components/button";
+import * as React from "react"
+import Link from "next/link"
+import { Button, buttonVariants } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -9,7 +8,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
import {
Table,
TableBody,
@@ -19,7 +18,7 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table";
+} from "@propdock/ui/components/table"
const properties = [
{
@@ -57,7 +56,7 @@ const properties = [
expenses: "kr 3.500,00",
noi: "kr 10.500,00",
},
-];
+]
export default function DashboardTableBestProperties() {
return (
@@ -98,10 +97,8 @@ export default function DashboardTableBestProperties() {
{properties
.reduce((total, property) => {
- const noi = parseFloat(
- property.noi.replace(/[\s,kr]/g, ""),
- );
- return total + noi;
+ const noi = parseFloat(property.noi.replace(/[\s,kr]/g, ""))
+ return total + noi
}, 0)
.toLocaleString("no-NO", {
style: "currency",
@@ -121,5 +118,5 @@ export default function DashboardTableBestProperties() {
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/DashboardTableLeaseExpiration.tsx b/apps/www/src/components/dashboard/DashboardTableLeaseExpiration.tsx
index f3a489ce..e2ef697c 100644
--- a/apps/www/src/components/dashboard/DashboardTableLeaseExpiration.tsx
+++ b/apps/www/src/components/dashboard/DashboardTableLeaseExpiration.tsx
@@ -1,7 +1,6 @@
import * as React from "react"
import Link from "next/link"
-
-import { Button, buttonVariants } from "@dingify/ui/components/button"
+import { Button, buttonVariants } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -9,7 +8,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Table,
TableBody,
@@ -19,7 +18,7 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
const leaseExpirationData = [
{
diff --git a/apps/www/src/components/dashboard/EventsDashboardComponents/EventDashboardDetailsSheet.tsx b/apps/www/src/components/dashboard/EventsDashboardComponents/EventDashboardDetailsSheet.tsx
index e2f20e5b..fea56ab9 100644
--- a/apps/www/src/components/dashboard/EventsDashboardComponents/EventDashboardDetailsSheet.tsx
+++ b/apps/www/src/components/dashboard/EventsDashboardComponents/EventDashboardDetailsSheet.tsx
@@ -1,14 +1,10 @@
-"use client";
+"use client"
-import Link from "next/link";
-import { createEvent } from "@/actions/Dingify/create-event";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { useForm } from "react-hook-form";
-import { toast } from "sonner";
-import { z } from "zod";
-
-import { Button } from "@dingify/ui/components/button";
-import { Checkbox } from "@dingify/ui/components/checkbox";
+import Link from "next/link"
+import { createEvent } from "@/actions/Dingify/create-event"
+import { zodResolver } from "@hookform/resolvers/zod"
+import { Button } from "@propdock/ui/components/button"
+import { Checkbox } from "@propdock/ui/components/checkbox"
import {
Form,
FormControl,
@@ -17,8 +13,8 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form";
-import { Input } from "@dingify/ui/components/input";
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Sheet,
SheetClose,
@@ -28,7 +24,10 @@ import {
SheetHeader,
SheetTitle,
SheetTrigger,
-} from "@dingify/ui/components/sheet";
+} from "@propdock/ui/components/sheet"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
// Define the validation schema
const FormSchema = z.object({
@@ -38,7 +37,7 @@ const FormSchema = z.object({
user_id: z.string().min(1, "User ID is required"),
icon: z.string().min(1, "Icon is required"),
notify: z.boolean(),
-});
+})
export function EventDashboardDetailsSheet() {
const form = useForm({
@@ -51,12 +50,12 @@ export function EventDashboardDetailsSheet() {
icon: "",
notify: true,
},
- });
+ })
const onSubmit = async (data) => {
- console.log("Form data to submit:", data); // Log form dat
+ console.log("Form data to submit:", data) // Log form dat
try {
- const result = await createEvent(data);
+ const result = await createEvent(data)
if (result.success) {
toast.message(
@@ -67,16 +66,16 @@ export function EventDashboardDetailsSheet() {
,
- );
- console.log("Event created:", result.event); // Log the created event
+ )
+ console.log("Event created:", result.event) // Log the created event
// Optionally refresh the page or clear the form
- form.reset();
+ form.reset()
}
} catch (error) {
- toast.error("There was an error creating the event.");
- console.error("Error creating event:", error); // Log any error
+ toast.error("There was an error creating the event.")
+ console.error("Error creating event:", error) // Log any error
}
- };
+ }
return (
@@ -210,5 +209,5 @@ export function EventDashboardDetailsSheet() {
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardCards.tsx b/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardCards.tsx
index 802355c2..5955a783 100644
--- a/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardCards.tsx
+++ b/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardCards.tsx
@@ -1,4 +1,4 @@
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -6,12 +6,12 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
-import { Progress } from "@dingify/ui/components/progress";
+} from "@propdock/ui/components/card"
+import { Progress } from "@propdock/ui/components/progress"
-import { CreateEventButton } from "@/components/buttons/CreatEventButton";
+import { CreateEventButton } from "@/components/buttons/CreatEventButton"
-import { EventDashboardDetailsSheet } from "./EventDashboardDetailsSheet";
+import { EventDashboardDetailsSheet } from "./EventDashboardDetailsSheet"
export default function EventsDashboardCards({ eventStats }) {
return (
@@ -74,5 +74,5 @@ export default function EventsDashboardCards({ eventStats }) {
>
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardDetails.tsx b/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardDetails.tsx
index 7e20492c..f903565a 100644
--- a/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardDetails.tsx
+++ b/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardDetails.tsx
@@ -1,11 +1,7 @@
-import { useRouter } from "next/navigation";
-import { deleteEvent } from "@/actions/Dingify/delete-event";
-import { format } from "date-fns";
-import { File, Pencil, Trash } from "lucide-react";
-import { toast } from "sonner";
-
-import { Badge } from "@dingify/ui/components/badge";
-import { Button } from "@dingify/ui/components/button";
+import { useRouter } from "next/navigation"
+import { deleteEvent } from "@/actions/Dingify/delete-event"
+import { Badge } from "@propdock/ui/components/badge"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -13,7 +9,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
import {
DropdownMenu,
DropdownMenuContent,
@@ -21,29 +17,32 @@ import {
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu";
-import { Separator } from "@dingify/ui/components/separator";
+} from "@propdock/ui/components/dropdown-menu"
+import { Separator } from "@propdock/ui/components/separator"
+import { format } from "date-fns"
+import { File, Pencil, Trash } from "lucide-react"
+import { toast } from "sonner"
-import { ViewDetailsButton } from "@/components/buttons/ViewDetailsButton";
-import { UserBadge } from "@/components/UserBadge";
+import { ViewDetailsButton } from "@/components/buttons/ViewDetailsButton"
+import { UserBadge } from "@/components/UserBadge"
export default function EventsDashboardDetails({ event }) {
- const router = useRouter();
+ const router = useRouter()
const handleDelete = async () => {
try {
- await deleteEvent(event.id);
- toast.success("The event has been deleted successfully.");
- router.refresh();
+ await deleteEvent(event.id)
+ toast.success("The event has been deleted successfully.")
+ router.refresh()
} catch (error) {
- toast.error("There was an error deleting the event.");
- console.error("Error deleting event:", error);
+ toast.error("There was an error deleting the event.")
+ console.error("Error deleting event:", error)
}
- };
+ }
const handleUserClick = (customerId) => {
- router.push(`dashboard/users/${customerId}`);
- };
+ router.push(`dashboard/users/${customerId}`)
+ }
return (
<>
@@ -185,7 +184,7 @@ export default function EventsDashboardDetails({ event }) {
>
- );
+ )
}
function TruckIcon(props) {
@@ -208,7 +207,7 @@ function TruckIcon(props) {
- );
+ )
}
function MoveVerticalIcon(props) {
@@ -229,7 +228,7 @@ function MoveVerticalIcon(props) {
- );
+ )
}
function InfoIcon(props) {
@@ -250,5 +249,5 @@ function InfoIcon(props) {
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardTable.tsx b/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardTable.tsx
index 7049aaed..e378a2e4 100644
--- a/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardTable.tsx
+++ b/apps/www/src/components/dashboard/EventsDashboardComponents/EventsDashboardTable.tsx
@@ -1,6 +1,5 @@
-import { useRouter } from "next/navigation";
-
-import { Badge } from "@dingify/ui/components/badge";
+import { useRouter } from "next/navigation"
+import { Badge } from "@propdock/ui/components/badge"
import {
Card,
CardContent,
@@ -8,7 +7,7 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
import {
Table,
TableBody,
@@ -16,26 +15,26 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table";
+} from "@propdock/ui/components/table"
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
-} from "@dingify/ui/components/tabs";
+} from "@propdock/ui/components/tabs"
-import { UserBadge } from "@/components/UserBadge";
+import { UserBadge } from "@/components/UserBadge"
export default function EventsDashboardTable({
events,
setSelectedEventId,
selectedEventId,
}) {
- const router = useRouter();
+ const router = useRouter()
const handleUserClick = (customerId) => {
- router.push(`dashboard/users/${customerId}`);
- };
+ router.push(`dashboard/users/${customerId}`)
+ }
return (
<>
@@ -149,7 +148,7 @@ export default function EventsDashboardTable({
>
- );
+ )
}
function FileIcon(props) {
@@ -169,7 +168,7 @@ function FileIcon(props) {
- );
+ )
}
function ListFilterIcon(props) {
@@ -190,5 +189,5 @@ function ListFilterIcon(props) {
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/charts/EventsTrendOverTime.tsx b/apps/www/src/components/dashboard/charts/EventsTrendOverTime.tsx
index 66ac59d4..131c113c 100644
--- a/apps/www/src/components/dashboard/charts/EventsTrendOverTime.tsx
+++ b/apps/www/src/components/dashboard/charts/EventsTrendOverTime.tsx
@@ -1,5 +1,11 @@
-"use client";
+"use client"
+import {
+ Card,
+ CardContent,
+ CardHeader,
+ CardTitle,
+} from "@propdock/ui/components/card"
import {
Bar,
BarChart,
@@ -11,14 +17,7 @@ import {
Tooltip,
XAxis,
YAxis,
-} from "recharts";
-
-import {
- Card,
- CardContent,
- CardHeader,
- CardTitle,
-} from "@dingify/ui/components/card";
+} from "recharts"
const lineChartData = [
{ month: "Jan", events: 400 },
@@ -33,7 +32,7 @@ const lineChartData = [
{ month: "Oct", events: 390 },
{ month: "Nov", events: 139 },
{ month: "Dec", events: 240 },
-];
+]
const barChartData = [
{ eventType: "Login", count: 120 },
@@ -42,7 +41,7 @@ const barChartData = [
{ eventType: "Signup", count: 80 },
{ eventType: "Profile Update", count: 150 },
{ eventType: "Password Reset", count: 60 },
-];
+]
export default function EventsTrendOverTimeChart(
{
@@ -101,10 +100,10 @@ export default function EventsTrendOverTimeChart(
- );
+ )
}
- return null;
+ return null
}}
/>
@@ -155,10 +154,10 @@ export default function EventsTrendOverTimeChart(
- );
+ )
}
- return null;
+ return null
}}
/>
@@ -177,5 +176,5 @@ export default function EventsTrendOverTimeChart(
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/charts/UserGrowthChart.tsx b/apps/www/src/components/dashboard/charts/UserGrowthChart.tsx
index 396d422b..00a18b73 100644
--- a/apps/www/src/components/dashboard/charts/UserGrowthChart.tsx
+++ b/apps/www/src/components/dashboard/charts/UserGrowthChart.tsx
@@ -1,5 +1,11 @@
-"use client";
+"use client"
+import {
+ Card,
+ CardContent,
+ CardHeader,
+ CardTitle,
+} from "@propdock/ui/components/card"
import {
Area,
AreaChart,
@@ -8,14 +14,7 @@ import {
Tooltip,
XAxis,
YAxis,
-} from "recharts";
-
-import {
- Card,
- CardContent,
- CardHeader,
- CardTitle,
-} from "@dingify/ui/components/card";
+} from "recharts"
// Placeholder data for the past week
const PREVIOUS_WEEK_DATA = [
@@ -25,7 +24,7 @@ const PREVIOUS_WEEK_DATA = [
{ name: "3rd Dec", users: 60 },
{ name: "4th Dec", users: 70 },
{ name: "5th Dec", users: 65 },
-];
+]
export default function UserGrowthTrend() {
return (
@@ -71,5 +70,5 @@ export default function UserGrowthTrend() {
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/descriptiondisplay.tsx b/apps/www/src/components/dashboard/descriptiondisplay.tsx
index 14992cd1..1c92d71f 100644
--- a/apps/www/src/components/dashboard/descriptiondisplay.tsx
+++ b/apps/www/src/components/dashboard/descriptiondisplay.tsx
@@ -1,15 +1,14 @@
-import React from "react";
-
+import React from "react"
import {
Card,
CardContent,
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
-import GenerateDescriptionButton2 from "../buttons/GenerateDescriptionButton2";
-import NoTextPlaceholder from "../properties/NoTextPlaceholder";
+import GenerateDescriptionButton2 from "../buttons/GenerateDescriptionButton2"
+import NoTextPlaceholder from "../properties/NoTextPlaceholder"
const DescriptionDisplay = ({
descriptionData,
@@ -23,19 +22,19 @@ const DescriptionDisplay = ({
propertyId={propertyId}
setDescriptionData={setDescriptionData}
/>
- );
+ )
}
- let parsedData;
+ let parsedData
try {
// Attempt to parse the JSON string in descriptionData
- parsedData = JSON.parse(descriptionData.replace(/```json\n|\n```/g, ""));
+ parsedData = JSON.parse(descriptionData.replace(/```json\n|\n```/g, ""))
// parsedData = JSON.parse("invalid json"); // For testing error message
} catch (error) {
console.error(
`Error parsing description data for property ID ${propertyId}:`,
- error
- );
+ error,
+ )
// Render a user-friendly error message with a retry option
return (
@@ -55,7 +54,7 @@ const DescriptionDisplay = ({
/>
- );
+ )
}
// Function to recursively render content
@@ -66,18 +65,18 @@ const DescriptionDisplay = ({
{key}
{renderContent(value, true)}
- ));
+ ))
} else if (Array.isArray(data)) {
return data.map((item, index) => (
{item.title &&
{item.title}
}
{renderContent(item.details || item, true)}
- ));
+ ))
} else {
- return {data}
;
+ return {data}
}
- };
+ }
// Render the parsed content
return (
@@ -90,7 +89,7 @@ const DescriptionDisplay = ({
/>
- );
-};
+ )
+}
-export default DescriptionDisplay;
+export default DescriptionDisplay
diff --git a/apps/www/src/components/dashboard/herosection.tsx b/apps/www/src/components/dashboard/herosection.tsx
index afa31b55..a2359ffd 100644
--- a/apps/www/src/components/dashboard/herosection.tsx
+++ b/apps/www/src/components/dashboard/herosection.tsx
@@ -1,21 +1,20 @@
-"use client";
+"use client"
-import Link from "next/link";
-import Balancer from "react-wrap-balancer";
-
-import { buttonVariants } from "@dingify/ui/components/button";
+import Link from "next/link"
+import { buttonVariants } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
+import Balancer from "react-wrap-balancer"
-import { cn } from "../../lib/utils";
-import { GetStartedButton } from "../buttons/GetStartedButton";
-import { Icons } from "../shared/icons";
-import AlertsOverviewChart from "./charts/AlertsOverviewChart";
+import { cn } from "../../lib/utils"
+import { GetStartedButton } from "../buttons/GetStartedButton"
+import { Icons } from "../shared/icons"
+import AlertsOverviewChart from "./charts/AlertsOverviewChart"
export default function HeroSection() {
return (
@@ -78,5 +77,5 @@ export default function HeroSection() {
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/herosection2.tsx b/apps/www/src/components/dashboard/herosection2.tsx
index 85d607dc..9ad25085 100644
--- a/apps/www/src/components/dashboard/herosection2.tsx
+++ b/apps/www/src/components/dashboard/herosection2.tsx
@@ -1,25 +1,24 @@
-"use client";
+"use client"
-import Link from "next/link";
-import Balancer from "react-wrap-balancer";
-
-import { buttonVariants } from "@dingify/ui/components/button";
+import Link from "next/link"
+import { buttonVariants } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
+import Balancer from "react-wrap-balancer"
-import { getGreeting } from "@/lib/utils";
+import { getGreeting } from "@/lib/utils"
-import { cn } from "../../lib/utils";
-import { GetStartedButton } from "../buttons/GetStartedButton";
-import SalesFunnelChart from "./charts/SalesFunnelChart";
+import { cn } from "../../lib/utils"
+import { GetStartedButton } from "../buttons/GetStartedButton"
+import SalesFunnelChart from "./charts/SalesFunnelChart"
export default function HeroSection2() {
- const greeting = getGreeting();
+ const greeting = getGreeting()
return (
@@ -83,5 +82,5 @@ export default function HeroSection2() {
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/test.tsx b/apps/www/src/components/dashboard/test.tsx
index 4b00bad6..5980b2bf 100644
--- a/apps/www/src/components/dashboard/test.tsx
+++ b/apps/www/src/components/dashboard/test.tsx
@@ -1,6 +1,6 @@
-"use client";
+"use client"
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -8,17 +8,17 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
-import { Input } from "@dingify/ui/components/input";
-import { Label } from "@dingify/ui/components/label";
+} from "@propdock/ui/components/card"
+import { Input } from "@propdock/ui/components/input"
+import { Label } from "@propdock/ui/components/label"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select";
-import { Textarea } from "@dingify/ui/components/textarea";
+} from "@propdock/ui/components/select"
+import { Textarea } from "@propdock/ui/components/textarea"
export function InputRightSideTest() {
return (
@@ -81,5 +81,5 @@ export function InputRightSideTest() {
- );
+ )
}
diff --git a/apps/www/src/components/dashboard/updatepropertyform2.tsx b/apps/www/src/components/dashboard/updatepropertyform2.tsx
index bdb65111..c5ee6a33 100644
--- a/apps/www/src/components/dashboard/updatepropertyform2.tsx
+++ b/apps/www/src/components/dashboard/updatepropertyform2.tsx
@@ -1,17 +1,12 @@
-"use client";
+"use client"
-import React, { useState } from "react";
-import { updatePropertyDetails } from "@/actions/Dingify/update-property-form";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { Loader2 as Spinner } from "lucide-react";
-import { useForm } from "react-hook-form";
-import { toast } from "sonner";
-import * as z from "zod";
-
-import { Input } from "@dingify/ui/components//input";
-import { Label } from "@dingify/ui/components//label";
-import { Textarea } from "@dingify/ui/components//textarea";
-import { Button } from "@dingify/ui/components/button";
+import React, { useState } from "react"
+import { updatePropertyDetails } from "@/actions/Dingify/update-property-form"
+import { zodResolver } from "@hookform/resolvers/zod"
+import { Input } from "@propdock/ui/components//input"
+import { Label } from "@propdock/ui/components//label"
+import { Textarea } from "@propdock/ui/components//textarea"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -19,7 +14,11 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
+import { Loader2 as Spinner } from "lucide-react"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import * as z from "zod"
// Define your schema as per your requirements
const propertyFormSchema = z.object({
@@ -29,29 +28,29 @@ const propertyFormSchema = z.object({
p_rom: z.string(),
bra: z.string(),
// ... add other fields as necessary
-});
+})
export function UpdatePropertyForm2({ defaultValues, propertyId }) {
- const [isLoading, setIsLoading] = useState(false); // Add this line
+ const [isLoading, setIsLoading] = useState(false) // Add this line
const form = useForm({
resolver: zodResolver(propertyFormSchema),
defaultValues: defaultValues,
- });
+ })
const onSubmit = async (data) => {
- setIsLoading(true); // Start loading
+ setIsLoading(true) // Start loading
try {
- const response = await updatePropertyDetails(propertyId, data);
+ const response = await updatePropertyDetails(propertyId, data)
if (response.success) {
- toast.success("Property details updated successfully.");
+ toast.success("Property details updated successfully.")
} else {
- throw new Error(response.error);
+ throw new Error(response.error)
}
} catch (error) {
- toast.error("Failed to update property details.");
+ toast.error("Failed to update property details.")
}
- setIsLoading(false); // Stop loading
- };
+ setIsLoading(false) // Stop loading
+ }
return (
@@ -110,5 +109,5 @@ export function UpdatePropertyForm2({ defaultValues, propertyId }) {
- );
+ )
}
diff --git a/apps/www/src/components/dev/testbuttonpoweroffice.tsx b/apps/www/src/components/dev/testbuttonpoweroffice.tsx
index bf6ff911..df257d7f 100644
--- a/apps/www/src/components/dev/testbuttonpoweroffice.tsx
+++ b/apps/www/src/components/dev/testbuttonpoweroffice.tsx
@@ -1,10 +1,9 @@
"use client"
import React from "react"
+import { Button } from "@propdock/ui/components/button"
import axios from "axios"
-import { Button } from "@dingify/ui/components/button"
-
const TestPowerofficeButton = () => {
const handleOAuth = async () => {
try {
diff --git a/apps/www/src/components/docs/search.tsx b/apps/www/src/components/docs/search.tsx
index dc107da6..7941c055 100644
--- a/apps/www/src/components/docs/search.tsx
+++ b/apps/www/src/components/docs/search.tsx
@@ -1,16 +1,16 @@
-"use client";
+"use client"
-import * as React from "react";
-import { cn } from "@/lib/utils";
+import * as React from "react"
+import { Input } from "@propdock/ui/components/input"
+import { toast } from "sonner"
-import { Input } from "@dingify/ui/components/input";
-import { toast } from "sonner";
+import { cn } from "@/lib/utils"
-type DocsSearchProps = React.HTMLAttributes;
+type DocsSearchProps = React.HTMLAttributes
export function DocsSearch({ className, ...props }: DocsSearchProps) {
function onSubmit(event: React.SyntheticEvent) {
- event.preventDefault();
+ event.preventDefault()
return toast.info("We're still working on the search.")
}
@@ -30,5 +30,5 @@ export function DocsSearch({ className, ...props }: DocsSearchProps) {
⌘K
- );
+ )
}
diff --git a/apps/www/src/components/editor/toolbar/editor-toolbar.tsx b/apps/www/src/components/editor/toolbar/editor-toolbar.tsx
index d3e9c0be..4cc01fbd 100644
--- a/apps/www/src/components/editor/toolbar/editor-toolbar.tsx
+++ b/apps/www/src/components/editor/toolbar/editor-toolbar.tsx
@@ -1,5 +1,7 @@
-import type { Editor } from "@tiptap/react";
-import React from "react";
+import type { Editor } from "@tiptap/react"
+import React from "react"
+import { Toggle } from "@propdock/ui/components/toggle"
+import { ToggleGroup, Toolbar } from "@propdock/ui/components/toolbar"
import {
Bold,
Code,
@@ -11,15 +13,12 @@ import {
Redo,
Strikethrough,
Undo,
-} from "lucide-react";
+} from "lucide-react"
-import { Toggle } from "@dingify/ui/components/toggle";
-import { ToggleGroup, Toolbar } from "@dingify/ui/components/toolbar";
-
-import { FormatType } from "./format-type";
+import { FormatType } from "./format-type"
interface EditorToolbarProps {
- editor: Editor;
+ editor: Editor
}
const EditorToolbar = ({ editor }: EditorToolbarProps) => {
@@ -138,7 +137,7 @@ const EditorToolbar = ({ editor }: EditorToolbarProps) => {
- );
-};
+ )
+}
-export default EditorToolbar;
+export default EditorToolbar
diff --git a/apps/www/src/components/editor/toolbar/format-type.tsx b/apps/www/src/components/editor/toolbar/format-type.tsx
index 3406ac5a..61c527e4 100644
--- a/apps/www/src/components/editor/toolbar/format-type.tsx
+++ b/apps/www/src/components/editor/toolbar/format-type.tsx
@@ -1,6 +1,5 @@
-import type { Editor } from "@tiptap/react";
-import * as React from "react";
-
+import type { Editor } from "@tiptap/react"
+import * as React from "react"
import {
Select,
SelectContent,
@@ -8,48 +7,48 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select";
+} from "@propdock/ui/components/select"
interface FormatTypeProps {
- editor: Editor;
+ editor: Editor
}
export function FormatType({ editor }: FormatTypeProps) {
const value = () => {
- if (editor.isActive("paragraph")) return "paragraph";
- if (editor.isActive("heading", { level: 1 })) return "h1";
- if (editor.isActive("heading", { level: 2 })) return "h2";
- if (editor.isActive("heading", { level: 3 })) return "h3";
- if (editor.isActive("heading", { level: 4 })) return "h4";
- if (editor.isActive("heading", { level: 5 })) return "h5";
- if (editor.isActive("heading", { level: 6 })) return "h6";
- };
+ if (editor.isActive("paragraph")) return "paragraph"
+ if (editor.isActive("heading", { level: 1 })) return "h1"
+ if (editor.isActive("heading", { level: 2 })) return "h2"
+ if (editor.isActive("heading", { level: 3 })) return "h3"
+ if (editor.isActive("heading", { level: 4 })) return "h4"
+ if (editor.isActive("heading", { level: 5 })) return "h5"
+ if (editor.isActive("heading", { level: 6 })) return "h6"
+ }
const onChange = (value: string) => {
switch (value) {
case "paragraph":
- editor.chain().focus().setParagraph().run();
- break;
+ editor.chain().focus().setParagraph().run()
+ break
case "h1":
- editor.chain().focus().toggleHeading({ level: 1 }).run();
- break;
+ editor.chain().focus().toggleHeading({ level: 1 }).run()
+ break
case "h2":
- editor.chain().focus().toggleHeading({ level: 2 }).run();
- break;
+ editor.chain().focus().toggleHeading({ level: 2 }).run()
+ break
case "h3":
- editor.chain().focus().toggleHeading({ level: 3 }).run();
- break;
+ editor.chain().focus().toggleHeading({ level: 3 }).run()
+ break
case "h4":
- editor.chain().focus().toggleHeading({ level: 4 }).run();
- break;
+ editor.chain().focus().toggleHeading({ level: 4 }).run()
+ break
case "h5":
- editor.chain().focus().toggleHeading({ level: 5 }).run();
- break;
+ editor.chain().focus().toggleHeading({ level: 5 }).run()
+ break
case "h6":
- editor.chain().focus().toggleHeading({ level: 6 }).run();
- break;
+ editor.chain().focus().toggleHeading({ level: 6 }).run()
+ break
}
- };
+ }
return (
- );
+ )
}
diff --git a/apps/www/src/components/esign/_components/DragAndDrop.tsx b/apps/www/src/components/esign/_components/DragAndDrop.tsx
index c8d381b3..8c82ee84 100644
--- a/apps/www/src/components/esign/_components/DragAndDrop.tsx
+++ b/apps/www/src/components/esign/_components/DragAndDrop.tsx
@@ -1,9 +1,8 @@
import { useState } from "react"
+import { Button } from "@propdock/ui/components/button"
import { FileIcon, UploadIcon, XIcon } from "lucide-react"
import { DropzoneOptions, useDropzone } from "react-dropzone"
-import { Button } from "@dingify/ui/components/button"
-
import { cn } from "@/lib/utils"
interface DragAndDropProps extends DropzoneOptions {
diff --git a/apps/www/src/components/esign/_components/ESignGeneralForm .tsx b/apps/www/src/components/esign/_components/ESignGeneralForm .tsx
index 06420c02..dde0550e 100644
--- a/apps/www/src/components/esign/_components/ESignGeneralForm .tsx
+++ b/apps/www/src/components/esign/_components/ESignGeneralForm .tsx
@@ -2,11 +2,7 @@
import { useState } from "react"
import { zodResolver } from "@hookform/resolvers/zod"
-import { Pencil, SendIcon, Trash2 } from "lucide-react"
-import { useFieldArray, useForm } from "react-hook-form"
-import * as z from "zod"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Form,
FormControl,
@@ -15,10 +11,13 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
-import { Progress } from "@dingify/ui/components/progress"
-import { Textarea } from "@dingify/ui/components/textarea"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
+import { Progress } from "@propdock/ui/components/progress"
+import { Textarea } from "@propdock/ui/components/textarea"
+import { Pencil, SendIcon, Trash2 } from "lucide-react"
+import { useFieldArray, useForm } from "react-hook-form"
+import * as z from "zod"
const formSchema = z.object({
title: z.string().min(1, { message: "Tittel er påkrevd" }),
diff --git a/apps/www/src/components/esign/_components/FileUploader.tsx b/apps/www/src/components/esign/_components/FileUploader.tsx
index a4c8eb68..1938a51c 100644
--- a/apps/www/src/components/esign/_components/FileUploader.tsx
+++ b/apps/www/src/components/esign/_components/FileUploader.tsx
@@ -11,6 +11,8 @@ import {
useRef,
useState,
} from "react"
+import { buttonVariants } from "@propdock/ui/components/button"
+import { Input } from "@propdock/ui/components/input"
import { Trash2 as RemoveIcon } from "lucide-react"
import {
DropzoneOptions,
@@ -20,9 +22,6 @@ import {
} from "react-dropzone"
import { toast } from "sonner"
-import { buttonVariants } from "@dingify/ui/components/button"
-import { Input } from "@dingify/ui/components/input"
-
import { cn } from "@/lib/utils"
type DirectionOptions = "rtl" | "ltr" | undefined
diff --git a/apps/www/src/components/esign/_components/FileUploader2.tsx b/apps/www/src/components/esign/_components/FileUploader2.tsx
index 07c58bac..dd04a20d 100644
--- a/apps/www/src/components/esign/_components/FileUploader2.tsx
+++ b/apps/www/src/components/esign/_components/FileUploader2.tsx
@@ -3,14 +3,13 @@
import type { DropzoneProps, FileRejection } from "react-dropzone"
import * as React from "react"
import Image from "next/image"
+import { Button } from "@propdock/ui/components/button"
+import { Progress } from "@propdock/ui/components/progress"
+import { ScrollArea } from "@propdock/ui/components/scroll-area"
import { Cross2Icon, FileTextIcon, UploadIcon } from "@radix-ui/react-icons"
import Dropzone from "react-dropzone"
import { toast } from "sonner"
-import { Button } from "@dingify/ui/components/button"
-import { Progress } from "@dingify/ui/components/progress"
-import { ScrollArea } from "@dingify/ui/components/scroll-area"
-
import { cn } from "@/lib/utils"
import { useControllableState } from "@/hooks/use-controllable-state"
diff --git a/apps/www/src/components/esign/esignMainComponent.tsx b/apps/www/src/components/esign/esignMainComponent.tsx
index 9ef2cd02..8c247f0a 100644
--- a/apps/www/src/components/esign/esignMainComponent.tsx
+++ b/apps/www/src/components/esign/esignMainComponent.tsx
@@ -2,11 +2,10 @@
import { useState } from "react"
import { createEsignDocument } from "@/actions/create-esign-document"
+import { Button } from "@propdock/ui/components/button"
import { SendIcon } from "lucide-react"
import { toast } from "sonner"
-import { Button } from "@dingify/ui/components/button"
-
import { DragAndDrop } from "./_components/DragAndDrop"
import { ESignGeneralForm } from "./_components/ESignGeneralForm "
diff --git a/apps/www/src/components/filetree/tree-view-api.tsx b/apps/www/src/components/filetree/tree-view-api.tsx
index 00a4e99e..736f63ff 100644
--- a/apps/www/src/components/filetree/tree-view-api.tsx
+++ b/apps/www/src/components/filetree/tree-view-api.tsx
@@ -9,11 +9,11 @@ import React, {
useMemo,
useState,
} from "react"
+import { Button } from "@propdock/ui/components/button"
+import { ScrollArea } from "@propdock/ui/components/scroll-area"
import * as AccordionPrimitive from "@radix-ui/react-accordion"
import { FileIcon, FolderIcon, FolderOpenIcon } from "lucide-react"
-import { Button } from "@dingify/ui/components/button"
-import { ScrollArea } from "@dingify/ui/components/scroll-area"
import { cn } from "@dingify/ui/utils"
type TreeViewElement = {
diff --git a/apps/www/src/components/forms/billing-form-button.tsx b/apps/www/src/components/forms/billing-form-button.tsx
index b400eac3..f2656f5b 100644
--- a/apps/www/src/components/forms/billing-form-button.tsx
+++ b/apps/www/src/components/forms/billing-form-button.tsx
@@ -1,17 +1,16 @@
-"use client";
+"use client"
-import type { SubscriptionPlan, UserSubscriptionPlan } from "@/types";
-import { useTransition } from "react";
-import { generateUserStripe } from "@/actions/Dingify/generate-user-stripe";
+import type { SubscriptionPlan, UserSubscriptionPlan } from "@/types"
+import { useTransition } from "react"
+import { generateUserStripe } from "@/actions/Dingify/generate-user-stripe"
+import { Button } from "@propdock/ui/components/button"
-import { Button } from "@dingify/ui/components/button";
-
-import { Icons } from "@/components/shared/icons";
+import { Icons } from "@/components/shared/icons"
interface BillingFormButtonProps {
- offer: SubscriptionPlan;
- subscriptionPlan: UserSubscriptionPlan;
- year: boolean;
+ offer: SubscriptionPlan
+ subscriptionPlan: UserSubscriptionPlan
+ year: boolean
}
export function BillingFormButton({
@@ -19,16 +18,16 @@ export function BillingFormButton({
offer,
subscriptionPlan,
}: BillingFormButtonProps) {
- const [isPending, startTransition] = useTransition();
+ const [isPending, startTransition] = useTransition()
const generateUserStripeSession = generateUserStripe.bind(
null,
// @ts-expect-error
offer.stripeIds[year ? "yearly" : "monthly"],
- );
+ )
const stripeSessionAction = () =>
// @ts-expect-error
- startTransition(async () => await generateUserStripeSession());
+ startTransition(async () => await generateUserStripeSession())
return (
)}
- );
+ )
}
diff --git a/apps/www/src/components/forms/language-form2.tsx b/apps/www/src/components/forms/language-form2.tsx
index b11cfe08..338d75c9 100644
--- a/apps/www/src/components/forms/language-form2.tsx
+++ b/apps/www/src/components/forms/language-form2.tsx
@@ -1,73 +1,72 @@
-"use client";
+"use client"
-import React, { useState } from "react";
-import { updateUserLanguage } from "@/actions/Dingify/update-language";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { useForm } from "react-hook-form";
-import { toast } from "sonner";
-import * as z from "zod";
-
-import { Button, buttonVariants } from "@dingify/ui/components/button";
+import React, { useState } from "react"
+import { updateUserLanguage } from "@/actions/Dingify/update-language"
+import { zodResolver } from "@hookform/resolvers/zod"
+import { Button, buttonVariants } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
-} from "@dingify/ui/components/select";
+} from "@propdock/ui/components/select"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import * as z from "zod"
-import { Icons } from "@/components/shared/icons";
+import { Icons } from "@/components/shared/icons"
const languageSchema = z.object({
language: z.string({
required_error: "Language is required",
}),
-});
+})
export function LanguageForm2({ user }) {
const [selectedLanguage, setSelectedLanguage] = useState(
user.language || "english",
- );
- const [isPending, setPending] = useState(false);
+ )
+ const [isPending, setPending] = useState(false)
const form = useForm({
resolver: zodResolver(languageSchema),
// Remove defaultValues here, we will use useState to manage the select's value
- });
+ })
- const { handleSubmit, setValue } = form;
+ const { handleSubmit, setValue } = form
const onSubmit = async (data) => {
- setPending(true);
- console.log("Submitted data:", data); // Check what is being submitted
+ setPending(true)
+ console.log("Submitted data:", data) // Check what is being submitted
try {
- const response = await updateUserLanguage(data.language);
- console.log("Update response:", response); // Check the response from the update call
+ const response = await updateUserLanguage(data.language)
+ console.log("Update response:", response) // Check the response from the update call
if (response.success) {
- toast.success("Language updated successfully.");
+ toast.success("Language updated successfully.")
} else {
- throw new Error(response.error);
+ throw new Error(response.error)
}
} catch (error) {
- console.error("Update error:", error); // Log any caught errors
- toast.error(error.message || "Failed to update language.");
+ console.error("Update error:", error) // Log any caught errors
+ toast.error(error.message || "Failed to update language.")
} finally {
- setPending(false);
+ setPending(false)
}
- };
+ }
// Use this function to handle the language change
const handleLanguageChange = (language) => {
- setSelectedLanguage(language);
- setValue("language", language); // Update form value manually
- console.log("Language changed to:", language); // Log the change for debugging
- };
+ setSelectedLanguage(language)
+ setValue("language", language) // Update form value manually
+ console.log("Language changed to:", language) // Log the change for debugging
+ }
return (
@@ -106,5 +105,5 @@ export function LanguageForm2({ user }) {
- );
+ )
}
diff --git a/apps/www/src/components/forms/select-input-form.tsx b/apps/www/src/components/forms/select-input-form.tsx
index ced6ba69..3390d4d3 100644
--- a/apps/www/src/components/forms/select-input-form.tsx
+++ b/apps/www/src/components/forms/select-input-form.tsx
@@ -1,69 +1,68 @@
-"use client";
-
-import { useState } from "react";
-import { useRouter } from "next/navigation";
-import { selectOption } from "@/actions/Dingify/select-option";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { X } from "lucide-react";
-import { useForm } from "react-hook-form";
-import { toast } from "sonner";
-import * as z from "zod";
+"use client"
+import { useState } from "react"
+import { useRouter } from "next/navigation"
+import { selectOption } from "@/actions/Dingify/select-option"
+import { zodResolver } from "@hookform/resolvers/zod"
import {
Form,
FormControl,
FormDescription,
FormField,
FormLabel,
-} from "@dingify/ui/components//form";
-import { Switch } from "@dingify/ui/components//switch";
+} from "@propdock/ui/components//form"
+import { Switch } from "@propdock/ui/components//switch"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
+import { X } from "lucide-react"
+import { useForm } from "react-hook-form"
+import { toast } from "sonner"
+import * as z from "zod"
export function SelectInputForm({ options, image }) {
- const router = useRouter();
- const [activeSwitch, setActiveSwitch] = useState(null);
+ const router = useRouter()
+ const [activeSwitch, setActiveSwitch] = useState(null)
const dynamicSchema = options.reduce((acc, option) => {
- acc[option.key] = z.boolean();
- return acc;
- }, {});
+ acc[option.key] = z.boolean()
+ return acc
+ }, {})
const form = useForm({
resolver: zodResolver(z.object(dynamicSchema)),
- });
+ })
const handleSwitchChange = async (option) => {
- setActiveSwitch(option.label);
+ setActiveSwitch(option.label)
// Get the content of the selected option
- const selectedOptionContent = option.description;
+ const selectedOptionContent = option.description
// Call the server action to update the selected option in the database
try {
- const result = await selectOption(option.imageId, selectedOptionContent); // Use selectedOptionContent here
+ const result = await selectOption(option.imageId, selectedOptionContent) // Use selectedOptionContent here
if (!result.success) {
// If an error occurs, log it and display a toast notification
- console.error("Failed to update the selected option:", result.error);
- toast.error("Failed to update the selected option. Please try again.");
+ console.error("Failed to update the selected option:", result.error)
+ toast.error("Failed to update the selected option. Please try again.")
} else {
- router.refresh();
- console.log("Selected option updated successfully");
+ router.refresh()
+ console.log("Selected option updated successfully")
}
} catch (error) {
- console.error("An unexpected error occurred:", error);
- toast.error("An unexpected error occurred. Please try again.");
+ console.error("An unexpected error occurred:", error)
+ toast.error("An unexpected error occurred. Please try again.")
}
- };
+ }
const onSubmit = (data) => {
- console.log(data);
- };
+ console.log(data)
+ }
return (
>
- );
+ )
}
diff --git a/apps/www/src/components/open-page/Open.tsx b/apps/www/src/components/open-page/Open.tsx
index 48ff6353..603700e0 100644
--- a/apps/www/src/components/open-page/Open.tsx
+++ b/apps/www/src/components/open-page/Open.tsx
@@ -3,7 +3,7 @@ import {
CardContent,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
export default function OpenCardSection() {
return (
@@ -106,5 +106,5 @@ export default function OpenCardSection() {
- );
+ )
}
diff --git a/apps/www/src/components/open-page/OpenCardsSection.tsx b/apps/www/src/components/open-page/OpenCardsSection.tsx
index b4000f17..2f04cac5 100644
--- a/apps/www/src/components/open-page/OpenCardsSection.tsx
+++ b/apps/www/src/components/open-page/OpenCardsSection.tsx
@@ -1,16 +1,15 @@
-import {
- ActivityIcon,
- GitBranchIcon,
- GitPullRequestIcon,
- StarIcon,
-} from "lucide-react";
-
import {
Card,
CardContent,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
+import {
+ ActivityIcon,
+ GitBranchIcon,
+ GitPullRequestIcon,
+ StarIcon,
+} from "lucide-react"
// Static data - replace these with actual data fetched from GitHub if needed
const githubData = {
@@ -18,7 +17,7 @@ const githubData = {
openIssues: 43,
mergedPRs: 366,
totalContributors: 43,
-};
+}
// @ts-ignore
export default function OpenCardSection({ githubData }) {
@@ -67,5 +66,5 @@ export default function OpenCardSection({ githubData }) {
- );
+ )
}
diff --git a/apps/www/src/components/open-page/OpenMiddleSection.tsx b/apps/www/src/components/open-page/OpenMiddleSection.tsx
index 47f59282..7ffe34fa 100644
--- a/apps/www/src/components/open-page/OpenMiddleSection.tsx
+++ b/apps/www/src/components/open-page/OpenMiddleSection.tsx
@@ -1,4 +1,4 @@
-import { Separator } from "@dingify/ui/components/separator";
+import { Separator } from "@propdock/ui/components/separator"
export default function OpenMiddleSection() {
return (
@@ -16,5 +16,5 @@ export default function OpenMiddleSection() {
- );
+ )
}
diff --git a/apps/www/src/components/open-page/OpenTableTeam.tsx b/apps/www/src/components/open-page/OpenTableTeam.tsx
index edbab806..7955f2d4 100644
--- a/apps/www/src/components/open-page/OpenTableTeam.tsx
+++ b/apps/www/src/components/open-page/OpenTableTeam.tsx
@@ -7,18 +7,8 @@ import type {
VisibilityState,
} from "@tanstack/react-table"
import * as React from "react"
-import {
- flexRender,
- getCoreRowModel,
- getFilteredRowModel,
- getPaginationRowModel,
- getSortedRowModel,
- useReactTable,
-} from "@tanstack/react-table"
-import { ArrowUpDown, ChevronDown, MoreHorizontal } from "lucide-react"
-
-import { Button } from "@dingify/ui/components/button"
-import { Checkbox } from "@dingify/ui/components/checkbox"
+import { Button } from "@propdock/ui/components/button"
+import { Checkbox } from "@propdock/ui/components/checkbox"
import {
DropdownMenu,
DropdownMenuCheckboxItem,
@@ -27,8 +17,8 @@ import {
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/dropdown-menu"
+import { Input } from "@propdock/ui/components/input"
import {
Table,
TableBody,
@@ -36,7 +26,16 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
+import {
+ flexRender,
+ getCoreRowModel,
+ getFilteredRowModel,
+ getPaginationRowModel,
+ getSortedRowModel,
+ useReactTable,
+} from "@tanstack/react-table"
+import { ArrowUpDown, ChevronDown, MoreHorizontal } from "lucide-react"
const data: TeamMember[] = [
{
diff --git a/apps/www/src/components/open-page/OpenUsersDiagram.tsx b/apps/www/src/components/open-page/OpenUsersDiagram.tsx
index 5d09415b..46447c7c 100644
--- a/apps/www/src/components/open-page/OpenUsersDiagram.tsx
+++ b/apps/www/src/components/open-page/OpenUsersDiagram.tsx
@@ -4,10 +4,10 @@ import {
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
-import OpenCardNewUsers from "./OpenCardNewUsers";
-import OpenCardUsers from "./OpenCardUsers";
+import OpenCardNewUsers from "./OpenCardNewUsers"
+import OpenCardUsers from "./OpenCardUsers"
export default function OpenUsersDiagram() {
return (
@@ -35,7 +35,7 @@ export default function OpenUsersDiagram() {
- );
+ )
}
// OR if we want it to be bigger
diff --git a/apps/www/src/components/open-page/OpenUsersFunding.tsx b/apps/www/src/components/open-page/OpenUsersFunding.tsx
index 3de860c7..0a1e3163 100644
--- a/apps/www/src/components/open-page/OpenUsersFunding.tsx
+++ b/apps/www/src/components/open-page/OpenUsersFunding.tsx
@@ -4,10 +4,10 @@ import {
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
-import OpenCardFundingChart from "./OpenCardFundingChart";
-import OpenCardFundingDiagram from "./OpenCardFundingDiagram";
+import OpenCardFundingChart from "./OpenCardFundingChart"
+import OpenCardFundingDiagram from "./OpenCardFundingDiagram"
export default function OpenUsersFunding() {
return (
@@ -35,7 +35,7 @@ export default function OpenUsersFunding() {
- );
+ )
}
// OR if we want it to be bigger
diff --git a/apps/www/src/components/open-page/OpenUsersText.tsx b/apps/www/src/components/open-page/OpenUsersText.tsx
index 3df9e2a4..113c39bd 100644
--- a/apps/www/src/components/open-page/OpenUsersText.tsx
+++ b/apps/www/src/components/open-page/OpenUsersText.tsx
@@ -1,4 +1,4 @@
-import { Separator } from "@dingify/ui/components/separator";
+import { Separator } from "@propdock/ui/components/separator"
export default function OpenUsersText() {
return (
@@ -15,5 +15,5 @@ export default function OpenUsersText() {
- );
+ )
}
diff --git a/apps/www/src/components/properties/NoPhotoPlaceholder copy.tsx b/apps/www/src/components/properties/NoPhotoPlaceholder copy.tsx
index 14e7ff70..1b80c4d7 100644
--- a/apps/www/src/components/properties/NoPhotoPlaceholder copy.tsx
+++ b/apps/www/src/components/properties/NoPhotoPlaceholder copy.tsx
@@ -1,10 +1,10 @@
-"use client";
+"use client"
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
-import { EmptyPlaceholder } from "@/components/shared/empty-placeholder";
+import { EmptyPlaceholder } from "@/components/shared/empty-placeholder"
-import { DocsButton } from "../buttons/DocsButton";
+import { DocsButton } from "../buttons/DocsButton"
export default function NoPhotoPlaceholder() {
return (
@@ -20,5 +20,5 @@ export default function NoPhotoPlaceholder() {
- );
+ )
}
diff --git a/apps/www/src/components/properties/NoSummaryPlaceholder.tsx b/apps/www/src/components/properties/NoSummaryPlaceholder.tsx
index ab63311f..4f245441 100644
--- a/apps/www/src/components/properties/NoSummaryPlaceholder.tsx
+++ b/apps/www/src/components/properties/NoSummaryPlaceholder.tsx
@@ -1,8 +1,8 @@
-"use client";
+"use client"
-import { EmptyPlaceholder } from "@/components/shared/empty-placeholder";
+import { Button } from "@propdock/ui/components/button"
-import { Button } from "@dingify/ui/components/button";
+import { EmptyPlaceholder } from "@/components/shared/empty-placeholder"
export default function NoSummaryPlaceholder({ propertyId, slug }) {
return (
@@ -14,5 +14,5 @@ export default function NoSummaryPlaceholder({ propertyId, slug }) {
- );
+ )
}
diff --git a/apps/www/src/components/properties/Propertiestable.tsx b/apps/www/src/components/properties/Propertiestable.tsx
index 387065e3..35ecdac4 100644
--- a/apps/www/src/components/properties/Propertiestable.tsx
+++ b/apps/www/src/components/properties/Propertiestable.tsx
@@ -1,8 +1,7 @@
-"use client";
-
-import { useState } from "react";
-import Link from "next/link";
+"use client"
+import { useState } from "react"
+import Link from "next/link"
import {
Table,
TableBody,
@@ -10,32 +9,32 @@ import {
TableCell,
TableHead,
TableRow,
-} from "@dingify/ui/components/table";
+} from "@propdock/ui/components/table"
const PropertiesTable = ({ properties }) => {
- const [sortKey, setSortKey] = useState("createdAt"); // default sort key
- const [sortOrder, setSortOrder] = useState("desc"); // default sort order
- const [filter, setFilter] = useState("");
+ const [sortKey, setSortKey] = useState("createdAt") // default sort key
+ const [sortOrder, setSortOrder] = useState("desc") // default sort order
+ const [filter, setFilter] = useState("")
// Sort and filter the properties
const sortedFilteredProperties = properties
.filter((property) =>
- property.address.toLowerCase().includes(filter.toLowerCase())
+ property.address.toLowerCase().includes(filter.toLowerCase()),
)
.sort((a, b) => {
- if (a[sortKey] < b[sortKey]) return sortOrder === "asc" ? -1 : 1;
- if (a[sortKey] > b[sortKey]) return sortOrder === "asc" ? 1 : -1;
- return 0;
- });
+ if (a[sortKey] < b[sortKey]) return sortOrder === "asc" ? -1 : 1
+ if (a[sortKey] > b[sortKey]) return sortOrder === "asc" ? 1 : -1
+ return 0
+ })
const toggleSort = (key) => {
if (sortKey === key) {
- setSortOrder(sortOrder === "asc" ? "desc" : "asc");
+ setSortOrder(sortOrder === "asc" ? "desc" : "asc")
} else {
- setSortKey(key);
- setSortOrder("asc");
+ setSortKey(key)
+ setSortOrder("asc")
}
- };
+ }
return (
<>
@@ -72,7 +71,7 @@ const PropertiesTable = ({ properties }) => {
>
- );
-};
+ )
+}
-export default PropertiesTable;
+export default PropertiesTable
diff --git a/apps/www/src/components/shared/card-skeleton.tsx b/apps/www/src/components/shared/card-skeleton.tsx
index c83ea38d..885be735 100644
--- a/apps/www/src/components/shared/card-skeleton.tsx
+++ b/apps/www/src/components/shared/card-skeleton.tsx
@@ -3,8 +3,8 @@ import {
CardContent,
CardFooter,
CardHeader,
-} from "@dingify/ui/components/card";
-import { Skeleton } from "@dingify/ui/components/skeleton";
+} from "@propdock/ui/components/card"
+import { Skeleton } from "@propdock/ui/components/skeleton"
export function CardSkeleton() {
return (
@@ -18,5 +18,5 @@ export function CardSkeleton() {
- );
+ )
}
diff --git a/apps/www/src/components/shared/modal.tsx b/apps/www/src/components/shared/modal.tsx
index 3b838482..fbf41ce5 100644
--- a/apps/www/src/components/shared/modal.tsx
+++ b/apps/www/src/components/shared/modal.tsx
@@ -1,16 +1,16 @@
-"use client";
+"use client"
-import useMediaQuery from "@/hooks/use-media-query";
-import { cn } from "@/lib/utils";
-import { Drawer } from "vaul";
+import { Dialog, DialogContent } from "@propdock/ui/components/dialog"
+import { Drawer } from "vaul"
-import { Dialog, DialogContent } from "@dingify/ui/components/dialog";
+import { cn } from "@/lib/utils"
+import useMediaQuery from "@/hooks/use-media-query"
interface ModalProps {
- children: React.ReactNode;
- className?: string;
- showModal: boolean;
- setShowModal: () => void;
+ children: React.ReactNode
+ className?: string
+ showModal: boolean
+ setShowModal: () => void
}
export function Modal({
@@ -19,7 +19,7 @@ export function Modal({
showModal,
setShowModal,
}: ModalProps) {
- const { isMobile } = useMediaQuery();
+ const { isMobile } = useMediaQuery()
if (isMobile) {
return (
@@ -29,7 +29,7 @@ export function Modal({
@@ -40,7 +40,7 @@ export function Modal({
- );
+ )
}
return (
- );
+ )
}
diff --git a/apps/www/src/components/shared/user-avatar.tsx b/apps/www/src/components/shared/user-avatar.tsx
index d4d5962d..058900ea 100644
--- a/apps/www/src/components/shared/user-avatar.tsx
+++ b/apps/www/src/components/shared/user-avatar.tsx
@@ -1,15 +1,15 @@
-import type { User } from "@prisma/client";
-import type { AvatarProps } from "@radix-ui/react-avatar";
-import { Icons } from "@/components/shared/icons";
-
+import type { User } from "@prisma/client"
+import type { AvatarProps } from "@radix-ui/react-avatar"
import {
Avatar,
AvatarFallback,
AvatarImage,
-} from "@dingify/ui/components/avatar";
+} from "@propdock/ui/components/avatar"
+
+import { Icons } from "@/components/shared/icons"
interface UserAvatarProps extends AvatarProps {
- user: Pick
;
+ user: Pick
}
export function UserAvatar({ user, ...props }: UserAvatarProps) {
@@ -28,5 +28,5 @@ export function UserAvatar({ user, ...props }: UserAvatarProps) {
)}
- );
+ )
}
diff --git a/apps/www/src/components/table/dashboard/columns.tsx b/apps/www/src/components/table/dashboard/columns.tsx
index eb7d0249..048eb8ed 100644
--- a/apps/www/src/components/table/dashboard/columns.tsx
+++ b/apps/www/src/components/table/dashboard/columns.tsx
@@ -2,10 +2,8 @@
import type { ColumnDef } from "@tanstack/react-table"
import Link from "next/link"
-import { ArrowUpDown, MoreHorizontal } from "lucide-react"
-
-import { Badge } from "@dingify/ui/components/badge"
-import { Button } from "@dingify/ui/components/button"
+import { Badge } from "@propdock/ui/components/badge"
+import { Button } from "@propdock/ui/components/button"
import {
DropdownMenu,
DropdownMenuContent,
@@ -14,7 +12,8 @@ import {
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu"
+} from "@propdock/ui/components/dropdown-menu"
+import { ArrowUpDown, MoreHorizontal } from "lucide-react"
import { propertyLabels, propertyStatuses } from "./propertystatus"
diff --git a/apps/www/src/components/table/dashboard/data-table-faceted-filter.tsx b/apps/www/src/components/table/dashboard/data-table-faceted-filter.tsx
index 6493517f..7058916e 100644
--- a/apps/www/src/components/table/dashboard/data-table-faceted-filter.tsx
+++ b/apps/www/src/components/table/dashboard/data-table-faceted-filter.tsx
@@ -1,10 +1,7 @@
-import type { Column } from "@tanstack/react-table";
-import * as React from "react";
-import { cn } from "@/lib/utils";
-import { CheckIcon, PlusCircledIcon } from "@radix-ui/react-icons";
-
-import { Badge } from "@dingify/ui/components/badge";
-import { Button } from "@dingify/ui/components/button";
+import type { Column } from "@tanstack/react-table"
+import * as React from "react"
+import { Badge } from "@propdock/ui/components/badge"
+import { Button } from "@propdock/ui/components/button"
import {
Command,
CommandEmpty,
@@ -13,22 +10,25 @@ import {
CommandItem,
CommandList,
CommandSeparator,
-} from "@dingify/ui/components/command";
+} from "@propdock/ui/components/command"
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@dingify/ui/components/popover";
-import { Separator } from "@dingify/ui/components/separator";
+} from "@propdock/ui/components/popover"
+import { Separator } from "@propdock/ui/components/separator"
+import { CheckIcon, PlusCircledIcon } from "@radix-ui/react-icons"
+
+import { cn } from "@/lib/utils"
interface DataTableFacetedFilter {
- column?: Column;
- title?: string;
+ column?: Column
+ title?: string
options: {
- label: string;
- value: string;
- icon?: React.ComponentType<{ className?: string }>;
- }[];
+ label: string
+ value: string
+ icon?: React.ComponentType<{ className?: string }>
+ }[]
}
export function DataTableFacetedFilter({
@@ -36,8 +36,8 @@ export function DataTableFacetedFilter({
title,
options,
}: DataTableFacetedFilter) {
- const facets = column?.getFacetedUniqueValues();
- const selectedValues = new Set(column?.getFilterValue() as string[]);
+ const facets = column?.getFacetedUniqueValues()
+ const selectedValues = new Set(column?.getFilterValue() as string[])
return (
@@ -87,7 +87,7 @@ export function DataTableFacetedFilter({
No results found.
{options.map((option) => {
- const isSelected = selectedValues.has(option.value);
+ const isSelected = selectedValues.has(option.value)
return (
({
{option.label}
{/* ... other item logic */}
- );
+ )
})}
{selectedValues.size > 0 && (
@@ -125,5 +125,5 @@ export function DataTableFacetedFilter({
- );
+ )
}
diff --git a/apps/www/src/components/table/dashboard/data-table-toolbar.tsx b/apps/www/src/components/table/dashboard/data-table-toolbar.tsx
index 01b70b96..a5a925c2 100644
--- a/apps/www/src/components/table/dashboard/data-table-toolbar.tsx
+++ b/apps/www/src/components/table/dashboard/data-table-toolbar.tsx
@@ -1,25 +1,24 @@
-"use client";
+"use client"
-import type { Table } from "@tanstack/react-table";
-import { Cross2Icon } from "@radix-ui/react-icons";
+import type { Table } from "@tanstack/react-table"
+import { Button } from "@propdock/ui/components/button"
+import { Input } from "@propdock/ui/components/input"
+import { Cross2Icon } from "@radix-ui/react-icons"
-import { Button } from "@dingify/ui/components/button";
-import { Input } from "@dingify/ui/components/input";
-
-import { DataTableFacetedFilter } from "./data-table-faceted-filter";
-import { DataTableViewOptions } from "./data-table-view-options";
+import { DataTableFacetedFilter } from "./data-table-faceted-filter"
+import { DataTableViewOptions } from "./data-table-view-options"
// import { priorities, statuses } from "../data/data"
-import { propertyLabels, propertyStatuses } from "./propertystatus";
+import { propertyLabels, propertyStatuses } from "./propertystatus"
interface DataTableToolbarProps {
- table: Table;
+ table: Table
}
export function DataTableToolbar({
table,
}: DataTableToolbarProps) {
- const isFiltered = table.getState().columnFilters.length > 0;
+ const isFiltered = table.getState().columnFilters.length > 0
return (
@@ -59,5 +58,5 @@ export function DataTableToolbar({
- );
+ )
}
diff --git a/apps/www/src/components/table/dashboard/data-table-view-options.tsx b/apps/www/src/components/table/dashboard/data-table-view-options.tsx
index 2b88eca7..d9f1bf4b 100644
--- a/apps/www/src/components/table/dashboard/data-table-view-options.tsx
+++ b/apps/www/src/components/table/dashboard/data-table-view-options.tsx
@@ -1,20 +1,19 @@
-"use client";
+"use client"
-import { DropdownMenuTrigger } from "@radix-ui/react-dropdown-menu";
-import { MixerHorizontalIcon } from "@radix-ui/react-icons";
-import { Table } from "@tanstack/react-table";
-
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
import {
DropdownMenu,
DropdownMenuCheckboxItem,
DropdownMenuContent,
DropdownMenuLabel,
DropdownMenuSeparator,
-} from "@dingify/ui/components/dropdown-menu";
+} from "@propdock/ui/components/dropdown-menu"
+import { DropdownMenuTrigger } from "@radix-ui/react-dropdown-menu"
+import { MixerHorizontalIcon } from "@radix-ui/react-icons"
+import { Table } from "@tanstack/react-table"
interface DataTableViewOptionsProps {
- table: Table;
+ table: Table
}
export function DataTableViewOptions({
@@ -39,7 +38,7 @@ export function DataTableViewOptions({
.getAllColumns()
.filter(
(column) =>
- typeof column.accessorFn !== "undefined" && column.getCanHide()
+ typeof column.accessorFn !== "undefined" && column.getCanHide(),
)
.map((column) => {
return (
@@ -51,9 +50,9 @@ export function DataTableViewOptions({
>
{column.id}
- );
+ )
})}
- );
+ )
}
diff --git a/apps/www/src/components/table/dashboard/data-table.tsx b/apps/www/src/components/table/dashboard/data-table.tsx
index 52bb0744..f1bf2d30 100644
--- a/apps/www/src/components/table/dashboard/data-table.tsx
+++ b/apps/www/src/components/table/dashboard/data-table.tsx
@@ -7,25 +7,14 @@ import type {
VisibilityState,
} from "@tanstack/react-table"
import { useState } from "react"
-import {
- flexRender,
- getCoreRowModel,
- getFilteredRowModel,
- getPaginationRowModel,
- getSortedRowModel,
- useReactTable,
-} from "@tanstack/react-table"
-import { format } from "date-fns"
-import { nb } from "date-fns/locale"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
Table,
TableBody,
@@ -33,7 +22,17 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
+import {
+ flexRender,
+ getCoreRowModel,
+ getFilteredRowModel,
+ getPaginationRowModel,
+ getSortedRowModel,
+ useReactTable,
+} from "@tanstack/react-table"
+import { format } from "date-fns"
+import { nb } from "date-fns/locale"
import InfoCard from "../info-card"
import { DataTableToolbar } from "./data-table-toolbar"
diff --git a/apps/www/src/components/table/floors/floors-table.tsx b/apps/www/src/components/table/floors/floors-table.tsx
index 62cfdf09..770e7cd6 100644
--- a/apps/www/src/components/table/floors/floors-table.tsx
+++ b/apps/www/src/components/table/floors/floors-table.tsx
@@ -7,21 +7,12 @@ import {
quickDeleteOfficeSpace,
} from "@/actions/create-quick-office-space"
import { quickDeleteFloor } from "@/actions/update-floor-details"
-import {
- ChevronDown,
- MinusCircle,
- MoreHorizontal,
- PlusCircle,
- Trash2,
-} from "lucide-react"
-import { toast } from "sonner"
-
-import { Button } from "@dingify/ui/components/button"
+import { Button } from "@propdock/ui/components/button"
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
-} from "@dingify/ui/components/collapsible"
+} from "@propdock/ui/components/collapsible"
import {
DropdownMenu,
DropdownMenuContent,
@@ -30,7 +21,7 @@ import {
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu"
+} from "@propdock/ui/components/dropdown-menu"
import {
Table,
TableBody,
@@ -38,13 +29,21 @@ import {
TableHead,
TableHeader,
TableRow,
-} from "@dingify/ui/components/table"
+} from "@propdock/ui/components/table"
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
-} from "@dingify/ui/components/tooltip"
+} from "@propdock/ui/components/tooltip"
+import {
+ ChevronDown,
+ MinusCircle,
+ MoreHorizontal,
+ PlusCircle,
+ Trash2,
+} from "lucide-react"
+import { toast } from "sonner"
import { AddOfficeSpaceSheet } from "@/components/buttons/AddOfficeSpaceSheet"
import { EditFloorDetailsSheet } from "@/components/buttons/EditFloorDetailsSheet"
diff --git a/apps/www/src/components/table/info-card.tsx b/apps/www/src/components/table/info-card.tsx
index 8bba1fe1..ef51c88a 100644
--- a/apps/www/src/components/table/info-card.tsx
+++ b/apps/www/src/components/table/info-card.tsx
@@ -1,8 +1,5 @@
-import { format } from "date-fns"
-import { File, MoreHorizontal, Pencil, Trash } from "lucide-react"
-
-import { Badge } from "@dingify/ui/components/badge"
-import { Button } from "@dingify/ui/components/button"
+import { Badge } from "@propdock/ui/components/badge"
+import { Button } from "@propdock/ui/components/button"
import {
Card,
CardContent,
@@ -10,15 +7,17 @@ import {
CardFooter,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu"
-import { Separator } from "@dingify/ui/components/separator"
+} from "@propdock/ui/components/dropdown-menu"
+import { Separator } from "@propdock/ui/components/separator"
+import { format } from "date-fns"
+import { File, MoreHorizontal, Pencil, Trash } from "lucide-react"
function formatNOK(amount: number): string {
const formatter = new Intl.NumberFormat("no-NO", {
diff --git a/apps/www/src/components/table/tenant/columns.tsx b/apps/www/src/components/table/tenant/columns.tsx
index 6927af11..5cd715a0 100644
--- a/apps/www/src/components/table/tenant/columns.tsx
+++ b/apps/www/src/components/table/tenant/columns.tsx
@@ -3,12 +3,8 @@
import type { ColumnDef } from "@tanstack/react-table"
import Link from "next/link"
import { deleteTenant } from "@/actions/delete-tenant"
-import format from "date-fns/format"
-import { ArrowUpDown, MoreHorizontal } from "lucide-react"
-import { toast } from "sonner"
-
-import { Badge } from "@dingify/ui/components/badge"
-import { Button } from "@dingify/ui/components/button"
+import { Badge } from "@propdock/ui/components/badge"
+import { Button } from "@propdock/ui/components/button"
import {
DropdownMenu,
DropdownMenuContent,
@@ -17,7 +13,10 @@ import {
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuTrigger,
-} from "@dingify/ui/components/dropdown-menu"
+} from "@propdock/ui/components/dropdown-menu"
+import format from "date-fns/format"
+import { ArrowUpDown, MoreHorizontal } from "lucide-react"
+import { toast } from "sonner"
import { EditTenantSheet } from "@/components/buttons/EditTenantSheet"
diff --git a/apps/www/src/components/tenant/TenantSendInvoice.tsx b/apps/www/src/components/tenant/TenantSendInvoice.tsx
index 6406e459..22429ab1 100644
--- a/apps/www/src/components/tenant/TenantSendInvoice.tsx
+++ b/apps/www/src/components/tenant/TenantSendInvoice.tsx
@@ -3,21 +3,8 @@
import { useEffect, useState } from "react"
import { createInvoice } from "@/actions/create-invoice"
import { zodResolver } from "@hookform/resolvers/zod"
-import { addDays, differenceInCalendarDays, format } from "date-fns"
-import { nb } from "date-fns/locale"
-import {
- CalendarIcon,
- Check,
- ChevronsUpDown,
- PlusIcon,
- SendIcon,
-} from "lucide-react"
-import { useForm, useWatch } from "react-hook-form"
-import { toast } from "sonner"
-import { z } from "zod"
-
-import { Button } from "@dingify/ui/components/button"
-import { Calendar } from "@dingify/ui/components/calendar"
+import { Button } from "@propdock/ui/components/button"
+import { Calendar } from "@propdock/ui/components/calendar"
import {
Command,
CommandEmpty,
@@ -25,7 +12,7 @@ import {
CommandInput,
CommandItem,
CommandList,
-} from "@dingify/ui/components/command"
+} from "@propdock/ui/components/command"
import {
Form,
FormControl,
@@ -34,15 +21,27 @@ import {
FormItem,
FormLabel,
FormMessage,
-} from "@dingify/ui/components/form"
-import { Input } from "@dingify/ui/components/input"
+} from "@propdock/ui/components/form"
+import { Input } from "@propdock/ui/components/input"
import {
Popover,
PopoverContent,
PopoverTrigger,
-} from "@dingify/ui/components/popover"
-import { Separator } from "@dingify/ui/components/separator"
-import { Textarea } from "@dingify/ui/components/textarea"
+} from "@propdock/ui/components/popover"
+import { Separator } from "@propdock/ui/components/separator"
+import { Textarea } from "@propdock/ui/components/textarea"
+import { addDays, differenceInCalendarDays, format } from "date-fns"
+import { nb } from "date-fns/locale"
+import {
+ CalendarIcon,
+ Check,
+ ChevronsUpDown,
+ PlusIcon,
+ SendIcon,
+} from "lucide-react"
+import { useForm, useWatch } from "react-hook-form"
+import { toast } from "sonner"
+import { z } from "zod"
import { cn } from "@/lib/utils"
diff --git a/apps/www/src/components/ui/bento-grid.tsx b/apps/www/src/components/ui/bento-grid.tsx
index 5ec43f1f..b64f2f03 100644
--- a/apps/www/src/components/ui/bento-grid.tsx
+++ b/apps/www/src/components/ui/bento-grid.tsx
@@ -1,16 +1,15 @@
-import { ReactNode } from "react";
-import { ArrowRightIcon } from "@radix-ui/react-icons";
+import { ReactNode } from "react"
+import { Button } from "@propdock/ui/components/button"
+import { ArrowRightIcon } from "@radix-ui/react-icons"
-import { Button } from "@dingify/ui/components/button";
-
-import { cn } from "@/lib/utils";
+import { cn } from "@/lib/utils"
const BentoGrid = ({
children,
className,
}: {
- children: ReactNode;
- className?: string;
+ children: ReactNode
+ className?: string
}) => {
return (
{children}
- );
-};
+ )
+}
const BentoCard = ({
name,
@@ -33,13 +32,13 @@ const BentoCard = ({
href,
cta,
}: {
- name: string;
- className: string;
- background: ReactNode;
- Icon: any;
- description: string;
- href: string;
- cta: string;
+ name: string
+ className: string
+ background: ReactNode
+ Icon: any
+ description: string
+ href: string
+ cta: string
}) => (
-);
+)
-export { BentoCard, BentoGrid };
+export { BentoCard, BentoGrid }
diff --git a/apps/www/src/components/ui/bento-section-landing.tsx b/apps/www/src/components/ui/bento-section-landing.tsx
index 7bbf75a7..d1f85649 100644
--- a/apps/www/src/components/ui/bento-section-landing.tsx
+++ b/apps/www/src/components/ui/bento-section-landing.tsx
@@ -1,6 +1,3 @@
-import { CalendarIcon, FileTextIcon, InputIcon } from "@radix-ui/react-icons"
-import { BellIcon, MapIcon, Share2Icon } from "lucide-react"
-
import {
Command,
CommandEmpty,
@@ -8,7 +5,9 @@ import {
CommandInput,
CommandItem,
CommandList,
-} from "@dingify/ui/components/command"
+} from "@propdock/ui/components/command"
+import { CalendarIcon, FileTextIcon, InputIcon } from "@radix-ui/react-icons"
+import { BellIcon, MapIcon, Share2Icon } from "lucide-react"
import { cn } from "@/lib/utils"
diff --git a/apps/www/src/components/ui/feature-card.tsx b/apps/www/src/components/ui/feature-card.tsx
index 37d5b941..5e41999f 100644
--- a/apps/www/src/components/ui/feature-card.tsx
+++ b/apps/www/src/components/ui/feature-card.tsx
@@ -1,5 +1,4 @@
-import { ReactNode } from "react";
-
+import { ReactNode } from "react"
import {
Command,
CommandEmpty,
@@ -7,17 +6,17 @@ import {
CommandInput,
CommandItem,
CommandList,
-} from "@dingify/ui/components/command";
+} from "@propdock/ui/components/command"
-import { cn } from "@/lib/utils";
+import { cn } from "@/lib/utils"
interface FeatureCardProps {
- Icon: ReactNode;
- name: string;
- description: string;
- href: string;
- cta: string;
- background: ReactNode;
+ Icon: ReactNode
+ name: string
+ description: string
+ href: string
+ cta: string
+ background: ReactNode
}
export function FeatureCard({
@@ -44,5 +43,5 @@ export function FeatureCard({
{cta}
- );
+ )
}
diff --git a/apps/www/src/components/users/EmailButton.tsx b/apps/www/src/components/users/EmailButton.tsx
index 11f8048d..937998a6 100644
--- a/apps/www/src/components/users/EmailButton.tsx
+++ b/apps/www/src/components/users/EmailButton.tsx
@@ -1,24 +1,24 @@
-"use client";
+"use client"
-import { Button } from "@dingify/ui/components/button";
+import { Button } from "@propdock/ui/components/button"
interface EmailButtonProps {
- email: string;
- subject: string;
- body: string;
+ email: string
+ subject: string
+ body: string
}
const EmailButton: React.FC = ({ email, subject, body }) => {
const handleClick = () => {
- const mailtoLink = `mailto:${email}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
- window.location.href = mailtoLink;
- };
+ const mailtoLink = `mailto:${email}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`
+ window.location.href = mailtoLink
+ }
return (
- );
-};
+ )
+}
-export default EmailButton;
+export default EmailButton
diff --git a/apps/www/src/components/users/UserCardsSection.tsx b/apps/www/src/components/users/UserCardsSection.tsx
index 514f1381..bab17dc9 100644
--- a/apps/www/src/components/users/UserCardsSection.tsx
+++ b/apps/www/src/components/users/UserCardsSection.tsx
@@ -1,11 +1,10 @@
-import { differenceInDays, format, formatDistanceToNow } from "date-fns"
-
import {
Card,
CardContent,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
+import { differenceInDays, format, formatDistanceToNow } from "date-fns"
import { EmptyPlaceholder } from "../shared/empty-placeholder"
diff --git a/apps/www/src/components/users/UserChartActivity.tsx b/apps/www/src/components/users/UserChartActivity.tsx
index 74e633c3..f5be10c7 100644
--- a/apps/www/src/components/users/UserChartActivity.tsx
+++ b/apps/www/src/components/users/UserChartActivity.tsx
@@ -1,12 +1,4 @@
-"use client";
-
-import {
- Legend,
- Line,
- LineChart,
- ResponsiveContainer,
- Tooltip,
-} from "recharts";
+"use client"
import {
Card,
@@ -14,9 +6,10 @@ import {
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
+import { Legend, Line, LineChart, ResponsiveContainer, Tooltip } from "recharts"
-import { nFormatter } from "@/lib/utils";
+import { nFormatter } from "@/lib/utils"
const lineChartData = [
{ month: "Jan", revenue: 400000, costs: 240000 },
@@ -31,12 +24,12 @@ const lineChartData = [
{ month: "Okt", revenue: 390000, costs: 46000 },
{ month: "Nov", revenue: 139000, costs: 22000 },
{ month: "Des", revenue: 240000, costs: 19000 },
-];
+]
// Add net income to each data point
lineChartData.forEach((data) => {
- data.netIncome = data.revenue - data.costs;
-});
+ data.netIncome = data.revenue - data.costs
+})
export function UserChartActivity() {
return (
@@ -80,10 +73,10 @@ export function UserChartActivity() {
- );
+ )
}
- return null;
+ return null
}}
/>
- );
+ )
}
diff --git a/apps/www/src/components/users/UserContactPerson.tsx b/apps/www/src/components/users/UserContactPerson.tsx
index f3e8cd00..bf221660 100644
--- a/apps/www/src/components/users/UserContactPerson.tsx
+++ b/apps/www/src/components/users/UserContactPerson.tsx
@@ -4,7 +4,7 @@ import {
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card"
+} from "@propdock/ui/components/card"
import { AddContactPersonSheet } from "../buttons/AddContactPersonSheet"
import { EmptyPlaceholder } from "../shared/empty-placeholder"
diff --git a/apps/www/src/components/users/UserEmailCard.tsx b/apps/www/src/components/users/UserEmailCard.tsx
index 6acd1a37..e1e6f188 100644
--- a/apps/www/src/components/users/UserEmailCard.tsx
+++ b/apps/www/src/components/users/UserEmailCard.tsx
@@ -4,14 +4,14 @@ import {
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
-import EmailButton from "./EmailButton"; // Adjust the import path as necessary
+import EmailButton from "./EmailButton" // Adjust the import path as necessary
export default function UserEmailCard({ tenantDetails }) {
- const email = tenantDetails.email || "example@example.com";
- const name = tenantDetails.name || "[Customer Name]";
- const subject = "Checking In: How's Your Experience with [Your Product]?";
+ const email = tenantDetails.email || "example@example.com"
+ const name = tenantDetails.name || "[Customer Name]"
+ const subject = "Checking In: How's Your Experience with [Your Product]?"
const body = `
Hi ${name},
@@ -25,7 +25,7 @@ export default function UserEmailCard({ tenantDetails }) {
[Your Name]
[Your Contact Information]
- `;
+ `
return (
@@ -40,5 +40,5 @@ export default function UserEmailCard({ tenantDetails }) {
- );
+ )
}
diff --git a/apps/www/src/components/users/UsersDashboardTable.tsx b/apps/www/src/components/users/UsersDashboardTable.tsx
index e9e4b36a..3bff73e5 100644
--- a/apps/www/src/components/users/UsersDashboardTable.tsx
+++ b/apps/www/src/components/users/UsersDashboardTable.tsx
@@ -1,20 +1,19 @@
-import { format } from "date-fns";
-
-import { Badge } from "@dingify/ui/components/badge";
+import { Badge } from "@propdock/ui/components/badge"
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
-} from "@dingify/ui/components/card";
+} from "@propdock/ui/components/card"
import {
Table,
TableBody,
TableCell,
TableHead,
TableRow,
-} from "@dingify/ui/components/table";
+} from "@propdock/ui/components/table"
+import { format } from "date-fns"
// Sample transaction data
const transactions = [
@@ -58,7 +57,7 @@ const transactions = [
paymentMethod: "Tripletex",
paid: true,
},
-];
+]
export default function UsersDashboardTable({ tenantDetails }) {
return (
@@ -100,5 +99,5 @@ export default function UsersDashboardTable({ tenantDetails }) {
- );
+ )
}