mpre ui fixes

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-27 08:00:09 +00:00
parent 4482d2f4c4
commit 034c640601
17 changed files with 352 additions and 158 deletions

View File

@@ -245,56 +245,11 @@ export const createKeywordsPageConfig = (
},
{
...createdColumn,
label: 'Added',
sortable: true,
sortField: 'created_at',
render: (value: string) => formatRelativeDate(value),
},
// Optional columns - hidden by default
{
key: 'updated_at',
label: 'Updated',
sortable: true,
sortField: 'updated_at',
defaultVisible: false,
render: (value: string) => formatRelativeDate(value),
},
{
key: 'volume_override',
label: 'Volume Override',
sortable: true,
sortField: 'volume_override',
defaultVisible: false,
render: (value: number | null) => value ? value.toLocaleString() : '-',
},
{
key: 'difficulty_override',
label: 'Difficulty Override',
sortable: true,
sortField: 'difficulty_override',
defaultVisible: false,
align: 'center' as const,
render: (value: number | null) => {
if (value === null || value === undefined) return '-';
const difficultyNum = getDifficultyNumber(value);
return typeof difficultyNum === 'number' ? (
<Badge
color={
difficultyNum === 1 || difficultyNum === 2
? 'success'
: difficultyNum === 3
? 'warning'
: 'error'
}
variant={difficultyNum === 5 ? 'solid' : 'light'}
size="sm"
>
{difficultyNum}
</Badge>
) : (
difficultyNum
);
},
},
],
filters: [
{