Minimalist Lifestyle Organizer

Minimalist Lifestyle Organizer

Simplify your life, one item at a time.

Your Progress

Items Removed

0

Challenge Progress

0%

Capsule Wardrobe Size

0

Your capsule wardrobe is empty. Add your first item!

`; } } // --- DASHBOARD --- // function updateDashboard() { const totalItemsRemoved = challengeProgress.reduce((sum, day) => { const challengeDay = declutterChallengeConfig.find(d => d.day === day); return sum + (challengeDay ? challengeDay.items : 0); }, 0); itemsRemovedStat.textContent = totalItemsRemoved; const progressPercent = Math.round((challengeProgress.length / 30) * 100); challengeProgressStat.textContent = `${progressPercent}%`; wardrobeSizeStat.textContent = wardrobe.length; } // --- PDF GENERATION --- // function generatePDF() { const { jsPDF } = window.jspdf; const pdf = new jsPDF({ unit: 'pt', format: 'a4' }); let y = 40; const margin = 40; const pdfWidth = pdf.internal.pageSize.getWidth(); pdf.setFontSize(20); pdf.setFont('helvetica', 'bold'); pdf.text('Minimalist Lifestyle Summary', pdfWidth / 2, y, { align: 'center' }); y += 20; pdf.setFontSize(10); pdf.setFont('helvetica', 'normal'); pdf.text(new Date().toLocaleDateString(), pdfWidth / 2, y, { align: 'center' }); y += 40; // Challenge Summary pdf.setFontSize(16); pdf.setFont('helvetica', 'bold'); pdf.text('Decluttering Challenge Progress', margin, y); y += 20; pdf.setFontSize(12); pdf.text(`Days Completed: ${challengeProgress.length} / 30`, margin, y); y += 18; pdf.text(`Total Items Removed: ${itemsRemovedStat.textContent}`, margin, y); y += 40; // Wardrobe Summary pdf.setFontSize(16); pdf.setFont('helvetica', 'bold'); pdf.text('Capsule Wardrobe Inventory', margin, y); y += 20; const headers = [['Category', 'Item Name', 'Color']]; const body = wardrobe.map(i => [i.category, i.name, i.color]); pdf.autoTable({ startY: y, head: headers, body: body, theme: 'grid', headStyles: { fillColor: [55, 65, 81] } }); pdf.save('Minimalist-Organizer-Summary.pdf'); showNotification('Summary report downloaded!', 'success'); } // --- TAB NAVIGATION --- // function setActiveTab(index) { tabs.forEach((tab, i) => { tab.classList.toggle('active', i === index); tabPanels[i].classList.toggle('hidden', i !== index); }); if (index === 0) updateDashboard(); // Refresh dashboard on view } // --- KICK IT OFF --- // initializeApp(); });
Scroll to Top