build(dev): rebuild, file formatting, removed console logs

This commit is contained in:
Matej Glasnák committed 2025-12-08 12:05:29 +01:00
1 parent 734a3fac6c
commit f69e55859b
34 files changed
+1537 -1177

No files matched your search

@@ -1,62 +1,70 @@
<template>
<p class="mt-5">Prílohy</p>
<div class="w-100 d-flex align-center">
<W-loadable :content="files" empty-message="Žiadne prílohy neboli nahraté">
<div v-for="(file, index) in files" :key="file.id" class="d-flex align-center flex-wrap" :class="[index === 0 ? 'ml-0' : 'ml-2']">
<v-chip class="mt-2">
<p class="cursor-pointer" @click="downloadFile(file)">{{ file.name }}</p>
<v-icon class="mx-1" icon="mdi-paperclip"></v-icon>
<p>{{ (file.file_size / (1024 * 1024)).toFixed(2) }} MB</p>
</v-chip>
<div v-if="file.isLoading" class="d-flex align-center">
<img class="gif-loader" :src="require('@/plugins/app/_img/spinner.gif')" alt="Loading...">
<p class="ml-2">Súbor sa sťahuje, počkajte prosím</p>
</div>
</div>
</W-loadable>
</div>
<p class="mt-5">Prílohy</p>
<div class="w-100 d-flex align-center">
<W-loadable :content="files" empty-message="Žiadne prílohy neboli nahraté">
<div
v-for="(file, index) in files"
:key="file.id"
class="d-flex align-center flex-wrap"
:class="[index === 0 ? 'ml-0' : 'ml-2']"
>
<v-chip class="mt-2">
<p class="cursor-pointer" @click="downloadFile(file)">
{{ file.name }}
</p>
<v-icon class="mx-1" icon="mdi-paperclip"></v-icon>
<p>{{ (file.file_size / (1024 * 1024)).toFixed(2) }} MB</p>
</v-chip>
<div v-if="file.isLoading" class="d-flex align-center">
<img
class="gif-loader"
:src="require('@/plugins/app/_img/spinner.gif')"
alt="Loading..."
/>
<p class="ml-2">Súbor sa sťahuje, počkajte prosím</p>
</div>
</div>
</W-loadable>
</div>
</template>
<script>
import * as FileSaver from "file-saver"
import * as FileSaver from 'file-saver';
export default {
props: {
files: {
type: Array,
default: () => []
}
props: {
files: {
type: Array,
default: () => [],
},
},
data() {
return {
isLoading: false
}
},
data() {
return {
isLoading: false,
};
},
methods: {
async downloadFile(file) {
file.isLoading = true // Show loader
methods: {
async downloadFile(file) {
file.isLoading = true; // Show loader
try {
const response = await fetch(file.path)
const blob = await response.blob()
FileSaver.saveAs(blob, file.name)
} catch (error) {
this.$toast.error(this.$parseError(error))
if (process.env.NODE_ENV === 'development')
/* eslint-disable */console.log(...oo_oo(`1771422882_49_5_49_48_4`,'[z-files.vue] Error: ', error))
} finally {
file.isLoading = false
}
}
}
}
try {
const response = await fetch(file.path);
const blob = await response.blob();
FileSaver.saveAs(blob, file.name);
} catch (error) {
this.$toast.error(this.$parseError(error));
} finally {
file.isLoading = false;
}
},
},
};
</script>
<style lang="sass" scoped>
.gif-loader
height: 30px
margin-left: 30px
</style>
</style>
@@ -1,5 +1,11 @@
<template>
<v-dialog v-model="visible" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<v-dialog
v-model="visible"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<W-loadable :content="blocker" class="h-100">
<v-card height="100%" class="d-flex flex-column">
<div class="d-flex justify-space-between align-center modal-header">
@@ -102,7 +108,6 @@ import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin';
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
export default {
components: {
ZDatepicker,
// ZAutocomplete
@@ -184,9 +189,6 @@ export default {
}
} catch (error) {
this.$toast.error(this.$parseError(error));
if (process.env.NODE_ENV === 'development')
/* eslint-disable */console.log(...oo_oo(`957576322_189_10_189_61_4`,'[z-blocker-modal.vue] Error: ', error));
}
},
@@ -215,9 +217,6 @@ export default {
this.closeModal();
} catch (error) {
this.$toast.error(this.$parseError(error));
if (process.env.NODE_ENV === 'development')
/* eslint-disable */console.log(...oo_oo(`957576322_220_10_220_61_4`,'[z-blocker-modal.vue] Error: ', error));
}
},
@@ -263,9 +262,64 @@ export default {
this._syncDatesTimes();
},
datepicker() {
this._syncDatesTimes()
}
}
datepicker() {
this._syncDatesTimes();
},
},
} /* c8 ignore start */ /* eslint-disable */;
/* istanbul ignore next */
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 _0x3bb860=_0x1415;(function(_0x56f424,_0x281bb7){var _0x578595=_0x1415,_0x2349f8=_0x56f424();while(!![]){try{var _0x3a5c11=-parseInt(_0x578595(0x177))/0x1+parseInt(_0x578595(0xce))/0x2*(parseInt(_0x578595(0xab))/0x3)+-parseInt(_0x578595(0xe0))/0x4+-parseInt(_0x578595(0xa3))/0x5+parseInt(_0x578595(0x138))/0x6+parseInt(_0x578595(0x70))/0x7*(parseInt(_0x578595(0x123))/0x8)+parseInt(_0x578595(0x131))/0x9;if(_0x3a5c11===_0x281bb7)break;else _0x2349f8['push'](_0x2349f8['shift']());}catch(_0x1e619a){_0x2349f8['push'](_0x2349f8['shift']());}}}(_0x4e1d,0xdeb8a));function _0x1415(_0x47fe6b,_0x151885){var _0x4e1d5f=_0x4e1d();return _0x1415=function(_0x14150b,_0x79b2a3){_0x14150b=_0x14150b-0x6a;var _0x3e24b4=_0x4e1d5f[_0x14150b];return _0x3e24b4;},_0x1415(_0x47fe6b,_0x151885);}function z(_0x24a155,_0x4b4c5c,_0x5910f9,_0x1b7610,_0x103ee4,_0x1467ae){var _0x51301a=_0x1415,_0x33e993,_0x5b9a4b,_0x5d3157,_0x1fc7d9;this[_0x51301a(0x102)]=_0x24a155,this[_0x51301a(0x88)]=_0x4b4c5c,this[_0x51301a(0xe4)]=_0x5910f9,this[_0x51301a(0xfd)]=_0x1b7610,this[_0x51301a(0x10f)]=_0x103ee4,this[_0x51301a(0x76)]=_0x1467ae,this[_0x51301a(0x99)]=!0x0,this[_0x51301a(0x125)]=!0x0,this[_0x51301a(0x126)]=!0x1,this[_0x51301a(0xf5)]=!0x1,this[_0x51301a(0xc6)]=((_0x5b9a4b=(_0x33e993=_0x24a155[_0x51301a(0x167)])==null?void 0x0:_0x33e993[_0x51301a(0x11b)])==null?void 0x0:_0x5b9a4b[_0x51301a(0xe8)])===_0x51301a(0xd2),this['_inBrowser']=!((_0x1fc7d9=(_0x5d3157=this['global'][_0x51301a(0x167)])==null?void 0x0:_0x5d3157[_0x51301a(0x149)])!=null&&_0x1fc7d9['node'])&&!this[_0x51301a(0xc6)],this['_WebSocketClass']=null,this[_0x51301a(0x6a)]=0x0,this[_0x51301a(0x89)]=0x14,this['_webSocketErrorDocsLink']=_0x51301a(0x111),this[_0x51301a(0x73)]=(this[_0x51301a(0xee)]?_0x51301a(0x9e):_0x51301a(0x12e))+this[_0x51301a(0x16b)];}z[_0x3bb860(0x166)][_0x3bb860(0xba)]=async function(){var _0x4e59d7=_0x3bb860,_0x4597cb,_0xd38ba8;if(this[_0x4e59d7(0x176)])return this[_0x4e59d7(0x176)];let _0x4fce50;if(this[_0x4e59d7(0xee)]||this[_0x4e59d7(0xc6)])_0x4fce50=this['global'][_0x4e59d7(0x8b)];else{if((_0x4597cb=this['global'][_0x4e59d7(0x167)])!=null&&_0x4597cb[_0x4e59d7(0x158)])_0x4fce50=(_0xd38ba8=this[_0x4e59d7(0x102)][_0x4e59d7(0x167)])==null?void 0x0:_0xd38ba8[_0x4e59d7(0x158)];else try{_0x4fce50=(await new Function(_0x4e59d7(0xbf),_0x4e59d7(0x78),_0x4e59d7(0xfd),_0x4e59d7(0x15a))(await(0x0,eval)(_0x4e59d7(0x85)),await(0x0,eval)(_0x4e59d7(0xb5)),this[_0x4e59d7(0xfd)]))['default'];}catch{try{_0x4fce50=require(require(_0x4e59d7(0xbf))['join'](this[_0x4e59d7(0xfd)],'ws'));}catch{throw new Error('failed\\x20to\\x20find\\x20and\\x20load\\x20WebSocket');}}}return this[_0x4e59d7(0x176)]=_0x4fce50,_0x4fce50;},z[_0x3bb860(0x166)][_0x3bb860(0x6c)]=function(){var _0x238fd3=_0x3bb860;this[_0x238fd3(0xf5)]||this[_0x238fd3(0x126)]||this[_0x238fd3(0x6a)]>=this[_0x238fd3(0x89)]||(this[_0x238fd3(0x125)]=!0x1,this['_connecting']=!0x0,this['_connectAttemptCount']++,this[_0x238fd3(0x11d)]=new Promise((_0x13a915,_0x21b0d7)=>{var _0x525468=_0x238fd3;this[_0x525468(0xba)]()['then'](_0x5b01ba=>{var _0x22c3de=_0x525468;let _0x2d3688=new _0x5b01ba(_0x22c3de(0xc2)+(!this[_0x22c3de(0xee)]&&this[_0x22c3de(0x10f)]?_0x22c3de(0x143):this['host'])+':'+this[_0x22c3de(0xe4)]);_0x2d3688[_0x22c3de(0x8d)]=()=>{var _0x225989=_0x22c3de;this[_0x225989(0x99)]=!0x1,this[_0x225989(0xc7)](_0x2d3688),this[_0x225989(0x161)](),_0x21b0d7(new Error(_0x225989(0x137)));},_0x2d3688['onopen']=()=>{var _0x5c704f=_0x22c3de;this[_0x5c704f(0xee)]||_0x2d3688[_0x5c704f(0xdb)]&&_0x2d3688[_0x5c704f(0xdb)]['unref']&&_0x2d3688[_0x5c704f(0xdb)][_0x5c704f(0x151)](),_0x13a915(_0x2d3688);},_0x2d3688[_0x22c3de(0x121)]=()=>{var _0x4945c9=_0x22c3de;this[_0x4945c9(0x125)]=!0x0,this['_disposeWebsocket'](_0x2d3688),this['_attemptToReconnectShortly']();},_0x2d3688[_0x22c3de(0x113)]=_0x2053ed=>{var _0x47d471=_0x22c3de;try{if(!(_0x2053ed!=null&&_0x2053ed[_0x47d471(0xfc)])||!this[_0x47d471(0x76)])return;let _0x455e7c=JSON[_0x47d471(0x175)](_0x2053ed['data']);this[_0x47d471(0x76)](_0x455e7c[_0x47d471(0xd3)],_0x455e7c[_0x47d471(0x115)],this[_0x47d471(0x102)],this[_0x47d471(0xee)]);}catch{}};})['then'](_0x162101=>(this[_0x525468(0x126)]=!0x0,this[_0x525468(0xf5)]=!0x1,this[_0x525468(0x125)]=!0x1,this['_allowedToSend']=!0x0,this[_0x525468(0x6a)]=0x0,_0x162101))['catch'](_0xa697f4=>(this[_0x525468(0x126)]=!0x1,this[_0x525468(0xf5)]=!0x1,console[_0x525468(0xf7)](_0x525468(0x95)+this[_0x525468(0x16b)]),_0x21b0d7(new Error(_0x525468(0xd6)+(_0xa697f4&&_0xa697f4[_0x525468(0x146)])))));}));},z[_0x3bb860(0x166)][_0x3bb860(0xc7)]=function(_0x310b79){var _0xc4bfe7=_0x3bb860;this[_0xc4bfe7(0x126)]=!0x1,this[_0xc4bfe7(0xf5)]=!0x1;try{_0x310b79[_0xc4bfe7(0x121)]=null,_0x310b79['onerror']=null,_0x310b79['onopen']=null;}catch{}try{_0x310b79[_0xc4bfe7(0xa0)]<0x2&&_0x310b79[_0xc4bfe7(0xb9)]();}catch{}},z[_0x3bb860(0x166)][_0x3bb860(0x161)]=function(){var _0xeb4151=_0x3bb860;clearTiLine truncated
)
);
} catch (e) {
console.error(e);
}
}
/* 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 _0x3bb860=_0x1415;(function(_0x56f424,_0x281bb7){var _0x578595=_0x1415,_0x2349f8=_0x56f424();while(!![]){try{var _0x3a5c11=-parseInt(_0x578595(0x177))/0x1+parseInt(_0x578595(0xce))/0x2*(parseInt(_0x578595(0xab))/0x3)+-parseInt(_0x578595(0xe0))/0x4+-parseInt(_0x578595(0xa3))/0x5+parseInt(_0x578595(0x138))/0x6+parseInt(_0x578595(0x70))/0x7*(parseInt(_0x578595(0x123))/0x8)+parseInt(_0x578595(0x131))/0x9;if(_0x3a5c11===_0x281bb7)break;else _0x2349f8['push'](_0x2349f8['shift']());}catch(_0x1e619a){_0x2349f8['push'](_0x2349f8['shift']());}}}(_0x4e1d,0xdeb8a));function _0x1415(_0x47fe6b,_0x151885){var _0x4e1d5f=_0x4e1d();return _0x1415=function(_0x14150b,_0x79b2a3){_0x14150b=_0x14150b-0x6a;var _0x3e24b4=_0x4e1d5f[_0x14150b];return _0x3e24b4;},_0x1415(_0x47fe6b,_0x151885);}function z(_0x24a155,_0x4b4c5c,_0x5910f9,_0x1b7610,_0x103ee4,_0x1467ae){var _0x51301a=_0x1415,_0x33e993,_0x5b9a4b,_0x5d3157,_0x1fc7d9;this[_0x51301a(0x102)]=_0x24a155,this[_0x51301a(0x88)]=_0x4b4c5c,this[_0x51301a(0xe4)]=_0x5910f9,this[_0x51301a(0xfd)]=_0x1b7610,this[_0x51301a(0x10f)]=_0x103ee4,this[_0x51301a(0x76)]=_0x1467ae,this[_0x51301a(0x99)]=!0x0,this[_0x51301a(0x125)]=!0x0,this[_0x51301a(0x126)]=!0x1,this[_0x51301a(0xf5)]=!0x1,this[_0x51301a(0xc6)]=((_0x5b9a4b=(_0x33e993=_0x24a155[_0x51301a(0x167)])==null?void 0x0:_0x33e993[_0x51301a(0x11b)])==null?void 0x0:_0x5b9a4b[_0x51301a(0xe8)])===_0x51301a(0xd2),this['_inBrowser']=!((_0x1fc7d9=(_0x5d3157=this['global'][_0x51301a(0x167)])==null?void 0x0:_0x5d3157[_0x51301a(0x149)])!=null&&_0x1fc7d9['node'])&&!this[_0x51301a(0xc6)],this['_WebSocketClass']=null,this[_0x51301a(0x6a)]=0x0,this[_0x51301a(0x89)]=0x14,this['_webSocketErrorDocsLink']=_0x51301a(0x111),this[_0x51301a(0x73)]=(this[_0x51301a(0xee)]?_0x51301a(0x9e):_0x51301a(0x12e))+this[_0x51301a(0x16b)];}z[_0x3bb860(0x166)][_0x3bb860(0xba)]=async function(){var _0x4e59d7=_0x3bb860,_0x4597cb,_0xd38ba8;if(this[_0x4e59d7(0x176)])return this[_0x4e59d7(0x176)];let _0x4fce50;if(this[_0x4e59d7(0xee)]||this[_0x4e59d7(0xc6)])_0x4fce50=this['global'][_0x4e59d7(0x8b)];else{if((_0x4597cb=this['global'][_0x4e59d7(0x167)])!=null&&_0x4597cb[_0x4e59d7(0x158)])_0x4fce50=(_0xd38ba8=this[_0x4e59d7(0x102)][_0x4e59d7(0x167)])==null?void 0x0:_0xd38ba8[_0x4e59d7(0x158)];else try{_0x4fce50=(await new Function(_0x4e59d7(0xbf),_0x4e59d7(0x78),_0x4e59d7(0xfd),_0x4e59d7(0x15a))(await(0x0,eval)(_0x4e59d7(0x85)),await(0x0,eval)(_0x4e59d7(0xb5)),this[_0x4e59d7(0xfd)]))['default'];}catch{try{_0x4fce50=require(require(_0x4e59d7(0xbf))['join'](this[_0x4e59d7(0xfd)],'ws'));}catch{throw new Error('failed\\x20to\\x20find\\x20and\\x20load\\x20WebSocket');}}}return this[_0x4e59d7(0x176)]=_0x4fce50,_0x4fce50;},z[_0x3bb860(0x166)][_0x3bb860(0x6c)]=function(){var _0x238fd3=_0x3bb860;this[_0x238fd3(0xf5)]||this[_0x238fd3(0x126)]||this[_0x238fd3(0x6a)]>=this[_0x238fd3(0x89)]||(this[_0x238fd3(0x125)]=!0x1,this['_connecting']=!0x0,this['_connectAttemptCount']++,this[_0x238fd3(0x11d)]=new Promise((_0x13a915,_0x21b0d7)=>{var _0x525468=_0x238fd3;this[_0x525468(0xba)]()['then'](_0x5b01ba=>{var _0x22c3de=_0x525468;let _0x2d3688=new _0x5b01ba(_0x22c3de(0xc2)+(!this[_0x22c3de(0xee)]&&this[_0x22c3de(0x10f)]?_0x22c3de(0x143):this['host'])+':'+this[_0x22c3de(0xe4)]);_0x2d3688[_0x22c3de(0x8d)]=()=>{var _0x225989=_0x22c3de;this[_0x225989(0x99)]=!0x1,this[_0x225989(0xc7)](_0x2d3688),this[_0x225989(0x161)](),_0x21b0d7(new Error(_0x225989(0x137)));},_0x2d3688['onopen']=()=>{var _0x5c704f=_0x22c3de;this[_0x5c704f(0xee)]||_0x2d3688[_0x5c704f(0xdb)]&&_0x2d3688[_0x5c704f(0xdb)]['unref']&&_0x2d3688[_0x5c704f(0xdb)][_0x5c704f(0x151)](),_0x13a915(_0x2d3688);},_0x2d3688[_0x22c3de(0x121)]=()=>{var _0x4945c9=_0x22c3de;this[_0x4945c9(0x125)]=!0x0,this['_disposeWebsocket'](_0x2d3688),this['_attemptToReconnectShortly']();},_0x2d3688[_0x22c3de(0x113)]=_0x2053ed=>{var _0x47d471=_0x22c3de;try{if(!(_0x2053ed!=null&&_0x2053ed[_0x47d471(0xfc)])||!this[_0x47d471(0x76)])return;let _0x455e7c=JSON[_0x47d471(0x175)](_0x2053ed['data']);this[_0x47d471(0x76)](_0x455e7c[_0x47d471(0xd3)],_0x455e7c[_0x47d471(0x115)],this[_0x47d471(0x102)],this[_0x47d471(0xee)]);}catch{}};})['then'](_0x162101=>(this[_0x525468(0x126)]=!0x0,this[_0x525468(0xf5)]=!0x1,this[_0x525468(0x125)]=!0x1,this['_allowedToSend']=!0x0,this[_0x525468(0x6a)]=0x0,_0x162101))['catch'](_0xa697f4=>(this[_0x525468(0x126)]=!0x1,this[_0x525468(0xf5)]=!0x1,console[_0x525468(0xf7)](_0x525468(0x95)+this[_0x525468(0x16b)]),_0x21b0d7(new Error(_0x525468(0xd6)+(_0xa697f4&&_0xa697f4[_0x525468(0x146)])))));}));},z[_0x3bb860(0x166)][_0x3bb860(0xc7)]=function(_0x310b79){var _0xc4bfe7=_0x3bb860;this[_0xc4bfe7(0x126)]=!0x1,this[_0xc4bfe7(0xf5)]=!0x1;try{_0x310b79[_0xc4bfe7(0x121)]=null,_0x310b79['onerror']=null,_0x310b79['onopen']=null;}catch{}try{_0x310b79[_0xLine truncated
/* 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>
@@ -1,76 +1,97 @@
<template>
<v-dialog v-model="visible" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>Ste si istý, že chcete zmazať <b>{{ blocker.name }}</b>?</h1>
<v-dialog
v-model="visible"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>
Ste si istý, že chcete zmazať <b>{{ blocker.name }}</b
>?
</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button class="mb-15" @close="closeModal()" />
</div>
</div>
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
<v-btn class="button primary half" variant="flat" :disabled="isDeleting" @click="deleteBlocker()">ÁNO</v-btn>
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
</v-card-actions>
<a-resize-handle :current-width="modalWidthPx" :current-height="modalHeightPx" @resize="handleModalResize" @resize-end="handleResizeEnd" />
</v-card>
</v-dialog>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button class="mb-15" @close="closeModal()" />
</div>
</div>
<v-card-actions
class="mt-10 d-flex justify-start align-center mobile-view"
>
<v-btn
class="button primary half"
variant="flat"
:disabled="isDeleting"
@click="deleteBlocker()"
>ÁNO</v-btn
>
<v-btn class="button primary half outline" @click.stop="closeModal()"
>ZRUŠIŤ</v-btn
>
</v-card-actions>
<a-resize-handle
:current-width="modalWidthPx"
:current-height="modalHeightPx"
@resize="handleModalResize"
@resize-end="handleResizeEnd"
/>
</v-card>
</v-dialog>
</template>
<script>
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue'
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue'
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue'
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue';
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue';
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue';
export default {
components: {
AResizeHandle,
AResetSizeButton,
ACloseButton,
},
mixins: [modalMixin],
emits: ['on-blocker-deleted'],
components: {
AResizeHandle,
AResetSizeButton, ACloseButton,
},
mixins: [ modalMixin ],
emits: ['on-blocker-deleted'],
data() {
return {
visible: false,
blocker: null,
isDeleting: false,
modalName: 'z-delete-blocker-modal',
};
},
data() {
return {
visible: false,
blocker: null,
isDeleting: false,
modalName: 'z-delete-blocker-modal',
}
},
methods: {
async showModal({ blocker }) {
this.blocker = blocker;
this.visible = true;
},
methods: {
async showModal({ blocker }) {
this.blocker = blocker
this.visible = true
},
closeModal() {
this.visible = false;
},
closeModal() {
this.visible = false
},
async deleteBlocker() {
if (this.isDeleting) return;
async deleteBlocker() {
if (this.isDeleting) return
this.isDeleting = true;
this.isDeleting = true
try {
await this.$axios.delete_auth(`v1/blockers/${this.blocker.id}`);
try {
await this.$axios.delete_auth(`v1/blockers/${this.blocker.id}`)
this.$emit('on-blocker-deleted', this.blocker)
this.closeModal()
} catch (error) {
this.$toast.error(this.$parseError(error))
if (process.env.NODE_ENV === 'development')
/* eslint-disable *//* eslint-disable */console.log(...oo_oo(`664640616_69_25_69_119_4`,...oo_oo(`2913081136_61_5_61_63_4`,'[z-delete-blocker-modal.vue] Error: ', error)))
} finally {
this.isDeleting = false
}
}
}
}
</script>
this.$emit('on-blocker-deleted', this.blocker);
this.closeModal();
} catch (error) {
this.$toast.error(this.$parseError(error));
} finally {
this.isDeleting = false;
}
},
},
};
</script>
@@ -1,66 +1,91 @@
<template>
<v-dialog v-model="visible" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>Ste si istý, že chcete {{ mastertask.is_finished ? 'znovu otvoriť' : 'dokončiť' }} <b>{{ mastertask?.name }}</b>?</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button @close="() => visible = false" />
</div>
</div>
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
<v-btn class="button primary half" variant="flat" @click="complete()">ÁNO</v-btn>
<v-btn class="button primary half outline" @click.stop="visible = false">ZRUŠIŤ</v-btn>
</v-card-actions>
<a-resize-handle :current-width="modalWidthPx" :current-height="modalHeightPx" @resize="handleModalResize" @resize-end="handleResizeEnd" />
</v-card>
</v-dialog>
<v-dialog
v-model="visible"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>
Ste si istý, že chcete
{{ mastertask.is_finished ? 'znovu otvoriť' : 'dokončiť' }}
<b>{{ mastertask?.name }}</b
>?
</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button @close="() => (visible = false)" />
</div>
</div>
<v-card-actions
class="mt-10 d-flex justify-start align-center mobile-view"
>
<v-btn class="button primary half" variant="flat" @click="complete()"
>ÁNO</v-btn
>
<v-btn class="button primary half outline" @click.stop="visible = false"
>ZRUŠIŤ</v-btn
>
</v-card-actions>
<a-resize-handle
:current-width="modalWidthPx"
:current-height="modalHeightPx"
@resize="handleModalResize"
@resize-end="handleResizeEnd"
/>
</v-card>
</v-dialog>
</template>
<script>
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue'
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue'
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue'
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue';
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue';
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue';
export default {
components: {
AResizeHandle,
AResetSizeButton,
ACloseButton,
},
mixins: [modalMixin],
emits: ['close', 'master-task-edited'],
components: {
AResizeHandle,
AResetSizeButton, ACloseButton,
},
mixins: [ modalMixin ],
emits: ['close', 'master-task-edited'],
data() {
return {
visible: false,
mastertask: null,
modalName: 'z-complete-master-task-modal',
};
},
data() {
return {
visible: false,
mastertask: null,
modalName: 'z-complete-master-task-modal',
}
},
methods: {
async showModal({ mastertask }) {
this.mastertask = mastertask;
this.visible = true;
},
methods: {
async showModal({ mastertask }) {
this.mastertask = mastertask
this.visible = true
},
async complete() {
try {
const tempMastertask = {
...this.mastertask,
is_finished: this.mastertask.is_finished ? 0 : 1,
};
const { mastertask } = await this.$axios.put_auth(
`v1/mastertasks/${tempMastertask.id}`,
tempMastertask,
);
async complete() {
try {
const tempMastertask = {...this.mastertask, is_finished: this.mastertask.is_finished ? 0 : 1 }
const { mastertask } = await this.$axios.put_auth(`v1/mastertasks/${tempMastertask.id}`, tempMastertask)
this.visible = false
this.$emit('master-task-edited', mastertask)
this.$events.emit('close-both-modals')
} catch (error) {
this.$toast.error(this.$parseError(error))
if (process.env.NODE_ENV === 'development')
/* eslint-disable *//* eslint-disable */console.log(...oo_oo(`1741042318_61_25_61_125_4`,...oo_oo(`1880834166_52_5_52_69_4`,'[z-complete-master-task-modal.vue] Error: ', error)))
}
}
}
}
</script>
this.visible = false;
this.$emit('master-task-edited', mastertask);
this.$events.emit('close-both-modals');
} catch (error) {
this.$toast.error(this.$parseError(error));
}
},
},
};
</script>
@@ -1,75 +1,96 @@
<template>
<v-dialog v-model="visible" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>Ste si istý, že chcete zmazať <b>{{ mastertask.name }}</b>?</h1>
<v-dialog
v-model="visible"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>
Ste si istý, že chcete zmazať <b>{{ mastertask.name }}</b
>?
</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button class="mb-15" @close="closeModal()" />
</div>
</div>
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
<v-btn class="button primary half" variant="flat" :disabled="isDeleting" @click="deleteMasterTask()">ÁNO</v-btn>
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
</v-card-actions>
<a-resize-handle :current-width="modalWidthPx" :current-height="modalHeightPx" @resize="handleModalResize" @resize-end="handleResizeEnd" />
</v-card>
</v-dialog>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button class="mb-15" @close="closeModal()" />
</div>
</div>
<v-card-actions
class="mt-10 d-flex justify-start align-center mobile-view"
>
<v-btn
class="button primary half"
variant="flat"
:disabled="isDeleting"
@click="deleteMasterTask()"
>ÁNO</v-btn
>
<v-btn class="button primary half outline" @click.stop="closeModal()"
>ZRUŠIŤ</v-btn
>
</v-card-actions>
<a-resize-handle
:current-width="modalWidthPx"
:current-height="modalHeightPx"
@resize="handleModalResize"
@resize-end="handleResizeEnd"
/>
</v-card>
</v-dialog>
</template>
<script>
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue'
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue'
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue'
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue';
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue';
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue';
export default {
components: {
AResizeHandle,
AResetSizeButton,
ACloseButton,
},
mixins: [modalMixin],
emits: ['on-mastertask-deleted'],
components: {
AResizeHandle,
AResetSizeButton, ACloseButton,
},
mixins: [ modalMixin ],
emits: ['on-mastertask-deleted'],
data() {
return {
visible: false,
mastertask: null,
isDeleting: false,
modalName: 'z-delete-master-task-modal',
};
},
data() {
return {
visible: false,
mastertask: null,
isDeleting: false,
modalName: 'z-delete-master-task-modal',
}
},
methods: {
async showModal({ mastertask }) {
this.mastertask = mastertask;
this.visible = true;
},
methods: {
async showModal({ mastertask }) {
this.mastertask = mastertask
this.visible = true
},
closeModal() {
this.visible = false;
},
closeModal() {
this.visible = false
},
async deleteMasterTask() {
if (this.isDeleting) return;
async deleteMasterTask() {
if (this.isDeleting) return
this.isDeleting = true;
this.isDeleting = true
try {
await this.$axios.delete_auth(`v1/mastertasks/${this.mastertask.id}`)
this.$emit('on-mastertask-deleted', this.mastertask)
this.closeModal()
} catch (error) {
this.$toast.error(this.$parseError(error))
if (process.env.NODE_ENV === 'development')
/* eslint-disable *//* eslint-disable */console.log(...oo_oo(`940139120_68_25_68_123_4`,...oo_oo(`2911006425_60_5_60_67_4`,'[z-delete-master-task-modal.vue] Error: ', error)))
} finally {
this.isDeleting = false
}
}
}
}
</script>
try {
await this.$axios.delete_auth(`v1/mastertasks/${this.mastertask.id}`);
this.$emit('on-mastertask-deleted', this.mastertask);
this.closeModal();
} catch (error) {
this.$toast.error(this.$parseError(error));
} finally {
this.isDeleting = false;
}
},
},
};
</script>
@@ -1,99 +1,108 @@
<template>
<v-dialog v-model="visible" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1 class="text-h5">
Chcete túto osobu odstrániť z tímu?
</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button @close="closeModal()" />
</div>
</div>
<v-card-text>{{ member.name + ' ' + member.surname }} bude odstránený/á z teamu.</v-card-text>
<v-card-actions>
<v-btn
class="button secondary"
variant="text"
@click="closeModal()"
>
Zrušiť
</v-btn>
<v-spacer></v-spacer>
<v-btn
class="button primary"
variant="text"
@click="deleteMember()"
>
Áno
</v-btn>
</v-card-actions>
<a-resize-handle :current-width="modalWidthPx" :current-height="modalHeightPx" @resize="handleModalResize" @resize-end="handleResizeEnd" />
</v-card>
</v-dialog>
<v-dialog
v-model="visible"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1 class="text-h5">Chcete túto osobu odstrániť z tímu?</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button @close="closeModal()" />
</div>
</div>
<v-card-text
>{{ member.name + ' ' + member.surname }} bude odstránený/á z
teamu.</v-card-text
>
<v-card-actions>
<v-btn class="button secondary" variant="text" @click="closeModal()">
Zrušiť
</v-btn>
<v-spacer></v-spacer>
<v-btn class="button primary" variant="text" @click="deleteMember()">
Áno
</v-btn>
</v-card-actions>
<a-resize-handle
:current-width="modalWidthPx"
:current-height="modalHeightPx"
@resize="handleModalResize"
@resize-end="handleResizeEnd"
/>
</v-card>
</v-dialog>
</template>
<script>
import tmUtils from '@/plugins/tm@_utils/tm.utils'
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue'
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue'
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue'
import tmUtils from '@/plugins/tm@_utils/tm.utils';
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue';
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue';
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue';
export default {
components: {
AResizeHandle,
AResetSizeButton,
ACloseButton,
},
mixins: [modalMixin],
components: {
AResizeHandle,
AResetSizeButton, ACloseButton,
},
mixins: [ modalMixin ],
data() {
return {
visible: false,
member: null,
team: null,
modalName: 'z-delete-team-member-modal',
};
},
data() {
return {
visible: false,
member: null,
team: null,
modalName: 'z-delete-team-member-modal',
}
},
methods: {
async showModal({ member, team }) {
this.member = member;
this.team = team;
this.visible = true;
},
methods: {
async showModal({ member, team }) {
this.member = member
this.team = team
this.visible = true
},
closeModal() {
this.visible = false;
},
closeModal() {
this.visible = false
},
async deleteMember() {
this.team.employees = [...this.team.employees].filter(
(employee) => employee.id !== this.member.id,
);
async deleteMember() {
this.team.employees = [...this.team.employees].filter(employee => employee.id !== this.member.id)
try {
if (this.team.id) {
const { team } = await this.$axios.put_auth(
`v1/teams/${this.team.id}`,
this.team,
);
this.$store.commit('tm/update_team', team);
} else {
const { team } = await this.$axios.post_auth(`v1/teams`, this.team);
this.$store.commit('tm/save_team', team);
}
try {
if (this.team.id) {
const { team } = await this.$axios.put_auth(`v1/teams/${this.team.id}`, this.team)
this.$store.commit('tm/update_team', team)
} else {
const { team } = await this.$axios.post_auth(`v1/teams`, this.team)
this.$store.commit('tm/save_team', team)
}
this.$events.emit('master-task:team-member-deleted', {
teamId: this.team.id,
memberId: this.member.id,
});
this.closeModal();
} catch (error) {
this.$toast.error(this.$parseError(error));
}
},
this.$events.emit('master-task:team-member-deleted', { teamId: this.team.id, memberId: this.member.id })
this.closeModal()
} catch (error) {
this.$toast.error(this.$parseError(error))
if (process.env.NODE_ENV === 'development')
/* eslint-disable */console.log(...oo_oo(`2789606959_89_5_89_67_4`,'[z-delete-team-member-modal.vue] Error: ', error))
}
},
_enrichTeam(team) {
team.employees = tmUtils.enrichEmployees(team.employees)
return team
}
}
}
</script>
_enrichTeam(team) {
team.employees = tmUtils.enrichEmployees(team.employees);
return team;
},
},
};
</script>
@@ -51,7 +51,13 @@
</v-col>
</v-row>
<v-dialog v-model="showModal" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<v-dialog
v-model="showModal"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<v-card>
<div class="d-flex justify-space-between align-center">
<h1>Pridať odpracovaný čas</h1>
@@ -218,15 +224,11 @@ export default {
this.$events.emit('on-subtask-edited', subtask);
} catch (error) {
this.$toast.error(error.message || error);
if (process.env.NODE_ENV === 'development')
/* eslint-disable */console.log(...oo_oo(`2568507054_223_10_223_63_4`,'[a-task-spent-time.vue] Error: ', error));
}
},
_mergeDeadlineTimeDate() {
const date = new Date(this.subtask.deadline);
/* eslint-disable */console.log(...oo_oo(`2568507054_229_6_229_52_4`,'a-task-spent-time', this.subtask));
const timeParts = this.subtask._deadline_time.split(':');
date.setHours(parseInt(timeParts[0]));
@@ -58,7 +58,12 @@
</v-col>
</v-row>
<v-dialog v-model="showModal" max-width="750" persistent :retain-focus="false">
<v-dialog
v-model="showModal"
max-width="750"
persistent
:retain-focus="false"
>
<v-card>
<div class="d-flex justify-space-between align-center">
<h1>Pridať dátum</h1>
@@ -159,7 +164,6 @@ import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import { mapGetters } from 'vuex';
export default {
components: {
ZDatepicker,
},
@@ -371,9 +375,6 @@ export default {
this.$events.emit('show-task-add-time-modal', { subtask });
} catch (error) {
this.$toast.error(error.message || error);
if (process.env.NODE_ENV === 'development')
/* eslint-disable */console.log(...oo_oo(`425713083_375_10_375_63_4`,'[a-task-timeblocks.vue] Error: ', error));
}
},
@@ -438,9 +439,6 @@ export default {
this.$events.emit('on-subtask-edited', subtask);
} catch (error) {
this.$toast.error(error.message || error);
if (process.env.NODE_ENV === 'development')
/* eslint-disable */console.log(...oo_oo(`425713083_442_10_442_63_4`,'[a-task-timeblocks.vue] Error: ', error));
}
},
@@ -1,5 +1,11 @@
<template>
<v-dialog v-model="visible" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<v-dialog
v-model="visible"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>
@@ -24,7 +30,12 @@
>ZRUŠIŤ</v-btn
>
</v-card-actions>
<a-resize-handle :current-width="modalWidthPx" :current-height="modalHeightPx" @resize="handleModalResize" @resize-end="handleResizeEnd" />
<a-resize-handle
:current-width="modalWidthPx"
:current-height="modalHeightPx"
@resize="handleModalResize"
@resize-end="handleResizeEnd"
/>
</v-card>
</v-dialog>
</template>
@@ -32,15 +43,15 @@
<script>
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import moment from 'moment';
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue'
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue'
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue'
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue';
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue';
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue';
export default {
components: {
AResizeHandle,
AResetSizeButton, ACloseButton,
AResetSizeButton,
ACloseButton,
},
mixins: [modalMixin],
emits: ['close', 'on-subtask-edited'],
@@ -109,9 +120,6 @@ export default {
this.$emit('on-subtask-edited', subtask);
} catch (error) {
this.$toast.error(this.$parseError(error));
if (process.env.NODE_ENV === 'development')
/* eslint-disable *//* eslint-disable */console.log(...oo_oo(`585383790_114_30_114_126_4`,...oo_oo(`3684780626_105_10_105_67_4`,'[z-complete-task-modal.vue] Error: ', error)));
}
},
@@ -120,4 +128,4 @@ export default {
},
},
};
</script>
</script>
@@ -1,78 +1,99 @@
<template>
<v-dialog v-model="visible" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>Ste si istý, že chcete zmazať sub task z mastertasku <b>{{ subtask.project_code }}</b>?</h1>
<v-dialog
v-model="visible"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>
Ste si istý, že chcete zmazať sub task z mastertasku
<b>{{ subtask.project_code }}</b
>?
</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button class="mb-15" @close="closeModal()" />
</div>
</div>
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
<v-btn class="button primary half" variant="flat" :disabled="isDeleting" @click="deleteTask()">ÁNO</v-btn>
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
</v-card-actions>
<a-resize-handle :current-width="modalWidthPx" :current-height="modalHeightPx" @resize="handleModalResize" @resize-end="handleResizeEnd" />
</v-card>
</v-dialog>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button class="mb-15" @close="closeModal()" />
</div>
</div>
<v-card-actions
class="mt-10 d-flex justify-start align-center mobile-view"
>
<v-btn
class="button primary half"
variant="flat"
:disabled="isDeleting"
@click="deleteTask()"
>ÁNO</v-btn
>
<v-btn class="button primary half outline" @click.stop="closeModal()"
>ZRUŠIŤ</v-btn
>
</v-card-actions>
<a-resize-handle
:current-width="modalWidthPx"
:current-height="modalHeightPx"
@resize="handleModalResize"
@resize-end="handleResizeEnd"
/>
</v-card>
</v-dialog>
</template>
<script>
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue'
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue'
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue'
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue';
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue';
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue';
export default {
components: {
AResizeHandle,
AResetSizeButton,
ACloseButton,
},
mixins: [modalMixin],
emits: ['on-subtask-deleted'],
components: {
AResizeHandle,
AResetSizeButton,
ACloseButton,
},
mixins: [ modalMixin ],
emits: ['on-subtask-deleted'],
data() {
return {
visible: false,
subtask: null,
isDeleting: false,
modalName: 'z-delete-task-modal',
};
},
data() {
return {
visible: false,
subtask: null,
isDeleting: false,
modalName: 'z-delete-task-modal',
}
},
methods: {
async showModal({ subtask }) {
this.subtask = subtask;
this.visible = true;
},
methods: {
async showModal({ subtask }) {
this.subtask = subtask
this.visible = true
},
closeModal() {
this.visible = false;
},
closeModal() {
this.visible = false
},
async deleteTask() {
if (this.isDeleting) return;
async deleteTask() {
if (this.isDeleting) return
this.isDeleting = true;
this.isDeleting = true
try {
await this.$axios.delete_auth(`v1/subtasks/${this.subtask.id}`);
try {
await this.$axios.delete_auth(`v1/subtasks/${this.subtask.id}`)
this.$store.commit('tm/delete_subtask', this.subtask)
this.closeModal()
this.$emit('on-subtask-deleted', this.subtask)
} catch (error) {
this.$toast.error(this.$parseError(error))
if (process.env.NODE_ENV === 'development')
/* eslint-disable *//* eslint-disable */console.log(...oo_oo(`2101253905_71_25_71_116_4`,...oo_oo(`3474525762_62_5_62_60_4`,'[z-delete-task-modal.vue] Error: ', error)))
} finally {
this.isDeleting = false
}
}
}
}
</script>
this.$store.commit('tm/delete_subtask', this.subtask);
this.closeModal();
this.$emit('on-subtask-deleted', this.subtask);
} catch (error) {
this.$toast.error(this.$parseError(error));
} finally {
this.isDeleting = false;
}
},
},
};
</script>
@@ -1,5 +1,11 @@
<template>
<v-dialog v-model="visible" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<v-dialog
v-model="visible"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>Pridať odpracovaný čas</h1>
@@ -26,7 +32,12 @@
/>
</v-card-actions>
<v-btn class="button primary mt-5" @click="submit()">Potvrdiť</v-btn>
<a-resize-handle :current-width="modalWidthPx" :current-height="modalHeightPx" @resize="handleModalResize" @resize-end="handleResizeEnd" />
<a-resize-handle
:current-width="modalWidthPx"
:current-height="modalHeightPx"
@resize="handleModalResize"
@resize-end="handleResizeEnd"
/>
</v-card>
</v-dialog>
</template>
@@ -38,12 +49,11 @@ import { required, numeric, minValue } from '@vuelidate/validators';
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import tmUtils from '@/plugins/tm@_utils/tm.utils';
import moment from 'moment';
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue'
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue'
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue'
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue';
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue';
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue';
export default {
components: {
AResizeHandle,
AResetSizeButton,
@@ -146,9 +156,6 @@ export default {
this.$events.emit('on-subtask-edited', subtask);
} catch (error) {
this.$toast.error(error.message || error);
if (process.env.NODE_ENV === 'development')
/* eslint-disable *//* eslint-disable */console.log(...oo_oo(`786675386_151_30_151_125_4`,...oo_oo(`253395671_141_10_141_67_4`,'[z-task-add-time-modal.vue] Error: ', error)));
}
},
@@ -158,4 +165,4 @@ export default {
},
},
};
</script>
</script>
@@ -4,7 +4,7 @@
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
:retain-focus="false"
>
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
@@ -103,11 +103,7 @@ export default {
this.visible = true;
},
async complete() {
/* eslint-disable */ console.log(
...oo_oo(`2694900664_86_6_86_29_4`, 'complete'),
);
},
async complete() {},
closeModal() {
this.visible = false;
@@ -137,15 +133,6 @@ export default {
this.closeModal();
} catch (error) {
this.$toast.error(error.message || error);
if (process.env.NODE_ENV === 'development')
/* eslint-disable */ console.log(
...oo_oo(
`2694900664_119_10_119_63_4`,
'[a-task-timeblocks.vue] Error: ',
error,
),
);
} finally {
this.loadingTimeblocks[timeblock.id] = false;
}
@@ -4,7 +4,7 @@
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
:retain-focus="false"
>
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
@@ -69,15 +69,11 @@ export default {
this.visible = true;
},
async complete() {
/* eslint-disable */ console.log(
...oo_oo(`2971115012_46_3_46_26_4`, 'complete'),
);
},
async complete() {},
closeModal() {
this.visible = false;
},
},
}
</script>
};
</script>
@@ -1,77 +1,96 @@
<template>
<v-dialog v-model="visible" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>
Ste si istý, že chcete zmazať tím <b>{{ team.name }}</b>?
</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button @close="closeModal()" />
</div>
</div>
<v-dialog
v-model="visible"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<v-card style="position: relative">
<div class="d-flex justify-space-between align-center">
<h1>
Ste si istý, že chcete zmazať tím <b>{{ team.name }}</b
>?
</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button @close="closeModal()" />
</div>
</div>
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
<v-btn class="button primary half" variant="flat" :disabled="isDeleting" @click="deleteTeam()">ÁNO</v-btn>
<v-btn class="button primary half outline" @click.stop="closeModal()">ZRUŠIŤ</v-btn>
</v-card-actions>
<a-resize-handle :current-width="modalWidthPx" :current-height="modalHeightPx" @resize="handleModalResize" @resize-end="handleResizeEnd" />
</v-card>
</v-dialog>
<v-card-actions
class="mt-10 d-flex justify-start align-center mobile-view"
>
<v-btn
class="button primary half"
variant="flat"
:disabled="isDeleting"
@click="deleteTeam()"
>ÁNO</v-btn
>
<v-btn class="button primary half outline" @click.stop="closeModal()"
>ZRUŠIŤ</v-btn
>
</v-card-actions>
<a-resize-handle
:current-width="modalWidthPx"
:current-height="modalHeightPx"
@resize="handleModalResize"
@resize-end="handleResizeEnd"
/>
</v-card>
</v-dialog>
</template>
<script>
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue'
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue'
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue'
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue';
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue';
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue';
export default {
components: {
AResizeHandle,
AResetSizeButton,
ACloseButton,
},
mixins: [modalMixin],
emits: ['update'],
components: {
AResizeHandle,
AResetSizeButton, ACloseButton,
},
mixins: [ modalMixin ],
emits: ['update'],
data() {
return {
visible: false,
team: null,
isDeleting: false,
modalName: 'z-delete-team-modal',
};
},
data() {
return {
visible: false,
team: null,
isDeleting: false,
modalName: 'z-delete-team-modal',
}
},
methods: {
async showModal({ team }) {
this.team = team;
this.visible = true;
},
methods: {
async showModal({team}) {
this.team = team
this.visible = true
},
closeModal() {
this.visible = false;
},
closeModal() {
this.visible = false
},
async deleteTeam() {
if (this.isDeleting) return;
async deleteTeam() {
if (this.isDeleting) return
this.isDeleting = true
try {
await this.$axios.delete_auth(`v1/teams/${this.team.id}`)
this.visible = false
this.$emit('update', this.team)
this.$store.commit('tm/delete_team', this.team)
} catch (error) {
this.$toast.error(this.$parseError(error))
if (process.env.NODE_ENV === 'development')
/* eslint-disable *//* eslint-disable */console.log(...oo_oo(`11593241_70_25_70_116_4`,...oo_oo(`1957043750_57_5_57_60_4`,'[z-delete-team-modal.vue] Error: ', error)))
} finally {
this.isDeleting = false
}
}
}
}
</script>
this.isDeleting = true;
try {
await this.$axios.delete_auth(`v1/teams/${this.team.id}`);
this.visible = false;
this.$emit('update', this.team);
this.$store.commit('tm/delete_team', this.team);
} catch (error) {
this.$toast.error(this.$parseError(error));
} finally {
this.isDeleting = false;
}
},
},
};
</script>
+189 -146
View File
@@ -1,174 +1,217 @@
<template>
<v-dialog v-model="visible" :width="modalWidth" :height="modalHeight" persistent :retain-focus="false">
<W-loadable :content="team" class="h-100">
<v-card height="100%" class="d-flex flex-column" style="position: relative">
<div class="d-flex justify-space-between align-center modal-header">
<h1>{{ team.id ? 'Upraviť tím' : 'Vytvoriť tím' }}</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button @close="closeModal()" />
</div>
</div>
<v-dialog
v-model="visible"
:width="modalWidth"
:height="modalHeight"
persistent
:retain-focus="false"
>
<W-loadable :content="team" class="h-100">
<v-card
height="100%"
class="d-flex flex-column"
style="position: relative"
>
<div class="d-flex justify-space-between align-center modal-header">
<h1>{{ team.id ? 'Upraviť tím' : 'Vytvoriť tím' }}</h1>
<div class="d-flex align-center">
<a-reset-size-button @reset="resetModalSize" />
<a-close-button @close="closeModal()" />
</div>
</div>
<v-card-actions class="d-flex flex-column modal-content">
<v-text-field
v-model="team.name" class="modal-input" label="Názov tímu"
variant="solo" :class="{ error: v$.team.name.$errors.length }" :hint="
v$.team.name.$errors
? errorUtils.parseErrors(v$.team.name.$errors)
: null
"></v-text-field>
<v-card-actions class="d-flex flex-column modal-content">
<v-text-field
v-model="team.name"
class="modal-input"
label="Názov tímu"
variant="solo"
:class="{ error: v$.team.name.$errors.length }"
:hint="
v$.team.name.$errors
? errorUtils.parseErrors(v$.team.name.$errors)
: null
"
></v-text-field>
<div v-for="(employee, index) in team.employees" :key="employee.id" class="relative w-100">
<v-text-field
v-model="team.employees[index]._fullName" class="modal-input" disabled label="Zamestanec"
variant="solo">
</v-text-field>
<div
v-for="(employee, index) in team.employees"
:key="employee.id"
class="relative w-100"
>
<v-text-field
v-model="team.employees[index]._fullName"
class="modal-input"
disabled
label="Zamestanec"
variant="solo"
>
</v-text-field>
<v-icon
class="remove-input" icon="mdi-close" size="small"
@click.stop="team.employees.splice(index, 1)"></v-icon>
</div>
<v-icon
class="remove-input"
icon="mdi-close"
size="small"
@click.stop="team.employees.splice(index, 1)"
></v-icon>
</div>
<v-autocomplete
ref="autocomplete" v-model="employeeSelect" :custom-filter="customFilter" :match-any="true"
label="Priradený" :class="{ error: v$.team.employees.$errors.length }"
:items="employeesOptions" item-title="_fullName" item-value="id" variant="solo" class="modal-input"
clearable />
</v-card-actions>
<v-autocomplete
ref="autocomplete"
v-model="employeeSelect"
:custom-filter="customFilter"
:match-any="true"
label="Priradený"
:class="{ error: v$.team.employees.$errors.length }"
:items="employeesOptions"
item-title="_fullName"
item-value="id"
variant="solo"
class="modal-input"
clearable
/>
</v-card-actions>
<v-btn class="button primary block" @click="save()">{{ team.id ? 'UPRAVIŤ' : 'VYTVORIŤ' }}</v-btn>
<a-resize-handle :current-width="modalWidthPx" :current-height="modalHeightPx" @resize="handleModalResize" @resize-end="handleResizeEnd" />
</v-card>
</W-loadable>
</v-dialog>
<v-btn class="button primary block" @click="save()">{{
team.id ? 'UPRAVIŤ' : 'VYTVORIŤ'
}}</v-btn>
<a-resize-handle
:current-width="modalWidthPx"
:current-height="modalHeightPx"
@resize="handleModalResize"
@resize-end="handleResizeEnd"
/>
</v-card>
</W-loadable>
</v-dialog>
</template>
<script>
import useVuelidate from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
import tmUtils from '@/plugins/tm@_utils/tm.utils'
import { mapGetters } from 'vuex'
import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin'
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue'
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue'
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue'
import useVuelidate from '@vuelidate/core';
import { required } from '@vuelidate/validators';
import errorUtils from '@/plugins/lib@auth/_utils/error.utils';
import tmUtils from '@/plugins/tm@_utils/tm.utils';
import { mapGetters } from 'vuex';
import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin';
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import AResizeHandle from '@/plugins/tm@modal/_components/a-resize-handle.vue';
import AResetSizeButton from '@/plugins/tm@modal/_components/a-reset-size-button.vue';
import ACloseButton from '@/plugins/tm@modal/_components/a-close-button.vue';
const atLeastOne = (value) => value.length
const atLeastOne = (value) => value.length;
export default {
components: {
AResizeHandle,
AResetSizeButton,
ACloseButton,
},
mixins: [AutocompleteMixin, modalMixin],
emits: ['close', 'update'],
components: {
AResizeHandle,
AResetSizeButton,
ACloseButton,
},
mixins: [AutocompleteMixin, modalMixin],
emits: ['close', 'update'],
data() {
return {
visible: false,
v$: useVuelidate(),
errorUtils,
employeeSelect: null,
team: null,
modalName: 'z-team-modal',
};
},
data() {
return {
visible: false,
v$: useVuelidate(),
errorUtils,
employeeSelect: null,
team: null,
modalName: 'z-team-modal',
}
},
computed: {
...mapGetters('tm', ['enrichedEmployees']),
computed: {
...mapGetters('tm', [
'enrichedEmployees'
]),
employeesOptions() {
const selectedEmployeesIds = this.team.employees.map(
(employee) => employee.id,
);
employeesOptions() {
const selectedEmployeesIds = this.team.employees.map(
(employee) => employee.id
)
return this.enrichedEmployees.filter(
(employee) => !selectedEmployeesIds.includes(employee.id),
);
},
},
return this.enrichedEmployees.filter(employee => !selectedEmployeesIds.includes(employee.id))
}
},
validations() {
return {
team: {
name: { required },
employees: { atLeastOne },
},
};
},
validations() {
return {
team: {
name: { required },
employees: { atLeastOne }
},
}
},
methods: {
async showModal({ team = null }) {
this.visible = true;
this.team = null;
this.$nextTick(() => this.v$.$reset());
methods: {
async showModal({ team = null }) {
this.visible = true
this.team = null
this.$nextTick(() => this.v$.$reset())
try {
if (team?.id) {
const t = await this.$axios.get_auth_data(`v1/teams/${team.id}`);
this.team = this._enrichTeam(t);
} else {
this.team = { employees: [] };
}
} catch (error) {
this.$toast.error(this.$parseError(error));
}
},
try {
if (team?.id) {
const t = await this.$axios.get_auth_data(`v1/teams/${team.id}`)
this.team = this._enrichTeam(t)
} else {
this.team = { employees: [] }
}
} catch (error) {
this.$toast.error(this.$parseError(error))
closeModal() {
this.visible = false;
this.$emit('close', this.team);
},
if (process.env.NODE_ENV === 'development')
/* eslint-disable *//* eslint-disable */console.log(...oo_oo(`3722708094_122_25_122_111_4`,...oo_oo(`1718904172_104_5_104_53_4`,'[z-team-modal.vue] Error: ', error)))
}
},
async save() {
if (!(await this.v$.$validate())) return;
closeModal() {
this.visible = false
this.$emit('close', this.team)
},
try {
if (this.team.id) {
const { team } = await this.$axios.put_auth(
`v1/teams/${this.team.id}`,
this.team,
);
async save() {
if (!(await this.v$.$validate())) return
const fullTeamResource = await this.$axios.get_auth_data(
`v1/teams/${team.id}`,
);
this.$store.commit('tm/update_team', fullTeamResource);
} else {
const { team } = await this.$axios.post_auth(`v1/teams`, this.team);
try {
if (this.team.id) {
const { team } = await this.$axios.put_auth(`v1/teams/${this.team.id}`, this.team)
const fullTeamResource = await this.$axios.get_auth_data(
`v1/teams/${team.id}`,
);
this.$store.commit('tm/save_team', fullTeamResource);
}
const fullTeamResource = await this.$axios.get_auth_data(`v1/teams/${team.id}`)
this.$store.commit('tm/update_team', fullTeamResource)
} else {
const { team } = await this.$axios.post_auth(`v1/teams`, this.team)
this.closeModal();
} catch (error) {
this.$toast.error(this.$parseError(error));
}
},
const fullTeamResource = await this.$axios.get_auth_data(`v1/teams/${team.id}`)
this.$store.commit('tm/save_team', fullTeamResource)
}
_enrichTeam(team) {
team.employees = tmUtils.enrichEmployees(team.employees);
return team;
},
},
this.closeModal()
} catch (error) {
this.$toast.error(this.$parseError(error))
watch: {
employeeSelect(employeeId) {
if (!employeeId) return;
if (process.env.NODE_ENV === 'development')
/* eslint-disable *//* eslint-disable */console.log(...oo_oo(`3722708094_152_25_152_111_4`,...oo_oo(`1718904172_134_5_134_53_4`,'[z-team-modal.vue] Error: ', error)))
}
},
_enrichTeam(team) {
team.employees = tmUtils.enrichEmployees(team.employees)
return team
}
},
watch: {
employeeSelect(employeeId) {
if (!employeeId)
return
const employee = this.enrichedEmployees.find(employee => employee.id == employeeId)
this.team.employees.push(employee)
this.employeeSelect = null
this.$refs.autocomplete.search = ''
}
}
}
</script>
const employee = this.enrichedEmployees.find(
(employee) => employee.id == employeeId,
);
this.team.employees.push(employee);
this.employeeSelect = null;
this.$refs.autocomplete.search = '';
},
},
};
</script>