sapcelerator-wizard / index.html
jtf1981's picture
Un sitio que cada vez que suba un Excel con macro lo adapte para que se conecte automáticamente a SAP
7505ebb verified
Raw History Blame Contribute Delete
11.3 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SAPcelerator Wizard - Excel to SAP Integration</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
<style>
.dropzone {
border: 2px dashed #4F46E5;
transition: all 0.3s ease;
}
.dropzone.active {
border-color: #10B981;
background-color: rgba(16, 185, 129, 0.1);
}
.progress-bar {
transition: width 0.5s ease;
}
#vanta-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.15;
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<div id="vanta-bg"></div>
<div class="container mx-auto px-4 py-12">
<div class="max-w-4xl mx-auto bg-white rounded-xl shadow-xl overflow-hidden">
<!-- Header -->
<div class="bg-gradient-to-r from-indigo-600 to-purple-600 px-6 py-8 text-center">
<div class="flex justify-center mb-4">
<div class="bg-white p-3 rounded-full shadow-lg">
<i data-feather="zap" class="text-indigo-600 w-8 h-8"></i>
</div>
</div>
<h1 class="text-3xl font-bold text-white mb-2">SAPcelerator Wizard</h1>
<p class="text-indigo-100">Transform your Excel macros into SAP-connected power tools</p>
</div>
<!-- Main Content -->
<div class="px-8 py-10">
<div class="mb-8 text-center">
<h2 class="text-2xl font-semibold text-gray-800 mb-2">Upload Your Excel File</h2>
<p class="text-gray-600 max-w-lg mx-auto">Drag & drop your Excel file with macros below and we'll automatically adapt it to connect with SAP</p>
</div>
<!-- Dropzone -->
<div id="dropzone" class="dropzone rounded-lg p-12 text-center cursor-pointer mb-8">
<div class="flex flex-col items-center justify-center">
<i data-feather="upload-cloud" class="w-12 h-12 text-indigo-500 mb-4"></i>
<h3 class="text-xl font-medium text-gray-700 mb-1">Drag & Drop your file here</h3>
<p class="text-gray-500 mb-4">or click to browse your files</p>
<input type="file" id="fileInput" class="hidden" accept=".xls,.xlsx,.xlsm">
<button class="px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition">
Select File
</button>
</div>
</div>
<!-- Configuration Options -->
<div class="mb-10">
<h3 class="text-xl font-semibold text-gray-800 mb-4">SAP Connection Settings</h3>
<div class="grid md:grid-cols-2 gap-6">
<div>
<label for="sap-server" class="block text-sm font-medium text-gray-700 mb-1">SAP Server</label>
<input type="text" id="sap-server" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500">
</div>
<div>
<label for="client-number" class="block text-sm font-medium text-gray-700 mb-1">Client Number</label>
<input type="text" id="client-number" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500">
</div>
<div>
<label for="username" class="block text-sm font-medium text-gray-700 mb-1">Username</label>
<input type="text" id="username" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500">
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input type="password" id="password" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500">
</div>
</div>
</div>
<!-- Progress Bar (hidden by default) -->
<div id="processing-section" class="hidden">
<div class="mb-4">
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">Processing your file</span>
<span id="progress-percent" class="text-sm font-medium text-gray-700">0%</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div id="progress-bar" class="progress-bar bg-indigo-600 h-2.5 rounded-full" style="width: 0%"></div>
</div>
</div>
<div id="status-message" class="text-sm text-gray-600 text-center"></div>
</div>
<!-- Download Button (hidden by default) -->
<div id="download-section" class="text-center hidden">
<div class="p-4 mb-6 bg-green-50 text-green-800 rounded-lg">
<div class="flex items-center justify-center">
<i data-feather="check-circle" class="w-5 h-5 mr-2"></i>
<span>Your SAP-connected Excel file is ready!</span>
</div>
</div>
<button id="download-btn" class="px-8 py-3 bg-green-600 text-white font-medium rounded-lg hover:bg-green-700 transition flex items-center mx-auto">
<i data-feather="download" class="w-5 h-5 mr-2"></i>
Download Enhanced File
</button>
</div>
</div>
<!-- Footer -->
<div class="bg-gray-50 px-6 py-4 border-t border-gray-200">
<div class="flex flex-col md:flex-row justify-between items-center">
<p class="text-sm text-gray-500 mb-2 md:mb-0">SAPcelerator Wizard - Automating your SAP workflows</p>
<div class="flex space-x-4">
<a href="#" class="text-sm text-indigo-600 hover:text-indigo-800">Documentation</a>
<a href="#" class="text-sm text-indigo-600 hover:text-indigo-800">Support</a>
<a href="#" class="text-sm text-indigo-600 hover:text-indigo-800">About</a>
</div>
</div>
</div>
</div>
</div>
<script>
// Initialize Vanta.js background
VANTA.NET({
el: "#vanta-bg",
color: 0x4f46e5,
backgroundColor: 0xf9fafb,
points: 10,
maxDistance: 20,
spacing: 15
});
// Initialize Feather Icons
feather.replace();
// Dropzone functionality
const dropzone = document.getElementById('dropzone');
const fileInput = document.getElementById('fileInput');
const processingSection = document.getElementById('processing-section');
const downloadSection = document.getElementById('download-section');
const progressBar = document.getElementById('progress-bar');
const progressPercent = document.getElementById('progress-percent');
const statusMessage = document.getElementById('status-message');
const downloadBtn = document.getElementById('download-btn');
// Highlight dropzone when dragging over
['dragenter', 'dragover'].forEach(eventName => {
dropzone.addEventListener(eventName, (e) => {
e.preventDefault();
dropzone.classList.add('active');
});
});
['dragleave', 'drop'].forEach(eventName => {
dropzone.addEventListener(eventName, (e) => {
e.preventDefault();
dropzone.classList.remove('active');
});
});
// Handle file drop
dropzone.addEventListener('drop', (e) => {
const file = e.dataTransfer.files[0];
handleFile(file);
});
// Handle file selection via button
dropzone.addEventListener('click', () => {
fileInput.click();
});
fileInput.addEventListener('change', (e) => {
if (e.target.files.length) {
handleFile(e.target.files[0]);
}
});
// Process the file (simulated)
function handleFile(file) {
if (!file.name.endsWith('.xls') && !file.name.endsWith('.xlsx') && !file.name.endsWith('.xlsm')) {
alert('Please upload an Excel file (.xls, .xlsx, .xlsm)');
return;
}
// Show processing section
processingSection.classList.remove('hidden');
// Simulate processing
let progress = 0;
const interval = setInterval(() => {
progress += Math.random() * 10;
if (progress > 100) progress = 100;
progressBar.style.width = `${progress}%`;
progressPercent.textContent = `${Math.round(progress)}%`;
if (progress < 30) {
statusMessage.textContent = "Analyzing Excel macros...";
} else if (progress < 60) {
statusMessage.textContent = "Generating SAP connection code...";
} else if (progress < 90) {
statusMessage.textContent = "Optimizing performance...";
} else {
statusMessage.textContent = "Finalizing your enhanced file...";
}
if (progress === 100) {
clearInterval(interval);
setTimeout(() => {
processingSection.classList.add('hidden');
downloadSection.classList.remove('hidden');
}, 500);
}
}, 300);
}
// Download button functionality
downloadBtn.addEventListener('click', () => {
// In a real app, this would download the processed file
alert('In a real implementation, this would download your SAP-connected Excel file. This is just a UI demo.');
});
</script>
</body>
</html>