Skip to content
Snippets Groups Projects
Commit 264ad8c0 authored by OZGCloud's avatar OZGCloud
Browse files

sonarqube issues

parent 8b02bd55
No related branches found
No related tags found
No related merge requests found
Showing
with 25 additions and 61 deletions
......@@ -14,4 +14,3 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
......@@ -19,14 +19,12 @@
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
......
......@@ -12,23 +12,5 @@
<ng-template #homeInactive><span>Alle Vorgänge</span></ng-template>
</a>
</li>
<!--li>
<a href="#" matRipple matRippleColor="rgba(#000, 0.1)">
<mat-icon>star</mat-icon>
<span>Mir zugeordnet</span>
</a>
</li>
<li>
<a href="#">
<mat-icon>update</mat-icon>
<span>Wiedervorlagen</span>
</a>
</li>
<li>
<a href="#">
<mat-icon>delete</mat-icon>
<span>Gelöscht</span>
</a>
</li-->
</ul>
</nav>
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
@Component({
selector: 'goofy-client-postfach-detail-container',
templateUrl: './postfach-detail-container.component.html',
styleUrls: ['./postfach-detail-container.component.scss']
})
export class PostfachDetailContainerComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
export class PostfachDetailContainerComponent {
}
......@@ -13,6 +13,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: rgba(#000, 0.4);
}
.receiver {
......@@ -23,8 +24,4 @@
font-size: 12px;
color: rgba(#000, 0.4);
}
.message {
color: rgba(#000, 0.4);
}
}
......@@ -23,15 +23,13 @@ export function formatWithTime(date: Date): string {
return formatDate(date, 'dd.MM.y, H:mm:ss', 'de');
}
export function formatForThisYear(date): string {
export function formatForThisYear(date: Date): string {
return formatDate(date, 'd.MMM', 'de');
}
//TODO: besseren Namen finden
export function formatDMYDate(date): string {
export function formatDMYDate(date: Date): string {
return formatDate(date, 'dd.MM.yyyy', 'de');
}
//
export function isToday(date: Date): boolean {
return moment().isSame(date, 'day');
......
import { Injectable } from '@angular/core';
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpXsrfTokenExtractor } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
@Injectable()
......@@ -10,7 +10,7 @@ export class HttpXsrfInterceptor implements HttpInterceptor {
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
if (HttpXsrfInterceptor.isChangingDataRequest(request)) {
const headerName = 'X-XSRF-TOKEN';
let token = this.tokenExtractor.getToken() as string;
let token: string = this.tokenExtractor.getToken();
if (token !== null && !request.headers.has(headerName)) {
request = request.clone({ headers: request.headers.set(headerName, token) });
}
......
......@@ -3,14 +3,14 @@ import { Component, EventEmitter, Type } from '@angular/core';
export type Mock<T> = { [K in keyof T]: jest.Mock; };
export function mock<T>(service: Type<T>): Mock<T> {
return <Mock<T>>Object.getOwnPropertyNames(service.prototype).reduce((mock, key) => ({
...mock,
return <Mock<T>>Object.getOwnPropertyNames(service.prototype).reduce((mockValue, key) => ({
...mockValue,
[key]: jest.fn()
}), (<any>{}));
}
export function useFromMock<T>(mock: Mock<T>): T {
return <T><any>mock;
export function useFromMock<T>(mockToUse: Mock<T>): T {
return <T><any>mockToUse;
}
export function mockComponent(options: Component): Component {
......
......@@ -10,8 +10,8 @@ import { Subscription } from 'rxjs';
export abstract class FormControlEditorAbstractComponent implements ControlValueAccessor {
readonly fieldControl: FormControl = new FormControl();
private onChange = (text: string) => { };
public onTouched = () => { };
private onChange = (text: string) => undefined;
public onTouched = () => undefined;
private changesSubscr: Subscription;
private statusSubscr: Subscription;
......
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
@Component({
......
......@@ -16,7 +16,7 @@ export class AssignUserProfileButtonContainerComponent {
constructor(private userProfileService: UserProfileService) { }
showUserProfileSearch(): void {
this.scrollToTop(); // TODO bessere loesung finden
this.scrollToTop(); // TODO bessere loesung finden: Zum Element scrollen!?
this.userProfileService.showUserProfileSearch();
}
......
......@@ -22,11 +22,6 @@ goofy-client-vorgang-search-container {
body.dark goofy-client-vorgang-search-container {
.search-field {
background-color: $dark-background;
&:hover,
&:focus-within {
}
}
input::placeholder {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment