fix: share the dashboard assistant and count leads from data
The hero ask box now uses the same confirm-before-create path as the assistant, count questions use real filters, and lead mobile, Jalali follow-ups, and rial labels stay consistent. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -814,15 +814,18 @@ async function onContactVcfFile(ev: Event) {
|
||||
|
||||
async function submitCreate() {
|
||||
createError.value = '';
|
||||
if (!createForm.value.title.trim() || !createForm.value.mobile.trim()) {
|
||||
createError.value = 'نام/شرکت و موبایل الزامی است.';
|
||||
const mobile = createForm.value.mobile.trim();
|
||||
const company = createForm.value.title.trim();
|
||||
const person = createForm.value.contactName.trim();
|
||||
if (!mobile) {
|
||||
createError.value = 'موبایل الزامی است.';
|
||||
return;
|
||||
}
|
||||
createBusy.value = true;
|
||||
const payload = {
|
||||
title: createForm.value.title.trim(),
|
||||
mobile: createForm.value.mobile.trim(),
|
||||
contactName: createForm.value.contactName.trim() || null,
|
||||
title: company || person || mobile,
|
||||
mobile,
|
||||
contactName: person || null,
|
||||
city: createForm.value.city.trim() || null,
|
||||
region: createForm.value.region.trim() || null,
|
||||
source: createForm.value.source.trim() || null,
|
||||
@@ -1633,7 +1636,7 @@ onBeforeUnmount(() => {
|
||||
<form class="create-form" @submit.prevent="submitCreate">
|
||||
<label>
|
||||
نام / شرکت
|
||||
<input v-model="createForm.title" required placeholder="مثلاً فروشگاه آریا" />
|
||||
<input v-model="createForm.title" placeholder="مثلاً فروشگاه آریا" />
|
||||
</label>
|
||||
<label>
|
||||
نام مخاطب
|
||||
|
||||
Reference in New Issue
Block a user