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
+10
-11
No files matched your search
@@ -257,7 +257,7 @@ export default {
|
||||
|
||||
onCellClick(DOMEvent, split) {
|
||||
if (DOMEvent.offsetY > 950 && DOMEvent.offsetY < 1700) {
|
||||
const dateFrom = split.date
|
||||
const dateFrom = split.date
|
||||
dateFrom.setHours(Math.floor(DOMEvent.offsetY / 100), 0, 0, 0)
|
||||
const dateTo = new Date(dateFrom)
|
||||
dateTo.setHours(dateFrom.getHours() + 1)
|
||||
@@ -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,
|
||||
date: tmUtils.formatDateTimeForBackend(dateFrom),
|
||||
employees
|
||||
this.$events.emit('show-menu-modal', {
|
||||
time,
|
||||
date: tmUtils.formatDateTimeForBackend(dateFrom),
|
||||
employee
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -314,7 +314,6 @@ export default {
|
||||
|
||||
computed: {
|
||||
...mapGetters("auth", ["user"]),
|
||||
...mapGetters('tm', ['teams']),
|
||||
// Drag & drop module.
|
||||
dnd () {
|
||||
return this.modules.dnd
|
||||
|
||||
Reference in new issue
Block a user