Refactor medication model to use blisters and pills instead of strips and tabs

- Updated medication schema to replace stripsPerPack and tabsPerStrip with blistersPerPack and pillsPerBlister.
- Adjusted medication routes to handle new blister and pill structure, including calculations for total pills.
- Modified frontend components to reflect changes in medication data structure and ensure compatibility with new backend logic.
- Updated reminder scheduler and share routes to utilize the new medication model.
- Enhanced Docker configuration for better permissions handling during development.
This commit is contained in:
Daniel Volz
2025-12-29 19:18:14 +01:00
parent dc0e364830
commit 666306b416
26 changed files with 169 additions and 492 deletions
-6
View File
@@ -254,12 +254,6 @@ async function findOrCreateOIDCUser(
// User already has a DIFFERENT OIDC subject - create new user with suffix
username = `${username}_sso`;
console.log(`[OIDC] Username collision (different OIDC subject), using: ${username}`);
} else if (existingByUsername.authProvider === "oidc" && !existingByUsername.oidcSubject) {
// Legacy OIDC user without subject - update it
await db.update(users)
.set({ oidcSubject: oidcSubject })
.where(eq(users.id, existingByUsername.id));
return { id: existingByUsername.id, username: existingByUsername.username };
}
}