|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <%- include('./partials/head'); %> |
| 5 | +</head> |
| 6 | +<body> |
| 7 | +<%- include('./partials/navbar'); %> |
| 8 | + |
| 9 | +<div class="container-fluid"> |
| 10 | + <div class="my-5"> |
| 11 | + <h2>Candidate Pipeline</h2> |
| 12 | + <h5>Position: Software Engineer</h3> |
| 13 | + </div> |
| 14 | + |
| 15 | + <div class="row"> |
| 16 | + <div class="col-12 mb-5"> |
| 17 | + <div class="d-flex justify-content-center"> |
| 18 | + <div id="funnel"></div> |
| 19 | + </div> |
| 20 | + </div> |
| 21 | + </div> |
| 22 | + |
| 23 | + <div class="row"> |
| 24 | + <div class="col-12"> |
| 25 | + <div class="accordion accordion-flush" id="accordion-candidates"> |
| 26 | + <% candidates.forEach(candidate => { %> |
| 27 | + <div class="accordion-item"> |
| 28 | + <div class="accordion-header"> |
| 29 | + <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#candidate-detail-<%= candidate.id %>"> |
| 30 | + <span class="w-25"><%= candidate.name %></span> |
| 31 | + <span class="w-25"><span class="badge bg-secondary"><%= candidate.step %></span></span> |
| 32 | + <span class="w-25 small text-muted text-truncate"><%= candidate.notes %></span> |
| 33 | + <span class="text-muted small w-25 text-end"><span class="me-3"><%= candidate.lastUpdated.toLocaleDateString('en-US') %></span></span> |
| 34 | + </button> |
| 35 | + </div> |
| 36 | + <div id="candidate-detail-<%= candidate.id %>" class="accordion-collapse collapse" data-bs-parent="#accordion-candidates"> |
| 37 | + <div class="accordion-body"> |
| 38 | + <ul class="nav nav-tabs"> |
| 39 | + <li class="nav-item"> |
| 40 | + <button class="nav-link active" data-bs-toggle="tab" data-bs-target="#candidate-tab-content-<%= candidate.id %>-info" type="button">Basic Information</button> |
| 41 | + </li> |
| 42 | + <li class="nav-item"> |
| 43 | + <button class="nav-link" data-bs-toggle="tab" data-bs-target="#candidate-tab-content-<%= candidate.id %>-activity" type="button">Activity</button> |
| 44 | + </li> |
| 45 | + </ul> |
| 46 | + <div class="tab-content"> |
| 47 | + <div class="tab-pane active p-3" id="candidate-tab-content-<%= candidate.id %>-info"> |
| 48 | + <dl> |
| 49 | + <dt>Email</dt> |
| 50 | + <dd><%= candidate.email %></dd> |
| 51 | + <dt>Phone</dd> |
| 52 | + <dd><%= candidate.phone %></dt> |
| 53 | + <dt>Current Position</dt> |
| 54 | + <dd><%= candidate.currentPosition %></dd> |
| 55 | + <dt>Address</dt> |
| 56 | + <dd><%= candidate.address %></dd> |
| 57 | + <dt>Notes</dt> |
| 58 | + <dd><%= candidate.notes %></dd> |
| 59 | + </dl> |
| 60 | + </div> |
| 61 | + <div class="tab-pane p-3" id="candidate-tab-content-<%= candidate.id %>-activity"> |
| 62 | + <div class="card mb-4"> |
| 63 | + <div class="card-header"> |
| 64 | + Screening - <%= candidate.lastUpdated.toLocaleDateString('en-US') %> |
| 65 | + </div> |
| 66 | + <div class="card-body"> |
| 67 | + <p class="card-text"><%= candidate.notes %></p> |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + <div class="card mb-4"> |
| 71 | + <div class="card-header"> |
| 72 | + Interview - <%= candidate.lastUpdated.toLocaleDateString('en-US') %> |
| 73 | + </div> |
| 74 | + <div class="card-body"> |
| 75 | + <p class="card-text"><%= candidate.notes %></p> |
| 76 | + </div> |
| 77 | + </div> |
| 78 | +
|
| 79 | + <div class="card"> |
| 80 | + <div class="card-header">Background checks</div> |
| 81 | + <div class="card-body"> |
| 82 | + <button type="button" data-checkr-candidate-email="<%= candidate.email %>" data-checkr-embed="new-invitation" class="btn btn-sm">New Background Check</button> |
| 83 | + <div class="card-text mt-3"> |
| 84 | + <div data-checkr-candidate-email="<%= candidate.email %>" data-checkr-embed="reports-overview"></div> |
| 85 | + </div> |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + </div> |
| 89 | + </div> |
| 90 | + </div> |
| 91 | + </div> |
| 92 | + </div> |
| 93 | + <% }) %> |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + </div> |
| 97 | +</div> |
| 98 | + |
| 99 | + <script type="module"> |
| 100 | + const styles = { |
| 101 | + '.btn-primary': { |
| 102 | + background: '#527a00', |
| 103 | + }, |
| 104 | + '.header': { |
| 105 | + 'font-size': '150%', |
| 106 | + 'font-weight': 'normal', |
| 107 | + color: '#527a00', |
| 108 | + }, |
| 109 | + '.form-label': { |
| 110 | + 'font-weight': 'bold', |
| 111 | + }, |
| 112 | + '.form-control': { |
| 113 | + padding: '0.5rem', |
| 114 | + }, |
| 115 | + '.link': { |
| 116 | + 'text-decoration': 'none' |
| 117 | + }, |
| 118 | + }; |
| 119 | +
|
| 120 | + const props = { |
| 121 | + externalCandidateId: 'WEB-SDK-DEMO-001', |
| 122 | + sessionTokenPath: '/session-token-path', |
| 123 | + fakeMode: true, |
| 124 | + styles |
| 125 | + } |
| 126 | +
|
| 127 | + document.querySelectorAll("[data-checkr-embed='new-invitation']").forEach(button => { |
| 128 | + button.addEventListener('click', event => { |
| 129 | + const newInvitationEmbed = new Checkr.Embeds.NewInvitation({...props, ...{defaultEmail: button.dataset.checkrCandidateEmail}}); |
| 130 | + newInvitationEmbed.modal(); |
| 131 | + embed.modal(); |
| 132 | + }); |
| 133 | + }); |
| 134 | + |
| 135 | + document.querySelectorAll("[data-checkr-embed='reports-overview']").forEach(section => { |
| 136 | + const reportsOverviewEmbed = new Checkr.Embeds.ReportsOverview({...props, ...{defaultEmail: section.dataset.checkrCandidateEmail}}); |
| 137 | + reportsOverviewEmbed.render(section); |
| 138 | + }); |
| 139 | + </script> |
| 140 | + |
| 141 | + <script> |
| 142 | + const chart = new D3Funnel('#funnel'); |
| 143 | + chart.draw(<%- JSON.stringify(funnelData) %>, {}); |
| 144 | + </script> |
| 145 | + |
| 146 | +</body> |
| 147 | +</html> |
0 commit comments