mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Master task] Edit fix
This commit is contained in:
1 parent
526b3896f5
commit
c93a5c7799
5 files changed
+15
-6
No files matched your search
@@ -79,6 +79,8 @@ export default {
|
|||||||
&:deep(.fc-event-end)
|
&:deep(.fc-event-end)
|
||||||
border-top-right-radius: 30px
|
border-top-right-radius: 30px
|
||||||
border-bottom-right-radius: 30px
|
border-bottom-right-radius: 30px
|
||||||
|
&:deep(.fc-event-main)
|
||||||
|
color: black
|
||||||
&:deep(.fc-event)
|
&:deep(.fc-event)
|
||||||
font-size: 12px
|
font-size: 12px
|
||||||
padding-left: 10px
|
padding-left: 10px
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ export default {
|
|||||||
employeesOptions() {
|
employeesOptions() {
|
||||||
const selectedEmployees = [...this.mastertask.employees].map(employee => employee.id)
|
const selectedEmployees = [...this.mastertask.employees].map(employee => employee.id)
|
||||||
|
|
||||||
const employees = this.employees.filter(
|
const employees = this.enrichedEmployees.filter(
|
||||||
(employee) => !selectedEmployees.includes(employee.id)
|
(employee) => !selectedEmployees.includes(employee.id)
|
||||||
) || []
|
) || []
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onEmployeeSelected({ key }) {
|
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.mastertask.employees.push(employee)
|
||||||
this.showAddEmployeeInput = false
|
this.showAddEmployeeInput = false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
<A-mastertask-description :mastertask="mastertask" />
|
<A-mastertask-description :mastertask="mastertask" />
|
||||||
|
|
||||||
<div class="d-flex justify-start align-center mt-8">
|
<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>
|
</div>
|
||||||
|
|
||||||
<A-tasks-table :subtasks="mastertask.subtasks" />
|
<A-tasks-table :subtasks="mastertask.subtasks" />
|
||||||
@@ -125,7 +125,8 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapGetters('tm', [
|
...mapGetters('tm', [
|
||||||
'teams',
|
'teams',
|
||||||
'projects'
|
'projects',
|
||||||
|
'enrichedEmployees'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -193,9 +194,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toggleIsFinished() {
|
||||||
|
this.mastertask.is_finished = !this.mastertask.is_finished
|
||||||
|
this.save()
|
||||||
|
},
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
if (!(await this.v$.$validate())) return
|
if (!(await this.v$.$validate())) return
|
||||||
|
|
||||||
|
if (this.$refs['description'])
|
||||||
this.mastertask.description = this.$refs['description'].getHTML()
|
this.mastertask.description = this.$refs['description'].getHTML()
|
||||||
|
|
||||||
// this.mastertask.subtasks = this.mastertask.subtasks.map(subtask => {
|
// this.mastertask.subtasks = this.mastertask.subtasks.map(subtask => {
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export default {
|
|||||||
if (!(await this.v$.$validate()))
|
if (!(await this.v$.$validate()))
|
||||||
return
|
return
|
||||||
|
|
||||||
this.subtask.description = this.$refs["description"].getHTML()
|
this.subtask.description = this.$refs['description'].getHTML()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (this.subtask?.id) {
|
if (this.subtask?.id) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ async function _unauthorised(error: any) {
|
|||||||
if (error?.response?.data?.message == 'Unauthenticated.')
|
if (error?.response?.data?.message == 'Unauthenticated.')
|
||||||
return store.dispatch('auth/logout')
|
return store.dispatch('auth/logout')
|
||||||
|
|
||||||
return error
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
|
|
||||||
axios.interceptors.response.use(
|
axios.interceptors.response.use(
|
||||||
|
|||||||
Reference in new issue
Block a user