dashboard update

This commit is contained in:
Jake Kasper
2025-08-21 13:59:49 -05:00
parent 27e5822aff
commit f4ecd68b8a
2 changed files with 265 additions and 13 deletions

View File

@@ -1,4 +1,5 @@
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import { UsersIcon, CogIcon, BuildingOfficeIcon, ChartBarIcon } from '@heroicons/react/24/outline';
import { adminAPI } from '../../services/api';
import LoadingSpinner from '../../components/UI/LoadingSpinner';
@@ -117,17 +118,26 @@ const AdminDashboard = () => {
<div className="card">
<h3 className="text-lg font-semibold text-gray-900 mb-4">Quick Actions</h3>
<div className="space-y-3">
<button className="w-full text-left p-3 rounded-lg border border-gray-200 hover:bg-gray-50 transition-colors">
<Link
to="/admin/users"
className="block w-full text-left p-3 rounded-lg border border-gray-200 hover:bg-gray-50 transition-colors"
>
<div className="font-medium text-gray-900">Manage Users</div>
<div className="text-sm text-gray-500">View and manage user accounts</div>
</button>
<button className="w-full text-left p-3 rounded-lg border border-gray-200 hover:bg-gray-50 transition-colors">
<div className="font-medium text-gray-900">System Settings</div>
<div className="text-sm text-gray-500">Configure system preferences</div>
</button>
<button className="w-full text-left p-3 rounded-lg border border-gray-200 hover:bg-gray-50 transition-colors">
<div className="font-medium text-gray-900">View Logs</div>
<div className="text-sm text-gray-500">Check system and application logs</div>
</Link>
<Link
to="/admin/products"
className="block w-full text-left p-3 rounded-lg border border-gray-200 hover:bg-gray-50 transition-colors"
>
<div className="font-medium text-gray-900">Manage Products</div>
<div className="text-sm text-gray-500">Add and manage lawn care products</div>
</Link>
<button
onClick={() => window.open(`${process.env.REACT_APP_API_URL}/admin/system/health`, '_blank')}
className="w-full text-left p-3 rounded-lg border border-gray-200 hover:bg-gray-50 transition-colors"
>
<div className="font-medium text-gray-900">System Health</div>
<div className="text-sm text-gray-500">Check system status and health</div>
</button>
</div>
</div>