From b43059ea150d9e8e6a49c720a7a112c26d3a57ff Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Thu, 19 Dec 2024 17:48:48 -0800 Subject: [PATCH] refactor(NodeService): remove dialog parameter from constructors in NodeService and TeacherNodeService. It's only used in StudentNodeService. --- src/assets/wise5/services/nodeService.ts | 2 -- src/assets/wise5/services/studentNodeService.ts | 4 ++-- src/assets/wise5/services/teacherNodeService.ts | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/assets/wise5/services/nodeService.ts b/src/assets/wise5/services/nodeService.ts index 3e24aaf2c9..80fc2698b0 100644 --- a/src/assets/wise5/services/nodeService.ts +++ b/src/assets/wise5/services/nodeService.ts @@ -1,5 +1,4 @@ import { Injectable } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; import { ConfigService } from './configService'; import { ProjectService } from './projectService'; import { DataService } from '../../../app/services/data.service'; @@ -17,7 +16,6 @@ export abstract class NodeService { protected configService: ConfigService, protected constraintService: ConstraintService, protected dataService: DataService, - protected dialog: MatDialog, protected projectService: ProjectService ) {} diff --git a/src/assets/wise5/services/studentNodeService.ts b/src/assets/wise5/services/studentNodeService.ts index b44de88bb4..86144c2ead 100644 --- a/src/assets/wise5/services/studentNodeService.ts +++ b/src/assets/wise5/services/studentNodeService.ts @@ -20,11 +20,11 @@ export class StudentNodeService extends NodeService { protected configService: ConfigService, protected constraintService: ConstraintService, protected dataService: StudentDataService, - protected dialog: MatDialog, + private dialog: MatDialog, private nodeStatusService: NodeStatusService, protected projectService: ProjectService ) { - super(configService, constraintService, dataService, dialog, projectService); + super(configService, constraintService, dataService, projectService); } setCurrentNode(nodeId: string): void { diff --git a/src/assets/wise5/services/teacherNodeService.ts b/src/assets/wise5/services/teacherNodeService.ts index 67c2725cd0..9835c43192 100644 --- a/src/assets/wise5/services/teacherNodeService.ts +++ b/src/assets/wise5/services/teacherNodeService.ts @@ -3,7 +3,6 @@ import { NodeService } from './nodeService'; import { Subject, Observable } from 'rxjs'; import { TeacherDataService } from './teacherDataService'; import { TeacherProjectService } from './teacherProjectService'; -import { MatDialog } from '@angular/material/dialog'; import { ConfigService } from './configService'; import { ConstraintService } from './constraintService'; @@ -21,10 +20,9 @@ export class TeacherNodeService extends NodeService { protected configService: ConfigService, protected constraintService: ConstraintService, protected dataService: TeacherDataService, - protected dialog: MatDialog, protected projectService: TeacherProjectService ) { - super(configService, constraintService, dataService, dialog, projectService); + super(configService, constraintService, dataService, projectService); } broadcastComponentShowSubmitButtonValueChanged(args: any): void {