fix: Timesheet naming and todo auto-assign fixes
- Fix timesheet filename to use firstName-lastName format with username fallback - Remove auto-assign creator to todos (user must manually select assignees) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -209,16 +209,6 @@ export const createTodo = async (userId, data) => {
|
||||
await db.insert(todoUsers).values(todoUserInserts);
|
||||
}
|
||||
|
||||
// Auto-assign the creator to the todo so they can access it (if not already assigned)
|
||||
const creatorAlreadyAssigned = assignedUserIds && assignedUserIds.includes(userId);
|
||||
if (!creatorAlreadyAssigned) {
|
||||
await db.insert(todoUsers).values({
|
||||
todoId: newTodo.id,
|
||||
userId: userId,
|
||||
assignedBy: userId,
|
||||
});
|
||||
}
|
||||
|
||||
// Send push notifications to assigned users (excluding creator)
|
||||
if (assignedUserIds && Array.isArray(assignedUserIds) && assignedUserIds.length > 0) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user