feat(timeline): add visual indication for timeblocks outside working hours

This commit is contained in:
Matej Glasnák committed 2026-01-14 06:25:43 +01:00
1 parent 8b45543be5
commit fdb4452447
2 files changed
+34 -4

No files matched your search

+3 -3
View File
@@ -840,7 +840,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _no
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".timeline-scroll[data-v-5ca7dec4] {\\n overflow-x: auto;\\n overflow-y: hidden;\\n position: relative;\\n width: 100%;\\n scrollbar-width: none;\\n cursor: crosshair;\\n}\\n.timeline-scroll[data-v-5ca7dec4]::-webkit-scrollbar {\\n display: none;\\n}\\n.timeline-bar[data-v-5ca7dec4] {\\n position: relative;\\n height: 30px;\\n width: 1440px;\\n background: #fafafa;\\n border-radius: 4px;\\n}\\n@media (max-width: 768px) {\\n.timeline-bar[data-v-5ca7dec4] {\\n width: 1200px;\\n}\\n}\\n.non-working-hours[data-v-5ca7dec4] {\\n position: absolute;\\n top: 0;\\n height: 100%;\\n background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(224, 224, 224, 0.3) 10px, rgba(224, 224, 224, 0.3) 20px);\\n z-index: 1;\\n pointer-events: none;\\n}\\n.work-hours-bar[data-v-5ca7dec4] {\\n position: absolute;\\n top: 0;\\n height: 100%;\\n background: transparent;\\n z-index: 1;\\n pointer-events: none;\\n}\\n.weekend-overlay[data-v-5ca7dec4] {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n background: rgba(255, 124, 124, 0.3) !important;\\n z-index: 1;\\n pointer-events: none;\\n border-radius: 4px;\\n}\\n.scheduled-block[data-v-5ca7dec4] {\\n position: absolute;\\n top: 5px;\\n height: 22px;\\n background: #7f39fb;\\n border: 1px solid #6a1bf7;\\n opacity: 0.6;\\n border-radius: 2px;\\n z-index: 2;\\n pointer-events: none;\\n}\\n.scheduled-block--blocker[data-v-5ca7dec4] {\\n background: rgb(176, 0, 32);\\n border: 1px solid rgb(156, 0, 28);\\n opacity: 0.7;\\n}\\n.other-timeblock[data-v-5ca7dec4] {\\n position: absolute;\\n top: 5px;\\n height: 22px;\\n background: #FFA726;\\n opacity: 0.5;\\n border: 2px dashed #FF9800;\\n border-radius: 2px;\\n z-index: 2;\\n pointer-events: none;\\n}\\n.preview-block[data-v-5ca7dec4] {\\n position: absolute;\\n top: 5px;\\n height: 22px;\\n background: #4CAF50;\\n opacity: 0.6;\\n border: 2px dashed #388E3C;\\n border-radius: 2px;\\n z-index: 5;\\n cursor: crosshair;\\n transition: opacity 0.2s, box-shadow 0.2s;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n pointer-events: none;\\n}\\n.preview-block[data-v-5ca7dec4]:hover {\\n opacity: 0.8;\\n box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);\\n}\\n.preview-block.is-stretching[data-v-5ca7dec4] {\\n opacity: 0.8;\\n box-shadow: 0 4px 12px rgba(76, 175, 80, 0.6);\\n cursor: ew-resize;\\n}\\n.preview-time-label[data-v-5ca7dec4] {\\n font-size: 11px;\\n font-weight: 600;\\n color: white;\\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);\\n white-space: nowrap;\\n pointer-events: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n user-select: none;\\n}\\n.current-timeblock[data-v-5ca7dec4] {\\n position: absolute;\\n top: 5px;\\n height: 22px;\\n background: #2196F3;\\n opacity: 0.7;\\n border: 2px solid #1976D2;\\n border-radius: 2px;\\n z-index: 3;\\n transition: box-shadow 0.2s;\\n}\\n.current-timeblock.has-collision[data-v-5ca7dec4] {\\n border-color: #ff5252;\\n}\\n.current-timeblock.is-resizing[data-v-5ca7dec4] {\\n opacity: 0.8;\\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.6);\\n z-index: 6;\\n}\\n.resize-handle[data-v-5ca7dec4] {\\n position: absolute;\\n top: 0;\\n width: 8px;\\n height: 100%;\\n cursor: ew-resize;\\n z-index: 4;\\n}\\n.resize-handle[data-v-5ca7dec4]:hover {\\n background: rgba(255, 255, 255, 0.3);\\n}\\n.resize-handle--left[data-v-5ca7dec4] {\\n left: 0;\\n border-top-left-radius: 2px;\\n border-bottom-left-radius: 2px;\\n}\\n.resize-handle--right[data-v-5ca7dec4] {\\n right: 0;\\n border-top-right-radius: 2px;\\n border-bo Line truncated
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".timeline-scroll[data-v-5ca7dec4] {\\n overflow-x: auto;\\n overflow-y: hidden;\\n position: relative;\\n width: 100%;\\n scrollbar-width: none;\\n cursor: crosshair;\\n}\\n.timeline-scroll[data-v-5ca7dec4]::-webkit-scrollbar {\\n display: none;\\n}\\n.timeline-bar[data-v-5ca7dec4] {\\n position: relative;\\n height: 30px;\\n width: 1440px;\\n background: #fafafa;\\n border-radius: 4px;\\n}\\n@media (max-width: 768px) {\\n.timeline-bar[data-v-5ca7dec4] {\\n width: 1200px;\\n}\\n}\\n.non-working-hours[data-v-5ca7dec4] {\\n position: absolute;\\n top: 0;\\n height: 100%;\\n background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(224, 224, 224, 0.3) 10px, rgba(224, 224, 224, 0.3) 20px);\\n z-index: 1;\\n pointer-events: none;\\n}\\n.work-hours-bar[data-v-5ca7dec4] {\\n position: absolute;\\n top: 0;\\n height: 100%;\\n background: transparent;\\n z-index: 1;\\n pointer-events: none;\\n}\\n.weekend-overlay[data-v-5ca7dec4] {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n background: rgba(255, 124, 124, 0.3) !important;\\n z-index: 1;\\n pointer-events: none;\\n border-radius: 4px;\\n}\\n.scheduled-block[data-v-5ca7dec4] {\\n position: absolute;\\n top: 5px;\\n height: 22px;\\n background: #7f39fb;\\n border: 1px solid #6a1bf7;\\n opacity: 0.6;\\n border-radius: 2px;\\n z-index: 2;\\n pointer-events: none;\\n}\\n.scheduled-block--blocker[data-v-5ca7dec4] {\\n background: rgb(176, 0, 32);\\n border: 1px solid rgb(156, 0, 28);\\n opacity: 0.7;\\n}\\n.other-timeblock[data-v-5ca7dec4] {\\n position: absolute;\\n top: 5px;\\n height: 22px;\\n background: #FFA726;\\n opacity: 0.5;\\n border: 2px dashed #FF9800;\\n border-radius: 2px;\\n z-index: 2;\\n pointer-events: none;\\n}\\n.preview-block[data-v-5ca7dec4] {\\n position: absolute;\\n top: 5px;\\n height: 22px;\\n background: #4CAF50;\\n opacity: 0.6;\\n border: 2px dashed #388E3C;\\n border-radius: 2px;\\n z-index: 5;\\n cursor: crosshair;\\n transition: opacity 0.2s, box-shadow 0.2s;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n pointer-events: none;\\n}\\n.preview-block[data-v-5ca7dec4]:hover {\\n opacity: 0.8;\\n box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);\\n}\\n.preview-block.is-stretching[data-v-5ca7dec4] {\\n opacity: 0.8;\\n box-shadow: 0 4px 12px rgba(76, 175, 80, 0.6);\\n cursor: ew-resize;\\n}\\n.preview-time-label[data-v-5ca7dec4] {\\n font-size: 11px;\\n font-weight: 600;\\n color: white;\\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);\\n white-space: nowrap;\\n pointer-events: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n user-select: none;\\n}\\n.current-timeblock[data-v-5ca7dec4] {\\n position: absolute;\\n top: 5px;\\n height: 22px;\\n background: #2196F3;\\n opacity: 0.7;\\n border: 2px solid #1976D2;\\n border-radius: 2px;\\n z-index: 3;\\n transition: box-shadow 0.2s;\\n}\\n.current-timeblock.has-collision[data-v-5ca7dec4] {\\n border-color: #ff5252;\\n}\\n.current-timeblock.outside-working-hours[data-v-5ca7dec4] {\\n border-color: #ff0000;\\n}\\n.current-timeblock.is-resizing[data-v-5ca7dec4] {\\n opacity: 0.8;\\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.6);\\n z-index: 6;\\n}\\n.resize-handle[data-v-5ca7dec4] {\\n position: absolute;\\n top: 0;\\n width: 8px;\\n height: 100%;\\n cursor: ew-resize;\\n z-index: 4;\\n}\\n.resize-handle[data-v-5ca7dec4]:hover {\\n background: rgba(255, 255, 255, 0.3);\\n}\\n.resize-handle--left[data-v-5ca7dec4] {\\n left: 0;\\n border-top-left-radius: 2px;\\n border-bottom-left-radius: 2px;\\n}\\n.resize-h Line truncated
/***/ }),
@@ -1242,7 +1242,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_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __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_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __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_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_2__ = __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_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm-bundler.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _a_employee_timeblock_timeline_header_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./a-employee-timeblock-timeline-header.vue */ \"./src/plugins/tm@modal/task/_components/employees/a-employee-timeblock-timeline-header.vue\");\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (/*@__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_3__.defineComponent)({\n __name: 'a-employee-timeblock-timeline',\n props: {\n isLoading: {\n type: Boolean,\n required: true\n },\n employee: {\n type: Object,\n required: true\n },\n date: {\n type: [Date, String, null],\n required: true\n },\n scheduledBlocks: {\n type: Array,\n required: true\n },\n otherTimeblocks: {\n type: Array,\n required: false,\n default: () => []\n },\n currentTimeblockRange: {\n type: Object,\n required: true\n },\n collision: {\n type: Object,\n required: true\n },\n collisionSegments: {\n type: Array,\n required: true\n },\n timeblockDuration: {\n type: Number,\n required: true\n },\n startHour: {\n type: Number,\n required: true\n },\n endHour: {\n type: Number,\n required: true\n },\n hourWidth: {\n type: Number,\n required: true\n }\n },\n emits: [\"timeblockUpdated\"],\n setup(__props, {\n expose: __expose,\n emit: __emit\n }) {\n const props = __props;\n const emit = __emit;\n const timelineContainer = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n const timelineScroll = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n const timelineBar = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n // Check if mobile device\n const isMobile = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(false);\n // Interactive state\n const showPreview = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(false);\n const previewBlock = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n const dragState = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)({\n isStretching: false,\n isResizingCurrent: false,\n resizeEdge: null,\n startX: 0,\n initialStart: null,\n initialEnd: null\n });\n const resizedCurrentBlock = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n // Cursor line state\n const showCursor = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(false);\n const cursorPosition = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n // Check if the current date is a weekend (Saturday or Sunday)\n const isWeekend = (0,vue__WEBPACK_IMPORTED_MODULE_3__.computed)(() => {\n // Use the explicit date prop first, fallback to currentTimeblockRange.start\n const date = props.date || props.currentTimeblockRange.start;\n if (!date) return false;\n const dayOfWeek = moment__WEBPACK_IMPORTED_MODULE_4___default()(date).day(); // 0 = Sunday, 6 = Saturday\n return dayOfWeek === 0 || dayOfWeek === 6;\n });\n // Convert other timeblocks to renderable format\n const otherTimeblocksRendered = (0,vue__WEBPACK_IMPORTED_MODULE_3__.computed)(() => {\n Line truncated
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __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_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __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_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_2__ = __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_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm-bundler.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _a_employee_timeblock_timeline_header_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./a-employee-timeblock-timeline-header.vue */ \"./src/plugins/tm@modal/task/_components/employees/a-employee-timeblock-timeline-header.vue\");\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (/*@__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_3__.defineComponent)({\n __name: 'a-employee-timeblock-timeline',\n props: {\n isLoading: {\n type: Boolean,\n required: true\n },\n employee: {\n type: Object,\n required: true\n },\n date: {\n type: [Date, String, null],\n required: true\n },\n scheduledBlocks: {\n type: Array,\n required: true\n },\n otherTimeblocks: {\n type: Array,\n required: false,\n default: () => []\n },\n currentTimeblockRange: {\n type: Object,\n required: true\n },\n collision: {\n type: Object,\n required: true\n },\n collisionSegments: {\n type: Array,\n required: true\n },\n timeblockDuration: {\n type: Number,\n required: true\n },\n startHour: {\n type: Number,\n required: true\n },\n endHour: {\n type: Number,\n required: true\n },\n hourWidth: {\n type: Number,\n required: true\n }\n },\n emits: [\"timeblockUpdated\"],\n setup(__props, {\n expose: __expose,\n emit: __emit\n }) {\n const props = __props;\n const emit = __emit;\n const timelineContainer = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n const timelineScroll = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n const timelineBar = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n // Check if mobile device\n const isMobile = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(false);\n // Interactive state\n const showPreview = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(false);\n const previewBlock = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n const dragState = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)({\n isStretching: false,\n isResizingCurrent: false,\n resizeEdge: null,\n startX: 0,\n initialStart: null,\n initialEnd: null\n });\n const resizedCurrentBlock = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n // Cursor line state\n const showCursor = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(false);\n const cursorPosition = (0,vue__WEBPACK_IMPORTED_MODULE_3__.ref)(null);\n // Check if the current date is a weekend (Saturday or Sunday)\n const isWeekend = (0,vue__WEBPACK_IMPORTED_MODULE_3__.computed)(() => {\n // Use the explicit date prop first, fallback to currentTimeblockRange.start\n const date = props.date || props.currentTimeblockRange.start;\n if (!date) return false;\n const dayOfWeek = moment__WEBPACK_IMPORTED_MODULE_4___default()(date).day(); // 0 = Sunday, 6 = Saturday\n return dayOfWeek === 0 || dayOfWeek === 6;\n });\n // Check if the current timeblock is outside working hours\n const isOutsideWorkingHours = (0,vue__WEBPACK_IMPORTED_MODULE_3__.computed)(() Line truncated
/***/ }),
@@ -1319,7 +1319,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\nconst _hoisted_1 = {\n class: \"timeline\"\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"timeline-loading\"\n};\nconst _hoisted_3 = {\n key: 1,\n ref: \"timelineContainer\",\n class: \"timeline__content\"\n};\nconst _hoisted_4 = {\n ref: \"timelineBar\",\n class: \"timeline-bar\"\n};\nconst _hoisted_5 = {\n key: 0,\n class: \"weekend-overlay\"\n};\nconst _hoisted_6 = [\"title\"];\nconst _hoisted_7 = {\n class: \"preview-time-label\"\n};\nconst _hoisted_8 = {\n key: 0\n};\nconst _hoisted_9 = {\n key: 1\n};\nconst _hoisted_10 = {\n key: 0,\n class: \"timeblock-duration\"\n};\nconst _hoisted_11 = {\n key: 0,\n class: \"preview-time-label\"\n};\nconst _hoisted_12 = {\n key: 1,\n class: \"preview-time-label\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_1, [$props.isLoading ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_2, [...(_cache[2] || (_cache[2] = [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", null, \"Načítavam...\", -1 /* CACHED */)]))])) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n ref: \"timelineScroll\",\n class: \"timeline-scroll\",\n onMousemove: $setup.handleMouseMove,\n onMouseleave: $setup.handleMouseLeave,\n onMousedown: $setup.handleTimelineMouseDown\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup[\"AEmployeeTimeblockTimelineHeader\"], {\n \"start-hour\": $props.startHour,\n \"end-hour\": $props.endHour,\n \"hour-width\": $props.hourWidth\n }, null, 8 /* PROPS */, [\"start-hour\", \"end-hour\", \"hour-width\"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Non-working hours - before work \"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: \"non-working-hours\",\n style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({\n left: '0px',\n width: `${$setup.getHourPosition($props.employee.work_start)}px`\n })\n }, null, 4 /* STYLE */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Non-working hours - after work \"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: \"non-working-hours\",\n style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({\n left: `${$setup.getHourPosition($props.employee.work_end)}px`,\n width: `${$setup.getHourWidth(24 - $props.employee.work_end)}px`\n })\n }, null, 4 /* STYLE */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Work hours background (transparent/white) \"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: \"work-hours-bar\",\n style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({\n left: `${$setup.getHourPosition($props.employee.work_start)}px`,\n width: `${$setup.getHourWidth($props.employee.work_end - $props.employee.work_start)}px`\n })\n }, null, 4 /* STYLE */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Weekend background overlay \"), $setup.isWeekend ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_5)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Existing scheduled blocks \"), ((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.scheduledBlocks, (task, index) => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", {\n key: `task-${index}`,\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([\"scheduled-block\", {\n 'scheduled-block--blocker': ['blocker', 'adhoc', 'home_office', 'vacation', 'free_day', 'office365_blocker'].includes(task.type)\n }]),\n style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({\n left: `${$setup.getTimePosition(task._real_start)}px`,\n width: `${$setup.getTimeWidth(task._real_start, task._real_end)}px`\n }),\n title: `${task.subtask?.title || taskLine truncated
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\nconst _hoisted_1 = {\n class: \"timeline\"\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"timeline-loading\"\n};\nconst _hoisted_3 = {\n key: 1,\n ref: \"timelineContainer\",\n class: \"timeline__content\"\n};\nconst _hoisted_4 = {\n ref: \"timelineBar\",\n class: \"timeline-bar\"\n};\nconst _hoisted_5 = {\n key: 0,\n class: \"weekend-overlay\"\n};\nconst _hoisted_6 = [\"title\"];\nconst _hoisted_7 = {\n class: \"preview-time-label\"\n};\nconst _hoisted_8 = {\n key: 0\n};\nconst _hoisted_9 = {\n key: 1\n};\nconst _hoisted_10 = {\n key: 0,\n class: \"timeblock-duration\"\n};\nconst _hoisted_11 = {\n key: 0,\n class: \"preview-time-label\"\n};\nconst _hoisted_12 = {\n key: 1,\n class: \"preview-time-label\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_1, [$props.isLoading ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_2, [...(_cache[2] || (_cache[2] = [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", null, \"Načítavam...\", -1 /* CACHED */)]))])) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n ref: \"timelineScroll\",\n class: \"timeline-scroll\",\n onMousemove: $setup.handleMouseMove,\n onMouseleave: $setup.handleMouseLeave,\n onMousedown: $setup.handleTimelineMouseDown\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)($setup[\"AEmployeeTimeblockTimelineHeader\"], {\n \"start-hour\": $props.startHour,\n \"end-hour\": $props.endHour,\n \"hour-width\": $props.hourWidth\n }, null, 8 /* PROPS */, [\"start-hour\", \"end-hour\", \"hour-width\"]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Non-working hours - before work \"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: \"non-working-hours\",\n style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({\n left: '0px',\n width: `${$setup.getHourPosition($props.employee.work_start)}px`\n })\n }, null, 4 /* STYLE */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Non-working hours - after work \"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: \"non-working-hours\",\n style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({\n left: `${$setup.getHourPosition($props.employee.work_end)}px`,\n width: `${$setup.getHourWidth(24 - $props.employee.work_end)}px`\n })\n }, null, 4 /* STYLE */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Work hours background (transparent/white) \"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: \"work-hours-bar\",\n style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({\n left: `${$setup.getHourPosition($props.employee.work_start)}px`,\n width: `${$setup.getHourWidth($props.employee.work_end - $props.employee.work_start)}px`\n })\n }, null, 4 /* STYLE */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Weekend background overlay \"), $setup.isWeekend ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_5)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" Existing scheduled blocks \"), ((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.scheduledBlocks, (task, index) => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", {\n key: `task-${index}`,\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)([\"scheduled-block\", {\n 'scheduled-block--blocker': ['blocker', 'adhoc', 'home_office', 'vacation', 'free_day', 'office365_blocker'].includes(task.type)\n }]),\n style: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle)({\n left: `${$setup.getTimePosition(task._real_start)}px`,\n width: `${$setup.getTimeWidth(task._real_start, task._real_end)}px`\n }),\n title: `${task.subtask?.title || taskLine truncated
/***/ }),