major update
This commit is contained in:
33
lib/Domain/Taxonomy/ImportAuditStatus.php
Normal file
33
lib/Domain/Taxonomy/ImportAuditStatus.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Domain\Taxonomy;
|
||||
|
||||
enum ImportAuditStatus: string
|
||||
{
|
||||
use SupportsStringTaxonomy;
|
||||
|
||||
case Running = 'running';
|
||||
case Success = 'success';
|
||||
case Partial = 'partial';
|
||||
case Failed = 'failed';
|
||||
|
||||
public function labelToken(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Running => 'Running',
|
||||
self::Success => 'Success',
|
||||
self::Partial => 'Partial',
|
||||
self::Failed => 'Failed',
|
||||
};
|
||||
}
|
||||
|
||||
public function badgeVariant(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Running => 'info',
|
||||
self::Success => 'success',
|
||||
self::Partial => 'warning',
|
||||
self::Failed => 'danger',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user