Skip to content

Commit 5f84178

Browse files
committed
feat: admin view as a user
1 parent 68de8ba commit 5f84178

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ export default function EventPage({ params }: PageParams) {
330330
<div className="space-y-3">
331331
{event.checkpoints.map((checkpoint, idx) => {
332332
const isUnlocked = event.unlockedCheckpoints?.includes(checkpoint) ?? false;
333-
const globalSeq = idx + 1;
333+
// If unlocked, show its position in the unlockedCheckpoints array (reflects pick/unlock order)
334+
const unlockedIdx = event.unlockedCheckpoints?.indexOf(checkpoint) ?? -1;
335+
const displaySeq = unlockedIdx >= 0 ? unlockedIdx + 1 : idx + 1;
334336

335337
return (
336338
<div
@@ -346,7 +348,7 @@ export default function EventPage({ params }: PageParams) {
346348
/>
347349
<div className="ml-3 flex-1 cursor-pointer flex items-center">
348350
<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}
351+
{displaySeq}
350352
</span>
351353
<div>
352354
<div className="flex items-center">
@@ -355,7 +357,7 @@ export default function EventPage({ params }: PageParams) {
355357
</div>
356358
<div>
357359
<span className={`text-sm ${isUnlocked ? 'text-green-600' : 'text-gray-500'}`}>
358-
{isUnlocked ? '🔓 Unlocked - Volunteers can scan' : '🔒 Locked - Volunteers cannot scan'}
360+
{isUnlocked ? ' Unlocked - Volunteers can scan' : ' Locked - Volunteers cannot scan'}
359361
</span>
360362
</div>
361363
</div>

0 commit comments

Comments
 (0)