Add row selection, bulk delete, row numbers and page size picker to tables; redesign person profile header
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -309,6 +309,19 @@ export class PeopleService {
|
||||
await this.prisma.person.delete({ where: { id } });
|
||||
}
|
||||
|
||||
async removeMany(actor: Actor, ids: string[]): Promise<{ deleted: number }> {
|
||||
const unique = [...new Set(ids.filter(Boolean))];
|
||||
if (!unique.length) return { deleted: 0 };
|
||||
const res = await this.prisma.person.deleteMany({
|
||||
where: {
|
||||
id: { in: unique },
|
||||
organizationId: actor.organizationId,
|
||||
...ownerWhere(actor),
|
||||
},
|
||||
});
|
||||
return { deleted: res.count };
|
||||
}
|
||||
|
||||
private async ensureExists(actor: Actor, id: string) {
|
||||
const found = await this.prisma.person.findFirst({
|
||||
where: { id, organizationId: actor.organizationId, ...ownerWhere(actor) },
|
||||
|
||||
Reference in New Issue
Block a user