feat: ticket views, statuses, participants, merge; mobile layout fixes (#5)

- New migrations: ticket views, statuses, participants, merge support
- New models: TicketView, TicketStatus, TicketParticipant
- New seeder: EmailTemplatesSeeder
- Console commands for ticketing
- Mobile: sidebar min-w-0/overflow-hidden, tab nav overflow-x-auto

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Joel Wedemire
2026-04-19 22:22:45 -07:00
parent ffb64078d8
commit dd0a458250
17 changed files with 1399 additions and 260 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace Dashboard\Ticketing\Console\Commands;
use App\Models\Setting;
use Dashboard\Ticketing\Models\Ticket;
use Illuminate\Console\Command;
class AutoCloseTickets extends Command
{
protected $signature = 'ticketing:auto-close';
protected $description = 'Close resolved tickets that have not been updated within the configured grace period.';
public function handle(): int
{
$days = (int) Setting::get('ticketing.auto_close_days', 0);
if ($days <= 0) {
$this->info('Auto-close is disabled (ticketing.auto_close_days = 0).');
return 0;
}
$cutoff = now()->subDays($days);
$count = Ticket::where('status', 'resolved')
->where('updated_at', '<=', $cutoff)
->update(['status' => 'closed']);
$this->info("Auto-closed {$count} ticket(s) resolved more than {$days} day(s) ago.");
return 0;
}
}