fix(web): clear vue-tsc errors blocking push

Type attendance rows, remove unused symbols, and harden list item typing after the Ant settings migration.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-04 10:05:29 +03:30
co-authored by Cursor
parent cb3a488b21
commit a319085dca
5 changed files with 20 additions and 20 deletions
@@ -295,6 +295,13 @@ function setRole(userId: string, role: unknown) {
}; };
} }
function teamMembersLabel(team: TeamDto) {
if (!team.members.length) return 'بدون عضو';
return team.members
.map((m) => `${m.fullName}${m.role === 'manager' ? ' (سرپرست)' : ''}`)
.join('، ');
}
async function saveMembers() { async function saveMembers() {
if (!editingId.value) return; if (!editingId.value) return;
saving.value = true; saving.value = true;
@@ -455,15 +462,7 @@ onMounted(() => {
</template> </template>
<template #description> <template #description>
<a-typography-text type="secondary"> <a-typography-text type="secondary">
{{ t.description || 'بدون توضیح' }} {{ t.description || 'بدون توضیح' }} · {{ teamMembersLabel(t) }}
·
{{
t.members.length
? t.members
.map((m) => `${m.fullName}${m.role === 'manager' ? ' (سرپرست)' : ''}`)
.join('، ')
: 'بدون عضو'
}}
</a-typography-text> </a-typography-text>
</template> </template>
</a-list-item-meta> </a-list-item-meta>
+1 -1
View File
@@ -20,7 +20,7 @@ import {
import type { TableColumnsType } from 'ant-design-vue'; import type { TableColumnsType } from 'ant-design-vue';
import { DownloadOutlined } from '@ant-design/icons-vue'; import { DownloadOutlined } from '@ant-design/icons-vue';
const { Title: ATypographyTitle, Text: ATypographyText, Link: ATypographyLink } = Typography; const { Title: ATypographyTitle, Link: ATypographyLink } = Typography;
type Row = NoteAttachmentDto & { type Row = NoteAttachmentDto & {
noteId: string; noteId: string;
@@ -93,6 +93,14 @@ function entityTagColor(entity: CustomFieldEntity) {
return 'blue'; return 'blue';
} }
function entityLabelOf(field: CustomFieldDefinitionDto) {
return entityLabels[field.entityType];
}
function typeLabelOf(field: CustomFieldDefinitionDto) {
return typeLabels[field.fieldType];
}
function fieldDescription(field: CustomFieldDefinitionDto) { function fieldDescription(field: CustomFieldDefinitionDto) {
const parts = [`کلید سیستمی: ${field.key}`]; const parts = [`کلید سیستمی: ${field.key}`];
if (field.options?.length) parts.push(`گزینه‌ها: ${field.options.join('، ')}`); if (field.options?.length) parts.push(`گزینه‌ها: ${field.options.join('، ')}`);
@@ -264,9 +272,9 @@ onMounted(load);
<a-space wrap> <a-space wrap>
<a-typography-text strong>{{ item.label }}</a-typography-text> <a-typography-text strong>{{ item.label }}</a-typography-text>
<a-tag :color="entityTagColor(item.entityType)" :bordered="false"> <a-tag :color="entityTagColor(item.entityType)" :bordered="false">
{{ entityLabels[item.entityType] }} {{ entityLabelOf(item) }}
</a-tag> </a-tag>
<a-tag :bordered="false">{{ typeLabels[item.fieldType] }}</a-tag> <a-tag :bordered="false">{{ typeLabelOf(item) }}</a-tag>
<a-tag v-if="item.required" color="error" :bordered="false">اجباری</a-tag> <a-tag v-if="item.required" color="error" :bordered="false">اجباری</a-tag>
<a-tag :color="item.isActive ? 'success' : 'default'" :bordered="false"> <a-tag :color="item.isActive ? 'success' : 'default'" :bordered="false">
{{ item.isActive ? 'فعال' : 'غیرفعال' }} {{ item.isActive ? 'فعال' : 'غیرفعال' }}
@@ -29,7 +29,7 @@ import {
WarningOutlined, WarningOutlined,
} from '@ant-design/icons-vue'; } from '@ant-design/icons-vue';
const { Title: ATypographyTitle, Text: ATypographyText } = Typography; const { Title: ATypographyTitle } = Typography;
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
@@ -129,13 +129,6 @@ const userOptions = computed(() => [
.map((u) => ({ value: u.id, label: u.fullName })), .map((u) => ({ value: u.id, label: u.fullName })),
]); ]);
const greeting = computed(() => {
if (!viewingSelf.value) {
const u = users.value.find((x) => x.id === userId.value);
return u ? `کارهای امروز ${u.fullName}` : 'کارهای امروز';
}
return 'امروز چه کارهایی داری؟';
});
</script> </script>
<template> <template>