feat: harden admin auth and ticket workflows
- add rotating admin refresh tokens and password gates\n- expand ticket galleries, exports, and client resources\n- improve IP allocation auditing and dashboard data\n- enforce encrypted client access tokens on public routes
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Api\Client\Ticket;
|
||||
|
||||
use App\Support\TicketGallery;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class ClientTicketResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'ticket_num' => $this->ticket_num,
|
||||
'subject' => $this->subject,
|
||||
'description' => $this->description,
|
||||
'status' => $this->status,
|
||||
'room' => $this->room,
|
||||
'priority' => $this->resource->priority(),
|
||||
'gallery' => TicketGallery::clientUrls($this->resource),
|
||||
'customer' => $this->whenLoaded('customer', fn () => ['fullname' => $this->customer->fullname]),
|
||||
'replies' => ClientTicketReplyResource::collection($this->whenLoaded('reply')),
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user