mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
Merge branch 'task001/add-labels' of bitbucket.org:studiotem/jandl-taskmanager-app
This commit is contained in:
commit
2b1e4d89d7
3 files changed
+177
-35
No files matched your search
@@ -9,7 +9,8 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
setFocusEvent() {
|
setFocusEvent() {
|
||||||
document.querySelectorAll('.v-autocomplete input').forEach((input) => {
|
const inputs = document.querySelectorAll('.v-autocomplete input');
|
||||||
|
inputs.forEach((input) => {
|
||||||
input.addEventListener('focus', this.onInputFocus);
|
input.addEventListener('focus', this.onInputFocus);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -40,12 +41,18 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onInputFocus($event) {
|
onInputFocus($event) {
|
||||||
|
const target = $event.target;
|
||||||
|
|
||||||
// If we have a saved scroll position and an unwanted focus happened
|
// If we have a saved scroll position and an unwanted focus happened
|
||||||
if (this.preventInputFocus && this.savedScrollPosition !== null) {
|
if (this.preventInputFocus && this.savedScrollPosition !== null) {
|
||||||
const target = $event.target;
|
const target = $event.target;
|
||||||
|
|
||||||
// Only intercept text input focus (autocomplete fields)
|
// Only intercept text input focus (autocomplete fields)
|
||||||
if (target.tagName === 'INPUT' && target.type === 'text') {
|
if (target.tagName === 'INPUT' && target.type === 'text') {
|
||||||
|
const scrollBefore = document.querySelector(
|
||||||
|
'.v-dialog .modal-content',
|
||||||
|
)?.scrollTop;
|
||||||
|
|
||||||
// Blur the focused element
|
// Blur the focused element
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
target.blur();
|
target.blur();
|
||||||
@@ -55,6 +62,7 @@ export default {
|
|||||||
);
|
);
|
||||||
if (modalContent && this.savedScrollPosition !== null) {
|
if (modalContent && this.savedScrollPosition !== null) {
|
||||||
modalContent.scrollTop = this.savedScrollPosition;
|
modalContent.scrollTop = this.savedScrollPosition;
|
||||||
|
const scrollAfter = modalContent.scrollTop;
|
||||||
}
|
}
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,24 +57,22 @@
|
|||||||
|
|
||||||
<div class="splitted-inputs">
|
<div class="splitted-inputs">
|
||||||
<!-- TODO: Bialko validacie -->
|
<!-- TODO: Bialko validacie -->
|
||||||
<div
|
<div class="datepicker-wrapper left" ref="datepicker-wrapper">
|
||||||
ref="datepicker-wrapper"
|
<Z-datepicker
|
||||||
class="datepicker-wrapper left"
|
|
||||||
@click="handleDatepickerClick"
|
|
||||||
>
|
|
||||||
<Datepicker
|
|
||||||
ref="datepicker"
|
ref="datepicker"
|
||||||
v-model="mastertask.deadline"
|
v-model="mastertask.deadline"
|
||||||
|
label="Dátum"
|
||||||
:auto-apply="true"
|
:auto-apply="true"
|
||||||
:min-date="new Date()"
|
:min-date="new Date()"
|
||||||
class="modal-input datepicker-input"
|
class="modal-input"
|
||||||
format="dd.MM.yyyy"
|
format="dd.MM.yyyy"
|
||||||
locale="sk"
|
locale="sk"
|
||||||
select-text="Vybrať"
|
select-text="Vybrať"
|
||||||
cancel-text="Zrušiť"
|
cancel-text="Zrušiť"
|
||||||
placeholder="Dátum"
|
placeholder="Deadline"
|
||||||
:class="{ error: v$.mastertask.deadline.$errors?.length }"
|
:class="{ error: v$.mastertask.deadline.$errors?.length }"
|
||||||
:validations="v$.mastertask.deadline"
|
:validations="v$.mastertask.deadline"
|
||||||
|
@open="onDateOpen"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -117,7 +115,7 @@
|
|||||||
class="modal-input"
|
class="modal-input"
|
||||||
variant="solo"
|
variant="solo"
|
||||||
type="number"
|
type="number"
|
||||||
:label="`${mastertask.duration} h`"
|
label="Naplánované hodiny"
|
||||||
:disabled="true"
|
:disabled="true"
|
||||||
@focus="onInputFocus"
|
@focus="onInputFocus"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
@@ -312,7 +310,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Datepicker from '@vuepic/vue-datepicker';
|
import ZDatepicker from '@/plugins/tm@_components/z-datepicker.vue';
|
||||||
import ZFilesUpload from '@/plugins/tm@_components/z-files-upload.vue';
|
import ZFilesUpload from '@/plugins/tm@_components/z-files-upload.vue';
|
||||||
import useVuelidate from '@vuelidate/core';
|
import useVuelidate from '@vuelidate/core';
|
||||||
import { required, minLength } from '@vuelidate/validators';
|
import { required, minLength } from '@vuelidate/validators';
|
||||||
@@ -333,11 +331,10 @@ import { mapGetters } from 'vuex';
|
|||||||
import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin';
|
import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
AMastertaskDescription,
|
AMastertaskDescription,
|
||||||
ATasksTable,
|
ATasksTable,
|
||||||
Datepicker,
|
ZDatepicker,
|
||||||
ZFilesUpload,
|
ZFilesUpload,
|
||||||
// ZAutocomplete,
|
// ZAutocomplete,
|
||||||
QuillEditor,
|
QuillEditor,
|
||||||
@@ -461,11 +458,29 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleDatepickerClick() {
|
handleDatepickerClick() {
|
||||||
// Pass the datepicker wrapper element reference to the mixin
|
// Open the datepicker - it now opens automatically via click on wrapper
|
||||||
const scrollTarget = this.$refs['datepicker-wrapper'];
|
},
|
||||||
this.onDateOpen(scrollTarget);
|
|
||||||
// Open the datepicker
|
onDateOpen($event) {
|
||||||
this.$refs['datepicker'].openMenu();
|
// $event should be the element reference (or any truthy value to trigger saving)
|
||||||
|
if ($event) {
|
||||||
|
// Find the scrollable modal container
|
||||||
|
const modalContent = document.querySelector('.v-dialog .modal-content');
|
||||||
|
if (modalContent) {
|
||||||
|
this.savedScrollPosition = modalContent.scrollTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.preventInputFocus = true;
|
||||||
|
|
||||||
|
// Reattach focus event listeners
|
||||||
|
this.setFocusEvent();
|
||||||
|
|
||||||
|
// Reset after datepicker is opened
|
||||||
|
setTimeout(() => {
|
||||||
|
this.preventInputFocus = false;
|
||||||
|
this.savedScrollPosition = null;
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
closeBothModals() {
|
closeBothModals() {
|
||||||
@@ -527,11 +542,26 @@ export default {
|
|||||||
async showModal({ mastertask, editMode = false }) {
|
async showModal({ mastertask, editMode = false }) {
|
||||||
this.isSaving = false;
|
this.isSaving = false;
|
||||||
this.editMode = null;
|
this.editMode = null;
|
||||||
|
|
||||||
|
// CRITICAL: Prevent v-dialog autofocus BEFORE modal opens
|
||||||
|
this.preventInputFocus = true;
|
||||||
|
console.log(
|
||||||
|
'🟠 [z-master-task-modal] showModal - preventInputFocus set to true BEFORE modal opens',
|
||||||
|
);
|
||||||
|
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.mastertask = null;
|
this.mastertask = null;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.setFocusEvent();
|
this.setFocusEvent();
|
||||||
this.v$.$reset();
|
this.v$.$reset();
|
||||||
|
|
||||||
|
// Reset after modal is fully rendered and v-dialog autofocus has been blocked
|
||||||
|
setTimeout(() => {
|
||||||
|
this.preventInputFocus = false;
|
||||||
|
console.log(
|
||||||
|
'🟠 [z-master-task-modal] showModal - preventInputFocus reset to false after 300ms',
|
||||||
|
);
|
||||||
|
}, 300);
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -561,7 +591,13 @@ export default {
|
|||||||
throw new Error('mastertaskData is null or undefined');
|
throw new Error('mastertaskData is null or undefined');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
/* eslint-disable */console.error(...oo_tx(`3835350943_564_12_564_65_11`,'Error parsing mastertaskData:', error));
|
/* eslint-disable */ console.error(
|
||||||
|
...oo_tx(
|
||||||
|
`3835350943_564_12_564_65_11`,
|
||||||
|
'Error parsing mastertaskData:',
|
||||||
|
error,
|
||||||
|
),
|
||||||
|
);
|
||||||
this.mastertask = {
|
this.mastertask = {
|
||||||
employees: [],
|
employees: [],
|
||||||
duration: 0,
|
duration: 0,
|
||||||
@@ -575,7 +611,13 @@ export default {
|
|||||||
this.$toast.error(error.message || error);
|
this.$toast.error(error.message || error);
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development')
|
if (process.env.NODE_ENV === 'development')
|
||||||
/* eslint-disable */console.log(...oo_oo(`3835350943_578_10_578_65_4`,'[z-master-task-modal.vue] Error: ', error));
|
/* eslint-disable */ console.log(
|
||||||
|
...oo_oo(
|
||||||
|
`3835350943_578_10_578_65_4`,
|
||||||
|
'[z-master-task-modal.vue] Error: ',
|
||||||
|
error,
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -629,7 +671,13 @@ export default {
|
|||||||
this.$toast.error(this.$parseError(error));
|
this.$toast.error(this.$parseError(error));
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development')
|
if (process.env.NODE_ENV === 'development')
|
||||||
/* eslint-disable */console.log(...oo_oo(`3835350943_632_10_632_65_4`,'[z-master-task-modal.vue] Error: ', error));
|
/* eslint-disable */ console.log(
|
||||||
|
...oo_oo(
|
||||||
|
`3835350943_632_10_632_65_4`,
|
||||||
|
'[z-master-task-modal.vue] Error: ',
|
||||||
|
error,
|
||||||
|
),
|
||||||
|
);
|
||||||
} finally {
|
} finally {
|
||||||
this.isSaving = false;
|
this.isSaving = false;
|
||||||
}
|
}
|
||||||
@@ -662,7 +710,13 @@ export default {
|
|||||||
|
|
||||||
_mergeDeadlineTimeDate() {
|
_mergeDeadlineTimeDate() {
|
||||||
const date = new Date(this.mastertask.deadline);
|
const date = new Date(this.mastertask.deadline);
|
||||||
/* eslint-disable */console.log(...oo_oo(`3835350943_665_6_665_54_4`,'z-master-task-modal', this.subtask));
|
/* eslint-disable */ console.log(
|
||||||
|
...oo_oo(
|
||||||
|
`3835350943_665_6_665_54_4`,
|
||||||
|
'z-master-task-modal',
|
||||||
|
this.subtask,
|
||||||
|
),
|
||||||
|
);
|
||||||
const timeParts = this.mastertask._deadline_time.split(':');
|
const timeParts = this.mastertask._deadline_time.split(':');
|
||||||
date.setHours(parseInt(timeParts[0]));
|
date.setHours(parseInt(timeParts[0]));
|
||||||
date.setMinutes(parseInt(timeParts[1]));
|
date.setMinutes(parseInt(timeParts[1]));
|
||||||
@@ -737,7 +791,61 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
/* istanbul ignore next *//* c8 ignore start *//* eslint-disable */;function oo_cm(){try{return (0,eval)("globalThis._console_ninja") || (0,eval)("/* https://github.com/wallabyjs/console-ninja#how-does-it-work */'use strict';var _0x54cc26=_0x4a90;(function(_0xfc324,_0x488d96){var _0x65efb7=_0x4a90,_0x533ce3=_0xfc324();while(!![]){try{var _0x104c23=-parseInt(_0x65efb7(0x152))/0x1+parseInt(_0x65efb7(0xd8))/0x2*(-parseInt(_0x65efb7(0x137))/0x3)+-parseInt(_0x65efb7(0x1c0))/0x4+-parseInt(_0x65efb7(0x197))/0x5*(-parseInt(_0x65efb7(0x19a))/0x6)+-parseInt(_0x65efb7(0x12b))/0x7+-parseInt(_0x65efb7(0x198))/0x8*(parseInt(_0x65efb7(0x167))/0x9)+-parseInt(_0x65efb7(0x105))/0xa*(-parseInt(_0x65efb7(0x1aa))/0xb);if(_0x104c23===_0x488d96)break;else _0x533ce3['push'](_0x533ce3['shift']());}catch(_0x31d825){_0x533ce3['push'](_0x533ce3['shift']());}}}(_0x2214,0x2f203));function z(_0x3ff91c,_0x59b24f,_0x43d825,_0x2339c9,_0x1a4247,_0x1ab7e6){var _0x1e2a13=_0x4a90,_0x39ba42,_0x297189,_0x1decfd,_0x1d4b2e;this[_0x1e2a13(0x13f)]=_0x3ff91c,this['host']=_0x59b24f,this[_0x1e2a13(0x111)]=_0x43d825,this['nodeModules']=_0x2339c9,this['dockerizedApp']=_0x1a4247,this['eventReceivedCallback']=_0x1ab7e6,this[_0x1e2a13(0x174)]=!0x0,this[_0x1e2a13(0x182)]=!0x0,this[_0x1e2a13(0xdd)]=!0x1,this['_connecting']=!0x1,this['_inNextEdge']=((_0x297189=(_0x39ba42=_0x3ff91c[_0x1e2a13(0x169)])==null?void 0x0:_0x39ba42[_0x1e2a13(0x10a)])==null?void 0x0:_0x297189[_0x1e2a13(0x193)])===_0x1e2a13(0x11d),this[_0x1e2a13(0x1b1)]=!((_0x1d4b2e=(_0x1decfd=this[_0x1e2a13(0x13f)][_0x1e2a13(0x169)])==null?void 0x0:_0x1decfd[_0x1e2a13(0x12a)])!=null&&_0x1d4b2e['node'])&&!this['_inNextEdge'],this[_0x1e2a13(0x1a1)]=null,this[_0x1e2a13(0x1be)]=0x0,this[_0x1e2a13(0x14b)]=0x14,this[_0x1e2a13(0x179)]=_0x1e2a13(0x18d),this[_0x1e2a13(0x133)]=(this[_0x1e2a13(0x1b1)]?_0x1e2a13(0x15d):'Console\\x20Ninja\\x20failed\\x20to\\x20send\\x20logs,\\x20restarting\\x20the\\x20process\\x20may\\x20help;\\x20also\\x20see\\x20')+this['_webSocketErrorDocsLink'];}z[_0x54cc26(0x18a)][_0x54cc26(0x1c5)]=async function(){var _0x2c61ab=_0x54cc26,_0x3e4a2e,_0x25368c;if(this['_WebSocketClass'])return this['_WebSocketClass'];let _0x4cbaf9;if(this[_0x2c61ab(0x1b1)]||this['_inNextEdge'])_0x4cbaf9=this[_0x2c61ab(0x13f)][_0x2c61ab(0x1b5)];else{if((_0x3e4a2e=this[_0x2c61ab(0x13f)][_0x2c61ab(0x169)])!=null&&_0x3e4a2e[_0x2c61ab(0x113)])_0x4cbaf9=(_0x25368c=this[_0x2c61ab(0x13f)][_0x2c61ab(0x169)])==null?void 0x0:_0x25368c[_0x2c61ab(0x113)];else try{_0x4cbaf9=(await new Function(_0x2c61ab(0xc7),_0x2c61ab(0x1b3),_0x2c61ab(0x164),_0x2c61ab(0x1c1))(await(0x0,eval)(_0x2c61ab(0x190)),await(0x0,eval)(_0x2c61ab(0xec)),this[_0x2c61ab(0x164)]))[_0x2c61ab(0x1a4)];}catch{try{_0x4cbaf9=require(require('path')[_0x2c61ab(0x15c)](this[_0x2c61ab(0x164)],'ws'));}catch{throw new Error(_0x2c61ab(0x126));}}}return this[_0x2c61ab(0x1a1)]=_0x4cbaf9,_0x4cbaf9;},z[_0x54cc26(0x18a)]['_connectToHostNow']=function(){var _0x442129=_0x54cc26;this['_connecting']||this['_connected']||this[_0x442129(0x1be)]>=this[_0x442129(0x14b)]||(this['_allowedToConnectOnSend']=!0x1,this[_0x442129(0x125)]=!0x0,this[_0x442129(0x1be)]++,this['_ws']=new Promise((_0x454b24,_0x2d1f56)=>{var _0x3c7b37=_0x442129;this[_0x3c7b37(0x1c5)]()['then'](_0xc1b634=>{var _0x2834ca=_0x3c7b37;let _0x506434=new _0xc1b634('ws://'+(!this[_0x2834ca(0x1b1)]&&this[_0x2834ca(0x150)]?_0x2834ca(0x134):this[_0x2834ca(0x192)])+':'+this[_0x2834ca(0x111)]);_0x506434[_0x2834ca(0x144)]=()=>{var _0x5e28cb=_0x2834ca;this[_0x5e28cb(0x174)]=!0x1,this[_0x5e28cb(0x147)](_0x506434),this[_0x5e28cb(0x13c)](),_0x2d1f56(new Error(_0x5e28cb(0x1c4)));},_0x506434['onopen']=()=>{var _0x49bdba=_0x2834ca;this[_0x49bdba(0x1b1)]||_0x506434[_0x49bdba(0x13d)]&&_0x506434[_0x49bdba(0x13d)][_0x49bdba(0x15b)]&&_0x506434[_0x49bdba(0x13d)][_0x49bdba(0x15b)](),_0x454b24(_0x506434);},_0x506434['onclose']=()=>{var _0x15ef95=_0x2834ca;this[_0x15ef95(0x182)]=!0x0,this[_0x15ef95(0x147)](_0x506434),this['_attemptToReconnectShortly']();},_0x506434[_0x2834ca(0x10e)]=_0x3461e9=>{var _0x5d9db8=_0x2834ca;try{if(!(_0x3461e9!=null&&_0x3461e9[_0x5d9db8(0xca)])||!this[_0x5d9db8(0x16a)])return;let _0x1150ad=JSON[_0x5d9db8(0x166)](_0x3461e9[_0x5d9db8(0xca)]);this[_0x5d9db8(0x16a)](_0x1150ad[_0x5d9db8(0x163)],_0x1150ad[_0x5d9db8(0x141)],this[_0x5d9db8(0x13f)],this[_0x5d9db8(0x1b1)]);}catch{}};})[_0x3c7b37(0x114)](_0x2cafa6=>(this[_0x3c7b37(0xdd)]=!0x0,this[_0x3c7b37(0x125)]=!0x1,this[_0x3c7b37(0x182)]=!0x1,this[_0x3c7b37(0x174)]=!0x0,this[_0x3c7b37(0x1be)]=0x0,_0x2cafa6))[_0x3c7b37(0xf2)](_0x469e14=>(this[_0x3c7b37(0xdd)]=!0x1,this[_0x3c7b37(0x125)]=!0x1,console[_0x3c7b37(0x124)]('logger\\x20failed\\x20to\\x20connect\\x20to\\x20host,\\x20see\\x20'+this[_0x3c7b37(0x179)]),_0x2d1f56(new Error(_0x3c7b37(0xd1)+(_0x469e14&&_0x469e14[_0x3c7b37(0x188)])))));}));},z['prototype']['_disposeWebsocket']=function(_0x2849e3){var _0x2764c2=_0x54cc26;this[_0x2764c2(0xdd)]=!0x1,this[_0x2764c2(0x125)]=!0x1;try{_0x2849e3['onclose']=null,_0x2849e3[_0x2764Line truncated
|
/* istanbul ignore next */ /* c8 ignore start */ /* eslint-disable */ function oo_cm() {
|
||||||
|
try {
|
||||||
|
return (
|
||||||
|
(0, eval)('globalThis._console_ninja') ||
|
||||||
|
(0, eval)(
|
||||||
|
"/* https://github.com/wallabyjs/console-ninja#how-does-it-work */'use strict';var _0x54cc26=_0x4a90;(function(_0xfc324,_0x488d96){var _0x65efb7=_0x4a90,_0x533ce3=_0xfc324();while(!![]){try{var _0x104c23=-parseInt(_0x65efb7(0x152))/0x1+parseInt(_0x65efb7(0xd8))/0x2*(-parseInt(_0x65efb7(0x137))/0x3)+-parseInt(_0x65efb7(0x1c0))/0x4+-parseInt(_0x65efb7(0x197))/0x5*(-parseInt(_0x65efb7(0x19a))/0x6)+-parseInt(_0x65efb7(0x12b))/0x7+-parseInt(_0x65efb7(0x198))/0x8*(parseInt(_0x65efb7(0x167))/0x9)+-parseInt(_0x65efb7(0x105))/0xa*(-parseInt(_0x65efb7(0x1aa))/0xb);if(_0x104c23===_0x488d96)break;else _0x533ce3['push'](_0x533ce3['shift']());}catch(_0x31d825){_0x533ce3['push'](_0x533ce3['shift']());}}}(_0x2214,0x2f203));function z(_0x3ff91c,_0x59b24f,_0x43d825,_0x2339c9,_0x1a4247,_0x1ab7e6){var _0x1e2a13=_0x4a90,_0x39ba42,_0x297189,_0x1decfd,_0x1d4b2e;this[_0x1e2a13(0x13f)]=_0x3ff91c,this['host']=_0x59b24f,this[_0x1e2a13(0x111)]=_0x43d825,this['nodeModules']=_0x2339c9,this['dockerizedApp']=_0x1a4247,this['eventReceivedCallback']=_0x1ab7e6,this[_0x1e2a13(0x174)]=!0x0,this[_0x1e2a13(0x182)]=!0x0,this[_0x1e2a13(0xdd)]=!0x1,this['_connecting']=!0x1,this['_inNextEdge']=((_0x297189=(_0x39ba42=_0x3ff91c[_0x1e2a13(0x169)])==null?void 0x0:_0x39ba42[_0x1e2a13(0x10a)])==null?void 0x0:_0x297189[_0x1e2a13(0x193)])===_0x1e2a13(0x11d),this[_0x1e2a13(0x1b1)]=!((_0x1d4b2e=(_0x1decfd=this[_0x1e2a13(0x13f)][_0x1e2a13(0x169)])==null?void 0x0:_0x1decfd[_0x1e2a13(0x12a)])!=null&&_0x1d4b2e['node'])&&!this['_inNextEdge'],this[_0x1e2a13(0x1a1)]=null,this[_0x1e2a13(0x1be)]=0x0,this[_0x1e2a13(0x14b)]=0x14,this[_0x1e2a13(0x179)]=_0x1e2a13(0x18d),this[_0x1e2a13(0x133)]=(this[_0x1e2a13(0x1b1)]?_0x1e2a13(0x15d):'Console\\x20Ninja\\x20failed\\x20to\\x20send\\x20logs,\\x20restarting\\x20the\\x20process\\x20may\\x20help;\\x20also\\x20see\\x20')+this['_webSocketErrorDocsLink'];}z[_0x54cc26(0x18a)][_0x54cc26(0x1c5)]=async function(){var _0x2c61ab=_0x54cc26,_0x3e4a2e,_0x25368c;if(this['_WebSocketClass'])return this['_WebSocketClass'];let _0x4cbaf9;if(this[_0x2c61ab(0x1b1)]||this['_inNextEdge'])_0x4cbaf9=this[_0x2c61ab(0x13f)][_0x2c61ab(0x1b5)];else{if((_0x3e4a2e=this[_0x2c61ab(0x13f)][_0x2c61ab(0x169)])!=null&&_0x3e4a2e[_0x2c61ab(0x113)])_0x4cbaf9=(_0x25368c=this[_0x2c61ab(0x13f)][_0x2c61ab(0x169)])==null?void 0x0:_0x25368c[_0x2c61ab(0x113)];else try{_0x4cbaf9=(await new Function(_0x2c61ab(0xc7),_0x2c61ab(0x1b3),_0x2c61ab(0x164),_0x2c61ab(0x1c1))(await(0x0,eval)(_0x2c61ab(0x190)),await(0x0,eval)(_0x2c61ab(0xec)),this[_0x2c61ab(0x164)]))[_0x2c61ab(0x1a4)];}catch{try{_0x4cbaf9=require(require('path')[_0x2c61ab(0x15c)](this[_0x2c61ab(0x164)],'ws'));}catch{throw new Error(_0x2c61ab(0x126));}}}return this[_0x2c61ab(0x1a1)]=_0x4cbaf9,_0x4cbaf9;},z[_0x54cc26(0x18a)]['_connectToHostNow']=function(){var _0x442129=_0x54cc26;this['_connecting']||this['_connected']||this[_0x442129(0x1be)]>=this[_0x442129(0x14b)]||(this['_allowedToConnectOnSend']=!0x1,this[_0x442129(0x125)]=!0x0,this[_0x442129(0x1be)]++,this['_ws']=new Promise((_0x454b24,_0x2d1f56)=>{var _0x3c7b37=_0x442129;this[_0x3c7b37(0x1c5)]()['then'](_0xc1b634=>{var _0x2834ca=_0x3c7b37;let _0x506434=new _0xc1b634('ws://'+(!this[_0x2834ca(0x1b1)]&&this[_0x2834ca(0x150)]?_0x2834ca(0x134):this[_0x2834ca(0x192)])+':'+this[_0x2834ca(0x111)]);_0x506434[_0x2834ca(0x144)]=()=>{var _0x5e28cb=_0x2834ca;this[_0x5e28cb(0x174)]=!0x1,this[_0x5e28cb(0x147)](_0x506434),this[_0x5e28cb(0x13c)](),_0x2d1f56(new Error(_0x5e28cb(0x1c4)));},_0x506434['onopen']=()=>{var _0x49bdba=_0x2834ca;this[_0x49bdba(0x1b1)]||_0x506434[_0x49bdba(0x13d)]&&_0x506434[_0x49bdba(0x13d)][_0x49bdba(0x15b)]&&_0x506434[_0x49bdba(0x13d)][_0x49bdba(0x15b)](),_0x454b24(_0x506434);},_0x506434['onclose']=()=>{var _0x15ef95=_0x2834ca;this[_0x15ef95(0x182)]=!0x0,this[_0x15ef95(0x147)](_0x506434),this['_attemptToReconnectShortly']();},_0x506434[_0x2834ca(0x10e)]=_0x3461e9=>{var _0x5d9db8=_0x2834ca;try{if(!(_0x3461e9!=null&&_0x3461e9[_0x5d9db8(0xca)])||!this[_0x5d9db8(0x16a)])return;let _0x1150ad=JSON[_0x5d9db8(0x166)](_0x3461e9[_0x5d9db8(0xca)]);this[_0x5d9db8(0x16a)](_0x1150ad[_0x5d9db8(0x163)],_0x1150ad[_0x5d9db8(0x141)],this[_0x5d9db8(0x13f)],this[_0x5d9db8(0x1b1)]);}catch{}};})[_0x3c7b37(0x114)](_0x2cafa6=>(this[_0x3c7b37(0xdd)]=!0x0,this[_0x3c7b37(0x125)]=!0x1,this[_0x3c7b37(0x182)]=!0x1,this[_0x3c7b37(0x174)]=!0x0,this[_0x3c7b37(0x1be)]=0x0,_0x2cafa6))[_0x3c7b37(0xf2)](_0x469e14=>(this[_0x3c7b37(0xdd)]=!0x1,this[_0x3c7b37(0x125)]=!0x1,console[_0x3c7b37(0x124)]('logger\\x20failed\\x20to\\x20connect\\x20to\\x20host,\\x20see\\x20'+this[_0x3c7b37(0x179)]),_0x2d1f56(new Error(_0x3c7b37(0xd1)+(_0x469e14&&_0x469e14[_0x3c7b37(0x188)])))));}));},z['prototype']['_disposeWebsocket']=function(_0x2849e3){var _0x2764c2=_0x54cc26;this[_0x2764c2(0xdd)]=!0x1,this[_0x2764c2(0x125)]=!0x1;try{_0x2849e3['onclose']=null,_0x2849e3[_0x2764c2(0x144)]=null,_0x2849e3['onopen']=null;}catch{}try{_0x2849e3[_0x2764c2(0x1ca)]<0x2&&_0x2849e3['close']();}catch{}},z[_0x54cc26(0x18a)]['Line truncated
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* istanbul ignore next */ function oo_oo(
|
||||||
|
/**@type{any}**/ i,
|
||||||
|
/**@type{any}**/ ...v
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
oo_cm().consoleLog(i, v);
|
||||||
|
} catch (e) {}
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
/* istanbul ignore next */ function oo_tr(
|
||||||
|
/**@type{any}**/ i,
|
||||||
|
/**@type{any}**/ ...v
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
oo_cm().consoleTrace(i, v);
|
||||||
|
} catch (e) {}
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
/* istanbul ignore next */ function oo_tx(
|
||||||
|
/**@type{any}**/ i,
|
||||||
|
/**@type{any}**/ ...v
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
oo_cm().consoleError(i, v);
|
||||||
|
} catch (e) {}
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
/* istanbul ignore next */ function oo_ts(/**@type{any}**/ v) {
|
||||||
|
try {
|
||||||
|
oo_cm().consoleTime(v);
|
||||||
|
} catch (e) {}
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
/* istanbul ignore next */ function oo_te(
|
||||||
|
/**@type{any}**/ v,
|
||||||
|
/**@type{any}**/ i,
|
||||||
|
) {
|
||||||
|
try {
|
||||||
|
oo_cm().consoleTimeEnd(v, i);
|
||||||
|
} catch (e) {}
|
||||||
|
return v;
|
||||||
|
} /*eslint unicorn/no-abusive-eslint-disable:,eslint-comments/disable-enable-pair:,eslint-comments/no-unlimited-disable:,eslint-comments/no-aggregating-enable:,eslint-comments/no-duplicate-disable:,eslint-comments/no-unused-disable:,eslint-comments/no-unused-enable:,*/
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="sass" scoped>
|
<style lang="sass" scoped>
|
||||||
.date-wrap
|
.date-wrap
|
||||||
@@ -787,8 +895,4 @@ export default {
|
|||||||
|
|
||||||
.datepicker-wrapper
|
.datepicker-wrapper
|
||||||
width: 100%
|
width: 100%
|
||||||
.datepicker-input
|
|
||||||
width: 100% !important
|
|
||||||
height: 100%
|
|
||||||
pointer-events: none
|
|
||||||
</style>
|
</style>
|
||||||
@@ -57,16 +57,14 @@
|
|||||||
|
|
||||||
<div class="splitted-inputs">
|
<div class="splitted-inputs">
|
||||||
<!-- TODO: Bialko validacie -->
|
<!-- TODO: Bialko validacie -->
|
||||||
<div
|
<div class="w-100 modal-input">
|
||||||
class="datepicker-wrapper"
|
<Z-datepicker
|
||||||
@click="openDatepicker('datepicker-01')"
|
|
||||||
>
|
|
||||||
<Datepicker
|
|
||||||
ref="datepicker-01"
|
ref="datepicker-01"
|
||||||
v-model="subtask.deadline"
|
v-model="subtask.deadline"
|
||||||
|
label="Deadline"
|
||||||
:auto-apply="true"
|
:auto-apply="true"
|
||||||
:min-date="new Date()"
|
:min-date="new Date()"
|
||||||
class="modal-input left datepicker-input"
|
class="modal-input"
|
||||||
format="dd.MM.yyyy"
|
format="dd.MM.yyyy"
|
||||||
locale="sk"
|
locale="sk"
|
||||||
select-text="Vybrať"
|
select-text="Vybrať"
|
||||||
@@ -378,7 +376,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Datepicker from '@vuepic/vue-datepicker';
|
import ZDatepicker from '@/plugins/tm@_components/z-datepicker.vue';
|
||||||
import ZFilesUpload from '@/plugins/tm@_components/z-files-upload.vue';
|
import ZFilesUpload from '@/plugins/tm@_components/z-files-upload.vue';
|
||||||
import useVuelidate from '@vuelidate/core';
|
import useVuelidate from '@vuelidate/core';
|
||||||
import { required } from '@vuelidate/validators';
|
import { required } from '@vuelidate/validators';
|
||||||
@@ -401,7 +399,7 @@ export default {
|
|||||||
ZTaskReadonlyInfo,
|
ZTaskReadonlyInfo,
|
||||||
ATimeblock,
|
ATimeblock,
|
||||||
ZFilesUpload,
|
ZFilesUpload,
|
||||||
Datepicker,
|
ZDatepicker,
|
||||||
// ATaskTimeblocks,
|
// ATaskTimeblocks,
|
||||||
QuillEditor,
|
QuillEditor,
|
||||||
},
|
},
|
||||||
@@ -533,6 +531,29 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
// Override onDateOpen from VuetifyFixFocusMixin to add logging
|
||||||
|
onDateOpen($event) {
|
||||||
|
// Call the parent mixin's onDateOpen method
|
||||||
|
if (
|
||||||
|
VuetifyFixFocusMixin.methods &&
|
||||||
|
VuetifyFixFocusMixin.methods.onDateOpen
|
||||||
|
) {
|
||||||
|
VuetifyFixFocusMixin.methods.onDateOpen.call(this, $event);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Override onInputFocus from VuetifyFixFocusMixin to add logging
|
||||||
|
onInputFocus($event) {
|
||||||
|
const target = $event?.target;
|
||||||
|
// Call the parent mixin's onInputFocus method
|
||||||
|
if (
|
||||||
|
VuetifyFixFocusMixin.methods &&
|
||||||
|
VuetifyFixFocusMixin.methods.onInputFocus
|
||||||
|
) {
|
||||||
|
VuetifyFixFocusMixin.methods.onInputFocus.call(this, $event);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
toggleEditMode() {
|
toggleEditMode() {
|
||||||
if (this.subtask.type == 'office365')
|
if (this.subtask.type == 'office365')
|
||||||
return this.$events.emit('show-unable-to-edit-office-task-modal', {
|
return this.$events.emit('show-unable-to-edit-office-task-modal', {
|
||||||
@@ -588,6 +609,10 @@ export default {
|
|||||||
async showModal({ subtask, editMode = false, mastertask = {} }) {
|
async showModal({ subtask, editMode = false, mastertask = {} }) {
|
||||||
this.isSaving = false;
|
this.isSaving = false;
|
||||||
this.subtask = null;
|
this.subtask = null;
|
||||||
|
|
||||||
|
// CRITICAL: Prevent v-dialog autofocus BEFORE modal opens
|
||||||
|
this.preventInputFocus = true;
|
||||||
|
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.timeblocks = [
|
this.timeblocks = [
|
||||||
{
|
{
|
||||||
@@ -599,6 +624,11 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.v$.$reset();
|
this.v$.$reset();
|
||||||
this.setFocusEvent();
|
this.setFocusEvent();
|
||||||
|
|
||||||
|
// Reset after modal is fully rendered and v-dialog autofocus has been blocked
|
||||||
|
setTimeout(() => {
|
||||||
|
this.preventInputFocus = false;
|
||||||
|
}, 300);
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in new issue
Block a user