jtf1981 commited on
Commit
7505ebb
·
verified ·
1 Parent(s): ee67cb5

Un sitio que cada vez que suba un Excel con macro lo adapte para que se conecte automáticamente a SAP

Browse files
Files changed (2) hide show
  1. README.md +8 -5
  2. index.html +237 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Sapcelerator Wizard
3
- emoji: 📚
4
- colorFrom: indigo
5
- colorTo: pink
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: SAPcelerator Wizard 🧙‍♂️
3
+ colorFrom: green
4
+ colorTo: yellow
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://deepsite.hf.co).
index.html CHANGED
@@ -1,19 +1,238 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>SAPcelerator Wizard - Excel to SAP Integration</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
11
+ <style>
12
+ .dropzone {
13
+ border: 2px dashed #4F46E5;
14
+ transition: all 0.3s ease;
15
+ }
16
+ .dropzone.active {
17
+ border-color: #10B981;
18
+ background-color: rgba(16, 185, 129, 0.1);
19
+ }
20
+ .progress-bar {
21
+ transition: width 0.5s ease;
22
+ }
23
+ #vanta-bg {
24
+ position: absolute;
25
+ top: 0;
26
+ left: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ z-index: -1;
30
+ opacity: 0.15;
31
+ }
32
+ </style>
33
+ </head>
34
+ <body class="bg-gray-50 min-h-screen">
35
+ <div id="vanta-bg"></div>
36
+
37
+ <div class="container mx-auto px-4 py-12">
38
+ <div class="max-w-4xl mx-auto bg-white rounded-xl shadow-xl overflow-hidden">
39
+ <!-- Header -->
40
+ <div class="bg-gradient-to-r from-indigo-600 to-purple-600 px-6 py-8 text-center">
41
+ <div class="flex justify-center mb-4">
42
+ <div class="bg-white p-3 rounded-full shadow-lg">
43
+ <i data-feather="zap" class="text-indigo-600 w-8 h-8"></i>
44
+ </div>
45
+ </div>
46
+ <h1 class="text-3xl font-bold text-white mb-2">SAPcelerator Wizard</h1>
47
+ <p class="text-indigo-100">Transform your Excel macros into SAP-connected power tools</p>
48
+ </div>
49
+
50
+ <!-- Main Content -->
51
+ <div class="px-8 py-10">
52
+ <div class="mb-8 text-center">
53
+ <h2 class="text-2xl font-semibold text-gray-800 mb-2">Upload Your Excel File</h2>
54
+ <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>
55
+ </div>
56
+
57
+ <!-- Dropzone -->
58
+ <div id="dropzone" class="dropzone rounded-lg p-12 text-center cursor-pointer mb-8">
59
+ <div class="flex flex-col items-center justify-center">
60
+ <i data-feather="upload-cloud" class="w-12 h-12 text-indigo-500 mb-4"></i>
61
+ <h3 class="text-xl font-medium text-gray-700 mb-1">Drag & Drop your file here</h3>
62
+ <p class="text-gray-500 mb-4">or click to browse your files</p>
63
+ <input type="file" id="fileInput" class="hidden" accept=".xls,.xlsx,.xlsm">
64
+ <button class="px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition">
65
+ Select File
66
+ </button>
67
+ </div>
68
+ </div>
69
+
70
+ <!-- Configuration Options -->
71
+ <div class="mb-10">
72
+ <h3 class="text-xl font-semibold text-gray-800 mb-4">SAP Connection Settings</h3>
73
+ <div class="grid md:grid-cols-2 gap-6">
74
+ <div>
75
+ <label for="sap-server" class="block text-sm font-medium text-gray-700 mb-1">SAP Server</label>
76
+ <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">
77
+ </div>
78
+ <div>
79
+ <label for="client-number" class="block text-sm font-medium text-gray-700 mb-1">Client Number</label>
80
+ <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">
81
+ </div>
82
+ <div>
83
+ <label for="username" class="block text-sm font-medium text-gray-700 mb-1">Username</label>
84
+ <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">
85
+ </div>
86
+ <div>
87
+ <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
88
+ <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">
89
+ </div>
90
+ </div>
91
+ </div>
92
+
93
+ <!-- Progress Bar (hidden by default) -->
94
+ <div id="processing-section" class="hidden">
95
+ <div class="mb-4">
96
+ <div class="flex justify-between mb-1">
97
+ <span class="text-sm font-medium text-gray-700">Processing your file</span>
98
+ <span id="progress-percent" class="text-sm font-medium text-gray-700">0%</span>
99
+ </div>
100
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
101
+ <div id="progress-bar" class="progress-bar bg-indigo-600 h-2.5 rounded-full" style="width: 0%"></div>
102
+ </div>
103
+ </div>
104
+ <div id="status-message" class="text-sm text-gray-600 text-center"></div>
105
+ </div>
106
+
107
+ <!-- Download Button (hidden by default) -->
108
+ <div id="download-section" class="text-center hidden">
109
+ <div class="p-4 mb-6 bg-green-50 text-green-800 rounded-lg">
110
+ <div class="flex items-center justify-center">
111
+ <i data-feather="check-circle" class="w-5 h-5 mr-2"></i>
112
+ <span>Your SAP-connected Excel file is ready!</span>
113
+ </div>
114
+ </div>
115
+ <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">
116
+ <i data-feather="download" class="w-5 h-5 mr-2"></i>
117
+ Download Enhanced File
118
+ </button>
119
+ </div>
120
+ </div>
121
+
122
+ <!-- Footer -->
123
+ <div class="bg-gray-50 px-6 py-4 border-t border-gray-200">
124
+ <div class="flex flex-col md:flex-row justify-between items-center">
125
+ <p class="text-sm text-gray-500 mb-2 md:mb-0">SAPcelerator Wizard - Automating your SAP workflows</p>
126
+ <div class="flex space-x-4">
127
+ <a href="#" class="text-sm text-indigo-600 hover:text-indigo-800">Documentation</a>
128
+ <a href="#" class="text-sm text-indigo-600 hover:text-indigo-800">Support</a>
129
+ <a href="#" class="text-sm text-indigo-600 hover:text-indigo-800">About</a>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </div>
135
+
136
+ <script>
137
+ // Initialize Vanta.js background
138
+ VANTA.NET({
139
+ el: "#vanta-bg",
140
+ color: 0x4f46e5,
141
+ backgroundColor: 0xf9fafb,
142
+ points: 10,
143
+ maxDistance: 20,
144
+ spacing: 15
145
+ });
146
+
147
+ // Initialize Feather Icons
148
+ feather.replace();
149
+
150
+ // Dropzone functionality
151
+ const dropzone = document.getElementById('dropzone');
152
+ const fileInput = document.getElementById('fileInput');
153
+ const processingSection = document.getElementById('processing-section');
154
+ const downloadSection = document.getElementById('download-section');
155
+ const progressBar = document.getElementById('progress-bar');
156
+ const progressPercent = document.getElementById('progress-percent');
157
+ const statusMessage = document.getElementById('status-message');
158
+ const downloadBtn = document.getElementById('download-btn');
159
+
160
+ // Highlight dropzone when dragging over
161
+ ['dragenter', 'dragover'].forEach(eventName => {
162
+ dropzone.addEventListener(eventName, (e) => {
163
+ e.preventDefault();
164
+ dropzone.classList.add('active');
165
+ });
166
+ });
167
+
168
+ ['dragleave', 'drop'].forEach(eventName => {
169
+ dropzone.addEventListener(eventName, (e) => {
170
+ e.preventDefault();
171
+ dropzone.classList.remove('active');
172
+ });
173
+ });
174
+
175
+ // Handle file drop
176
+ dropzone.addEventListener('drop', (e) => {
177
+ const file = e.dataTransfer.files[0];
178
+ handleFile(file);
179
+ });
180
+
181
+ // Handle file selection via button
182
+ dropzone.addEventListener('click', () => {
183
+ fileInput.click();
184
+ });
185
+
186
+ fileInput.addEventListener('change', (e) => {
187
+ if (e.target.files.length) {
188
+ handleFile(e.target.files[0]);
189
+ }
190
+ });
191
+
192
+ // Process the file (simulated)
193
+ function handleFile(file) {
194
+ if (!file.name.endsWith('.xls') && !file.name.endsWith('.xlsx') && !file.name.endsWith('.xlsm')) {
195
+ alert('Please upload an Excel file (.xls, .xlsx, .xlsm)');
196
+ return;
197
+ }
198
+
199
+ // Show processing section
200
+ processingSection.classList.remove('hidden');
201
+
202
+ // Simulate processing
203
+ let progress = 0;
204
+ const interval = setInterval(() => {
205
+ progress += Math.random() * 10;
206
+ if (progress > 100) progress = 100;
207
+
208
+ progressBar.style.width = `${progress}%`;
209
+ progressPercent.textContent = `${Math.round(progress)}%`;
210
+
211
+ if (progress < 30) {
212
+ statusMessage.textContent = "Analyzing Excel macros...";
213
+ } else if (progress < 60) {
214
+ statusMessage.textContent = "Generating SAP connection code...";
215
+ } else if (progress < 90) {
216
+ statusMessage.textContent = "Optimizing performance...";
217
+ } else {
218
+ statusMessage.textContent = "Finalizing your enhanced file...";
219
+ }
220
+
221
+ if (progress === 100) {
222
+ clearInterval(interval);
223
+ setTimeout(() => {
224
+ processingSection.classList.add('hidden');
225
+ downloadSection.classList.remove('hidden');
226
+ }, 500);
227
+ }
228
+ }, 300);
229
+ }
230
+
231
+ // Download button functionality
232
+ downloadBtn.addEventListener('click', () => {
233
+ // In a real app, this would download the processed file
234
+ alert('In a real implementation, this would download your SAP-connected Excel file. This is just a UI demo.');
235
+ });
236
+ </script>
237
+ </body>
238
  </html>