page.tsx 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. 'use client';
  2. import { useRouter } from 'next/navigation';
  3. import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
  4. import { FileText, Layout, Upload, BookOpen } from 'lucide-react';
  5. import Image from 'next/image';
  6. interface AppTile {
  7. id: string;
  8. title: string;
  9. description: string;
  10. icon: React.ReactNode;
  11. href: string;
  12. color: string;
  13. }
  14. export default function DashboardPage() {
  15. const router = useRouter();
  16. const apps: AppTile[] = [
  17. {
  18. id: 'files',
  19. title: 'Files',
  20. description: 'Manage and organize your uploaded files',
  21. icon: <FileText className="w-8 h-8" />,
  22. href: '/files',
  23. color: 'bg-blue-500'
  24. },
  25. {
  26. id: 'layout-configurations',
  27. title: 'Layout Configurations',
  28. description: 'Create and manage layout configurations',
  29. icon: <Layout className="w-8 h-8" />,
  30. href: '/layout-configurations',
  31. color: 'bg-green-500'
  32. },
  33. {
  34. id: 'imports',
  35. title: 'Imports',
  36. description: 'Import and manage data from external sources',
  37. icon: <Upload className="w-8 h-8" />,
  38. href: '/imports',
  39. color: 'bg-purple-500'
  40. },
  41. {
  42. id: 'api-docs',
  43. title: 'API Documentation',
  44. description: 'Explore API endpoints and documentation',
  45. icon: <BookOpen className="w-8 h-8" />,
  46. href: '/api-docs',
  47. color: 'bg-orange-500'
  48. },
  49. {
  50. id: 'cintas-calendar-summary',
  51. title: 'Cintas Install Calendar Summary',
  52. description: 'View installation calendar summary and statistics',
  53. icon: (
  54. <div className="w-8 h-8 relative">
  55. <Image
  56. src="/Cintas-Blue.svg"
  57. alt="Cintas"
  58. fill
  59. className="object-contain"
  60. />
  61. </div>
  62. ),
  63. href: '/cintas-calendar-summary',
  64. color: 'bg-blue-600'
  65. }
  66. ];
  67. const handleAppClick = (href: string) => {
  68. router.push(href);
  69. };
  70. return (
  71. <div className="min-h-screen bg-gradient-to-br from-gray-50 to-gray-100 dark:from-gray-900 dark:to-gray-800">
  72. <div className="container mx-auto px-4 py-8">
  73. <div className="text-center mb-12">
  74. <h1 className="text-4xl font-bold text-gray-900 dark:text-white mb-4">
  75. Welcome to Vtorio Dashboard
  76. </h1>
  77. <p className="text-lg text-gray-600 dark:text-gray-300">
  78. Select an application to get started
  79. </p>
  80. </div>
  81. <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 max-w-6xl mx-auto">
  82. {apps.map((app) => (
  83. <Card
  84. key={app.id}
  85. className="group cursor-pointer transition-all duration-300 hover:shadow-lg hover:scale-105 dark:bg-gray-800 dark:border-gray-700"
  86. onClick={() => handleAppClick(app.href)}
  87. >
  88. <CardHeader className="text-center">
  89. <div className={`${app.id === 'cintas-calendar-summary' ? 'bg-white border-2 border-blue-500' : app.color} w-16 h-16 rounded-full flex items-center justify-center ${app.id === 'cintas-calendar-summary' ? '' : 'text-white'} mx-auto mb-4 group-hover:scale-110 transition-transform duration-300`}>
  90. {app.icon}
  91. </div>
  92. <CardTitle className="text-xl font-semibold text-gray-900 dark:text-white">
  93. {app.title}
  94. </CardTitle>
  95. </CardHeader>
  96. <CardContent>
  97. <CardDescription className="text-center text-gray-600 dark:text-gray-300">
  98. {app.description}
  99. </CardDescription>
  100. </CardContent>
  101. </Card>
  102. ))}
  103. </div>
  104. <div className="mt-12 text-center">
  105. <p className="text-sm text-gray-500 dark:text-gray-400">
  106. Click on any application to access its features
  107. </p>
  108. </div>
  109. </div>
  110. </div>
  111. );
  112. }