mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[CR] sorting v-select, [bugy]
This commit is contained in:
1 parent
7c94f4c576
commit
4ed354904c
16 files changed
+195
-23
No files matched your search
@@ -182,8 +182,10 @@ export default {
|
||||
const date = addDays(this.calConfig.date, newSplit - 1)
|
||||
const start = date.setHours(Math.round(event.startTimeMinutes / 60), Math.round(event.startTimeMinutes % 60), 0)
|
||||
const end = date.setHours(Math.round(event.endTimeMinutes / 60), Math.round(event.endTimeMinutes % 60), 0)
|
||||
|
||||
const editedSubtask = {
|
||||
|
||||
const split = this.splits.find(split => split.id == newSplit )
|
||||
if(this.$route.name == 'Dashboard - Tasks') {
|
||||
const editedSubtask = {
|
||||
...event.subtask,
|
||||
timeblocks: [...event.subtask.timeblocks, {
|
||||
id: event._timeblock_id,
|
||||
@@ -196,7 +198,6 @@ export default {
|
||||
return timesheet
|
||||
})
|
||||
}
|
||||
|
||||
try {
|
||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${editedSubtask.id}`, editedSubtask)
|
||||
this.$events.emit('on-subtask-edited', subtask)
|
||||
@@ -206,6 +207,28 @@ export default {
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
}
|
||||
} else if(this.$route.name == 'Dashboard - Teams') {
|
||||
const editedSubtask = {
|
||||
...event.subtask,
|
||||
employee_id: split.employee_id,
|
||||
timeblocks: [...event.subtask.timeblocks, {
|
||||
id: event._timeblock_id,
|
||||
is_finished: 0,
|
||||
start: tmUtils.formatDateTimeForBackend(event.start),
|
||||
end: tmUtils.formatDateTimeForBackend(event.end)
|
||||
}],
|
||||
timesheets: event.subtask.timesheets.map((timesheet) => {
|
||||
delete timesheet.employee_name
|
||||
return timesheet
|
||||
})
|
||||
}
|
||||
try {
|
||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${editedSubtask.id}`, editedSubtask)
|
||||
this.$events.emit('on-subtask-edited', subtask)
|
||||
} catch (error) {
|
||||
this.$toast.error(error.message || error)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onReady() {
|
||||
|
||||
@@ -56,6 +56,7 @@ export default {
|
||||
days.push({
|
||||
id: index + 1,
|
||||
name: employee.name,
|
||||
employee_id: employee.id,
|
||||
fullname: `${employee.name} ${employee.surname}`,
|
||||
initials: employee.name.charAt(0).toUpperCase() + employee.surname.charAt(0).toUpperCase(),
|
||||
unscheduledTime: unscheduledTime > 0 ? (unscheduledTime / 60).toFixed(1) : 0,
|
||||
|
||||
Reference in new issue
Block a user