chore: update document approval workflow and bug fixes

This commit is contained in:
2026-05-25 13:05:20 +08:00
parent d573c02893
commit 39a8e1d4cd
910 changed files with 49994 additions and 1010 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace Modules\ApprovalWorkflow\Enums;
enum ApprovalChainStatus: string
{
case Pending = 'pending';
case InReview = 'in_review';
case Approved = 'approved';
case Rejected = 'rejected';
public function label(): string
{
return match ($this) {
self::Pending => 'Pending',
self::InReview => 'In Review',
self::Approved => 'Approved',
self::Rejected => 'Rejected',
};
}
public function allowedTransitions(): array
{
return match ($this) {
self::Pending => [self::InReview, self::Rejected],
self::InReview => [self::Approved, self::Rejected],
self::Approved => [],
self::Rejected => [self::Pending],
};
}
}