Skip to content

Commit

Permalink
Filtered lead duplicates.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Dec 20, 2024
1 parent 5f1dd4a commit cf643b2
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/lib/Changes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,12 @@
selection={filterLead}
options={[
{ value: undefined, label: 'All' },
...changes
.map((change) =>
change.lead === null
? null
: {
value: change.lead,
label: org.getProfileNameOrEmail(change.lead) ?? ''
}
)
.filter((change) => change !== null)
...[...new Set(changes.map((change) => change.lead))]
.filter((lead) => lead !== null)
.map((lead) => ({
value: lead,
label: org.getProfileNameOrEmail(lead) ?? ''
}))
]}
change={(value) => (filterLead = value)}
/>
Expand Down

0 comments on commit cf643b2

Please sign in to comment.