Skip to content

Commit 60a31b6

Browse files
committed
sonar fix
1 parent 65ba45b commit 60a31b6

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

client/wfprev-war/src/main/angular/src/app/components/create-new-project-dialog/create-new-project-dialog.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export class CreateNewProjectDialogComponent implements OnInit {
4343
private readonly dialog: MatDialog,
4444
private readonly dialogRef: MatDialogRef<CreateNewProjectDialogComponent>,
4545
private readonly snackbarService: MatSnackBar,
46-
private projectService: ProjectService,
47-
private codeTableService: CodeTableServices
46+
private readonly projectService: ProjectService,
47+
private readonly codeTableService: CodeTableServices
4848

4949
) {
5050
this.projectForm = this.fb.group({
@@ -101,7 +101,7 @@ export class CreateNewProjectDialogComponent implements OnInit {
101101
}
102102
getErrorMessage(controlName: string): string | null {
103103
const control = this.projectForm.get(controlName);
104-
if (!control || !control.errors) return null;
104+
if (!control?.errors) return null;
105105

106106
if (control.hasError('required')) {
107107
return this.messages.requiredField;

client/wfprev-war/src/main/angular/src/app/components/list-panel/projects-list/projects-list.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ export class ProjectsListComponent implements OnInit {
2222
programAreaCode: any[] = [];
2323
forestRegionCode: any[] = [];
2424
constructor(
25-
private router: Router,
26-
private projectService: ProjectService,
27-
private codeTableService: CodeTableServices,
28-
private dialog: MatDialog
25+
private readonly router: Router,
26+
private readonly projectService: ProjectService,
27+
private readonly codeTableService: CodeTableServices,
28+
private readonly dialog: MatDialog
2929

3030
) {
3131
}

client/wfprev-war/src/main/angular/src/app/services/code-table-services.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export class CodeTableServices {
1111
private codeTableCache: { [key: string]: any } = {}; // Cache for code tables
1212

1313
constructor(
14-
private appConfigService: AppConfigService,
15-
private httpClient: HttpClient,
16-
private tokenService: TokenService,
14+
private readonly appConfigService: AppConfigService,
15+
private readonly httpClient: HttpClient,
16+
private readonly tokenService: TokenService,
1717
) {}
1818

1919
fetchCodeTable(codeTableName: string): Observable<any> {

client/wfprev-war/src/main/angular/src/app/services/project-services.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { TokenService } from "src/app/services/token.service";
1010

1111
export class ProjectService {
1212
constructor(
13-
private appConfigService: AppConfigService,
14-
private httpClient: HttpClient,
15-
private tokenService: TokenService,
13+
private readonly appConfigService: AppConfigService,
14+
private readonly httpClient: HttpClient,
15+
private readonly tokenService: TokenService,
1616
){
1717
}
1818

0 commit comments

Comments
 (0)