diff --git a/PROGRESS.md b/PROGRESS.md index 86e8a1b..2c1094e 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -71,7 +71,7 @@ - **`n`**: Open the "Add Task" modal from the main dashboard (disabled while typing in inputs). 24. **Drag-and-Drop Stability:** Fixed a bug where tasks would "disappear" if dropped in an invalid area. Tasks now remain visible at their original position if a drop is cancelled. 25. **User Deletion Safety:** Implemented a backend check to prevent deleting users who have assigned tasks or notes. Upgraded the frontend `ApiService` to correctly parse and display these descriptive error messages from the backend. -26. **Enhanced User Creation:** Added email and phone number fields to the "Add User" form in the workspace settings, ensuring full contact profiles are created for new team members. +26. **Enhanced User Management:** Admins can now manage full team profiles (Name, Role, Email, and Phone) during both user creation and inline editing in the Workspace settings. ### Phase 3: Advanced Features - **Real-time Notifications:** Explore WebSockets for task assignments. diff --git a/dashy.db b/dashy.db index d2bd065..784138b 100644 Binary files a/dashy.db and b/dashy.db differ diff --git a/screens.jsx b/screens.jsx index 6923b5a..86f17a0 100644 --- a/screens.jsx +++ b/screens.jsx @@ -1194,11 +1194,15 @@ function WorkspaceTab({ user, isAdmin, dbUsers = [], onSwitchUser, onCreateUser, const [editingUserId, setEditingUserId] = React.useState(null); const [editName, setEditName] = React.useState(''); const [editRole, setEditRole] = React.useState(''); + const [editEmail, setEditEmail] = React.useState(''); + const [editPhone, setEditPhone] = React.useState(''); const startEditing = (u) => { setEditingUserId(u.id); setEditName(u.name); setEditRole(u.role); + setEditEmail(u.email || ''); + setEditPhone(u.phone || ''); }; const cancelEditing = () => { @@ -1206,7 +1210,7 @@ function WorkspaceTab({ user, isAdmin, dbUsers = [], onSwitchUser, onCreateUser, }; const saveUserEdit = async (id) => { - await onUpdateUserRole(id, { name: editName, role: editRole }); + await onUpdateUserRole(id, { name: editName, role: editRole, email: editEmail, phone: editPhone }); setEditingUserId(null); }; @@ -1311,8 +1315,10 @@ function WorkspaceTab({ user, isAdmin, dbUsers = [], onSwitchUser, onCreateUser,