diff --git a/src/components/atoms/ModeratedTasks.vue b/src/components/atoms/ModeratedTasks.vue index 843cb7664..ca26822f0 100644 --- a/src/components/atoms/ModeratedTasks.vue +++ b/src/components/atoms/ModeratedTasks.vue @@ -84,33 +84,36 @@ - + - - + + + + - - mdi-close Cancel + mdi-close Cancel - - mdi-content-save Save + mdi-content-save Save @@ -128,6 +131,7 @@ export default { drag: false, addTaskModal: false, taskIndex: null, + valid: false, newTask: { taskName: '', taskDescription: '', @@ -165,6 +169,10 @@ export default { this.taskIndex = null this.addTaskModal = false this.newTask = { taskName: '', taskDescription: '', taskStatus: 'closed' } + this.resetForm() + }, + resetForm() { + this.$refs.form.resetValidation() }, addTask() { if ( @@ -180,6 +188,12 @@ export default { taskStatus: 'closed', }) this.closeAddTaskModal() + this.resetForm() + } else if ( + this.newTask.taskDescription.trim() == '' || + this.newTask.taskName.trim() == '' + ) { + this.$refs.form.validate() } },