I want an offline application for project management. It should be like dashboard. The input file is output of SAP T code md4c, saved as a .txt file
4323110 verified | <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>ProjectFlow Navigator</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: { | |
| 50: '#f0f9ff', | |
| 100: '#e0f2fe', | |
| 200: '#bae6fd', | |
| 300: '#7dd3fc', | |
| 400: '#38bdf8', | |
| 500: '#0ea5e9', | |
| 600: '#0284c7', | |
| 700: '#0369a1', | |
| 800: '#075985', | |
| 900: '#0c4a6e', | |
| }, | |
| secondary: { | |
| 50: '#faf6ff', | |
| 100: '#f3e8ff', | |
| 200: '#e9d5ff', | |
| 300: '#d8b4fe', | |
| 400: '#c084fc', | |
| 500: '#a855f7', | |
| 600: '#9333ea', | |
| 700: '#7e22ce', | |
| 800: '#6b21a8', | |
| 900: '#581c87', | |
| } | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); | |
| * { | |
| font-family: 'Inter', sans-serif; | |
| } | |
| .sidebar { | |
| transition: all 0.3s ease; | |
| } | |
| .dashboard-card { | |
| transition: transform 0.2s ease, box-shadow 0.2s ease; | |
| } | |
| .dashboard-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); | |
| } | |
| .file-drop-area { | |
| border: 2px dashed #d1d5db; | |
| border-radius: 0.5rem; | |
| transition: all 0.3s ease; | |
| } | |
| .file-drop-area.active { | |
| border-color: #0ea5e9; | |
| background-color: rgba(14, 165, 233, 0.05); | |
| } | |
| .project-item { | |
| border-left: 4px solid transparent; | |
| transition: all 0.2s ease; | |
| } | |
| .project-item:hover { | |
| border-left-color: #0ea5e9; | |
| background-color: #f8fafc; | |
| } | |
| .status-badge { | |
| padding: 0.25rem 0.75rem; | |
| border-radius: 9999px; | |
| font-size: 0.75rem; | |
| font-weight: 500; | |
| } | |
| .progress-bar { | |
| transition: width 0.5s ease-in-out; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 flex h-screen"> | |
| <!-- Sidebar --> | |
| <div class="sidebar w-64 bg-white shadow-md flex flex-col"> | |
| <div class="p-5 border-b border-gray-200"> | |
| <div class="flex items-center space-x-3"> | |
| <div class="w-10 h-10 rounded-lg bg-primary-500 flex items-center justify-center"> | |
| <i data-feather="trello" class="text-white"></i> | |
| </div> | |
| <h1 class="text-xl font-bold text-gray-800">ProjectFlow</h1> | |
| </div> | |
| </div> | |
| <div class="flex-1 overflow-y-auto py-4"> | |
| <nav class="px-4 space-y-1"> | |
| <a href="#" class="flex items-center px-4 py-3 text-primary-600 bg-primary-50 rounded-lg"> | |
| <i data-feather="layout" class="w-5 h-5 mr-3"></i> | |
| Dashboard | |
| </a> | |
| <a href="#" class="flex items-center px-4 py-3 text-gray-600 hover:bg-gray-100 rounded-lg"> | |
| <i data-feather="folder" class="w-5 h-5 mr-3"></i> | |
| Projects | |
| </a> | |
| <a href="#" class="flex items-center px-4 py-3 text-gray-600 hover:bg-gray-100 rounded-lg"> | |
| <i data-feather="calendar" class="w-5 h-5 mr-3"></i> | |
| Timeline | |
| </a> | |
| <a href="#" class="flex items-center px-4 py-3 text-gray-600 hover:bg-gray-100 rounded-lg"> | |
| <i data-feather="bar-chart-2" class="w-5 h-5 mr-3"></i> | |
| Reports | |
| </a> | |
| <a href="#" class="flex items-center px-4 py-3 text-gray-600 hover:bg-gray-100 rounded-lg"> | |
| <i data-feather="settings" class="w-5 h-5 mr-3"></i> | |
| Settings | |
| </a> | |
| </nav> | |
| <div class="mt-8 px-4"> | |
| <h3 class="text-xs font-semibold text-gray-500 uppercase tracking-wider px-4 mb-3">Recent Projects</h3> | |
| <div class="space-y-2"> | |
| <div class="project-item p-3 bg-gray-50 rounded-lg cursor-pointer"> | |
| <div class="flex justify-between items-center"> | |
| <h4 class="text-sm font-medium text-gray-800">SAP Implementation</h4> | |
| <span class="status-badge bg-green-100 text-green-800">Completed</span> | |
| </div> | |
| <p class="text-xs text-gray-500 mt-1">Last updated: 2 days ago</p> | |
| </div> | |
| <div class="project-item p-3 bg-gray-50 rounded-lg cursor-pointer"> | |
| <div class="flex justify-between items-center"> | |
| <h4 class="text-sm font-medium text-gray-800">Warehouse Upgrade</h4> | |
| <span class="status-badge bg-yellow-100 text-yellow-800">In Progress</span> | |
| </div> | |
| <p class="text-xs text-gray-500 mt-1">Last updated: Today</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="p-4 border-t border-gray-200"> | |
| <div class="flex items-center space-x-3"> | |
| <div class="w-10 h-10 rounded-full bg-primary-100 flex items-center justify-center"> | |
| <i data-feather="user" class="text-primary-600"></i> | |
| </div> | |
| <div> | |
| <p class="text-sm font-medium text-gray-800">John Doe</p> | |
| <p class="text-xs text-gray-500">Administrator</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="flex-1 overflow-y-auto"> | |
| <div class="p-6"> | |
| <!-- Header --> | |
| <div class="flex justify-between items-center mb-8"> | |
| <div> | |
| <h2 class="text-2xl font-bold text-gray-800">Project Dashboard</h2> | |
| <p class="text-gray-600">Monitor and manage your SAP projects</p> | |
| </div> | |
| <button class="bg-primary-500 hover:bg-primary-600 text-white px-4 py-2 rounded-lg flex items-center"> | |
| <i data-feather="plus" class="w-4 h-4 mr-2"></i> | |
| New Project | |
| </button> | |
| </div> | |
| <!-- Stats Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"> | |
| <div class="dashboard-card bg-white p-5 rounded-xl shadow-sm border border-gray-100"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-sm text-gray-500">Total Projects</p> | |
| <h3 class="text-2xl font-bold text-gray-800 mt-1">24</h3> | |
| </div> | |
| <div class="p-3 bg-primary-50 rounded-lg"> | |
| <i data-feather="briefcase" class="w-5 h-5 text-primary-500"></i> | |
| </div> | |
| </div> | |
| <p class="text-xs text-gray-500 mt-3"><span class="text-green-600">+3</span> from last week</p> | |
| </div> | |
| <div class="dashboard-card bg-white p-5 rounded-xl shadow-sm border border-gray-100"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-sm text-gray-500">In Progress</p> | |
| <h3 class="text-2xl font-bold text-gray-800 mt-1">12</h3> | |
| </div> | |
| <div class="p-3 bg-yellow-50 rounded-lg"> | |
| <i data-feather="clock" class="w-5 h-5 text-yellow-500"></i> | |
| </div> | |
| </div> | |
| <p class="text-xs text-gray-500 mt-3"><span class="text-green-600">+2</span> from last week</p> | |
| </div> | |
| <div class="dashboard-card bg-white p-5 rounded-xl shadow-sm border border-gray-100"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-sm text-gray-500">Completed</p> | |
| <h3 class="text-2xl font-bold text-gray-800 mt-1">8</h3> | |
| </div> | |
| <div class="p-3 bg-green-50 rounded-lg"> | |
| <i data-feather="check-circle" class="w-5 h-5 text-green-500"></i> | |
| </div> | |
| </div> | |
| <p class="text-xs text-gray-500 mt-3"><span class="text-green-600">+1</span> from last week</p> | |
| </div> | |
| <div class="dashboard-card bg-white p-5 rounded-xl shadow-sm border border-gray-100"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <p class="text-sm text-gray-500">Overdue</p> | |
| <h3 class="text-2xl font-bold text-gray-800 mt-1">4</h3> | |
| </div> | |
| <div class="p-3 bg-red-50 rounded-lg"> | |
| <i data-feather="alert-circle" class="w-5 h-5 text-red-500"></i> | |
| </div> | |
| </div> | |
| <p class="text-xs text-gray-500 mt-3"><span class="text-red-600">+1</span> from last week</p> | |
| </div> | |
| </div> | |
| <!-- File Upload Section --> | |
| <div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6 mb-8"> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Import SAP MD4C Data</h3> | |
| <p class="text-gray-600 mb-6">Upload your SAP T code MD4C output (.txt file) to analyze and manage your projects</p> | |
| <div class="file-drop-area p-8 text-center" id="fileDropArea"> | |
| <i data-feather="upload-cloud" class="w-12 h-12 text-gray-400 mx-auto mb-4"></i> | |
| <p class="text-gray-600 mb-2">Drag & drop your file here</p> | |
| <p class="text-sm text-gray-500 mb-4">Supported format: .txt (SAP MD4C output)</p> | |
| <label for="fileInput" class="bg-primary-500 hover:bg-primary-600 text-white px-4 py-2 rounded-lg cursor-pointer inline-block"> | |
| Choose File | |
| </label> | |
| <input type="file" id="fileInput" accept=".txt" class="hidden"> | |
| </div> | |
| <div id="fileInfo" class="hidden mt-4 p-4 bg-gray-50 rounded-lg"> | |
| <div class="flex justify-between items-center"> | |
| <div class="flex items-center"> | |
| <i data-feather="file-text" class="w-5 h-5 text-gray-500 mr-2"></i> | |
| <span id="fileName" class="text-sm font-medium text-gray-800">md4c_output.txt</span> | |
| </div> | |
| <button id="processFile" class="bg-primary-500 hover:bg-primary-600 text-white px-3 py-1 rounded text-sm"> | |
| Process | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Projects Overview --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-8"> | |
| <!-- Recent Projects --> | |
| <div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6"> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Recent Projects</h3> | |
| <div class="space-y-4"> | |
| <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg"> | |
| <div> | |
| <h4 class="font-medium text-gray-800">Material Requirements Planning</h4> | |
| <div class="flex items-center mt-1"> | |
| <div class="w-24 h-2 bg-gray-200 rounded-full"> | |
| <div class="progress-bar h-2 bg-green-500 rounded-full" style="width: 75%"></div> | |
| </div> | |
| <span class="text-xs text-gray-600 ml-2">75%</span> | |
| </div> | |
| </div> | |
| <span class="status-badge bg-blue-100 text-blue-800">On Track</span> | |
| </div> | |
| <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg"> | |
| <div> | |
| <h4 class="font-medium text-gray-800">Inventory Optimization</h4> | |
| <div class="flex items-center mt-1"> | |
| <div class="w-24 h-2 bg-gray-200 rounded-full"> | |
| <div class="progress-bar h-2 bg-yellow-500 rounded-full" style="width: 45%"></div> | |
| </div> | |
| <span class="text-xs text-gray-600 ml-2">45%</span> | |
| </div> | |
| </div> | |
| <span class="status-badge bg-yellow-100 text-yellow-800">Delayed</span> | |
| </div> | |
| <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg"> | |
| <div> | |
| <h4 class="font-medium text-gray-800">Production Scheduling</h4> | |
| <div class="flex items-center mt-1"> | |
| <div class="w-24 h-2 bg-gray-200 rounded-full"> | |
| <div class="progress-bar h-2 bg-green-500 rounded-full" style="width: 90%"></div> | |
| </div> | |
| <span class="text-xs text-gray-600 ml-2">90%</span> | |
| </div> | |
| </div> | |
| <span class="status-badge bg-green-100 text-green-800">Completed</span> | |
| </div> | |
| </div> | |
| <a href="#" class="block text-center mt-6 text-primary-600 hover:text-primary-700 text-sm font-medium"> | |
| View all projects | |
| </a> | |
| </div> | |
| <!-- Project Status Chart --> | |
| <div class="bg-white rounded-xl shadow-sm border border-gray-100 p-6"> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Project Status Overview</h3> | |
| <div class="h-64"> | |
| <canvas id="statusChart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Initialize Feather Icons | |
| feather.replace(); | |
| // File upload handling | |
| const fileDropArea = document.getElementById('fileDropArea'); | |
| const fileInput = document.getElementById('fileInput'); | |
| const fileInfo = document.getElementById('fileInfo'); | |
| const fileName = document.getElementById('fileName'); | |
| const processFile = document.getElementById('processFile'); | |
| ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => { | |
| fileDropArea.addEventListener(eventName, preventDefaults, false); | |
| }); | |
| function preventDefaults(e) { | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| } | |
| ['dragenter', 'dragover'].forEach(eventName => { | |
| fileDropArea.addEventListener(eventName, highlight, false); | |
| }); | |
| ['dragleave', 'drop'].forEach(eventName => { | |
| fileDropArea.addEventListener(eventName, unhighlight, false); | |
| }); | |
| function highlight() { | |
| fileDropArea.classList.add('active'); | |
| } | |
| function unhighlight() { | |
| fileDropArea.classList.remove('active'); | |
| } | |
| fileDropArea.addEventListener('drop', handleDrop, false); | |
| function handleDrop(e) { | |
| const dt = e.dataTransfer; | |
| const files = dt.files; | |
| handleFiles(files); | |
| } | |
| fileInput.addEventListener('change', function() { | |
| handleFiles(this.files); | |
| }); | |
| function handleFiles(files) { | |
| if (files.length > 0) { | |
| const file = files[0]; | |
| if (file.type === 'text/plain' || file.name.endsWith('.txt')) { | |
| fileName.textContent = file.name; | |
| fileInfo.classList.remove('hidden'); | |
| } else { | |
| alert('Please upload a valid .txt file from SAP MD4C'); | |
| } | |
| } | |
| } | |
| processFile.addEventListener('click', function() { | |
| alert('Processing SAP MD4C file... This would parse and load project data in a real application.'); | |
| // In a real application, this would parse the file and update the dashboard | |
| }); | |
| // Initialize chart | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const ctx = document.getElementById('statusChart').getContext('2d'); | |
| const statusChart = new Chart(ctx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Completed', 'In Progress', 'Not Started', 'Overdue'], | |
| datasets: [{ | |
| data: [8, 12, 4, 4], | |
| backgroundColor: [ | |
| '#10b981', | |
| '#f59e0b', | |
| '#3b82f6', | |
| '#ef4444' | |
| ], | |
| borderWidth: 0 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| cutout: '70%', | |
| plugins: { | |
| legend: { | |
| position: 'bottom', | |
| labels: { | |
| usePointStyle: true, | |
| padding: 20 | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |