fix: clear task obj before creating new task
This commit is contained in:
parent
684ab8871e
commit
9234b813e0
@ -2,7 +2,6 @@
|
|||||||
<Dialog
|
<Dialog
|
||||||
v-model="show"
|
v-model="show"
|
||||||
:options="{
|
:options="{
|
||||||
title: editMode ? 'Edit Task' : 'Create Task',
|
|
||||||
size: 'xl',
|
size: 'xl',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<Breadcrumbs :items="breadcrumbs" />
|
<Breadcrumbs :items="breadcrumbs" />
|
||||||
</template>
|
</template>
|
||||||
<template #right-header>
|
<template #right-header>
|
||||||
<Button variant="solid" label="Create" @click="showTaskModal = true">
|
<Button variant="solid" label="Create" @click="createTask">
|
||||||
<template #prefix><FeatherIcon name="plus" class="h-4" /></template>
|
<template #prefix><FeatherIcon name="plus" class="h-4" /></template>
|
||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
@ -107,4 +107,18 @@ function showTask(name) {
|
|||||||
}
|
}
|
||||||
showTaskModal.value = true
|
showTaskModal.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createTask() {
|
||||||
|
task.value = {
|
||||||
|
title: '',
|
||||||
|
description: '',
|
||||||
|
assigned_to: '',
|
||||||
|
due_date: '',
|
||||||
|
status: 'Backlog',
|
||||||
|
priority: 'Low',
|
||||||
|
reference_doctype: 'CRM Lead',
|
||||||
|
reference_docname: '',
|
||||||
|
}
|
||||||
|
showTaskModal.value = true
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user