mpre ui fixes
This commit is contained in:
@@ -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: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user