Improve app's language switching and add Omani professionals directory

Fixes RTL layout issues, persists language preference, adds Omani professional directory and translates sidebar navigation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: c5f0c281-8dd8-4846-b452-4a07bcd21062
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/9777c70b-fc38-4831-8d6b-78dfffe041b0/7b0998af-3fae-48c5-b382-eb5130b5525d.jpg
This commit is contained in:
ghaddaditw
2025-06-08 07:04:20 +00:00
parent beb211df0a
commit 2f4868a419
4 changed files with 554 additions and 259 deletions
+18 -11
View File
@@ -1,5 +1,6 @@
import { Link, useLocation } from "wouter";
import { useAuth } from "@/hooks/useAuth";
import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
@@ -16,57 +17,63 @@ import {
BarChart3,
Shield,
Zap,
Monitor
Monitor,
UserCheck
} from "lucide-react";
interface SidebarProps {
className?: string;
}
const navigation = [
const getNavigation = (t: any) => [
{
name: "Dashboard",
name: t('navigation.dashboard'),
href: "/dashboard",
icon: LayoutDashboard,
},
{
name: "Tasks",
name: t('navigation.tasks'),
href: "/tasks",
icon: Calendar,
badge: "3", // This would come from task count
},
{
name: "Finances",
name: t('navigation.finances'),
href: "/finances",
icon: DollarSign,
},
{
name: "Voice Commands",
name: t('navigation.professionals'),
href: "/professionals",
icon: UserCheck,
},
{
name: t('navigation.voice'),
href: "/voice",
icon: Mic,
},
{
name: "AI Assistant",
name: t('navigation.ai'),
href: "/ai",
icon: Brain,
},
];
const managementNavigation = [
const getManagementNavigation = (t: any) => [
{
name: "Analytics",
name: t('navigation.analytics'),
href: "/analytics",
icon: BarChart3,
roles: ["pro", "admin"],
},
{
name: "System Monitor",
name: t('navigation.monitoring'),
href: "/monitoring",
icon: Monitor,
roles: ["pro", "admin"],
},
{
name: "Settings",
name: t('navigation.settings'),
href: "/settings",
icon: Settings,
},