fix: clear task obj before creating new task
This commit is contained in:
parent
684ab8871e
commit
9234b813e0
@ -2,7 +2,6 @@
|
||||
<Dialog
|
||||
v-model="show"
|
||||
:options="{
|
||||
title: editMode ? 'Edit Task' : 'Create Task',
|
||||
size: 'xl',
|
||||
actions: [
|
||||
{
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<Breadcrumbs :items="breadcrumbs" />
|
||||
</template>
|
||||
<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>
|
||||
</Button>
|
||||
</template>
|
||||
@ -107,4 +107,18 @@ function showTask(name) {
|
||||
}
|
||||
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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user