From b1990334b98cba507eda8cea7bfc16a93e38b6b5 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Tue, 31 Mar 2026 12:09:55 +0200 Subject: [PATCH] feat(falukant): enhance relationship state handling and director updates - Updated FalukantService to return user information alongside relationship state for improved context in relationship management. - Modified DirectorInfo component to trigger a refresh when a new director is hired, ensuring up-to-date information. - Added socket event handling for 'directorchanged' in BranchView to manage director updates effectively, enhancing real-time responsiveness in the application. --- backend/services/falukantService.js | 4 ++-- frontend/src/components/falukant/DirectorInfo.vue | 2 +- frontend/src/views/falukant/BranchView.vue | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/services/falukantService.js b/backend/services/falukantService.js index 69829ce..5547926 100644 --- a/backend/services/falukantService.js +++ b/backend/services/falukantService.js @@ -3876,7 +3876,7 @@ class FalukantService extends BaseService { throw { status: 400, message: 'relationshipId is required' }; } - const { state } = await this.getOwnedLoverRelationState(hashedUserId, parsedRelationshipId); + const { user, state } = await this.getOwnedLoverRelationState(hashedUserId, parsedRelationshipId); const updateData = { acknowledged: true }; if (state.loverRole === 'secret_affair' || !state.loverRole) { updateData.loverRole = 'lover'; @@ -3897,7 +3897,7 @@ class FalukantService extends BaseService { throw { status: 400, message: 'relationshipId is required' }; } - const { state } = await this.getOwnedLoverRelationState(hashedUserId, parsedRelationshipId); + const { user, state } = await this.getOwnedLoverRelationState(hashedUserId, parsedRelationshipId); await state.update({ active: false, acknowledged: false diff --git a/frontend/src/components/falukant/DirectorInfo.vue b/frontend/src/components/falukant/DirectorInfo.vue index 8c74712..b0703f0 100644 --- a/frontend/src/components/falukant/DirectorInfo.vue +++ b/frontend/src/components/falukant/DirectorInfo.vue @@ -178,7 +178,7 @@ - +