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:
@@ -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('معامله انتخابشده معتبر نیست');
|
||||
|
||||
Reference in New Issue
Block a user