chore: code styling via pint

This commit is contained in:
idevakk
2025-11-14 01:51:35 -08:00
parent 3892c48ef2
commit 90ab79b3a2
121 changed files with 1003 additions and 892 deletions

View File

@@ -2,9 +2,9 @@
namespace App\Livewire\Dashboard;
use Exception;
use App\Models\Ticket;
use App\Models\TicketResponse;
use Exception;
use Livewire\Component;
use Request;
use Str;
@@ -12,11 +12,17 @@ use Str;
class Support extends Component
{
public $tickets = [];
public $subject;
public $message;
public $response;
public $list = false;
public $open = 0;
public $closed = 0;
public function store()
@@ -37,15 +43,14 @@ class Support extends Component
]);
$this->dispatch('showAlert', ['type' => 'success', 'message' => 'Your ticket has been created successfully!']);
$this->dispatch('closeModal');
$this->reset(['subject','message']);
$this->reset(['subject', 'message']);
$this->tickets = Ticket::with('responses')
->where('user_id', auth()->id())
->get();
->where('user_id', auth()->id())
->get();
} catch (Exception $exception) {
$this->dispatch('showAlert', ['type' => 'error', 'message' => 'Something went wrong!']);
}
}
public function reply($ticket_id)
@@ -56,14 +61,16 @@ class Support extends Component
try {
if (!is_numeric($ticket_id)) {
if (! is_numeric($ticket_id)) {
$this->dispatch('showAlert', ['type' => 'error', 'message' => 'Invalid ticket ID.']);
return;
}
$ticket = Ticket::find($ticket_id);
if (!$ticket) {
if (! $ticket) {
$this->dispatch('showAlert', ['type' => 'error', 'message' => 'Ticket not found.']);
return;
}
@@ -91,13 +98,15 @@ class Support extends Component
public function close($ticket_id)
{
if (!is_numeric($ticket_id)) {
if (! is_numeric($ticket_id)) {
$this->dispatch('showAlert', ['type' => 'error', 'message' => 'Invalid ticket ID.']);
return;
}
$ticket = Ticket::find($ticket_id);
if (!$ticket) {
if (! $ticket) {
$this->dispatch('showAlert', ['type' => 'error', 'message' => 'Ticket not found.']);
return;
}
@@ -113,8 +122,8 @@ class Support extends Component
public function mount()
{
$this->tickets = Ticket::with('responses')
->where('user_id', auth()->id())
->get();
->where('user_id', auth()->id())
->get();
$this->updateTicketCounts();
}