- Added migration for ticket assignment and comments (`assigned_user_id` and `ticket_replies` table). - Implemented `TicketAssignedNotification` and `TicketCommentedNotification`. - Created `ReplyData`, `TicketListData`, and `PostReplyRequest` data classes. - Introduced `ResolveNotificationRouteController` for modular notification redirection. - Updated UI to support assigning users and posting comments on tickets. - User is navigated to comments page when clicked on the ticket, upon navigation ticket details modal is opened. - Extended tests to cover assignments, comments, status transitions, and notifications.
35 lines
711 B
PHP
35 lines
711 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Enums;
|
|
|
|
use App\Concerns\EnumValuesAsArray;
|
|
|
|
enum TicketStatusEnum: string
|
|
{
|
|
use EnumValuesAsArray;
|
|
|
|
case Open = 'open';
|
|
case InProgress = 'in-progress';
|
|
case Hold = 'hold';
|
|
case Resolved = 'resolved';
|
|
case Closed = 'closed';
|
|
|
|
public static function toLabels()
|
|
{
|
|
return array_map(fn ($status) => $status->label(), self::cases());
|
|
}
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::Open => 'Open',
|
|
self::InProgress => 'In Progress',
|
|
self::Hold => 'Hold',
|
|
self::Resolved => 'Resolved',
|
|
self::Closed => 'Closed',
|
|
};
|
|
}
|
|
}
|