diff --git a/app/src/plugins/tm@modal/task/z-task-modal.vue b/app/src/plugins/tm@modal/task/z-task-modal.vue index 6035fda..a409585 100644 --- a/app/src/plugins/tm@modal/task/z-task-modal.vue +++ b/app/src/plugins/tm@modal/task/z-task-modal.vue @@ -888,11 +888,24 @@ export default { throw new Error('subtaskData is null or undefined'); } } catch (error) { + // Initialize with current logged-in employee + const currentUserId = this.$store.getters['auth/user']?.id; + const currentEmployee = currentUserId + ? this.enrichedEmployees.find((emp) => emp.id === currentUserId) + : null; + this.subtask = { master_task: mastertask, - employees: [{}], + employees: currentEmployee + ? [{ id: currentEmployee.id, duration: null }] + : [{}], _deadline_time: '17:00', }; + + // Add a timeblock for the current user if they exist + if (currentUserId) { + this.addTimeblock(currentUserId); + } } if (