mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
fix(tasks-concepts, task-modal): update task loading type to 'draft' and enhance save button functionality for subtasks
This commit is contained in:
1 parent
18bcf6706d
commit
e1cdf24bc0
2 files changed
+31
-7
No files matched your search
@@ -119,7 +119,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async loadConceptTasks(employeeId = null) {
|
async loadConceptTasks(employeeId = null) {
|
||||||
try {
|
try {
|
||||||
const params = { type: 'concept' };
|
const params = { type: 'draft' };
|
||||||
if (employeeId) {
|
if (employeeId) {
|
||||||
params.employee_id = employeeId;
|
params.employee_id = employeeId;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -273,18 +273,42 @@
|
|||||||
/>
|
/>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
|
||||||
<v-btn class="button primary" :disabled="isSaving" @click="save()">{{
|
|
||||||
subtask.id ? 'UPRAVIŤ' : 'VYTVORIŤ'
|
|
||||||
}}</v-btn>
|
|
||||||
|
|
||||||
<template v-if="!subtask.id">
|
<template v-if="!subtask.id">
|
||||||
|
<v-btn class="button primary" :disabled="isSaving" @click="save()"
|
||||||
|
>VYTVORIŤ</v-btn
|
||||||
|
>
|
||||||
|
|
||||||
<v-btn
|
<v-btn
|
||||||
class="button primary outline mt-2"
|
class="button primary outline mt-2"
|
||||||
@click="save()"
|
@click="save(true)"
|
||||||
:disabled="isSaving"
|
:disabled="isSaving"
|
||||||
>ULOŽIŤ KONCEPT</v-btn
|
>ULOŽIŤ KONCEPT</v-btn
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<template v-if="subtask.is_draft">
|
||||||
|
<v-btn
|
||||||
|
class="button primary"
|
||||||
|
:disabled="isSaving"
|
||||||
|
@click="save(true)"
|
||||||
|
>ULOŽIŤ A PUBLIKOVAŤ</v-btn
|
||||||
|
>
|
||||||
|
|
||||||
|
<v-btn
|
||||||
|
class="button primary outline mt-2"
|
||||||
|
@click="save(true)"
|
||||||
|
:disabled="isSaving"
|
||||||
|
>ULOŽIŤ KONCEPT</v-btn
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<v-btn class="button primary" :disabled="isSaving" @click="save()"
|
||||||
|
>UPRAVIŤ</v-btn
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
<v-card v-else height="100%" class="d-flex flex-column scrolling">
|
<v-card v-else height="100%" class="d-flex flex-column scrolling">
|
||||||
@@ -777,7 +801,7 @@ export default {
|
|||||||
employees: validEmployees,
|
employees: validEmployees,
|
||||||
};
|
};
|
||||||
if (concept) {
|
if (concept) {
|
||||||
subtaskCopy.concept = true;
|
subtaskCopy.is_draft = true;
|
||||||
}
|
}
|
||||||
delete subtaskCopy._master_task;
|
delete subtaskCopy._master_task;
|
||||||
const { subtasks } = await this.$axios.post_auth(
|
const { subtasks } = await this.$axios.post_auth(
|
||||||
|
|||||||
Reference in new issue
Block a user