chore: update document approval workflow and bug fixes
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\MaterialLogistics\Enums;
|
||||
|
||||
enum MaterialTransferStatus: string
|
||||
{
|
||||
case Draft = 'draft';
|
||||
case PendingApproval = 'pending_approval';
|
||||
case Approved = 'approved';
|
||||
case InTransit = 'in_transit';
|
||||
case Received = 'received';
|
||||
case Cancelled = 'cancelled';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Draft => 'Draft',
|
||||
self::PendingApproval => 'Pending Approval',
|
||||
self::Approved => 'Approved',
|
||||
self::InTransit => 'In Transit',
|
||||
self::Received => 'Received',
|
||||
self::Cancelled => 'Cancelled',
|
||||
};
|
||||
}
|
||||
|
||||
public function color(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Draft => 'gray',
|
||||
self::PendingApproval => 'amber',
|
||||
self::Approved => 'blue',
|
||||
self::InTransit => 'purple',
|
||||
self::Received => 'emerald',
|
||||
self::Cancelled => 'red',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user