Skip to content

Commit

Permalink
fix for the table sort (#3495)
Browse files Browse the repository at this point in the history
  • Loading branch information
asylves1 authored May 1, 2024
1 parent 8997665 commit 7649263
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@
:key="index"
:style="`width: ${getColumnWidth(col.field)}%`"
>
<template v-if="col.field !== 'username'" #body="{ data }">
<a
v-if="col.field === 'name'"
class="project-title-link"
@click.stop="emit('open-project', data.id)"
>
{{ data.name }}
</a>
<template #body="{ data }">
<template v-if="col.field === 'name'">
<a class="project-title-link" @click.stop="emit('open-project', data.id)">
{{ data.name }}
</a>
</template>
<tera-show-more-text
v-else-if="col.field === 'description'"
:text="data.description"
:lines="1"
/>
<template v-if="col.field === 'owner'">
<template v-if="col.field === 'userName'">
{{ data.userName ?? '--' }}
</template>
<div v-else-if="col.field === 'stats'" class="stats">
Expand All @@ -41,10 +39,10 @@
</span>
<span><i class="pi pi-share-alt mr-1" /> {{ data.metadata?.['models-count'] }}</span>
</div>
<template v-else-if="col.field === 'created'">
<template v-else-if="col.field === 'createdOn'">
{{ data.createdOn ? formatDdMmmYyyy(data.createdOn) : '--' }}
</template>
<template v-else-if="col.field === 'updated'">
<template v-else-if="col.field === 'updatedOn'">
{{ data.updatedOn ? formatDdMmmYyyy(data.updatedOn) : '--' }}
</template>
</template>
Expand Down
6 changes: 3 additions & 3 deletions packages/client/hmi-client/src/page/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ const projectsTabs = computed<{ title: string; projects: Project[] }[]>(() => [
const columns = ref([
{ field: 'name', header: 'Project title' },
{ field: 'description', header: 'Description' },
{ field: 'owner', header: 'Author' },
{ field: 'userName', header: 'Author' },
{ field: 'stats', header: 'Stats' },
{ field: 'created', header: 'Created on' },
{ field: 'updated', header: 'Last updated' }
{ field: 'createdOn', header: 'Created on' },
{ field: 'updatedOn', header: 'Last updated' }
]);
const selectedColumns = ref(columns.value);
Expand Down

0 comments on commit 7649263

Please sign in to comment.