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

@@ -7,13 +7,12 @@
</div>
</div>
<div v-else-if="['subtask', 'blocker', 'adhoc', 'vacation', 'free_day'].includes(event.type)" class="custom-event-body colWidth h-100 d-flex flex-column justify-space-between" :class="subtaskCssClass" :style="{ backgroundColor: event._timeblock_is_finished || event.subtask?.is_finished ? '#dedfe0' : event.color || event.subtask?.color }">
<div v-else-if="['subtask', 'blocker', 'adhoc', 'vacation', 'free_day', 'office365'].includes(event.type)" class="custom-event-body colWidth h-100 d-flex flex-column justify-space-between" :class="subtaskCssClass" :style="{ backgroundColor: event._timeblock_is_finished || event.subtask?.is_finished ? '#dedfe0' : event.color || event.subtask?.color }">
<div class="event-content" :class="{ 'is-blocker': props.event.isBlocker }">
<template v-if="props.event.type == 'subtask'">
<template v-if="['subtask', 'office365'].includes(event.type)">
<small v-if="props.event.subtask.project_code" class="project-code">{{ props.event.subtask.project_code }}</small>
<h3>{{ props.event.subtask.title ?? props.event.subtask.master_task?.name ?? props.event.subtask.master_task }}</h3>
</template>
<template v-else>
<v-tooltip :text="event.blocker?.approved ? 'Schválený' : 'Neschválený'" location="bottom">
<template v-slot:activator="{ props }">
@@ -31,7 +30,7 @@
<small class="event-initials-date">{{ props.event.date?.toLocaleDateString('sk-SK') }}</small>
</div>
<div v-if="event.type == 'subtask'" class="d-flex align-center">
<div v-if="['subtask', 'office365'].includes(event.type)" class="d-flex align-center">
<v-icon icon="mdi-skull-outline" size="small" />
<small v-if="props.event?.subtask.deadline" class="ml-1">{{ deadline }}</small>
<v-tooltip v-else text="Deadline z Mastertasku" location="bottom">
@@ -73,10 +72,8 @@
import { bin, checkmarkDouble, checkmark, eye, pencil, office365 } from '@/plugins/app/_img'
import { computed, ComputedRef, defineProps, defineEmits, getCurrentInstance } from 'vue'
const instance = getCurrentInstance()
const props = defineProps<{
event: any // TODO office365: Define type
event: any
}>()
const emits = defineEmits<{
@@ -110,7 +107,7 @@ const subtaskCssClass: ComputedRef<string> = computed(() => {
})
const isOfficeEvent: ComputedRef<boolean> = computed(() => {
return true
return props.event.type === 'office365'
})
</script>