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.
34 lines
828 B
34 lines
828 B
<?php
|
|
|
|
namespace App\Domains\Billing\Enums\Invoicing;
|
|
|
|
use App\Domains\System\Traits\Enum\HasPredicateMethod;
|
|
use App\UI\Enums\Concerns\InteractsWithLabels;
|
|
use App\UI\Enums\Contracts\HasLabel;
|
|
use App\UI\Enums\Contracts\HasUiBadge;
|
|
|
|
enum InvoiceStatus: string implements HasLabel, HasUiBadge
|
|
{
|
|
use HasPredicateMethod;
|
|
use InteractsWithLabels;
|
|
|
|
case DRAFT = 'draft';
|
|
case ISSUED = 'issued';
|
|
case PARTIALLY_PAID = 'partially_paid';
|
|
case PAID = 'paid';
|
|
case VOID = 'void';
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function variant(): string
|
|
{
|
|
return match ($this) {
|
|
self::DRAFT => "secondary",
|
|
self::ISSUED => "info",
|
|
self::PARTIALLY_PAID => "warning",
|
|
self::PAID => "success",
|
|
self::VOID => "danger",
|
|
};
|
|
}
|
|
}
|
|
|