Rehearsal Agenda & Focus Plan
Band: | Date: | Total Time:
Time Allocation
Total Music Time: min
Add Song / Focus Slot
${content}
`; }; // 1. Warmup / Setup addSegment("Warm-up & Setup", 15, "Check levels, instrument tuning, and confirm practice goals."); // 2. Setlist let setlistTableHtml = `| Time | Song / Piece | Key Focus |
|---|---|---|
| ${startTime} - ${endTime} | ${song.song} | ${song.focus} |
WARNING: Agenda is ${Math.abs(freeTime)} minutes over the scheduled end time.
`; } document.getElementById('brps-agenda-content').innerHTML = agendaHtml; // Update Chart wccdUpdateChart(musicTime, breakAndSetupTime, freeTime); }; // --- Chart Logic --- window.brpsInitChart = function() { const ctx = document.getElementById('brps-chart').getContext('2d'); brpsChart = new Chart(ctx, { type: 'doughnut', data: { labels: ['Music Focus', 'Scheduled Break', 'Free Time'], datasets: [{ data: [50, 10, 30], backgroundColor: ['#ff4d4d', '#495057', '#94a3b8'], borderWidth: 1 }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { position: 'bottom', labels: { boxWidth: 10, padding: 10 } } } } }); }; window.wccdUpdateChart = function(musicTime, breakTime, freeTime) { if(brpsChart) { // Ensure freeTime is never negative for chart data const actualFreeTime = Math.max(0, freeTime); brpsChart.data.datasets[0].data = [musicTime, breakTime, actualFreeTime]; brpsChart.update(); } }; window.brpsResetData = function(silent = false) { if(silent || confirm("Clear all data and reset to default?")) { brpsSetlist = [ { id: 1, song: "The City Lights", focus: "Bridge transition (Tempo changes)", time: 15 }, { id: 2, song: "Silent Echo", focus: "Vocal harmonies in the chorus", time: 10 } ]; document.getElementById('brps-cfg-band').value = 'The Chrononauts'; document.getElementById('brps-cfg-date').valueAsDate = new Date(); document.getElementById('brps-in-start').value = "19:00"; document.getElementById('brps-in-end').value = "21:00"; document.getElementById('brps-in-break').value = 10; brpsRenderSetlistDisplay(); brpsGeneratePlan(); if (!silent) alert("Plan reset to template."); } }; // --- PDF Export --- window.brpsDownloadPDF = function() { const element = document.getElementById('brps-export-area'); const opt = { margin: 0.75, filename: 'Rehearsal_Plan_Sheet.pdf', image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2 }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } }; html2pdf().set(opt).from(element).save(); }; })();