mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[team calendar] priradenie vsetkych celnov teamu z kalendaru
This commit is contained in:
1 parent
158be83345
commit
89df5d7a11
4 files changed
+10
-6
No files matched your search
@@ -264,10 +264,13 @@ export default {
|
|||||||
|
|
||||||
const time = moment(dateFrom).format('HH:mm')
|
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]
|
||||||
|
|
||||||
this.$events.emit('show-menu-modal', {
|
this.$events.emit('show-menu-modal', {
|
||||||
time: time,
|
time: time,
|
||||||
date: tmUtils.formatDateTimeForBackend(dateFrom),
|
date: tmUtils.formatDateTimeForBackend(dateFrom),
|
||||||
employee: this.user.id
|
employees
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -311,6 +314,7 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters("auth", ["user"]),
|
...mapGetters("auth", ["user"]),
|
||||||
|
...mapGetters('tm', ['teams']),
|
||||||
// Drag & drop module.
|
// Drag & drop module.
|
||||||
dnd () {
|
dnd () {
|
||||||
return this.modules.dnd
|
return this.modules.dnd
|
||||||
|
|||||||
@@ -349,6 +349,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
editTask({subtask}) {
|
editTask({subtask}) {
|
||||||
|
console.log('edit task')
|
||||||
this.$events.emit('show-subtask-modal', {subtask})
|
this.$events.emit('show-subtask-modal', {subtask})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -54,11 +54,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
createTask() {
|
createTask() {
|
||||||
|
console.log(this.localData.date, this.localData.time, this.localData.employees)
|
||||||
this.$events.emit('show-subtask-modal', {
|
this.$events.emit('show-subtask-modal', {
|
||||||
subtask: {
|
subtask: {
|
||||||
deadline: this.localData.date,
|
deadline: this.localData.date,
|
||||||
_deadline_time: this.localData.time,
|
_deadline_time: this.localData.time,
|
||||||
employee_id: this.localData.employee
|
employees: this.localData.employees
|
||||||
},
|
},
|
||||||
onTaskCreated: () => {
|
onTaskCreated: () => {
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
|
|||||||
@@ -241,7 +241,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async showModal({ subtask, editMode = false, mastertask = {} }) {
|
async showModal({ subtask, editMode = false, mastertask = {} }) {
|
||||||
console.log(subtask)
|
|
||||||
this.isSaving = false
|
this.isSaving = false
|
||||||
this.subtask = null
|
this.subtask = null
|
||||||
this.visible = true
|
this.visible = true
|
||||||
@@ -272,11 +271,10 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.subtask = { master_task: mastertask, employees: [{}], _deadline_time: '17:00' }
|
this.subtask = { master_task: mastertask, employees: [{}], _deadline_time: '17:00' }
|
||||||
|
|
||||||
if (subtask?.deadline && subtask._deadline_time && subtask.employee_id) {
|
if (subtask?.deadline && subtask._deadline_time && subtask.employees?.length) {
|
||||||
const employee = this.enrichedEmployees.find(employee => employee.id == subtask.employee_id)
|
|
||||||
this.subtask.employees = [employee]
|
|
||||||
this.subtask.deadline = subtask.deadline
|
this.subtask.deadline = subtask.deadline
|
||||||
this.subtask._deadline_time = subtask._deadline_time
|
this.subtask._deadline_time = subtask._deadline_time
|
||||||
|
this.subtask.employees = subtask.employees
|
||||||
}
|
}
|
||||||
|
|
||||||
if(subtask?.master_task_id && subtask?.project_code) {
|
if(subtask?.master_task_id && subtask?.project_code) {
|
||||||
|
|||||||
Reference in new issue
Block a user