mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[team calendar] prefill only one employee
This commit is contained in:
1 parent
89df5d7a11
commit
2f9e7eee71
4 files changed
+7
-8
No files matched your search
@@ -265,12 +265,12 @@ export default {
|
||||
const time = moment(dateFrom).format('HH:mm')
|
||||
|
||||
const isTeamCalendar = this.$route.name === 'Dashboard - Teams'
|
||||
const employees = isTeamCalendar ? JSON.parse(JSON.stringify(this.teams.find(team => team.id == localStorage.getItem('selectedTeam')).employees)) : [this.user]
|
||||
const employee = isTeamCalendar ? split.employee_id : this.user.id
|
||||
|
||||
this.$events.emit('show-menu-modal', {
|
||||
time: time,
|
||||
time,
|
||||
date: tmUtils.formatDateTimeForBackend(dateFrom),
|
||||
employees
|
||||
employee
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -314,7 +314,6 @@ export default {
|
||||
|
||||
computed: {
|
||||
...mapGetters("auth", ["user"]),
|
||||
...mapGetters('tm', ['teams']),
|
||||
// Drag & drop module.
|
||||
dnd () {
|
||||
return this.modules.dnd
|
||||
|
||||
@@ -349,7 +349,6 @@ export default {
|
||||
},
|
||||
|
||||
editTask({subtask}) {
|
||||
console.log('edit task')
|
||||
this.$events.emit('show-subtask-modal', {subtask})
|
||||
},
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
subtask: {
|
||||
deadline: this.localData.date,
|
||||
_deadline_time: this.localData.time,
|
||||
employees: this.localData.employees
|
||||
employee_id: this.localData.employee
|
||||
},
|
||||
onTaskCreated: () => {
|
||||
this.closeModal()
|
||||
|
||||
@@ -271,10 +271,11 @@ export default {
|
||||
} else {
|
||||
this.subtask = { master_task: mastertask, employees: [{}], _deadline_time: '17:00' }
|
||||
|
||||
if (subtask?.deadline && subtask._deadline_time && subtask.employees?.length) {
|
||||
if (subtask?.deadline && subtask._deadline_time && subtask.employee_id) {
|
||||
const employee = this.enrichedEmployees.find(employee => employee.id == subtask.employee_id)
|
||||
this.subtask.employees = [employee]
|
||||
this.subtask.deadline = subtask.deadline
|
||||
this.subtask._deadline_time = subtask._deadline_time
|
||||
this.subtask.employees = subtask.employees
|
||||
}
|
||||
|
||||
if(subtask?.master_task_id && subtask?.project_code) {
|
||||
|
||||
Reference in new issue
Block a user