feat(web): add guided page tours and tighten shell chrome.
Ship first-visit Ant tours for core menus with replay help, role-list search for large orgs, and fixed 32px workspace tabs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -21,7 +21,14 @@ import {
|
||||
} from '@/components/ui';
|
||||
import UiIcon from '@/components/UiIcon.vue';
|
||||
import ExcelImportFlow from '@/components/ExcelImportFlow.vue';
|
||||
import type { PageHeaderMenuItem, PageHeaderTab, PageHeaderViewOption } from '@/components/page';
|
||||
import {
|
||||
FilterChips,
|
||||
PageHeader,
|
||||
type PageHeaderMenuItem,
|
||||
type PageHeaderTab,
|
||||
type PageHeaderViewOption,
|
||||
} from '@/components/page';
|
||||
import { useLandingTour } from '@/tours';
|
||||
import {
|
||||
AppstoreOutlined,
|
||||
FileExcelOutlined,
|
||||
@@ -29,6 +36,7 @@ import {
|
||||
UnorderedListOutlined,
|
||||
} from '@/icons/ant-bridge';
|
||||
import ActivitiesKanban from '@/components/activities/ActivitiesKanban.vue';
|
||||
import ActivityAccountBalances from '@/components/activities/ActivityAccountBalances.vue';
|
||||
import ActivityDeskFilters from '@/components/activities/ActivityDeskFilters.vue';
|
||||
import ActivityStagesManager from '@/components/activities/ActivityStagesManager.vue';
|
||||
import ActivityTypesManager from '@/components/activities/ActivityTypesManager.vue';
|
||||
@@ -63,7 +71,7 @@ import { useAuthStore } from '@/stores/auth';
|
||||
import { canMutateActivity } from '@/lib/activity-access';
|
||||
import { canManageSettings, canViewAllRecords } from '@/lib/roles';
|
||||
import { apiError } from '@/lib/routines';
|
||||
import { Drawer as ADrawer, message } from 'ant-design-vue';
|
||||
import { Card as ACard, Drawer as ADrawer, Flex as AFlex, message } from 'ant-design-vue';
|
||||
import { PAGE_SIZE_OPTIONS, usePageSize } from '@/lib/pageSize';
|
||||
import { registerTableColumns, useTableColumns } from '@/lib/tableColumns';
|
||||
import TableColumnsMenu from '@/components/TableColumnsMenu.vue';
|
||||
@@ -400,6 +408,10 @@ const data = computed(() => listQuery.data.value ?? null);
|
||||
const loading = computed(
|
||||
() => listQuery.isFetching.value && listQuery.data.value == null && viewMode.value === 'tabs',
|
||||
);
|
||||
const tourLoading = computed(
|
||||
() => listQuery.isFetching.value && listQuery.data.value == null,
|
||||
);
|
||||
const { replay: replayActivitiesTour } = useLandingTour('activities', tourLoading);
|
||||
const counts = computed<Record<TimeFilter, number>>(() => {
|
||||
const raw = timeCountsQuery.data.value;
|
||||
return {
|
||||
@@ -1306,9 +1318,11 @@ onUnmounted(() => {
|
||||
title="میز کار و فعالیتها"
|
||||
:icon="ScheduleOutlined"
|
||||
:count="stageCounts.total"
|
||||
tourable
|
||||
primary-label="فعالیت جدید"
|
||||
:menu-items="headerMenuItems"
|
||||
:tabs="viewMode === 'tabs' ? stageTabs : undefined"
|
||||
tabs-after-chips
|
||||
:active-tab="stage"
|
||||
searchable
|
||||
:search-placeholder="isMobile ? 'جستجو…' : 'جستجو در عنوان، مشتری، کارشناس، نوع فعالیت...'"
|
||||
@@ -1317,6 +1331,7 @@ onUnmounted(() => {
|
||||
:view="viewMode"
|
||||
@primary="activityModal = {}"
|
||||
@menu="onHeaderMenu"
|
||||
@tour="replayActivitiesTour"
|
||||
@update:active-tab="onHeaderTab"
|
||||
@update:search="onSearchInput"
|
||||
@search-submit="onSearch"
|
||||
@@ -1388,23 +1403,25 @@ onUnmounted(() => {
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<template #chips>
|
||||
<FilterChips
|
||||
v-if="showDeskTabs"
|
||||
label="میز"
|
||||
:options="deskOptions"
|
||||
:multiple="false"
|
||||
:show-all="false"
|
||||
:model-value="[desk]"
|
||||
@update:model-value="onDeskChips"
|
||||
/>
|
||||
<FilterChips
|
||||
label="زمان"
|
||||
:options="timeOptions"
|
||||
:multiple="false"
|
||||
:show-all="false"
|
||||
:model-value="[filter]"
|
||||
@update:model-value="onTimeChips"
|
||||
/>
|
||||
<a-flex data-tour="activities-desk-filters" align="center" wrap="wrap" :gap="8">
|
||||
<FilterChips
|
||||
v-if="showDeskTabs"
|
||||
label="میز"
|
||||
:options="deskOptions"
|
||||
:multiple="false"
|
||||
:show-all="false"
|
||||
:model-value="[desk]"
|
||||
@update:model-value="onDeskChips"
|
||||
/>
|
||||
<FilterChips
|
||||
label="زمان"
|
||||
:options="timeOptions"
|
||||
:multiple="false"
|
||||
:show-all="false"
|
||||
:model-value="[filter]"
|
||||
@update:model-value="onTimeChips"
|
||||
/>
|
||||
</a-flex>
|
||||
</template>
|
||||
</PageHeader>
|
||||
|
||||
@@ -1446,6 +1463,7 @@ onUnmounted(() => {
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div data-tour="activities-board">
|
||||
<ActivitiesKanban
|
||||
v-if="viewMode === 'board'"
|
||||
:stages="stages"
|
||||
@@ -1506,7 +1524,8 @@ onUnmounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-else>
|
||||
<a-card v-else :bordered="false">
|
||||
<a-flex vertical :gap="12">
|
||||
<div class="list-head">
|
||||
<strong>{{ filterLabel }} — {{ toFaDigits(total.toLocaleString('en-US')) }} فعالیت</strong>
|
||||
<div class="list-head-tools">
|
||||
@@ -1598,6 +1617,11 @@ onUnmounted(() => {
|
||||
{{ item.title }}
|
||||
</RouterLink>
|
||||
<p v-if="subtitle(item)" class="sub">{{ subtitle(item) }}</p>
|
||||
<ActivityAccountBalances
|
||||
v-if="item.accountBalance"
|
||||
:balance="item.accountBalance"
|
||||
compact
|
||||
/>
|
||||
<p v-if="item.tags?.length" class="row-tags">
|
||||
<span v-for="t in item.tags.slice(0, 3)" :key="t">#{{ t }}</span>
|
||||
<span v-if="item.tags.length > 3">+{{ toFaDigits(item.tags.length - 3) }}</span>
|
||||
@@ -1730,6 +1754,11 @@ onUnmounted(() => {
|
||||
<UiIcon name="star" :size="14" class="star" />
|
||||
</RouterLink>
|
||||
<p v-if="subtitle(item)" class="sub">{{ subtitle(item) }}</p>
|
||||
<ActivityAccountBalances
|
||||
v-if="item.accountBalance"
|
||||
:balance="item.accountBalance"
|
||||
compact
|
||||
/>
|
||||
<p class="meta-line">
|
||||
<span v-if="item.person">
|
||||
<UiIcon name="user" :size="13" />
|
||||
@@ -1816,7 +1845,9 @@ onUnmounted(() => {
|
||||
@update:page="setPage"
|
||||
@update:page-size="onPageSize"
|
||||
/>
|
||||
</template>
|
||||
</a-flex>
|
||||
</a-card>
|
||||
</div>
|
||||
|
||||
<Teleport to="body">
|
||||
<div
|
||||
@@ -2691,10 +2722,10 @@ h1 {
|
||||
}
|
||||
|
||||
.table {
|
||||
background: #fff;
|
||||
border-radius: var(--radius);
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
overflow: visible;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.thead,
|
||||
|
||||
Reference in New Issue
Block a user