diff --git a/attached_assets/Pasted--User-related-Environment-related-Registries-Logs-Notifications-Settings-New--1754937215668_1754937215668.txt b/attached_assets/Pasted--User-related-Environment-related-Registries-Logs-Notifications-Settings-New--1754937215668_1754937215668.txt new file mode 100644 index 0000000..788693b --- /dev/null +++ b/attached_assets/Pasted--User-related-Environment-related-Registries-Logs-Notifications-Settings-New--1754937215668_1754937215668.txt @@ -0,0 +1,206 @@ + + +User-related + + +Environment-related + +Registries + +Logs + +Notifications + +Settings + +New version available 2.27.9 +DismissSee what's new +Community Edition +2.27.6 LTS +Containers>logiflow-logiflow-1>Logs +Container logs + + +admin +Log viewer settings +Auto-refresh logs +Wrap lines +Display timestamps +Fetch +All logs +Search +Filter... +Lines +100 +Actions + + + + +🔗 Database initialization: { + + NODE_ENV: 'production', + + isProduction: true, + + hasDbUrl: true, + + dbHost: 'logiflow-db' + +} + +🐳 PRODUCTION: Using standard PostgreSQL + +✅ PostgreSQL connection test successful + +🐳 PRODUCTION: Using PostgreSQL storage + +🐳 PRODUCTION: Local auth configured with PostgreSQL sessions + +🐳 PRODUCTION: Starting LogiFlow application + +🐳 Environment: { NODE_ENV: 'production', DATABASE_URL: 'Present', PORT: '3000' } + +🔍 Using development storage and authentication + +🔧 Using memory session store for development + +🐳 Serving static files from: /app/dist/public + +Warning: connect.session() MemoryStore is not + +designed for a production environment, as it will leak + +memory, and will not scale past a single process. + +🐳 PRODUCTION: LogiFlow serving on port 3000 + +✅ Production admin user found: { id: 'admin_local', username: 'admin', passwordFormat: 'present' } + +🔐 Production password comparison { suppliedLength: 5, storedFormat: '63d2ce518b...' } + +✅ Password matched with hash.salt format + +✅ Admin password works with current system + +HEAD /api/health 200 in 5ms + +📄 SPA: Serving index.html for /users + +GET /api/user 304 in 8ms + +GET /api/user 304 in 5ms + +GET /api/user 304 in 6ms + +GET /api/user 304 in 6ms + +GET /api/groups 304 in 16ms + +GET /api/roles 304 in 33ms + +🔍 getUsersWithRolesAndGroups called + +📊 Base users found: 7 + +🔍 Processing user: admin + +🔍 Processing user: ff292 + +🔍 Processing user: Rudolph + +🔍 Processing user: ff579 + +🔍 Processing user: ff579m + +🔍 Processing user: Nicolas + +🔍 Processing user: AnneLaure + +📊 getUserWithRoles(_1754936203292): { userRoleDataLength: 0 } + +📊 getUserWithRoles(admin_local): { userRoleDataLength: 1 } + +📊 User ff292 groups: 0 + +📊 User admin groups: 0 + +📊 getUserWithRoles(_1753340243216): { userRoleDataLength: 0 } + +📊 getUserWithRoles(directionfrouard_1753264272043): { userRoleDataLength: 0 } + +📊 getUserWithRoles(_1753266881822): { userRoleDataLength: 0 } + +📊 getUserWithRoles(_1753266816257): { userRoleDataLength: 0 } + +📊 User Rudolph groups: 1 + +📊 getUserWithRoles(_1753266851515): { userRoleDataLength: 0 } + +📊 User AnneLaure groups: 1 + +📊 User ff579 groups: 1 + +📊 User Nicolas groups: 1 + +📊 User ff579m groups: 1 + +🔍 Final users with roles and groups: 7 + +🔐 API /api/users - Returning: { isArray: true, length: 7 } + +GET /api/users 304 in 126ms + +PUT /api/users/_1754936203292 200 in 15ms + +🔍 getUsersWithRolesAndGroups called + +📊 Base users found: 7 + +🔍 Processing user: admin + +🔍 Processing user: ff292 + +🔍 Processing user: Rudolph + +🔍 Processing user: ff579 + +🔍 Processing user: ff579m + +🔍 Processing user: Nicolas + +🔍 Processing user: AnneLaure + +📊 getUserWithRoles(admin_local): { userRoleDataLength: 1 } + +📊 getUserWithRoles(_1754936203292): { userRoleDataLength: 0 } + +📊 getUserWithRoles(_1753266851515): { userRoleDataLength: 0 } + +📊 getUserWithRoles(_1753266881822): { userRoleDataLength: 0 } + +📊 getUserWithRoles(directionfrouard_1753264272043): { userRoleDataLength: 0 } + +📊 getUserWithRoles(_1753266816257): { userRoleDataLength: 0 } + +📊 User admin groups: 0 + +📊 User ff292 groups: 0 + +📊 getUserWithRoles(_1753340243216): { userRoleDataLength: 0 } + +📊 User Rudolph groups: 1 + +📊 User Nicolas groups: 1 + +📊 User ff579m groups: 1 + +📊 User ff579 groups: 1 + +📊 User AnneLaure groups: 1 + +🔍 Final users with roles and groups: 7 + +🔐 API /api/users - Returning: { isArray: true, length: 7 } + +GET /api/users 200 in 40ms \ No newline at end of file diff --git a/attached_assets/image_1754937206418.png b/attached_assets/image_1754937206418.png new file mode 100644 index 0000000..7be6cfa Binary files /dev/null and b/attached_assets/image_1754937206418.png differ diff --git a/client/src/pages/Users.tsx b/client/src/pages/Users.tsx index dc30a90..09cc505 100644 --- a/client/src/pages/Users.tsx +++ b/client/src/pages/Users.tsx @@ -455,9 +455,16 @@ export default function UsersPage() { }; const handleEditUser = (userData: UserWithGroups) => { - // Convert the single 'name' field to firstName/lastName - const [firstName = '', ...lastNameParts] = (userData.name || '').split(' '); - const lastName = lastNameParts.join(' '); + // Priority: use firstName/lastName if available, fallback to splitting 'name' field + let firstName = userData.firstName || ''; + let lastName = userData.lastName || ''; + + // If no firstName/lastName but we have a 'name' field, try to split it + if (!firstName && !lastName && userData.name) { + const [firstPart = '', ...lastNameParts] = userData.name.split(' '); + firstName = firstPart; + lastName = lastNameParts.join(' '); + } const userWithNames = { ...userData, diff --git a/replit.md b/replit.md index 240183d..e8a2529 100644 --- a/replit.md +++ b/replit.md @@ -100,4 +100,18 @@ Preferred communication style: Simple, everyday language. - Removed required validation from edit form firstName/lastName fields - Updated placeholders to indicate "(optionnel)" for consistency - Maintained database schema where name fields are already optional -- **Result**: Name fields now consistently optional across all user management interfaces \ No newline at end of file +- **Result**: Name fields now consistently optional across all user management interfaces + +#### User Edit Form Initialization Fix +- **Issue**: Prénom/nom fields in edit form were not editable because they were initialized from wrong data source +- **Root Cause**: handleEditUser was only using the `name` field instead of `firstName`/`lastName` fields from database +- **Solution Implemented**: + - Modified handleEditUser to prioritize `firstName`/`lastName` fields from database + - Added fallback to split `name` field if firstName/lastName are empty + - Fixed edit form initialization to use actual database values +- **Result**: Edit form now properly loads existing firstName/lastName values and allows editing + +#### Email Field Consistency in Edit Form +- **Issue**: Email field was marked as required in edit form but optional in create form +- **Solution**: Removed `required` attribute and asterisk from email field in edit form +- **Result**: Email field now consistently optional in both create and edit forms \ No newline at end of file