From c000d2686b1b7c0fe32e8987e53eb5715cad876f Mon Sep 17 00:00:00 2001 From: kj1352 Date: Fri, 19 Jun 2020 17:46:43 +0530 Subject: [PATCH] Changed the notes details component to video-notes and created a new component called chapter-notes --- src/app/app-routing.module.ts | 4 +-- src/app/app.module.ts | 6 +++-- .../chapter-notes.component.html | 1 + .../chapter-notes.component.scss | 0 .../chapter-notes.component.spec.ts} | 12 ++++----- .../chapter-notes/chapter-notes.component.ts | 15 +++++++++++ .../video-chapter.component.html | 6 ++--- .../video-notes/video-notes.component.html} | 0 .../video-notes/video-notes.component.scss} | 0 .../video-notes/video-notes.component.spec.ts | 25 +++++++++++++++++++ .../video-notes/video-notes.component.ts} | 10 ++++---- 11 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 src/app/tabs/courses/chapter-notes/chapter-notes.component.html create mode 100644 src/app/tabs/courses/chapter-notes/chapter-notes.component.scss rename src/app/tabs/courses/{notes-details/notes-details.component.spec.ts => chapter-notes/chapter-notes.component.spec.ts} (53%) create mode 100644 src/app/tabs/courses/chapter-notes/chapter-notes.component.ts rename src/app/tabs/courses/{notes-details/notes-details.component.html => video-chapter/video-notes/video-notes.component.html} (100%) rename src/app/tabs/courses/{notes-details/notes-details.component.scss => video-chapter/video-notes/video-notes.component.scss} (100%) create mode 100644 src/app/tabs/courses/video-chapter/video-notes/video-notes.component.spec.ts rename src/app/tabs/courses/{notes-details/notes-details.component.ts => video-chapter/video-notes/video-notes.component.ts} (85%) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index d28a6c2..25f26c8 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -4,7 +4,7 @@ import { WelcomeComponent } from './welcome/welcome.component'; import { TabsComponent } from './tabs/tabs.component'; import { DetailsComponent } from './tabs/courses/details/details.component'; import { VideoChapterComponent } from './tabs/courses/video-chapter/video-chapter.component'; -import { NotesDetailsComponent } from './tabs/courses/notes-details/notes-details.component'; +import { VideoNotesComponent } from './tabs/courses/video-chapter/video-notes/video-notes.component'; import { CalendarComponent } from './calendar/calendar.component'; import { AttendanceComponent } from './tabs/more/attendance/attendance.component'; import { ForumPageComponent } from './tabs/more/forum-page/forum-page.component'; @@ -17,7 +17,7 @@ const routes: Routes = [ { component: DetailsComponent, path: 'course-details' }, { component: DetailsComponent, path: 'course-details/:heading' }, { component: VideoChapterComponent, path: 'video-chapter/:heading' }, - { component: NotesDetailsComponent, path: 'notes-details/:heading' }, + { component: VideoNotesComponent, path: 'video-notes/:heading' }, { component: CalendarComponent, path: 'calendar' }, { component: AttendanceComponent, path: 'attendance'}, { component: ForumPageComponent, path: 'forum'}, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 2b9d6a1..bd44969 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -15,7 +15,6 @@ import { ReportsComponent } from './tabs/reports/reports.component'; import { MoreComponent } from './tabs/more/more.component'; import { DetailsComponent } from './tabs/courses/details/details.component'; import { VideoChapterComponent } from './tabs/courses/video-chapter/video-chapter.component'; -import { NotesDetailsComponent } from './tabs/courses/notes-details/notes-details.component'; import { ServiceWorkerModule } from '@angular/service-worker'; import { environment } from '../environments/environment'; import { CalendarComponent } from './calendar/calendar.component'; @@ -23,6 +22,8 @@ import { AttendanceComponent } from './tabs/more/attendance/attendance.component import { ForumComponent } from './reusable-components/forum/forum.component'; import { ForumPageComponent } from './tabs/more/forum-page/forum-page.component'; import { ConfirmationPopupComponent } from './reusable-components/confirmation-popup/confirmation-popup.component'; +import { VideoNotesComponent } from './tabs/courses/video-chapter/video-notes/video-notes.component'; +import { ChapterNotesComponent } from './tabs/courses/chapter-notes/chapter-notes.component'; @NgModule({ declarations: [ @@ -35,12 +36,13 @@ import { ConfirmationPopupComponent } from './reusable-components/confirmation-p MoreComponent, DetailsComponent, VideoChapterComponent, - NotesDetailsComponent, CalendarComponent, AttendanceComponent, ForumComponent, ForumPageComponent, ConfirmationPopupComponent, + VideoNotesComponent, + ChapterNotesComponent, ], imports: [ BrowserModule, diff --git a/src/app/tabs/courses/chapter-notes/chapter-notes.component.html b/src/app/tabs/courses/chapter-notes/chapter-notes.component.html new file mode 100644 index 0000000..6f43e2d --- /dev/null +++ b/src/app/tabs/courses/chapter-notes/chapter-notes.component.html @@ -0,0 +1 @@ +

chapter-notes works!

diff --git a/src/app/tabs/courses/chapter-notes/chapter-notes.component.scss b/src/app/tabs/courses/chapter-notes/chapter-notes.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/tabs/courses/notes-details/notes-details.component.spec.ts b/src/app/tabs/courses/chapter-notes/chapter-notes.component.spec.ts similarity index 53% rename from src/app/tabs/courses/notes-details/notes-details.component.spec.ts rename to src/app/tabs/courses/chapter-notes/chapter-notes.component.spec.ts index ea99b0c..68008f3 100644 --- a/src/app/tabs/courses/notes-details/notes-details.component.spec.ts +++ b/src/app/tabs/courses/chapter-notes/chapter-notes.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { NotesDetailsComponent } from './notes-details.component'; +import { ChapterNotesComponent } from './chapter-notes.component'; -describe('NotesDetailsComponent', () => { - let component: NotesDetailsComponent; - let fixture: ComponentFixture; +describe('ChapterNotesComponent', () => { + let component: ChapterNotesComponent; + let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ NotesDetailsComponent ] + declarations: [ ChapterNotesComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(NotesDetailsComponent); + fixture = TestBed.createComponent(ChapterNotesComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/tabs/courses/chapter-notes/chapter-notes.component.ts b/src/app/tabs/courses/chapter-notes/chapter-notes.component.ts new file mode 100644 index 0000000..9d66354 --- /dev/null +++ b/src/app/tabs/courses/chapter-notes/chapter-notes.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-chapter-notes', + templateUrl: './chapter-notes.component.html', + styleUrls: ['./chapter-notes.component.scss'] +}) +export class ChapterNotesComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/tabs/courses/video-chapter/video-chapter.component.html b/src/app/tabs/courses/video-chapter/video-chapter.component.html index 152dd38..cbbb973 100644 --- a/src/app/tabs/courses/video-chapter/video-chapter.component.html +++ b/src/app/tabs/courses/video-chapter/video-chapter.component.html @@ -60,7 +60,7 @@
    -
  • +
  • @@ -73,7 +73,7 @@

  • -
  • +
  • @@ -86,7 +86,7 @@

  • -
  • +
  • diff --git a/src/app/tabs/courses/notes-details/notes-details.component.html b/src/app/tabs/courses/video-chapter/video-notes/video-notes.component.html similarity index 100% rename from src/app/tabs/courses/notes-details/notes-details.component.html rename to src/app/tabs/courses/video-chapter/video-notes/video-notes.component.html diff --git a/src/app/tabs/courses/notes-details/notes-details.component.scss b/src/app/tabs/courses/video-chapter/video-notes/video-notes.component.scss similarity index 100% rename from src/app/tabs/courses/notes-details/notes-details.component.scss rename to src/app/tabs/courses/video-chapter/video-notes/video-notes.component.scss diff --git a/src/app/tabs/courses/video-chapter/video-notes/video-notes.component.spec.ts b/src/app/tabs/courses/video-chapter/video-notes/video-notes.component.spec.ts new file mode 100644 index 0000000..bb8dc04 --- /dev/null +++ b/src/app/tabs/courses/video-chapter/video-notes/video-notes.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { VideoNotesComponent } from './video-notes.component'; + +describe('VideoNotesComponent', () => { + let component: VideoNotesComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ VideoNotesComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(VideoNotesComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/tabs/courses/notes-details/notes-details.component.ts b/src/app/tabs/courses/video-chapter/video-notes/video-notes.component.ts similarity index 85% rename from src/app/tabs/courses/notes-details/notes-details.component.ts rename to src/app/tabs/courses/video-chapter/video-notes/video-notes.component.ts index da2891b..21f0610 100644 --- a/src/app/tabs/courses/notes-details/notes-details.component.ts +++ b/src/app/tabs/courses/video-chapter/video-notes/video-notes.component.ts @@ -6,12 +6,12 @@ import { NgxSiemaOptions, NgxSiemaService } from 'ngx-siema'; @Component({ - selector: 'app-notes-details', - templateUrl: './notes-details.component.html', - styleUrls: ['./notes-details.component.scss'] + selector: 'app-video-notes', + templateUrl: './video-notes.component.html', + styleUrls: ['./video-notes.component.scss'] }) -export class NotesDetailsComponent implements OnInit { - heading: number; +export class VideoNotesComponent implements OnInit { + heading: number; routeSubscription: Subscription; options: NgxSiemaOptions = {