feat(person): migrate birth/death year to LocalDate + DatePrecision (#773) #812

Merged
marcel merged 16 commits from feat/issue-773-person-birth-death-localdate into main 2026-06-12 21:49:17 +02:00
5 changed files with 12 additions and 1 deletions
Showing only changes of commit f2f9006548 - Show all commits

View File

@@ -10,6 +10,8 @@ const personFactory = (id: string, displayName: string) => ({
lastName: displayName.split(' ').slice(1).join(' ') || displayName,
displayName,
personType: 'PERSON' as const,
birthDatePrecision: 'UNKNOWN' as const,
deathDatePrecision: 'UNKNOWN' as const,
familyMember: false,
provisional: false
});

View File

@@ -143,6 +143,8 @@ describe('ReaderRecentDocs', () => {
firstName: 'Anna',
displayName: 'Anna Müller',
personType: 'PERSON' as const,
birthDatePrecision: 'UNKNOWN' as const,
deathDatePrecision: 'UNKNOWN' as const,
familyMember: false,
provisional: false
}

View File

@@ -19,6 +19,8 @@ const makePerson = (id: string, name: string, overrides: Partial<Person> = {}):
lastName: parts.slice(1).join(' ') || name,
displayName: name,
personType: 'PERSON',
birthDatePrecision: 'UNKNOWN',
deathDatePrecision: 'UNKNOWN',
familyMember: false,
provisional: false,
...overrides

View File

@@ -50,7 +50,8 @@ const ANNA: Person = {
familyMember: false,
provisional: false,
birthDate: '1860-01-01',
birthDatePrecision: 'YEAR'
birthDatePrecision: 'YEAR',
deathDatePrecision: 'UNKNOWN'
};
function mockFetchWithPersons(persons: Person[] = [AUGUSTE, ANNA]) {

View File

@@ -288,6 +288,8 @@ describe('DocumentList undated badge in person grouping', () => {
lastName: 'Mustermann',
displayName: 'Max Mustermann',
personType: 'PERSON' as const,
birthDatePrecision: 'UNKNOWN' as const,
deathDatePrecision: 'UNKNOWN' as const,
familyMember: false,
provisional: false
};
@@ -296,6 +298,8 @@ describe('DocumentList undated badge in person grouping', () => {
lastName: 'Brandt',
displayName: 'Felix Brandt',
personType: 'PERSON' as const,
birthDatePrecision: 'UNKNOWN' as const,
deathDatePrecision: 'UNKNOWN' as const,
familyMember: false,
provisional: false
};