Feat(office365) Finished connection to API

This commit is contained in:
Matej Glasnák committed 2024-11-19 12:06:19 +01:00
1 parent a4941e511f
commit 5bf90cff14
8 files changed
+35 -31

No files matched your search

@@ -16,8 +16,7 @@
</td>
<td class="task-action">
<div class="d-flex justify-start align-center">
<!-- TODO office365: Only for office365 events -->
<template v-if="true">
<template v-if="subtasks.type == 'office365'">
<img class="pencil-icon ml-2" :src="eye" alt="pencil-icon" @click.stop="openTaskModal(subtask)" />
<img class="office-icon" :src="office365" />
</template>
@@ -271,6 +271,7 @@ export default {
this.mastertask = await this.$axios.get_auth_data(`v1/mastertasks/${mastertask.id}`)
// TODO zmazat ked zacne prichadzat project_id a team_id
console.log('1', this.mastertask)
const project = this.projects.find((project) => project.code == this.mastertask.project_code)
this.mastertask.project_id = project?.id || null
this.mastertask.team_id = this.mastertask.team?.id || null
@@ -121,8 +121,7 @@ export default {
computed: {
...mapGetters('tm', ['mastertasks']),
isOffice365Task() {
// TODO office365: Only for office365 events
return true
return this.subtask.type == 'office365'
}
},
@@ -195,6 +194,7 @@ export default {
async toggleTimeblockIsFinished(originalTimeblock) {
// TODO: Pridat odpracovany cas modal?
console.log('toggleTimeblockIsFinished 5', this.subtask)
const subtask = JSON.parse(JSON.stringify(this.subtask))
const timeblock = JSON.parse(JSON.stringify(originalTimeblock))
@@ -230,6 +230,7 @@ export default {
this.subtask = this._enrichTask(data)
// TODO: Remove? riesil som neodstranovanie jedineho zanamu v trvani a odpracovanom case
console.log('2', this.subtask)
this.$forceUpdate()
})
@@ -240,11 +241,10 @@ export default {
methods: {
toggleEditMode() {
// TODO office365: Only for office365 events
return this.$events.emit('show-unable-to-edit-office-task-modal', { mode: 'edit' })
if (this.subtask.type == 'office365')
return this.$events.emit('show-unable-to-edit-office-task-modal', { mode: 'edit' })
// this.editMode = !this.editMode
this.editMode = !this.editMode
},
openDatepicker(ref) {
@@ -393,9 +393,10 @@ export default {
},
openDeleteTaskModal(subtask) {
// TODO office365: Only for office365 events
this.$events.emit('show-unable-to-edit-office-task-modal', { mode: 'delete' })
// this.$events.emit('show-delete-task-modal', { subtask })
if (subtask.type == 'office365')
return this.$events.emit('show-unable-to-edit-office-task-modal', { mode: 'delete' })
this.$events.emit('show-delete-task-modal', { subtask })
},
showCompleteTaskModal() {