delete task-data interface
This commit is contained in:
parent
484df8e5b9
commit
27e5e71639
3 changed files with 4 additions and 11 deletions
|
|
@ -47,6 +47,7 @@ export class AddTaskComponent {
|
|||
|
||||
addSubtask(subtaskName: string) {
|
||||
this.taskData.subtasksTitle.unshift(subtaskName);
|
||||
this.taskData.subtasksDone.push(false);
|
||||
this.saveTaskData();
|
||||
}
|
||||
|
||||
|
|
@ -55,6 +56,7 @@ export class AddTaskComponent {
|
|||
this.taskData.subtasksTitle.indexOf(subtaskName),
|
||||
1
|
||||
);
|
||||
this.taskData.subtasksDone.splice(1);
|
||||
this.saveTaskData();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
export interface TaskData {
|
||||
title: string;
|
||||
description: string;
|
||||
date: string;
|
||||
priority: string;
|
||||
category: string;
|
||||
assigned: string[];
|
||||
subtasksTitle: string[];
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ import {
|
|||
} from '@angular/fire/firestore';
|
||||
import { Task } from '../interfaces/task.interface';
|
||||
import { User } from '../interfaces/user.interface';
|
||||
import { TaskData } from '../interfaces/task-data.interface';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
|
|
@ -58,7 +58,7 @@ export class FirebaseService implements OnDestroy {
|
|||
});
|
||||
}
|
||||
|
||||
async addNewTask(task: TaskData) {
|
||||
async addNewTask(task: Task) {
|
||||
await addDoc(collection(this.firestore, 'tasks'), task)
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
|
|
|
|||
Loading…
Reference in a new issue