Add tier/type headers and filters to environments in browser

This commit is contained in:
Carlos Fernandez 2026-05-16 19:52:07 -04:00
parent d372f3df9b
commit 4828aab89e

View file

@ -70,6 +70,49 @@ export const typeConfig = {
} }
] ]
}, },
environments: {
columns: [
{
key: 'system.tier',
label: 'DAGGERHEART.GENERAL.Tiers.singular'
},
{
key: 'system.type',
label: 'DAGGERHEART.GENERAL.type',
format: type => {
if (!type) return '-';
return CONFIG.DH.ACTOR.environmentTypes[type].label;
}
}
],
filters: [
{
key: 'system.tier',
label: 'DAGGERHEART.GENERAL.Tiers.singular',
field: 'system.api.models.actors.DhEnvironment.schema.fields.tier'
},
{
key: 'system.type',
label: 'DAGGERHEART.GENERAL.type',
field: 'system.api.models.actors.DhEnvironment.schema.fields.type'
},
{
key: 'system.difficulty',
name: 'difficulty.min',
label: 'DAGGERHEART.UI.ItemBrowser.difficultyMin',
field: 'system.api.models.actors.DhEnvironment.schema.fields.difficulty',
operator: 'gte'
},
{
key: 'system.difficulty',
name: 'difficulty.max',
label: 'DAGGERHEART.UI.ItemBrowser.difficultyMax',
field: 'system.api.models.actors.DhEnvironment.schema.fields.difficulty',
operator: 'lte'
}
]
},
items: { items: {
columns: [ columns: [
{ {
@ -559,7 +602,8 @@ export const compendiumConfig = {
id: 'environments', id: 'environments',
keys: ['environments'], keys: ['environments'],
label: 'DAGGERHEART.UI.ItemBrowser.folders.environments', label: 'DAGGERHEART.UI.ItemBrowser.folders.environments',
type: ['environment'] type: ['environment'],
listType: 'environments'
}, },
beastforms: { beastforms: {
id: 'beastforms', id: 'beastforms',