feat(activities): remove an assignee from the share list
A team, role, or person can be taken off the activity from the progress chips, and ungrouped people use the same chip as grouped members. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -168,13 +168,24 @@ function commit(ids: string[]) {
|
||||
|
||||
function onUpdate(value: unknown) {
|
||||
const tokens = Array.isArray(value) ? value.map(String) : [];
|
||||
const tokenSet = new Set(tokens);
|
||||
const removedMemberIds = new Set<string>();
|
||||
for (const token of selectValue.value) {
|
||||
if (tokenSet.has(token)) continue;
|
||||
const dropped = catalogByToken.value.get(token);
|
||||
if (!dropped) continue;
|
||||
for (const id of dropped.userIds) removedMemberIds.add(id);
|
||||
}
|
||||
const ids = new Set<string>();
|
||||
const pins = new Set<string>();
|
||||
for (const token of tokens) {
|
||||
const group = catalogByToken.value.get(token);
|
||||
if (group) {
|
||||
pins.add(token);
|
||||
for (const id of group.userIds) ids.add(id);
|
||||
for (const id of group.userIds) {
|
||||
if (removedMemberIds.has(id)) continue;
|
||||
ids.add(id);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!token.startsWith('role:') && !token.startsWith('team:')) ids.add(token);
|
||||
|
||||
Reference in New Issue
Block a user