diff --git a/app/dist/js/index.js b/app/dist/js/index.js index 5f99b42..7b0fb95 100644 --- a/app/dist/js/index.js +++ b/app/dist/js/index.js @@ -873,7 +873,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core /***/ (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 _vuepic_vue_datepicker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vuepic/vue-datepicker */ \"./node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js\");\n/* harmony import */ var _plugins_tm_components_z_files_upload_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/plugins/tm@_components/z-files-upload.vue */ \"./src/plugins/tm@_components/z-files-upload.vue\");\n/* harmony import */ var _plugins_tm_modal_task_components_components_a_task_timeblocks_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue */ \"./src/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue\");\n/* harmony import */ var _vuelidate_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @vuelidate/core */ \"./node_modules/@vuelidate/core/dist/index.esm.js\");\n/* harmony import */ var _vuelidate_validators__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @vuelidate/validators */ \"./node_modules/@vuelidate/validators/dist/index.esm.js\");\n/* harmony import */ var _plugins_lib_auth_utils_error_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/plugins/lib@auth/_utils/error.utils */ \"./src/plugins/lib@auth/_utils/error.utils.ts\");\n/* harmony import */ var _vueup_vue_quill__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @vueup/vue-quill */ \"./node_modules/@vueup/vue-quill/dist/vue-quill.esm-bundler.js\");\n/* harmony import */ var _plugins_tm_modal_mixins_vuetify_fix_focus__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/plugins/tm@modal/_mixins/vuetify-fix-focus */ \"./src/plugins/tm@modal/_mixins/vuetify-fix-focus.ts\");\n/* harmony import */ var _master_task_mixins_selects_mixin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../master-task/_mixins/selects.mixin */ \"./src/plugins/tm@modal/master-task/_mixins/selects.mixin.ts\");\n/* harmony import */ var file_saver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! file-saver */ \"./node_modules/file-saver/dist/FileSaver.min.js\");\n/* harmony import */ var file_saver__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/plugins/tm@_utils/tm.utils */ \"./src/plugins/tm@_utils/tm.utils.ts\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _vueup_vue_quill_dist_vue_quill_snow_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @vueup/vue-quill/dist/vue-quill.snow.css */ \"./node_modules/@vueup/vue-quill/dist/vue-quill.snow.css\");\n/* harmony import */ var _vueup_vue_quill_dist_vue_quill_snow_css__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_vueup_vue_quill_dist_vue_quill_snow_css__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _plugins_tm_mixins_autocomplete_mixin__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/plugins/tm@_mixins/autocomplete.mixin */ \"./src/plugins/tm@_mixins/autocomplete.mixin.ts\");\n/* harmony import */ var _components_z_task_readonly_info_vue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./_components/z-task-readonly-info.vue */ \"./src/plugins/tm@modal/task/_components/z-task-readonly-info.vue\");\n/* harmony import */ var _components_a_timeblock_vue__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./_components/a-timeblock.vue */ \"./src/plugins/tm@modal/task/_components/a-timeblock.vue\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm-bundler.js\");\n/* harmony import */ var _plugins_tm_modal_mixins_modal_mixin__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/plugins/tm@modal/_mixins/modal.mixin */ \"./src/plugins/tm@modal/_mixins/modal.mixin.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\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n emits: ['close', 'refresh'],\n mixins: [_plugins_tm_modal_mixins_vuetify_fix_focus__WEBPACK_IMPORTED_MODULE_7__[\"default\"], _master_task_mixins_selects_mixin__WEBPACK_IMPORTED_MODULE_8__[\"default\"], _plugins_tm_mixins_autocomplete_mixin__WEBPACK_IMPORTED_MODULE_13__[\"default\"], _plugins_tm_modal_mixins_modal_mixin__WEBPACK_IMPORTED_MODULE_16__[\"default\"]],\n components: {\n ZTaskReadonlyInfo: _components_z_task_readonly_info_vue__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n ATimeblock: _components_a_timeblock_vue__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n ZFilesUpload: _plugins_tm_components_z_files_upload_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n Datepicker: _vuepic_vue_datepicker__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n // ATaskTimeblocks,\n QuillEditor: _vueup_vue_quill__WEBPACK_IMPORTED_MODULE_6__.QuillEditor\n },\n data() {\n return {\n tmUtils: _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n editMode: false,\n visible: false,\n subtask: null,\n isSaving: false,\n errorUtils: _plugins_lib_auth_utils_error_utils__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n v$: (0,_vuelidate_core__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(),\n employeeValidations: [],\n showDatePicker: false,\n selectedNewDate: [],\n timeblocks: [{\n date: null,\n starts_at_time: null,\n ends_at_time: null\n }]\n };\n },\n computed: {\n ...(0,vuex__WEBPACK_IMPORTED_MODULE_17__.mapGetters)('tm', ['mastertasks', 'enrichedEmployees'])\n },\n validations() {\n return {\n subtask: {\n master_task_id: {\n required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_18__.required\n },\n deadline: {\n required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_18__.required\n },\n _deadline_time: {\n required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_18__.required\n }\n }\n };\n },\n mounted() {\n this.$events.on('add-timeblock', timeblock => {\n if (!this.subtask?.timeblocks) {\n this.subtask.timeblocks = [];\n }\n if (!this.subtask?.timesheets) {\n this.subtask.timesheets = [];\n }\n if (!this.subtask?.is_finished) {\n this.subtask.is_finished = 0;\n }\n this.subtask.timeblocks.push(timeblock);\n });\n this.$events.on('on-subtask-edited', subtask => {\n if (subtask?.id !== this.subtask?.id) return;\n const data = JSON.parse(JSON.stringify(subtask));\n const splittedDeadline = data.deadline?.split(' ') || [];\n data.deadline = splittedDeadline[0];\n data._deadline_time = splittedDeadline[1];\n this.subtask = this._enrichTask(data);\n\n // TODO: Remove? riesil som neodstranovanie jedineho zanamu v trvani a odpracovanom case\n console.log('2', this.subtask);\n this.$forceUpdate();\n });\n this.$events.on('on-subtask-deleted', subtask => {\n if (subtask?.id == this.subtask?.id) this.closeModal();\n });\n },\n methods: {\n toggleEditMode() {\n if (this.subtask.type == 'office365') return this.$events.emit('show-unable-to-edit-office-task-modal', {\n mode: 'edit'\n });\n this.editMode = !this.editMode;\n },\n openDatepicker(ref) {\n this.$refs[ref].openMenu();\n },\n updateTimeblock(val, index) {\n this.timeblocks[index] = val;\n },\n removeTimeblock(index) {\n this.timeblocks.splice(index, 1);\n },\n async showModal({\n subtask,\n editMode = false,\n mastertask = {}\n }) {\n this.isSaving = false;\n this.subtask = null;\n this.visible = true;\n this.timeblocks = [{\n date: null,\n starts_at_time: null,\n ends_at_time: null\n }];\n this.$nextTick(() => {\n this.v$.$reset();\n this.setFocusEvent();\n });\n try {\n if (subtask?.id) {\n const data = await this.$axios.get_auth_data(`v1/subtasks/${subtask.id}`);\n if (!data.deadline) {\n this.editMode = editMode || !data.id;\n return this.subtask = this._enrichTask(data);\n }\n const splittedDeadline = data.deadline.split(' ');\n data.deadline = splittedDeadline[0];\n data._deadline_time = splittedDeadline[1];\n this.subtask = this._enrichTask(data);\n } else {\n const savedSubtask = localStorage.getItem('subtaskData');\n try {\n if (savedSubtask) {\n const parsedSubtask = JSON.parse(savedSubtask);\n this.subtask = parsedSubtask;\n // If the parsed result is not an object, reset to default\n if (typeof this.subtask !== 'object' || this.subtask === null) {\n throw new Error('Parsed subtask is not an object');\n }\n this.$nextTick(() => {\n this.$refs['description']?.setHTML(this.subtask.description || '');\n });\n } else {\n throw new Error('subtaskData is null or undefined');\n }\n } catch (error) {\n console.error('Error parsing subtaskData:', error);\n this.subtask = {\n master_task: mastertask,\n employees: [{}],\n _deadline_time: '17:00'\n };\n }\n if (subtask?.deadline && subtask._deadline_time && subtask.employee_id) {\n const employee = this.enrichedEmployees.find(employee => employee.id == subtask.employee_id);\n this.subtask.employees = [employee];\n this.subtask.deadline = subtask.deadline;\n this.subtask._deadline_time = subtask._deadline_time;\n }\n if (subtask?.master_task_id && subtask?.project_code) {\n this.subtask.master_task_id = subtask.master_task_id;\n this.subtask.project_code = subtask.project_code;\n }\n }\n this.editMode = editMode || !this.subtask.id;\n } catch (error) {\n this.$toast.error(this.$parseError(error));\n if (true) console.log('[z-task-modal.vue] Error: ', error);\n }\n },\n deleteTimeblock(i) {\n this.subtask.timeblocks.splice(i, 1);\n },\n closeModal() {\n this.visible = false;\n this.$router.replace({\n name: this.$route.name\n });\n },\n async save() {\n const employeesValid = await this._validateEmployees();\n const timeblocksValid = this.subtask?.id ? true : await this._validateTimeblocks();\n if (!(await this.v$.$validate())) return;\n if (!employeesValid || !timeblocksValid) return;\n this.subtask.description = this.$refs['description'].getHTML();\n this._mergeDeadlineTimeDate();\n try {\n this.isSaving = true;\n this.subtask.deadline = moment__WEBPACK_IMPORTED_MODULE_11___default()(this.subtask.deadline).format('YYYY-MM-DD HH:mm:SS');\n if (this.subtask?.id) {\n const timesheets = this.subtask.timesheets.map(timesheet => {\n delete timesheet.employee_name;\n return timesheet;\n });\n const {\n subtask\n } = await this.$axios.patch_auth_form(`v1/subtasks/${this.subtask.id}`, {\n ...this.subtask,\n timesheets\n });\n localStorage.removeItem('subtaskData');\n this.$store.commit('tm/update_subtask', subtask);\n this.$events.emit('on-subtask-edited', this.subtask);\n } else {\n this.subtask.employees.forEach(employee => {\n if (employee.id) employee.timeblocks = this.timeblocks.filter(timeblock => timeblock.date).map(timeblock => {\n return {\n start: `${moment__WEBPACK_IMPORTED_MODULE_11___default()(timeblock.date).format('YYYY-MM-DD')} ${timeblock.starts_at_time}:00`,\n end: `${moment__WEBPACK_IMPORTED_MODULE_11___default()(timeblock.date).format('YYYY-MM-DD')} ${timeblock.ends_at_time}:00`,\n id: null\n };\n });\n });\n const subtaskCopy = this.subtask;\n delete subtaskCopy._master_task;\n const {\n subtasks\n } = await this.$axios.post_auth(`v1/mastertasks/${this.subtask.master_task_id}/subtasks`, subtaskCopy);\n localStorage.removeItem('subtaskData');\n this.subtask.id = subtasks[0].id;\n subtasks.forEach(subtask => {\n this.$store.commit('tm/update_subtask', subtask);\n this.$events.emit('on-subtask-edited', this.subtask);\n });\n this.$events.emit('task-created');\n this.$events.emit('close-both-modals');\n }\n this.closeModal();\n } catch (error) {\n this.$toast.error(this.$parseError(error));\n if (true) console.log('[z-task-modal.vue] Error: ', error);\n } finally {\n this.isSaving = false;\n }\n },\n openDeleteTaskModal(subtask) {\n if (subtask.type == 'office365') return this.$events.emit('show-unable-to-edit-office-task-modal', {\n mode: 'delete'\n });\n this.$events.emit('show-delete-task-modal', {\n subtask\n });\n },\n showCompleteTaskModal() {\n this.$events.emit('show-complete-task-modal', {\n subtask: this.subtask\n });\n if (this.subtask.deadline) this.subtask.deadline = _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_10__[\"default\"].formatDateTimeForBackend(this.subtask.deadline);\n },\n filesUploaded(files) {\n this.subtask.files = files;\n },\n updateSubtask(subtask) {\n this.subtask = subtask;\n },\n _mergeDeadlineTimeDate() {\n const date = new Date(this.subtask.deadline);\n console.log('z-task-modal', this.subtask);\n const timeParts = this.subtask._deadline_time.split(':');\n date.setHours(parseInt(timeParts[0]));\n date.setMinutes(parseInt(timeParts[1]));\n this.subtask.deadline = date;\n },\n _validateEmployees() {\n return new Promise(resolve => {\n this.employeeValidations = [];\n if (this.subtask.id) {\n if (this.subtask.employee && this.subtask.duration) return;\n this.employeeValidations[0] = {};\n if (!this.subtask.employee_id) this.employeeValidations[0].employee = true;\n if (!this.subtask.duration) this.employeeValidations[0].duration = true;\n } else {\n this.subtask.employees.forEach((employee, index) => {\n if (index == this.subtask.employees.length - 1 && index > 0) return; // Skip the last which is allways empty\n\n if (employee.id && employee.duration) return;\n this.employeeValidations[index] = {};\n if (!employee.id) this.employeeValidations[index].employee = true;\n if (!employee.duration) this.employeeValidations[index].duration = true;\n });\n }\n const isError = this.employeeValidations.some(employee => employee.duration || employee.employee);\n resolve(!isError);\n });\n },\n async _validateTimeblocks() {\n let invalid = false;\n for (let i = 0; i < this.timeblocks.length; i++) {\n const ref = this.$refs[`timetable-${i}`];\n invalid = (await ref[0].v$.$validate()) || invalid;\n }\n return invalid;\n },\n _enrichTask(subtask) {\n return {\n ...subtask,\n _created_by: this.enrichedEmployees.find(employee => employee.id == subtask.created_by),\n _employee: this.enrichedEmployees.find(employee => employee.id == subtask.employee_id),\n _master_task: this.mastertasks.find(mastertask => mastertask.id == subtask.master_task_id)\n };\n }\n },\n watch: {\n 'subtask.employee_id'(value, oldValue) {\n if (!value || !oldValue) return;\n this.subtask.timeblocks = [];\n this.subtask._employee = this.enrichedEmployees.find(employee => employee.id == this.subtask.employee_id);\n },\n 'subtask.employees': {\n handler() {\n if (!this.subtask?.employees) return;\n const lastEmployee = this.subtask.employees[this.subtask.employees.length - 1];\n if (lastEmployee.id || lastEmployee.duration) this.subtask.employees.push({});\n },\n deep: true\n },\n 'subtask.master_task_id'(value) {\n if (!value) return;\n this.subtask._master_task = this.mastertasks.find(mastertask => mastertask.id == this.subtask.master_task_id);\n this.subtask.project_code = this.subtask._master_task?.project_code || null;\n },\n editMode() {\n this.$nextTick(() => {\n this.$refs['description']?.setHTML(this.subtask.description || '');\n });\n },\n subtask: {\n handler(val) {\n if (this.editMode && !this.subtask?.id) {\n localStorage.setItem('subtaskData', JSON.stringify(val));\n }\n },\n deep: true\n }\n }\n});\n\n//# sourceURL=webpack://jandl/./src/plugins/tm@modal/task/z-task-modal.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"); +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 _vuepic_vue_datepicker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vuepic/vue-datepicker */ \"./node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js\");\n/* harmony import */ var _plugins_tm_components_z_files_upload_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/plugins/tm@_components/z-files-upload.vue */ \"./src/plugins/tm@_components/z-files-upload.vue\");\n/* harmony import */ var _plugins_tm_modal_task_components_components_a_task_timeblocks_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue */ \"./src/plugins/tm@modal/task/_components/_components/a-task-timeblocks.vue\");\n/* harmony import */ var _vuelidate_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @vuelidate/core */ \"./node_modules/@vuelidate/core/dist/index.esm.js\");\n/* harmony import */ var _vuelidate_validators__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @vuelidate/validators */ \"./node_modules/@vuelidate/validators/dist/index.esm.js\");\n/* harmony import */ var _plugins_lib_auth_utils_error_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/plugins/lib@auth/_utils/error.utils */ \"./src/plugins/lib@auth/_utils/error.utils.ts\");\n/* harmony import */ var _vueup_vue_quill__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @vueup/vue-quill */ \"./node_modules/@vueup/vue-quill/dist/vue-quill.esm-bundler.js\");\n/* harmony import */ var _plugins_tm_modal_mixins_vuetify_fix_focus__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/plugins/tm@modal/_mixins/vuetify-fix-focus */ \"./src/plugins/tm@modal/_mixins/vuetify-fix-focus.ts\");\n/* harmony import */ var _master_task_mixins_selects_mixin__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../master-task/_mixins/selects.mixin */ \"./src/plugins/tm@modal/master-task/_mixins/selects.mixin.ts\");\n/* harmony import */ var file_saver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! file-saver */ \"./node_modules/file-saver/dist/FileSaver.min.js\");\n/* harmony import */ var file_saver__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/plugins/tm@_utils/tm.utils */ \"./src/plugins/tm@_utils/tm.utils.ts\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _vueup_vue_quill_dist_vue_quill_snow_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @vueup/vue-quill/dist/vue-quill.snow.css */ \"./node_modules/@vueup/vue-quill/dist/vue-quill.snow.css\");\n/* harmony import */ var _vueup_vue_quill_dist_vue_quill_snow_css__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_vueup_vue_quill_dist_vue_quill_snow_css__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _plugins_tm_mixins_autocomplete_mixin__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @/plugins/tm@_mixins/autocomplete.mixin */ \"./src/plugins/tm@_mixins/autocomplete.mixin.ts\");\n/* harmony import */ var _components_z_task_readonly_info_vue__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./_components/z-task-readonly-info.vue */ \"./src/plugins/tm@modal/task/_components/z-task-readonly-info.vue\");\n/* harmony import */ var _components_a_timeblock_vue__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./_components/a-timeblock.vue */ \"./src/plugins/tm@modal/task/_components/a-timeblock.vue\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm-bundler.js\");\n/* harmony import */ var _plugins_tm_modal_mixins_modal_mixin__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @/plugins/tm@modal/_mixins/modal.mixin */ \"./src/plugins/tm@modal/_mixins/modal.mixin.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\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n emits: ['close', 'refresh'],\n mixins: [_plugins_tm_modal_mixins_vuetify_fix_focus__WEBPACK_IMPORTED_MODULE_7__[\"default\"], _master_task_mixins_selects_mixin__WEBPACK_IMPORTED_MODULE_8__[\"default\"], _plugins_tm_mixins_autocomplete_mixin__WEBPACK_IMPORTED_MODULE_13__[\"default\"], _plugins_tm_modal_mixins_modal_mixin__WEBPACK_IMPORTED_MODULE_16__[\"default\"]],\n components: {\n ZTaskReadonlyInfo: _components_z_task_readonly_info_vue__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n ATimeblock: _components_a_timeblock_vue__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n ZFilesUpload: _plugins_tm_components_z_files_upload_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n Datepicker: _vuepic_vue_datepicker__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n // ATaskTimeblocks,\n QuillEditor: _vueup_vue_quill__WEBPACK_IMPORTED_MODULE_6__.QuillEditor\n },\n data() {\n return {\n tmUtils: _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n editMode: false,\n visible: false,\n subtask: null,\n isSaving: false,\n errorUtils: _plugins_lib_auth_utils_error_utils__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n v$: (0,_vuelidate_core__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(),\n employeeValidations: [],\n showDatePicker: false,\n selectedNewDate: [],\n timeblocks: [{\n date: null,\n starts_at_time: null,\n ends_at_time: null\n }],\n wasFormValidationTriggered: false\n };\n },\n computed: {\n ...(0,vuex__WEBPACK_IMPORTED_MODULE_17__.mapGetters)('tm', ['mastertasks', 'enrichedEmployees'])\n },\n validations() {\n return {\n subtask: {\n master_task_id: {\n required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_18__.required\n },\n deadline: {\n required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_18__.required\n },\n _deadline_time: {\n required: _vuelidate_validators__WEBPACK_IMPORTED_MODULE_18__.required\n }\n }\n };\n },\n mounted() {\n this.$events.on('add-timeblock', timeblock => {\n if (!this.subtask?.timeblocks) {\n this.subtask.timeblocks = [];\n }\n if (!this.subtask?.timesheets) {\n this.subtask.timesheets = [];\n }\n if (!this.subtask?.is_finished) {\n this.subtask.is_finished = 0;\n }\n this.subtask.timeblocks.push(timeblock);\n });\n this.$events.on('on-subtask-edited', subtask => {\n if (subtask?.id !== this.subtask?.id) return;\n const data = JSON.parse(JSON.stringify(subtask));\n const splittedDeadline = data.deadline?.split(' ') || [];\n data.deadline = splittedDeadline[0];\n data._deadline_time = splittedDeadline[1];\n this.subtask = this._enrichTask(data);\n\n // TODO: Remove? riesil som neodstranovanie jedineho zanamu v trvani a odpracovanom case\n console.log('2', this.subtask);\n this.$forceUpdate();\n });\n this.$events.on('on-subtask-deleted', subtask => {\n if (subtask?.id == this.subtask?.id) this.closeModal();\n });\n },\n methods: {\n toggleEditMode() {\n if (this.subtask.type == 'office365') return this.$events.emit('show-unable-to-edit-office-task-modal', {\n mode: 'edit'\n });\n this.editMode = !this.editMode;\n },\n openDatepicker(ref) {\n this.$refs[ref].openMenu();\n },\n updateTimeblock(val, index) {\n this.timeblocks[index] = val;\n },\n removeTimeblock(index) {\n this.timeblocks.splice(index, 1);\n },\n async showModal({\n subtask,\n editMode = false,\n mastertask = {}\n }) {\n this.isSaving = false;\n this.subtask = null;\n this.visible = true;\n this.timeblocks = [{\n date: null,\n starts_at_time: null,\n ends_at_time: null\n }];\n this.$nextTick(() => {\n this.v$.$reset();\n this.setFocusEvent();\n });\n try {\n if (subtask?.id) {\n const data = await this.$axios.get_auth_data(`v1/subtasks/${subtask.id}`);\n if (!data.deadline) {\n this.editMode = editMode || !data.id;\n return this.subtask = this._enrichTask(data);\n }\n const splittedDeadline = data.deadline.split(' ');\n data.deadline = splittedDeadline[0];\n data._deadline_time = splittedDeadline[1];\n this.subtask = this._enrichTask(data);\n } else {\n const savedSubtask = localStorage.getItem('subtaskData');\n try {\n if (savedSubtask) {\n const parsedSubtask = JSON.parse(savedSubtask);\n this.subtask = parsedSubtask;\n // If the parsed result is not an object, reset to default\n if (typeof this.subtask !== 'object' || this.subtask === null) {\n throw new Error('Parsed subtask is not an object');\n }\n this.$nextTick(() => {\n this.$refs['description']?.setHTML(this.subtask.description || '');\n });\n } else {\n throw new Error('subtaskData is null or undefined');\n }\n } catch (error) {\n console.error('Error parsing subtaskData:', error);\n this.subtask = {\n master_task: mastertask,\n employees: [{}],\n _deadline_time: '17:00'\n };\n }\n if (subtask?.deadline && subtask._deadline_time && subtask.employee_id) {\n const employee = this.enrichedEmployees.find(employee => employee.id == subtask.employee_id);\n this.subtask.employees = [employee];\n this.subtask.deadline = subtask.deadline;\n this.subtask._deadline_time = subtask._deadline_time;\n }\n if (subtask?.master_task_id && subtask?.project_code) {\n this.subtask.master_task_id = subtask.master_task_id;\n this.subtask.project_code = subtask.project_code;\n }\n }\n this.editMode = editMode || !this.subtask.id;\n } catch (error) {\n this.$toast.error(this.$parseError(error));\n if (true) console.log('[z-task-modal.vue] Error: ', error);\n }\n },\n deleteTimeblock(i) {\n this.subtask.timeblocks.splice(i, 1);\n },\n closeModal() {\n this.visible = false;\n this.$router.replace({\n name: this.$route.name\n });\n },\n async validateAllFields() {\n const employeesValid = await this._validateEmployees();\n const timeblocksValid = this.subtask?.id ? true : await this._validateTimeblocks();\n if (!(await this.v$.$validate())) return;\n if (!employeesValid || !timeblocksValid) return;\n },\n async handleOnRemoveEmployee() {\n if (this.wasFormValidationTriggered) {\n setTimeout(async () => {\n this.validateAllFields();\n }, 100);\n }\n },\n async save() {\n this.wasFormValidationTriggered = true;\n if (!(await this.validateAllFields())) return;\n this.subtask.description = this.$refs['description'].getHTML();\n this._mergeDeadlineTimeDate();\n try {\n this.isSaving = true;\n this.subtask.deadline = moment__WEBPACK_IMPORTED_MODULE_11___default()(this.subtask.deadline).format('YYYY-MM-DD HH:mm:SS');\n if (this.subtask?.id) {\n const timesheets = this.subtask.timesheets.map(timesheet => {\n delete timesheet.employee_name;\n return timesheet;\n });\n const {\n subtask\n } = await this.$axios.patch_auth_form(`v1/subtasks/${this.subtask.id}`, {\n ...this.subtask,\n timesheets\n });\n localStorage.removeItem('subtaskData');\n this.$store.commit('tm/update_subtask', subtask);\n this.$events.emit('on-subtask-edited', this.subtask);\n } else {\n this.subtask.employees.forEach(employee => {\n if (employee.id) employee.timeblocks = this.timeblocks.filter(timeblock => timeblock.date).map(timeblock => {\n return {\n start: `${moment__WEBPACK_IMPORTED_MODULE_11___default()(timeblock.date).format('YYYY-MM-DD')} ${timeblock.starts_at_time}:00`,\n end: `${moment__WEBPACK_IMPORTED_MODULE_11___default()(timeblock.date).format('YYYY-MM-DD')} ${timeblock.ends_at_time}:00`,\n id: null\n };\n });\n });\n const subtaskCopy = this.subtask;\n delete subtaskCopy._master_task;\n const {\n subtasks\n } = await this.$axios.post_auth(`v1/mastertasks/${this.subtask.master_task_id}/subtasks`, subtaskCopy);\n localStorage.removeItem('subtaskData');\n this.subtask.id = subtasks[0].id;\n subtasks.forEach(subtask => {\n this.$store.commit('tm/update_subtask', subtask);\n this.$events.emit('on-subtask-edited', this.subtask);\n });\n this.$events.emit('task-created');\n this.$events.emit('close-both-modals');\n }\n this.closeModal();\n } catch (error) {\n this.$toast.error(this.$parseError(error));\n if (true) console.log('[z-task-modal.vue] Error: ', error);\n } finally {\n this.isSaving = false;\n }\n },\n openDeleteTaskModal(subtask) {\n if (subtask.type == 'office365') return this.$events.emit('show-unable-to-edit-office-task-modal', {\n mode: 'delete'\n });\n this.$events.emit('show-delete-task-modal', {\n subtask\n });\n },\n showCompleteTaskModal() {\n this.$events.emit('show-complete-task-modal', {\n subtask: this.subtask\n });\n if (this.subtask.deadline) this.subtask.deadline = _plugins_tm_utils_tm_utils__WEBPACK_IMPORTED_MODULE_10__[\"default\"].formatDateTimeForBackend(this.subtask.deadline);\n },\n filesUploaded(files) {\n this.subtask.files = files;\n },\n updateSubtask(subtask) {\n this.subtask = subtask;\n },\n _mergeDeadlineTimeDate() {\n const date = new Date(this.subtask.deadline);\n console.log('z-task-modal', this.subtask);\n const timeParts = this.subtask._deadline_time.split(':');\n date.setHours(parseInt(timeParts[0]));\n date.setMinutes(parseInt(timeParts[1]));\n this.subtask.deadline = date;\n },\n _validateEmployees() {\n return new Promise(resolve => {\n this.employeeValidations = [];\n if (this.subtask.id) {\n if (this.subtask.employee && this.subtask.duration) return;\n this.employeeValidations[0] = {};\n if (!this.subtask.employee_id) this.employeeValidations[0].employee = true;\n if (!this.subtask.duration) this.employeeValidations[0].duration = true;\n } else {\n // For new subtasks, only validate non-empty employee entries\n this.subtask.employees.forEach((employee, index) => {\n // Skip validation if both id and duration are empty\n if (!employee.id && !employee.duration) return;\n\n // Only validate if either id or duration is filled\n if (employee.id || employee.duration) {\n this.employeeValidations[index] = {};\n if (!employee.id) this.employeeValidations[index].employee = true;\n if (!employee.duration) this.employeeValidations[index].duration = true;\n }\n });\n }\n const isError = this.employeeValidations.some(employee => employee.duration || employee.employee);\n resolve(!isError);\n });\n },\n async _validateTimeblocks() {\n let invalid = false;\n for (let i = 0; i < this.timeblocks.length; i++) {\n const ref = this.$refs[`timetable-${i}`];\n invalid = (await ref[0].v$.$validate()) || invalid;\n }\n return invalid;\n },\n _enrichTask(subtask) {\n return {\n ...subtask,\n _created_by: this.enrichedEmployees.find(employee => employee.id == subtask.created_by),\n _employee: this.enrichedEmployees.find(employee => employee.id == subtask.employee_id),\n _master_task: this.mastertasks.find(mastertask => mastertask.id == subtask.master_task_id)\n };\n }\n },\n watch: {\n 'subtask.employee_id'(value, oldValue) {\n if (!value || !oldValue) return;\n this.subtask.timeblocks = [];\n this.subtask._employee = this.enrichedEmployees.find(employee => employee.id == this.subtask.employee_id);\n },\n 'subtask.employees': {\n handler() {\n if (!this.subtask?.employees) return;\n const lastEmployee = this.subtask.employees[this.subtask.employees.length - 1];\n if (lastEmployee.id || lastEmployee.duration) this.subtask.employees.push({});\n },\n deep: true\n },\n 'subtask.master_task_id'(value) {\n if (!value) return;\n this.subtask._master_task = this.mastertasks.find(mastertask => mastertask.id == this.subtask.master_task_id);\n this.subtask.project_code = this.subtask._master_task?.project_code || null;\n },\n editMode() {\n this.$nextTick(() => {\n this.$refs['description']?.setHTML(this.subtask.description || '');\n });\n },\n subtask: {\n handler(val) {\n if (this.editMode && !this.subtask?.id) {\n const employees = val.employees.filter(employee => employee?.id || employee?.duration) || [{}];\n const subtaskData = {\n ...val,\n employees: employees && employees.length > 0 ? employees : [{}]\n };\n console.log('subtaskData', subtaskData);\n localStorage.setItem('subtaskData', JSON.stringify(subtaskData));\n }\n },\n deep: true\n }\n }\n});\n\n//# sourceURL=webpack://jandl/./src/plugins/tm@modal/task/z-task-modal.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"); /***/ }), @@ -2978,7 +2978,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ (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 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 vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm-bundler.js\");\n/* harmony import */ var vuetify_lib_components_VAutocomplete_index_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vuetify/lib/components/VAutocomplete/index.mjs */ \"./node_modules/vuetify/lib/components/VAutocomplete/VAutocomplete.mjs\");\n/* harmony import */ var vuetify_lib_components_VBtn_index_mjs__WEBPACK_IMPORTED_MODULE_8__ = __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_3__ = __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_5__ = __webpack_require__(/*! vuetify/lib/components/VCard/index.mjs */ \"./node_modules/vuetify/lib/components/VCard/VCardActions.mjs\");\n/* harmony import */ var vuetify_lib_components_VDialog_index_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vuetify/lib/components/VDialog/index.mjs */ \"./node_modules/vuetify/lib/components/VDialog/VDialog.mjs\");\n/* harmony import */ var vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vuetify/lib/components/VIcon/index.mjs */ \"./node_modules/vuetify/lib/components/VIcon/VIcon.mjs\");\n/* harmony import */ var vuetify_lib_components_VTextField_index_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vuetify/lib/components/VTextField/index.mjs */ \"./node_modules/vuetify/lib/components/VTextField/VTextField.mjs\");\n\n\nconst _withScopeId = n => ((0,vue__WEBPACK_IMPORTED_MODULE_1__.pushScopeId)(\"data-v-1c35a9a1\"), n = n(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.popScopeId)(), n);\nconst _hoisted_1 = {\n class: \"d-flex justify-space-between align-center modal-header\"\n};\nconst _hoisted_2 = {\n class: \"splitted-inputs\"\n};\nconst _hoisted_3 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"path\", {\n d: \"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z\"\n}, null, -1 /* HOISTED */));\nconst _hoisted_4 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"path\", {\n d: \"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z\"\n}, null, -1 /* HOISTED */));\nconst _hoisted_5 = [_hoisted_3, _hoisted_4];\nconst _hoisted_6 = [\"onClick\"];\nconst _hoisted_7 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"path\", {\n d: \"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z\"\n}, null, -1 /* HOISTED */));\nconst _hoisted_8 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"path\", {\n d: \"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z\"\n}, null, -1 /* HOISTED */));\nconst _hoisted_9 = [_hoisted_7, _hoisted_8];\nconst _hoisted_10 = {\n key: 2,\n class: \"timeblocks w-100\"\n};\nconst _hoisted_11 = {\n class: \"end-button w-100\"\n};\nconst _hoisted_12 = {\n class: \"splitted-time-inputs w-100\"\n};\nconst _hoisted_13 = {\n class: \"w-100 modal-input\"\n};\nconst _hoisted_14 = {\n class: \"d-flex justify-space-between align-center\"\n};\nconst _hoisted_15 = {\n class: \"d-flex justify-space-between align-center modal-header border-bottom pb-4\"\n};\nconst _hoisted_16 = {\n class: \"d-flex justify-start\"\n};\nconst _hoisted_17 = [\"src\"];\nconst _hoisted_18 = [\"src\"];\nconst _hoisted_19 = {\n class: \"w-100\"\n};\nconst _hoisted_20 = {\n class: \"d-flex justify-start align-center mt-8\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n \n \n \n const _component_Datepicker = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"Datepicker\");\n const _component_A_timeblock = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"A-timeblock\");\n const _component_QuillEditor = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"QuillEditor\");\n const _component_Z_files_upload = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"Z-files-upload\");\n \n \n \n const _component_Z_task_readonly_info = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"Z-task-readonly-info\");\n const _component_W_loadable = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"W-loadable\");\n \n return (0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createBlock)(vuetify_lib_components_VDialog_index_mjs__WEBPACK_IMPORTED_MODULE_2__.VDialog, {\n modelValue: $data.visible,\n \"onUpdate:modelValue\": _cache[22] || (_cache[22] = $event => $data.visible = $event),\n \"max-width\": \"750\",\n \"max-height\": \"90%\",\n height: \"700px\",\n persistent: \"\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_component_W_loadable, {\n content: $data.subtask,\n class: \"h-100\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(() => [$data.editMode ? ((0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createBlock)(vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_3__.VCard, {\n key: 0,\n height: \"100%\",\n class: \"d-flex flex-column scrolling\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"h1\", null, (0,vue__WEBPACK_IMPORTED_MODULE_1__.toDisplayString)($data.subtask?.id ? 'Upraviť sub task' : 'Vytvoriť sub task'), 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(vuetify_lib_components_VIcon_index_mjs__WEBPACK_IMPORTED_MODULE_4__.VIcon, {\n onClick: _cache[0] || (_cache[0] = (0,vue__WEBPACK_IMPORTED_MODULE_1__.withModifiers)($event => $options.closeModal(), [\"stop\"])),\n icon: \"mdi-close\",\n size: \"large\"\n })]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(vuetify_lib_components_VCard_index_mjs__WEBPACK_IMPORTED_MODULE_5__.VCardActions, {\n class: \"d-flex flex-column modal-content\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(vuetify_lib_components_VTextField_index_mjs__WEBPACK_IMPORTED_MODULE_6__.VTextField, {\n modelValue: $data.subtask.project_code,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => $data.subtask.project_code = $event),\n label: \"Kód projektu\",\n value: $data.subtask.project_code,\n onFocus: _ctx.onInputFocus,\n class: \"modal-input\",\n variant: \"solo\",\n disabled: \"\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"value\", \"onFocus\"]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(vuetify_lib_components_VAutocomplete_index_mjs__WEBPACK_IMPORTED_MODULE_7__.VAutocomplete, {\n \"custom-filter\": _ctx.customFilter,\n \"match-any\": true,\n modelValue: $data.subtask.master_task_id,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => $data.subtask.master_task_id = $event),\n label: \"Master task\",\n class: (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)([{\n error: $data.v$.subtask.master_task_id.$errors.length\n }, \"modal-input\"]),\n items: _ctx.mastertasks,\n \"item-title\": \"name\",\n \"item-value\": \"id\",\n variant: \"solo\",\n clearable: \"\"\n }, null, 8 /* PROPS */, [\"custom-filter\", \"modelValue\", \"class\", \"items\"]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(vuetify_lib_components_VTextField_index_mjs__WEBPACK_IMPORTED_MODULE_6__.VTextField, {\n modelValue: $data.subtask.title,\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => $data.subtask.title = $event),\n onFocus: _ctx.onInputFocus,\n class: \"modal-input\",\n label: \"Názov subtasku\",\n variant: \"solo\"\n }, null, 8 /* PROPS */, [\"modelValue\", \"onFocus\"]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\" TODO: Bialko validacie \"), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", {\n onClick: _cache[5] || (_cache[5] = $event => $options.openDatepicker('datepicker-01')),\n class: \"datepicker-wrapper\"\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_component_Datepicker, {\n modelValue: $data.subtask.deadline,\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => $data.subtask.deadline = $event),\n onFocus: _ctx.onDateFocus,\n ref: \"datepicker-01\",\n \"auto-apply\": true,\n \"min-date\": new Date(),\n class: (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)([\"modal-input left datepicker-input\", {\n error: $data.v$.subtask.deadline.$errors?.length\n }]),\n format: \"dd.MM.yyyy\",\n locale: \"sk\",\n \"select-text\": \"Vybrať\",\n \"cancel-text\": \"Zrušiť\",\n placeholder: \"Deadline\",\n validations: $data.v$.subtask.deadline\n }, null, 8 /* PROPS */, [\"modelValue\", \"onFocus\", \"min-date\", \"class\", \"validations\"])]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(vuetify_lib_components_VTextField_index_mjs__WEBPACK_IMPORTED_MODULE_6__.VTextField, {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)([\"modal-input right\", {\n error: $data.v$.subtask._deadline_time.$errors.length\n }]),\n variant: \"solo\",\n modelValue: $data.subtask._deadline_time,\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = $event => $data.subtask._deadline_time = $event),\n label: \"Čas\",\n \"append-inner-icon\": \"mdi-clock-outline\",\n type: \"time\",\n onFocus: _ctx.onInputFocus,\n hint: $data.v$.subtask._deadline_time.$errors ? $data.errorUtils.parseErrors($data.v$.subtask._deadline_time.$errors) : null\n }, null, 8 /* PROPS */, [\"modelValue\", \"onFocus\", \"class\", \"hint\"])]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\" TODO: Toto tu nema byt ci? \"), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"
Termín
\\n\\t\\t\\t\\t\\t\\t\\tTermín
\\n\\t\\t\\t\\t\\t\\t\\t