CoolFace
Apppublic

renzzo-005/epa-projects-tracker

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes
script.js17 linesDownload Raw Back to root
1document.addEventListener('DOMContentLoaded', function() {2    // Initialize tooltips3    const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));4    const tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {5        return new bootstrap.Tooltip(tooltipTriggerEl);6    });7});8 9// Format currency function10function formatCurrency(amount) {11    if (!amount) return '-';12    return parseFloat(amount.replace('PHP', '').replace(/,/g, '')).toLocaleString('en-PH', {13        style: 'currency',14        currency: 'PHP',15        minimumFractionDigits: 216    });17}