non esistono Dashboard del gestore immobiliare, il sito non deve permettere ancora di registrare immobili ma deve solo dare servizi per gestirli
90a91d5 verified Download script.js from Matteofaedda/rentalai-optimizer-pro: direct link, hf CLI and curl.
- Browser
- Download file 2.06 kB
-
https://huggingface.co/spaces/Matteofaedda/rentalai-optimizer-pro/resolve/main/script.js
- Command line
-
hf download hf://spaces/Matteofaedda/rentalai-optimizer-pro/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Matteofaedda/rentalai-optimizer-pro/resolve/main/script.js
2.06 kB
| // Initialize app | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function(e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| // Mobile menu toggle | |
| const mobileMenuButton = document.querySelector('.mobile-menu-button'); | |
| const mobileMenu = document.querySelector('.mobile-menu'); | |
| if (mobileMenuButton && mobileMenu) { | |
| mobileMenuButton.addEventListener('click', function() { | |
| mobileMenu.classList.toggle('hidden'); | |
| }); | |
| } | |
| // Initialize tooltips | |
| const tooltipTriggers = document.querySelectorAll('[data-tooltip]'); | |
| tooltipTriggers.forEach(trigger => { | |
| new Tooltip(trigger, { | |
| placement: 'top', | |
| title: trigger.getAttribute('data-tooltip') | |
| }); | |
| }); | |
| // Form validation helper | |
| window.validateForm = function(form) { | |
| let isValid = true; | |
| const inputs = form.querySelectorAll('input[required], select[required], textarea[required]'); | |
| inputs.forEach(input => { | |
| if (!input.value.trim()) { | |
| input.classList.add('border-red-500'); | |
| isValid = false; | |
| } else { | |
| input.classList.remove('border-red-500'); | |
| } | |
| }); | |
| return isValid; | |
| }; | |
| // Format currency helper | |
| window.formatCurrency = function(value) { | |
| return new Intl.NumberFormat('it-IT', { | |
| style: 'currency', | |
| currency: 'EUR', | |
| minimumFractionDigits: 0, | |
| maximumFractionDigits: 0 | |
| }).format(value); | |
| }; | |
| // ROI calculator | |
| window.calculateROI = function(purchasePrice, annualRevenue) { | |
| if (!purchasePrice) return 0; | |
| return ((annualRevenue / purchasePrice) * 100).toFixed(1); | |
| }; | |
| }); | |