add show
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {ShowTypePipe} from './show-type.pipe';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [ShowTypePipe],
|
||||
exports: [
|
||||
ShowTypePipe
|
||||
],
|
||||
imports: [
|
||||
CommonModule
|
||||
]
|
||||
})
|
||||
export class ShowTypeTranslaterModule {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import {ShowTypePipe} from './show-type.pipe';
|
||||
|
||||
describe('ShowTypePipe', () => {
|
||||
it('create an instance', () => {
|
||||
const pipe = new ShowTypePipe();
|
||||
expect(pipe).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
import {Pipe, PipeTransform} from '@angular/core';
|
||||
|
||||
@Pipe({
|
||||
name: 'showType'
|
||||
})
|
||||
export class ShowTypePipe implements PipeTransform {
|
||||
|
||||
transform(type: string): string {
|
||||
switch (type) {
|
||||
case 'worship':
|
||||
return 'Gottesdienst Anbetung';
|
||||
case 'praise':
|
||||
return 'Gottesdienst Lobpreis';
|
||||
case 'homegroup':
|
||||
return 'Hauskreis';
|
||||
case 'prayergroup':
|
||||
return 'Gebetskreis';
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user