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
+11
View File
@@ -10,6 +10,8 @@ export type PipelineDeal = {
/** شناسه مرحله فعلی — هنگام جابه‌جایی به‌روز می‌شود */
stageId?: string;
currencyUnit?: string;
/** نام مسئولان برای نمایش روی کارت */
assigneeNames?: string[];
};
export type PipelineUiCopy = {
@@ -136,6 +138,8 @@ export function mapBoardToStages(
createdAt: string;
person: { fullName: string } | null;
company: { name: string } | null;
owner?: { id: string; fullName: string } | null;
assignees?: Array<{ id: string; fullName: string }>;
}>;
}>;
},
@@ -164,6 +168,12 @@ export function mapBoardToStages(
deal.person?.fullName ||
'';
const dateIso = deal.expectedCloseAt || deal.createdAt;
const assigneeNames = [
...(deal.owner?.fullName ? [deal.owner.fullName] : []),
...(deal.assignees ?? [])
.map((a) => a.fullName)
.filter((n) => n && n !== deal.owner?.fullName),
];
return {
id: deal.id,
title: deal.title,
@@ -175,6 +185,7 @@ export function mapBoardToStages(
),
stageId: deal.stageId,
currencyUnit: currencyUnitLabel(deal.currency),
assigneeNames,
};
}),
};