This commit is contained in:
Kseninia Mikhaylova 2024-07-19 14:59:33 +03:00
parent c3fafd5645
commit 857244f3fc
2 changed files with 18 additions and 20 deletions

View File

@ -53,13 +53,14 @@ const columns = [
<span class="inv_inner_name">
{{ el.field.name }}:
</span>
<span :class="['inv_inner_text', { 'inv_inner__error': !el.text }]">
{{ el.text || 'Нет расшифровки' }}
<span class="inv_inner_text" v-if="el.text">
{{ el.text }}
</span>
<span :class="['inv_inner_image', { 'inv_inner__error': !el.file_id }]">
<GetImage :file_id="el.file_id" v-if="el.file_id" />
<span v-else>Нет изображения</span>
<UBadge color="gray" v-else>no text</UBadge>
<span class="inv_inner_image" v-if="el.file_id">
<GetImage :file_id="el.file_id" />
</span>
<UBadge color="gray" v-else>no img</UBadge>
</li>
</ul>
</div>
@ -90,6 +91,7 @@ table {
content: counter(inv) "."
}
}
.inv_inner {
>* {
@apply mr-2;

View File

@ -39,7 +39,17 @@ declare global {
name: string
created_at: string
updated_at: string
tmc: number[]
tmc: {
id: number,
name?: string,
tmc: TmcItem,
field: {
id?: number
text?: string
file_id?: string
fields: TmcField
}[]
}[]
uniq?: any[]
}
@ -50,19 +60,5 @@ declare global {
previous?: any;
results: T[]
};
type ApiTypeTmc = {
count: number;
next?: any;
previous?: any;
results: TmcItem[]
}
type ApiTypeTgItem = {
count: number;
next?: any;
previous?: any;
results: TgItem[]
}
}
export { }