Skip to content

Commit

Permalink
fix: code smells (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryT-CG authored Oct 21, 2024
1 parent 8b14f44 commit f9014c7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"primeicons": "^7.0.0",
"primeng": "^17.18.11",
"rxjs": "7.8.1",
"tslib": "^2.7.0"
"tslib": "^2.8.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.1.2",
Expand All @@ -93,7 +93,7 @@
"css-loader": "^7.1.2",
"eslint": "~8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.6",
"jasmine-core": "~5.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app/onecx-permission-remote.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const routes: Routes = [
schemas: []
})
export class OneCXPermissionModule implements DoBootstrap {
constructor(private injector: Injector) {
constructor(private readonly injector: Injector) {
console.info('OneCX Permission Module constructor')
}

Expand Down
8 changes: 4 additions & 4 deletions src/app/permission/role-detail/role-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ export class RoleDetailComponent implements OnChanges {
public selectedIamRoles: IAMRole[] = []

constructor(
private roleApi: RoleAPIService,
private translate: TranslateService,
private msgService: PortalMessageService,
private userService: UserService
private readonly roleApi: RoleAPIService,
private readonly translate: TranslateService,
private readonly msgService: PortalMessageService,
private readonly userService: UserService
) {
if (userService.hasPermission('ROLE#EDIT')) this.myPermissions.push('ROLE#EDIT')
if (userService.hasPermission('ROLE#DELETE')) this.myPermissions.push('ROLE#DELETE')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class OneCXUserRolesPermissionsComponent implements OnInit, ocxRemoteComp
public searchInProgress = false

constructor(
@Inject(BASE_URL) private baseUrl: ReplaySubject<string>,
@Inject(BASE_URL) private readonly baseUrl: ReplaySubject<string>,
private readonly userService: UserService,
private readonly userApi: UserAPIService,
private readonly translate: TranslateService
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/label.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Observable, map } from 'rxjs'
//dont use `providedIn root` - wont work when we are in shell
@Injectable()
export class LabelResolver implements Resolve<string> {
constructor(private translate: TranslateService) {}
constructor(private readonly translate: TranslateService) {}
resolve(route: ActivatedRouteSnapshot, _state: RouterStateSnapshot): string | Observable<string> | Promise<string> {
return route.data['breadcrumb']
? this.translate.get(route.data['breadcrumb']).pipe(map((t) => t.toString()))
Expand Down

0 comments on commit f9014c7

Please sign in to comment.