2026-08-29 21:06:30 +03:30
|
|
|
|
<script setup lang="ts">
|
2026-09-05 18:38:11 +03:30
|
|
|
|
import { computed, onMounted, ref, watch } from 'vue';
|
2026-10-06 15:04:46 +03:30
|
|
|
|
import { matchesSearch } from '@/lib/search';
|
2026-10-05 11:56:49 +03:30
|
|
|
|
import TableColumnsMenu from '@/components/TableColumnsMenu.vue';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
import { RouterLink } from 'vue-router';
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
import { api } from '@/lib/api';
|
|
|
|
|
|
import { useAuthStore } from '@/stores/auth';
|
2026-09-05 18:38:11 +03:30
|
|
|
|
import { canReassignRecords } from '@/lib/roles';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
import { formatMoney as formatMoneyLib } from '@/lib/money';
|
2026-09-05 18:38:11 +03:30
|
|
|
|
import {
|
|
|
|
|
|
formatJalaliNumeric,
|
|
|
|
|
|
formatLocalDateInput,
|
|
|
|
|
|
toFaDigits,
|
|
|
|
|
|
} from '@/lib/jalali';
|
2026-09-02 21:29:00 +03:30
|
|
|
|
import JalaliDateInput from '@/components/JalaliDateInput.vue';
|
2026-09-05 02:13:39 +03:30
|
|
|
|
import MoneyInput from '@/components/MoneyInput.vue';
|
2026-09-05 18:38:11 +03:30
|
|
|
|
import UiIcon from '@/components/UiIcon.vue';
|
2026-09-12 01:33:07 +03:30
|
|
|
|
import {
|
2026-09-22 11:02:08 +03:30
|
|
|
|
UiDropdownMenu,
|
2026-09-12 01:33:07 +03:30
|
|
|
|
UiPageHeader,
|
|
|
|
|
|
UiPagination,
|
|
|
|
|
|
UiChart,
|
|
|
|
|
|
type UiChartOption,
|
|
|
|
|
|
} from '@/components/ui';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
import type {
|
|
|
|
|
|
CreateSalesGoalRequest,
|
|
|
|
|
|
OrgUserDto,
|
|
|
|
|
|
SalesForecastDto,
|
2026-09-05 18:38:11 +03:30
|
|
|
|
SalesForecastKpiDto,
|
2026-08-29 21:06:30 +03:30
|
|
|
|
SalesGoalDto,
|
2026-09-05 18:38:11 +03:30
|
|
|
|
SalesGoalStatus,
|
|
|
|
|
|
SalesGoalType,
|
|
|
|
|
|
UpdateSalesGoalRequest,
|
2026-08-29 21:06:30 +03:30
|
|
|
|
} from '@mento/shared';
|
|
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
type StatusFilter = 'all' | SalesGoalStatus;
|
|
|
|
|
|
type MobTab = 'goals' | 'forecast';
|
|
|
|
|
|
type MobScreen = 'list' | 'form';
|
|
|
|
|
|
|
|
|
|
|
|
const GOAL_TYPES: { value: SalesGoalType; label: string; icon: 'target' | 'users' | 'chart' | 'briefcase' | 'check' | 'star' }[] = [
|
|
|
|
|
|
{ value: 'sales', label: 'فروش', icon: 'target' },
|
|
|
|
|
|
{ value: 'customer', label: 'مشتری', icon: 'users' },
|
|
|
|
|
|
{ value: 'revenue', label: 'درآمد', icon: 'chart' },
|
|
|
|
|
|
{ value: 'deal', label: 'معامله', icon: 'briefcase' },
|
|
|
|
|
|
{ value: 'activity', label: 'فعالیت', icon: 'check' },
|
|
|
|
|
|
{ value: 'quality', label: 'کیفیت', icon: 'star' },
|
|
|
|
|
|
];
|
|
|
|
|
|
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const auth = useAuthStore();
|
|
|
|
|
|
const loading = ref(false);
|
|
|
|
|
|
const saving = ref(false);
|
|
|
|
|
|
const error = ref('');
|
|
|
|
|
|
const forecast = ref<SalesForecastDto | null>(null);
|
|
|
|
|
|
const users = ref<OrgUserDto[]>([]);
|
|
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
const q = ref('');
|
|
|
|
|
|
const statusFilter = ref<StatusFilter>('all');
|
|
|
|
|
|
const from = ref('');
|
|
|
|
|
|
const to = ref('');
|
|
|
|
|
|
const page = ref(1);
|
|
|
|
|
|
const pageSize = ref(10);
|
|
|
|
|
|
const menuId = ref<string | null>(null);
|
|
|
|
|
|
|
|
|
|
|
|
const mobTab = ref<MobTab>('goals');
|
|
|
|
|
|
const mobScreen = ref<MobScreen>('list');
|
|
|
|
|
|
const formOpen = ref(true);
|
|
|
|
|
|
const editingId = ref<string | null>(null);
|
|
|
|
|
|
|
|
|
|
|
|
const title = ref('');
|
|
|
|
|
|
const goalType = ref<SalesGoalType>('sales');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const targetAmount = ref('');
|
2026-09-05 18:38:11 +03:30
|
|
|
|
const forecastAmount = ref('');
|
|
|
|
|
|
const probability = ref('80');
|
2026-08-29 21:06:30 +03:30
|
|
|
|
const notes = ref('');
|
|
|
|
|
|
const userId = ref('');
|
|
|
|
|
|
const periodStart = ref('');
|
|
|
|
|
|
const periodEnd = ref('');
|
|
|
|
|
|
|
|
|
|
|
|
const canManageTeamGoals = computed(() => canReassignRecords(auth.user?.role));
|
2026-09-05 18:38:11 +03:30
|
|
|
|
const currency = computed(() => forecast.value?.currency || 'IRR');
|
|
|
|
|
|
const isCountType = computed(
|
|
|
|
|
|
() =>
|
|
|
|
|
|
goalType.value === 'customer' ||
|
|
|
|
|
|
goalType.value === 'deal' ||
|
|
|
|
|
|
goalType.value === 'activity' ||
|
|
|
|
|
|
goalType.value === 'quality',
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const kpis = computed<SalesForecastKpiDto[]>(() => forecast.value?.kpis ?? []);
|
|
|
|
|
|
|
|
|
|
|
|
const filteredGoals = computed(() => {
|
|
|
|
|
|
let list = forecast.value?.goals ?? [];
|
|
|
|
|
|
if (statusFilter.value !== 'all') {
|
|
|
|
|
|
list = list.filter((g) => g.status === statusFilter.value);
|
|
|
|
|
|
}
|
2026-10-06 15:04:46 +03:30
|
|
|
|
if (q.value.trim()) {
|
|
|
|
|
|
list = list.filter((g) => matchesSearch(q.value, [g.title]));
|
2026-09-05 18:38:11 +03:30
|
|
|
|
}
|
|
|
|
|
|
return list;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const pageCount = computed(() =>
|
|
|
|
|
|
Math.max(1, Math.ceil(filteredGoals.value.length / pageSize.value)),
|
|
|
|
|
|
);
|
|
|
|
|
|
const pageItems = computed(() => {
|
|
|
|
|
|
const start = (page.value - 1) * pageSize.value;
|
|
|
|
|
|
return filteredGoals.value.slice(start, start + pageSize.value);
|
|
|
|
|
|
});
|
|
|
|
|
|
const pageFrom = computed(() =>
|
|
|
|
|
|
filteredGoals.value.length ? (page.value - 1) * pageSize.value + 1 : 0,
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
const formTitle = computed(() =>
|
|
|
|
|
|
editingId.value ? 'ویرایش هدف' : 'افزودن هدف جدید',
|
|
|
|
|
|
);
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
|
|
|
|
|
function monthBounds() {
|
|
|
|
|
|
const now = new Date();
|
2026-09-02 21:29:00 +03:30
|
|
|
|
const start = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
|
|
|
|
const end = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
2026-08-29 21:06:30 +03:30
|
|
|
|
return {
|
2026-09-02 21:29:00 +03:30
|
|
|
|
start: formatLocalDateInput(start),
|
|
|
|
|
|
end: formatLocalDateInput(end),
|
2026-08-29 21:06:30 +03:30
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
function resetPeriodDefaults() {
|
|
|
|
|
|
const b = monthBounds();
|
|
|
|
|
|
from.value = b.start;
|
|
|
|
|
|
to.value = b.end;
|
|
|
|
|
|
periodStart.value = b.start;
|
|
|
|
|
|
periodEnd.value = b.end;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
function formatMoney(amount: number) {
|
|
|
|
|
|
return formatMoneyLib(amount, currency.value);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
const forecastChartOption = computed<UiChartOption>(() => {
|
|
|
|
|
|
const f = forecast.value;
|
|
|
|
|
|
return {
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
|
axisPointer: { type: 'shadow' },
|
|
|
|
|
|
formatter: (params: any) => {
|
|
|
|
|
|
const item = Array.isArray(params) ? params[0] : params;
|
|
|
|
|
|
if (!item) return '';
|
|
|
|
|
|
return `${item.name}: <strong>${formatMoney(item.value)}</strong>`;
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
grid: { left: '3%', right: '4%', bottom: '8%', top: '8%', containLabel: true },
|
|
|
|
|
|
xAxis: {
|
|
|
|
|
|
type: 'category',
|
2026-10-06 20:51:50 +03:30
|
|
|
|
data: ['هدف دوره', 'تحققیافته', 'معاملات باز', 'پیشبینی'],
|
2026-09-12 01:33:07 +03:30
|
|
|
|
axisLine: { lineStyle: { color: '#cbd5e1' } },
|
|
|
|
|
|
axisLabel: { color: '#64748b', fontFamily: 'IRANSans' },
|
|
|
|
|
|
},
|
|
|
|
|
|
yAxis: {
|
|
|
|
|
|
type: 'value',
|
|
|
|
|
|
axisLine: { show: false },
|
|
|
|
|
|
splitLine: { lineStyle: { color: '#f1f5f9', type: 'dashed' } },
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
color: '#64748b',
|
|
|
|
|
|
fontFamily: 'IRANSans',
|
|
|
|
|
|
formatter: (v: number) => toFaDigits(Math.round(v).toLocaleString('en-US')),
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
series: [
|
|
|
|
|
|
{
|
|
|
|
|
|
name: 'مبلغ',
|
|
|
|
|
|
type: 'bar',
|
|
|
|
|
|
barWidth: '40%',
|
|
|
|
|
|
data: [
|
|
|
|
|
|
{ value: f?.targetAmount || 0, itemStyle: { color: '#3b82f6', borderRadius: [6, 6, 0, 0] } },
|
|
|
|
|
|
{ value: f?.wonAmount || 0, itemStyle: { color: '#10b981', borderRadius: [6, 6, 0, 0] } },
|
|
|
|
|
|
{ value: f?.openPipelineAmount || 0, itemStyle: { color: '#f59e0b', borderRadius: [6, 6, 0, 0] } },
|
|
|
|
|
|
{ value: f?.forecastAmount || 0, itemStyle: { color: '#14b8a6', borderRadius: [6, 6, 0, 0] } },
|
|
|
|
|
|
],
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
};
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
function formatValue(amount: number, unit: 'money' | 'count', type?: string) {
|
|
|
|
|
|
if (unit === 'count' || type === 'customer' || type === 'deal' || type === 'activity') {
|
|
|
|
|
|
return `${toFaDigits(Math.round(amount))} ${type === 'customer' ? 'مشتری' : type === 'deal' ? 'معامله' : type === 'activity' ? 'فعالیت' : 'مورد'}`;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (type === 'quality') return `${toFaDigits(Math.round(amount))}٪`;
|
|
|
|
|
|
return formatMoney(amount);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function formatDate(iso: string | null | undefined) {
|
|
|
|
|
|
if (!iso) return '—';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
try {
|
2026-09-05 18:38:11 +03:30
|
|
|
|
return formatJalaliNumeric(new Date(iso));
|
2026-08-29 21:06:30 +03:30
|
|
|
|
} catch {
|
2026-09-05 18:38:11 +03:30
|
|
|
|
return '—';
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function typeMeta(type: string) {
|
|
|
|
|
|
return GOAL_TYPES.find((t) => t.value === type) ?? GOAL_TYPES[0];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function statusLabel(status: SalesGoalStatus | string) {
|
|
|
|
|
|
if (status === 'completed') return 'تکمیل شده';
|
|
|
|
|
|
if (status === 'needs_attention') return 'نیاز به توجه';
|
|
|
|
|
|
return 'در حال انجام';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function kpiIcon(key: string): 'target' | 'users' | 'briefcase' | 'chart' {
|
|
|
|
|
|
if (key === 'customer') return 'users';
|
|
|
|
|
|
if (key === 'deal') return 'briefcase';
|
|
|
|
|
|
if (key === 'forecast') return 'chart';
|
|
|
|
|
|
return 'target';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function ringStyle(percent: number) {
|
|
|
|
|
|
const p = Math.max(0, Math.min(100, percent || 0));
|
|
|
|
|
|
return {
|
|
|
|
|
|
background: `conic-gradient(#0d9488 ${p * 3.6}deg, #e2e8f0 0deg)`,
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function closeMenus() {
|
|
|
|
|
|
menuId.value = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function resetForm() {
|
|
|
|
|
|
editingId.value = null;
|
|
|
|
|
|
title.value = '';
|
|
|
|
|
|
goalType.value = 'sales';
|
|
|
|
|
|
targetAmount.value = '';
|
|
|
|
|
|
forecastAmount.value = '';
|
|
|
|
|
|
probability.value = '80';
|
|
|
|
|
|
notes.value = '';
|
|
|
|
|
|
userId.value = '';
|
|
|
|
|
|
const b = monthBounds();
|
|
|
|
|
|
periodStart.value = from.value || b.start;
|
|
|
|
|
|
periodEnd.value = to.value || b.end;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function openCreate() {
|
|
|
|
|
|
resetForm();
|
|
|
|
|
|
formOpen.value = true;
|
|
|
|
|
|
mobScreen.value = 'form';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function openEdit(goal: SalesGoalDto) {
|
|
|
|
|
|
editingId.value = goal.id;
|
|
|
|
|
|
title.value = goal.title;
|
|
|
|
|
|
goalType.value = (GOAL_TYPES.some((t) => t.value === goal.type)
|
|
|
|
|
|
? goal.type
|
|
|
|
|
|
: 'sales') as SalesGoalType;
|
|
|
|
|
|
targetAmount.value = String(goal.targetAmount);
|
|
|
|
|
|
forecastAmount.value =
|
|
|
|
|
|
goal.forecastAmount != null ? String(goal.forecastAmount) : '';
|
|
|
|
|
|
probability.value =
|
|
|
|
|
|
goal.probability != null ? String(goal.probability) : '80';
|
|
|
|
|
|
notes.value = goal.notes ?? '';
|
|
|
|
|
|
userId.value = goal.user?.id ?? '';
|
|
|
|
|
|
periodStart.value = formatLocalDateInput(new Date(goal.periodStart));
|
|
|
|
|
|
periodEnd.value = formatLocalDateInput(new Date(goal.periodEnd));
|
|
|
|
|
|
formOpen.value = true;
|
|
|
|
|
|
mobScreen.value = 'form';
|
|
|
|
|
|
closeMenus();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function cancelForm() {
|
|
|
|
|
|
resetForm();
|
|
|
|
|
|
mobScreen.value = 'list';
|
|
|
|
|
|
if (window.matchMedia('(max-width: 900px)').matches) {
|
|
|
|
|
|
formOpen.value = false;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async function load() {
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
error.value = '';
|
2026-09-05 18:38:11 +03:30
|
|
|
|
closeMenus();
|
2026-08-29 21:06:30 +03:30
|
|
|
|
try {
|
2026-09-05 18:38:11 +03:30
|
|
|
|
const params: Record<string, string> = {};
|
|
|
|
|
|
if (from.value) params.from = from.value;
|
|
|
|
|
|
if (to.value) params.to = to.value;
|
|
|
|
|
|
const { data } = await api.get<SalesForecastDto>('/sales/forecast', {
|
|
|
|
|
|
params,
|
|
|
|
|
|
});
|
2026-08-29 21:06:30 +03:30
|
|
|
|
forecast.value = data;
|
|
|
|
|
|
if (canManageTeamGoals.value && !users.value.length) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const res = await api.get<OrgUserDto[]>('/users');
|
|
|
|
|
|
users.value = res.data;
|
|
|
|
|
|
} catch {
|
2026-09-05 18:38:11 +03:30
|
|
|
|
/* optional */
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {
|
2026-09-05 18:38:11 +03:30
|
|
|
|
error.value = axios.isAxiosError(e)
|
|
|
|
|
|
? String(
|
|
|
|
|
|
(e.response?.data as { message?: string })?.message ??
|
|
|
|
|
|
'بارگذاری پیشبینی ناموفق بود.',
|
|
|
|
|
|
)
|
|
|
|
|
|
: 'بارگذاری پیشبینی ناموفق بود.';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
} finally {
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
async function saveGoal() {
|
|
|
|
|
|
if (!title.value.trim() || targetAmount.value === '') {
|
|
|
|
|
|
error.value = 'عنوان و مقدار هدف را وارد کنید.';
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!periodStart.value || !periodEnd.value) {
|
|
|
|
|
|
error.value = 'بازه زمانی را وارد کنید.';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
saving.value = true;
|
|
|
|
|
|
error.value = '';
|
|
|
|
|
|
try {
|
2026-09-05 18:38:11 +03:30
|
|
|
|
const body: CreateSalesGoalRequest | UpdateSalesGoalRequest = {
|
2026-08-29 21:06:30 +03:30
|
|
|
|
title: title.value.trim(),
|
2026-09-05 18:38:11 +03:30
|
|
|
|
type: goalType.value,
|
|
|
|
|
|
periodStart: new Date(periodStart.value).toISOString(),
|
|
|
|
|
|
periodEnd: new Date(periodEnd.value + 'T23:59:59.000Z').toISOString(),
|
2026-08-29 21:06:30 +03:30
|
|
|
|
targetAmount: Number(targetAmount.value),
|
2026-09-05 18:38:11 +03:30
|
|
|
|
forecastAmount:
|
|
|
|
|
|
forecastAmount.value !== '' ? Number(forecastAmount.value) : null,
|
|
|
|
|
|
probability:
|
|
|
|
|
|
probability.value !== '' ? Number(probability.value) : null,
|
2026-08-29 21:06:30 +03:30
|
|
|
|
notes: notes.value || undefined,
|
|
|
|
|
|
userId: canManageTeamGoals.value
|
2026-09-05 18:38:11 +03:30
|
|
|
|
? userId.value || null
|
2026-08-29 21:06:30 +03:30
|
|
|
|
: undefined,
|
|
|
|
|
|
};
|
2026-09-05 18:38:11 +03:30
|
|
|
|
if (editingId.value) {
|
|
|
|
|
|
await api.patch(`/sales/goals/${editingId.value}`, body);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
await api.post('/sales/goals', body);
|
|
|
|
|
|
}
|
|
|
|
|
|
cancelForm();
|
|
|
|
|
|
formOpen.value = true;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
await load();
|
|
|
|
|
|
} catch (e) {
|
2026-09-05 18:38:11 +03:30
|
|
|
|
error.value = axios.isAxiosError(e)
|
|
|
|
|
|
? String(
|
|
|
|
|
|
(e.response?.data as { message?: string })?.message ??
|
|
|
|
|
|
'ذخیره هدف ناموفق بود.',
|
|
|
|
|
|
)
|
|
|
|
|
|
: 'ذخیره هدف ناموفق بود.';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
} finally {
|
|
|
|
|
|
saving.value = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async function removeGoal(id: string) {
|
|
|
|
|
|
if (!confirm('این هدف حذف شود؟')) return;
|
2026-09-05 18:38:11 +03:30
|
|
|
|
try {
|
|
|
|
|
|
await api.delete(`/sales/goals/${id}`);
|
|
|
|
|
|
if (editingId.value === id) cancelForm();
|
|
|
|
|
|
await load();
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
error.value = 'حذف هدف ناموفق بود.';
|
|
|
|
|
|
}
|
|
|
|
|
|
closeMenus();
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
watch([statusFilter, q, pageSize], () => {
|
|
|
|
|
|
page.value = 1;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
watch([from, to], () => {
|
|
|
|
|
|
void load();
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-08-29 21:06:30 +03:30
|
|
|
|
onMounted(() => {
|
2026-09-05 18:38:11 +03:30
|
|
|
|
resetPeriodDefaults();
|
2026-08-29 21:06:30 +03:30
|
|
|
|
void load();
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
<section class="page" @click="closeMenus">
|
|
|
|
|
|
<!-- Mobile form screen -->
|
|
|
|
|
|
<div v-if="mobScreen === 'form'" class="mob-form-screen mob-only">
|
|
|
|
|
|
<header class="mob-head">
|
|
|
|
|
|
<button type="button" class="icon-btn" aria-label="بازگشت" @click="cancelForm">
|
|
|
|
|
|
<UiIcon name="chevron" :size="18" class="back-ico" />
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<div class="mob-head-copy">
|
|
|
|
|
|
<h1>{{ formTitle }}</h1>
|
|
|
|
|
|
<p>اهداف ماهانه را تنظیم کنید</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span class="doc-badge"><UiIcon name="document" :size="18" /><UiIcon name="plus" :size="10" class="plus" /></span>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
<form class="side-form" @submit.prevent="saveGoal">
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>عنوان <em>*</em></span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon name="document" :size="16" />
|
|
|
|
|
|
<input v-model="title" required maxlength="200" placeholder="هدف فروش ماه جاری" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>نوع هدف</span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon :name="typeMeta(goalType).icon" :size="16" />
|
|
|
|
|
|
<select v-model="goalType">
|
|
|
|
|
|
<option v-for="t in GOAL_TYPES" :key="t.value" :value="t.value">{{ t.label }}</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>{{ isCountType ? 'مقدار هدف *' : 'مبلغ هدف (ریال) *' }}</span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon name="dollar" :size="16" />
|
|
|
|
|
|
<MoneyInput v-if="!isCountType" v-model="targetAmount" :decimals="0" />
|
|
|
|
|
|
<input v-else v-model="targetAmount" type="number" min="0" step="1" dir="ltr" required />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<label v-if="canManageTeamGoals" class="field">
|
|
|
|
|
|
<span>برای</span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon name="users" :size="16" />
|
|
|
|
|
|
<select v-model="userId">
|
|
|
|
|
|
<option value="">کل سازمان</option>
|
|
|
|
|
|
<option v-for="u in users" :key="u.id" :value="u.id">{{ u.fullName }}</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="row-2">
|
|
|
|
|
|
<label class="field"><span>از تاریخ <em>*</em></span><JalaliDateInput v-model="periodStart" required /></label>
|
|
|
|
|
|
<label class="field"><span>تا تاریخ <em>*</em></span><JalaliDateInput v-model="periodEnd" required /></label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>یادداشت</span>
|
|
|
|
|
|
<div class="control area">
|
|
|
|
|
|
<UiIcon name="document" :size="16" />
|
|
|
|
|
|
<textarea v-model="notes" rows="3" placeholder="یادداشت خود را وارد کنید..." />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="forecast-block">
|
|
|
|
|
|
<h3><UiIcon name="chart" :size="16" /> پیشبینی</h3>
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>مبلغ پیشبینی شده (ریال)</span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon name="trend" :size="16" />
|
|
|
|
|
|
<MoneyInput v-model="forecastAmount" :decimals="0" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>احتمال تحقق (%)</span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon name="trend" :size="16" />
|
|
|
|
|
|
<input v-model="probability" type="number" min="0" max="100" step="1" dir="ltr" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p v-if="error" class="error">{{ error }}</p>
|
|
|
|
|
|
<button class="btn primary full" type="submit" :disabled="saving">
|
|
|
|
|
|
<UiIcon name="check-plain" :size="16" />
|
|
|
|
|
|
{{ saving ? '…' : 'ثبت هدف' }}
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<button class="btn ghost full" type="button" @click="cancelForm">انصراف</button>
|
|
|
|
|
|
</form>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
<template v-else>
|
2026-09-12 01:33:07 +03:30
|
|
|
|
<UiPageHeader
|
|
|
|
|
|
title="هدف و پیشبینی"
|
|
|
|
|
|
lead="اهداف ماهانه را تنظیم و پیشبینیهای خود را مشاهده نمایید"
|
|
|
|
|
|
/>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
|
|
|
|
|
|
<div class="mob-tabs mob-only">
|
|
|
|
|
|
<button type="button" :class="{ on: mobTab === 'goals' }" @click="mobTab = 'goals'">لیست اهداف</button>
|
|
|
|
|
|
<button type="button" :class="{ on: mobTab === 'forecast' }" @click="mobTab = 'forecast'">پیشبینی</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- KPI cards -->
|
|
|
|
|
|
<div
|
|
|
|
|
|
v-if="!loading"
|
|
|
|
|
|
class="kpi-row"
|
|
|
|
|
|
:class="{ 'mob-forecast-hide': mobTab === 'forecast' }"
|
|
|
|
|
|
>
|
|
|
|
|
|
<article v-for="kpi in kpis" :key="kpi.key" class="kpi-card">
|
|
|
|
|
|
<div class="ring" :style="ringStyle(kpi.percent)">
|
|
|
|
|
|
<span>{{ toFaDigits(Math.round(kpi.percent)) }}٪</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="kpi-meta">
|
|
|
|
|
|
<strong>{{ kpi.label }}</strong>
|
|
|
|
|
|
<p>
|
|
|
|
|
|
{{ formatValue(kpi.current, kpi.unit) }}
|
|
|
|
|
|
<small>از {{ formatValue(kpi.target, kpi.unit) }}</small>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</p>
|
|
|
|
|
|
</div>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
<span class="kpi-ico"><UiIcon :name="kpiIcon(kpi.key)" :size="18" /></span>
|
|
|
|
|
|
</article>
|
|
|
|
|
|
<p v-if="!kpis.length" class="muted kpi-empty">برای این بازه هنوز KPIای محاسبه نشده است.</p>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</div>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
|
|
|
|
|
|
<div class="desk-layout">
|
|
|
|
|
|
<aside class="sidebar desk-only" :class="{ collapsed: !formOpen }">
|
|
|
|
|
|
<header class="side-head">
|
|
|
|
|
|
<span class="side-ico"><UiIcon name="plus" :size="16" /></span>
|
|
|
|
|
|
<h2>{{ formTitle }}</h2>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
<form class="side-form" @submit.prevent="saveGoal">
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>عنوان <em>*</em></span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon name="document" :size="16" />
|
|
|
|
|
|
<input v-model="title" required maxlength="200" placeholder="هدف فروش ماه جاری" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>نوع هدف</span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon :name="typeMeta(goalType).icon" :size="16" />
|
|
|
|
|
|
<select v-model="goalType">
|
|
|
|
|
|
<option v-for="t in GOAL_TYPES" :key="t.value" :value="t.value">{{ t.label }}</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>{{ isCountType ? 'مقدار هدف *' : 'مبلغ هدف (ریال) *' }}</span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon name="dollar" :size="16" />
|
|
|
|
|
|
<MoneyInput v-if="!isCountType" v-model="targetAmount" :decimals="0" />
|
|
|
|
|
|
<input v-else v-model="targetAmount" type="number" min="0" step="1" dir="ltr" required />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<label v-if="canManageTeamGoals" class="field">
|
|
|
|
|
|
<span>برای</span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon name="users" :size="16" />
|
|
|
|
|
|
<select v-model="userId">
|
|
|
|
|
|
<option value="">کل سازمان</option>
|
|
|
|
|
|
<option v-for="u in users" :key="u.id" :value="u.id">{{ u.fullName }}</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="row-2">
|
|
|
|
|
|
<label class="field"><span>از تاریخ</span><JalaliDateInput v-model="periodStart" /></label>
|
|
|
|
|
|
<label class="field"><span>تا تاریخ</span><JalaliDateInput v-model="periodEnd" /></label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>یادداشت</span>
|
|
|
|
|
|
<div class="control area">
|
|
|
|
|
|
<UiIcon name="document" :size="16" />
|
|
|
|
|
|
<textarea v-model="notes" rows="3" placeholder="یادداشت خود را وارد کنید..." />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="forecast-block">
|
|
|
|
|
|
<h3><UiIcon name="chart" :size="16" /> پیشبینی</h3>
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>مبلغ پیشبینی شده (ریال)</span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon name="trend" :size="16" />
|
|
|
|
|
|
<MoneyInput v-model="forecastAmount" :decimals="0" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<label class="field">
|
|
|
|
|
|
<span>احتمال تحقق (%)</span>
|
|
|
|
|
|
<div class="control">
|
|
|
|
|
|
<UiIcon name="trend" :size="16" />
|
|
|
|
|
|
<input v-model="probability" type="number" min="0" max="100" step="1" dir="ltr" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<button class="btn primary full" type="submit" :disabled="saving">
|
|
|
|
|
|
<UiIcon name="check-plain" :size="16" />
|
|
|
|
|
|
{{ saving ? 'در حال ذخیره…' : editingId ? 'ذخیره تغییرات' : 'ثبت هدف' }}
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<button class="btn ghost full" type="button" @click="cancelForm">انصراف</button>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
</aside>
|
|
|
|
|
|
|
|
|
|
|
|
<main class="main">
|
|
|
|
|
|
<div class="toolbar">
|
|
|
|
|
|
<label class="search">
|
|
|
|
|
|
<UiIcon name="search" :size="16" />
|
|
|
|
|
|
<input v-model="q" type="search" placeholder="جستجوی عنوان هدف..." />
|
|
|
|
|
|
</label>
|
|
|
|
|
|
<div class="status-tabs desk-only">
|
|
|
|
|
|
<button type="button" :class="{ on: statusFilter === 'all' }" @click="statusFilter = 'all'">همه اهداف</button>
|
|
|
|
|
|
<button type="button" :class="{ on: statusFilter === 'in_progress' }" @click="statusFilter = 'in_progress'">در حال انجام</button>
|
|
|
|
|
|
<button type="button" :class="{ on: statusFilter === 'completed' }" @click="statusFilter = 'completed'">تکمیل شده</button>
|
|
|
|
|
|
<button type="button" class="warn" :class="{ on: statusFilter === 'needs_attention' }" @click="statusFilter = 'needs_attention'">نیاز به توجه</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="date-range desk-only">
|
|
|
|
|
|
<UiIcon name="calendar" :size="16" />
|
|
|
|
|
|
<JalaliDateInput v-model="from" placeholder="از" />
|
|
|
|
|
|
<span>–</span>
|
|
|
|
|
|
<JalaliDateInput v-model="to" placeholder="تا" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<label class="mob-filter mob-only">
|
|
|
|
|
|
<select v-model="statusFilter">
|
|
|
|
|
|
<option value="all">همه اهداف</option>
|
|
|
|
|
|
<option value="in_progress">در حال انجام</option>
|
|
|
|
|
|
<option value="completed">تکمیل شده</option>
|
|
|
|
|
|
<option value="needs_attention">نیاز به توجه</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<p v-if="error" class="error">{{ error }}</p>
|
|
|
|
|
|
<p v-else-if="loading" class="muted">در حال بارگذاری…</p>
|
|
|
|
|
|
|
|
|
|
|
|
<template v-else>
|
|
|
|
|
|
<!-- Desktop table -->
|
2026-10-05 11:56:49 +03:30
|
|
|
|
<div class="tc-row desk-only">
|
|
|
|
|
|
<TableColumnsMenu table-key="sales-forecast" align="end" />
|
|
|
|
|
|
</div>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
<div class="table-wrap desk-only">
|
2026-10-05 11:56:49 +03:30
|
|
|
|
<table v-table-cols="'sales-forecast'">
|
2026-09-05 18:38:11 +03:30
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>#</th>
|
|
|
|
|
|
<th>عنوان</th>
|
|
|
|
|
|
<th>نوع</th>
|
|
|
|
|
|
<th>مقدار هدف</th>
|
|
|
|
|
|
<th>مقدار فعلی</th>
|
|
|
|
|
|
<th>درصد تحقق</th>
|
|
|
|
|
|
<th>بازه زمانی</th>
|
|
|
|
|
|
<th>وضعیت</th>
|
|
|
|
|
|
<th>عملیات</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr v-for="(g, idx) in pageItems" :key="g.id">
|
|
|
|
|
|
<td>{{ toFaDigits(pageFrom + idx) }}</td>
|
|
|
|
|
|
<td><strong>{{ g.title }}</strong></td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<span class="type-cell">
|
|
|
|
|
|
<UiIcon :name="typeMeta(g.type).icon" :size="14" />
|
|
|
|
|
|
{{ typeMeta(g.type).label }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td>{{ formatValue(g.targetAmount, g.type === 'sales' || g.type === 'revenue' ? 'money' : 'count', g.type) }}</td>
|
|
|
|
|
|
<td>{{ formatValue(g.currentAmount, g.type === 'sales' || g.type === 'revenue' ? 'money' : 'count', g.type) }}</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<div class="bar-wrap">
|
|
|
|
|
|
<div class="bar"><i :style="{ width: Math.min(100, g.progressPercent) + '%' }" /></div>
|
|
|
|
|
|
<span>{{ toFaDigits(Math.round(g.progressPercent)) }}٪</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="dates">
|
|
|
|
|
|
<span>{{ formatDate(g.periodStart) }}</span>
|
|
|
|
|
|
<span>{{ formatDate(g.periodEnd) }}</span>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td><span class="status" :class="g.status">{{ statusLabel(g.status) }}</span></td>
|
|
|
|
|
|
<td class="ops" @click.stop>
|
|
|
|
|
|
<button type="button" class="icon-btn sm" title="ویرایش" @click="openEdit(g)">
|
|
|
|
|
|
<UiIcon name="pencil" :size="15" />
|
|
|
|
|
|
</button>
|
2026-09-22 11:02:08 +03:30
|
|
|
|
<UiDropdownMenu
|
|
|
|
|
|
:open="menuId === g.id"
|
|
|
|
|
|
align="end"
|
|
|
|
|
|
@update:open="(v) => (menuId = v ? g.id : null)"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #trigger="{ toggle }">
|
|
|
|
|
|
<button type="button" class="icon-btn sm" @click.stop="toggle">
|
|
|
|
|
|
<UiIcon name="dots-v" :size="15" />
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</template>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
<button type="button" @click="openEdit(g)">ویرایش</button>
|
|
|
|
|
|
<button type="button" class="danger" @click="removeGoal(g.id)">حذف</button>
|
2026-09-22 11:02:08 +03:30
|
|
|
|
</UiDropdownMenu>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
<p v-if="!pageItems.length" class="empty">هدفی یافت نشد.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Mobile goal cards -->
|
|
|
|
|
|
<div class="mob-goals mob-only" v-show="mobTab === 'goals'">
|
|
|
|
|
|
<div class="mob-sec-head">
|
|
|
|
|
|
<h2>اهداف من <em>{{ toFaDigits(filteredGoals.length) }} مورد</em></h2>
|
|
|
|
|
|
<button type="button" class="fab-mini" aria-label="افزودن" @click="openCreate">
|
|
|
|
|
|
<UiIcon name="plus" :size="18" />
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<article v-for="g in filteredGoals" :key="g.id" class="goal-card" @click.stop>
|
2026-09-22 11:02:08 +03:30
|
|
|
|
<UiDropdownMenu
|
|
|
|
|
|
:open="menuId === g.id"
|
|
|
|
|
|
align="end"
|
|
|
|
|
|
@update:open="(v) => (menuId = v ? g.id : null)"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #trigger="{ toggle }">
|
|
|
|
|
|
<button type="button" class="dots" @click.stop="toggle">
|
|
|
|
|
|
<UiIcon name="dots-v" :size="16" />
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</template>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
<button type="button" @click="openEdit(g)">ویرایش</button>
|
|
|
|
|
|
<button type="button" class="danger" @click="removeGoal(g.id)">حذف</button>
|
2026-09-22 11:02:08 +03:30
|
|
|
|
</UiDropdownMenu>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
<div class="goal-body">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<strong>{{ g.title }}</strong>
|
|
|
|
|
|
<span class="muted">{{ typeMeta(g.type).label }}</span>
|
|
|
|
|
|
<p>{{ formatValue(g.targetAmount, g.type === 'sales' || g.type === 'revenue' ? 'money' : 'count', g.type) }}</p>
|
|
|
|
|
|
<small class="muted">{{ formatDate(g.periodStart) }} تا {{ formatDate(g.periodEnd) }}</small>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="ring sm" :style="ringStyle(g.progressPercent)">
|
|
|
|
|
|
<span>{{ toFaDigits(Math.round(g.progressPercent)) }}٪</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span class="status" :class="g.status">
|
|
|
|
|
|
<UiIcon name="calendar" :size="12" />
|
|
|
|
|
|
{{ statusLabel(g.status) }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</article>
|
|
|
|
|
|
<p v-if="!filteredGoals.length" class="empty">هدفی یافت نشد.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Mobile forecast tab -->
|
|
|
|
|
|
<div class="mob-forecast mob-only" v-show="mobTab === 'forecast'">
|
|
|
|
|
|
<article class="forecast-summary card">
|
|
|
|
|
|
<h3>خلاصه پیشبینی</h3>
|
|
|
|
|
|
<div class="sum-row"><span>هدف دوره</span><strong>{{ formatMoney(forecast?.targetAmount || 0) }}</strong></div>
|
|
|
|
|
|
<div class="sum-row"><span>تحقق (برنده)</span><strong>{{ formatMoney(forecast?.wonAmount || 0) }}</strong></div>
|
2026-10-06 20:51:50 +03:30
|
|
|
|
<div class="sum-row"><span>معاملات باز</span><strong>{{ formatMoney(forecast?.openPipelineAmount || 0) }}</strong></div>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
<div class="sum-row payable"><span>پیشبینی درآمد</span><strong>{{ formatMoney(forecast?.forecastAmount || 0) }}</strong></div>
|
|
|
|
|
|
<div class="sum-row"><span>مشتریان جدید</span><strong>{{ toFaDigits(forecast?.newCustomersCount || 0) }}</strong></div>
|
|
|
|
|
|
<div class="sum-row"><span>معاملات جدید</span><strong>{{ toFaDigits(forecast?.newDealsCount || 0) }}</strong></div>
|
2026-09-12 01:33:07 +03:30
|
|
|
|
<UiChart :option="forecastChartOption" height="220px" style="margin-top: 1rem;" />
|
2026-09-05 18:38:11 +03:30
|
|
|
|
</article>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-09-12 01:33:07 +03:30
|
|
|
|
<UiPagination
|
|
|
|
|
|
v-if="filteredGoals.length && mobTab !== 'forecast'"
|
|
|
|
|
|
:page="page"
|
|
|
|
|
|
:total-pages="pageCount"
|
|
|
|
|
|
:total-items="filteredGoals.length"
|
|
|
|
|
|
:page-size="pageSize"
|
|
|
|
|
|
@update:page="page = $event"
|
|
|
|
|
|
/>
|
2026-09-05 18:38:11 +03:30
|
|
|
|
</template>
|
|
|
|
|
|
</main>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mob-bottom mob-only">
|
|
|
|
|
|
<RouterLink class="side-link" to="/reports"><UiIcon name="chart" :size="18" /><span>گزارش</span></RouterLink>
|
|
|
|
|
|
<button type="button" class="fab" @click="openCreate">افزودن هدف جدید +</button>
|
|
|
|
|
|
<RouterLink class="side-link" to="/reports"><UiIcon name="trend" :size="18" /><span>تحلیل</span></RouterLink>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
2026-08-29 21:06:30 +03:30
|
|
|
|
</section>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.page {
|
2026-09-05 18:38:11 +03:30
|
|
|
|
--teal: #0d9488;
|
|
|
|
|
|
--teal-soft: #f0fdfa;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
display: grid;
|
2026-09-05 02:29:41 +03:30
|
|
|
|
gap: 1rem;
|
2026-09-12 01:33:07 +03:30
|
|
|
|
width: 100%;
|
|
|
|
|
|
max-width: 100%;
|
2026-09-05 02:29:41 +03:30
|
|
|
|
min-width: 0;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.page-head { display: flex; justify-content: space-between; gap: 1rem; }
|
|
|
|
|
|
.title-row { display: flex; gap: 0.75rem; align-items: flex-start; }
|
|
|
|
|
|
.title-ico, .side-ico, .doc-badge, .kpi-ico {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
width: 42px; height: 42px; border-radius: var(--radius); display: grid; place-items: center;
|
2026-09-05 18:38:11 +03:30
|
|
|
|
background: var(--teal-soft); color: var(--teal); flex-shrink: 0; position: relative;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.doc-badge .plus {
|
|
|
|
|
|
position: absolute; bottom: 4px; left: 4px; background: var(--teal); color: #fff;
|
2026-09-12 01:33:07 +03:30
|
|
|
|
border-radius: var(--radius); padding: 1px;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-12 01:33:07 +03:30
|
|
|
|
h1 { margin: 0; font-size: 1.4rem; font-weight: 600; }
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.lead, .mob-head-copy p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.88rem; }
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.kpi-row {
|
|
|
|
|
|
display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem;
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.kpi-card {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
background: #fff; border: 1px solid #eef2f7; border-radius: var(--radius); padding: 0.9rem;
|
2026-09-05 18:38:11 +03:30
|
|
|
|
display: grid; grid-template-columns: auto 1fr auto; gap: 0.7rem; align-items: center;
|
|
|
|
|
|
box-shadow: 0 8px 20px rgba(15,23,42,.04);
|
|
|
|
|
|
}
|
|
|
|
|
|
.ring {
|
|
|
|
|
|
width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ring::before {
|
|
|
|
|
|
content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ring span {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
position: relative; z-index: 1; font-size: 0.78rem; font-weight: 600; color: var(--teal);
|
2026-09-05 18:38:11 +03:30
|
|
|
|
}
|
|
|
|
|
|
.ring.sm { width: 56px; height: 56px; }
|
|
|
|
|
|
.ring.sm::before { inset: 6px; }
|
|
|
|
|
|
.ring.sm span { font-size: 0.72rem; }
|
|
|
|
|
|
.kpi-meta strong { display: block; font-size: 0.88rem; }
|
|
|
|
|
|
.kpi-meta p { margin: 0.25rem 0 0; font-size: 0.78rem; font-weight: 700; }
|
|
|
|
|
|
.kpi-meta small { display: block; color: var(--muted); font-weight: 500; margin-top: 0.1rem; }
|
|
|
|
|
|
.kpi-empty { grid-column: 1 / -1; }
|
2026-09-05 02:29:41 +03:30
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.desk-layout {
|
|
|
|
|
|
display: grid; grid-template-columns: minmax(280px, 320px) minmax(0, 1fr); gap: 1rem; align-items: start;
|
|
|
|
|
|
}
|
|
|
|
|
|
.sidebar, .main, .card, .table-wrap, .goal-card, .forecast-summary {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
background: #fff; border: 1px solid #eef2f7; border-radius: var(--radius);
|
2026-09-05 18:38:11 +03:30
|
|
|
|
box-shadow: 0 8px 20px rgba(15,23,42,.04);
|
|
|
|
|
|
}
|
|
|
|
|
|
.sidebar { padding: 1rem; display: grid; gap: 0.85rem; position: sticky; top: 0.75rem; }
|
|
|
|
|
|
.side-head { display: flex; align-items: center; gap: 0.55rem; }
|
|
|
|
|
|
.side-head h2 { margin: 0; font-size: 1.05rem; }
|
|
|
|
|
|
.side-form { display: grid; gap: 0.75rem; }
|
|
|
|
|
|
.field { display: grid; gap: 0.3rem; }
|
|
|
|
|
|
.field > span { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
|
|
|
|
|
|
.field em { color: #ef4444; font-style: normal; }
|
|
|
|
|
|
.control { position: relative; display: flex; align-items: center; }
|
|
|
|
|
|
.control :deep(.ico) {
|
|
|
|
|
|
position: absolute; inset-inline-start: 0.7rem; color: #94a3b8; pointer-events: none; z-index: 1;
|
|
|
|
|
|
}
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.control input, .control select, .control textarea, .mob-filter select {
|
|
|
|
|
|
width: 100%; border: 1px solid var(--line); border-radius: var(--radius); min-height: var(--control-h); height: var(--control-h);
|
|
|
|
|
|
padding: 0 0.8rem; background: #fff; font: inherit; font-size: var(--fs-sm); color: inherit; box-sizing: border-box;
|
2026-09-05 18:38:11 +03:30
|
|
|
|
}
|
|
|
|
|
|
.control input, .control select, .control textarea { padding-inline-start: 2.2rem; }
|
|
|
|
|
|
.control.area textarea { min-height: 84px; resize: vertical; }
|
|
|
|
|
|
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
|
|
|
|
|
|
.forecast-block {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
border-top: 1px dashed var(--line); padding-top: 0.75rem; display: grid; gap: 0.65rem;
|
2026-09-05 18:38:11 +03:30
|
|
|
|
}
|
|
|
|
|
|
.forecast-block h3 {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
margin: 0; display: flex; align-items: center; gap: 0.35rem; font-size: 0.95rem; color: var(--accent);
|
2026-09-05 18:38:11 +03:30
|
|
|
|
}
|
2026-09-05 02:29:41 +03:30
|
|
|
|
.btn {
|
2026-09-10 23:45:11 +03:30
|
|
|
|
border: 0; border-radius: var(--radius); min-height: var(--control-h); height: var(--control-h);
|
2026-09-12 01:33:07 +03:30
|
|
|
|
padding: 0 0.85rem; font-weight: 600; font-size: var(--fs-sm); box-sizing: border-box;
|
2026-09-05 18:38:11 +03:30
|
|
|
|
display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; cursor: pointer;
|
2026-09-12 01:33:07 +03:30
|
|
|
|
transition: background var(--transition-fast), border-color var(--transition-fast);
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.btn.primary { background: var(--accent); color: #fff; }
|
|
|
|
|
|
.btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-secondary); }
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.btn.full { width: 100%; }
|
2026-09-05 02:29:41 +03:30
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.main { padding: 0.9rem; display: grid; gap: 0.85rem; min-width: 0; }
|
|
|
|
|
|
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
|
|
|
|
|
|
.search {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
flex: 1 1 180px; max-width: 380px; display: flex; align-items: center; gap: 0.4rem;
|
|
|
|
|
|
border: 1px solid var(--line); border-radius: var(--radius); min-height: var(--control-h); height: var(--control-h);
|
|
|
|
|
|
padding: 0 0.75rem; color: var(--muted); background: #fff; box-sizing: border-box;
|
|
|
|
|
|
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.search:focus-within {
|
|
|
|
|
|
border-color: var(--accent);
|
|
|
|
|
|
box-shadow: 0 0 0 2px var(--accent-soft);
|
|
|
|
|
|
}
|
|
|
|
|
|
.search input { border: 0; outline: 0; background: transparent; color: var(--ink); width: 100%; font-size: var(--fs-sm); padding: 0; }
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.status-tabs { display: flex; flex-wrap: wrap; gap: 0.3rem; }
|
|
|
|
|
|
.status-tabs button {
|
|
|
|
|
|
border: 0; background: #f1f5f9; color: #64748b; border-radius: 999px; padding: 0.4rem 0.75rem;
|
|
|
|
|
|
font-weight: 700; cursor: pointer;
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.status-tabs button.on { background: var(--teal); color: #fff; }
|
|
|
|
|
|
.status-tabs button.warn.on { background: #f59e0b; }
|
|
|
|
|
|
.date-range {
|
|
|
|
|
|
display: inline-flex; align-items: center; gap: 0.3rem; border: 1px solid #e2e8f0;
|
2026-09-10 23:45:11 +03:30
|
|
|
|
border-radius: var(--radius); min-height: var(--control-h); height: var(--control-h);
|
|
|
|
|
|
padding: 0 0.5rem; color: #94a3b8; background: #fff; box-sizing: border-box;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.date-range :deep(button), .date-range :deep(input) { border: 0; background: transparent; min-height: 34px; }
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.table-wrap { overflow: auto; }
|
|
|
|
|
|
table { width: 100%; border-collapse: collapse; min-width: 920px; }
|
|
|
|
|
|
th, td { padding: 0.75rem 0.55rem; border-bottom: 1px solid #eef2f7; text-align: right; font-size: 0.88rem; vertical-align: middle; }
|
|
|
|
|
|
th { background: #f8fafc; color: #64748b; font-weight: 700; white-space: nowrap; }
|
|
|
|
|
|
.type-cell { display: inline-flex; align-items: center; gap: 0.3rem; color: #475569; }
|
|
|
|
|
|
.bar-wrap { display: grid; grid-template-columns: 1fr auto; gap: 0.4rem; align-items: center; min-width: 110px; }
|
|
|
|
|
|
.bar { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
|
|
|
|
|
|
.bar i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
|
|
|
|
|
|
.dates { display: grid; gap: 0.15rem; font-size: 0.8rem; color: #64748b; }
|
|
|
|
|
|
.status {
|
|
|
|
|
|
display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.55rem;
|
|
|
|
|
|
border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.status.in_progress { background: #ccfbf1; color: #0f766e; }
|
|
|
|
|
|
.status.completed { background: #dcfce7; color: #15803d; }
|
|
|
|
|
|
.status.needs_attention { background: #ffedd5; color: #c2410c; }
|
|
|
|
|
|
.ops { position: relative; white-space: nowrap; }
|
|
|
|
|
|
.icon-btn {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
width: 34px; height: 34px; border-radius: var(--radius); border: 1px solid #e2e8f0; background: #fff;
|
2026-09-05 18:38:11 +03:30
|
|
|
|
display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #64748b;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.icon-btn.sm { width: 30px; height: 30px; }
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; align-items: center; }
|
|
|
|
|
|
.pager-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
|
|
|
|
|
|
.page-size { display: inline-flex; gap: 0.35rem; align-items: center; color: var(--muted); font-size: 0.85rem; }
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.page-size select { border: 1px solid #e2e8f0; border-radius: var(--radius); padding: 0.25rem 0.45rem; }
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.pages { display: flex; gap: 0.25rem; }
|
|
|
|
|
|
.page-btn {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
min-width: 32px; height: 32px; border-radius: var(--radius); border: 1px solid #e2e8f0; background: #fff; cursor: pointer;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.page-btn.on { background: var(--teal); color: #fff; border-color: transparent; }
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.mob-tabs, .mob-goals, .mob-forecast, .mob-bottom, .mob-only, .mob-form-screen { display: none; }
|
|
|
|
|
|
.mob-sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.55rem; }
|
|
|
|
|
|
.mob-sec-head h2 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 0.45rem; }
|
|
|
|
|
|
.mob-sec-head em {
|
|
|
|
|
|
font-style: normal; font-size: 0.75rem; background: var(--teal-soft); color: var(--teal);
|
|
|
|
|
|
border-radius: 999px; padding: 0.15rem 0.5rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.fab-mini {
|
|
|
|
|
|
width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--teal); color: #fff;
|
|
|
|
|
|
display: grid; place-items: center; cursor: pointer;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.goal-card { padding: 0.9rem; display: grid; gap: 0.65rem; position: relative; }
|
2026-09-22 11:02:08 +03:30
|
|
|
|
.goal-card :deep(.ui-dd-anchor) {
|
|
|
|
|
|
position: absolute; top: 0.6rem; left: 0.5rem;
|
|
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.goal-card .dots {
|
2026-09-22 11:02:08 +03:30
|
|
|
|
border: 0; background: transparent; color: #94a3b8; cursor: pointer;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.goal-body { display: grid; grid-template-columns: 1fr auto; gap: 0.65rem; align-items: center; }
|
|
|
|
|
|
.goal-body strong { display: block; }
|
|
|
|
|
|
.goal-body .muted, .goal-body small { display: block; font-size: 0.8rem; }
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.goal-body p { margin: 0.25rem 0; font-weight: 600; font-size: 0.9rem; }
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.sum-row {
|
|
|
|
|
|
display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.45rem 0;
|
|
|
|
|
|
border-bottom: 1px solid #f1f5f9; font-size: 0.9rem;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-12 01:33:07 +03:30
|
|
|
|
.sum-row.payable { color: var(--teal); font-weight: 600; border-bottom: 0; }
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.forecast-summary { padding: 1rem; }
|
|
|
|
|
|
.mob-bottom {
|
2026-09-17 17:36:21 +03:30
|
|
|
|
position: fixed; left: 0; right: 0; bottom: var(--mobile-tabbar-h); z-index: 40;
|
2026-09-05 18:38:11 +03:30
|
|
|
|
display: none; grid-template-columns: auto 1fr auto; gap: 0.5rem; align-items: center;
|
2026-09-17 17:36:21 +03:30
|
|
|
|
padding: 0.65rem 0.85rem;
|
2026-09-05 18:38:11 +03:30
|
|
|
|
background: #fff; border-top: 1px solid #eef2f7; box-shadow: 0 -8px 24px rgba(15,23,42,.06);
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.fab {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
border: 0; border-radius: var(--radius); min-height: 36px; background: var(--teal); color: #fff; font-weight: 600;
|
2026-09-10 01:22:24 +03:30
|
|
|
|
padding: 0 1rem; cursor: pointer;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.side-link {
|
|
|
|
|
|
display: grid; justify-items: center; gap: 0.15rem; text-decoration: none; color: #64748b;
|
|
|
|
|
|
font-size: 0.72rem; font-weight: 700; min-width: 48px;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.mob-form-screen { display: none; gap: 1rem; }
|
|
|
|
|
|
.mob-head {
|
|
|
|
|
|
display: grid; grid-template-columns: auto 1fr auto; gap: 0.55rem; align-items: center;
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.mob-head-copy { text-align: center; }
|
|
|
|
|
|
.mob-head-copy h1 { font-size: 1.1rem; }
|
|
|
|
|
|
.back-ico { transform: rotate(180deg); }
|
|
|
|
|
|
.muted, .empty { color: var(--muted); font-size: 0.9rem; }
|
|
|
|
|
|
.error { color: #b91c1c; font-size: 0.9rem; }
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
2026-09-05 18:38:11 +03:30
|
|
|
|
@media (max-width: 1100px) {
|
|
|
|
|
|
.kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 02:29:41 +03:30
|
|
|
|
@media (max-width: 900px) {
|
2026-09-17 17:36:21 +03:30
|
|
|
|
.page { padding-bottom: 5.5rem; }
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.desk-only { display: none !important; }
|
|
|
|
|
|
.mob-only, .mob-tabs, .mob-goals, .mob-forecast, .mob-bottom { display: flex; }
|
|
|
|
|
|
.mob-goals, .mob-forecast, .mob-form-screen { display: grid; }
|
|
|
|
|
|
.mob-forecast-hide { display: none !important; }
|
|
|
|
|
|
.desk-layout { grid-template-columns: 1fr; }
|
|
|
|
|
|
.kpi-row { grid-template-columns: 1fr; }
|
|
|
|
|
|
.mob-tabs {
|
|
|
|
|
|
display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; padding: 0.28rem;
|
2026-09-10 23:45:11 +03:30
|
|
|
|
background: #f1f5f9; border-radius: var(--radius);
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.mob-tabs button {
|
2026-09-12 01:33:07 +03:30
|
|
|
|
border: 0; border-radius: var(--radius); min-height: var(--control-h); height: var(--control-h); background: transparent; color: #64748b;
|
|
|
|
|
|
font-weight: 600; cursor: pointer;
|
2026-09-05 02:29:41 +03:30
|
|
|
|
}
|
2026-09-05 18:38:11 +03:30
|
|
|
|
.mob-tabs button.on { background: var(--teal); color: #fff; }
|
|
|
|
|
|
.mob-filter { flex: 1; }
|
|
|
|
|
|
.toolbar { flex-wrap: nowrap; }
|
2026-08-29 21:06:30 +03:30
|
|
|
|
}
|
|
|
|
|
|
</style>
|