Merge branch 'task001/add-labels' of bitbucket.org:studiotem/jandl-taskmanager-app

This commit is contained in:
Matej Glasnák committed 2025-12-03 14:46:14 +01:00
commit 4edc33c316
26 files changed
+380 -756

No files matched your search

@@ -51,7 +51,7 @@
</v-col>
</v-row>
<v-dialog v-model="showModal" max-width="750" persistent>
<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>
@@ -58,7 +58,7 @@
</v-col>
</v-row>
<v-dialog v-model="showModal" max-width="750" persistent>
<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>
@@ -70,8 +70,9 @@
</div>
<v-card-actions class="mt-10 d-flex flex-column modal-content">
<Datepicker
<Z-datepicker
v-model="form.date"
label="Dátum"
format="dd.MM.yyyy"
locale="sk"
select-text="Vybrať"
@@ -115,7 +116,7 @@
<v-btn class="button primary mt-5" @click="submit()">Potvrdiť</v-btn>
</v-card>
</v-dialog>
<v-dialog v-model="visible" max-width="750" persistent>
<v-dialog v-model="visible" max-width="750" persistent :retain-focus="false">
<v-card>
<div class="d-flex justify-space-between align-center">
<h1 class="text-red">
@@ -152,7 +153,7 @@ import tmUtils from '@/plugins/tm@_utils/tm.utils';
import errorUtils from '@/plugins/lib@auth/_utils/error.utils';
import useVuelidate from '@vuelidate/core';
import { required } from '@vuelidate/validators';
import Datepicker from '@vuepic/vue-datepicker';
import ZDatepicker from '@/plugins/tm@_components/z-datepicker.vue';
import moment from 'moment';
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin';
import { mapGetters } from 'vuex';
@@ -160,7 +161,7 @@ import { mapGetters } from 'vuex';
export default {
components: {
Datepicker,
ZDatepicker,
},
mixins: [modalMixin],
@@ -3,14 +3,10 @@
<div v-if="deletable && editable" class="x-button">
<button class="x-button" @click="$emit('removeTimeblock')">x</button>
</div>
<div
:ref="`timeblock-datepicker-wrapper-${index}`"
class="datepicker-wrapper"
@click="handleDatepickerClick"
>
<Datepicker
:ref="`timeblock-datepicker-${index}`"
<div class="datepicker-wrapper">
<Z-datepicker
:model-value="timeblock.date"
label="Dátum"
format="dd.MM.yyyy"
locale="sk"
select-text="Vybrať"
@@ -48,11 +44,11 @@
<script>
import useVuelidate from '@vuelidate/core';
import { requiredIf } from '@vuelidate/validators';
import Datepicker from '@vuepic/vue-datepicker';
import ZDatepicker from '@/plugins/tm@_components/z-datepicker.vue';
export default {
components: {
Datepicker,
ZDatepicker,
},
props: {
@@ -71,21 +67,6 @@ export default {
default: false,
},
preventInputFocus: {
type: Boolean,
default: false,
},
onInputFocus: {
type: Function,
default: () => ({}),
},
onDateOpen: {
type: Function,
default: () => ({}),
},
index: {
type: Number,
},
@@ -107,49 +88,6 @@ export default {
},
methods: {
handleDatepickerClick() {
// Pass the datepicker wrapper element reference to the mixin
const scrollTarget =
this.$refs[`timeblock-datepicker-wrapper-${this.index}`];
this.onDateOpen(scrollTarget);
// Open the datepicker
this.openDatepicker(`timeblock-datepicker-${this.index}`);
setTimeout(() => {
const calendar = document.querySelector(
'.dp__menu.dp__menu_index.dp__theme_light',
);
if (!calendar) return;
// Get the datepicker wrapper element
const datepickerWrapper =
this.$refs[`timeblock-datepicker-wrapper-${this.index}`];
// Get the modal container
const modalContainer = document.querySelector('.v-overlay__content');
if (!datepickerWrapper || !modalContainer) return;
// Get bounding rectangles
const wrapperRect = datepickerWrapper.getBoundingClientRect();
const modalRect = modalContainer.getBoundingClientRect();
// Calculate position relative to modal
const topPosition =
wrapperRect.top - modalRect.top + wrapperRect.height;
// Apply positioning
// calendar.style.position = 'absolute';
calendar.style.top = `${topPosition + 210}px`;
// calendar.style.left = `${leftPosition}px`;
}, 100);
},
async openDatepicker(ref) {
this.$refs[ref].openMenu();
},
updateDate(date) {
const updated = { ...this.timeblock, date };
this.$emit('updateTimeblock', updated);
@@ -194,7 +132,4 @@ export default {
.datepicker-wrapper
width: 100%
.datepicker-input
width: 100% !important
pointer-events: none
</style>