mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-20 13:38:15 +02:00
Update user profile to allow optional email and correct name updates
Fix bug where email was mandatory on user profile updates and ensure last name field updates correctly. Replit-Commit-Author: Agent Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/vetH0Gp
This commit is contained in:
1 parent
d85d62a5da
commit
a3b457f990
3 files changed
+3
-4
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 234 KiB |
@@ -917,14 +917,13 @@ export default function UsersPage() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Label htmlFor="edit-email">Email *</Label>
|
<Label htmlFor="edit-email">Email</Label>
|
||||||
<Input
|
<Input
|
||||||
id="edit-email"
|
id="edit-email"
|
||||||
type="email"
|
type="email"
|
||||||
value={editForm.email}
|
value={editForm.email}
|
||||||
onChange={(e) => setEditForm({...editForm, email: e.target.value})}
|
onChange={(e) => setEditForm({...editForm, email: e.target.value})}
|
||||||
placeholder="email@exemple.com"
|
placeholder="email@exemple.com (optionnel)"
|
||||||
required
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -937,7 +937,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
|||||||
role: z.enum(['admin', 'manager', 'employee']).optional(),
|
role: z.enum(['admin', 'manager', 'employee']).optional(),
|
||||||
firstName: z.string().optional(),
|
firstName: z.string().optional(),
|
||||||
lastName: z.string().optional(),
|
lastName: z.string().optional(),
|
||||||
email: z.string().email().optional(),
|
email: z.union([z.string().email(), z.literal("")]).optional(),
|
||||||
password: z.string().optional(),
|
password: z.string().optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user