← Dashboard

Digital Career ID Card

Your verified professional identity on SmartHire247

Generating your Career ID...

`); win.document.close(); setTimeout(() => { win.print(); win.close(); }, 500); } async function regenerateCard() { if (!confirm('Regenerate your ID card? This will create a new QR code and validation token.')) return; try { const res = await fetch(`/api/candidate/id-card/regenerate/${SESSION.id}`, { method: 'POST', headers: { 'x-user-role': SESSION.role, 'x-user-id': SESSION.id } }); if (res.ok) { if (typeof APP !== 'undefined' && APP.toast) APP.toast('Card regenerated!', 'success'); // Reload card data const newRes = await fetch(`/api/candidate/id-card/${SESSION.id}`); cardData = await newRes.json(); renderCard(); } } catch (err) { console.error('Regenerate error:', err); } } function copyShareLink() { if (!verifyUrl) { if (typeof APP !== 'undefined' && APP.toast) APP.toast('Card not ready yet', 'warning'); return; } navigator.clipboard.writeText(verifyUrl).then(() => { if (typeof APP !== 'undefined' && APP.toast) APP.toast('Verification link copied!', 'success'); }).catch(() => { // Fallback prompt('Copy this link:', verifyUrl); }); } function shareLinkedIn() { const text = encodeURIComponent(`I'm verified on SmartHire247! Check my Digital Career ID: ${verifyUrl}`); window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(verifyUrl)}`, '_blank'); } function shareWhatsApp() { const text = encodeURIComponent(`Check out my SmartHire247 Verified Career ID Card: ${verifyUrl}`); window.open(`https://wa.me/?text=${text}`, '_blank'); }