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
+32
View File
@@ -93,6 +93,7 @@ const companyId = ref('');
const stageId = ref('');
const pipelineId = ref('');
const ownerId = ref('');
const selectedAssigneeIds = ref<string[]>([]);
const lostReason = ref('');
const status = ref('');
const customFields = ref<Record<string, unknown>>({});
@@ -247,6 +248,7 @@ async function load() {
contactKind.value = data.person?.id || !data.company?.id ? 'person' : 'company';
stageId.value = data.stageId;
ownerId.value = data.owner?.id ?? auth.user?.id ?? '';
selectedAssigneeIds.value = (data.assignees ?? []).map((a) => a.id);
lostReason.value = data.lostReason ?? '';
status.value = data.status;
customFields.value = { ...(data.customFields ?? {}) };
@@ -264,6 +266,7 @@ async function load() {
}
} else {
ownerId.value = auth.user?.id ?? users.value[0]?.id ?? '';
selectedAssigneeIds.value = [];
if (typeof route.query.personId === 'string' && route.query.personId) {
personId.value = route.query.personId;
contactKind.value = 'person';
@@ -306,6 +309,7 @@ function payload(): CreateDealRequest {
personId: personId.value || null,
companyId: companyId.value || null,
ownerId: ownerId.value || null,
assigneeIds: selectedAssigneeIds.value,
pipelineId: pipelineId.value || undefined,
stageId: stageId.value || undefined,
customFields: customFields.value,
@@ -623,6 +627,20 @@ onMounted(load);
</li>
</ul>
</div>
<div class="field">
<label for="deal-assignees">مسئولان مشترک</label>
<select
id="deal-assignees"
v-model="selectedAssigneeIds"
multiple
class="multi"
>
<option v-for="u in users" :key="u.id" :value="u.id">
{{ u.fullName }}
</option>
</select>
<small class="hint">علاوه بر مسئول اصلی؛ با Ctrl چند نفر را انتخاب کنید.</small>
</div>
</div>
</section>
@@ -1322,6 +1340,20 @@ h1 {
gap: 0.45rem;
}
select.multi {
min-height: 110px;
padding: 0.4rem;
width: 100%;
border: 1px solid #e2e8f0;
border-radius: var(--radius);
background: #fff;
}
.hint {
color: #64748b;
font-size: 0.8rem;
}
.note-card.off,
.timeline.hide {
display: none;