Fix broken new person dialog (#868)

This commit is contained in:
David Straub
2025-12-15 16:20:15 +01:00
committed by GitHub
parent bf19148837
commit fd9ccfef0c
2 changed files with 14 additions and 3 deletions

View File

@@ -224,6 +224,7 @@ export const objectTypeToEndpoint = {
note: 'notes',
media: 'media',
tag: 'tags',
object: 'objects',
}
const eventTypeStrings = {

View File

@@ -13,6 +13,18 @@ function capitalize(string) {
return `${string.charAt(0).toUpperCase()}${string.slice(1)}`
}
const filtrableObjectTypes = [
'person',
'family',
'event',
'place',
'source',
'citation',
'repository',
'note',
'media',
]
export class GrampsjsViewSearch extends GrampsjsView {
static get styles() {
return [
@@ -81,9 +93,7 @@ export class GrampsjsViewSearch extends GrampsjsView {
this._page = 1
this._pages = -1
this._objectTypes = Object.fromEntries(
Object.keys(objectTypeToEndpoint)
.filter(key => key !== 'tag')
.map(key => [key, false])
filtrableObjectTypes.map(key => [key, false])
)
}