2026-08-29 21:06:30 +03:30
|
|
|
|
<script setup lang="ts">
|
2026-09-01 15:21:54 +03:30
|
|
|
|
import { computed, onMounted, ref } from 'vue';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
import { RouterLink, useRouter } from 'vue-router';
|
|
|
|
|
|
import { useAuthStore } from '@/stores/auth';
|
|
|
|
|
|
import { api } from '@/lib/api';
|
2026-09-01 15:21:54 +03:30
|
|
|
|
import { formatMoney } from '@/lib/money';
|
|
|
|
|
|
import { toFaDigits } from '@/lib/jalali';
|
2026-09-01 15:39:18 +03:30
|
|
|
|
import UiIcon from '@/components/UiIcon.vue';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
import type {
|
|
|
|
|
|
ActivityDto,
|
2026-09-01 15:21:54 +03:30
|
|
|
|
HomeDashboardDto,
|
|
|
|
|
|
PaginatedResponse,
|
|
|
|
|
|
PipelineBoardDto,
|
2026-08-29 21:06:30 +03:30
|
|
|
|
} from '@mento/shared';
|
|
|
|
|
|
|
|
|
|
|
|
const auth = useAuthStore();
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
const loading = ref(true);
|
|
|
|
|
|
const home = ref<HomeDashboardDto | null>(null);
|
|
|
|
|
|
const activities = ref<ActivityDto[]>([]);
|
|
|
|
|
|
const board = ref<PipelineBoardDto | null>(null);
|
|
|
|
|
|
const askQuery = ref('');
|
|
|
|
|
|
|
|
|
|
|
|
const firstName = computed(() => {
|
|
|
|
|
|
const parts = auth.user?.fullName?.trim().split(/\s+/) ?? [];
|
|
|
|
|
|
return parts[0] ?? 'کاربر';
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
const userInitial = computed(() => firstName.value.slice(0, 1));
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
const greeting = computed(() => {
|
|
|
|
|
|
const hour = new Date().getHours();
|
|
|
|
|
|
if (hour < 12) return 'صبح بخیر';
|
|
|
|
|
|
if (hour < 17) return 'ظهر بخیر';
|
|
|
|
|
|
return 'عصر بخیر';
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
const kpiMeta: Record<string, { icon: 'chart' | 'users' | 'briefcase' | 'check'; label?: string }> = {
|
|
|
|
|
|
sales: { icon: 'chart' },
|
|
|
|
|
|
customers: { icon: 'users' },
|
|
|
|
|
|
'open-deals': { icon: 'briefcase' },
|
|
|
|
|
|
followups: { icon: 'check' },
|
2026-09-01 15:21:54 +03:30
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const aiShortcuts = [
|
2026-09-01 15:39:18 +03:30
|
|
|
|
{ label: 'خلاصه مشتری شرکت آریانا را بده', to: '/contacts', icon: 'users' as const },
|
|
|
|
|
|
{ label: 'متن پیگیری برای مشتری بفرست', to: '/notes', icon: 'send' as const },
|
|
|
|
|
|
{ label: 'گزارش فروش این هفته را نشان بده', to: '/reports', icon: 'chart' as const },
|
|
|
|
|
|
{ label: 'معاملات در خطر را لیست کن', to: '/pipeline', icon: 'warning' as const },
|
2026-09-01 15:21:54 +03:30
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
const pipelineStages = computed(() => board.value?.stages.slice(0, 3) ?? []);
|
|
|
|
|
|
|
|
|
|
|
|
const trendPoints = computed(() => {
|
|
|
|
|
|
const trend = home.value?.salesTrend ?? [];
|
|
|
|
|
|
if (!trend.length) return '';
|
|
|
|
|
|
const max = Math.max(...trend.map((p) => p.amount), 1);
|
|
|
|
|
|
const w = 320;
|
|
|
|
|
|
const h = 120;
|
|
|
|
|
|
const pad = 12;
|
|
|
|
|
|
return trend
|
|
|
|
|
|
.map((p, i) => {
|
|
|
|
|
|
const x = pad + (i / Math.max(trend.length - 1, 1)) * (w - pad * 2);
|
|
|
|
|
|
const y = h - pad - (p.amount / max) * (h - pad * 2);
|
|
|
|
|
|
return `${x},${y}`;
|
|
|
|
|
|
})
|
|
|
|
|
|
.join(' ');
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const trendArea = computed(() => {
|
|
|
|
|
|
const pts = trendPoints.value;
|
|
|
|
|
|
if (!pts) return '';
|
|
|
|
|
|
const first = pts.split(' ')[0]?.split(',');
|
|
|
|
|
|
const last = pts.split(' ').slice(-1)[0]?.split(',');
|
|
|
|
|
|
if (!first || !last) return '';
|
|
|
|
|
|
return `${pts} ${last[0]},132 ${first[0]},132`;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
const trendDots = computed(() => {
|
|
|
|
|
|
const trend = home.value?.salesTrend ?? [];
|
|
|
|
|
|
if (!trend.length) return [];
|
|
|
|
|
|
const max = Math.max(...trend.map((p) => p.amount), 1);
|
|
|
|
|
|
const w = 320;
|
|
|
|
|
|
const h = 120;
|
|
|
|
|
|
const pad = 12;
|
|
|
|
|
|
return trend.map((p, i) => ({
|
|
|
|
|
|
x: pad + (i / Math.max(trend.length - 1, 1)) * (w - pad * 2),
|
|
|
|
|
|
y: h - pad - (p.amount / max) * (h - pad * 2),
|
|
|
|
|
|
label: p.monthLabel,
|
|
|
|
|
|
}));
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
const donutSegments = computed(() => {
|
|
|
|
|
|
const sources = home.value?.sources ?? [];
|
|
|
|
|
|
if (!sources.length) return [];
|
|
|
|
|
|
let offset = 0;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
const colors = ['#14b8a6', '#5eead4', '#38bdf8', '#a78bfa', '#fbbf24', '#94a3b8'];
|
2026-09-01 15:21:54 +03:30
|
|
|
|
return sources.map((s, i) => {
|
|
|
|
|
|
const seg = { ...s, color: colors[i % colors.length], offset };
|
|
|
|
|
|
offset += s.percent;
|
|
|
|
|
|
return seg;
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
const sourceTotal = computed(
|
|
|
|
|
|
() => home.value?.sources.reduce((a, s) => a + s.count, 0) ?? 0,
|
|
|
|
|
|
);
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
const typeLabel: Record<string, string> = {
|
2026-08-29 21:06:30 +03:30
|
|
|
|
call: 'تماس',
|
|
|
|
|
|
meeting: 'جلسه',
|
|
|
|
|
|
task: 'وظیفه',
|
|
|
|
|
|
note: 'یادداشت',
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
function formatWhen(value: string | null) {
|
|
|
|
|
|
if (!value) return '';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
try {
|
|
|
|
|
|
return new Intl.DateTimeFormat('fa-IR', {
|
2026-09-01 15:21:54 +03:30
|
|
|
|
dateStyle: 'medium',
|
|
|
|
|
|
timeStyle: 'short',
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}).format(new Date(value));
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
return value;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
function activityStatus(act: ActivityDto) {
|
|
|
|
|
|
if (act.status === 'done') return { label: 'انجام شد', tone: 'done' };
|
|
|
|
|
|
if (act.dueAt && new Date(act.dueAt) < new Date()) {
|
|
|
|
|
|
return { label: 'عقبافتاده', tone: 'late' };
|
|
|
|
|
|
}
|
|
|
|
|
|
return { label: 'در انتظار پاسخ', tone: 'pending' };
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
function activityIcon(type: string) {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
if (type === 'call') return 'phone' as const;
|
|
|
|
|
|
if (type === 'meeting') return 'calendar' as const;
|
|
|
|
|
|
if (type === 'task') return 'check' as const;
|
|
|
|
|
|
return 'mail' as const;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function trophy(rank: number) {
|
|
|
|
|
|
if (rank === 1) return '🥇';
|
|
|
|
|
|
if (rank === 2) return '🥈';
|
|
|
|
|
|
if (rank === 3) return '🥉';
|
|
|
|
|
|
return `#${toFaDigits(rank)}`;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function alertIcon(tone: string) {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
if (tone === 'urgent') return 'fire' as const;
|
|
|
|
|
|
if (tone === 'warning') return 'warning' as const;
|
|
|
|
|
|
if (tone === 'success') return 'trend' as const;
|
|
|
|
|
|
return 'sparkle' as const;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function formatKpiValue(key: string, value: number) {
|
|
|
|
|
|
if (key === 'sales') {
|
|
|
|
|
|
return formatMoney(value, home.value?.currency ?? 'IRR');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-01 15:21:54 +03:30
|
|
|
|
return toFaDigits(value);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function formatChange(value: number | null) {
|
|
|
|
|
|
if (value == null) return '';
|
|
|
|
|
|
const sign = value >= 0 ? '+' : '';
|
|
|
|
|
|
return `${sign}${toFaDigits(value)}٪`;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function submitAsk() {
|
|
|
|
|
|
const q = askQuery.value.trim();
|
|
|
|
|
|
if (!q) return;
|
|
|
|
|
|
void router.push({ name: 'notes', query: { q } });
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(async () => {
|
2026-09-01 15:21:54 +03:30
|
|
|
|
loading.value = true;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
try {
|
2026-09-01 15:21:54 +03:30
|
|
|
|
const [homeRes, actRes, boardRes] = await Promise.all([
|
|
|
|
|
|
api.get<HomeDashboardDto>('/reports/home'),
|
|
|
|
|
|
api.get<PaginatedResponse<ActivityDto>>('/activities', {
|
|
|
|
|
|
params: { limit: 5, page: 1 },
|
|
|
|
|
|
}),
|
|
|
|
|
|
api.get<PipelineBoardDto>('/pipelines/board'),
|
|
|
|
|
|
]);
|
|
|
|
|
|
home.value = homeRes.data;
|
|
|
|
|
|
activities.value = actRes.data.items;
|
|
|
|
|
|
board.value = boardRes.data;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
} catch {
|
2026-09-01 15:21:54 +03:30
|
|
|
|
home.value = null;
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
loading.value = false;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<section class="dashboard">
|
|
|
|
|
|
<header class="hero">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<div class="hero-glow a" />
|
|
|
|
|
|
<div class="hero-glow b" />
|
|
|
|
|
|
|
|
|
|
|
|
<div class="hero-body">
|
|
|
|
|
|
<div class="hero-top">
|
|
|
|
|
|
<div class="hero-greet">
|
|
|
|
|
|
<span class="hero-avatar">
|
|
|
|
|
|
{{ userInitial }}
|
|
|
|
|
|
<i class="online" />
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<h1>{{ greeting }} {{ firstName }}</h1>
|
|
|
|
|
|
<p>منتو اینها رو برات پیدا کرده</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="hero-chips">
|
|
|
|
|
|
<RouterLink
|
|
|
|
|
|
v-for="alert in (home?.alerts ?? []).slice(0, 3)"
|
|
|
|
|
|
:key="alert.key"
|
|
|
|
|
|
class="chip"
|
|
|
|
|
|
:class="`chip-${alert.tone}`"
|
|
|
|
|
|
:to="alert.link || '/'"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span class="chip-ico"><UiIcon :name="alertIcon(alert.tone)" :size="14" /></span>
|
|
|
|
|
|
<span>{{ alert.text }}</span>
|
|
|
|
|
|
</RouterLink>
|
|
|
|
|
|
<template v-if="!home?.alerts?.length && !loading">
|
|
|
|
|
|
<span class="chip chip-success">
|
|
|
|
|
|
<span class="chip-ico"><UiIcon name="trend" :size="14" /></span>
|
|
|
|
|
|
امروز آمادهاید برای فروش بیشتر
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<form class="hero-ask" @submit.prevent="submitAsk">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<UiIcon name="sparkle" :size="16" />
|
|
|
|
|
|
<input v-model="askQuery" type="search" placeholder="از منتو بپرس..." />
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<kbd>⌘K</kbd>
|
|
|
|
|
|
</form>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</div>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
|
|
|
|
|
|
<div class="hero-bot" aria-hidden="true">
|
|
|
|
|
|
<div class="bot-bubble">من دستیار فروش هوشمند سیستم هستم</div>
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<div class="bot-figure">
|
|
|
|
|
|
<div class="bot-head">
|
|
|
|
|
|
<span class="eye" />
|
|
|
|
|
|
<span class="eye" />
|
|
|
|
|
|
<span class="mouth" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="bot-body" />
|
|
|
|
|
|
<div class="bot-glow" />
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<span class="bot-badge">AI</span>
|
|
|
|
|
|
</div>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</div>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<p v-if="loading" class="muted center">در حال بارگذاری داشبورد…</p>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<template v-else>
|
|
|
|
|
|
<div class="kpi-row">
|
|
|
|
|
|
<article v-for="kpi in home?.kpis ?? []" :key="kpi.key" class="kpi-card">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<div class="kpi-icon">
|
|
|
|
|
|
<UiIcon :name="kpiMeta[kpi.key]?.icon ?? 'chart'" :size="20" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="kpi-text">
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<p class="kpi-label">{{ kpi.label }}</p>
|
|
|
|
|
|
<strong class="kpi-value">{{ formatKpiValue(kpi.key, kpi.value) }}</strong>
|
|
|
|
|
|
<span
|
|
|
|
|
|
v-if="kpi.changePercent != null"
|
|
|
|
|
|
class="kpi-change"
|
|
|
|
|
|
:class="{ down: kpi.changePercent < 0 }"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ formatChange(kpi.changePercent) }} {{ kpi.changeLabel }}
|
|
|
|
|
|
</span>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</div>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
</article>
|
|
|
|
|
|
</div>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<div class="mid-grid">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<article class="panel">
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<header class="panel-head">
|
|
|
|
|
|
<h2>روند فروش</h2>
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<span
|
|
|
|
|
|
v-if="home?.kpis?.[0]?.changePercent != null"
|
|
|
|
|
|
class="mini-badge"
|
|
|
|
|
|
:class="{ down: (home.kpis[0].changePercent ?? 0) < 0 }"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ formatChange(home.kpis[0].changePercent) }} نسبت به ماه قبل
|
|
|
|
|
|
</span>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
</header>
|
|
|
|
|
|
<div class="chart-wrap">
|
|
|
|
|
|
<svg viewBox="0 0 320 140" class="line-chart" aria-hidden="true">
|
|
|
|
|
|
<defs>
|
|
|
|
|
|
<linearGradient id="trendFill" x1="0" y1="0" x2="0" y2="1">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<stop offset="0%" stop-color="#14b8a6" stop-opacity="0.28" />
|
|
|
|
|
|
<stop offset="100%" stop-color="#14b8a6" stop-opacity="0" />
|
2026-09-01 15:21:54 +03:30
|
|
|
|
</linearGradient>
|
|
|
|
|
|
</defs>
|
|
|
|
|
|
<polygon v-if="trendArea" :points="trendArea" fill="url(#trendFill)" />
|
|
|
|
|
|
<polyline
|
|
|
|
|
|
v-if="trendPoints"
|
|
|
|
|
|
:points="trendPoints"
|
|
|
|
|
|
fill="none"
|
2026-09-01 15:39:18 +03:30
|
|
|
|
stroke="#14b8a6"
|
|
|
|
|
|
stroke-width="3.2"
|
2026-09-01 15:21:54 +03:30
|
|
|
|
stroke-linecap="round"
|
2026-09-01 15:39:18 +03:30
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<circle
|
|
|
|
|
|
v-for="(d, i) in trendDots"
|
|
|
|
|
|
:key="i"
|
|
|
|
|
|
:cx="d.x"
|
|
|
|
|
|
:cy="d.y"
|
|
|
|
|
|
r="4.5"
|
|
|
|
|
|
fill="#fff"
|
|
|
|
|
|
stroke="#14b8a6"
|
|
|
|
|
|
stroke-width="2.5"
|
2026-09-01 15:21:54 +03:30
|
|
|
|
/>
|
|
|
|
|
|
</svg>
|
|
|
|
|
|
<div class="chart-labels">
|
|
|
|
|
|
<span v-for="p in home?.salesTrend ?? []" :key="p.monthKey">{{ p.monthLabel }}</span>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
</article>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<article class="panel">
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<header class="panel-head">
|
|
|
|
|
|
<h2>منابع مشتریان</h2>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
<div class="donut-wrap">
|
|
|
|
|
|
<div class="donut-chart-box">
|
|
|
|
|
|
<svg viewBox="0 0 120 120" class="donut-chart" aria-hidden="true">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<circle cx="60" cy="60" r="42" fill="none" stroke="#eef2f7" stroke-width="14" />
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<circle
|
|
|
|
|
|
v-for="seg in donutSegments"
|
|
|
|
|
|
:key="seg.label"
|
|
|
|
|
|
cx="60"
|
|
|
|
|
|
cy="60"
|
|
|
|
|
|
r="42"
|
|
|
|
|
|
fill="none"
|
|
|
|
|
|
:stroke="seg.color"
|
2026-09-01 15:39:18 +03:30
|
|
|
|
stroke-width="14"
|
2026-09-01 15:21:54 +03:30
|
|
|
|
:stroke-dasharray="`${seg.percent * 2.64} 264`"
|
|
|
|
|
|
:stroke-dashoffset="`${-seg.offset * 2.64}`"
|
|
|
|
|
|
transform="rotate(-90 60 60)"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</svg>
|
|
|
|
|
|
<div class="donut-center">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<strong>{{ toFaDigits(sourceTotal) }}</strong>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<span>مشتری</span>
|
|
|
|
|
|
</div>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</div>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<ul class="donut-legend">
|
|
|
|
|
|
<li v-for="seg in donutSegments" :key="seg.label">
|
|
|
|
|
|
<span class="dot" :style="{ background: seg.color }" />
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<span class="lbl">{{ seg.label }}</span>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<em>{{ toFaDigits(seg.percent) }}٪</em>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</div>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
</article>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<article class="panel ai-panel">
|
|
|
|
|
|
<header class="panel-head">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<h2>
|
|
|
|
|
|
<UiIcon name="sparkle" :size="16" />
|
|
|
|
|
|
دستیار هوشمند منتو
|
|
|
|
|
|
</h2>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
</header>
|
|
|
|
|
|
<p class="ai-lead">چه کمکی میتونم بکنم؟</p>
|
|
|
|
|
|
<div class="ai-shortcuts">
|
|
|
|
|
|
<RouterLink
|
|
|
|
|
|
v-for="item in aiShortcuts"
|
|
|
|
|
|
:key="item.label"
|
|
|
|
|
|
class="ai-chip"
|
|
|
|
|
|
:to="item.to"
|
|
|
|
|
|
>
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<UiIcon :name="item.icon" :size="15" />
|
2026-09-01 15:21:54 +03:30
|
|
|
|
{{ item.label }}
|
|
|
|
|
|
</RouterLink>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<form class="ai-input" @submit.prevent="submitAsk">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<input v-model="askQuery" type="search" placeholder="از منتو بپرس..." />
|
|
|
|
|
|
<button type="submit" aria-label="ارسال">
|
|
|
|
|
|
<UiIcon name="send" :size="16" />
|
|
|
|
|
|
</button>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
</form>
|
|
|
|
|
|
</article>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="bottom-grid">
|
|
|
|
|
|
<article class="panel">
|
|
|
|
|
|
<header class="panel-head">
|
|
|
|
|
|
<h2>فعالیتهای اخیر</h2>
|
|
|
|
|
|
<RouterLink :to="{ name: 'activities' }">همه</RouterLink>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
<ul v-if="activities.length" class="activity-list">
|
|
|
|
|
|
<li v-for="act in activities" :key="act.id">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<span class="act-icon">
|
|
|
|
|
|
<UiIcon :name="activityIcon(act.type)" :size="16" />
|
|
|
|
|
|
</span>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<div class="act-body">
|
|
|
|
|
|
<strong>{{ act.title }}</strong>
|
|
|
|
|
|
<span>{{ typeLabel[act.type] ?? act.type }} · {{ formatWhen(act.dueAt || act.createdAt) }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span class="status-pill" :class="activityStatus(act).tone">
|
|
|
|
|
|
{{ activityStatus(act).label }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
<p v-else class="muted">فعالیتی ثبت نشده.</p>
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<article class="panel">
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<header class="panel-head">
|
|
|
|
|
|
<h2>جریان فروش</h2>
|
|
|
|
|
|
<RouterLink :to="{ name: 'pipeline' }">کاریز کامل</RouterLink>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
<div class="mini-pipeline">
|
|
|
|
|
|
<div v-for="stage in pipelineStages" :key="stage.id" class="pipe-col">
|
|
|
|
|
|
<header>
|
|
|
|
|
|
<strong>{{ stage.name }}</strong>
|
|
|
|
|
|
<span>{{ toFaDigits(stage.deals.length) }}</span>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
<div class="pipe-cards">
|
|
|
|
|
|
<RouterLink
|
|
|
|
|
|
v-for="deal in stage.deals.slice(0, 3)"
|
|
|
|
|
|
:key="deal.id"
|
|
|
|
|
|
class="pipe-card"
|
|
|
|
|
|
:to="{ name: 'deal-detail', params: { id: deal.id } }"
|
|
|
|
|
|
>
|
|
|
|
|
|
<strong>{{ deal.company?.name || deal.person?.fullName || deal.title }}</strong>
|
|
|
|
|
|
<span v-if="deal.amount">{{ formatMoney(deal.amount, deal.currency) }}</span>
|
|
|
|
|
|
</RouterLink>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
|
|
|
|
<article class="panel">
|
|
|
|
|
|
<header class="panel-head">
|
|
|
|
|
|
<h2>مشتریان برتر</h2>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
<ul v-if="home?.topCustomers?.length" class="top-list">
|
|
|
|
|
|
<li v-for="row in home.topCustomers" :key="row.id">
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<span class="cust-avatar">{{ row.name.slice(0, 1) }}</span>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
<div>
|
|
|
|
|
|
<strong>{{ row.name }}</strong>
|
|
|
|
|
|
<span>{{ toFaDigits(row.dealCount) }} معامله</span>
|
|
|
|
|
|
</div>
|
2026-09-01 15:39:18 +03:30
|
|
|
|
<span class="rank">{{ trophy(row.rank) }}</span>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
<p v-else class="muted">هنوز داده کافی برای رتبهبندی نیست.</p>
|
|
|
|
|
|
</article>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</section>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.dashboard {
|
2026-08-29 21:06:30 +03:30
|
|
|
|
display: grid;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 1.15rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.hero {
|
|
|
|
|
|
position: relative;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: minmax(0, 1fr) 200px;
|
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
min-height: 180px;
|
|
|
|
|
|
padding: 1.35rem 1.5rem;
|
|
|
|
|
|
border-radius: 28px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
background: linear-gradient(105deg, #5eead4 0%, #14b8a6 28%, #0f766e 58%, #1e3a5f 100%);
|
|
|
|
|
|
box-shadow: 0 18px 40px rgba(15, 118, 110, 0.22);
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.hero-glow {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.12);
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-glow.a {
|
|
|
|
|
|
width: 220px;
|
|
|
|
|
|
height: 220px;
|
|
|
|
|
|
top: -80px;
|
|
|
|
|
|
inset-inline-end: 180px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-glow.b {
|
|
|
|
|
|
width: 140px;
|
|
|
|
|
|
height: 140px;
|
|
|
|
|
|
bottom: -50px;
|
|
|
|
|
|
inset-inline-start: 40px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-body {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
z-index: 1;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 1rem;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-top {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 0.85rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.hero-greet {
|
2026-08-29 21:06:30 +03:30
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
gap: 0.85rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.hero-avatar {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
position: relative;
|
|
|
|
|
|
width: 52px;
|
|
|
|
|
|
height: 52px;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
border-radius: 999px;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
background: rgba(255, 255, 255, 0.22);
|
|
|
|
|
|
border: 2px solid rgba(255, 255, 255, 0.45);
|
2026-09-01 15:21:54 +03:30
|
|
|
|
display: grid;
|
|
|
|
|
|
place-items: center;
|
|
|
|
|
|
font-weight: 800;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 1.2rem;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-avatar .online {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 2px;
|
|
|
|
|
|
inset-inline-start: 2px;
|
|
|
|
|
|
width: 10px;
|
|
|
|
|
|
height: 10px;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
background: #22c55e;
|
|
|
|
|
|
border: 2px solid #fff;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero h1 {
|
2026-08-29 21:06:30 +03:30
|
|
|
|
margin: 0;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: clamp(1.4rem, 2.2vw, 1.8rem);
|
|
|
|
|
|
font-weight: 800;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.hero p {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
margin: 0.2rem 0 0;
|
|
|
|
|
|
opacity: 0.9;
|
|
|
|
|
|
font-size: 0.92rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-chips {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.5rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.chip {
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
align-items: center;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.4rem;
|
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
padding: 0.48rem 0.75rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
border-radius: 999px;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
background: #fff;
|
|
|
|
|
|
color: #0f172a;
|
|
|
|
|
|
font-size: 0.78rem;
|
|
|
|
|
|
font-weight: 600;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
text-decoration: none;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.chip-ico {
|
|
|
|
|
|
width: 22px;
|
|
|
|
|
|
height: 22px;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
place-items: center;
|
|
|
|
|
|
flex-shrink: 0;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.chip-urgent .chip-ico {
|
|
|
|
|
|
background: #fee2e2;
|
|
|
|
|
|
color: #ef4444;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.chip-warning .chip-ico {
|
|
|
|
|
|
background: #fef3c7;
|
|
|
|
|
|
color: #d97706;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.chip-success .chip-ico,
|
|
|
|
|
|
.chip-info .chip-ico {
|
|
|
|
|
|
background: #dcfce7;
|
|
|
|
|
|
color: #16a34a;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-ask {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.55rem;
|
|
|
|
|
|
max-width: 420px;
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.96);
|
|
|
|
|
|
color: #0f172a;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
border-radius: 999px;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
padding: 0.55rem 0.85rem;
|
|
|
|
|
|
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-ask input {
|
|
|
|
|
|
border: 0;
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
outline: none;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 0.9rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-ask kbd {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 0.68rem;
|
|
|
|
|
|
color: #94a3b8;
|
|
|
|
|
|
border: 1px solid #e2e8f0;
|
|
|
|
|
|
border-radius: 7px;
|
|
|
|
|
|
padding: 0.12rem 0.35rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-bot {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
position: relative;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
z-index: 1;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
display: grid;
|
|
|
|
|
|
justify-items: center;
|
|
|
|
|
|
gap: 0.55rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bot-bubble {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
max-width: 170px;
|
|
|
|
|
|
padding: 0.55rem 0.7rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
border-radius: 14px 14px 4px 14px;
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.16);
|
2026-09-01 15:39:18 +03:30
|
|
|
|
backdrop-filter: blur(6px);
|
|
|
|
|
|
font-size: 0.78rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
line-height: 1.45;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
text-align: center;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.bot-figure {
|
2026-09-01 15:21:54 +03:30
|
|
|
|
position: relative;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
width: 110px;
|
|
|
|
|
|
height: 120px;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
display: grid;
|
|
|
|
|
|
place-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.bot-head {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
width: 72px;
|
|
|
|
|
|
height: 64px;
|
|
|
|
|
|
border-radius: 22px;
|
|
|
|
|
|
background: linear-gradient(180deg, #f8fafc, #dbeafe);
|
|
|
|
|
|
box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.18), 0 12px 30px rgba(14, 165, 233, 0.35);
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.eye {
|
2026-09-01 15:21:54 +03:30
|
|
|
|
position: absolute;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
top: 24px;
|
|
|
|
|
|
width: 10px;
|
|
|
|
|
|
height: 10px;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
background: #0ea5e9;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
box-shadow: 0 0 10px #38bdf8;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.eye:first-of-type {
|
|
|
|
|
|
right: 18px;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.eye:last-of-type {
|
|
|
|
|
|
left: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mouth {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 14px;
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
width: 16px;
|
|
|
|
|
|
height: 6px;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
background: #94a3b8;
|
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bot-body {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 18px;
|
|
|
|
|
|
width: 54px;
|
|
|
|
|
|
height: 36px;
|
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
|
background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bot-glow {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
width: 70px;
|
|
|
|
|
|
height: 14px;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
background: radial-gradient(circle, rgba(56, 189, 248, 0.7), transparent 70%);
|
|
|
|
|
|
filter: blur(2px);
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bot-badge {
|
|
|
|
|
|
position: absolute;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
top: 8px;
|
|
|
|
|
|
inset-inline-end: 4px;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
background: #0ea5e9;
|
|
|
|
|
|
color: #fff;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 0.65rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
font-weight: 800;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
padding: 0.12rem 0.4rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
border-radius: 999px;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
z-index: 3;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kpi-row {
|
2026-08-29 21:06:30 +03:30
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.9rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.kpi-card {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 0.85rem;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
background: #fff;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
border-radius: 22px;
|
|
|
|
|
|
padding: 1.05rem 1.1rem;
|
|
|
|
|
|
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
|
|
|
|
|
border: 1px solid #eef2f7;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kpi-icon {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
width: 46px;
|
|
|
|
|
|
height: 46px;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
background: #ecfdf8;
|
|
|
|
|
|
color: #14b8a6;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
display: grid;
|
|
|
|
|
|
place-items: center;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
flex-shrink: 0;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kpi-label {
|
|
|
|
|
|
margin: 0;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
color: #94a3b8;
|
|
|
|
|
|
font-size: 0.84rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kpi-value {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
margin-top: 0.2rem;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 1.12rem;
|
|
|
|
|
|
color: #0f172a;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kpi-change {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
display: inline-block;
|
|
|
|
|
|
margin-top: 0.4rem;
|
|
|
|
|
|
padding: 0.15rem 0.45rem;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
background: #dcfce7;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
color: #16a34a;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 0.72rem;
|
|
|
|
|
|
font-weight: 700;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kpi-change.down {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
background: #fee2e2;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
color: #dc2626;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mid-grid {
|
|
|
|
|
|
display: grid;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
grid-template-columns: 1.25fr 1fr 0.95fr;
|
|
|
|
|
|
gap: 0.9rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bottom-grid {
|
|
|
|
|
|
display: grid;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
grid-template-columns: 1fr 1.35fr 0.85fr;
|
|
|
|
|
|
gap: 0.9rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.panel {
|
|
|
|
|
|
background: #fff;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
border-radius: 22px;
|
|
|
|
|
|
padding: 1.05rem 1.1rem;
|
|
|
|
|
|
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
|
|
|
|
|
border: 1px solid #eef2f7;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.panel-head {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
gap: 0.75rem;
|
|
|
|
|
|
margin-bottom: 0.85rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.panel-head h2 {
|
|
|
|
|
|
margin: 0;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 0.98rem;
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 0.35rem;
|
|
|
|
|
|
color: #0f172a;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.panel-head a {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
color: #14b8a6;
|
|
|
|
|
|
font-size: 0.82rem;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mini-badge {
|
|
|
|
|
|
font-size: 0.72rem;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
color: #16a34a;
|
|
|
|
|
|
background: #dcfce7;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
padding: 0.2rem 0.55rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mini-badge.down {
|
|
|
|
|
|
color: #dc2626;
|
|
|
|
|
|
background: #fee2e2;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.chart-wrap {
|
|
|
|
|
|
display: grid;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.4rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.line-chart {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: auto;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.chart-labels {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
color: #94a3b8;
|
|
|
|
|
|
font-size: 0.74rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.donut-wrap {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: 120px 1fr;
|
|
|
|
|
|
gap: 0.85rem;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.donut-chart-box {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
width: 120px;
|
|
|
|
|
|
height: 120px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.donut-chart {
|
|
|
|
|
|
width: 120px;
|
|
|
|
|
|
height: 120px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.donut-center {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
inset: 0;
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
place-content: center;
|
|
|
|
|
|
text-align: center;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.05rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.donut-center strong {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 1.05rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.donut-center span {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
|
color: #94a3b8;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.donut-legend {
|
|
|
|
|
|
list-style: none;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
display: grid;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.4rem;
|
|
|
|
|
|
font-size: 0.8rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.donut-legend li {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 0.4rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.donut-legend .lbl {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
color: #475569;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.donut-legend em {
|
|
|
|
|
|
font-style: normal;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
color: #94a3b8;
|
|
|
|
|
|
font-weight: 700;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.dot {
|
|
|
|
|
|
width: 8px;
|
|
|
|
|
|
height: 8px;
|
|
|
|
|
|
border-radius: 999px;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
flex-shrink: 0;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-lead {
|
|
|
|
|
|
margin: 0 0 0.75rem;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
color: #94a3b8;
|
|
|
|
|
|
font-size: 0.88rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-shortcuts {
|
|
|
|
|
|
display: grid;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.4rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
margin-bottom: 0.85rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-chip {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 0.55rem;
|
|
|
|
|
|
padding: 0.6rem 0.75rem;
|
|
|
|
|
|
border-radius: 14px;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
background: #f8fafc;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
border: 1px solid #eef2f7;
|
|
|
|
|
|
color: #334155;
|
|
|
|
|
|
font-size: 0.8rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.ai-chip :deep(.ico) {
|
|
|
|
|
|
color: #14b8a6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.ai-input {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 0.45rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-input input {
|
|
|
|
|
|
flex: 1;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
border: 1px solid #e2e8f0;
|
|
|
|
|
|
border-radius: 14px;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
padding: 0.65rem 0.8rem;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
background: #f8fafc;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ai-input button {
|
|
|
|
|
|
width: 42px;
|
|
|
|
|
|
border: 0;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
border-radius: 14px;
|
|
|
|
|
|
background: #14b8a6;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
color: #fff;
|
|
|
|
|
|
cursor: pointer;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
display: grid;
|
|
|
|
|
|
place-items: center;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.activity-list,
|
|
|
|
|
|
.top-list {
|
|
|
|
|
|
list-style: none;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
padding: 0;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
display: grid;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.7rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.activity-list li,
|
|
|
|
|
|
.top-list li {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 0.65rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.act-icon,
|
|
|
|
|
|
.cust-avatar {
|
|
|
|
|
|
width: 38px;
|
|
|
|
|
|
height: 38px;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
border-radius: 12px;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
background: #ecfdf8;
|
|
|
|
|
|
color: #14b8a6;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
display: grid;
|
|
|
|
|
|
place-items: center;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
font-weight: 800;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:39:18 +03:30
|
|
|
|
.act-body,
|
|
|
|
|
|
.top-list div {
|
2026-09-01 15:21:54 +03:30
|
|
|
|
flex: 1;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
display: grid;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.12rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.act-body strong,
|
|
|
|
|
|
.top-list strong {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 0.88rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.act-body span,
|
|
|
|
|
|
.top-list span {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
color: #94a3b8;
|
|
|
|
|
|
font-size: 0.74rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-pill {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
padding: 0.22rem 0.5rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-pill.done {
|
|
|
|
|
|
background: #dcfce7;
|
|
|
|
|
|
color: #166534;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-pill.pending {
|
|
|
|
|
|
background: #dbeafe;
|
|
|
|
|
|
color: #1d4ed8;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-pill.late {
|
|
|
|
|
|
background: #fee2e2;
|
|
|
|
|
|
color: #b91c1c;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mini-pipeline {
|
|
|
|
|
|
display: grid;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
grid-template-columns: repeat(3, minmax(130px, 1fr));
|
|
|
|
|
|
gap: 0.7rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
overflow-x: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.pipe-col header {
|
2026-08-29 21:06:30 +03:30
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
gap: 0.5rem;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
margin-bottom: 0.5rem;
|
|
|
|
|
|
font-size: 0.82rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.pipe-col header span {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
color: #94a3b8;
|
|
|
|
|
|
background: #f1f5f9;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
padding: 0.05rem 0.4rem;
|
|
|
|
|
|
font-size: 0.72rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.pipe-cards {
|
|
|
|
|
|
display: grid;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
gap: 0.4rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-01 15:21:54 +03:30
|
|
|
|
.pipe-card {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 0.15rem;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
padding: 0.65rem 0.7rem;
|
|
|
|
|
|
border-radius: 14px;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
background: #f8fafc;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
border: 1px solid #eef2f7;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
color: inherit;
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 0.8rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.rank {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
font-size: 1.15rem;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.muted {
|
2026-09-01 15:39:18 +03:30
|
|
|
|
color: #94a3b8;
|
2026-09-01 15:21:54 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.center {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 1200px) {
|
|
|
|
|
|
.kpi-row {
|
|
|
|
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mid-grid,
|
|
|
|
|
|
.bottom-grid {
|
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 700px) {
|
|
|
|
|
|
.hero {
|
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-bot {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kpi-row {
|
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.mini-pipeline {
|
2026-08-29 21:06:30 +03:30
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|