Skip to content

Commit 174db24

Browse files
committed
fix: display seq number for checkpoint
1 parent 2f98952 commit 174db24

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

src/app/dashboard/events/[id]/page.tsx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,10 @@ export default function EventPage({ params }: PageParams) {
328328
</p>
329329

330330
<div className="space-y-3">
331-
{event.checkpoints.map((checkpoint) => {
331+
{event.checkpoints.map((checkpoint, idx) => {
332332
const isUnlocked = event.unlockedCheckpoints?.includes(checkpoint) ?? false;
333-
333+
const globalSeq = idx + 1;
334+
334335
return (
335336
<div
336337
key={checkpoint}
@@ -343,15 +344,22 @@ export default function EventPage({ params }: PageParams) {
343344
onChange={() => handleCheckpointToggle(checkpoint, isUnlocked)}
344345
className="h-5 w-5 text-blue-600 rounded focus:ring-2 focus:ring-blue-500 cursor-pointer"
345346
/>
346-
<label
347-
htmlFor={`checkpoint-${checkpoint}`}
348-
className="ml-3 flex-1 cursor-pointer"
349-
>
350-
<span className="font-medium text-gray-900">{checkpoint}</span>
351-
<span className={`ml-3 text-sm ${isUnlocked ? 'text-green-600' : 'text-gray-500'}`}>
352-
{isUnlocked ? '🔓 Unlocked - Volunteers can scan' : '🔒 Locked - Volunteers cannot scan'}
347+
<div className="ml-3 flex-1 cursor-pointer flex items-center">
348+
<span className="inline-flex items-center justify-center mr-3 w-12 h-8 rounded-full bg-gray-100 text-sm font-semibold text-gray-700">
349+
Seq {globalSeq}
353350
</span>
354-
</label>
351+
<div>
352+
<div className="flex items-center">
353+
<span className="font-medium text-gray-900">{checkpoint}</span>
354+
{/* volunteer-visible sequence remains available via unlocked state */}
355+
</div>
356+
<div>
357+
<span className={`text-sm ${isUnlocked ? 'text-green-600' : 'text-gray-500'}`}>
358+
{isUnlocked ? '🔓 Unlocked - Volunteers can scan' : '🔒 Locked - Volunteers cannot scan'}
359+
</span>
360+
</div>
361+
</div>
362+
</div>
355363
</div>
356364
);
357365
})}

0 commit comments

Comments
 (0)