diff --git a/.gitignore b/.gitignore index 86d943a..4e4cff8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - +/node_modules +.idea/workspace.xml +.idea/vcs.xml +.idea/modules.xml +.idea/misc.xml +.idea/inspectionProfiles/Project_Default.xml +.idea/frontendTeacher.iml # compiled output /dist /tmp diff --git a/package-lock.json b/package-lock.json index 52d7591..20f7588 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1553,6 +1553,79 @@ "to-fast-properties": "^2.0.0" } }, + "@fullcalendar/angular": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@fullcalendar/angular/-/angular-5.1.0.tgz", + "integrity": "sha512-oD2FEViEei0McMBe+SkmLTeMxSug5M3YRaW8ABHnN0SG2QRQKXXYKeGwIEpK0pGzlSDnMsgFF9fA3kOkKNXyGw==", + "requires": { + "@fullcalendar/core": "~5.1.0", + "fast-deep-equal": "^3.1.1" + } + }, + "@fullcalendar/common": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@fullcalendar/common/-/common-5.1.0.tgz", + "integrity": "sha512-ubwf9T0BDocGLh0AK8achrmc0siQdrp3Wn6Rmg/Ht4/WnwBtjc5gumzJ0ezG/xHE0GWG+Pz6Tm0IJF/jE7NJHw==", + "requires": { + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", + "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" + } + } + }, + "@fullcalendar/core": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-5.1.0.tgz", + "integrity": "sha512-C9OA9LHD1zgfcMABQ17TaxvAO/iubYFLDrgTIRCe77LatC0G36UBafthevUlMRqCR6rt5SBcw0oBt23HqSJO3A==", + "requires": { + "@fullcalendar/common": "~5.1.0", + "preact": "^10.0.5", + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", + "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" + } + } + }, + "@fullcalendar/daygrid": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-5.1.0.tgz", + "integrity": "sha512-zdO/EFer8wWrr+kvkMfyizPi/F7yvOCpGOb6Arz6QqyOgFl1ffNUQoRf1iQf7h2PnIEvZWZdZs+3wuMwwmhb3g==", + "requires": { + "@fullcalendar/common": "~5.1.0", + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", + "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" + } + } + }, + "@fullcalendar/interaction": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@fullcalendar/interaction/-/interaction-5.1.0.tgz", + "integrity": "sha512-RuCtsVFXvGYk4vYz3Aq9+G8SMOG6iX+xNJmHELdmPfAatHTVyUSCD4GznxR1/fzUu74mb98X01DVkLwSB+78oA==", + "requires": { + "@fullcalendar/common": "~5.1.0", + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", + "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" + } + } + }, "@istanbuljs/schema": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", @@ -4922,8 +4995,7 @@ "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-glob": { "version": "3.2.4", @@ -9494,6 +9566,11 @@ "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", "dev": true }, + "preact": { + "version": "10.4.4", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.4.4.tgz", + "integrity": "sha512-EaTJrerceyAPatQ+vfnadoopsMBZAOY7ak9ogVdUi5xbpR8SoHgtLryXnW+4mQOwt21icqoVR1brkU2dq7pEBA==" + }, "prepend-http": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", diff --git a/package.json b/package.json index aecc8a5..3141f6e 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,9 @@ "@angular/platform-browser": "~9.1.7", "@angular/platform-browser-dynamic": "~9.1.7", "@angular/router": "~9.1.7", + "@fullcalendar/angular": "^5.1.0", + "@fullcalendar/daygrid": "^5.1.0", + "@fullcalendar/interaction": "^5.1.0", "ng-katex": "^2.0.3", "rxjs": "~6.5.4", "tslib": "^1.10.0", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 6effc58..c3e7125 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -4,13 +4,15 @@ import { PreloadAllModules, Routes, RouterModule } from '@angular/router'; import { TaskListComponent } from './task-list/task-list.component'; import { TaskComponent } from './task/task.component'; import { EditTaskComponent } from './edit-task/edit-task.component'; +import { CalendarComponent } from './calendar/calendar.component'; import { TaskDetailsComponent } from './task-details/task-details.component'; const routes: Routes = [ -{path: '', redirectTo: "tasklist", pathMatch: 'full'}, +{path: '', redirectTo: 'tasklist', pathMatch: 'full'}, {path: 'tasklist', component: TaskListComponent}, {path: 'newtask', component: EditTaskComponent}, {path: 'edittask/:id', component: EditTaskComponent}, +{path: 'calendar', component: CalendarComponent}, {path: 'taskdetails/:id', component: TaskDetailsComponent}, ]; diff --git a/src/app/app.component.html b/src/app/app.component.html index c8a7cb2..05cf299 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -4,4 +4,5 @@
- \ No newline at end of file + + diff --git a/src/app/app.module.ts b/src/app/app.module.ts index aab6150..8ab7093 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,25 +1,35 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; +import { FullCalendarModule } from '@fullcalendar/angular'; +import dayGridPlugin from '@fullcalendar/daygrid'; +import interactionPlugin from '@fullcalendar/interaction'; + + import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; -import {HttpClientModule} from '@angular/common/http'; +import { HttpClientModule} from '@angular/common/http'; import { TaskComponent } from './task/task.component'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { MatGridListModule } from '@angular/material/grid-list'; import { MaterialModule } from './material-module'; import { FlexLayoutModule } from '@angular/flex-layout'; import { TaskListComponent } from './task-list/task-list.component'; import { EditTaskComponent } from './edit-task/edit-task.component'; import { FormsModule } from '@angular/forms'; +import { CalendarComponent } from './calendar/calendar.component'; import { KatexModule } from 'ng-katex'; import { TaskDetailsComponent } from './task-details/task-details.component'; import { KatexInputComponent } from './katex-input/katex-input.component'; +FullCalendarModule.registerPlugins([ // register FullCalendar plugins + dayGridPlugin, + interactionPlugin +]); @NgModule({ declarations: [ @@ -27,6 +37,7 @@ import { KatexInputComponent } from './katex-input/katex-input.component'; TaskComponent, TaskListComponent, EditTaskComponent, + CalendarComponent, TaskDetailsComponent, KatexInputComponent ], @@ -37,7 +48,9 @@ import { KatexInputComponent } from './katex-input/katex-input.component'; FlexLayoutModule, FormsModule, HttpClientModule, - KatexModule + FullCalendarModule, + BrowserAnimationsModule, + KatexModule, ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/calendar/calendar.component.css b/src/app/calendar/calendar.component.css new file mode 100644 index 0000000..233ca21 --- /dev/null +++ b/src/app/calendar/calendar.component.css @@ -0,0 +1,8 @@ +h3 { + margin: 0 0 10px; +} + +pre { + background-color: #f5f5f5; + padding: 15px; +} diff --git a/src/app/calendar/calendar.component.html b/src/app/calendar/calendar.component.html new file mode 100644 index 0000000..28cfa5f --- /dev/null +++ b/src/app/calendar/calendar.component.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/app/calendar/calendar.component.spec.ts b/src/app/calendar/calendar.component.spec.ts new file mode 100644 index 0000000..4522517 --- /dev/null +++ b/src/app/calendar/calendar.component.spec.ts @@ -0,0 +1,24 @@ +import { CalendarComponent } from './calendar.component'; +import {async, ComponentFixture, TestBed} from '@angular/core/testing'; + +describe('CalendarComponent', () => { + let component: CalendarComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CalendarComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CalendarComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/calendar/calendar.component.ts b/src/app/calendar/calendar.component.ts new file mode 100644 index 0000000..c8ec65e --- /dev/null +++ b/src/app/calendar/calendar.component.ts @@ -0,0 +1,105 @@ +import {Component, Input, OnInit} from '@angular/core'; +import { CalendarOptions } from '@fullcalendar/angular'; +import {Task_Interface} from '../task-interface'; +import { Tasks } from '../task-data'; + + +@Component({ + selector: 'app-root', + templateUrl: './calendar.component.html', + styleUrls: ['./calendar.component.scss'] +}) +export class CalendarComponent implements OnInit{ + + @Input() tasks: Task_Interface[] = []; + activatebar = false; + activateend = false; + activatestart = false; + + // @ts-ignore + calendarOptions: CalendarOptions = { + initialView: 'dayGridMonth', + weekends: true, // initial value + events: [], + }; + + toggleWeekends() { + this.calendarOptions.weekends = !this.calendarOptions.weekends; // toggle the boolean! + } + showCalendar() + { + this.tasks = Tasks; + const name = []; + const start = []; + const end = []; + const color = []; + let zaehler = 0; + for (let index = 0; index < this.tasks.length; index++) + { + if (this.activatestart) + { + zaehler++; + name.push('Anfang: ' + Tasks[index].name); + start.push(Tasks[index].start); + end.push(Tasks[index].start); + if (Tasks[index].uebung) { + color.push('green'); + } + else { color.push('purple'); } + } + if (this.activateend) + { + zaehler++; + name.push('Abgabe: ' + Tasks[index].name); + start.push(Tasks[index].end); + end.push(Tasks[index].end); + if (Tasks[index].uebung) { + color.push('green'); + } + else { color.push('purple'); } + } + if (this.activatebar) + { + zaehler++; + name.push(Tasks[index].name); + start.push(Tasks[index].start); + end.push(Tasks[index].end); + if (Tasks[index].uebung) { + color.push('green'); + } else { + color.push('purple'); + } + } + } + const newEvents = []; + // tslint:disable-next-line:prefer-for-of + for (let index = 0; index <= zaehler; index++) + { + newEvents.push({ title: name.pop(), color: color.pop(), start: start.pop(), end: end.pop() }); + } + this.calendarOptions.events = newEvents; + } + activateEndDate() + { + this.activateend = !this.activateend; + this.showCalendar(); + } + + activateStartDate() + { + this.activatestart = !this.activatestart; + this.showCalendar(); + } + + toggleBar() + { + this.activatebar = !this.activatebar; + this.showCalendar(); + } + constructor() { + } + ngOnInit() { + this.toggleBar(); + } + +} diff --git a/src/app/edit-task/edit-task.component.html b/src/app/edit-task/edit-task.component.html index 1953a32..336f9ca 100644 --- a/src/app/edit-task/edit-task.component.html +++ b/src/app/edit-task/edit-task.component.html @@ -64,7 +64,10 @@
Schüler:
{{task.allocate}}
- +
+
Auswahl Übung oder Vorlesung:
+ +
diff --git a/src/app/edit-task/edit-task.component.ts b/src/app/edit-task/edit-task.component.ts index c5b4f52..c60fb21 100644 --- a/src/app/edit-task/edit-task.component.ts +++ b/src/app/edit-task/edit-task.component.ts @@ -12,7 +12,6 @@ import { Router } from '@angular/router'; templateUrl: './edit-task.component.html', styleUrls: ['./edit-task.component.css'] }) - export class EditTaskComponent implements OnInit { @Input() task: Task_Interface = { id: 0, @@ -25,14 +24,17 @@ export class EditTaskComponent implements OnInit { allocate: ['9b', '9a', 'Verena Steinmeier'], subject: undefined, materials: {}, - modelSolution: {} + model_solution: {}, + uebung: true, }; - preview: Boolean = false; + public buttonheader: string; + + preview = false; url = 'http://file.io'; // 'localhost:3001'; - showKatexInput: boolean = false; + showKatexInput = false; input: HTMLInputElement; @@ -40,13 +42,11 @@ export class EditTaskComponent implements OnInit { percentCompleted = 0; - - handleFileInput(filename) { const that = this; const fileToUpload = (filename === 'materials') ? - (document.getElementById('materials') as HTMLInputElement).files : - (document.getElementById('modelSolution') as HTMLInputElement).files; + (document.getElementById('materials') as HTMLInputElement).files : + (document.getElementById('model_solution') as HTMLInputElement).files; console.log(fileToUpload); if (fileToUpload.length > 0) { const file = fileToUpload.item(0); @@ -63,24 +63,29 @@ export class EditTaskComponent implements OnInit { } uploadWithProgress(formData: FormData): Observable { - const uploadfile = this.http.post(this.url, formData, { observe: 'events', reportProgress: true }); + const uploadfile = this.http.post(this.url, formData, {observe: 'events', reportProgress: true}); return uploadfile; } - constructor(private http: HttpClient, private route: ActivatedRoute, private router: Router) {} - - ngOnInit(): void { + constructor(private http: HttpClient, private route: ActivatedRoute, private router: Router) { + } +ngOnInit(): void { // get the task with id from the url from our task list - this.input = document.getElementById("input") as HTMLInputElement; + this.input = document.getElementById('input') as HTMLInputElement; const id = +this.route.snapshot.paramMap.get('id'); if (id > 0) { this.task = Tasks.find(task => task.id === id); } + if (this.task.uebung) + { + this.buttonheader = 'Übung'; + } + else {this.buttonheader = 'Vorlesung'; } } activatePreview(){ console.log(this.task.materials); - console.log(this.task.modelSolution); + console.log(this.task.model_solution); this.preview = true; } @@ -91,19 +96,35 @@ export class EditTaskComponent implements OnInit { delete() {} archive() {} save() { - this.handleFileInput('materials'); - this.handleFileInput('modelSolution'); - if(this.task.id == 0){ - if(Tasks.length>0) - this.task.id = Tasks[Tasks.length-1].id + 1; - else this.task.id = 1; + if (this.task.id === 0) { + this.task.id = Tasks[Tasks.length - 1].id + 1; + this.handleFileInput('materials'); + this.handleFileInput('model_solution'); + if (this.task.id === 0) { + if (Tasks.length > 0) { + this.task.id = Tasks[Tasks.length - 1].id + 1; + } else { + this.task.id = 1; + } Tasks.push(this.task); + } + this.router.navigateByUrl('tasklist'); } - this.router.navigateByUrl('tasklist'); } - - showKatex() { - this.showKatexInput ? this.showKatexInput=false : this.showKatexInput=true; + showKatex() + { + this.showKatexInput ? this.showKatexInput = false : this.showKatexInput = true; } + toggleUebung() + { + this.task.uebung = !this.task.uebung; + if (this.buttonheader === 'Übung') + { + this.buttonheader = 'Vorlesung'; + } + else { + this.buttonheader = 'Übung'; + } + } } diff --git a/src/app/task-data.ts b/src/app/task-data.ts index 105541c..6e3bb7f 100644 --- a/src/app/task-data.ts +++ b/src/app/task-data.ts @@ -6,64 +6,69 @@ export const Tasks: Task_Interface[] = [ name: 'Aufgabe 1', description: 'Aufgabenbeschreibung', estimated_effort: '4 Stunden', - start: new Date(), - end: new Date(), + start: new Date('2020-06-05'), + end: new Date('2020-06-08'), previousTask: undefined, allocate: ['9b', '9a', 'Verena Steinmeier'], subject: undefined, materials: {}, - modelSolution: {} + model_solution: {}, + uebung: true, }, { - id: 2, - name: 'Aufgabe 2', - description: 'Aufgabenbeschreibung amnslkmd aäskldm lakdsm ääkadsm aklsdmaskd maklösdäm äaksdm alkdm alkd', - estimated_effort: '8 Stunden', - start: new Date(), - end: new Date(), - previousTask: undefined, - allocate: ['9b', '9a', 'Verena Steinmeier'], - subject: undefined, - materials: {}, - modelSolution: {} + id: 2, + name: 'Aufgabe 2', + description: 'Aufgabenbeschreibung amnslkmd aäskldm lakdsm ääkadsm aklsdmaskd maklösdäm äaksdm alkdm alkd', + estimated_effort: '8 Stunden', + start: new Date('2020-06-25'), + end: new Date('2020-06-30'), + previousTask: undefined, + allocate: ['9b', '9a', 'Verena Steinmeier'], + subject: undefined, + materials: {}, + model_solution: {}, + uebung: true, }, { - id: 3, - name: 'Aufgabe 3', - description: 'Das hier ist eine Formel \\formel{\\frac{2}{3}} toll oder?', - estimated_effort: '8 Stunden', - start: new Date(), - end: new Date(), - previousTask: undefined, - allocate: ['9b', '9a', 'Verena Steinmeier'], - subject: undefined, - materials: {}, - modelSolution: {} + id: 3, + name: 'Aufgabe 3', + description: 'Das hier ist eine Formel \\formel{\\frac{2}{3}} toll oder?', + estimated_effort: '8 Stunden', + start: new Date('2020-06-16'), + end: new Date('2020-06-19'), + previousTask: undefined, + allocate: ['9b', '9a', 'Verena Steinmeier'], + subject: undefined, + materials: {}, + model_solution: {}, + uebung: true, }, { - id: 4, - name: 'Aufgabe 4', - description: 'Das hier ist eine Formel \\formel{\\frac{2}{3}} toll oder, und noch eine \\formel{ \\pm 15 \\sqrt{ x ^ 2 }} schick!', - estimated_effort: '8 Stunden', - start: new Date(), - end: new Date(), - previousTask: undefined, - allocate: ['9b', '9a', 'Verena Steinmeier'], - subject: undefined, - materials: {}, - modelSolution: {} + id: 4, + name: 'Aufgabe 4', + description: 'Das hier ist eine Formel \\formel{\\frac{2}{3}} toll oder, und noch eine \\formel{ \\pm 15 \\sqrt{ x ^ 2 }} schick!', + estimated_effort: '8 Stunden', + start: new Date('2020-05-26'), + end: new Date('2020-06-4'), + previousTask: undefined, + allocate: ['9b', '9a', 'Verena Steinmeier'], + subject: undefined, + materials: {}, + model_solution: {}, + uebung: true, }, { - id: 5, - name: 'Aufgabe 5', - description: 'Aufgabenbeschreibung', - estimated_effort: '8 Stunden', - start: new Date(), - end: new Date(), - previousTask: undefined, - allocate: ['9b', '9a', 'Verena Steinmeier'], - subject: undefined, - materials: {}, - modelSolution: {} + id: 5, + name: 'Aufgabe 5', + description: 'Aufgabenbeschreibung', + estimated_effort: '8 Stunden', + start: new Date('2020-06-06'), + end: new Date('2020-06-17'), + previousTask: undefined, + allocate: ['9b', '9a', 'Verena Steinmeier'], + subject: undefined, + materials: {}, + model_solution: {}, + uebung: true, } ] diff --git a/src/app/task-details/task-details.component.ts b/src/app/task-details/task-details.component.ts index 83c58bd..4b4848c 100644 --- a/src/app/task-details/task-details.component.ts +++ b/src/app/task-details/task-details.component.ts @@ -3,7 +3,7 @@ import { Tasks } from '../task-data'; import { ActivatedRoute } from '@angular/router'; import { Router } from '@angular/router'; import {Task_Interface} from '../task-interface'; -import {TaskComponent} from '../task/task.component' +import {TaskComponent} from '../task/task.component'; import { StringArray } from '../stringArray'; @@ -27,18 +27,20 @@ export class TaskDetailsComponent implements OnInit { allocate: ['9b', '9a', 'Verena Steinmeier'], subject: undefined, materials: undefined, + uebung: true, modelSolution: undefined }; - stringArray: StringArray = { text: [], mode:[] } + stringArray: StringArray = { text: [], mode: [] }; constructor(private route: ActivatedRoute, private router: Router) { } ngOnInit(): void { const id = +this.route.snapshot.paramMap.get('id'); - if(id>0) + if (id > 0) { this.task = Tasks.find(task => task.id === id); + } this.taskc.calculateKatex(this.task, this.stringArray); } @@ -48,7 +50,7 @@ export class TaskDetailsComponent implements OnInit { } delete(){ - Tasks.splice(Tasks.indexOf(Tasks.find(task => task.id === this.task.id)),1); + Tasks.splice(Tasks.indexOf(Tasks.find(task => task.id === this.task.id)), 1); this.router.navigateByUrl('/tasklist'); } diff --git a/src/app/task-interface.ts b/src/app/task-interface.ts index c823bc7..fe57445 100644 --- a/src/app/task-interface.ts +++ b/src/app/task-interface.ts @@ -9,5 +9,6 @@ export class Task_Interface { allocate: object; subject: string; materials: object; - modelSolution: object; + model_solution: object; + uebung: boolean; } diff --git a/src/app/task/task.component.spec.ts b/src/app/task/task.component.spec.ts index 34811c9..2020678 100644 --- a/src/app/task/task.component.spec.ts +++ b/src/app/task/task.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { TasksComponent } from './tasks.component'; +import { TaskComponent } from './task.component'; describe('TasksComponent', () => { - let component: TasksComponent; - let fixture: ComponentFixture; + let component: TaskComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ TasksComponent ] + declarations: [ TaskComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(TasksComponent); + fixture = TestBed.createComponent(TaskComponent); component = fixture.componentInstance; fixture.detectChanges(); });