Refactor trigger creation logic: Update the created_at and updated_at fields to use the election date instead of the current timestamp, ensuring accurate term end calculations. Enhance socket event handling in StatusBar component by implementing setup and teardown methods for improved event management and user notifications.

This commit is contained in:
Torsten Schulz (local)
2026-02-02 07:48:53 +01:00
parent 4bf1bc35ae
commit b648175205
3 changed files with 57 additions and 21 deletions

View File

@@ -3535,8 +3535,9 @@ class FalukantService extends BaseService {
firstName: firstNameObject.id,
});
updateFalukantUserMoney(falukantUser.id, -50, 'Baptism', falukantUser.id);
// Trigger status bar refresh for the user after baptism
notifyUser(hashedUserId, 'falukantUpdateStatus', {});
// Trigger status bar refresh (children count) and family view update
await notifyUser(hashedUserId, 'falukantUpdateStatus', {});
await notifyUser(hashedUserId, 'familychanged', {});
return { success: true };
} catch (error) {
throw new Error(error.message);