fix: clear task obj before creating new task

This commit is contained in:
Shariq Ansari 2024-02-04 18:31:11 +05:30
parent 684ab8871e
commit 9234b813e0
2 changed files with 15 additions and 2 deletions

View File

@ -2,7 +2,6 @@
<Dialog
v-model="show"
:options="{
title: editMode ? 'Edit Task' : 'Create Task',
size: 'xl',
actions: [
{

View File

@ -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>