mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
fixes
This commit is contained in:
1 parent
bed6793b8b
commit
b02a8c734d
18 files changed
+95
-23
No files matched your search
@@ -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,
|
||||
|
||||
@@ -49,10 +49,12 @@ import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
import { required } from '@vuelidate/validators'
|
||||
import Datepicker from '@vuepic/vue-datepicker'
|
||||
import moment from 'moment'
|
||||
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() {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<div>
|
||||
<p>{{ subtask._master_task.project_code }}</p>
|
||||
<h1>{{ subtask._master_task.name }}</h1>
|
||||
<h1>{{ subtask._master_task.name }}</h1>
|
||||
</div>
|
||||
|
||||
<v-icon @click.stop="closeModal()" icon="mdi-close" size="large" class="pb-5"></v-icon>
|
||||
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user