Marcel0123 commited on
Commit
eb73b53
·
verified ·
1 Parent(s): 436b7b6

Upload index.html

Browse files
Files changed (1) hide show
  1. index.html +49 -7
index.html CHANGED
@@ -186,6 +186,28 @@
186
  #reportSheet .report-client-month-chart{height:157px;max-width:100%;min-width:0}
187
  #reportSheet .report-client-month-chart svg{display:block;max-width:100%;height:100%}
188
  @media print{#reportSheet .report-average-note{font-size:8px!important;margin-top:5px!important}#reportSheet .report-client-month-chart{height:133px!important}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  </style></head>
190
  <body>
191
  <div class="app">
@@ -251,7 +273,7 @@
251
  </main>
252
  </div>
253
  <div id="reportOverlay" role="dialog" aria-modal="true" aria-label="Reakt Monitor rapport" aria-hidden="true">
254
- <div class="report-actions"><span><strong>REAKT · Rapportvoorvertoning v1.6.3</strong> &nbsp; — voorlopige managementrapportage, controle vereist</span><div><button id="reportClose" type="button">✕ Sluiten</button> <button id="reportPng" class="report-png" type="button">⬇ Download PNG</button> <button id="reportJpg" class="report-jpg" type="button">⬇ Download JPG</button> <button id="reportPrint" class="report-print" type="button">↓ Opslaan als PDF / Afdrukken</button></div></div>
255
  <section id="reportSheet" aria-label="Witte Inloop Monitor"></section>
256
  </div>
257
  <script src="https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"></script>
@@ -901,6 +923,25 @@ function reportChartBars(names,values,color='#7935cf',asWeek=false){
901
  out+=`<rect x="${x}" y="${y}" width="${bar}" height="${Math.max(bh,0)}" fill="${color}"/><text x="${x+bar/2}" y="${Math.max(10,y-5)}" text-anchor="middle" fill="#18116b" font-size="${asWeek?10:12}" font-weight="700">${v}</text><text x="${x+bar/2}" y="${H-11}" text-anchor="middle" fill="#1f2a56" font-size="${asWeek?8:11}">${escapeHTML(names[i])}</text>`});
902
  return out+'</svg>';
903
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
904
  function reportChartLine(names,values){
905
  if(!values.length)return '<div class="report-no-data">Geen gegevens beschikbaar</div>';
906
  const W=440,H=195,L=40,T=24,B=34,R=15,max=Math.max(1,...values)*1.16,span=W-L-R;
@@ -944,10 +985,11 @@ function buildWhiteReport(){
944
  const activeWindow=readableDate(d.period.activeFrom)+' t/m '+readableDate(d.period.peildatum);
945
  const mon=d.months.map(m=>m.label),values=d.months.map(m=>m.visits),clientsPerMonth=d.months.map(m=>m.clients),newPerMonth=d.months.map(m=>m.newIntake),week=['Ma','Di','Wo','Do','Vr','Za','Zo'];
946
  const weekdayMax=Math.max(...d.byWeek),weekdayMin=Math.min(...d.byWeek),busiest=week[d.byWeek.indexOf(weekdayMax)],quietest=week[d.byWeek.indexOf(weekdayMin)];
947
- const summary=[`In ${d.period.label} zijn bij ${escapeHTML(d.site)} ${reportNL(d.unique)} unieke cliënten met minimaal één geldige scan geregistreerd. Deze cliënten waren samen goed voor ${reportNL(d.visits)} bezoekdagen.`,
948
- `De instroom in ${d.period.label} bedraagt ${reportNL(d.newIntake)} cliënten. Er zijn ${reportNL(d.active)} actieve cliënten met minimaal één scan in de afgelopen drie maanden (van ${activeWindow}).`,
949
- `Op dagen met geregistreerde scans kwamen gemiddeld ${avgDay} cliënten per dag (${reportNL(d.daysWithScans)} geregistreerde dagen). De meeste bezoekdagen vallen op ${busiest} (${reportNL(weekdayMax)}).`,
950
- `De instroom is gebaseerd op de eerste geldige scan in ${d.historyLoaded?'2025 en 2026':'alleen 2026'}, niet op pasuitgifte. ${d.historyLoaded?reportNL(d.correctedExisting)+' aanvankelijk nieuwe cliënten bleken al in 2025 geregistreerd.':'Historie 2025 ontbreekt; de instroom is voorlopig.'} Eerdere scans van vóór 2025 kunnen ontbreken.`];
 
951
  const kpis=[{klass:'purple',icon:'♟',label:'Unieke cliënten',value:reportNL(d.unique),sub:''},
952
  {klass:'green',icon:'+',label:'Nieuwe instroom',value:reportNL(d.newIntake),sub:'Eerste geldige scan op locatie in '+d.period.label},
953
  {klass:'purple',icon:'♙',label:'Actieve cliënten',value:reportNL(d.active),sub:'Minimaal 1 scan in de afgelopen drie maanden.'},
@@ -973,8 +1015,8 @@ function buildWhiteReport(){
973
  <section class="report-panel"><h2>Bezoekdagen per weekdag</h2><div class="chart-box">${reportChartBars(week,d.byWeek,'#ff6410',true)}</div></section>
974
  </div>
975
  <div class="report-bottom-grid">
976
- <section class="report-panel"><h2>Kerncijfers locatie</h2><table class="report-mini-table"><thead><tr><th>Locatie</th><th>Unieke cliënten</th><th>Bezoekdagen</th><th>Gem. cliënten per dag*</th></tr></thead><tbody><tr><td>⌖ ${escapeHTML(d.site)}</td><td>${reportNL(d.unique)}</td><td>${reportNL(d.visits)}</td><td>${avgDay}</td></tr><tr class="total"><td>Totaal / gemiddelde</td><td>${reportNL(d.unique)}</td><td>${reportNL(d.visits)}</td><td>${avgDay}</td></tr></tbody></table><div class="report-average-note">* Gemiddeld over ${reportNL(d.daysWithScans)} dagen met geregistreerde scans.</div></section>
977
- <section class="report-panel"><h2>Aantal cliënten per maand <small>(iedere cliënt maximaal één keer per maand)</small></h2><div class="chart-box report-client-month-chart">${reportChartBars(mon,clientsPerMonth,'#763fc7')}</div></section>
978
  <section class="report-panel"><h2>Managementanalyse</h2><div class="report-analysis">${summary.map(t=>`<p>${t}</p>`).join('')}</div></section>
979
  </div>
980
  <div class="report-foot"><span>Bron: scanregistratie 2026${d.historyLoaded?' en historisch referentiebestand 2025':''}. Rapportageperiode en peildatum staan bovenaan vermeld.</span></div>`;
 
186
  #reportSheet .report-client-month-chart{height:157px;max-width:100%;min-width:0}
187
  #reportSheet .report-client-month-chart svg{display:block;max-width:100%;height:100%}
188
  @media print{#reportSheet .report-average-note{font-size:8px!important;margin-top:5px!important}#reportSheet .report-client-month-chart{height:133px!important}}
189
+
190
+ /* v1.6.4 — leesbare managementrij, uitsluitend witte Inloop Monitor */
191
+ @media(min-width:1101px){
192
+ #reportSheet .report-bottom-grid{grid-template-columns:.98fr 1.30fr 1fr;}
193
+ }
194
+ #reportSheet .report-bottom-grid .report-panel{min-height:232px}
195
+ #reportSheet .report-client-month-chart{height:196px;}
196
+ #reportSheet .report-average-highlight{display:flex;gap:9px;align-items:center;margin-top:14px;padding:12px 14px;background:#f6f3ff;border:1px solid #e5dafa;border-radius:7px;}
197
+ #reportSheet .report-average-highlight .highlight-num{font-size:27px;font-weight:850;color:#5b26c3;line-height:1;white-space:nowrap;}
198
+ #reportSheet .report-average-highlight .highlight-label{font-size:12px;font-weight:700;color:#27325b;line-height:1.3;}
199
+ #reportSheet .report-analysis{font-size:12px;line-height:1.52;}
200
+ #reportSheet .report-analysis p{margin:0 0 11px;}
201
+ @media print{
202
+ #reportSheet .report-bottom-grid{grid-template-columns:.98fr 1.30fr 1fr!important;}
203
+ #reportSheet .report-bottom-grid .report-panel{min-height:183px!important;}
204
+ #reportSheet .report-client-month-chart{height:153px!important;}
205
+ #reportSheet .report-average-highlight{margin-top:5px!important;padding:6px!important;gap:5px!important;}
206
+ #reportSheet .report-average-highlight .highlight-num{font-size:16px!important;}
207
+ #reportSheet .report-average-highlight .highlight-label{font-size:8px!important;}
208
+ #reportSheet .report-analysis{font-size:9px!important;line-height:1.38!important;}
209
+ #reportSheet .report-analysis p{margin:0 0 7px!important;}
210
+ }
211
  </style></head>
212
  <body>
213
  <div class="app">
 
273
  </main>
274
  </div>
275
  <div id="reportOverlay" role="dialog" aria-modal="true" aria-label="Reakt Monitor rapport" aria-hidden="true">
276
+ <div class="report-actions"><span><strong>REAKT · Rapportvoorvertoning v1.6.4</strong> &nbsp; — voorlopige managementrapportage, controle vereist</span><div><button id="reportClose" type="button">✕ Sluiten</button> <button id="reportPng" class="report-png" type="button">⬇ Download PNG</button> <button id="reportJpg" class="report-jpg" type="button">⬇ Download JPG</button> <button id="reportPrint" class="report-print" type="button">↓ Opslaan als PDF / Afdrukken</button></div></div>
277
  <section id="reportSheet" aria-label="Witte Inloop Monitor"></section>
278
  </div>
279
  <script src="https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js"></script>
 
923
  out+=`<rect x="${x}" y="${y}" width="${bar}" height="${Math.max(bh,0)}" fill="${color}"/><text x="${x+bar/2}" y="${Math.max(10,y-5)}" text-anchor="middle" fill="#18116b" font-size="${asWeek?10:12}" font-weight="700">${v}</text><text x="${x+bar/2}" y="${H-11}" text-anchor="middle" fill="#1f2a56" font-size="${asWeek?8:11}">${escapeHTML(names[i])}</text>`});
924
  return out+'</svg>';
925
  }
926
+ function reportChartClientMonth(names,values){
927
+ // Alleen presentatie: dezelfde berekende maandwaarden; iedere cliënt eenmaal per maand.
928
+ const W=480,H=220,left=24,right=9,top=19,bottom=34;
929
+ const max=Math.max(1,...values),span=H-top-bottom;
930
+ const band=(W-left-right)/Math.max(1,names.length),bar=Math.min(46,band*.82);
931
+ let out=`<svg viewBox="0 0 ${W} ${H}" width="100%" height="100%" role="img" aria-label="Aantal unieke cliënten per maand">`;
932
+ for(let i=0;i<=4;i++){
933
+ const y=top+span*i/4;
934
+ out+=`<line x1="${left}" y1="${y}" x2="${W-right}" y2="${y}" stroke="#e8e6f2" stroke-width="1"/>`;
935
+ }
936
+ values.forEach((v,i)=>{
937
+ const height=(span-15)*v/max;
938
+ const x=left+band*i+(band-bar)/2,y=H-bottom-height;
939
+ out+=`<rect x="${x}" y="${y}" width="${bar}" height="${Math.max(0,height)}" fill="#763fc7" rx="1.8"/>`;
940
+ out+=`<text x="${x+bar/2}" y="${Math.max(13,y-6)}" text-anchor="middle" fill="#2e196e" font-size="14" font-weight="800">${v}</text>`;
941
+ out+=`<text x="${x+bar/2}" y="${H-11}" text-anchor="middle" fill="#22285e" font-size="12" font-weight="600">${escapeHTML(names[i])}</text>`;
942
+ });
943
+ return out+'</svg>';
944
+ }
945
  function reportChartLine(names,values){
946
  if(!values.length)return '<div class="report-no-data">Geen gegevens beschikbaar</div>';
947
  const W=440,H=195,L=40,T=24,B=34,R=15,max=Math.max(1,...values)*1.16,span=W-L-R;
 
985
  const activeWindow=readableDate(d.period.activeFrom)+' t/m '+readableDate(d.period.peildatum);
986
  const mon=d.months.map(m=>m.label),values=d.months.map(m=>m.visits),clientsPerMonth=d.months.map(m=>m.clients),newPerMonth=d.months.map(m=>m.newIntake),week=['Ma','Di','Wo','Do','Vr','Za','Zo'];
987
  const weekdayMax=Math.max(...d.byWeek),weekdayMin=Math.min(...d.byWeek),busiest=week[d.byWeek.indexOf(weekdayMax)],quietest=week[d.byWeek.indexOf(weekdayMin)];
988
+ const summary=[
989
+ `In ${d.period.label} registreerde ${escapeHTML(d.site)} ${reportNL(d.unique)} unieke cliënten en ${reportNL(d.visits)} bezoekdagen.`,
990
+ `Op ${reportNL(d.daysWithScans)} dagen met geregistreerde scans kwamen gemiddeld ${avgDay} cliënten per dag. De meeste bezoekdagen vielen op ${busiest} (${reportNL(weekdayMax)}).`,
991
+ `Nieuwe instroom: ${reportNL(d.newIntake)} cliënten. Actieve cliënten in de afgelopen drie maanden: ${reportNL(d.active)}.${d.historyLoaded?' Na vergelijking met 2025 bleken '+reportNL(d.correctedExisting)+' aanvankelijk nieuwe cliënten al eerder geregistreerd.':' Historie over 2025 ontbreekt; de instroom is voorlopig.'}`
992
+ ];
993
  const kpis=[{klass:'purple',icon:'♟',label:'Unieke cliënten',value:reportNL(d.unique),sub:''},
994
  {klass:'green',icon:'+',label:'Nieuwe instroom',value:reportNL(d.newIntake),sub:'Eerste geldige scan op locatie in '+d.period.label},
995
  {klass:'purple',icon:'♙',label:'Actieve cliënten',value:reportNL(d.active),sub:'Minimaal 1 scan in de afgelopen drie maanden.'},
 
1015
  <section class="report-panel"><h2>Bezoekdagen per weekdag</h2><div class="chart-box">${reportChartBars(week,d.byWeek,'#ff6410',true)}</div></section>
1016
  </div>
1017
  <div class="report-bottom-grid">
1018
+ <section class="report-panel"><h2>Kerncijfers locatie</h2><table class="report-mini-table"><thead><tr><th>Locatie</th><th>Unieke cliënten</th><th>Bezoekdagen</th><th>Gem. cliënten per dag*</th></tr></thead><tbody><tr><td>⌖ ${escapeHTML(d.site)}</td><td>${reportNL(d.unique)}</td><td>${reportNL(d.visits)}</td><td>${avgDay}</td></tr><tr class="total"><td>Totaal / gemiddelde</td><td>${reportNL(d.unique)}</td><td>${reportNL(d.visits)}</td><td>${avgDay}</td></tr></tbody></table><div class="report-average-highlight"><span class="highlight-num">${avgDay}</span><span class="highlight-label">Gemiddeld aantal cliënten per dag</span></div><div class="report-average-note">* Berekend over ${reportNL(d.daysWithScans)} dagen met geregistreerde scans.</div></section>
1019
+ <section class="report-panel"><h2>Aantal cliënten per maand <small>(iedere cliënt maximaal één keer per maand)</small></h2><div class="chart-box report-client-month-chart">${reportChartClientMonth(mon,clientsPerMonth)}</div></section>
1020
  <section class="report-panel"><h2>Managementanalyse</h2><div class="report-analysis">${summary.map(t=>`<p>${t}</p>`).join('')}</div></section>
1021
  </div>
1022
  <div class="report-foot"><span>Bron: scanregistratie 2026${d.historyLoaded?' en historisch referentiebestand 2025':''}. Rapportageperiode en peildatum staan bovenaan vermeld.</span></div>`;