Spaces:
Running
Running
DATE * Date TECHNICIAN NAME * PLATE # * Mechanical Connector (per pc.) * NIU (per pc.) * Patchcord (per pc.) * F17, S-Shape Anchor Clamp (per pc.) * House Bracket (per pc.) * Mid Span (per pc.) * Cable Clip (per pc.) * Cable Tie (per pc.) * Adhesive Tape (per pc.) * Electrical Tape (per pc.) * Labeler Tape * Others (Please Specify) *Serialized Materials DROP FOC, 2 Core Serial Number (per reel) * Modem Type * ZTE HUAWEI SKYWORTH V2F V2 GAMECHANGER Other: Modem Serial 1 Modem Serial 2 Modem Serial 3 Modem Serial 4 Modem Serial 5 Modem Serial 6 Modem Serial 7 Modem Serial 8 Modem Serial 9 Modem Serial 10 Modem Serial 11 Modem Serial 12 add upload picture if submitted entry here in this sheet link https://docs.google.com/spreadsheets/d/1aArzBlDDI-ycUjn4kHRZl4GxorM-KZIpI244MwPaTLQ/edit?gid=0#gid=0 in modem serial add barcode scanner small - Initial Deployment
Browse filesFiles changed (2)
- README.md+7-5
- index.html+496-19
123452345678910111012---title: Materials Requestemoji: 📉colorFrom: purplecolorTo: yellowtitle: materials-requestemoji: 🐳colorFrom: pinkcolorTo: greensdk: staticpinned: falsetags: - deepsite---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-referenceCheck out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference12345678910111213141516171819123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496<!doctype html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>My static Space</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="card"> <h1>Welcome to your static Space!</h1> <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p> <p> Also don't forget to check the <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>. </p> </div> </body></html><!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Technician Materials Form</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> /* Custom styles for barcode scanner */ .barcode-scanner { position: relative; display: inline-block; } .barcode-scanner-btn { background-color: #4F46E5; color: white; border: none; padding: 0.25rem 0.5rem; border-radius: 0.25rem; cursor: pointer; margin-left: 0.5rem; } .barcode-scanner-btn:hover { background-color: #4338CA; } .scanner-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); z-index: 1000; flex-direction: column; align-items: center; justify-content: center; } .scanner-video { width: 80%; max-width: 500px; border: 2px solid white; border-radius: 8px; } .scanner-close { margin-top: 1rem; background-color: #EF4444; color: white; padding: 0.5rem 1rem; border-radius: 0.25rem; cursor: pointer; } /* Custom file upload button */ .file-input-label { display: inline-block; padding: 0.5rem 1rem; background-color: #4F46E5; color: white; border-radius: 0.25rem; cursor: pointer; transition: background-color 0.2s; } .file-input-label:hover { background-color: #4338CA; } .file-input { display: none; } /* Animation for form submission */ @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .fade-in { animation: fadeIn 0.5s ease-out forwards; } </style></head><body class="bg-gray-100"> <div class="container mx-auto px-4 py-8 max-w-4xl"> <div class="bg-white rounded-lg shadow-lg overflow-hidden fade-in"> <!-- Header --> <div class="bg-indigo-600 px-6 py-4"> <h1 class="text-2xl font-bold text-white">Technician Materials Form</h1> <p class="text-indigo-200">Please fill out all required fields</p> </div> <!-- Form --> <form id="materialsForm" class="p-6 space-y-6"> <!-- Basic Information Section --> <div class="space-y-4"> <h2 class="text-xl font-semibold text-gray-800 border-b pb-2">Basic Information</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <!-- Date --> <div> <label for="date" class="block text-sm font-medium text-gray-700 mb-1"> Date <span class="text-red-500">*</span> </label> <input type="date" id="date" name="date" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500"> </div> <!-- Technician Name --> <div> <label for="technicianName" class="block text-sm font-medium text-gray-700 mb-1"> Technician Name <span class="text-red-500">*</span> </label> <input type="text" id="technicianName" name="technicianName" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter technician name"> </div> </div> <!-- Plate Number --> <div> <label for="plateNumber" class="block text-sm font-medium text-gray-700 mb-1"> Plate # <span class="text-red-500">*</span> </label> <input type="text" id="plateNumber" name="plateNumber" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter plate number"> </div> </div> <!-- Materials Section --> <div class="space-y-4"> <h2 class="text-xl font-semibold text-gray-800 border-b pb-2">Materials Used</h2> <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <!-- Mechanical Connector --> <div> <label for="mechanicalConnector" class="block text-sm font-medium text-gray-700 mb-1"> Mechanical Connector (per pc.) <span class="text-red-500">*</span> </label> <input type="number" id="mechanicalConnector" name="mechanicalConnector" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- NIU --> <div> <label for="niu" class="block text-sm font-medium text-gray-700 mb-1"> NIU (per pc.) <span class="text-red-500">*</span> </label> <input type="number" id="niu" name="niu" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- Patchcord --> <div> <label for="patchcord" class="block text-sm font-medium text-gray-700 mb-1"> Patchcord (per pc.) <span class="text-red-500">*</span> </label> <input type="number" id="patchcord" name="patchcord" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- F17, S-Shape Anchor Clamp --> <div> <label for="anchorClamp" class="block text-sm font-medium text-gray-700 mb-1"> F17, S-Shape Anchor Clamp (per pc.) <span class="text-red-500">*</span> </label> <input type="number" id="anchorClamp" name="anchorClamp" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- House Bracket --> <div> <label for="houseBracket" class="block text-sm font-medium text-gray-700 mb-1"> House Bracket (per pc.) <span class="text-red-500">*</span> </label> <input type="number" id="houseBracket" name="houseBracket" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- Mid Span --> <div> <label for="midSpan" class="block text-sm font-medium text-gray-700 mb-1"> Mid Span (per pc.) <span class="text-red-500">*</span> </label> <input type="number" id="midSpan" name="midSpan" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- Cable Clip --> <div> <label for="cableClip" class="block text-sm font-medium text-gray-700 mb-1"> Cable Clip (per pc.) <span class="text-red-500">*</span> </label> <input type="number" id="cableClip" name="cableClip" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- Cable Tie --> <div> <label for="cableTie" class="block text-sm font-medium text-gray-700 mb-1"> Cable Tie (per pc.) <span class="text-red-500">*</span> </label> <input type="number" id="cableTie" name="cableTie" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- Adhesive Tape --> <div> <label for="adhesiveTape" class="block text-sm font-medium text-gray-700 mb-1"> Adhesive Tape (per pc.) <span class="text-red-500">*</span> </label> <input type="number" id="adhesiveTape" name="adhesiveTape" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- Electrical Tape --> <div> <label for="electricalTape" class="block text-sm font-medium text-gray-700 mb-1"> Electrical Tape (per pc.) <span class="text-red-500">*</span> </label> <input type="number" id="electricalTape" name="electricalTape" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- Labeler Tape --> <div> <label for="labelerTape" class="block text-sm font-medium text-gray-700 mb-1"> Labeler Tape <span class="text-red-500">*</span> </label> <input type="number" id="labelerTape" name="labelerTape" min="0" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter quantity"> </div> <!-- Others --> <div class="md:col-span-2"> <label for="others" class="block text-sm font-medium text-gray-700 mb-1"> Others (Please Specify) <span class="text-red-500">*</span> </label> <textarea id="others" name="others" rows="2" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Specify other materials used"></textarea> </div> </div> </div> <!-- Serialized Materials Section --> <div class="space-y-4"> <h2 class="text-xl font-semibold text-gray-800 border-b pb-2">Serialized Materials</h2> <!-- DROP FOC, 2 Core Serial Number --> <div> <label for="dropFocSerial" class="block text-sm font-medium text-gray-700 mb-1"> DROP FOC, 2 Core Serial Number (per reel) <span class="text-red-500">*</span> </label> <input type="text" id="dropFocSerial" name="dropFocSerial" required class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter serial number"> </div> <!-- Modem Type --> <div> <label class="block text-sm font-medium text-gray-700 mb-1"> Modem Type <span class="text-red-500">*</span> </label> <div class="grid grid-cols-2 md:grid-cols-3 gap-2"> <label class="inline-flex items-center"> <input type="radio" name="modemType" value="ZTE" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500" required> <span class="ml-2 text-gray-700">ZTE</span> </label> <label class="inline-flex items-center"> <input type="radio" name="modemType" value="HUAWEI" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500"> <span class="ml-2 text-gray-700">HUAWEI</span> </label> <label class="inline-flex items-center"> <input type="radio" name="modemType" value="SKYWORTH" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500"> <span class="ml-2 text-gray-700">SKYWORTH</span> </label> <label class="inline-flex items-center"> <input type="radio" name="modemType" value="V2F" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500"> <span class="ml-2 text-gray-700">V2F</span> </label> <label class="inline-flex items-center"> <input type="radio" name="modemType" value="V2" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500"> <span class="ml-2 text-gray-700">V2</span> </label> <label class="inline-flex items-center"> <input type="radio" name="modemType" value="GAMECHANGER" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500"> <span class="ml-2 text-gray-700">GAMECHANGER</span> </label> <label class="inline-flex items-center md:col-span-3"> <input type="radio" name="modemType" value="Other" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500"> <span class="ml-2 text-gray-700">Other:</span> <input type="text" name="modemTypeOther" class="ml-2 px-2 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 flex-1" placeholder="Specify modem type"> </label> </div> </div> <!-- Modem Serials --> <div> <label class="block text-sm font-medium text-gray-700 mb-1"> Modem Serials <span class="text-red-500">*</span> </label> <div class="space-y-2"> <!-- Generate 12 modem serial fields --> <script> document.addEventListener('DOMContentLoaded', function() { const modemSerialsContainer = document.getElementById('modemSerialsContainer'); for (let i = 1; i <= 12; i++) { const div = document.createElement('div'); div.className = 'flex items-center'; const label = document.createElement('label'); label.className = 'w-32 text-sm text-gray-700'; label.textContent = `Modem Serial ${i}`; const input = document.createElement('input'); input.type = 'text'; input.name = `modemSerial${i}`; input.className = 'flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500'; input.placeholder = 'Enter serial number'; const scannerBtn = document.createElement('button'); scannerBtn.type = 'button'; scannerBtn.className = 'barcode-scanner-btn ml-2'; scannerBtn.innerHTML = '<i class="fas fa-barcode"></i>'; scannerBtn.onclick = function() { openScanner(input); }; div.appendChild(label); div.appendChild(input); div.appendChild(scannerBtn); modemSerialsContainer.appendChild(div); } }); </script> <div id="modemSerialsContainer" class="space-y-2"> <!-- Dynamically generated modem serial fields will appear here --> </div> </div> </div> </div> <!-- Upload Picture Section --> <div class="space-y-4"> <h2 class="text-xl font-semibold text-gray-800 border-b pb-2">Upload Picture</h2> <div> <label class="block text-sm font-medium text-gray-700 mb-1"> Upload Picture (if any) </label> <label for="pictureUpload" class="file-input-label"> <i class="fas fa-upload mr-2"></i>Choose File </label> <input type="file" id="pictureUpload" name="pictureUpload" accept="image/*" class="file-input"> <span id="fileName" class="ml-2 text-sm text-gray-500">No file chosen</span> </div> </div> <!-- Form Submission --> <div class="pt-4 border-t border-gray-200"> <div class="flex justify-between"> <button type="button" onclick="resetForm()" class="px-4 py-2 bg-gray-300 text-gray-700 rounded-md hover:bg-gray-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500"> <i class="fas fa-redo mr-2"></i>Reset </button> <button type="submit" class="px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> <i class="fas fa-paper-plane mr-2"></i>Submit </button> </div> </div> </form> </div> <!-- Success Modal --> <div id="successModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"> <div class="bg-white p-6 rounded-lg shadow-xl max-w-md w-full mx-4"> <div class="text-center"> <div class="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-green-100"> <svg class="h-6 w-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path> </svg> </div> <h3 class="mt-3 text-lg font-medium text-gray-900">Form Submitted Successfully!</h3> <div class="mt-2 text-sm text-gray-500"> <p>Your entry has been recorded in the sheet.</p> <p class="mt-2"> <a href="https://docs.google.com/spreadsheets/d/1aArzBlDDI-ycUjn4kHRZl4GxorM-KZIpI244MwPaTLQ/edit?gid=0#gid=0" target="_blank" class="text-indigo-600 hover:text-indigo-500"> View Sheet <i class="fas fa-external-link-alt ml-1"></i> </a> </p> </div> <div class="mt-4"> <button type="button" onclick="closeSuccessModal()" class="px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> Close </button> </div> </div> </div> </div> <!-- Barcode Scanner Modal --> <div id="scannerModal" class="scanner-modal hidden"> <video id="scannerVideo" class="scanner-video" autoplay playsinline></video> <button id="scannerClose" class="scanner-close">Close Scanner</button> </div> </div>
<script> // File upload display document.getElementById('pictureUpload').addEventListener('change', function(e) { const fileName = document.getElementById('fileName'); if (this.files.length > 0) { fileName.textContent = this.files[0].name; } else { fileName.textContent = 'No file chosen'; } }); // Form submission document.getElementById('materialsForm').addEventListener('submit', function(e) { e.preventDefault(); // Here you would normally send the form data to your server // For this demo, we'll just show the success modal document.getElementById('successModal').classList.remove('hidden'); }); // Reset form function resetForm() { document.getElementById('materialsForm').reset(); document.getElementById('fileName').textContent = 'No file chosen'; } // Close success modal function closeSuccessModal() { document.getElementById('successModal').classList.add('hidden'); resetForm(); } // Barcode scanner functionality let currentScannerInput = null; function openScanner(inputElement) { currentScannerInput = inputElement; const modal = document.getElementById('scannerModal'); const video = document.getElementById('scannerVideo'); modal.classList.remove('hidden'); // For demo purposes, we'll simulate scanning after 2 seconds setTimeout(() => { // In a real implementation, you would use a barcode scanning library // Here we just simulate a scanned value currentScannerInput.value = 'SN' + Math.floor(Math.random() * 1000000000).toString().padStart(9, '0'); closeScanner(); }, 2000); // In a real implementation, you would access the device camera here // navigator.mediaDevices.getUserMedia({ video: { facingMode: "environment" } }) // .then(function(stream) { // video.srcObject = stream; // }) // .catch(function(err) { // console.error("Error accessing camera: ", err); // }); } function closeScanner() { const modal = document.getElementById('scannerModal'); const video = document.getElementById('scannerVideo'); modal.classList.add('hidden'); // In a real implementation, you would stop the camera stream here // if (video.srcObject) { // video.srcObject.getTracks().forEach(track => track.stop()); // } } document.getElementById('scannerClose').addEventListener('click', closeScanner); </script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=royramirez20/materials-request" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>README.md+7-5
index.html+496-19