Home
Voor Young Professionals
⌄
Solliciteren
Over de consultancy sector
Partners
Voor kantoren
Over ons
Contact
Doe de test
Home
Voor Young Professionals
+
Solliciteren
Over de consultancy sector
Partners
Voor kantoren
Over ons
Contact
Doe de test
=0;}).length / Math.max(1, Math.min(typeKeuze.length, kantoor.type.length))); var expKeuze = ant.expertise || []; dim.expertise = expKeuze.length === 0 ? 0.5 : Math.min(1, expKeuze.filter(function(e){return kantoor.expertise.indexOf(e)>=0;}).length / Math.min(expKeuze.length, 3)); var klantKeuze = (ant.klanten||[]).concat(ant.sectorvoorkeur||[]); dim.klanten = klantKeuze.length === 0 ? 0.6 : Math.min(1, klantKeuze.filter(function(k){return kantoor.klanten.indexOf(k)>=0;}).length / Math.max(1, Math.min(klantKeuze.length, 3))); dim.grootte = (!ant.grootte || ant.grootte==="alle") ? 0.7 : (ant.grootte===kantoor.grootte ? 1 : 0.15); dim.groeifase = !ant.groeifase ? 0.6 : (ant.groeifase===kantoor.groeifase ? 1 : 0.2); dim.klantcontact = !ant.klantcontact ? 0.6 : (ant.klantcontact===kantoor.klantcontact ? 1 : 0.25); dim.werkvorm = (!ant.werkvorm||ant.werkvorm==="alle") ? 0.7 : (ant.werkvorm===kantoor.werkvorm ? 1 : 0.2); dim.ervaring = !ant.ervaring ? 0.6 : (kantoor.instapniveau.indexOf(ant.ervaring)>=0 ? 1 : 0.2); var intVal = ant.internationaal || 3; dim.internationaal = intVal===3 ? 0.7 : (intVal>=4 ? (kantoor.internationaal ? 1 : 0.2) : (kantoor.internationaal ? 0.3 : 1)); var gew = {type:0.25,expertise:0.22,klanten:0.18,grootte:0.10,groeifase:0.08,klantcontact:0.08,werkvorm:0.05,ervaring:0.04,internationaal:0.05}; var score = 0; Object.keys(gew).forEach(function(k){score += (dim[k]||0)*gew[k];}); var pct = Math.round(52 + score * 44); var redenen = []; if(dim.type>=0.7) redenen.push("Type consultancy"); if(dim.expertise>=0.6) redenen.push("Expertise match"); if(dim.klanten>=0.7) redenen.push("Type klant"); if(dim.grootte===1) redenen.push("Juiste grootte"); if(dim.groeifase===1) redenen.push("Groeifase"); if(dim.klantcontact===1) redenen.push("Klantcontact"); return {pct:pct, dim:dim, redenen:redenen}; } var S = {index:0, ant:{}}; function toon(naam) { ["s-intro","s-quiz","s-lead","s-result"].forEach(function(id){ document.getElementById(id).classList.add("hidden"); }); document.getElementById(naam).classList.remove("hidden"); setTimeout(sync, 60); } function sync() { var h = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); parent.postMessage({type:"yc-match-height", height:h}, "*"); } function render() { var v = VRAGEN[S.index]; var totaal = VRAGEN.length; document.getElementById("q-counter").textContent = "Vraag "+(S.index+1)+" van "+totaal; document.getElementById("q-prog").style.width = ((S.index+1)/totaal*100)+"%"; document.getElementById("q-title").textContent = v.title; document.getElementById("q-copy").textContent = v.copy; document.getElementById("q-hint").textContent = v.type==="multi" ? "Meerdere keuzes mogelijk (max. "+v.max+")" : v.type==="scale" ? "Geef een score van 1 tot 5" : "Kies één optie"; document.getElementById("q-dim-label").innerHTML = "
"+v.dim+"
"; var body = document.getElementById("q-body"); body.innerHTML = ""; if(v.type==="single"){ var wrap = document.createElement("div"); wrap.className="options"; v.opties.forEach(function(o,i){ var btn=document.createElement("button"); btn.type="button"; btn.className="option"+(S.ant[v.id]===i?" selected":""); btn.innerHTML="
"+o.label+"
"+(o.copy?"
"+o.copy+"
":""); btn.onclick=function(){S.ant[v.id]=i;render();}; wrap.appendChild(btn); }); body.appendChild(wrap); document.getElementById("next-btn").disabled = S.ant[v.id]===undefined; } else if(v.type==="multi"){ var sel=S.ant[v.id]||[]; body.innerHTML="
Kies maximaal "+v.max+" opties
"; var cw=document.createElement("div"); cw.className="chips-wrap"; v.opties.forEach(function(o){ var chip=document.createElement("button"); chip.type="button"; chip.className="chip"+(sel.indexOf(o.w)>=0?" selected":""); chip.textContent=o.label; chip.onclick=function(){ var cur=S.ant[v.id]||[]; if(cur.indexOf(o.w)>=0) S.ant[v.id]=cur.filter(function(x){return x!==o.w;}); else if(cur.length
"+v.labels[0]+"
"+v.labels[1]+"
"; body.appendChild(lw); document.getElementById("next-btn").disabled = !S.ant[v.id]; } document.getElementById("back-btn").disabled = S.index===0; document.getElementById("next-btn").textContent = S.index===VRAGEN.length-1 ? "Bereken mijn matches" : "Volgende"; setTimeout(sync,50); } function renderResultaten() { var ant = {}; VRAGEN.forEach(function(v){ if(v.type==="single"&&S.ant[v.id]!==undefined) ant[v.id]=v.opties[S.ant[v.id]].w; else if(v.type==="multi") ant[v.id]=S.ant[v.id]||[]; else if(v.type==="scale") ant[v.id]=S.ant[v.id]; }); var matches = KANTOREN.map(function(k){ var r=berekenMatch(ant,k); return {k:k,pct:r.pct,dim:r.dim,redenen:r.redenen}; }).sort(function(a,b){return b.pct-a.pct;}); document.getElementById("res-sub").textContent = "Op basis van jouw antwoorden is "+matches[0].k.naam+" jouw beste match ("+matches[0].pct+"%). Hieronder zie je alle kantoren gerangschikt op passingspercentage."; var DL={type:"Type consultancy",expertise:"Expertise",klanten:"Type klant",grootte:"Grootte",groeifase:"Groeifase",klantcontact:"Klantcontact"}; var DK={type:"#18b7e7",expertise:"#f47c20",klanten:"#1e3f7a",grootte:"#7c3aed",groeifase:"#7c3aed",klantcontact:"#059669"}; var list=document.getElementById("match-list"); list.innerHTML=""; matches.forEach(function(m,i){ var card=document.createElement("div"); card.className="match-card"+(i===0?" top":""); var rank=i===0?"gold":i===1?"silver":i===2?"bronze":""; var bd=["type","expertise","klanten","grootte","groeifase","klantcontact"].map(function(k){ return "
"+DL[k]+"
"+Math.round(m.dim[k]*100)+"%
"; }).join(""); card.innerHTML="
"+(i+1)+"
"+m.k.naam+"
"+m.k.type.map(function(t){return "
"+t+"
";}).join("")+"
"+m.k.medewerkers+" mdw.
"+(m.redenen.length?"
"+m.redenen.map(function(r){return "
"+r+"
";}).join("")+"
":"")+"
"+bd+"
"+m.pct+"%
match
"; card.style.cursor="pointer"; card.onclick=function(){try{window.top.location.href=m.k.slug;}catch(e){}}; list.appendChild(card); }); setTimeout(sync,100); } document.addEventListener("DOMContentLoaded", function(){ document.getElementById("start-btn").onclick = function(){ S.index=0; S.ant={}; toon("s-quiz"); render(); }; document.getElementById("back-btn").onclick = function(){ if(S.index>0){S.index--;render();} }; document.getElementById("next-btn").onclick = function(){ if(S.index