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