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

@@ -30,9 +30,7 @@
}>();
$: hasSelection = selectedPeople.length > 0;
$: unselectedPeople = people.filter(
(source) => !selectedPeople.some((selected) => selected.id === source.id) && source.id !== person.id,
);
$: peopleToNotShow = [...selectedPeople, person];
onMount(async () => {
const data = await getAllPeople({ withHidden: false });
@@ -150,13 +148,7 @@
</div>
</div>
<PeopleList
people={unselectedPeople}
peopleCopy={unselectedPeople}
unselectedPeople={selectedPeople}
{screenHeight}
on:select={({ detail }) => onSelect(detail)}
/>
<PeopleList {people} {peopleToNotShow} {screenHeight} on:select={({ detail }) => onSelect(detail)} />
</section>
{#if isShowConfirmation}