Skip to content

Commit

Permalink
refactor(Library): Convert LibraryProjectDisciplines to standalone (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffreykwan authored May 7, 2024
1 parent e9c20aa commit 43e4dc2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { LibraryProjectDisciplinesComponent } from './library-project-disciplines.component';
import { LibraryProject } from '../libraryProject';
import { NO_ERRORS_SCHEMA } from '@angular/core';

describe('LibraryProjectDisciplinesComponent', () => {
let component: LibraryProjectDisciplinesComponent;
let fixture: ComponentFixture<LibraryProjectDisciplinesComponent>;

beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [LibraryProjectDisciplinesComponent],
imports: [],
schemas: [NO_ERRORS_SCHEMA]
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [LibraryProjectDisciplinesComponent]
}).compileComponents();
})
);

beforeEach(() => {
fixture = TestBed.createComponent(LibraryProjectDisciplinesComponent);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import { Component, Input, OnInit } from '@angular/core';
import { LibraryProject } from '../libraryProject';
import { CommonModule } from '@angular/common';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatTooltipModule } from '@angular/material/tooltip';

@Component({
selector: 'app-library-project-disciplines',
templateUrl: './library-project-disciplines.component.html',
styleUrls: ['./library-project-disciplines.component.scss']
styleUrl: './library-project-disciplines.component.scss',
standalone: true,
imports: [CommonModule, FlexLayoutModule, MatTooltipModule]
})
export class LibraryProjectDisciplinesComponent implements OnInit {
@Input()
project: LibraryProject = new LibraryProject();
protected disciplines: any[];
@Input() project: LibraryProject = new LibraryProject();

disciplines: any[];

constructor() {}

ngOnInit() {
ngOnInit(): void {
let standards = this.project.metadata.standardsAddressed;
if (standards && standards.ngss) {
if (standards.ngss.disciplines) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/library/library.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const materialModules = [
CommonModule,
FlexLayoutModule,
FormsModule,
LibraryProjectDisciplinesComponent,
ReactiveFormsModule,
RouterModule,
materialModules,
Expand All @@ -90,7 +91,6 @@ const materialModules = [
LibraryGroupThumbsComponent,
LibraryProjectComponent,
LibraryProjectDetailsComponent,
LibraryProjectDisciplinesComponent,
LibraryProjectMenuComponent,
LibraryFiltersComponent,
HomePageProjectLibraryComponent,
Expand Down

0 comments on commit 43e4dc2

Please sign in to comment.