Adding registration date and multiple addresses for contacts and leads.

This commit is contained in:
2026-10-03 12:29:11 +03:30
parent 989c03b381
commit 1309da2281
22 changed files with 699 additions and 32 deletions
+16 -5
View File
@@ -11,6 +11,7 @@ import {
toFaDigits,
} from '@/lib/jalali';
import {
UiBusyOverlay,
UiButton,
UiDropdownMenu,
UiModal,
@@ -123,6 +124,8 @@ const activityModal = ref<{
} | null>(null);
const menuId = ref<string | null>(null);
const busy = ref(false);
const pageBusy = ref(false);
const busyMessage = ref('لطفاً صبر کنید…');
const importMsg = ref('');
const counts = ref<Record<ActivityFilter, number>>({
today: 0,
@@ -391,6 +394,8 @@ function closePopovers() {
async function exportExcel() {
busy.value = true;
pageBusy.value = true;
busyMessage.value = 'در حال تهیه خروجی اکسل…';
importMsg.value = '';
error.value = '';
try {
@@ -405,11 +410,13 @@ async function exportExcel() {
error.value = 'خروجی اکسل ناموفق بود.';
} finally {
busy.value = false;
pageBusy.value = false;
}
}
function onImportStart() {
busy.value = true;
pageBusy.value = false;
importMsg.value = '';
error.value = '';
}
@@ -433,6 +440,7 @@ function onImportFail(message: string) {
function onImportSettled() {
busy.value = false;
pageBusy.value = false;
}
watch(
@@ -473,6 +481,7 @@ onUnmounted(() => {
<template>
<section class="page" @click="closePopovers">
<UiBusyOverlay :open="pageBusy" :message="busyMessage" />
<nav class="crumbs" aria-label="مسیر">
<RouterLink :to="{ name: 'home' }">خانه</RouterLink>
<span>‹</span>
@@ -484,7 +493,7 @@ onUnmounted(() => {
lead="کارهای امروز، ارجاع به همکار و پیگیری وضعیت."
>
<template #actions>
<UiButton variant="ghost" type="button" :disabled="busy" @click.stop="exportExcel">
<UiButton variant="ghost" type="button" :disabled="busy" :loading="pageBusy" @click.stop="exportExcel">
<span class="btn-full">خروجی اکسل</span>
<span class="btn-short">خروجی</span>
</UiButton>
@@ -497,10 +506,12 @@ onUnmounted(() => {
@fail="onImportFail"
@settled="onImportSettled"
>
<UiButton variant="ghost" type="button" :disabled="busy">
<span class="btn-full">ورود از اکسل</span>
<span class="btn-short">ورود</span>
</UiButton>
<template #default="{ loading }">
<UiButton variant="ghost" type="button" :disabled="busy" :loading="loading">
<span class="btn-full">ورود از اکسل</span>
<span class="btn-short">ورود</span>
</UiButton>
</template>
</ExcelImportFlow>
<UiButton variant="primary" @click="activityModal = {}">
<UiIcon name="plus" :size="16" />