mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
fixes
This commit is contained in:
1 parent
bed6793b8b
commit
b02a8c734d
18 files changed
+84
-12
No files matched your search
@@ -262,11 +262,10 @@ export default {
|
||||
dateTo.setHours(dateFrom.getHours() + 1)
|
||||
|
||||
const time = moment(dateFrom).format('HH:mm')
|
||||
const date = moment(dateFrom).format('DD.MM.yyyy')
|
||||
|
||||
this.$events.emit('show-menu-modal', {
|
||||
time: time,
|
||||
date: date
|
||||
date: tmUtils.formatDateTimeForBackend(dateFrom)
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
export default {
|
||||
mounted() {
|
||||
window.addEventListener('keydown', this.handleKeyDown)
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleKeyDown(event) {
|
||||
if (event.keyCode === 27) this.closeModal()
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -44,9 +44,10 @@ import VuetifyFixFocusMixin from "@/plugins/tm@modal/_mixins/vuetify-fix-focus"
|
||||
import { mapGetters } from "vuex"
|
||||
import moment from "moment"
|
||||
import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [VuetifyFixFocusMixin, AutocompleteMixin],
|
||||
mixins: [VuetifyFixFocusMixin, AutocompleteMixin, modalMixin],
|
||||
|
||||
emits: ["close"],
|
||||
|
||||
@@ -136,6 +137,7 @@ export default {
|
||||
}
|
||||
|
||||
this.$events.emit("on-blocker-edited", this.blocker)
|
||||
this.$events.emit("blocker-created")
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['on-blocker-deleted'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['on-mastertask-deleted'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -28,8 +28,10 @@
|
||||
|
||||
<script>
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
|
||||
@@ -96,6 +96,7 @@ import VuetifyFixFocusMixin from '@/plugins/tm@modal/_mixins/vuetify-fix-focus'
|
||||
import moment from 'moment'
|
||||
import { QuillEditor } from '@vueup/vue-quill'
|
||||
// import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
import '@vueup/vue-quill/dist/vue-quill.snow.css'
|
||||
|
||||
@@ -112,7 +113,7 @@ export default {
|
||||
// watch: mastertask.team_id
|
||||
|
||||
emits: ['master-task-edited', 'close'],
|
||||
mixins: [VuetifyFixFocusMixin, SelectsMixin, AutocompleteMixin],
|
||||
mixins: [VuetifyFixFocusMixin, SelectsMixin, AutocompleteMixin, modalMixin],
|
||||
|
||||
components: {
|
||||
AMastertaskDescription,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||
<v-btn class="button primary half outline" @click.stop="createTask()"
|
||||
>TASK</v-btn
|
||||
>SUB TASK</v-btn
|
||||
>
|
||||
<v-btn class="button primary half outline" @click.stop="createBlocker()"
|
||||
>BLOCKER</v-btn
|
||||
@@ -19,9 +19,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
emits: ['update', 'data'],
|
||||
props: ['data'],
|
||||
mixins: [ modalMixin ],
|
||||
|
||||
data() {
|
||||
return {
|
||||
@@ -30,6 +33,16 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$events.on('blocker-created', () => {
|
||||
this.closeModal()
|
||||
})
|
||||
|
||||
this.$events.on('task-created', () => {
|
||||
this.closeModal()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
async showModal(data) {
|
||||
this.localData = data
|
||||
@@ -46,6 +59,9 @@ export default {
|
||||
deadline: this.localData.date,
|
||||
_deadline_time: this.localData.time,
|
||||
},
|
||||
onTaskCreated: () => {
|
||||
this.closeModal()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -55,6 +71,9 @@ export default {
|
||||
starts_at_time: this.localData.time,
|
||||
datepicker: this.localData.date,
|
||||
},
|
||||
onBlockerCreated: () => {
|
||||
this.closeModal()
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<v-col cols="7">
|
||||
<v-sheet class="py-3">
|
||||
<p>{{ hours }} h</p>
|
||||
<p>{{ (hours).toFixed(2) }} h</p>
|
||||
</v-sheet>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -57,8 +57,10 @@ import useVuelidate from '@vuelidate/core'
|
||||
import { required, numeric, minValue } from '@vuelidate/validators'
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import { mapGetters } from 'vuex'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
props: {
|
||||
hours: {
|
||||
type: Number,
|
||||
|
||||
@@ -51,8 +51,10 @@ import useVuelidate from '@vuelidate/core'
|
||||
import { required } from '@vuelidate/validators'
|
||||
import Datepicker from '@vuepic/vue-datepicker'
|
||||
import moment from 'moment'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['update-subtask'],
|
||||
|
||||
components: {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<h1>Ste si istý, že chcete {{ subtask.is_finished ? 'znovu otvoriť' : 'dokončiť' }} task, z mastertasku <b>{{ subtask?.master_task?.name || subtask.master_task }}</b>?</h1>
|
||||
<v-icon
|
||||
@click.stop="visible = false"
|
||||
@click.stop="closeModal()"
|
||||
icon="mdi-close"
|
||||
size="large"
|
||||
></v-icon>
|
||||
@@ -18,7 +18,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['close', 'on-subtask-edited'],
|
||||
|
||||
data() {
|
||||
@@ -47,6 +50,10 @@ export default {
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
},
|
||||
|
||||
closeModal() {
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['on-subtask-deleted'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -18,8 +18,10 @@
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
import { required, numeric, minValue } from '@vuelidate/validators'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['close', 'on-subtask-edited'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -120,10 +120,11 @@ import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin'
|
||||
|
||||
import ZTaskReadonlyInfo from "./_components/z-task-readonly-info.vue"
|
||||
import { mapGetters } from "vuex"
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
emits: ["close", "refresh"],
|
||||
mixins: [VuetifyFixFocusMixin, SelectsMixin, AutocompleteMixin],
|
||||
mixins: [VuetifyFixFocusMixin, SelectsMixin, AutocompleteMixin, modalMixin],
|
||||
|
||||
components: {
|
||||
ZTaskReadonlyInfo,
|
||||
@@ -209,6 +210,11 @@ export default {
|
||||
this.subtask = this._enrichTask(data)
|
||||
} else {
|
||||
this.subtask = { master_task: mastertask, employees: [{}], _deadline_time: '17:00' }
|
||||
|
||||
if (subtask?.deadline && subtask._deadline_time) {
|
||||
this.subtask.deadline = subtask.deadline
|
||||
this.subtask._deadline_time = subtask._deadline_time
|
||||
}
|
||||
}
|
||||
|
||||
this.editMode = editMode || !this.subtask.id
|
||||
@@ -250,13 +256,14 @@ export default {
|
||||
this.$store.commit('tm/update_subtask', subtask)
|
||||
this.$events.emit("on-subtask-edited", this.subtask)
|
||||
} else {
|
||||
const { subtasks } = await this.$axios.post_auth(`v1/mastertasks/${this.subtask.master_task_id}/subtasks`, this.subtask)
|
||||
const { subtasks } = await this.$axios.post_auth(`v1/mastertasks/${this.subtask.master_task_id}/subtasks`, this.subtask, this.subtask.project_code)
|
||||
this.subtask.id = subtasks[0].id
|
||||
|
||||
subtasks.forEach(subtask => {
|
||||
this.$store.commit('tm/update_subtask', subtask)
|
||||
this.$events.emit("on-subtask-edited", this.subtask)
|
||||
})
|
||||
this.$events.emit("task-created")
|
||||
}
|
||||
|
||||
this.closeModal()
|
||||
@@ -365,9 +372,14 @@ export default {
|
||||
deep: true
|
||||
},
|
||||
|
||||
'subtask.master_task_id'(value) {
|
||||
'subtask.master_task_id'(value, newValue) {
|
||||
if (!value) return
|
||||
this.subtask._master_task = this.mastertasks.find((mastertask) => mastertask.id == this.subtask.master_task_id)
|
||||
|
||||
// let selectedMasterTask = null
|
||||
|
||||
// if (newValue) selectedMasterTask = this.mastertasks.find((mastertask) => mastertask.id === newValue)
|
||||
// if (selectedMasterTask) this.subtask.project_code = selectedMasterTask.project_code
|
||||
},
|
||||
|
||||
editMode() {
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['update'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -43,11 +43,12 @@ 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'
|
||||
|
||||
const atLeastOne = (value) => value.length
|
||||
|
||||
export default {
|
||||
mixins: [AutocompleteMixin],
|
||||
mixins: [AutocompleteMixin, modalMixin],
|
||||
emits: ['close', 'update'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<td>{{ subtask.project_code }}</td>
|
||||
<td>{{ subtask.title ?? subtask.master_task?.name ?? subtask.master_task }}</td>
|
||||
<td>{{ subtask.duration }} h</td>
|
||||
<td>{{ subtask.duration - subtask.spent_time }} h</td>
|
||||
<td>{{ (subtask.duration - subtask.spent_time).toFixed(2) }} h</td>
|
||||
<td class="task-action">
|
||||
<div class="d-flex justify-start">
|
||||
<img class="pencil-icon" :src="require('@/plugins/app/_img/icons/eye.svg')" alt="pencil-icon" @click.stop="editTask(subtask, false)">
|
||||
|
||||
Reference in new issue
Block a user