1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00
pigallery2/frontend/app/pipes/StringifyRolePipe.ts

12 lines
272 B
TypeScript
Raw Normal View History

2016-05-04 17:20:21 +02:00
import {Pipe, PipeTransform} from "@angular/core";
import {UserRoles} from "../../../common/entities/User";
@Pipe({name: 'stringifyRole'})
export class StringifyRole implements PipeTransform {
2016-05-09 17:04:56 +02:00
transform(role:string):number {
return UserRoles[role];
}
}