| | 1 | | using MudBlazor; |
| | 2 | |
|
| | 3 | | namespace Syki.Front.Features.Adm.GetCommandsSummary; |
| | 4 | |
|
| | 5 | | public static class CommandStatusMapper |
| | 6 | | { |
| | 7 | | public static string GetIcon(this CommandStatus status) |
| | 8 | | { |
| 0 | 9 | | return status switch |
| 0 | 10 | | { |
| 0 | 11 | | CommandStatus.Pending => Icons.Material.Rounded.WarningAmber, |
| 0 | 12 | | CommandStatus.Awaiting => Icons.Material.Filled.HourglassTop, |
| 0 | 13 | | CommandStatus.Processing => Icons.Material.Filled.Autorenew, |
| 0 | 14 | | CommandStatus.Success => Icons.Material.Filled.CheckCircleOutline, |
| 0 | 15 | | CommandStatus.Error => Icons.Material.Filled.ErrorOutline, |
| 0 | 16 | | _ => "" |
| 0 | 17 | | }; |
| | 18 | | } |
| | 19 | |
|
| | 20 | | public static Color GetColor(this CommandStatus status) |
| | 21 | | { |
| 0 | 22 | | return status switch |
| 0 | 23 | | { |
| 0 | 24 | | CommandStatus.Pending => Color.Warning, |
| 0 | 25 | | CommandStatus.Awaiting => Color.Default, |
| 0 | 26 | | CommandStatus.Processing => Color.Info, |
| 0 | 27 | | CommandStatus.Success => Color.Success, |
| 0 | 28 | | CommandStatus.Error => Color.Error, |
| 0 | 29 | | _ => Color.Default |
| 0 | 30 | | }; |
| | 31 | | } |
| | 32 | | } |