This commit is contained in:
2026-06-11 11:32:12 +05:45
parent a551ca538e
commit 7f6ae57c3a
2 changed files with 14 additions and 4 deletions
@@ -39,6 +39,13 @@
</svg> </svg>
Leaderboard Leaderboard
</a> </a>
<button id="newRegistrationBtn"
class="flex items-center gap-2 bg-indigo-600 hover:bg-indigo-700 text-white text-sm font-medium px-4 py-2 rounded-lg transition-colors shadow-sm">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>
</svg>
New Registration
</button>
</div> </div>
</div> </div>
@@ -248,6 +248,9 @@
<p id="panelEmail" class="text-xs font-medium text-slate-600 truncate"></p> <p id="panelEmail" class="text-xs font-medium text-slate-600 truncate"></p>
</div> </div>
</div> </div>
{{-- Hidden elements required by shared JS --}}
<span id="panelSessions" class="hidden"></span>
<span id="panelCreated" class="hidden"></span>
</div> </div>
<!-- Scrollable content --> <!-- Scrollable content -->
@@ -338,13 +341,13 @@ function openDetailPanel(row) {
// Status badge // Status badge
const statusEl = document.getElementById('panelStatus'); const statusEl = document.getElementById('panelStatus');
if (status === 'hot') { if (status === 'hot') {
statusEl.className = 'text-xs px-2 py-1 rounded bg-red-50 text-red-600'; statusEl.className = 'text-xs px-2 py-1 rounded bg-red-50 text-red-600';
statusEl.textContent = '🔥 Hot'; statusEl.textContent = '🔥 Hot';
} else if (status === 'cold') { } else if (status === 'cold') {
statusEl.className = 'text-xs px-2 py-1 rounded bg-blue-50 text-blue-600'; statusEl.className = 'text-xs px-2 py-1 rounded bg-blue-50 text-blue-600';
statusEl.textContent = '❄️ Cold'; statusEl.textContent = '❄️ Cold';
} else { } else {
statusEl.className = 'text-xs px-2 py-1 rounded bg-amber-50 text-amber-600'; statusEl.className = 'text-xs px-2 py-1 rounded bg-amber-50 text-amber-600';
statusEl.textContent = '☀️ Warm'; statusEl.textContent = '☀️ Warm';
} }
@@ -384,7 +387,7 @@ function openDetailPanel(row) {
}); });
// Load session history // Load session history
$.get('/registrations/' + selectedRegId + '/history', function (r) { $.get('{{ route("registrations.history", ":id") }}'.replace(':id', selectedRegId), function (r) {
renderHistory(r.sessions || []); renderHistory(r.sessions || []);
}).fail(function () { }).fail(function () {
document.getElementById('panelHistory').innerHTML = '<p class="text-xs text-slate-400 italic">No sessions found.</p>'; document.getElementById('panelHistory').innerHTML = '<p class="text-xs text-slate-400 italic">No sessions found.</p>';