diff --git a/app/dist/js/index.js b/app/dist/js/index.js index 5b91d50..c5cb639 100644 --- a/app/dist/js/index.js +++ b/app/dist/js/index.js @@ -455,7 +455,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var cor /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.json.stringify.js */ \"./node_modules/core-js/modules/es.json.stringify.js\");\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ \"./node_modules/core-js/modules/esnext.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/esnext.iterator.filter.js */ \"./node_modules/core-js/modules/esnext.iterator.filter.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/esnext.iterator.find.js */ \"./node_modules/core-js/modules/esnext.iterator.find.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ \"./node_modules/core-js/modules/esnext.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/plugins/tm@_utils/tm.utils */ \"./src/plugins/tm@_utils/tm.utils.ts\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _plugins_tm_modal_mixins_modal_mixin__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/plugins/tm@modal/_mixins/modal.mixin */ \"./src/plugins/tm@modal/_mixins/modal.mixin.ts\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm-bundler.js\");\n/* harmony import */ var _employees_a_employee_timeblock_vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../employees/a-employee-timeblock.vue */ \"./src/plugins/tm@modal/task/_components/employees/a-employee-timeblock.vue\");\n/* harmony import */ var _employees_a_employee_timeblock_timeline_vue__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../employees/a-employee-timeblock-timeline.vue */ \"./src/plugins/tm@modal/task/_components/employees/a-employee-timeblock-timeline.vue\");\n/* harmony import */ var _plugins_tm_utils_timeblock_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/plugins/tm@_utils/timeblock.utils */ \"./src/plugins/tm@_utils/timeblock.utils.ts\");\n/* provided dependency */ var console = __webpack_require__(/*! ./node_modules/console-browserify/index.js */ \"./node_modules/console-browserify/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n components: {\n AEmployeeTimeblock: _employees_a_employee_timeblock_vue__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n AEmployeeTimeblockTimeline: _employees_a_employee_timeblock_timeline_vue__WEBPACK_IMPORTED_MODULE_12__[\"default\"]\n },\n mixins: [_plugins_tm_modal_mixins_modal_mixin__WEBPACK_IMPORTED_MODULE_9__[\"default\"]],\n props: {\n timeblocks: {\n type: Array,\n required: true\n },\n subtask: {\n type: Object,\n required: true\n }\n },\n emits: ['update-subtask'],\n data() {\n return {\n tmUtils: _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n showModal: false,\n visible: false,\n // New timeblock for modal (used by a-employee-timeblock component)\n newTimeblock: {\n id: null,\n date: new Date(),\n starts_at_time: null,\n ends_at_time: null,\n employee_id: null\n },\n // Timeline constants\n START_HOUR: 0,\n END_HOUR: 24,\n HOUR_WIDTH: 60,\n HOUR_WIDTH_MOBILE: 50,\n // Existing timeblocks timeline data\n existingTimeblocksData: {} // { [index]: { tasks: [], loading: false } }\n };\n },\n computed: {\n ...(0,vuex__WEBPACK_IMPORTED_MODULE_10__.mapGetters)('tm', ['mastertasks', 'enrichedEmployees']),\n isOffice365Task() {\n return this.subtask.type == 'office365';\n },\n // Get employee data from subtask\n employee() {\n if (!this.subtask?.employee_id) return null;\n return this.subtask._employee || this.enrichedEmployees.find(emp => emp.id === this.subtask.employee_id);\n },\n // Hour width based on screen size\n hourWidth() {\n return window.innerWidth <= 768 ? this.HOUR_WIDTH_MOBILE : this.HOUR_WIDTH;\n },\n // Computed property to trigger reactivity when existingTimeblocksData changes\n existingTimeblocksDataReactive() {\n // This forces Vue to track changes to existingTimeblocksData\n return {\n ...this.existingTimeblocksData\n };\n }\n },\n watch: {\n // Watch for timeblocks changes\n timeblocks: {\n handler() {\n // Refetch timeline data for all timeblocks when they change\n this.$nextTick(() => {\n this.fetchAllTimelinesData();\n });\n },\n deep: true\n },\n // Watch for employee changes\n 'employee.id': {\n handler(newId) {\n if (newId) {\n this.fetchAllTimelinesData();\n }\n }\n },\n // Watch for modal opening - set employee_id and reset to today\n showModal: {\n handler(isOpen) {\n if (isOpen) {\n this.newTimeblock = {\n id: null,\n date: new Date(),\n starts_at_time: null,\n ends_at_time: null,\n employee_id: this.employee?.id || null\n };\n }\n }\n }\n },\n mounted() {\n // Fetch timeline data on mount\n if (this.employee?.id) {\n this.fetchAllTimelinesData();\n }\n },\n methods: {\n // Submit timeblock from employee timeblock component\n async submitFromEmployeeTimeblock() {\n // Validate using the employee timeblock component's validation\n const isValid = await this.$refs.employeeTimeblockRef?.validate();\n if (!isValid) {\n return;\n }\n\n // The newTimeblock data is already reactive and updated by the component\n await this.submit();\n },\n // Methods for existing timeblocks timeline\n getTimelineLoadingState(index) {\n const reactiveData = this.existingTimeblocksDataReactive;\n return reactiveData[index]?.loading || false;\n },\n getScheduledBlocksForTimeblock(index) {\n // Use the reactive computed property to ensure Vue tracks changes\n const reactiveData = this.existingTimeblocksDataReactive;\n const tasks = reactiveData[index]?.tasks || [];\n const currentTimeblock = this.timeblocks[index];\n\n // Filter out the current timeblock from scheduled blocks\n return tasks.filter(task => !task._timeblock_id || !currentTimeblock.id || task._timeblock_id !== currentTimeblock.id);\n },\n getOtherTimeblocksForTimeblock(timeblock, currentIndex) {\n if (!timeblock.date) return [];\n const selectedDate = moment__WEBPACK_IMPORTED_MODULE_8___default()(timeblock.date).format('YYYY-MM-DD');\n return this.timeblocks.filter((tb, idx) => {\n // Skip current timeblock\n if (idx === currentIndex) return false;\n if (!tb.date || !tb.starts_at_time || !tb.ends_at_time) return false;\n const tbDate = moment__WEBPACK_IMPORTED_MODULE_8___default()(tb.date).format('YYYY-MM-DD');\n return tbDate === selectedDate;\n });\n },\n getTimeblockRange(timeblock) {\n const {\n start,\n end\n } = (0,_plugins_tm_utils_timeblock_utils__WEBPACK_IMPORTED_MODULE_13__.timeblockToDateRange)(timeblock);\n return {\n start,\n end\n };\n },\n getCollisionForTimeblock(timeblock, index) {\n const scheduledBlocks = this.getScheduledBlocksForTimeblock(index);\n return (0,_plugins_tm_utils_timeblock_utils__WEBPACK_IMPORTED_MODULE_13__.detectCollision)(timeblock, scheduledBlocks);\n },\n getCollisionSegmentsForTimeblock(timeblock, index) {\n const scheduledBlocks = this.getScheduledBlocksForTimeblock(index);\n return (0,_plugins_tm_utils_timeblock_utils__WEBPACK_IMPORTED_MODULE_13__.getCollisionSegments)(timeblock, scheduledBlocks);\n },\n calculateDuration(timeblock) {\n return (0,_plugins_tm_utils_timeblock_utils__WEBPACK_IMPORTED_MODULE_13__.calculateTimeblockDuration)(timeblock);\n },\n async fetchTimelineDataForTimeblock(index) {\n const timeblock = this.timeblocks[index];\n if (!this.employee?.id || !timeblock.date) {\n this.existingTimeblocksData = {\n ...this.existingTimeblocksData,\n [index]: {\n tasks: [],\n loading: false\n }\n };\n return;\n }\n this.existingTimeblocksData = {\n ...this.existingTimeblocksData,\n [index]: {\n tasks: this.existingTimeblocksData[index]?.tasks || [],\n loading: true\n }\n };\n try {\n const dateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(timeblock.date).format('YYYY-MM-DD');\n const queryParams = new URLSearchParams({\n start: dateStr,\n end: dateStr,\n employee_id: this.employee.id.toString()\n }).toString();\n const response = await this.$axios.get_auth(`v1/subtasks?${queryParams}`);\n const subtasks = [...(response.subtasks || []), ...(response.blockers || [])];\n const tasks = [];\n subtasks.forEach(subtask => {\n // Check if this is a blocker/adhoc/etc with direct start/end fields (no timeblocks array)\n if (!subtask.timeblocks && subtask.start && subtask.end && ['blocker', 'adhoc', 'home_office', 'vacation', 'free_day', 'office365_blocker'].includes(subtask.type)) {\n const blockerDateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(subtask.start).format('YYYY-MM-DD');\n if (blockerDateStr === dateStr) {\n const type = subtask.type;\n tasks.push({\n id: subtask.id,\n start: new Date(subtask.start),\n end: new Date(subtask.end),\n master_task: null,\n date: new Date(subtask.start),\n project_code: null,\n subtask: subtask,\n blocker: subtask,\n type,\n _timeblock_id: null,\n _timeblock_is_finished: subtask.is_finished || false,\n _real_start: new Date(subtask.start),\n _real_end: new Date(subtask.end)\n });\n }\n } else {\n // Process regular subtasks with timeblocks array\n subtask.timeblocks?.forEach(tb => {\n const timeblockDateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(tb.start).format('YYYY-MM-DD');\n if (timeblockDateStr === dateStr) {\n let type = 'subtask';\n if (subtask.type === 'office365') type = 'office365';\n tasks.push({\n id: subtask.id,\n start: new Date(tb.start),\n end: new Date(tb.end),\n master_task: subtask.master_task,\n date: new Date(tb.start),\n project_code: subtask.project_code,\n subtask: subtask,\n blocker: undefined,\n type,\n _timeblock_id: tb.id,\n _timeblock_is_finished: tb.is_finished,\n _real_start: new Date(tb.start),\n _real_end: new Date(tb.end)\n });\n }\n });\n }\n });\n this.existingTimeblocksData = {\n ...this.existingTimeblocksData,\n [index]: {\n tasks,\n loading: false\n }\n };\n } catch (error) {\n console.error('Error fetching timeline data for timeblock:', error);\n this.existingTimeblocksData = {\n ...this.existingTimeblocksData,\n [index]: {\n tasks: [],\n loading: false\n }\n };\n }\n },\n // Fetch timeline data for all existing timeblocks\n async fetchAllTimelinesData() {\n if (!this.employee?.id) return;\n const promises = this.timeblocks.map((_, index) => this.fetchTimelineDataForTimeblock(index));\n await Promise.all(promises);\n },\n formatTimeblockStart(timeblock) {\n // Handle internal format with date and time fields\n if (timeblock.date && timeblock.starts_at_time) {\n const dateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(timeblock.date).format('DD.MM.yyyy');\n return `${dateStr}, ${timeblock.starts_at_time}`;\n }\n // Fallback to backend format\n if (timeblock.start) {\n return _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].formatDateTime(timeblock.start);\n }\n return '';\n },\n formatTimeblockEnd(timeblock) {\n // Handle internal format with date and time fields\n if (timeblock.date && timeblock.ends_at_time) {\n return timeblock.ends_at_time;\n }\n // Fallback to backend format\n if (timeblock.end) {\n return _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].formatDateTime(timeblock.end);\n }\n return '';\n },\n async submit() {\n const subtask = JSON.parse(JSON.stringify(this.subtask));\n if (!subtask?.timeblocks) {\n subtask.timeblocks = [];\n }\n if (!subtask?.timesheets) {\n subtask.timesheets = [];\n }\n if (!subtask?.is_finished) {\n subtask.is_finished = 0;\n }\n\n // Add timeblock in internal format from newTimeblock\n subtask.timeblocks.push({\n id: null,\n date: this.newTimeblock.date,\n starts_at_time: this.newTimeblock.starts_at_time,\n ends_at_time: this.newTimeblock.ends_at_time,\n is_finished: 0\n });\n if (subtask.deadline) subtask.deadline = _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].formatDateTimeForBackend(this._mergeDeadlineTimeDate());\n const isAfterDeadline = this.isAfterDeadline();\n if (isAfterDeadline) {\n this.visible = true;\n } else {\n if (!subtask.id) {\n this.$emit('update-unfinished-subtask', subtask);\n this.closeModal();\n } else {\n this._update(subtask);\n }\n }\n },\n async confirmSubmit() {\n const subtask = JSON.parse(JSON.stringify(this.subtask));\n if (!subtask?.timeblocks) {\n subtask.timeblocks = [];\n }\n if (!subtask?.timesheets) {\n subtask.timesheets = [];\n }\n if (!subtask?.is_finished) {\n subtask.is_finished = 0;\n }\n\n // Add timeblock in internal format from newTimeblock\n subtask.timeblocks.push({\n id: null,\n date: this.newTimeblock.date,\n starts_at_time: this.newTimeblock.starts_at_time,\n ends_at_time: this.newTimeblock.ends_at_time,\n is_finished: 0\n });\n if (subtask.deadline) subtask.deadline = _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].formatDateTimeForBackend(this._mergeDeadlineTimeDate());\n if (!subtask.id) {\n this.$emit('update-unfinished-subtask', subtask);\n this.closeModal();\n return;\n }\n this.visible = false;\n this._update(subtask);\n },\n async toggleTimeblockIsFinished(originalTimeblock) {\n // TODO: Pridat odpracovany cas modal?\n const subtask = JSON.parse(JSON.stringify(this.subtask));\n const timeblock = JSON.parse(JSON.stringify(originalTimeblock));\n timeblock.is_finished = timeblock.is_finished == 1 ? 0 : 1;\n try {\n // Convert timeblock to backend format before sending\n const timeblockForBackend = {\n id: timeblock.id,\n is_finished: timeblock.is_finished\n };\n\n // If timeblock is in internal format, convert it\n if (timeblock.date) {\n const dateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(timeblock.date).format('YYYY-MM-DD');\n timeblockForBackend.start = `${dateStr} ${timeblock.starts_at_time}:00`;\n timeblockForBackend.end = `${dateStr} ${timeblock.ends_at_time}:00`;\n } else {\n // Already in backend format\n timeblockForBackend.start = timeblock.start;\n timeblockForBackend.end = timeblock.end;\n }\n const {\n data: newTimeblock\n } = await this.$axios.put_auth(`v1/timeblocks/${timeblock.id}`, timeblockForBackend);\n\n // Convert returned timeblock from backend format to internal format\n const startMoment = moment__WEBPACK_IMPORTED_MODULE_8___default()(newTimeblock.start, 'YYYY-MM-DD HH:mm:ss');\n const endMoment = moment__WEBPACK_IMPORTED_MODULE_8___default()(newTimeblock.end, 'YYYY-MM-DD HH:mm:ss');\n const convertedTimeblock = {\n id: newTimeblock.id,\n date: startMoment.toDate(),\n starts_at_time: startMoment.format('HH:mm'),\n ends_at_time: endMoment.format('HH:mm'),\n is_finished: newTimeblock.is_finished\n };\n subtask.timeblocks = subtask.timeblocks.map(originalTimeblock => {\n if (originalTimeblock.id == convertedTimeblock.id) return convertedTimeblock;\n return originalTimeblock;\n });\n this.$events.emit('on-subtask-edited', subtask);\n this.$emit('update-subtask', subtask);\n if (timeblock.is_finished) this.$events.emit('show-task-add-time-modal', {\n subtask\n });\n } catch (error) {\n this.$toast.error(error.message || error);\n }\n },\n async deleteTimeblock({\n id\n }) {\n const subtask = JSON.parse(JSON.stringify(this.subtask));\n subtask.timeblocks = subtask.timeblocks.filter(timeblock => timeblock.id != id);\n if (subtask.deadline) subtask.deadline = _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].formatDateTimeForBackend(this._mergeDeadlineTimeDate());\n this._update(subtask);\n },\n deleteTimeblockWithoutId(_index) {\n this.$emit('delete-timeblock');\n },\n async _update(data) {\n try {\n const timesheets = data.timesheets.map(timesheet => {\n delete timesheet.employee_name;\n return timesheet;\n });\n\n // Convert timeblocks from internal format to BE format\n const timeblocks = (data.timeblocks || []).filter(timeblock => {\n // Filter timeblocks that have either old format (date) or new format (start)\n return timeblock.date || timeblock.start;\n }).map(timeblock => {\n // If already in BE format (has start field), return as is\n if (timeblock.start && !timeblock.date) {\n return {\n id: timeblock.id || null,\n start: timeblock.start,\n end: timeblock.end,\n is_finished: timeblock.is_finished || 0\n };\n }\n\n // Convert from internal format to BE format\n const dateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(timeblock.date).format('YYYY-MM-DD');\n return {\n id: timeblock.id || null,\n start: `${dateStr} ${timeblock.starts_at_time}:00`,\n end: `${dateStr} ${timeblock.ends_at_time}:00`,\n is_finished: timeblock.is_finished || 0\n };\n });\n const {\n subtask\n } = await this.$axios.put_auth(`v1/subtasks/${data.id}`, {\n ...data,\n timesheets,\n timeblocks\n });\n this.closeModal();\n this.$events.emit('on-subtask-edited', subtask);\n } catch (error) {\n this.$toast.error(error.message || error);\n }\n },\n isAfterDeadline() {\n const deadline = this.getDeadline(this.subtask);\n if (!deadline) return;\n const mDate = moment__WEBPACK_IMPORTED_MODULE_8___default()(this.newTimeblock.date);\n const mDeadline = moment__WEBPACK_IMPORTED_MODULE_8___default()(deadline);\n const [hours, minutes] = this.newTimeblock.ends_at_time.split(':').map(Number);\n mDate.hours(hours);\n mDate.minutes(minutes);\n return mDate.isAfter(mDeadline);\n },\n getDeadline(subtask) {\n if (subtask?.deadline) return subtask.deadline;\n return subtask.master_task_deadline;\n },\n _mergeDeadlineTimeDate() {\n const date = new Date(this.subtask.deadline);\n const timeParts = this.subtask._deadline_time.split(':');\n date.setHours(parseInt(timeParts[0]));\n date.setMinutes(parseInt(timeParts[1]));\n return date;\n },\n closeModal() {\n // Reset newTimeblock\n this.newTimeblock = {\n id: null,\n date: new Date(),\n starts_at_time: null,\n ends_at_time: null,\n employee_id: this.employee?.id || null\n };\n this.showModal = false;\n }\n }\n});\n\n//# sourceURL=webpack://jandl/./src/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D\n}"); +eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.json.stringify.js */ \"./node_modules/core-js/modules/es.json.stringify.js\");\n/* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/esnext.iterator.constructor.js */ \"./node_modules/core-js/modules/esnext.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/esnext.iterator.filter.js */ \"./node_modules/core-js/modules/esnext.iterator.filter.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/esnext.iterator.find.js */ \"./node_modules/core-js/modules/esnext.iterator.find.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/esnext.iterator.for-each.js */ \"./node_modules/core-js/modules/esnext.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/esnext.iterator.map.js */ \"./node_modules/core-js/modules/esnext.iterator.map.js\");\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/plugins/tm@_utils/tm.utils */ \"./src/plugins/tm@_utils/tm.utils.ts\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _plugins_tm_modal_mixins_modal_mixin__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/plugins/tm@modal/_mixins/modal.mixin */ \"./src/plugins/tm@modal/_mixins/modal.mixin.ts\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm-bundler.js\");\n/* harmony import */ var _employees_a_employee_timeblock_vue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../employees/a-employee-timeblock.vue */ \"./src/plugins/tm@modal/task/_components/employees/a-employee-timeblock.vue\");\n/* harmony import */ var _plugins_tm_utils_timeblock_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/plugins/tm@_utils/timeblock.utils */ \"./src/plugins/tm@_utils/timeblock.utils.ts\");\n/* provided dependency */ var console = __webpack_require__(/*! ./node_modules/console-browserify/index.js */ \"./node_modules/console-browserify/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n// import AEmployeeTimeblockTimeline from '../employees/a-employee-timeblock-timeline.vue';\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n components: {\n AEmployeeTimeblock: _employees_a_employee_timeblock_vue__WEBPACK_IMPORTED_MODULE_11__[\"default\"]\n // AEmployeeTimeblockTimeline,\n },\n mixins: [_plugins_tm_modal_mixins_modal_mixin__WEBPACK_IMPORTED_MODULE_9__[\"default\"]],\n props: {\n timeblocks: {\n type: Array,\n required: true\n },\n subtask: {\n type: Object,\n required: true\n }\n },\n emits: ['update-subtask'],\n data() {\n return {\n tmUtils: _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n showModal: false,\n visible: false,\n // New timeblock for modal (used by a-employee-timeblock component)\n newTimeblock: {\n id: null,\n date: new Date(),\n starts_at_time: null,\n ends_at_time: null,\n employee_id: null\n },\n // Timeline constants\n START_HOUR: 0,\n END_HOUR: 24,\n HOUR_WIDTH: 60,\n HOUR_WIDTH_MOBILE: 50,\n // Existing timeblocks timeline data\n existingTimeblocksData: {} // { [index]: { tasks: [], loading: false } }\n };\n },\n computed: {\n ...(0,vuex__WEBPACK_IMPORTED_MODULE_10__.mapGetters)('tm', ['mastertasks', 'enrichedEmployees']),\n isOffice365Task() {\n return this.subtask.type == 'office365';\n },\n // Get employee data from subtask\n employee() {\n if (!this.subtask?.employee_id) return null;\n return this.subtask._employee || this.enrichedEmployees.find(emp => emp.id === this.subtask.employee_id);\n },\n // Hour width based on screen size\n hourWidth() {\n return window.innerWidth <= 768 ? this.HOUR_WIDTH_MOBILE : this.HOUR_WIDTH;\n },\n // Computed property to trigger reactivity when existingTimeblocksData changes\n existingTimeblocksDataReactive() {\n // This forces Vue to track changes to existingTimeblocksData\n return {\n ...this.existingTimeblocksData\n };\n }\n },\n watch: {\n // Watch for timeblocks changes\n timeblocks: {\n handler() {\n // Refetch timeline data for all timeblocks when they change\n this.$nextTick(() => {\n this.fetchAllTimelinesData();\n });\n },\n deep: true\n },\n // Watch for employee changes\n 'employee.id': {\n handler(newId) {\n if (newId) {\n this.fetchAllTimelinesData();\n }\n }\n },\n // Watch for modal opening - set employee_id and reset to today\n showModal: {\n handler(isOpen) {\n if (isOpen) {\n this.newTimeblock = {\n id: null,\n date: new Date(),\n starts_at_time: null,\n ends_at_time: null,\n employee_id: this.employee?.id || null\n };\n }\n }\n }\n },\n mounted() {\n // Fetch timeline data on mount\n if (this.employee?.id) {\n this.fetchAllTimelinesData();\n }\n },\n methods: {\n // Submit timeblock from employee timeblock component\n async submitFromEmployeeTimeblock() {\n // Validate using the employee timeblock component's validation\n const isValid = await this.$refs.employeeTimeblockRef?.validate();\n if (!isValid) {\n return;\n }\n\n // The newTimeblock data is already reactive and updated by the component\n await this.submit();\n },\n // Methods for existing timeblocks timeline\n getTimelineLoadingState(index) {\n const reactiveData = this.existingTimeblocksDataReactive;\n return reactiveData[index]?.loading || false;\n },\n getScheduledBlocksForTimeblock(index) {\n // Use the reactive computed property to ensure Vue tracks changes\n const reactiveData = this.existingTimeblocksDataReactive;\n const tasks = reactiveData[index]?.tasks || [];\n const currentTimeblock = this.timeblocks[index];\n\n // Filter out the current timeblock from scheduled blocks\n return tasks.filter(task => !task._timeblock_id || !currentTimeblock.id || task._timeblock_id !== currentTimeblock.id);\n },\n getOtherTimeblocksForTimeblock(timeblock, currentIndex) {\n if (!timeblock.date) return [];\n const selectedDate = moment__WEBPACK_IMPORTED_MODULE_8___default()(timeblock.date).format('YYYY-MM-DD');\n return this.timeblocks.filter((tb, idx) => {\n // Skip current timeblock\n if (idx === currentIndex) return false;\n if (!tb.date || !tb.starts_at_time || !tb.ends_at_time) return false;\n const tbDate = moment__WEBPACK_IMPORTED_MODULE_8___default()(tb.date).format('YYYY-MM-DD');\n return tbDate === selectedDate;\n });\n },\n getTimeblockRange(timeblock) {\n const {\n start,\n end\n } = (0,_plugins_tm_utils_timeblock_utils__WEBPACK_IMPORTED_MODULE_12__.timeblockToDateRange)(timeblock);\n return {\n start,\n end\n };\n },\n getCollisionForTimeblock(timeblock, index) {\n const scheduledBlocks = this.getScheduledBlocksForTimeblock(index);\n return (0,_plugins_tm_utils_timeblock_utils__WEBPACK_IMPORTED_MODULE_12__.detectCollision)(timeblock, scheduledBlocks);\n },\n getCollisionSegmentsForTimeblock(timeblock, index) {\n const scheduledBlocks = this.getScheduledBlocksForTimeblock(index);\n return (0,_plugins_tm_utils_timeblock_utils__WEBPACK_IMPORTED_MODULE_12__.getCollisionSegments)(timeblock, scheduledBlocks);\n },\n calculateDuration(timeblock) {\n return (0,_plugins_tm_utils_timeblock_utils__WEBPACK_IMPORTED_MODULE_12__.calculateTimeblockDuration)(timeblock);\n },\n async fetchTimelineDataForTimeblock(index) {\n const timeblock = this.timeblocks[index];\n if (!this.employee?.id || !timeblock.date) {\n this.existingTimeblocksData = {\n ...this.existingTimeblocksData,\n [index]: {\n tasks: [],\n loading: false\n }\n };\n return;\n }\n this.existingTimeblocksData = {\n ...this.existingTimeblocksData,\n [index]: {\n tasks: this.existingTimeblocksData[index]?.tasks || [],\n loading: true\n }\n };\n try {\n const dateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(timeblock.date).format('YYYY-MM-DD');\n const queryParams = new URLSearchParams({\n start: dateStr,\n end: dateStr,\n employee_id: this.employee.id.toString()\n }).toString();\n const response = await this.$axios.get_auth(`v1/subtasks?${queryParams}`);\n const subtasks = [...(response.subtasks || []), ...(response.blockers || [])];\n const tasks = [];\n subtasks.forEach(subtask => {\n // Check if this is a blocker/adhoc/etc with direct start/end fields (no timeblocks array)\n if (!subtask.timeblocks && subtask.start && subtask.end && ['blocker', 'adhoc', 'home_office', 'vacation', 'free_day', 'office365_blocker'].includes(subtask.type)) {\n const blockerDateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(subtask.start).format('YYYY-MM-DD');\n if (blockerDateStr === dateStr) {\n const type = subtask.type;\n tasks.push({\n id: subtask.id,\n start: new Date(subtask.start),\n end: new Date(subtask.end),\n master_task: null,\n date: new Date(subtask.start),\n project_code: null,\n subtask: subtask,\n blocker: subtask,\n type,\n _timeblock_id: null,\n _timeblock_is_finished: subtask.is_finished || false,\n _real_start: new Date(subtask.start),\n _real_end: new Date(subtask.end)\n });\n }\n } else {\n // Process regular subtasks with timeblocks array\n subtask.timeblocks?.forEach(tb => {\n const timeblockDateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(tb.start).format('YYYY-MM-DD');\n if (timeblockDateStr === dateStr) {\n let type = 'subtask';\n if (subtask.type === 'office365') type = 'office365';\n tasks.push({\n id: subtask.id,\n start: new Date(tb.start),\n end: new Date(tb.end),\n master_task: subtask.master_task,\n date: new Date(tb.start),\n project_code: subtask.project_code,\n subtask: subtask,\n blocker: undefined,\n type,\n _timeblock_id: tb.id,\n _timeblock_is_finished: tb.is_finished,\n _real_start: new Date(tb.start),\n _real_end: new Date(tb.end)\n });\n }\n });\n }\n });\n this.existingTimeblocksData = {\n ...this.existingTimeblocksData,\n [index]: {\n tasks,\n loading: false\n }\n };\n } catch (error) {\n console.error('Error fetching timeline data for timeblock:', error);\n this.existingTimeblocksData = {\n ...this.existingTimeblocksData,\n [index]: {\n tasks: [],\n loading: false\n }\n };\n }\n },\n // Fetch timeline data for all existing timeblocks\n async fetchAllTimelinesData() {\n if (!this.employee?.id) return;\n const promises = this.timeblocks.map((_, index) => this.fetchTimelineDataForTimeblock(index));\n await Promise.all(promises);\n },\n formatTimeblockStart(timeblock) {\n // Handle internal format with date and time fields\n if (timeblock.date && timeblock.starts_at_time) {\n const dateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(timeblock.date).format('DD.MM.yyyy');\n return `${dateStr}, ${timeblock.starts_at_time}`;\n }\n // Fallback to backend format\n if (timeblock.start) {\n return _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].formatDateTime(timeblock.start);\n }\n return '';\n },\n formatTimeblockEnd(timeblock) {\n // Handle internal format with date and time fields\n if (timeblock.date && timeblock.ends_at_time) {\n return timeblock.ends_at_time;\n }\n // Fallback to backend format\n if (timeblock.end) {\n return _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].formatDateTime(timeblock.end);\n }\n return '';\n },\n async submit() {\n const subtask = JSON.parse(JSON.stringify(this.subtask));\n if (!subtask?.timeblocks) {\n subtask.timeblocks = [];\n }\n if (!subtask?.timesheets) {\n subtask.timesheets = [];\n }\n if (!subtask?.is_finished) {\n subtask.is_finished = 0;\n }\n\n // Add timeblock in internal format from newTimeblock\n subtask.timeblocks.push({\n id: null,\n date: this.newTimeblock.date,\n starts_at_time: this.newTimeblock.starts_at_time,\n ends_at_time: this.newTimeblock.ends_at_time,\n is_finished: 0\n });\n if (subtask.deadline) subtask.deadline = _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].formatDateTimeForBackend(this._mergeDeadlineTimeDate());\n const isAfterDeadline = this.isAfterDeadline();\n if (isAfterDeadline) {\n this.visible = true;\n } else {\n if (!subtask.id) {\n this.$emit('update-unfinished-subtask', subtask);\n this.closeModal();\n } else {\n this._update(subtask);\n }\n }\n },\n async confirmSubmit() {\n const subtask = JSON.parse(JSON.stringify(this.subtask));\n if (!subtask?.timeblocks) {\n subtask.timeblocks = [];\n }\n if (!subtask?.timesheets) {\n subtask.timesheets = [];\n }\n if (!subtask?.is_finished) {\n subtask.is_finished = 0;\n }\n\n // Add timeblock in internal format from newTimeblock\n subtask.timeblocks.push({\n id: null,\n date: this.newTimeblock.date,\n starts_at_time: this.newTimeblock.starts_at_time,\n ends_at_time: this.newTimeblock.ends_at_time,\n is_finished: 0\n });\n if (subtask.deadline) subtask.deadline = _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].formatDateTimeForBackend(this._mergeDeadlineTimeDate());\n if (!subtask.id) {\n this.$emit('update-unfinished-subtask', subtask);\n this.closeModal();\n return;\n }\n this.visible = false;\n this._update(subtask);\n },\n async toggleTimeblockIsFinished(originalTimeblock) {\n // TODO: Pridat odpracovany cas modal?\n const subtask = JSON.parse(JSON.stringify(this.subtask));\n const timeblock = JSON.parse(JSON.stringify(originalTimeblock));\n timeblock.is_finished = timeblock.is_finished == 1 ? 0 : 1;\n try {\n // Convert timeblock to backend format before sending\n const timeblockForBackend = {\n id: timeblock.id,\n is_finished: timeblock.is_finished\n };\n\n // If timeblock is in internal format, convert it\n if (timeblock.date) {\n const dateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(timeblock.date).format('YYYY-MM-DD');\n timeblockForBackend.start = `${dateStr} ${timeblock.starts_at_time}:00`;\n timeblockForBackend.end = `${dateStr} ${timeblock.ends_at_time}:00`;\n } else {\n // Already in backend format\n timeblockForBackend.start = timeblock.start;\n timeblockForBackend.end = timeblock.end;\n }\n const {\n data: newTimeblock\n } = await this.$axios.put_auth(`v1/timeblocks/${timeblock.id}`, timeblockForBackend);\n\n // Convert returned timeblock from backend format to internal format\n const startMoment = moment__WEBPACK_IMPORTED_MODULE_8___default()(newTimeblock.start, 'YYYY-MM-DD HH:mm:ss');\n const endMoment = moment__WEBPACK_IMPORTED_MODULE_8___default()(newTimeblock.end, 'YYYY-MM-DD HH:mm:ss');\n const convertedTimeblock = {\n id: newTimeblock.id,\n date: startMoment.toDate(),\n starts_at_time: startMoment.format('HH:mm'),\n ends_at_time: endMoment.format('HH:mm'),\n is_finished: newTimeblock.is_finished\n };\n subtask.timeblocks = subtask.timeblocks.map(originalTimeblock => {\n if (originalTimeblock.id == convertedTimeblock.id) return convertedTimeblock;\n return originalTimeblock;\n });\n this.$events.emit('on-subtask-edited', subtask);\n this.$emit('update-subtask', subtask);\n if (timeblock.is_finished) this.$events.emit('show-task-add-time-modal', {\n subtask\n });\n } catch (error) {\n this.$toast.error(error.message || error);\n }\n },\n async deleteTimeblock({\n id\n }) {\n const subtask = JSON.parse(JSON.stringify(this.subtask));\n subtask.timeblocks = subtask.timeblocks.filter(timeblock => timeblock.id != id);\n if (subtask.deadline) subtask.deadline = _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].formatDateTimeForBackend(this._mergeDeadlineTimeDate());\n this._update(subtask);\n },\n deleteTimeblockWithoutId(_index) {\n this.$emit('delete-timeblock');\n },\n async _update(data) {\n try {\n const timesheets = data.timesheets.map(timesheet => {\n delete timesheet.employee_name;\n return timesheet;\n });\n\n // Convert timeblocks from internal format to BE format\n const timeblocks = (data.timeblocks || []).filter(timeblock => {\n // Filter timeblocks that have either old format (date) or new format (start)\n return timeblock.date || timeblock.start;\n }).map(timeblock => {\n // If already in BE format (has start field), return as is\n if (timeblock.start && !timeblock.date) {\n return {\n id: timeblock.id || null,\n start: timeblock.start,\n end: timeblock.end,\n is_finished: timeblock.is_finished || 0\n };\n }\n\n // Convert from internal format to BE format\n const dateStr = moment__WEBPACK_IMPORTED_MODULE_8___default()(timeblock.date).format('YYYY-MM-DD');\n return {\n id: timeblock.id || null,\n start: `${dateStr} ${timeblock.starts_at_time}:00`,\n end: `${dateStr} ${timeblock.ends_at_time}:00`,\n is_finished: timeblock.is_finished || 0\n };\n });\n const {\n subtask\n } = await this.$axios.put_auth(`v1/subtasks/${data.id}`, {\n ...data,\n timesheets,\n timeblocks\n });\n this.closeModal();\n this.$events.emit('on-subtask-edited', subtask);\n } catch (error) {\n this.$toast.error(error.message || error);\n }\n },\n isAfterDeadline() {\n const deadline = this.getDeadline(this.subtask);\n if (!deadline) return;\n const mDate = moment__WEBPACK_IMPORTED_MODULE_8___default()(this.newTimeblock.date);\n const mDeadline = moment__WEBPACK_IMPORTED_MODULE_8___default()(deadline);\n const [hours, minutes] = this.newTimeblock.ends_at_time.split(':').map(Number);\n mDate.hours(hours);\n mDate.minutes(minutes);\n return mDate.isAfter(mDeadline);\n },\n getDeadline(subtask) {\n if (subtask?.deadline) return subtask.deadline;\n return subtask.master_task_deadline;\n },\n _mergeDeadlineTimeDate() {\n const date = new Date(this.subtask.deadline);\n const timeParts = this.subtask._deadline_time.split(':');\n date.setHours(parseInt(timeParts[0]));\n date.setMinutes(parseInt(timeParts[1]));\n return date;\n },\n closeModal() {\n // Reset newTimeblock\n this.newTimeblock = {\n id: null,\n date: new Date(),\n starts_at_time: null,\n ends_at_time: null,\n employee_id: this.employee?.id || null\n };\n this.showModal = false;\n }\n }\n});\n\n//# sourceURL=webpack://jandl/./src/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D\n}"); /***/ }), @@ -1760,7 +1760,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm-bundler.js\");\n/* harmony import */ var vuetify_lib_components_VBtn_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuetify/lib/components/VBtn/index.mjs */ \"./node_modules/vuetify/lib/components/VBtn/VBtn.mjs\");\n/* harmony import */ var vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vuetify/lib/components/VCard/index.mjs */ \"./node_modules/vuetify/lib/components/VCard/VCard.mjs\");\n/* harmony import */ var vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vuetify/lib/components/VCard/index.mjs */ \"./node_modules/vuetify/lib/components/VCard/VCardActions.mjs\");\n/* harmony import */ var vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vuetify/lib/components/VCard/index.mjs */ \"./node_modules/vuetify/lib/components/VCard/VCardText.mjs\");\n/* harmony import */ var vuetify_lib_components_VDialog_index_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vuetify/lib/components/VDialog/index.mjs */ \"./node_modules/vuetify/lib/components/VDialog/VDialog.mjs\");\n/* harmony import */ var vuetify_lib_components_VGrid_index_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vuetify/lib/components/VGrid/index.mjs */ \"./node_modules/vuetify/lib/components/VGrid/VCol.mjs\");\n/* harmony import */ var vuetify_lib_components_VGrid_index_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vuetify/lib/components/VGrid/index.mjs */ \"./node_modules/vuetify/lib/components/VGrid/VRow.mjs\");\n/* harmony import */ var vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vuetify/lib/components/VIcon/index.mjs */ \"./node_modules/vuetify/lib/components/VIcon/VIcon.mjs\");\n/* harmony import */ var vuetify_lib_components_VSheet_index_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! vuetify/lib/components/VSheet/index.mjs */ \"./node_modules/vuetify/lib/components/VSheet/VSheet.mjs\");\n\nconst _hoisted_1 = {\n class: \"d-flex align-center\"\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"d-flex align-center mb-3\"\n};\nconst _hoisted_3 = {\n class: \"d-flex align-center mb-2\"\n};\nconst _hoisted_4 = {\n key: 0,\n class: \"existing-timeblock-timeline ml-8\"\n};\nconst _hoisted_5 = {\n class: \"d-flex justify-space-between align-center pa-4\"\n};\nconst _hoisted_6 = {\n class: \"d-flex justify-space-between align-center\"\n};\nconst _hoisted_7 = {\n class: \"text-red\"\n};\nconst _hoisted_8 = {\n class: \"text-black\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n \n \n \n const _component_a_employee_timeblock_timeline = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)(\"a-employee-timeblock-timeline\");\n \n const _component_a_employee_timeblock = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)(\"a-employee-timeblock\");\n \n \n \n \n \n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VGrid_index_mjs__WEBPACK_IMPORTED_MODULE_7__.VRow, {\n \"no-gutters\": \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VGrid_index_mjs__WEBPACK_IMPORTED_MODULE_6__.VCol, {\n cols: \"5\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VSheet_index_mjs__WEBPACK_IMPORTED_MODULE_9__.VSheet, {\n class: \"py-3\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__.VIcon, {\n icon: \"mdi-calendar-week\",\n size: \"large\"\n }), _cache[9] || (_cache[9] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"p\", {\n class: \"mx-3\"\n }, \"Trvanie\", -1 /* CACHED */))])]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VGrid_index_mjs__WEBPACK_IMPORTED_MODULE_6__.VCol, {\n cols: \"7\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VSheet_index_mjs__WEBPACK_IMPORTED_MODULE_9__.VSheet, {\n class: \"py-3\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [!$options.isOffice365Task ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__.VIcon, {\n class: \"add-date cursor-pointer mr-2\",\n icon: \"mdi-plus\",\n size: \"medium\",\n onClick: _cache[0] || (_cache[0] = $event => $data.showModal = true)\n }), _cache[10] || (_cache[10] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"p\", {\n class: \"task-badge rounded-pill\"\n }, \"Pridať záznam\", -1 /* CACHED */))])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.timeblocks, (timeblock, index) => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", {\n key: timeblock.id || `timeblock-${index}`,\n class: \"timeblock-item mb-3\"\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_3, [!$options.isOffice365Task ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__.VIcon, {\n key: 0,\n class: \"circle-border cursor-pointer mr-2\",\n icon: \"mdi-minus\",\n size: \"medium\",\n onClick: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)($event => $props.subtask.id ? $options.deleteTimeblock(timeblock) : $options.deleteTimeblockWithoutId(index), [\"stop\"])\n }, null, 8 /* PROPS */, [\"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"p\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([\"task-badge rounded-pill\", {\n 'strike-through': timeblock.is_finished\n }])\n }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($options.formatTimeblockStart(timeblock)) + \" - \" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($options.formatTimeblockEnd(timeblock)), 3 /* TEXT, CLASS */), !$options.isOffice365Task ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__.VIcon, {\n key: 1,\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([\"circle-border cursor-pointer ml-2\", {\n completed: timeblock.is_finished\n }]),\n icon: \"mdi-check\",\n size: \"medium\",\n onClick: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)($event => $options.toggleTimeblockIsFinished(timeblock), [\"stop\"])\n }, null, 8 /* PROPS */, [\"class\", \"onClick\"])), [[vue__WEBPACK_IMPORTED_MODULE_0__.vShow, $props.subtask.id]]) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Timeline Visualization for existing timeblock \"), $options.employee && timeblock.date ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_a_employee_timeblock_timeline, {\n \"is-loading\": $options.getTimelineLoadingState(index),\n employee: $options.employee,\n \"scheduled-blocks\": $options.getScheduledBlocksForTimeblock(index),\n \"other-timeblocks\": $options.getOtherTimeblocksForTimeblock(timeblock, index),\n \"current-timeblock-range\": $options.getTimeblockRange(timeblock),\n collision: $options.getCollisionForTimeblock(timeblock, index),\n \"collision-segments\": $options.getCollisionSegmentsForTimeblock(timeblock, index),\n \"timeblock-duration\": $options.calculateDuration(timeblock),\n \"start-hour\": $data.START_HOUR,\n \"end-hour\": $data.END_HOUR,\n \"hour-width\": $options.hourWidth\n }, null, 8 /* PROPS */, [\"is-loading\", \"employee\", \"scheduled-blocks\", \"other-timeblocks\", \"current-timeblock-range\", \"collision\", \"collision-segments\", \"timeblock-duration\", \"start-hour\", \"end-hour\", \"hour-width\"])])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true)]);\n }), 128 /* KEYED_FRAGMENT */))]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VDialog_index_mjs__WEBPACK_IMPORTED_MODULE_5__.VDialog, {\n modelValue: $data.showModal,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => $data.showModal = $event),\n \"max-width\": \"900\",\n persistent: \"\",\n \"retain-focus\": false\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_2__.VCard, {\n class: \"add-timeblock-modal\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_5, [_cache[11] || (_cache[11] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"h1\", null, \"Pridať dátum\", -1 /* CACHED */)), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__.VIcon, {\n icon: \"mdi-close\",\n size: \"large\",\n onClick: _cache[1] || (_cache[1] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)($event => $options.closeModal(), [\"stop\"]))\n })]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_4__.VCardText, {\n class: \"pa-4\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Reuse the a-employee-timeblock component \"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_a_employee_timeblock, {\n ref: \"employeeTimeblockRef\",\n modelValue: $data.newTimeblock,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => $data.newTimeblock = $event),\n employee: $options.employee,\n deletable: false,\n index: 0\n }, null, 8 /* PROPS */, [\"modelValue\", \"employee\"])]),\n _: 1 /* STABLE */\n }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_3__.VCardActions, {\n class: \"pa-4\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VBtn_index_mjs__WEBPACK_IMPORTED_MODULE_1__.VBtn, {\n class: \"button primary\",\n onClick: _cache[3] || (_cache[3] = $event => $options.submitFromEmployeeTimeblock())\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [...(_cache[12] || (_cache[12] = [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(\" Potvrdiť \", -1 /* CACHED */)]))]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"modelValue\"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VDialog_index_mjs__WEBPACK_IMPORTED_MODULE_5__.VDialog, {\n modelValue: $data.visible,\n \"onUpdate:modelValue\": _cache[8] || (_cache[8] = $event => $data.visible = $event),\n \"max-width\": \"750\",\n persistent: \"\",\n \"retain-focus\": false\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_2__.VCard, null, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"h1\", _hoisted_7, [_cache[13] || (_cache[13] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(\" Ste si istý, že chcete pridať timeblock po deadline \", -1 /* CACHED */)), _cache[14] || (_cache[14] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"br\", null, null, -1 /* CACHED */)), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"b\", _hoisted_8, \"z mastertasku \" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.subtask?.project_code) + \" ?\", 1 /* TEXT */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__.VIcon, {\n icon: \"mdi-close\",\n size: \"large\",\n class: \"mb-15\",\n onClick: _cache[5] || (_cache[5] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)($event => $data.visible = false, [\"stop\"]))\n })]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_3__.VCardActions, {\n class: \"mt-10 d-flex justify-start align-center mobile-view\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VBtn_index_mjs__WEBPACK_IMPORTED_MODULE_1__.VBtn, {\n class: \"button primary half\",\n variant: \"flat\",\n onClick: _cache[6] || (_cache[6] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)($event => $options.confirmSubmit(), [\"stop\"]))\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [...(_cache[15] || (_cache[15] = [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(\"ÁNO\", -1 /* CACHED */)]))]),\n _: 1 /* STABLE */\n }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VBtn_index_mjs__WEBPACK_IMPORTED_MODULE_1__.VBtn, {\n class: \"button primary half outline\",\n onClick: _cache[7] || (_cache[7] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)($event => $data.visible = false, [\"stop\"]))\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [...(_cache[16] || (_cache[16] = [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(\"ZRUŠIŤ\", -1 /* CACHED */)]))]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"modelValue\"])], 64 /* STABLE_FRAGMENT */);\n}\n\n/* Vuetify */\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://jandl/./src/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue?./node_modules/webpack-plugin-vuetify/dist/scriptLoader.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B5%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D\n}"); +eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm-bundler.js\");\n/* harmony import */ var vuetify_lib_components_VBtn_index_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuetify/lib/components/VBtn/index.mjs */ \"./node_modules/vuetify/lib/components/VBtn/VBtn.mjs\");\n/* harmony import */ var vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vuetify/lib/components/VCard/index.mjs */ \"./node_modules/vuetify/lib/components/VCard/VCard.mjs\");\n/* harmony import */ var vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vuetify/lib/components/VCard/index.mjs */ \"./node_modules/vuetify/lib/components/VCard/VCardActions.mjs\");\n/* harmony import */ var vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vuetify/lib/components/VCard/index.mjs */ \"./node_modules/vuetify/lib/components/VCard/VCardText.mjs\");\n/* harmony import */ var vuetify_lib_components_VDialog_index_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vuetify/lib/components/VDialog/index.mjs */ \"./node_modules/vuetify/lib/components/VDialog/VDialog.mjs\");\n/* harmony import */ var vuetify_lib_components_VGrid_index_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vuetify/lib/components/VGrid/index.mjs */ \"./node_modules/vuetify/lib/components/VGrid/VCol.mjs\");\n/* harmony import */ var vuetify_lib_components_VGrid_index_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vuetify/lib/components/VGrid/index.mjs */ \"./node_modules/vuetify/lib/components/VGrid/VRow.mjs\");\n/* harmony import */ var vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vuetify/lib/components/VIcon/index.mjs */ \"./node_modules/vuetify/lib/components/VIcon/VIcon.mjs\");\n/* harmony import */ var vuetify_lib_components_VSheet_index_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! vuetify/lib/components/VSheet/index.mjs */ \"./node_modules/vuetify/lib/components/VSheet/VSheet.mjs\");\n\nconst _hoisted_1 = {\n class: \"d-flex align-center\"\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"d-flex align-center mb-3\"\n};\nconst _hoisted_3 = {\n class: \"d-flex align-center mb-2\"\n};\nconst _hoisted_4 = {\n class: \"d-flex justify-space-between align-center pa-4\"\n};\nconst _hoisted_5 = {\n class: \"d-flex justify-space-between align-center\"\n};\nconst _hoisted_6 = {\n class: \"text-red\"\n};\nconst _hoisted_7 = {\n class: \"text-black\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n \n \n \n \n const _component_a_employee_timeblock = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)(\"a-employee-timeblock\");\n \n \n \n \n \n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VGrid_index_mjs__WEBPACK_IMPORTED_MODULE_7__.VRow, {\n \"no-gutters\": \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VGrid_index_mjs__WEBPACK_IMPORTED_MODULE_6__.VCol, {\n cols: \"5\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VSheet_index_mjs__WEBPACK_IMPORTED_MODULE_9__.VSheet, {\n class: \"py-3\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__.VIcon, {\n icon: \"mdi-calendar-week\",\n size: \"large\"\n }), _cache[9] || (_cache[9] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"p\", {\n class: \"mx-3\"\n }, \"Trvanie\", -1 /* CACHED */))])]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VGrid_index_mjs__WEBPACK_IMPORTED_MODULE_6__.VCol, {\n cols: \"7\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VSheet_index_mjs__WEBPACK_IMPORTED_MODULE_9__.VSheet, {\n class: \"py-3\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [!$options.isOffice365Task ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__.VIcon, {\n class: \"add-date cursor-pointer mr-2\",\n icon: \"mdi-plus\",\n size: \"medium\",\n onClick: _cache[0] || (_cache[0] = $event => $data.showModal = true)\n }), _cache[10] || (_cache[10] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"p\", {\n class: \"task-badge rounded-pill\"\n }, \"Pridať záznam\", -1 /* CACHED */))])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.timeblocks, (timeblock, index) => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", {\n key: timeblock.id || `timeblock-${index}`,\n class: \"timeblock-item mb-3\"\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_3, [!$options.isOffice365Task ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__.VIcon, {\n key: 0,\n class: \"circle-border cursor-pointer mr-2\",\n icon: \"mdi-minus\",\n size: \"medium\",\n onClick: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)($event => $props.subtask.id ? $options.deleteTimeblock(timeblock) : $options.deleteTimeblockWithoutId(index), [\"stop\"])\n }, null, 8 /* PROPS */, [\"onClick\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"p\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([\"task-badge rounded-pill\", {\n 'strike-through': timeblock.is_finished\n }])\n }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($options.formatTimeblockStart(timeblock)) + \" - \" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($options.formatTimeblockEnd(timeblock)), 3 /* TEXT, CLASS */), !$options.isOffice365Task ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_8__.VIcon, {\n key: 1,\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([\"circle-border cursor-pointer ml-2\", {\n completed: timeblock.is_finished\n }]),\n icon: \"mdi-check\",\n size: \"medium\",\n onClick: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)($event => $options.toggleTimeblockIsFinished(timeblock), [\"stop\"])\n }, null, 8 /* PROPS */, [\"class\", \"onClick\"])), [[vue__WEBPACK_IMPORTED_MODULE_0__.vShow, $props.subtask.id]]) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Timeline Visualization for existing timeblock \"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"