Commit 9440bdd8 by Tuukka Kivilahti

merge request fixes

1 parent cdf83bdf
Pipeline #74 failed
in 0 seconds
import { UserService } from './shared/services/user.service'; import { UserService } from './shared/services/user.service';
import { ErrorInterceptor } from './shared/interceptors/error.interceptor'; import { ErrorInterceptor } from './shared/interceptors/error.interceptor';
import { MoyaLocaleService } from './components/moya-locale/moya-locale.service'; import { LocaleService } from './components/moya-locale/locale.service';
import { CacheService } from './shared/services/cache.service'; import { CacheService } from './shared/services/cache.service';
import { TranslateHttpLoader } from '@ngx-translate/http-loader'; import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
...@@ -49,7 +49,7 @@ import {ApolloModule} from "apollo-angular"; ...@@ -49,7 +49,7 @@ import {ApolloModule} from "apollo-angular";
], ],
providers: [ providers: [
CacheService, CacheService,
MoyaLocaleService, LocaleService,
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true }, { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
UserService, UserService,
......
...@@ -19,7 +19,7 @@ const LOCALSTORAGE_NAME = 'currently used locale code'; ...@@ -19,7 +19,7 @@ const LOCALSTORAGE_NAME = 'currently used locale code';
@Injectable() @Injectable()
export class MoyaLocaleService { export class LocaleService {
selectedLocale: string; selectedLocale: string;
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {DEFAULT_LOCALE, ENGLISH, FINNISH, MoyaLocaleService, SWEDISH} from './moya-locale.service'; import {DEFAULT_LOCALE, ENGLISH, FINNISH, LocaleService, SWEDISH} from './locale.service';
@Component({ @Component({
selector: 'moya-locale', selector: 'moya-locale',
...@@ -12,7 +12,7 @@ export class MoyaLocaleComponent implements OnInit { ...@@ -12,7 +12,7 @@ export class MoyaLocaleComponent implements OnInit {
svSelected = true; svSelected = true;
enSelected = true; enSelected = true;
constructor(private localeService: MoyaLocaleService) { } constructor(private localeService: LocaleService) { }
ngOnInit() { ngOnInit() {
this.localeService.getUserLocale().subscribe(locale => { this.updateFlagStatus(locale); } ); this.localeService.getUserLocale().subscribe(locale => { this.updateFlagStatus(locale); } );
......
import { TestBed, inject } from '@angular/core/testing'; import { TestBed, inject } from '@angular/core/testing';
import { MoyaLocaleService } from './moya-locale.service'; import { LocaleService } from './locale.service';
describe('MoyaLocaleService', () => { describe('LocaleService', () => {
beforeEach(() => { beforeEach(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
providers: [MoyaLocaleService] providers: [LocaleService]
}); });
}); });
it('should be created', inject([MoyaLocaleService], (service: MoyaLocaleService) => { it('should be created', inject([LocaleService], (service: LocaleService) => {
expect(service).toBeTruthy(); expect(service).toBeTruthy();
})); }));
}); });
...@@ -10,7 +10,7 @@ import {TranslatePipe} from "@ngx-translate/core"; ...@@ -10,7 +10,7 @@ import {TranslatePipe} from "@ngx-translate/core";
styleUrls: ['./left-menu.component.scss'], styleUrls: ['./left-menu.component.scss'],
providers: [TranslatePipe] providers: [TranslatePipe]
}) })
export class LeftMenuComponent implements OnInit { export class LeftMenuComponent {
menu: MenuGroup[]; menu: MenuGroup[];
styleClass: string; styleClass: string;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!