Fix sorting to only enable backend-supported fields

This commit is contained in:
Mondo Diaz
2026-01-15 18:33:10 +00:00
parent 193e02baad
commit 8549956a5e
4 changed files with 1 additions and 10 deletions

View File

@@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Replaced project card grid with sortable data table on Home page for better handling of large project lists
- Replaced package card grid with sortable data table on Project page for consistency
- Replaced SortDropdown with table header sorting on Package page for consistency
- Enabled sorting on all table columns (except description) across Home, Project, and Package pages
- Enabled sorting on supported table columns (name, created, updated) via clickable headers
- Updated browser tab title to "Orchard" with custom favicon
- Improved pod naming: Orchard pods now named `orchard-{env}-server-*` for clarity (#51)

View File

@@ -234,7 +234,6 @@ function Home() {
{
key: 'visibility',
header: 'Visibility',
sortable: true,
render: (project) => (
<Badge variant={project.is_public ? 'public' : 'private'}>
{project.is_public ? 'Public' : 'Private'}
@@ -244,7 +243,6 @@ function Home() {
{
key: 'created_by',
header: 'Owner',
sortable: true,
className: 'cell-owner',
render: (project) => project.created_by,
},

View File

@@ -195,13 +195,11 @@ function PackagePage() {
{
key: 'artifact_size',
header: 'Size',
sortable: true,
render: (t: TagDetail) => <span>{formatBytes(t.artifact_size)}</span>,
},
{
key: 'artifact_content_type',
header: 'Type',
sortable: true,
render: (t: TagDetail) => (
<span className="content-type">{t.artifact_content_type || '-'}</span>
),
@@ -209,7 +207,6 @@ function PackagePage() {
{
key: 'artifact_original_name',
header: 'Filename',
sortable: true,
className: 'cell-truncate',
render: (t: TagDetail) => (
<span title={t.artifact_original_name || undefined}>{t.artifact_original_name || '-'}</span>

View File

@@ -327,25 +327,21 @@ function ProjectPage() {
{
key: 'format',
header: 'Format',
sortable: true,
render: (pkg) => <Badge variant="default">{pkg.format}</Badge>,
},
{
key: 'tag_count',
header: 'Tags',
sortable: true,
render: (pkg) => pkg.tag_count ?? '—',
},
{
key: 'artifact_count',
header: 'Artifacts',
sortable: true,
render: (pkg) => pkg.artifact_count ?? '—',
},
{
key: 'total_size',
header: 'Size',
sortable: true,
render: (pkg) =>
pkg.total_size !== undefined && pkg.total_size > 0 ? formatBytes(pkg.total_size) : '—',
},