feat(ui): filter already-added chars from participant dropdown
Character dropdown in add-participant picker excluded characters already in the encounter. Prevents dup-add at the source — user can only select chars not yet participating.
This commit is contained in:
+1
-1
@@ -1352,7 +1352,7 @@ function ParticipantManager({ encounter, encounterPath, campaignCharacters, camp
|
||||
className="mt-1 w-full px-3 py-2 bg-stone-700 border-stone-600 rounded text-white"
|
||||
>
|
||||
<option value="">-- Select from Campaign --</option>
|
||||
{campaignCharacters.map(c => (
|
||||
{campaignCharacters.filter(c => !participants.some(p => p.type === 'character' && p.originalCharacterId === c.id)).map(c => (
|
||||
<option key={c.id} value={c.id}>
|
||||
{c.name} (HP: {c.defaultMaxHp || 'N/A'}, Mod: {formatInitMod(c.defaultInitMod)})
|
||||
</option>
|
||||
|
||||
Reference in New Issue
Block a user