fix(web): multiple fixes for people (#9343)

fix: multiple fixes for people

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
martin
2024-05-09 23:23:49 +02:00
committed by GitHub
parent a8abf2753e
commit 757840c2fd
5 changed files with 35 additions and 46 deletions

View File

@@ -31,9 +31,7 @@
let hasSelection = false;
let screenHeight: number;
$: unselectedPeople = selectedPerson
? people.filter((person) => selectedPerson && person.id !== selectedPerson.id && personAssets.id !== person.id)
: people;
$: peopleToNotShow = selectedPerson ? [personAssets, selectedPerson] : [personAssets];
let dispatch = createEventDispatcher<{
confirm: void;
@@ -178,13 +176,7 @@
</div>
</div>
{/if}
<PeopleList
people={unselectedPeople}
peopleCopy={unselectedPeople}
unselectedPeople={selectedPerson ? [selectedPerson, personAssets] : [personAssets]}
{screenHeight}
on:select={({ detail }) => handleSelectedPerson(detail)}
/>
<PeopleList {people} {peopleToNotShow} {screenHeight} on:select={({ detail }) => handleSelectedPerson(detail)} />
</section>
</section>
</section>