-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathPluginActivityType.php
More file actions
53 lines (48 loc) · 1.63 KB
/
PluginActivityType.php
File metadata and controls
53 lines (48 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
namespace App\Enums;
enum PluginActivityType: string
{
case Submitted = 'submitted';
case Resubmitted = 'resubmitted';
case Approved = 'approved';
case Rejected = 'rejected';
case DescriptionUpdated = 'description_updated';
case Withdrawn = 'withdrawn';
case ReturnedToDraft = 'returned_to_draft';
public function label(): string
{
return match ($this) {
self::Submitted => 'Submitted',
self::Resubmitted => 'Resubmitted',
self::Approved => 'Approved',
self::Rejected => 'Rejected',
self::DescriptionUpdated => 'Description Updated',
self::Withdrawn => 'Withdrawn',
self::ReturnedToDraft => 'Returned to Draft',
};
}
public function color(): string
{
return match ($this) {
self::Submitted => 'info',
self::Resubmitted => 'info',
self::Approved => 'success',
self::Rejected => 'danger',
self::DescriptionUpdated => 'gray',
self::Withdrawn => 'warning',
self::ReturnedToDraft => 'warning',
};
}
public function icon(): string
{
return match ($this) {
self::Submitted => 'heroicon-o-paper-airplane',
self::Resubmitted => 'heroicon-o-arrow-path',
self::Approved => 'heroicon-o-check-circle',
self::Rejected => 'heroicon-o-x-circle',
self::DescriptionUpdated => 'heroicon-o-pencil-square',
self::Withdrawn => 'heroicon-o-arrow-uturn-left',
self::ReturnedToDraft => 'heroicon-o-arrow-uturn-left',
};
}
}