feat(web): adopt vuesax icons and shared skeleton loading

Replace the inline SVG icon set with the vuesax linear pack, add skeleton primitives for loading states, and keep page scroll inside the app shell.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-05 14:46:35 +03:30
co-authored by Cursor
parent 41f310f3a2
commit 6c6e32e099
133 changed files with 9069 additions and 7416 deletions
+86 -84
View File
@@ -25,13 +25,13 @@ import {
Row as ARow,
Select as ASelect,
Space as ASpace,
Spin as ASpin,
Table as ATable,
Tag as ATag,
Typography,
} from 'ant-design-vue';
import type { TableColumnsType } from 'ant-design-vue';
import { FilterOutlined, PlusOutlined, SearchOutlined } from '@ant-design/icons-vue';
import { FilterOutlined, PlusOutlined, SearchOutlined } from '@/icons/ant-bridge';
import { CrmSkeleton, CrmSkeletonTable } from '@/components/skeleton';
const { Title: ATypographyTitle, Text: ATypographyText, Link: ATypographyLink } = Typography;
@@ -263,90 +263,92 @@ onMounted(load);
<a-alert v-if="error" type="error" show-icon :message="error" />
<a-spin :spinning="loading">
<a-card v-if="listEmpty" :bordered="false">
<a-empty
description="هنوز تیکتی ثبت نشده است. اولین درخواست پشتیبانی را ثبت کنید تا پیگیری‌ها اینجا جمع شوند."
>
<a-button type="primary" @click="goNew">
<template #icon><PlusOutlined /></template>
تیکت جدید
</a-button>
</a-empty>
</a-card>
<CrmSkeleton :loading="loading">
<CrmSkeletonTable :rows="8" :columns="6">
<a-card v-if="listEmpty" :bordered="false">
<a-empty
description="هنوز تیکتی ثبت نشده است. اولین درخواست پشتیبانی را ثبت کنید تا پیگیری‌ها اینجا جمع شوند."
>
<a-button type="primary" @click="goNew">
<template #icon><PlusOutlined /></template>
تیکت جدید
</a-button>
</a-empty>
</a-card>
<a-card v-else-if="!error" :bordered="false">
<a-flex justify="space-between" align="center" :gap="12" :style="{ marginBottom: '12px' }">
<a-typography-text strong>
{{ toFaDigits(items.length) }} تیکت
</a-typography-text>
<TableColumnsMenu table-key="tickets" align="end" />
</a-flex>
<a-card v-else-if="!error" :bordered="false">
<a-flex justify="space-between" align="center" :gap="12" :style="{ marginBottom: '12px' }">
<a-typography-text strong>
{{ toFaDigits(items.length) }} تیکت
</a-typography-text>
<TableColumnsMenu table-key="tickets" align="end" />
</a-flex>
<a-table
:columns="columns"
:data-source="items"
:pagination="false"
row-key="id"
:scroll="{ x: 720 }"
:custom-row="(record: TicketDto) => ({
style: record.slaBreached
? { background: 'var(--ant-color-error-bg)' }
: undefined,
onClick: () => goDetail(record.id),
})"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'موضوع'">
<a-typography-link @click.stop="goDetail((record as TicketDto).id)">
{{ (record as TicketDto).subject }}
</a-typography-link>
<a-table
:columns="columns"
:data-source="items"
:pagination="false"
row-key="id"
:scroll="{ x: 720 }"
:custom-row="(record: TicketDto) => ({
style: record.slaBreached
? { background: 'var(--ant-color-error-bg)' }
: undefined,
onClick: () => goDetail(record.id),
})"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'موضوع'">
<a-typography-link @click.stop="goDetail((record as TicketDto).id)">
{{ (record as TicketDto).subject }}
</a-typography-link>
</template>
<template v-else-if="column.key === 'شماره'">
<a-typography-text type="secondary">
{{ (record as TicketDto).number }}
</a-typography-text>
</template>
<template v-else-if="column.key === 'وضعیت'">
<a-tag
:color="statusTagColor((record as TicketDto).status)"
:bordered="false"
>
{{
statusLabel[(record as TicketDto).status as TicketStatus] ||
(record as TicketDto).status
}}
</a-tag>
</template>
<template v-else-if="column.key === 'اولویت'">
<a-tag
:color="priorityTagColor((record as TicketDto).priority)"
:bordered="false"
>
{{
priorityLabel[(record as TicketDto).priority as TicketPriority] ||
(record as TicketDto).priority
}}
</a-tag>
</template>
<template v-else-if="column.key === 'مشتری / مسئول'">
<a-typography-text type="secondary">
{{ personAssigneeText(record as TicketDto) }}
</a-typography-text>
</template>
<template v-else-if="column.key === 'SLA'">
<a-tag
v-if="slaText(record as TicketDto).text !== '—'"
:color="slaText(record as TicketDto).color"
:bordered="false"
>
{{ slaText(record as TicketDto).text }}
</a-tag>
<a-typography-text v-else type="secondary">—</a-typography-text>
</template>
</template>
<template v-else-if="column.key === 'شماره'">
<a-typography-text type="secondary">
{{ (record as TicketDto).number }}
</a-typography-text>
</template>
<template v-else-if="column.key === 'وضعیت'">
<a-tag
:color="statusTagColor((record as TicketDto).status)"
:bordered="false"
>
{{
statusLabel[(record as TicketDto).status as TicketStatus] ||
(record as TicketDto).status
}}
</a-tag>
</template>
<template v-else-if="column.key === 'اولویت'">
<a-tag
:color="priorityTagColor((record as TicketDto).priority)"
:bordered="false"
>
{{
priorityLabel[(record as TicketDto).priority as TicketPriority] ||
(record as TicketDto).priority
}}
</a-tag>
</template>
<template v-else-if="column.key === 'مشتری / مسئول'">
<a-typography-text type="secondary">
{{ personAssigneeText(record as TicketDto) }}
</a-typography-text>
</template>
<template v-else-if="column.key === 'SLA'">
<a-tag
v-if="slaText(record as TicketDto).text !== '—'"
:color="slaText(record as TicketDto).color"
:bordered="false"
>
{{ slaText(record as TicketDto).text }}
</a-tag>
<a-typography-text v-else type="secondary">—</a-typography-text>
</template>
</template>
</a-table>
</a-card>
</a-spin>
</a-table>
</a-card>
</CrmSkeletonTable>
</CrmSkeleton>
</a-flex>
</template>