Add deal co-assignees and saved filters on people/pipeline lists.

Deals keep a primary owner plus shared assignees with matching visibility; Contacts and Pipeline can save and reuse filter presets.
This commit is contained in:
2026-09-27 14:25:32 +03:30
parent 00f8b91d78
commit c06c92b333
19 changed files with 553 additions and 20 deletions
+2 -1
View File
@@ -22,6 +22,7 @@ import {
type Actor,
noteAccessWhere,
ownerWhere,
dealAccessWhere,
} from '../common/record-scope';
type NoteActor = Pick<
@@ -579,7 +580,7 @@ export class NotesService {
}
if (dealId) {
const deal = await this.prisma.deal.findFirst({
where: { id: dealId, organizationId, ...scope },
where: { id: dealId, organizationId, ...dealAccessWhere(actor) },
select: { id: true },
});
if (!deal) throw new BadRequestException('معامله انتخاب‌شده معتبر نیست');