Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Properties from "@/pages/Properties";
import Sidebar from "@/components/layout/Sidebar";
import Header from "@/components/layout/Header";
import Connections from "@/pages/Connections";
import Dashboard from "@/pages/Dashboard";
import { User } from "@shared/schema";
import { ThemeProvider } from "@/contexts/ThemeContext";
import { TenantProvider } from "@/contexts/TenantContext";
Expand All @@ -31,6 +32,7 @@ function Router() {
<main className="flex-1 relative overflow-y-auto cf-scrollbar focus:outline-none bg-[hsl(var(--cf-base))]">
<Switch>
<Route path="/" component={Properties} />
<Route path="/dashboard" component={Dashboard} />
<Route path="/properties/:id" component={PropertyDetail} />
<Route path="/connections" component={Connections} />
<Route path="/admin" component={Admin} />
Expand Down
14 changes: 13 additions & 1 deletion client/src/components/layout/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
import { Bell, Search, Command } from "lucide-react";
import { useRole } from "@/contexts/RoleContext";
import { useLocation } from "wouter";
import { TenantSwitcher } from "./TenantSwitcher";

const PAGE_LABELS: Record<string, string> = {
'/': 'Portfolio',
'/dashboard': 'Dashboard',
'/connections': 'Connections',
'/admin': 'Admin',
'/settings': 'Settings',
};

export default function Header() {
const { currentRole, roleConfig } = useRole();
const [location] = useLocation();
const pageLabel = PAGE_LABELS[location] || (location.startsWith('/properties/') ? 'Property Detail' : 'Overview');

return (
<header className="flex items-center h-14 px-4 border-b border-[hsl(var(--cf-border-subtle))] bg-[hsl(var(--cf-void))]">
{/* Tenant Switcher / Breadcrumb */}
<div className="flex items-center gap-2 min-w-0">
<TenantSwitcher />
<span className="text-[hsl(var(--cf-text-muted))]">/</span>
<span className="text-sm text-[hsl(var(--cf-text-secondary))] truncate">
Overview
{pageLabel}
</span>
</div>

Expand Down
18 changes: 5 additions & 13 deletions client/src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Link, useLocation } from "wouter";
import { cn } from "@/lib/utils";
import {
BarChart3, ArrowLeftRight, FileText, Receipt,
Settings, Plug, Building2, Users, BookOpen, Calculator, Shield,
ChevronDown, ChevronRight, ChevronsUpDown, Wallet,
Menu, X, Activity
Settings, Plug, Building2, Shield,
ChevronDown, ChevronRight, ChevronsUpDown,
Menu, X, Activity, LayoutDashboard
} from "lucide-react";
import { useState, useMemo } from "react";
import { useRole, type UserRole } from "@/contexts/RoleContext";
Expand All @@ -21,14 +20,7 @@ interface NavItem {

const NAV_ITEMS: NavItem[] = [
{ href: "/", label: "Portfolio", icon: Building2, roles: ["cfo", "accountant", "bookkeeper", "user"] },
{ href: "/accounts", label: "Accounts", icon: Wallet, roles: ["cfo", "accountant", "bookkeeper"] },
{ href: "/transactions", label: "Transactions", icon: ArrowLeftRight, roles: ["cfo", "accountant", "bookkeeper", "user"] },
{ href: "/reports", label: "Reports", icon: BarChart3, roles: ["cfo", "accountant"] },
{ href: "/reconciliation", label: "Reconciliation", icon: Calculator, roles: ["accountant", "bookkeeper"] },
{ href: "/invoices", label: "Invoices", icon: FileText, roles: ["cfo", "accountant", "bookkeeper"] },
{ href: "/expenses", label: "Expenses", icon: Receipt, roles: ["user"] },
{ href: "/journal", label: "Journal", icon: BookOpen, roles: ["accountant"] },
{ href: "/team", label: "Team", icon: Users, roles: ["cfo"] },
{ href: "/dashboard", label: "Dashboard", icon: LayoutDashboard, roles: ["cfo", "accountant", "bookkeeper", "user"] },
{ href: "/connections", label: "Connections", icon: Plug, roles: ["cfo", "accountant"] },
{ href: "/admin", label: "Admin", icon: Shield, roles: ["cfo"] },
{ href: "/settings", label: "Settings", icon: Settings, roles: ["cfo", "accountant", "bookkeeper", "user"] },
Expand Down Expand Up @@ -196,7 +188,7 @@ export default function Sidebar() {
const [location] = useLocation();
const [mobileOpen, setMobileOpen] = useState(false);
const { currentRole } = useRole();
const { currentTenant, tenants, switchTenant, isSystemMode } = useTenant();
const { currentTenant, tenants, switchTenant } = useTenant();
const [entityExpanded, setEntityExpanded] = useState(true);

const entityTree = useMemo(() => buildEntityTree(tenants), [tenants]);
Expand Down
2 changes: 0 additions & 2 deletions client/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export function getServiceIcon(serviceType: string): React.ReactNode {
const iconMap: Record<string, string> = {
'mercury_bank': 'M',
'wavapps': 'W',
'doorloop': 'D',
'stripe': 'S',
'quickbooks': 'Q',
'xero': 'X',
Expand All @@ -87,7 +86,6 @@ export function getServiceColor(serviceType: string): string {
const colorMap: Record<string, string> = {
'mercury_bank': 'bg-blue-500',
'wavapps': 'bg-teal-500',
'doorloop': 'bg-orange-500',
'stripe': 'bg-purple-500',
'quickbooks': 'bg-green-500',
'xero': 'bg-blue-400',
Expand Down
2 changes: 0 additions & 2 deletions client/src/pages/Admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const SERVICES: ServiceHealth[] = [
{ name: "ChittyCommand", url: "command.chitty.cc", status: "healthy", latency: 67, lastCheck: "1m ago", version: "3.1.0" },
{ name: "ChittyRegister", url: "register.chitty.cc", status: "healthy", latency: 31, lastCheck: "1m ago", version: "1.0.5" },
{ name: "ChittyRouter", url: "router.chitty.cc", status: "degraded", latency: 234, lastCheck: "2m ago", version: "1.1.0" },
{ name: "DoorLoop", url: "api.doorloop.com", status: "unknown", lastCheck: "—" },
{ name: "Wave Accounting", url: "api.waveapps.com", status: "healthy", latency: 156, lastCheck: "5m ago" },
];

Expand All @@ -51,7 +50,6 @@ const INTEGRATIONS: IntegrationConfig[] = [
{ name: "Wave Accounting", configured: true, envVars: ["WAVE_CLIENT_ID", "WAVE_CLIENT_SECRET"], status: "active", lastSync: "1h ago" },
{ name: "Stripe Payments", configured: true, envVars: ["STRIPE_SECRET_KEY", "STRIPE_WEBHOOK_SECRET"], status: "active", lastSync: "5m ago" },
{ name: "OpenAI (GPT-4o)", configured: true, envVars: ["OPENAI_API_KEY"], status: "active" },
{ name: "DoorLoop", configured: false, envVars: ["DOORLOOP_API_KEY"], status: "inactive" },
{ name: "GitHub", configured: true, envVars: ["GITHUB_TOKEN"], status: "active" },
];

Expand Down
15 changes: 2 additions & 13 deletions client/src/pages/ConnectAccounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { useToast } from "@/hooks/use-toast";
import { useLocation } from "wouter";
import { apiRequest } from "@/lib/queryClient";
import { Building, CreditCard, DollarSign, BarChart4, Home, CreditCard as CreditCardIcon } from "lucide-react";
import { Building, CreditCard, DollarSign, BarChart4, CreditCard as CreditCardIcon } from "lucide-react";
import { AuthContext } from "../App";

// Service connection card component
Expand Down Expand Up @@ -54,7 +54,7 @@ export default function ConnectAccounts() {
const [loading, setLoading] = useState(false);
const [apiKey, setApiKey] = useState("");
const [connectedServices, setConnectedServices] = useState<string[]>([
"mercury_bank", "doorloop" // Default connected services
"mercury_bank" // Default connected services
]);

// Redirect to login if not authenticated
Expand Down Expand Up @@ -124,7 +124,6 @@ export default function ConnectAccounts() {
"quickbooks": "QuickBooks",
"xero": "Xero Accounting",
"wavapps": "WavApps",
"doorloop": "DoorLoop",
"brex": "Brex",
"gusto": "Gusto Payroll"
};
Expand All @@ -138,7 +137,6 @@ export default function ConnectAccounts() {
"quickbooks": "Accounting Software",
"xero": "Global Accounting Platform",
"wavapps": "Financial Software",
"doorloop": "Property Management",
"brex": "Business Credit & Expenses",
"gusto": "Payroll & HR"
};
Expand All @@ -157,8 +155,6 @@ export default function ConnectAccounts() {
return <BarChart4 size={size} />;
case "brex":
return <CreditCardIcon size={size} />;
case "doorloop":
return <Home size={size} />;
case "xero":
return <BarChart4 size={size} />;
case "gusto":
Expand Down Expand Up @@ -239,13 +235,6 @@ export default function ConnectAccounts() {
connected={connectedServices.includes("wavapps")}
onConnect={() => handleConnect("wavapps")}
/>
<ServiceCard
name="DoorLoop"
description="Property Management"
icon={getServiceIcon("doorloop", 28)}
connected={connectedServices.includes("doorloop")}
onConnect={() => handleConnect("doorloop")}
/>
</TabsContent>

{/* Payments & Payroll Integrations */}
Expand Down
9 changes: 0 additions & 9 deletions client/src/pages/Connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ const integrationConfigs = [
requiresApproval: false,
features: ['Payment processing', 'Subscription management', 'Customer portal'],
},
{
type: 'doorloop',
name: 'DoorLoop',
description: 'Property management integration for rent collection and maintenance tracking',
icon: '🏠',
docsUrl: 'https://www.doorloop.com',
requiresApproval: false,
features: ['Rent roll', 'Maintenance requests', 'Lease management'],
},
];

export default function Connections() {
Expand Down
Loading
Loading