feat(member): add household lifecycle states

This commit is contained in:
2026-03-11 13:44:38 +04:00
parent 015298281c
commit 773abf2531
32 changed files with 3671 additions and 38 deletions

View File

@@ -99,6 +99,7 @@ function createRepositoryStub() {
householdId: input.householdId,
telegramUserId: input.telegramUserId,
displayName: input.displayName,
status: input.status ?? 'active',
preferredLocale: input.preferredLocale ?? null,
householdDefaultLocale: household.defaultLocale,
rentShareWeight: 1,
@@ -133,6 +134,7 @@ function createRepositoryStub() {
householdId: pending.householdId,
telegramUserId: pending.telegramUserId,
displayName: pending.displayName,
status: 'active',
preferredLocale: null,
householdDefaultLocale: household.defaultLocale,
rentShareWeight: 1,
@@ -198,6 +200,9 @@ function createRepositoryStub() {
},
async updateHouseholdMemberRentShareWeight() {
return null
},
async updateHouseholdMemberStatus() {
return null
}
}
@@ -325,6 +330,7 @@ describe('createHouseholdOnboardingService', () => {
id: 'member-42',
householdId: 'household-1',
displayName: 'Stan',
status: 'active',
preferredLocale: null,
householdDefaultLocale: 'ru',
rentShareWeight: 1,
@@ -340,6 +346,7 @@ describe('createHouseholdOnboardingService', () => {
householdId: 'household-1',
telegramUserId: '42',
displayName: 'Stan',
status: 'active',
preferredLocale: null,
householdDefaultLocale: 'ru',
rentShareWeight: 1,
@@ -358,6 +365,7 @@ describe('createHouseholdOnboardingService', () => {
householdId: 'household-2',
telegramUserId: '42',
displayName: 'Stan elsewhere',
status: 'active',
preferredLocale: null,
householdDefaultLocale: 'ru',
rentShareWeight: 1,