[Master task] Edit fix

This commit is contained in:
Matej Glasnák committed 2023-03-05 20:09:20 +01:00
1 parent 526b3896f5
commit c93a5c7799
5 files changed
+16 -7

No files matched your search

@@ -79,6 +79,8 @@ export default {
&:deep(.fc-event-end)
border-top-right-radius: 30px
border-bottom-right-radius: 30px
&:deep(.fc-event-main)
color: black
&:deep(.fc-event)
font-size: 12px
padding-left: 10px
@@ -3,7 +3,7 @@ export default {
employeesOptions() {
const selectedEmployees = [...this.mastertask.employees].map(employee => employee.id)
const employees = this.employees.filter(
const employees = this.enrichedEmployees.filter(
(employee) => !selectedEmployees.includes(employee.id)
) || []
@@ -30,7 +30,7 @@ export default {
},
onEmployeeSelected({ key }) {
const employee = this.employees.find(employee => employee.id == key)
const employee = this.enrichedEmployees.find(employee => employee.id == key)
this.mastertask.employees.push(employee)
this.showAddEmployeeInput = false
},
@@ -58,7 +58,7 @@
<A-mastertask-description :mastertask="mastertask" />
<div class="d-flex justify-start align-center mt-8">
<v-btn class="button primary" @click="save()">Ukončiť mastertask</v-btn>
<v-btn class="button primary" @click="toggleIsFinished()">{{ mastertask.is_finished ? 'Otvoriť mastertask' : 'Ukončiť mastertask'}}</v-btn>
</div>
<A-tasks-table :subtasks="mastertask.subtasks" />
@@ -125,7 +125,8 @@ export default {
computed: {
...mapGetters('tm', [
'teams',
'projects'
'projects',
'enrichedEmployees'
])
},
@@ -193,10 +194,16 @@ export default {
}
},
toggleIsFinished() {
this.mastertask.is_finished = !this.mastertask.is_finished
this.save()
},
async save() {
if (!(await this.v$.$validate())) return
this.mastertask.description = this.$refs['description'].getHTML()
if (this.$refs['description'])
this.mastertask.description = this.$refs['description'].getHTML()
// this.mastertask.subtasks = this.mastertask.subtasks.map(subtask => {
// const employee = this.mastertask.employees.find(employee => employee.id == subtask.employee_id)
@@ -168,7 +168,7 @@ export default {
if (!(await this.v$.$validate()))
return
this.subtask.description = this.$refs["description"].getHTML()
this.subtask.description = this.$refs['description'].getHTML()
try {
if (this.subtask?.id) {
+1 -1
View File
@@ -6,7 +6,7 @@ async function _unauthorised(error: any) {
if (error?.response?.data?.message == 'Unauthenticated.')
return store.dispatch('auth/logout')
return error
return Promise.reject(error)
}
axios.interceptors.response.use(