mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
build(dev): rebuild, file formatting, removed console logs
This commit is contained in:
1 parent
734a3fac6c
commit
f69e55859b
34 files changed
+1537
-1177
No files matched your search
@@ -1,48 +1,45 @@
|
||||
<template>
|
||||
<ion-split-pane content-id="main-content">
|
||||
<A-sidemenu ref="sidemenu" />
|
||||
<ion-split-pane content-id="main-content">
|
||||
<A-sidemenu ref="sidemenu" />
|
||||
|
||||
<v-app class="split-pane-right-side" @click="$events.emit('close-menu')">
|
||||
<A-header />
|
||||
<v-app class="split-pane-right-side" @click="$events.emit('close-menu')">
|
||||
<A-header />
|
||||
|
||||
<div class="main-content">
|
||||
<router-view id="main-content" />
|
||||
</div>
|
||||
</v-app>
|
||||
</ion-split-pane>
|
||||
<div class="main-content">
|
||||
<router-view id="main-content" />
|
||||
</div>
|
||||
</v-app>
|
||||
</ion-split-pane>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ASidemenu from './_components/a-sidemenu.vue'
|
||||
import AHeader from './_components/a-header.vue'
|
||||
import ASidemenu from './_components/a-sidemenu.vue';
|
||||
import AHeader from './_components/a-header.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ASidemenu,
|
||||
AHeader
|
||||
},
|
||||
components: {
|
||||
ASidemenu,
|
||||
AHeader,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
loader: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loader: null,
|
||||
};
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
this.loader = this.$loading.show()
|
||||
async mounted() {
|
||||
this.loader = this.$loading.show();
|
||||
|
||||
try {
|
||||
await this.$store.dispatch('tm/initialize')
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
/* eslint-disable */console.log(...oo_oo(`2651960922_40_4_40_50_4`,'[app.layout.vue] Error: ', error))
|
||||
} finally {
|
||||
this.loader?.hide()
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
await this.$store.dispatch('tm/initialize');
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error));
|
||||
} finally {
|
||||
this.loader?.hide();
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
|
||||
@@ -1,61 +1,92 @@
|
||||
<template>
|
||||
<v-form @keydown.enter="submit()">
|
||||
<v-text-field v-model="form.email" label="E-mail" variant="solo" autocomplete="email" class="mb-2" bg-color="white" :hint="v$.form.email.$errors ? errorUtils.parseErrors(v$.form.email.$errors) : null" :class="{ error: v$.form.email.$errors.length }" />
|
||||
<v-form @keydown.enter="submit()">
|
||||
<v-text-field
|
||||
v-model="form.email"
|
||||
label="E-mail"
|
||||
variant="solo"
|
||||
autocomplete="email"
|
||||
class="mb-2"
|
||||
bg-color="white"
|
||||
:hint="
|
||||
v$.form.email.$errors
|
||||
? errorUtils.parseErrors(v$.form.email.$errors)
|
||||
: null
|
||||
"
|
||||
:class="{ error: v$.form.email.$errors.length }"
|
||||
/>
|
||||
|
||||
<v-text-field
|
||||
v-model="form.password" :type="showPassword ? 'text' : 'password'" variant="solo" bg-color="white" class="mb-2" :counter="12" label="Heslo" autocomplete="current-password" :hint="v$.form.password.$errors ? errorUtils.parseErrors(v$.form.password.$errors) : null"
|
||||
:class="{ error: v$.form.password.$errors.length }" :append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'" @click:append="showPassword = !showPassword" />
|
||||
<v-text-field
|
||||
v-model="form.password"
|
||||
:type="showPassword ? 'text' : 'password'"
|
||||
variant="solo"
|
||||
bg-color="white"
|
||||
class="mb-2"
|
||||
:counter="12"
|
||||
label="Heslo"
|
||||
autocomplete="current-password"
|
||||
:hint="
|
||||
v$.form.password.$errors
|
||||
? errorUtils.parseErrors(v$.form.password.$errors)
|
||||
: null
|
||||
"
|
||||
:class="{ error: v$.form.password.$errors.length }"
|
||||
:append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'"
|
||||
@click:append="showPassword = !showPassword"
|
||||
/>
|
||||
|
||||
<div class="d-flex flex-column">
|
||||
<v-btn class="button primary block" color="#7F39FB" @click="submit()">Log In</v-btn>
|
||||
<p class="mt-5 text-center cursor-pointer" @click="$router.push({ name: 'Forgot password' })">Forgotten password ?</p>
|
||||
</div>
|
||||
</v-form>
|
||||
<div class="d-flex flex-column">
|
||||
<v-btn class="button primary block" color="#7F39FB" @click="submit()"
|
||||
>Log In</v-btn
|
||||
>
|
||||
<p
|
||||
class="mt-5 text-center cursor-pointer"
|
||||
@click="$router.push({ name: 'Forgot password' })"
|
||||
>
|
||||
Forgotten password ?
|
||||
</p>
|
||||
</div>
|
||||
</v-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
import { required, email, minLength } from '@vuelidate/validators'
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
|
||||
import useVuelidate from '@vuelidate/core';
|
||||
import { required, email, minLength } from '@vuelidate/validators';
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
errorUtils,
|
||||
v$: useVuelidate(),
|
||||
form: {},
|
||||
// form: {
|
||||
// email: 'jan.fajnor@jandl.sk',
|
||||
// password: 'testpassword'
|
||||
// },
|
||||
showPassword: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
errorUtils,
|
||||
v$: useVuelidate(),
|
||||
form: {},
|
||||
// form: {
|
||||
// email: 'jan.fajnor@jandl.sk',
|
||||
// password: 'testpassword'
|
||||
// },
|
||||
showPassword: false,
|
||||
};
|
||||
},
|
||||
|
||||
validations() {
|
||||
return {
|
||||
form: {
|
||||
email: {required, email },
|
||||
password: {required, minLength: minLength(12)}
|
||||
}
|
||||
}
|
||||
},
|
||||
validations() {
|
||||
return {
|
||||
form: {
|
||||
email: { required, email },
|
||||
password: { required, minLength: minLength(12) },
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
async submit() {
|
||||
if (!(await this.v$.$validate()))
|
||||
return
|
||||
methods: {
|
||||
async submit() {
|
||||
if (!(await this.v$.$validate())) return;
|
||||
|
||||
try {
|
||||
await this.$store.dispatch('auth/login', this.form)
|
||||
this.$router.push({ name: 'Dashboard - Tasks'})
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
/* eslint-disable */console.log(...oo_oo(`788159455_55_5_55_53_4`,'[a-login-form.vue] Error: ', error))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
try {
|
||||
await this.$store.dispatch('auth/login', this.form);
|
||||
this.$router.push({ name: 'Dashboard - Tasks' });
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error));
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -1,71 +1,126 @@
|
||||
<template>
|
||||
<v-form @keydown.enter="submit()">
|
||||
<v-text-field v-model="credentials.email" label="E-mail" autocomplete="email" bg-color="white" variant="solo" type="email" class="mb-2" :hint="v$.credentials.email.$errors ? errorUtils.parseErrors(v$.credentials.email.$errors) : null" :class="{ error: v$.credentials.email.$errors.length }" />
|
||||
<v-text-field v-model="credentials.password" label="Heslo" autocomplete="new-password" bg-color="white" variant="solo" :type="showPassword ? 'text' : 'password'" class="mb-2" :hint="v$.credentials.password.$errors ? errorUtils.parseErrors(v$.credentials.password.$errors) : null" :class="{ error: v$.credentials.password.$errors.length }" :counter="12" :append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'" @click:append="showPassword = !showPassword" />
|
||||
<v-text-field v-model="credentials.password_confirmation" autocomplete="new-password" bg-color="white" variant="solo" label="Potvrdenie hesla" :type="showConfirmationPassword ? 'text' : 'password'" :counter="12" class="mb-2" :hint="v$.credentials.password_confirmation.$errors ? errorUtils.parseErrors(v$.credentials.password_confirmation.$errors) : null" :class="{ error: v$.credentials.password_confirmation.$errors.length }" :append-icon="showConfirmationPassword ? 'mdi-eye' : 'mdi-eye-off'" @click:append="showConfirmationPassword = !showConfirmationPassword" />
|
||||
<v-form @keydown.enter="submit()">
|
||||
<v-text-field
|
||||
v-model="credentials.email"
|
||||
label="E-mail"
|
||||
autocomplete="email"
|
||||
bg-color="white"
|
||||
variant="solo"
|
||||
type="email"
|
||||
class="mb-2"
|
||||
:hint="
|
||||
v$.credentials.email.$errors
|
||||
? errorUtils.parseErrors(v$.credentials.email.$errors)
|
||||
: null
|
||||
"
|
||||
:class="{ error: v$.credentials.email.$errors.length }"
|
||||
/>
|
||||
<v-text-field
|
||||
v-model="credentials.password"
|
||||
label="Heslo"
|
||||
autocomplete="new-password"
|
||||
bg-color="white"
|
||||
variant="solo"
|
||||
:type="showPassword ? 'text' : 'password'"
|
||||
class="mb-2"
|
||||
:hint="
|
||||
v$.credentials.password.$errors
|
||||
? errorUtils.parseErrors(v$.credentials.password.$errors)
|
||||
: null
|
||||
"
|
||||
:class="{ error: v$.credentials.password.$errors.length }"
|
||||
:counter="12"
|
||||
:append-icon="showPassword ? 'mdi-eye' : 'mdi-eye-off'"
|
||||
@click:append="showPassword = !showPassword"
|
||||
/>
|
||||
<v-text-field
|
||||
v-model="credentials.password_confirmation"
|
||||
autocomplete="new-password"
|
||||
bg-color="white"
|
||||
variant="solo"
|
||||
label="Potvrdenie hesla"
|
||||
:type="showConfirmationPassword ? 'text' : 'password'"
|
||||
:counter="12"
|
||||
class="mb-2"
|
||||
:hint="
|
||||
v$.credentials.password_confirmation.$errors
|
||||
? errorUtils.parseErrors(v$.credentials.password_confirmation.$errors)
|
||||
: null
|
||||
"
|
||||
:class="{ error: v$.credentials.password_confirmation.$errors.length }"
|
||||
:append-icon="showConfirmationPassword ? 'mdi-eye' : 'mdi-eye-off'"
|
||||
@click:append="showConfirmationPassword = !showConfirmationPassword"
|
||||
/>
|
||||
|
||||
<div class="d-flex flex-column">
|
||||
<v-btn class="button" color="#7F39FB" :disabled="!credentials.token" @click.prevent="submit()">Change password</v-btn>
|
||||
</div>
|
||||
</v-form>
|
||||
<div class="d-flex flex-column">
|
||||
<v-btn
|
||||
class="button"
|
||||
color="#7F39FB"
|
||||
:disabled="!credentials.token"
|
||||
@click.prevent="submit()"
|
||||
>Change password</v-btn
|
||||
>
|
||||
</div>
|
||||
</v-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
import { required, email, minLength, sameAs } from '@vuelidate/validators'
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
|
||||
import useVuelidate from '@vuelidate/core';
|
||||
import { required, email, minLength, sameAs } from '@vuelidate/validators';
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
navigateToAfterPasswordReset: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
props: {
|
||||
navigateToAfterPasswordReset: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
errorUtils,
|
||||
v$: useVuelidate(),
|
||||
credentials: {
|
||||
email: this.$route.query.email,
|
||||
token: this.$route.query.token
|
||||
},
|
||||
showPassword: false,
|
||||
showConfirmationPassword: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
errorUtils,
|
||||
v$: useVuelidate(),
|
||||
credentials: {
|
||||
email: this.$route.query.email,
|
||||
token: this.$route.query.token,
|
||||
},
|
||||
showPassword: false,
|
||||
showConfirmationPassword: false,
|
||||
};
|
||||
},
|
||||
|
||||
validations() {
|
||||
return {
|
||||
credentials: {
|
||||
email: { required, email },
|
||||
password: { required, minLength: minLength(12) },
|
||||
password_confirmation: { required, minLength: minLength(12), sameAs: sameAs(this.credentials.password)}
|
||||
}
|
||||
}
|
||||
},
|
||||
validations() {
|
||||
return {
|
||||
credentials: {
|
||||
email: { required, email },
|
||||
password: { required, minLength: minLength(12) },
|
||||
password_confirmation: {
|
||||
required,
|
||||
minLength: minLength(12),
|
||||
sameAs: sameAs(this.credentials.password),
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if (!this.$route.query.token)
|
||||
return this.$toast.error('Error. Please check that the link is correct')
|
||||
},
|
||||
mounted() {
|
||||
if (!this.$route.query.token)
|
||||
return this.$toast.error('Error. Please check that the link is correct');
|
||||
},
|
||||
|
||||
methods: {
|
||||
async submit() {
|
||||
if (!(await this.v$.$validate())) return
|
||||
methods: {
|
||||
async submit() {
|
||||
if (!(await this.v$.$validate())) return;
|
||||
|
||||
try {
|
||||
await this.$store.dispatch('auth/resetPassword', this.credentials)
|
||||
this.$router.push({ name: 'Login' })
|
||||
this.$toast.success('Your password has been successfully changed.')
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
/* eslint-disable */console.log(...oo_oo(`2009189667_66_5_66_62_4`,'[a-reset-password-form.vue] Error: ', error))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
try {
|
||||
await this.$store.dispatch('auth/resetPassword', this.credentials);
|
||||
this.$router.push({ name: 'Login' });
|
||||
this.$toast.success('Your password has been successfully changed.');
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error));
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -235,9 +235,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(`1460579881_240_12_240_58_4`,'[z-timeline.vue] Error: ', error));
|
||||
}
|
||||
|
||||
const isAfterDeadline = this.isAfterDeadline(event);
|
||||
@@ -270,9 +267,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(`1460579881_275_12_275_58_4`,'[z-timeline.vue] Error: ', error));
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -372,9 +366,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(`1460579881_377_10_377_56_4`,'[z-timeline.vue] Error: ', error));
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -135,15 +135,6 @@ export default {
|
||||
this.mastertasks = mastertasks;
|
||||
} catch (error) {
|
||||
this.$toast.error('Nepodarilo sa nacitat data!');
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
/* eslint-disable */ console.log(
|
||||
...oo_oo(
|
||||
`130007368_123_5_123_49_4`,
|
||||
'[projects.vue] Error: ',
|
||||
error,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -1,198 +1,235 @@
|
||||
<template>
|
||||
<div ref="page">
|
||||
<A-task-filter v-if="$store.getters['tm/isInitialized']" ref="filter" :split-days="timelineData ? splitDays : null" @filter-changed="onFilterChanged" />
|
||||
<Z-timeline v-if="timelineData && !hideCal" :cal-data="timelineData" :cal-config="config" :splits="splitDays" />
|
||||
</div>
|
||||
<div ref="page">
|
||||
<A-task-filter
|
||||
v-if="$store.getters['tm/isInitialized']"
|
||||
ref="filter"
|
||||
:split-days="timelineData ? splitDays : null"
|
||||
@filter-changed="onFilterChanged"
|
||||
/>
|
||||
<Z-timeline
|
||||
v-if="timelineData && !hideCal"
|
||||
:cal-data="timelineData"
|
||||
:cal-config="config"
|
||||
:splits="splitDays"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ATaskFilter from './_components/a-tasks-filter.vue'
|
||||
import ZTimeline from '@/plugins/tm@dashboard/_components/z-timeline.vue'
|
||||
import { addDays, subDays } from 'date-fns'
|
||||
import moment from 'moment'
|
||||
import timelineUtils from './_utils/timeline.utils'
|
||||
import { mapGetters } from 'vuex'
|
||||
import FilterMixin from '../_mixins/Filter.mixin'
|
||||
import ATaskFilter from './_components/a-tasks-filter.vue';
|
||||
import ZTimeline from '@/plugins/tm@dashboard/_components/z-timeline.vue';
|
||||
import { addDays, subDays } from 'date-fns';
|
||||
import moment from 'moment';
|
||||
import timelineUtils from './_utils/timeline.utils';
|
||||
import { mapGetters } from 'vuex';
|
||||
import FilterMixin from '../_mixins/Filter.mixin';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ATaskFilter,
|
||||
ZTimeline,
|
||||
},
|
||||
mixins: [FilterMixin],
|
||||
|
||||
components: {
|
||||
ATaskFilter,
|
||||
ZTimeline
|
||||
},
|
||||
mixins: [FilterMixin],
|
||||
data() {
|
||||
return {
|
||||
hideCal: false,
|
||||
filter: null,
|
||||
subtasks: null,
|
||||
config: {
|
||||
date: subDays(new Date(), 1),
|
||||
scrollHour: 7,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
hideCal: false,
|
||||
filter: null,
|
||||
subtasks: null,
|
||||
config: {
|
||||
date: subDays(new Date(), 1),
|
||||
scrollHour: 7,
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('auth', ['user']),
|
||||
|
||||
computed: {
|
||||
...mapGetters('auth', ['user']),
|
||||
splitDays() {
|
||||
const days = [];
|
||||
const homeoffice = {};
|
||||
const schedulesCapacityBySplit = {};
|
||||
|
||||
splitDays() {
|
||||
const days = []
|
||||
const homeoffice = {}
|
||||
const schedulesCapacityBySplit = {}
|
||||
const now = moment();
|
||||
const dailyCapacityMinutes =
|
||||
(this.user.work_end - this.user.work_start) * 60;
|
||||
|
||||
const now = moment()
|
||||
const dailyCapacityMinutes = (this.user.work_end - this.user.work_start) * 60
|
||||
this.timelineData.tasks.forEach((task) => {
|
||||
if (
|
||||
task.type == 'non-working-hours' ||
|
||||
task.subtask?.is_finished ||
|
||||
task.blocker?.is_finished
|
||||
)
|
||||
return;
|
||||
|
||||
this.timelineData.tasks.forEach(task => {
|
||||
if (task.type == 'non-working-hours' || task.subtask?.is_finished || task.blocker?.is_finished)
|
||||
return
|
||||
if (!schedulesCapacityBySplit[task.split])
|
||||
schedulesCapacityBySplit[task.split] = 0;
|
||||
|
||||
if (!schedulesCapacityBySplit[task.split])
|
||||
schedulesCapacityBySplit[task.split] = 0
|
||||
if (now.isAfter(moment(task._real_end))) {
|
||||
// Ignore elapsed task
|
||||
return;
|
||||
} else if (
|
||||
now.isAfter(moment(task._real_start)) &&
|
||||
now.isBefore(moment(task._real_end))
|
||||
) {
|
||||
// Task in progress
|
||||
schedulesCapacityBySplit[task.split] +=
|
||||
timelineUtils._getDifferenceInMinutes(task._real_end, new Date());
|
||||
} else {
|
||||
// Future task
|
||||
schedulesCapacityBySplit[task.split] +=
|
||||
timelineUtils._getDifferenceInMinutes(
|
||||
task._real_end,
|
||||
task._real_start,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
if (now.isAfter(moment(task._real_end))) {
|
||||
// Ignore elapsed task
|
||||
return
|
||||
}
|
||||
else if (now.isAfter(moment(task._real_start)) && now.isBefore(moment(task._real_end))) {
|
||||
// Task in progress
|
||||
schedulesCapacityBySplit[task.split] += timelineUtils._getDifferenceInMinutes(task._real_end, new Date())
|
||||
}
|
||||
else {
|
||||
// Future task
|
||||
schedulesCapacityBySplit[task.split] += timelineUtils._getDifferenceInMinutes(task._real_end, task._real_start)
|
||||
}
|
||||
})
|
||||
schedulesCapacityBySplit[1] = 0; // Set YESTERDAY value to 0
|
||||
|
||||
schedulesCapacityBySplit[1] = 0 // Set YESTERDAY value to 0
|
||||
this.timelineData.homeoffices.forEach((task) => {
|
||||
homeoffice[task.split - 1] = true;
|
||||
});
|
||||
|
||||
this.timelineData.homeoffices.forEach(task => {
|
||||
homeoffice[task.split - 1] = true
|
||||
})
|
||||
for (let i = 0; i < 7; i++) {
|
||||
if (!schedulesCapacityBySplit[i + 1])
|
||||
schedulesCapacityBySplit[i + 1] = 0;
|
||||
|
||||
for (let i = 0; i < 7; i++) {
|
||||
if (!schedulesCapacityBySplit[i + 1])
|
||||
schedulesCapacityBySplit[i + 1] = 0
|
||||
let unscheduledTime;
|
||||
|
||||
let unscheduledTime
|
||||
const date = moment(addDays(this.filter.start, i));
|
||||
|
||||
const date = moment(addDays(this.filter.start, i))
|
||||
if (date.isBefore(moment(), 'days')) {
|
||||
// Yesterday
|
||||
unscheduledTime = 0;
|
||||
} else if (date.isSame(moment(), 'days')) {
|
||||
// Today
|
||||
const elapsedMinutes = now.diff(
|
||||
now.clone().startOf('day'),
|
||||
'minutes',
|
||||
);
|
||||
const workStart =
|
||||
this.user.work_start * 60 > elapsedMinutes
|
||||
? this.user.work_start
|
||||
: elapsedMinutes / 60;
|
||||
const todayCapacityMinutes = (this.user.work_end - workStart) * 60;
|
||||
unscheduledTime =
|
||||
todayCapacityMinutes - schedulesCapacityBySplit[i + 1] / 60 < 0
|
||||
? 0
|
||||
: todayCapacityMinutes - schedulesCapacityBySplit[i + 1];
|
||||
} else {
|
||||
// Future
|
||||
unscheduledTime =
|
||||
dailyCapacityMinutes - schedulesCapacityBySplit[i + 1];
|
||||
}
|
||||
|
||||
if (date.isBefore(moment(), 'days')) {
|
||||
// Yesterday
|
||||
unscheduledTime = 0
|
||||
} else if (date.isSame(moment(), 'days')) {
|
||||
// Today
|
||||
const elapsedMinutes = now.diff(now.clone().startOf('day'), 'minutes')
|
||||
const workStart = this.user.work_start * 60 > elapsedMinutes ? this.user.work_start : elapsedMinutes / 60
|
||||
const todayCapacityMinutes = (this.user.work_end - workStart) * 60
|
||||
unscheduledTime = todayCapacityMinutes - schedulesCapacityBySplit[i + 1] / 60 < 0 ? 0 : todayCapacityMinutes - schedulesCapacityBySplit[i + 1]
|
||||
} else {
|
||||
// Future
|
||||
unscheduledTime = dailyCapacityMinutes - schedulesCapacityBySplit[i + 1]
|
||||
}
|
||||
if (isNaN(unscheduledTime)) unscheduledTime = dailyCapacityMinutes;
|
||||
|
||||
if (isNaN(unscheduledTime))
|
||||
unscheduledTime = dailyCapacityMinutes
|
||||
days.push({
|
||||
id: i + 1,
|
||||
name: this.filter.employee.name,
|
||||
surname: this.filter.employee.surname,
|
||||
fullname: `${this.filter.employee.name} ${this.filter.employee.surname}`,
|
||||
initials:
|
||||
this.filter.employee.name.charAt(0).toUpperCase() +
|
||||
this.filter.employee.surname.charAt(0).toUpperCase(),
|
||||
unscheduledTime: (unscheduledTime / 60).toFixed(1),
|
||||
scheduledTime: (schedulesCapacityBySplit[i + 1] / 60).toFixed(1),
|
||||
date: addDays(this.filter.start, i),
|
||||
isHomeoffice: homeoffice[i] ? true : false,
|
||||
isWeekend: timelineUtils.isWeekend(addDays(this.filter.start, i)),
|
||||
});
|
||||
}
|
||||
|
||||
days.push({
|
||||
id: i + 1,
|
||||
name: this.filter.employee.name,
|
||||
surname: this.filter.employee.surname,
|
||||
fullname: `${this.filter.employee.name} ${this.filter.employee.surname}`,
|
||||
initials: this.filter.employee.name.charAt(0).toUpperCase() + this.filter.employee.surname.charAt(0).toUpperCase(),
|
||||
unscheduledTime: (unscheduledTime / 60).toFixed(1),
|
||||
scheduledTime: (schedulesCapacityBySplit[i + 1] / 60).toFixed(1),
|
||||
date: addDays(this.filter.start, i),
|
||||
isHomeoffice: homeoffice[i] ? true : false,
|
||||
isWeekend: timelineUtils.isWeekend(addDays(this.filter.start, i))
|
||||
})
|
||||
}
|
||||
return days;
|
||||
},
|
||||
|
||||
return days
|
||||
},
|
||||
unscheduledTime() {
|
||||
if (!this.subtasks) return 0;
|
||||
|
||||
unscheduledTime() {
|
||||
if (!this.subtasks) return 0
|
||||
return timelineUtils.getUnscheduledTime(this.subtasks);
|
||||
},
|
||||
|
||||
return timelineUtils.getUnscheduledTime(this.subtasks)
|
||||
},
|
||||
timelineData() {
|
||||
if (!this.subtasks || !this.filter) return null;
|
||||
|
||||
const { tasks, blockers, nonWorkingHours, homeoffices } =
|
||||
timelineUtils.generateTimelineTasks(
|
||||
this.subtasks,
|
||||
new Date(this.filter.start),
|
||||
this.filter.employee,
|
||||
);
|
||||
|
||||
timelineData() {
|
||||
if (!this.subtasks || !this.filter)
|
||||
return null
|
||||
return {
|
||||
name: this.filter.employee.name,
|
||||
surname: this.filter.employee.surname,
|
||||
unscheduledTime: this.unscheduledTime,
|
||||
tasks: [...tasks, ...blockers, ...nonWorkingHours],
|
||||
homeoffices,
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
const { tasks, blockers, nonWorkingHours, homeoffices } = timelineUtils.generateTimelineTasks(this.subtasks, new Date(this.filter.start), this.filter.employee)
|
||||
mounted() {
|
||||
this.$events.on('on-subtask-edited', () => {
|
||||
this.onFilterChanged(this.filter);
|
||||
});
|
||||
|
||||
return {
|
||||
name: this.filter.employee.name,
|
||||
surname: this.filter.employee.surname,
|
||||
unscheduledTime: this.unscheduledTime,
|
||||
tasks: [...tasks, ...blockers, ...nonWorkingHours],
|
||||
homeoffices
|
||||
}
|
||||
}
|
||||
},
|
||||
this.$events.on('on-subtask-deleted', () => {
|
||||
this.onFilterChanged(this.filter);
|
||||
});
|
||||
|
||||
mounted() {
|
||||
this.$events.on('on-subtask-edited', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
this.$events.on('on-blocker-edited', () => {
|
||||
this.onFilterChanged(this.filter);
|
||||
});
|
||||
|
||||
this.$events.on('on-subtask-deleted', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
this.$events.on('on-blocker-deleted', () => {
|
||||
this.onFilterChanged(this.filter);
|
||||
});
|
||||
},
|
||||
|
||||
this.$events.on('on-blocker-edited', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
unmounted() {
|
||||
this.$events.off('on-subtask-edited');
|
||||
this.$events.off('on-subtask-deleted');
|
||||
this.$events.off('on-blocker-edited');
|
||||
this.$events.off('on-blocker-deleted');
|
||||
},
|
||||
|
||||
this.$events.on('on-blocker-deleted', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async onFilterChanged(filter) {
|
||||
this.filter = filter;
|
||||
const urlQueryObject = {};
|
||||
|
||||
unmounted() {
|
||||
this.$events.off('on-subtask-edited')
|
||||
this.$events.off('on-subtask-deleted')
|
||||
this.$events.off('on-blocker-edited')
|
||||
this.$events.off('on-blocker-deleted')
|
||||
},
|
||||
if (filter.start)
|
||||
urlQueryObject.start = moment(filter.start).format('YYYY-MM-DD');
|
||||
if (filter.end)
|
||||
urlQueryObject.end = moment(filter.end).format('YYYY-MM-DD');
|
||||
if (filter.employee) urlQueryObject.employee_id = filter.employee.id;
|
||||
|
||||
methods: {
|
||||
async onFilterChanged(filter) {
|
||||
this.filter = filter
|
||||
const urlQueryObject = {}
|
||||
const queryParameters = new URLSearchParams(urlQueryObject).toString();
|
||||
|
||||
if (filter.start) urlQueryObject.start = moment(filter.start).format('YYYY-MM-DD')
|
||||
if (filter.end) urlQueryObject.end = moment(filter.end).format('YYYY-MM-DD')
|
||||
if (filter.employee) urlQueryObject.employee_id = filter.employee.id
|
||||
try {
|
||||
const { subtasks, blockers } = await this.$axios.get_auth(
|
||||
`v1/subtasks?${queryParameters}`,
|
||||
);
|
||||
this.config.scrollHour = this.filter?.employee.work_start - 1;
|
||||
this.config.date = this.filter.start;
|
||||
this.subtasks = [...subtasks, ...blockers];
|
||||
this.hideCal = true;
|
||||
setTimeout(() => {
|
||||
this.hideCal = false;
|
||||
}, 0);
|
||||
} catch (error) {
|
||||
this.$toast.error('Nepodarilo sa nacitat data!');
|
||||
}
|
||||
|
||||
const queryParameters = new URLSearchParams(urlQueryObject).toString()
|
||||
|
||||
try {
|
||||
const { subtasks, blockers } = await this.$axios.get_auth(`v1/subtasks?${queryParameters}`)
|
||||
this.config.scrollHour = (this.filter?.employee.work_start) - 1
|
||||
this.config.date = this.filter.start
|
||||
this.subtasks = [...subtasks, ...blockers]
|
||||
this.hideCal = true
|
||||
setTimeout(() => { this.hideCal = false }, 0)
|
||||
} catch (error) {
|
||||
this.$toast.error('Nepodarilo sa nacitat data!')
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
/* eslint-disable */console.log(...oo_oo(`1163945854_187_5_187_46_4`,'[tasks.vue] Error: ', error))
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this._initScrollListener()
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
this._initScrollListener();
|
||||
}, 100);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
@@ -204,5 +241,4 @@ export default {
|
||||
@media (max-width: 1312px)
|
||||
.w-loadable
|
||||
height: calc( 100% - 202px )
|
||||
|
||||
</style>
|
||||
</style>
|
||||
@@ -1,100 +1,111 @@
|
||||
<template>
|
||||
<div ref="page">
|
||||
<A-team-filter v-if="$store.getters['tm/isInitialized']" :split-days="calendarData ? splitDays : null" @filter-changed="onFilterChanged" />
|
||||
<Z-timeline v-if="calendarData && !hideCal" :cal-data="calendarData" :cal-config="calendarConfig" :splits="splitDays" />
|
||||
</div>
|
||||
<div ref="page">
|
||||
<A-team-filter
|
||||
v-if="$store.getters['tm/isInitialized']"
|
||||
:split-days="calendarData ? splitDays : null"
|
||||
@filter-changed="onFilterChanged"
|
||||
/>
|
||||
<Z-timeline
|
||||
v-if="calendarData && !hideCal"
|
||||
:cal-data="calendarData"
|
||||
:cal-config="calendarConfig"
|
||||
:splits="splitDays"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ATeamFilter from './_components/a-team-filter.vue'
|
||||
import ZTimeline from '@/plugins/tm@dashboard/_components/z-timeline.vue'
|
||||
import moment from 'moment'
|
||||
import TeamsCalendar from './_mixins/TeamsCalendar.mixin'
|
||||
import FilterMixin from '../_mixins/Filter.mixin'
|
||||
import { mapGetters } from 'vuex'
|
||||
import ATeamFilter from './_components/a-team-filter.vue';
|
||||
import ZTimeline from '@/plugins/tm@dashboard/_components/z-timeline.vue';
|
||||
import moment from 'moment';
|
||||
import TeamsCalendar from './_mixins/TeamsCalendar.mixin';
|
||||
import FilterMixin from '../_mixins/Filter.mixin';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ATeamFilter,
|
||||
ZTimeline,
|
||||
},
|
||||
mixins: [TeamsCalendar, FilterMixin],
|
||||
|
||||
components: {
|
||||
ATeamFilter,
|
||||
ZTimeline,
|
||||
},
|
||||
mixins: [TeamsCalendar, FilterMixin],
|
||||
data() {
|
||||
return {
|
||||
hideCal: false,
|
||||
|
||||
data() {
|
||||
return {
|
||||
hideCal: false,
|
||||
filter: null,
|
||||
subtasks: null,
|
||||
blockers: null,
|
||||
calendarConfig: {
|
||||
date: new Date(),
|
||||
scrollHour: 7,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
filter: null,
|
||||
subtasks: null,
|
||||
blockers: null,
|
||||
calendarConfig: {
|
||||
date: new Date(),
|
||||
scrollHour: 7,
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('auth', ['user']),
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('auth', ['user']),
|
||||
},
|
||||
mounted() {
|
||||
this.$events.on('on-subtask-edited', () => {
|
||||
this.onFilterChanged(this.filter);
|
||||
});
|
||||
|
||||
mounted() {
|
||||
this.$events.on('on-subtask-edited', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
this.$events.on('on-subtask-deleted', () => {
|
||||
this.onFilterChanged(this.filter);
|
||||
});
|
||||
|
||||
this.$events.on('on-subtask-deleted', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
this.$events.on('on-blocker-edited', () => {
|
||||
this.onFilterChanged(this.filter);
|
||||
});
|
||||
|
||||
this.$events.on('on-blocker-edited', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
this.$events.on('on-blocker-deleted', () => {
|
||||
this.onFilterChanged(this.filter);
|
||||
});
|
||||
},
|
||||
|
||||
this.$events.on('on-blocker-deleted', () => {
|
||||
this.onFilterChanged(this.filter)
|
||||
})
|
||||
},
|
||||
unmounted() {
|
||||
this.$events.off('on-subtask-edited');
|
||||
this.$events.off('on-subtask-deleted');
|
||||
this.$events.off('on-blocker-edited');
|
||||
this.$events.off('on-blocker-deleted');
|
||||
},
|
||||
|
||||
unmounted() {
|
||||
this.$events.off('on-subtask-edited')
|
||||
this.$events.off('on-subtask-deleted')
|
||||
this.$events.off('on-blocker-edited')
|
||||
this.$events.off('on-blocker-deleted')
|
||||
},
|
||||
methods: {
|
||||
async onFilterChanged(filter) {
|
||||
this.filter = filter;
|
||||
|
||||
methods: {
|
||||
async onFilterChanged(filter) {
|
||||
this.filter = filter
|
||||
const urlQueryObject = {};
|
||||
|
||||
const urlQueryObject = {}
|
||||
if (filter.start)
|
||||
urlQueryObject.start = moment(filter.start).format('YYYY-MM-DD');
|
||||
if (filter.end)
|
||||
urlQueryObject.end = moment(filter.end).format('YYYY-MM-DD');
|
||||
if (filter.team) urlQueryObject.team_id = filter.team.id;
|
||||
|
||||
if (filter.start) urlQueryObject.start = moment(filter.start).format('YYYY-MM-DD')
|
||||
if (filter.end) urlQueryObject.end = moment(filter.end).format('YYYY-MM-DD')
|
||||
if (filter.team) urlQueryObject.team_id = filter.team.id
|
||||
const queryParameters = new URLSearchParams(urlQueryObject).toString();
|
||||
|
||||
const queryParameters = new URLSearchParams(urlQueryObject).toString()
|
||||
try {
|
||||
const { subtasks, blockers } = await this.$axios.get_auth(
|
||||
`v1/subtasks?${queryParameters}`,
|
||||
);
|
||||
this.subtasks = subtasks;
|
||||
this.blockers = blockers;
|
||||
this.hideCal = true;
|
||||
setTimeout(() => {
|
||||
this.hideCal = false;
|
||||
}, 0);
|
||||
} catch (error) {
|
||||
this.$toast.error('Nepodarilo sa nacitat data!');
|
||||
}
|
||||
|
||||
try {
|
||||
const { subtasks, blockers } = await this.$axios.get_auth(`v1/subtasks?${queryParameters}`)
|
||||
this.subtasks = subtasks
|
||||
this.blockers = blockers
|
||||
this.hideCal = true
|
||||
setTimeout(() => { this.hideCal = false }, 0)
|
||||
} catch (error) {
|
||||
this.$toast.error('Nepodarilo sa nacitat data!')
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
/* eslint-disable */console.log(...oo_oo(`1416174149_89_5_89_46_4`,'[teams.vue] Error: ', error))
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this._initScrollListener()
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
this._initScrollListener();
|
||||
}, 100);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
@@ -106,5 +117,4 @@ export default {
|
||||
@media (max-width: 1312px)
|
||||
.w-loadable
|
||||
height: calc( 100% - 202px )
|
||||
|
||||
</style>
|
||||
</style>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -212,9 +212,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(`2942918433_217_10_217_61_4`,'[a-ongoing-table.vue] Error: ', error));
|
||||
} finally {
|
||||
this.loadingSubtask[subtask.id] = false;
|
||||
}
|
||||
|
||||
@@ -1,111 +1,144 @@
|
||||
<template>
|
||||
<div class="border-bottom py-5 px-5">
|
||||
<h1>Všeobecné informácie</h1>
|
||||
<v-text-field v-model="user.name" class="w-75" variant="solo" label="Meno" :disabled="true"></v-text-field>
|
||||
<v-text-field v-model="user.surname" class="w-75" variant="solo" label="Priezvisko" :disabled="true"></v-text-field>
|
||||
</div>
|
||||
<div class="py-5 px-5 border-bottom">
|
||||
<h1>Pracovná doba</h1>
|
||||
<v-text-field v-model="form.work_start" class="w-75" variant="solo" label="Začiatok" append-inner-icon="mdi-clock-outline" type="time" :class="{ error: v$.form.work_start.$errors.length }" :hint="v$.form.work_start.$errors ? errorUtils.parseErrors(v$.form.work_start.$errors) : null"></v-text-field>
|
||||
<v-text-field v-model="form.work_end" class="w-75" variant="solo" label="Koniec" append-inner-icon="mdi-clock-outline" type="time" :class="{ error: v$.form.work_end.$errors.length }" :hint="v$.form.work_end.$errors ? errorUtils.parseErrors(v$.form.work_end.$errors) : null"></v-text-field>
|
||||
</div>
|
||||
<div class="py-5 px-5">
|
||||
<v-btn class="button primary" @click="updateUserInfo()">ULOŽIŤ ZMENY</v-btn>
|
||||
</div>
|
||||
<div class="border-bottom py-5 px-5">
|
||||
<h1>Všeobecné informácie</h1>
|
||||
<v-text-field
|
||||
v-model="user.name"
|
||||
class="w-75"
|
||||
variant="solo"
|
||||
label="Meno"
|
||||
:disabled="true"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
v-model="user.surname"
|
||||
class="w-75"
|
||||
variant="solo"
|
||||
label="Priezvisko"
|
||||
:disabled="true"
|
||||
></v-text-field>
|
||||
</div>
|
||||
<div class="py-5 px-5 border-bottom">
|
||||
<h1>Pracovná doba</h1>
|
||||
<v-text-field
|
||||
v-model="form.work_start"
|
||||
class="w-75"
|
||||
variant="solo"
|
||||
label="Začiatok"
|
||||
append-inner-icon="mdi-clock-outline"
|
||||
type="time"
|
||||
:class="{ error: v$.form.work_start.$errors.length }"
|
||||
:hint="
|
||||
v$.form.work_start.$errors
|
||||
? errorUtils.parseErrors(v$.form.work_start.$errors)
|
||||
: null
|
||||
"
|
||||
></v-text-field>
|
||||
<v-text-field
|
||||
v-model="form.work_end"
|
||||
class="w-75"
|
||||
variant="solo"
|
||||
label="Koniec"
|
||||
append-inner-icon="mdi-clock-outline"
|
||||
type="time"
|
||||
:class="{ error: v$.form.work_end.$errors.length }"
|
||||
:hint="
|
||||
v$.form.work_end.$errors
|
||||
? errorUtils.parseErrors(v$.form.work_end.$errors)
|
||||
: null
|
||||
"
|
||||
></v-text-field>
|
||||
</div>
|
||||
<div class="py-5 px-5">
|
||||
<v-btn class="button primary" @click="updateUserInfo()">ULOŽIŤ ZMENY</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import useVuelidate from "@vuelidate/core"
|
||||
import { required } from "@vuelidate/validators"
|
||||
import errorUtils from "@/plugins/lib@auth/_utils/error.utils"
|
||||
import { mapGetters } from "vuex"
|
||||
import useVuelidate from '@vuelidate/core';
|
||||
import { required } from '@vuelidate/validators';
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
errorUtils,
|
||||
v$: useVuelidate(),
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
errorUtils,
|
||||
v$: useVuelidate(),
|
||||
form: {},
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters("auth", ["user"])
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('auth', ['user']),
|
||||
},
|
||||
|
||||
validations() {
|
||||
return {
|
||||
form: {
|
||||
work_start: { required },
|
||||
work_end: { required }
|
||||
}
|
||||
}
|
||||
},
|
||||
validations() {
|
||||
return {
|
||||
form: {
|
||||
work_start: { required },
|
||||
work_end: { required },
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this._setDates()
|
||||
},
|
||||
mounted() {
|
||||
this._setDates();
|
||||
},
|
||||
|
||||
methods: {
|
||||
async updateUserInfo() {
|
||||
if (!(await this.v$.$validate())) return
|
||||
methods: {
|
||||
async updateUserInfo() {
|
||||
if (!(await this.v$.$validate())) return;
|
||||
|
||||
/* eslint-disable */console.log(...oo_oo(`3542138265_53_3_53_42_4`,'my-profile', this.subtask))
|
||||
const [sHours, sMinutes] = this.form.work_start.split(':');
|
||||
const [eHours, eMinutes] = this.form.work_end.split(':');
|
||||
const [sHours, sMinutes] = this.form.work_start.split(':');
|
||||
const [eHours, eMinutes] = this.form.work_end.split(':');
|
||||
|
||||
const data = {
|
||||
id: this.user.id,
|
||||
work_start: parseFloat(sHours) + parseFloat(sMinutes) / 60,
|
||||
work_end: parseFloat(eHours) + parseFloat(eMinutes) / 60
|
||||
}
|
||||
const data = {
|
||||
id: this.user.id,
|
||||
work_start: parseFloat(sHours) + parseFloat(sMinutes) / 60,
|
||||
work_end: parseFloat(eHours) + parseFloat(eMinutes) / 60,
|
||||
};
|
||||
|
||||
try {
|
||||
await this.$store.dispatch('auth/updateUserInfo', data)
|
||||
this.$toast.success('Profil bol úspešne zmenený')
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error))
|
||||
try {
|
||||
await this.$store.dispatch('auth/updateUserInfo', data);
|
||||
this.$toast.success('Profil bol úspešne zmenený');
|
||||
} catch (error) {
|
||||
this.$toast.error(this.$parseError(error));
|
||||
}
|
||||
},
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
/* eslint-disable */console.log(...oo_oo(`3542138265_70_5_70_51_4`,'[my-profile.vue] Error: ', error))
|
||||
}
|
||||
},
|
||||
_setDates() {
|
||||
this.form = {
|
||||
work_start: this.decimalHoursToTime(this.user.work_start),
|
||||
work_end: this.decimalHoursToTime(this.user.work_end),
|
||||
};
|
||||
},
|
||||
|
||||
_setDates() {
|
||||
this.form = {
|
||||
work_start: this.decimalHoursToTime(this.user.work_start),
|
||||
work_end: this.decimalHoursToTime(this.user.work_end)
|
||||
}
|
||||
},
|
||||
// minutesToTime(minutes) {
|
||||
// var hours = Math.floor(minutes / 60)
|
||||
// var mins = minutes % 60
|
||||
// hours = (hours < 10 ? '0' : '') + hours
|
||||
// mins = (mins < 10 ? '0' : '') + mins
|
||||
|
||||
// minutesToTime(minutes) {
|
||||
// var hours = Math.floor(minutes / 60)
|
||||
// var mins = minutes % 60
|
||||
// hours = (hours < 10 ? '0' : '') + hours
|
||||
// mins = (mins < 10 ? '0' : '') + mins
|
||||
// return hours + ':' + mins
|
||||
// },
|
||||
|
||||
// return hours + ':' + mins
|
||||
// },
|
||||
decimalHoursToTime(decimalHours) {
|
||||
var hours = Math.floor(decimalHours);
|
||||
var mins = Math.floor((decimalHours * 60) % 60);
|
||||
hours = (hours < 10 ? '0' : '') + hours;
|
||||
mins = (mins < 10 ? '0' : '') + mins;
|
||||
|
||||
decimalHoursToTime(decimalHours) {
|
||||
var hours = Math.floor(decimalHours)
|
||||
var mins = Math.floor((decimalHours * 60) % 60)
|
||||
hours = (hours < 10 ? '0' : '') + hours
|
||||
mins = (mins < 10 ? '0' : '') + mins
|
||||
return hours + ':' + mins;
|
||||
},
|
||||
},
|
||||
|
||||
return hours + ':' + mins
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
user() {
|
||||
this._setDates()
|
||||
}
|
||||
}
|
||||
}
|
||||
watch: {
|
||||
user() {
|
||||
this._setDates();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.border-bottom
|
||||
border-bottom: 1px solid #EDEDED
|
||||
|
||||
Reference in new issue
Block a user