diff --git a/frontend/src/AgroRentAI/RentAdminDashboard.jsx b/frontend/src/AgroRentAI/RentAdminDashboard.jsx index d66fa060..430760d8 100644 --- a/frontend/src/AgroRentAI/RentAdminDashboard.jsx +++ b/frontend/src/AgroRentAI/RentAdminDashboard.jsx @@ -1,10 +1,16 @@ import React, { useState, useEffect } from "react"; -import { User, BarChart, Box, Package, Bell } from "lucide-react"; +import { User, BarChart, Box, Package, Bell, DollarSign, Tag, MessageSquare, Settings, FileText, Shield } from "lucide-react"; import ProductManagement from "./components/AdminProductManagement"; import OrderManagement from "./components/AdminOrderManagement"; import UserManagement from "./components/AdminUserManagement"; import Analytics from "./components/AdminAnalytics"; import { toast } from 'react-toastify'; // Make sure to add this import if using toast +import SalesRevenueAnalytics from "./components/AdminSalesAnalytics"; +import MarketingPromotions from "./components/AdminMarketing"; +import CustomerSupportReviews from "./components/AdminCustomerSupport"; +import SettingsConfiguration from "./components/AdminSettings"; +import ReportsDataExport from "./components/AdminReport"; +import SecurityAuditLogs from "./components/AdminSecurity"; const RentAdminDashboard = () => { const [activeSection, setActiveSection] = useState("Product Management"); @@ -253,6 +259,18 @@ const RentAdminDashboard = () => { return ; case "Analytics & Reporting": return ; + case "Sales & Revenue Analytics": + return ; + case "Marketing & Promotions": + return ; + case "Customer Support & Reviews": + return ; + case "Settings & Configuration": + return ; + case "Reports and Data Export": + return ; + case "Security & Audit Logs": + return ; default: return null; } @@ -275,6 +293,24 @@ const RentAdminDashboard = () => {
  • setActiveSection("Analytics & Reporting")}> Analytics & Reporting
  • +
  • setActiveSection("Sales & Revenue Analytics")}> + Sales & Revenue Analytics +
  • +
  • setActiveSection("Marketing & Promotions")}> + Marketing & Promotions +
  • +
  • setActiveSection("Customer Support & Reviews")}> + Customer Support & Reviews +
  • +
  • setActiveSection("Settings & Configuration")}> + Settings & Configuration +
  • +
  • setActiveSection("Reports and Data Export")}> + Reports and Data Export +
  • +
  • setActiveSection("Security & Audit Logs")}> + Security & Audit Logs +
  • diff --git a/frontend/src/AgroRentAI/components/AdminCustomerSupport.jsx b/frontend/src/AgroRentAI/components/AdminCustomerSupport.jsx new file mode 100644 index 00000000..1f95e331 --- /dev/null +++ b/frontend/src/AgroRentAI/components/AdminCustomerSupport.jsx @@ -0,0 +1,94 @@ +import React from "react"; +import { MessageCircle, ThumbsUp, AlertTriangle, Clock } from "lucide-react"; + +const CustomerSupportReviews = () => { + const supportData = { + unresolvedTickets: 3, + recentReviews: ["Great service!", "Loved the product!", "Could be better..."], + avgResponseTime: "2 hours", + satisfactionRating: "85%", + frequentIssues: ["Shipping delays", "Product quality", "Account access issues"] + }; + + return ( +
    +

    + Customer Support & Reviews +

    + + {/* Unresolved Tickets */} +
    +

    + Unresolved Tickets +

    +

    + Open Tickets: {supportData.unresolvedTickets} +

    + +
    + + {/* Average Response Time */} +
    +

    + Average Response Time +

    +

    + Response Time: {supportData.avgResponseTime} +

    + +
    + + {/* Customer Satisfaction Rating */} +
    +

    + Customer Satisfaction +

    +

    + Satisfaction Rating: {supportData.satisfactionRating} +

    + +
    + + {/* Frequent Issues */} +
    +

    + Frequent Issues +

    +

    + Top Issues: {supportData.frequentIssues.join(", ")} +

    + +
    + + {/* Recent Reviews */} +
    +

    + Recent Reviews +

    +

    + Customer Feedback: {supportData.recentReviews.join(", ")} +

    + +
    + + {/* General Support Overview Button */} +
    + +
    +
    + ); +}; + +export default CustomerSupportReviews; diff --git a/frontend/src/AgroRentAI/components/AdminMarketing.jsx b/frontend/src/AgroRentAI/components/AdminMarketing.jsx new file mode 100644 index 00000000..51be4385 --- /dev/null +++ b/frontend/src/AgroRentAI/components/AdminMarketing.jsx @@ -0,0 +1,94 @@ +import React from "react"; +import { Tag, Gift, Users, TrendingUp } from "lucide-react"; + +const MarketingPromotions = () => { + const promotionsData = { + activeCampaigns: ["Spring Sale", "Holiday Discounts"], + discountCodes: ["SAVE10", "FREESHIP"], + upcomingCampaigns: ["Back to School", "Black Friday"], + customerSegments: ["New Customers", "Returning Customers", "High Spenders"], + campaignPerformance: { + totalReach: "50,000", + conversionRate: "12%", + revenueGenerated: "$30,000" + } + }; + + return ( +
    +

    + Marketing & Promotions +

    + + {/* Active Campaigns */} +
    +

    + Active Campaigns +

    +

    + Campaigns: {promotionsData.activeCampaigns.join(", ")} +

    +

    + Discount Codes: {promotionsData.discountCodes.join(", ")} +

    + +
    + + {/* Upcoming Campaigns */} +
    +

    + Upcoming Campaigns +

    +

    + Next Campaigns: {promotionsData.upcomingCampaigns.join(", ")} +

    + +
    + + {/* Customer Segments */} +
    +

    + Targeted Customer Segments +

    +

    + Segments: {promotionsData.customerSegments.join(", ")} +

    + +
    + + {/* Campaign Performance */} +
    +

    + Campaign Performance +

    +

    + Total Reach: {promotionsData.campaignPerformance.totalReach} +

    +

    + Conversion Rate: {promotionsData.campaignPerformance.conversionRate} +

    +

    + Revenue Generated: {promotionsData.campaignPerformance.revenueGenerated} +

    + +
    + + {/* General Analytics Button */} +
    + +
    +
    + ); +}; + +export default MarketingPromotions; diff --git a/frontend/src/AgroRentAI/components/AdminReport.jsx b/frontend/src/AgroRentAI/components/AdminReport.jsx new file mode 100644 index 00000000..dcc93931 --- /dev/null +++ b/frontend/src/AgroRentAI/components/AdminReport.jsx @@ -0,0 +1,83 @@ +import React from "react"; +import { FileText, Download, BarChart, User, Layers, Activity } from "lucide-react"; + +const ReportsDataExport = () => { + return ( +
    +

    + Reports and Data Export +

    + + {/* General Overview */} +
    +

    + Export Overview +

    +

    + Generate comprehensive reports on sales, user activity, inventory, and performance metrics. +

    + +
    + + {/* Individual Report Options */} +
    + + {/* Sales Report */} +
    +

    + Sales Report +

    +

    Download sales data and performance by product and region.

    + +
    + + {/* User Activity Report */} +
    +

    + User Activity Report +

    +

    Access insights on user engagement, sessions, and feedback.

    + +
    + + {/* Inventory Report */} +
    +

    + Inventory Report +

    +

    Export current inventory levels, low stock alerts, and product stats.

    + +
    + + {/* Performance Metrics Report */} +
    +

    + Performance Metrics +

    +

    Analyze website performance metrics, traffic, and conversion rates.

    + +
    + +
    + + {/* General Reports Overview Button */} +
    + +
    +
    + ); +}; + +export default ReportsDataExport; diff --git a/frontend/src/AgroRentAI/components/AdminSalesAnalytics.jsx b/frontend/src/AgroRentAI/components/AdminSalesAnalytics.jsx new file mode 100644 index 00000000..3535a5a5 --- /dev/null +++ b/frontend/src/AgroRentAI/components/AdminSalesAnalytics.jsx @@ -0,0 +1,88 @@ +import React from "react"; +import { DollarSign, TrendingUp, ShoppingCart, Percent } from "lucide-react"; + +const SalesRevenueAnalytics = () => { + const salesData = { + totalSales: "$120,000", + totalOrders: 3200, + averageOrderValue: "$37.50", + refundRate: "2%", + monthlyGrowth: 10, + topProducts: ["Product X", "Product Y", "Product Z"], + }; + + return ( +
    +

    + Sales & Revenue Analytics +

    + + {/* Total Sales */} +
    +

    + Total Sales +

    +

    + Revenue: {salesData.totalSales} +

    +

    + Monthly Growth: {salesData.monthlyGrowth}% +

    + +
    + + {/* Total Orders */} +
    +

    + Total Orders +

    +

    + Orders: {salesData.totalOrders} +

    +

    + Average Order Value: {salesData.averageOrderValue} +

    + +
    + + {/* Refund Rate */} +
    +

    + Refund Rate +

    +

    + Refund Rate: {salesData.refundRate} +

    + +
    + + {/* Top Products */} +
    +

    + Top Products +

    +

    + Top Selling Products: {salesData.topProducts.join(", ")} +

    + +
    + + {/* General Analytics Button */} +
    + +
    +
    + ); +}; + +export default SalesRevenueAnalytics; diff --git a/frontend/src/AgroRentAI/components/AdminSecurity.jsx b/frontend/src/AgroRentAI/components/AdminSecurity.jsx new file mode 100644 index 00000000..a7e7ccc9 --- /dev/null +++ b/frontend/src/AgroRentAI/components/AdminSecurity.jsx @@ -0,0 +1,86 @@ +import React from "react"; +import { Shield, Lock, Eye, FileText, Download, AlertTriangle } from "lucide-react"; +const SecurityAuditLogs = () => { + return ( +
    +

    + Security & Audit Logs +

    + + {/* Overview Section */} +
    +

    + Security Overview +

    +

    + Monitor recent security events, track admin activities, audit user permissions, and export logs. +

    + +
    + + {/* Security Options Grid */} +
    + {/* Admin Activity Logs */} +
    +

    + Admin Activity Logs +

    +

    Track all actions performed by administrators within the platform.

    + +
    + + {/* User Access Permissions */} +
    +

    + User Access Permissions +

    +

    Audit and manage user permissions to ensure secure access controls.

    + +
    + + {/* Suspicious Activity Alerts */} +
    +

    + Suspicious Activity Alerts +

    +

    Review and investigate suspicious activities and potential threats.

    + +
    + + {/* Export Logs */} +
    +

    + Export Logs +

    +

    Generate and export security-related logs in CSV format.

    + +
    +
    + + {/* Alerts or Summary Section */} +
    +

    + Security Summary +

    +

    + Review the summary of the latest security audits and any potential risks associated with recent actions. +

    + +
    +
    + ); +}; + +export default SecurityAuditLogs; diff --git a/frontend/src/AgroRentAI/components/AdminSettings.jsx b/frontend/src/AgroRentAI/components/AdminSettings.jsx new file mode 100644 index 00000000..7819e2ba --- /dev/null +++ b/frontend/src/AgroRentAI/components/AdminSettings.jsx @@ -0,0 +1,104 @@ +import React from "react"; +import { Settings, Sliders, CreditCard, Truck, DollarSign, Bell, Users } from "lucide-react"; + +const SettingsConfiguration = () => { + return ( +
    +

    + Settings & Configuration +

    + + {/* General Overview */} +
    +

    + Platform Settings Overview +

    +

    + Customize your platform settings, including payments, shipping, taxes, notifications, and user roles. +

    + +
    + + {/* Individual Settings Sections */} +
    + + {/* Payment Settings */} +
    +

    + Payment Settings +

    +

    Set up and manage payment methods, currency, and refund policies.

    + +
    + + {/* Shipping Settings */} +
    +

    + Shipping Settings +

    +

    Define shipping regions, rates, and carrier integrations.

    + +
    + + {/* Tax Settings */} +
    +

    + Tax Settings +

    +

    Configure tax rates and rules for different regions and product types.

    + +
    + + {/* Notification Settings */} +
    +

    + Notification Settings +

    +

    Set up notifications for order updates, promotions, and alerts.

    + +
    + + {/* User Role Settings */} +
    +

    + User Role Settings +

    +

    Define roles and permissions for users and team members.

    + +
    + + {/* Advanced Configuration */} +
    +

    + Advanced Configuration +

    +

    Access advanced settings for integrations, APIs, and platform customization.

    + +
    +
    + + {/* General Settings Overview Button */} +
    + +
    +
    + ); +}; + +export default SettingsConfiguration;