Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
649 B

/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'sqxRuleEventBadgeClass',
pure: true
})
export class RuleEventBadgeClassPipe implements PipeTransform {
public transform(status: string) {
if (status === 'Retry') {
return 'warning';
} else if (status === 'Failed' || status === 'Cancelled') {
return 'danger';
} else if (status === 'Pending') {
return 'secondary';
} else {
return status.toLowerCase();
}
}
}