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

11 lines
274 B
TypeScript
Raw Normal View History

2022-04-04 19:37:31 +02:00
import { Pipe, PipeTransform } from '@angular/core';
import { UserRoles } from '../../../common/entities/UserDTO';
2022-04-04 19:37:31 +02:00
@Pipe({ name: 'stringifyRole' })
export class StringifyRole implements PipeTransform {
2018-11-28 23:49:33 +01:00
transform(role: number): string {
return UserRoles[role];
}
}