new helpdesk module
This commit is contained in:
+24
-2
@@ -31,22 +31,43 @@ return new class extends Migration {
|
||||
|
||||
Schema::create('helpdesk_categories', static function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('company_id')->nullable()->constrained('companies')->nullOnDelete();
|
||||
$table->string('name', 120);
|
||||
$table->string('slug', 140)->unique();
|
||||
$table->string('slug', 140);
|
||||
$table->string('color', 30)->default('blue');
|
||||
$table->text('description')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['company_id', 'slug']);
|
||||
});
|
||||
|
||||
Schema::create('helpdesk_teams', static function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('company_id')->nullable()->constrained('companies')->nullOnDelete();
|
||||
$table->string('name', 120);
|
||||
$table->string('slug', 140);
|
||||
$table->string('color', 30)->default('indigo');
|
||||
$table->text('description')->nullable();
|
||||
$table->timestamp('archived_at')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['company_id', 'slug']);
|
||||
});
|
||||
|
||||
Schema::create('helpdesk_projects', static function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->foreignId('company_id')->nullable()->constrained('companies')->nullOnDelete();
|
||||
$table->foreignId('team_id')->nullable()->constrained('helpdesk_teams')->nullOnDelete();
|
||||
$table->string('title', 160);
|
||||
$table->string('slug', 180)->unique();
|
||||
$table->string('slug', 180);
|
||||
$table->string('color', 30)->default('blue');
|
||||
$table->text('description')->nullable();
|
||||
$table->timestamp('archived_at')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['company_id', 'slug']);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -54,6 +75,7 @@ return new class extends Migration {
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('helpdesk_projects');
|
||||
Schema::dropIfExists('helpdesk_teams');
|
||||
Schema::dropIfExists('helpdesk_categories');
|
||||
Schema::dropIfExists('helpdesk_priorities');
|
||||
Schema::dropIfExists('helpdesk_statuses');
|
||||
|
||||
+4
@@ -13,12 +13,14 @@ return new class extends Migration {
|
||||
Schema::create('helpdesk_tickets', static function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->string('reference', 32)->unique();
|
||||
$table->foreignId('company_id')->nullable()->constrained('companies')->nullOnDelete();
|
||||
$table->foreignId('user_id')->constrained('users')->cascadeOnDelete();
|
||||
$table->foreignId('agent_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->foreignId('status_id')->constrained('helpdesk_statuses')->restrictOnDelete();
|
||||
$table->foreignId('priority_id')->constrained('helpdesk_priorities')->restrictOnDelete();
|
||||
$table->foreignId('category_id')->nullable()->constrained('helpdesk_categories')->nullOnDelete();
|
||||
$table->foreignId('project_id')->nullable()->constrained('helpdesk_projects')->nullOnDelete();
|
||||
$table->foreignId('team_id')->nullable()->constrained('helpdesk_teams')->nullOnDelete();
|
||||
$table->string('subject', 200);
|
||||
$table->longText('body');
|
||||
$table->timestamp('due_at')->nullable();
|
||||
@@ -28,6 +30,8 @@ return new class extends Migration {
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['company_id', 'project_id']);
|
||||
$table->index(['team_id', 'status_id']);
|
||||
$table->index(['status_id', 'priority_id']);
|
||||
$table->index(['agent_id', 'completed_at']);
|
||||
$table->index(['user_id', 'created_at']);
|
||||
|
||||
@@ -10,6 +10,7 @@ use Modules\Helpdesk\Models\Category;
|
||||
use Modules\Helpdesk\Models\Priority;
|
||||
use Modules\Helpdesk\Models\Project;
|
||||
use Modules\Helpdesk\Models\Status;
|
||||
use Modules\Helpdesk\Models\Team;
|
||||
|
||||
final class HelpdeskDatabaseSeeder extends Seeder
|
||||
{
|
||||
@@ -38,7 +39,14 @@ final class HelpdeskDatabaseSeeder extends Seeder
|
||||
Category::query()->updateOrCreate(['slug' => Str::slug($name)], ['name' => $name, 'color' => 'blue']);
|
||||
}
|
||||
|
||||
$team = Team::query()->updateOrCreate(['slug' => 'support'], [
|
||||
'name' => 'Support',
|
||||
'color' => 'indigo',
|
||||
'description' => 'Default support team for helpdesk tickets.',
|
||||
]);
|
||||
|
||||
Project::query()->updateOrCreate(['slug' => 'internal-helpdesk'], [
|
||||
'team_id' => $team->id,
|
||||
'title' => 'Internal Helpdesk',
|
||||
'color' => 'blue',
|
||||
'description' => 'Default project for internal helpdesk tickets.',
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Helpdesk\Livewire;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Str;
|
||||
use Livewire\Component;
|
||||
use Modules\Helpdesk\Models\Category;
|
||||
use Modules\Helpdesk\Models\Priority;
|
||||
use Modules\Helpdesk\Models\Project;
|
||||
use Modules\Helpdesk\Models\Status;
|
||||
use Modules\Helpdesk\Models\Team;
|
||||
|
||||
final class SettingsManager extends Component
|
||||
{
|
||||
public string $section = 'statuses';
|
||||
|
||||
/** @var array<string, mixed> */
|
||||
public array $statusForm = ['id' => null, 'name' => '', 'slug' => '', 'color' => 'zinc', 'sort_order' => 0, 'is_closed' => false];
|
||||
|
||||
/** @var array<string, mixed> */
|
||||
public array $priorityForm = ['id' => null, 'name' => '', 'slug' => '', 'color' => 'zinc', 'sort_order' => 0];
|
||||
|
||||
/** @var array<string, mixed> */
|
||||
public array $categoryForm = ['id' => null, 'company_id' => null, 'name' => '', 'slug' => '', 'color' => 'blue', 'description' => ''];
|
||||
|
||||
/** @var array<string, mixed> */
|
||||
public array $teamForm = ['id' => null, 'company_id' => null, 'name' => '', 'slug' => '', 'color' => 'indigo', 'description' => '', 'archived_at' => null];
|
||||
|
||||
/** @var array<string, mixed> */
|
||||
public array $projectForm = ['id' => null, 'company_id' => null, 'team_id' => null, 'title' => '', 'slug' => '', 'color' => 'blue', 'description' => '', 'archived_at' => null];
|
||||
|
||||
/** @return void */
|
||||
public function saveStatus(): void
|
||||
{
|
||||
$data = $this->validate([
|
||||
'statusForm.name' => ['required', 'string', 'max:80'],
|
||||
'statusForm.slug' => ['nullable', 'string', 'max:100'],
|
||||
'statusForm.color' => ['required', 'string', 'max:30'],
|
||||
'statusForm.sort_order' => ['required', 'integer', 'min:0'],
|
||||
'statusForm.is_closed' => ['boolean'],
|
||||
])['statusForm'];
|
||||
|
||||
$data['slug'] = $this->slug($data['slug'] ?: $data['name']);
|
||||
Status::query()->updateOrCreate(['id' => $this->statusForm['id']], $data);
|
||||
$this->resetStatusForm();
|
||||
session()->flash('success', 'Status saved.');
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function editStatus(int $id): void
|
||||
{
|
||||
$this->statusForm = Status::query()->findOrFail($id)->only(['id', 'name', 'slug', 'color', 'sort_order', 'is_closed']);
|
||||
$this->section = 'statuses';
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function deleteStatus(int $id): void
|
||||
{
|
||||
Status::query()->findOrFail($id)->delete();
|
||||
session()->flash('success', 'Status deleted.');
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function resetStatusForm(): void
|
||||
{
|
||||
$this->statusForm = ['id' => null, 'name' => '', 'slug' => '', 'color' => 'zinc', 'sort_order' => 0, 'is_closed' => false];
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function savePriority(): void
|
||||
{
|
||||
$data = $this->validate([
|
||||
'priorityForm.name' => ['required', 'string', 'max:80'],
|
||||
'priorityForm.slug' => ['nullable', 'string', 'max:100'],
|
||||
'priorityForm.color' => ['required', 'string', 'max:30'],
|
||||
'priorityForm.sort_order' => ['required', 'integer', 'min:0'],
|
||||
])['priorityForm'];
|
||||
|
||||
$data['slug'] = $this->slug($data['slug'] ?: $data['name']);
|
||||
Priority::query()->updateOrCreate(['id' => $this->priorityForm['id']], $data);
|
||||
$this->resetPriorityForm();
|
||||
session()->flash('success', 'Priority saved.');
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function editPriority(int $id): void
|
||||
{
|
||||
$this->priorityForm = Priority::query()->findOrFail($id)->only(['id', 'name', 'slug', 'color', 'sort_order']);
|
||||
$this->section = 'priorities';
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function deletePriority(int $id): void
|
||||
{
|
||||
Priority::query()->findOrFail($id)->delete();
|
||||
session()->flash('success', 'Priority deleted.');
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function resetPriorityForm(): void
|
||||
{
|
||||
$this->priorityForm = ['id' => null, 'name' => '', 'slug' => '', 'color' => 'zinc', 'sort_order' => 0];
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function saveCategory(): void
|
||||
{
|
||||
$data = $this->validate([
|
||||
'categoryForm.company_id' => ['nullable', 'integer'],
|
||||
'categoryForm.name' => ['required', 'string', 'max:120'],
|
||||
'categoryForm.slug' => ['nullable', 'string', 'max:140'],
|
||||
'categoryForm.color' => ['required', 'string', 'max:30'],
|
||||
'categoryForm.description' => ['nullable', 'string'],
|
||||
])['categoryForm'];
|
||||
|
||||
$data['slug'] = $this->slug($data['slug'] ?: $data['name']);
|
||||
Category::query()->updateOrCreate(['id' => $this->categoryForm['id']], $data);
|
||||
$this->resetCategoryForm();
|
||||
session()->flash('success', 'Category saved.');
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function editCategory(int $id): void
|
||||
{
|
||||
$this->categoryForm = Category::query()->findOrFail($id)->only(['id', 'company_id', 'name', 'slug', 'color', 'description']);
|
||||
$this->section = 'categories';
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function deleteCategory(int $id): void
|
||||
{
|
||||
Category::query()->findOrFail($id)->delete();
|
||||
session()->flash('success', 'Category deleted.');
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function resetCategoryForm(): void
|
||||
{
|
||||
$this->categoryForm = ['id' => null, 'company_id' => null, 'name' => '', 'slug' => '', 'color' => 'blue', 'description' => ''];
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function saveTeam(): void
|
||||
{
|
||||
$data = $this->validate([
|
||||
'teamForm.company_id' => ['nullable', 'integer'],
|
||||
'teamForm.name' => ['required', 'string', 'max:120'],
|
||||
'teamForm.slug' => ['nullable', 'string', 'max:140'],
|
||||
'teamForm.color' => ['required', 'string', 'max:30'],
|
||||
'teamForm.description' => ['nullable', 'string'],
|
||||
])['teamForm'];
|
||||
|
||||
$data['slug'] = $this->slug($data['slug'] ?: $data['name']);
|
||||
Team::query()->updateOrCreate(['id' => $this->teamForm['id']], $data);
|
||||
$this->resetTeamForm();
|
||||
session()->flash('success', 'Team saved.');
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function editTeam(int $id): void
|
||||
{
|
||||
$this->teamForm = Team::query()->findOrFail($id)->only(['id', 'company_id', 'name', 'slug', 'color', 'description', 'archived_at']);
|
||||
$this->section = 'teams';
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function deleteTeam(int $id): void
|
||||
{
|
||||
Team::query()->findOrFail($id)->delete();
|
||||
session()->flash('success', 'Team deleted.');
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function resetTeamForm(): void
|
||||
{
|
||||
$this->teamForm = ['id' => null, 'company_id' => null, 'name' => '', 'slug' => '', 'color' => 'indigo', 'description' => '', 'archived_at' => null];
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function saveProject(): void
|
||||
{
|
||||
$data = $this->validate([
|
||||
'projectForm.company_id' => ['nullable', 'integer'],
|
||||
'projectForm.team_id' => ['nullable', 'integer', 'exists:helpdesk_teams,id'],
|
||||
'projectForm.title' => ['required', 'string', 'max:160'],
|
||||
'projectForm.slug' => ['nullable', 'string', 'max:180'],
|
||||
'projectForm.color' => ['required', 'string', 'max:30'],
|
||||
'projectForm.description' => ['nullable', 'string'],
|
||||
])['projectForm'];
|
||||
|
||||
$data['slug'] = $this->slug($data['slug'] ?: $data['title']);
|
||||
Project::query()->updateOrCreate(['id' => $this->projectForm['id']], $data);
|
||||
$this->resetProjectForm();
|
||||
session()->flash('success', 'Project saved.');
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function editProject(int $id): void
|
||||
{
|
||||
$this->projectForm = Project::query()->findOrFail($id)->only(['id', 'company_id', 'team_id', 'title', 'slug', 'color', 'description', 'archived_at']);
|
||||
$this->section = 'projects';
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function deleteProject(int $id): void
|
||||
{
|
||||
Project::query()->findOrFail($id)->delete();
|
||||
session()->flash('success', 'Project deleted.');
|
||||
}
|
||||
|
||||
/** @return void */
|
||||
public function resetProjectForm(): void
|
||||
{
|
||||
$this->projectForm = ['id' => null, 'company_id' => null, 'team_id' => null, 'title' => '', 'slug' => '', 'color' => 'blue', 'description' => '', 'archived_at' => null];
|
||||
}
|
||||
|
||||
/** @return View */
|
||||
public function render(): View
|
||||
{
|
||||
return view('helpdesk::livewire.settings-manager', [
|
||||
'companies' => $this->companies(),
|
||||
'statuses' => Status::query()->withCount('tickets')->orderBy('sort_order')->orderBy('name')->get(),
|
||||
'priorities' => Priority::query()->withCount('tickets')->orderBy('sort_order')->orderBy('name')->get(),
|
||||
'categories' => Category::query()->withCount('tickets')->orderBy('name')->get(),
|
||||
'teams' => Team::query()->withCount(['projects', 'tickets'])->orderBy('name')->get(),
|
||||
'projects' => Project::query()->with(['team'])->withCount('tickets')->orderBy('title')->get(),
|
||||
])->layout('layouts.app');
|
||||
}
|
||||
|
||||
/** @return array<int, object> */
|
||||
private function companies(): array
|
||||
{
|
||||
if (! Schema::hasTable('companies')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return DB::table('companies')->select(['id', 'name'])->orderBy('name')->get()->all();
|
||||
}
|
||||
|
||||
private function slug(string $value): string
|
||||
{
|
||||
return Str::slug($value);
|
||||
}
|
||||
}
|
||||
@@ -13,12 +13,18 @@ use Livewire\WithFileUploads;
|
||||
use Modules\Helpdesk\Models\Category;
|
||||
use Modules\Helpdesk\Models\Priority;
|
||||
use Modules\Helpdesk\Models\Project;
|
||||
use Modules\Helpdesk\Models\Team;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Modules\Helpdesk\Services\TicketService;
|
||||
|
||||
final class TicketCreate extends Component
|
||||
{
|
||||
use WithFileUploads;
|
||||
|
||||
#[Validate('nullable|integer')]
|
||||
public ?int $company_id = null;
|
||||
|
||||
#[Validate('required|string|max:200')]
|
||||
public string $subject = '';
|
||||
|
||||
@@ -34,6 +40,9 @@ final class TicketCreate extends Component
|
||||
#[Validate('nullable|integer|exists:helpdesk_projects,id')]
|
||||
public ?int $project_id = null;
|
||||
|
||||
#[Validate('nullable|integer|exists:helpdesk_teams,id')]
|
||||
public ?int $team_id = null;
|
||||
|
||||
#[Validate('nullable|date')]
|
||||
public ?string $due_at = null;
|
||||
|
||||
@@ -54,11 +63,13 @@ final class TicketCreate extends Component
|
||||
]);
|
||||
|
||||
$ticket = $tickets->create(Auth::user(), [
|
||||
'company_id' => $this->company_id,
|
||||
'subject' => $this->subject,
|
||||
'body' => $this->body,
|
||||
'priority_id' => $this->priority_id,
|
||||
'category_id' => $this->category_id,
|
||||
'project_id' => $this->project_id,
|
||||
'team_id' => $this->team_id,
|
||||
'due_at' => $this->due_at,
|
||||
], $this->attachments);
|
||||
|
||||
@@ -73,6 +84,8 @@ final class TicketCreate extends Component
|
||||
return view('helpdesk::livewire.ticket-create', [
|
||||
'priorities' => Priority::query()->orderBy('sort_order')->get(),
|
||||
'categories' => Category::query()->orderBy('name')->get(),
|
||||
'companies' => Schema::hasTable('companies') ? DB::table('companies')->select(['id', 'name'])->orderBy('name')->get() : collect(),
|
||||
'teams' => Team::query()->whereNull('archived_at')->orderBy('name')->get(),
|
||||
'projects' => Project::query()->whereNull('archived_at')->orderBy('title')->get(),
|
||||
])->layout('layouts.app');
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ final class TicketIndex extends Component
|
||||
$user = Auth::user();
|
||||
|
||||
return Ticket::query()
|
||||
->with(['owner', 'agent', 'status', 'priority', 'category', 'project'])
|
||||
->with(['owner', 'agent', 'status', 'priority', 'category', 'project', 'team'])
|
||||
->visibleTo($user)
|
||||
->when($this->scope === 'open', static fn (Builder $query): Builder => $query->whereNull('completed_at'))
|
||||
->when($this->scope === 'closed', static fn (Builder $query): Builder => $query->whereNotNull('completed_at'))
|
||||
|
||||
@@ -17,7 +17,10 @@ final class Category extends Model
|
||||
protected $table = 'helpdesk_categories';
|
||||
|
||||
/** @var list<string> */
|
||||
protected $fillable = ['name', 'slug', 'color', 'description'];
|
||||
protected $fillable = ['company_id', 'name', 'slug', 'color', 'description'];
|
||||
|
||||
/** @var array<string, string> */
|
||||
protected $casts = ['company_id' => 'integer'];
|
||||
|
||||
/** @return HasMany<Ticket> */
|
||||
public function tickets(): HasMany
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace Modules\Helpdesk\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
@@ -17,10 +18,16 @@ final class Project extends Model
|
||||
protected $table = 'helpdesk_projects';
|
||||
|
||||
/** @var list<string> */
|
||||
protected $fillable = ['title', 'slug', 'color', 'description', 'archived_at'];
|
||||
protected $fillable = ['company_id', 'team_id', 'title', 'slug', 'color', 'description', 'archived_at'];
|
||||
|
||||
/** @var array<string, string> */
|
||||
protected $casts = ['archived_at' => 'datetime'];
|
||||
protected $casts = ['company_id' => 'integer', 'team_id' => 'integer', 'archived_at' => 'datetime'];
|
||||
|
||||
/** @return BelongsTo<Team, Project> */
|
||||
public function team(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Team::class, 'team_id');
|
||||
}
|
||||
|
||||
/** @return HasMany<Ticket> */
|
||||
public function tickets(): HasMany
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Helpdesk\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
final class Team extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'helpdesk_teams';
|
||||
|
||||
/** @var list<string> */
|
||||
protected $fillable = ['company_id', 'name', 'slug', 'color', 'description', 'archived_at'];
|
||||
|
||||
/** @var array<string, string> */
|
||||
protected $casts = [
|
||||
'company_id' => 'integer',
|
||||
'archived_at' => 'datetime',
|
||||
];
|
||||
|
||||
/** @return HasMany<Project> */
|
||||
public function projects(): HasMany
|
||||
{
|
||||
return $this->hasMany(Project::class, 'team_id');
|
||||
}
|
||||
|
||||
/** @return HasMany<Ticket> */
|
||||
public function tickets(): HasMany
|
||||
{
|
||||
return $this->hasMany(Ticket::class, 'team_id');
|
||||
}
|
||||
}
|
||||
@@ -27,12 +27,14 @@ final class Ticket extends Model
|
||||
|
||||
/** @var list<string> */
|
||||
protected $fillable = [
|
||||
'reference', 'user_id', 'agent_id', 'status_id', 'priority_id', 'category_id', 'project_id',
|
||||
'reference', 'company_id', 'user_id', 'agent_id', 'status_id', 'priority_id', 'category_id', 'project_id', 'team_id',
|
||||
'subject', 'body', 'due_at', 'completed_at', 'last_activity_at', 'archived_at',
|
||||
];
|
||||
|
||||
/** @var array<string, string> */
|
||||
protected $casts = [
|
||||
'company_id' => 'integer',
|
||||
'team_id' => 'integer',
|
||||
'due_at' => 'datetime',
|
||||
'completed_at' => 'datetime',
|
||||
'last_activity_at' => 'datetime',
|
||||
@@ -75,6 +77,12 @@ final class Ticket extends Model
|
||||
return $this->belongsTo(Project::class, 'project_id');
|
||||
}
|
||||
|
||||
/** @return BelongsTo<Team, Ticket> */
|
||||
public function team(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Team::class, 'team_id');
|
||||
}
|
||||
|
||||
/** @return HasMany<Comment> */
|
||||
public function comments(): HasMany
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@ use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Livewire\Livewire;
|
||||
use Modules\Helpdesk\Livewire\HelpdeskDashboardWidget;
|
||||
use Modules\Helpdesk\Livewire\SettingsManager;
|
||||
use Modules\Helpdesk\Livewire\TicketCreate;
|
||||
use Modules\Helpdesk\Livewire\TicketIndex;
|
||||
use Modules\Helpdesk\Livewire\TicketShow;
|
||||
@@ -78,6 +79,7 @@ final class HelpdeskServiceProvider extends ServiceProvider
|
||||
Livewire::component('helpdesk.ticket-create', TicketCreate::class);
|
||||
Livewire::component('helpdesk.ticket-show', TicketShow::class);
|
||||
Livewire::component('helpdesk.dashboard-widget', HelpdeskDashboardWidget::class);
|
||||
Livewire::component('helpdesk.settings-manager', SettingsManager::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<div class="overflow-x-auto">
|
||||
<table class="min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700">
|
||||
<thead class="bg-zinc-50 text-left text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:bg-zinc-800 dark:text-zinc-300">
|
||||
<tr><th class="px-4 py-3">Name</th><th class="px-4 py-3">Slug</th><th class="px-4 py-3">Colour</th><th class="px-4 py-3">Tickets</th><th class="px-4 py-3 text-right">Actions</th></tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">
|
||||
@forelse ($items as $item)
|
||||
<tr>
|
||||
<td class="px-4 py-3 font-medium text-zinc-900 dark:text-zinc-100">{{ $item->name }}</td>
|
||||
<td class="px-4 py-3 font-mono text-xs text-zinc-500">{{ $item->slug }}</td>
|
||||
<td class="px-4 py-3"><flux:badge color="{{ $item->color }}">{{ $item->color }}</flux:badge></td>
|
||||
<td class="px-4 py-3 text-zinc-500">{{ $item->tickets_count ?? 0 }}</td>
|
||||
<td class="px-4 py-3 text-right"><flux:button size="sm" wire:click="{{ $edit }}({{ $item->id }})" variant="ghost">Edit</flux:button><flux:button size="sm" wire:click="{{ $delete }}({{ $item->id }})" variant="danger">Delete</flux:button></td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="5" class="px-4 py-10 text-center text-zinc-500">No records yet.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<div class="overflow-x-auto"><table class="min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700"><thead class="bg-zinc-50 text-left text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:bg-zinc-800 dark:text-zinc-300"><tr><th class="px-4 py-3">Project</th><th class="px-4 py-3">Team</th><th class="px-4 py-3">Slug</th><th class="px-4 py-3">Colour</th><th class="px-4 py-3">Tickets</th><th class="px-4 py-3 text-right">Actions</th></tr></thead><tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">@forelse ($items as $item)<tr><td class="px-4 py-3 font-medium text-zinc-900 dark:text-zinc-100">{{ $item->title }}</td><td class="px-4 py-3 text-zinc-500">{{ $item->team?->name ?? 'No team' }}</td><td class="px-4 py-3 font-mono text-xs text-zinc-500">{{ $item->slug }}</td><td class="px-4 py-3"><flux:badge color="{{ $item->color }}">{{ $item->color }}</flux:badge></td><td class="px-4 py-3 text-zinc-500">{{ $item->tickets_count }}</td><td class="px-4 py-3 text-right"><flux:button size="sm" wire:click="editProject({{ $item->id }})" variant="ghost">Edit</flux:button><flux:button size="sm" wire:click="deleteProject({{ $item->id }})" variant="danger">Delete</flux:button></td></tr>@empty<tr><td colspan="6" class="px-4 py-10 text-center text-zinc-500">No projects yet.</td></tr>@endforelse</tbody></table></div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<section class="overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-700 dark:bg-zinc-900">
|
||||
<div class="border-b border-zinc-200 bg-zinc-50 px-5 py-4 dark:border-zinc-700 dark:bg-zinc-800/70">
|
||||
<h2 class="text-lg font-semibold text-zinc-900 dark:text-white">{{ $title }}</h2>
|
||||
<p class="mt-1 text-sm text-zinc-500 dark:text-zinc-400">{{ $description }}</p>
|
||||
</div>
|
||||
<div class="border-b border-zinc-200 p-5 dark:border-zinc-700">{{ $form }}</div>
|
||||
<div>{{ $slot }}</div>
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
<div class="overflow-x-auto"><table class="min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700"><thead class="bg-zinc-50 text-left text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:bg-zinc-800 dark:text-zinc-300"><tr><th class="px-4 py-3">Team</th><th class="px-4 py-3">Slug</th><th class="px-4 py-3">Colour</th><th class="px-4 py-3">Projects</th><th class="px-4 py-3">Tickets</th><th class="px-4 py-3 text-right">Actions</th></tr></thead><tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">@forelse ($items as $item)<tr><td class="px-4 py-3 font-medium text-zinc-900 dark:text-zinc-100">{{ $item->name }}</td><td class="px-4 py-3 font-mono text-xs text-zinc-500">{{ $item->slug }}</td><td class="px-4 py-3"><flux:badge color="{{ $item->color }}">{{ $item->color }}</flux:badge></td><td class="px-4 py-3 text-zinc-500">{{ $item->projects_count }}</td><td class="px-4 py-3 text-zinc-500">{{ $item->tickets_count }}</td><td class="px-4 py-3 text-right"><flux:button size="sm" wire:click="editTeam({{ $item->id }})" variant="ghost">Edit</flux:button><flux:button size="sm" wire:click="deleteTeam({{ $item->id }})" variant="danger">Delete</flux:button></td></tr>@empty<tr><td colspan="6" class="px-4 py-10 text-center text-zinc-500">No teams yet.</td></tr>@endforelse</tbody></table></div>
|
||||
@@ -1,3 +1,22 @@
|
||||
<x-layouts.app :title="__('Helpdesk')">
|
||||
<livewire:helpdesk.ticket-index />
|
||||
<div class="space-y-6">
|
||||
<div class="overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-700 dark:bg-zinc-900">
|
||||
<div class="bg-gradient-to-br from-slate-950 via-slate-900 to-blue-950 px-6 py-7 text-white">
|
||||
<div class="flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-[0.28em] text-blue-200">Support operations</p>
|
||||
<h1 class="mt-2 text-3xl font-semibold tracking-tight">Helpdesk</h1>
|
||||
<p class="mt-2 max-w-3xl text-sm text-blue-100/90">Manage tickets, priorities, statuses, categories, company teams and company projects from one professional workspace.</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<flux:button :href="route('helpdesk.tickets.create')" wire:navigate variant="primary" icon="plus">New ticket</flux:button>
|
||||
<flux:button :href="route('helpdesk.settings')" wire:navigate variant="ghost" icon="cog-6-tooth">Settings</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<livewire:helpdesk.ticket-index />
|
||||
</div>
|
||||
</x-layouts.app>
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
<div class="space-y-6" dusk="helpdesk-settings-manager">
|
||||
<div class="overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-700 dark:bg-zinc-900">
|
||||
<div class="bg-gradient-to-br from-slate-950 via-slate-900 to-blue-950 px-6 py-7 text-white">
|
||||
<div class="flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-[0.28em] text-blue-200">Helpdesk administration</p>
|
||||
<h1 class="mt-2 text-3xl font-semibold tracking-tight">Support configuration</h1>
|
||||
<p class="mt-2 max-w-3xl text-sm text-blue-100/90">Manage the lookup data used by tickets, including statuses, priorities, categories, company teams and company projects.</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<flux:button :href="route('helpdesk.index')" wire:navigate variant="ghost" icon="arrow-left">Helpdesk</flux:button>
|
||||
<flux:button :href="route('helpdesk.tickets.index')" wire:navigate variant="primary" icon="ticket">Tickets</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (session('success'))
|
||||
<flux:callout variant="success" icon="check-circle">{{ session('success') }}</flux:callout>
|
||||
@endif
|
||||
|
||||
<div class="grid gap-3 md:grid-cols-5">
|
||||
@foreach ([
|
||||
'statuses' => ['label' => 'Statuses', 'count' => $statuses->count()],
|
||||
'priorities' => ['label' => 'Priorities', 'count' => $priorities->count()],
|
||||
'categories' => ['label' => 'Categories', 'count' => $categories->count()],
|
||||
'teams' => ['label' => 'Teams', 'count' => $teams->count()],
|
||||
'projects' => ['label' => 'Projects', 'count' => $projects->count()],
|
||||
] as $key => $item)
|
||||
<button type="button" wire:click="$set('section', '{{ $key }}')" class="rounded-2xl border px-4 py-3 text-left shadow-sm transition {{ $section === $key ? 'border-blue-500 bg-blue-50 text-blue-900 dark:border-blue-400 dark:bg-blue-950 dark:text-blue-100' : 'border-zinc-200 bg-white text-zinc-700 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-200 dark:hover:bg-zinc-800' }}">
|
||||
<div class="text-xs font-semibold uppercase tracking-wide opacity-70">{{ $item['label'] }}</div>
|
||||
<div class="mt-1 text-2xl font-semibold">{{ $item['count'] }}</div>
|
||||
</button>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@if ($section === 'statuses')
|
||||
<x-helpdesk::settings-section title="Statuses" description="Control workflow stages and mark which statuses close tickets.">
|
||||
<x-slot:form>
|
||||
<form wire:submit="saveStatus" class="grid gap-4 md:grid-cols-5">
|
||||
<flux:input wire:model="statusForm.name" label="Name" />
|
||||
<flux:input wire:model="statusForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
<flux:input wire:model="statusForm.color" label="Badge colour" />
|
||||
<flux:input wire:model="statusForm.sort_order" label="Sort" type="number" min="0" />
|
||||
<label class="flex items-end gap-2 pb-2 text-sm text-zinc-700 dark:text-zinc-200"><input type="checkbox" wire:model="statusForm.is_closed" class="rounded border-zinc-300"> Closed status</label>
|
||||
<div class="md:col-span-5 flex gap-2"><flux:button type="submit" variant="primary">Save status</flux:button><flux:button type="button" wire:click="resetStatusForm" variant="ghost">Reset</flux:button></div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
<x-helpdesk::lookup-table :items="$statuses" edit="editStatus" delete="deleteStatus" />
|
||||
</x-helpdesk::settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'priorities')
|
||||
<x-helpdesk::settings-section title="Priorities" description="Define ticket urgency levels and display order.">
|
||||
<x-slot:form>
|
||||
<form wire:submit="savePriority" class="grid gap-4 md:grid-cols-4">
|
||||
<flux:input wire:model="priorityForm.name" label="Name" />
|
||||
<flux:input wire:model="priorityForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
<flux:input wire:model="priorityForm.color" label="Badge colour" />
|
||||
<flux:input wire:model="priorityForm.sort_order" label="Sort" type="number" min="0" />
|
||||
<div class="md:col-span-4 flex gap-2"><flux:button type="submit" variant="primary">Save priority</flux:button><flux:button type="button" wire:click="resetPriorityForm" variant="ghost">Reset</flux:button></div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
<x-helpdesk::lookup-table :items="$priorities" edit="editPriority" delete="deletePriority" />
|
||||
</x-helpdesk::settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'categories')
|
||||
<x-helpdesk::settings-section title="Categories" description="Group tickets by support area, optionally per company.">
|
||||
<x-slot:form>
|
||||
<form wire:submit="saveCategory" class="grid gap-4 md:grid-cols-4">
|
||||
<flux:select wire:model="categoryForm.company_id" label="Company"><option value="">Global</option>@foreach ($companies as $company)<option value="{{ $company->id }}">{{ $company->name }}</option>@endforeach</flux:select>
|
||||
<flux:input wire:model="categoryForm.name" label="Name" />
|
||||
<flux:input wire:model="categoryForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
<flux:input wire:model="categoryForm.color" label="Badge colour" />
|
||||
<div class="md:col-span-4"><flux:textarea wire:model="categoryForm.description" label="Description" rows="3" /></div>
|
||||
<div class="md:col-span-4 flex gap-2"><flux:button type="submit" variant="primary">Save category</flux:button><flux:button type="button" wire:click="resetCategoryForm" variant="ghost">Reset</flux:button></div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
<x-helpdesk::lookup-table :items="$categories" edit="editCategory" delete="deleteCategory" />
|
||||
</x-helpdesk::settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'teams')
|
||||
<x-helpdesk::settings-section title="Teams" description="Create support teams under each company and assign projects to them.">
|
||||
<x-slot:form>
|
||||
<form wire:submit="saveTeam" class="grid gap-4 md:grid-cols-4">
|
||||
<flux:select wire:model="teamForm.company_id" label="Company"><option value="">Global</option>@foreach ($companies as $company)<option value="{{ $company->id }}">{{ $company->name }}</option>@endforeach</flux:select>
|
||||
<flux:input wire:model="teamForm.name" label="Name" />
|
||||
<flux:input wire:model="teamForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
<flux:input wire:model="teamForm.color" label="Badge colour" />
|
||||
<div class="md:col-span-4"><flux:textarea wire:model="teamForm.description" label="Description" rows="3" /></div>
|
||||
<div class="md:col-span-4 flex gap-2"><flux:button type="submit" variant="primary">Save team</flux:button><flux:button type="button" wire:click="resetTeamForm" variant="ghost">Reset</flux:button></div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
<x-helpdesk::team-table :items="$teams" />
|
||||
</x-helpdesk::settings-section>
|
||||
@endif
|
||||
|
||||
@if ($section === 'projects')
|
||||
<x-helpdesk::settings-section title="Projects" description="Create company projects and optionally assign them to support teams.">
|
||||
<x-slot:form>
|
||||
<form wire:submit="saveProject" class="grid gap-4 md:grid-cols-5">
|
||||
<flux:select wire:model="projectForm.company_id" label="Company"><option value="">Global</option>@foreach ($companies as $company)<option value="{{ $company->id }}">{{ $company->name }}</option>@endforeach</flux:select>
|
||||
<flux:select wire:model="projectForm.team_id" label="Team"><option value="">No team</option>@foreach ($teams as $team)<option value="{{ $team->id }}">{{ $team->name }}</option>@endforeach</flux:select>
|
||||
<flux:input wire:model="projectForm.title" label="Title" />
|
||||
<flux:input wire:model="projectForm.slug" label="Slug" placeholder="auto-generated" />
|
||||
<flux:input wire:model="projectForm.color" label="Badge colour" />
|
||||
<div class="md:col-span-5"><flux:textarea wire:model="projectForm.description" label="Description" rows="3" /></div>
|
||||
<div class="md:col-span-5 flex gap-2"><flux:button type="submit" variant="primary">Save project</flux:button><flux:button type="button" wire:click="resetProjectForm" variant="ghost">Reset</flux:button></div>
|
||||
</form>
|
||||
</x-slot:form>
|
||||
<x-helpdesk::project-table :items="$projects" />
|
||||
</x-helpdesk::settings-section>
|
||||
@endif
|
||||
</div>
|
||||
@@ -12,6 +12,21 @@
|
||||
</div>
|
||||
|
||||
<div class="space-y-6">
|
||||
|
||||
<flux:select wire:model="company_id" label="Company">
|
||||
<option value="">Default company</option>
|
||||
@foreach ($companies as $company)
|
||||
<option value="{{ $company->id }}">{{ $company->name }}</option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
|
||||
<flux:select wire:model="team_id" label="Team">
|
||||
<option value="">No team</option>
|
||||
@foreach ($teams as $team)
|
||||
<option value="{{ $team->id }}">{{ $team->name }}</option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
|
||||
<flux:select wire:model="priority_id" label="Priority" required>
|
||||
<option value="">Select priority</option>
|
||||
@foreach ($priorities as $priority)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</td>
|
||||
<td class="px-4 py-3">
|
||||
<div class="font-medium text-zinc-900 dark:text-zinc-100">{{ $ticket->subject }}</div>
|
||||
<div class="text-xs text-zinc-500">{{ $ticket->category?->name ?? 'No category' }}</div>
|
||||
<div class="text-xs text-zinc-500">{{ $ticket->category?->name ?? 'No category' }} @if($ticket->project) · {{ $ticket->project->title }} @endif @if($ticket->team) · {{ $ticket->team->name }} @endif</div>
|
||||
</td>
|
||||
<td class="px-4 py-3"><flux:badge color="{{ $ticket->status->color }}">{{ $ticket->status->name }}</flux:badge></td>
|
||||
<td class="px-4 py-3"><flux:badge color="{{ $ticket->priority->color }}">{{ $ticket->priority->name }}</flux:badge></td>
|
||||
|
||||
@@ -4,12 +4,15 @@ declare(strict_types=1);
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\Helpdesk\Http\Controllers\HelpdeskController;
|
||||
use Modules\Helpdesk\Livewire\SettingsManager;
|
||||
use Modules\Helpdesk\Livewire\TicketCreate;
|
||||
use Modules\Helpdesk\Livewire\TicketIndex;
|
||||
use Modules\Helpdesk\Livewire\TicketShow;
|
||||
|
||||
Route::get('/', HelpdeskController::class)->name('index');
|
||||
|
||||
Route::get('/settings', SettingsManager::class)->name('settings');
|
||||
|
||||
Route::get('/tickets', TicketIndex::class)->name('tickets.index');
|
||||
Route::get('/tickets/create', TicketCreate::class)->name('tickets.create');
|
||||
Route::get('/tickets/{ticket}', TicketShow::class)->name('tickets.show');
|
||||
|
||||
@@ -35,12 +35,14 @@ final class TicketService
|
||||
/** @var Ticket $ticket */
|
||||
$ticket = Ticket::query()->create([
|
||||
'reference' => $this->references->next(),
|
||||
'company_id' => $data['company_id'] ?? ($user->company_id ?? null),
|
||||
'user_id' => $user->id,
|
||||
'agent_id' => $this->assignment->selectAgentId($data['category_id'] ?? null),
|
||||
'status_id' => $status->id,
|
||||
'priority_id' => $data['priority_id'],
|
||||
'category_id' => $data['category_id'] ?? null,
|
||||
'project_id' => $data['project_id'] ?? null,
|
||||
'team_id' => $data['team_id'] ?? null,
|
||||
'subject' => $data['subject'],
|
||||
'body' => $data['body'],
|
||||
'due_at' => $data['due_at'] ?? null,
|
||||
@@ -49,7 +51,7 @@ final class TicketService
|
||||
|
||||
$this->attachments->storeMany($ticket, $files, (int) $user->id);
|
||||
|
||||
return $ticket->fresh(['owner', 'agent', 'status', 'priority', 'category', 'project', 'attachments']) ?? $ticket;
|
||||
return $ticket->fresh(['owner', 'agent', 'status', 'priority', 'category', 'project', 'team', 'attachments']) ?? $ticket;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -68,6 +70,7 @@ final class TicketService
|
||||
return DB::transaction(function () use ($ticket, $user, $body, $internal, $files): Comment {
|
||||
/** @var Comment $comment */
|
||||
$comment = $ticket->comments()->create([
|
||||
'company_id' => $data['company_id'] ?? ($user->company_id ?? null),
|
||||
'user_id' => $user->id,
|
||||
'body' => $body,
|
||||
'is_internal' => $internal,
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Helpdesk\View\Components;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
final class LookupTable extends Component
|
||||
{
|
||||
public function __construct(
|
||||
public readonly mixed $items,
|
||||
public readonly string $edit,
|
||||
public readonly string $delete,
|
||||
) {
|
||||
}
|
||||
|
||||
/** @return View */
|
||||
public function render(): View
|
||||
{
|
||||
return view('helpdesk::components.lookup-table');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Helpdesk\View\Components;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
final class ProjectTable extends Component
|
||||
{
|
||||
public function __construct(public readonly mixed $items) {}
|
||||
public function render(): View { return view('helpdesk::components.project-table'); }
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Helpdesk\View\Components;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
final class SettingsSection extends Component
|
||||
{
|
||||
public function __construct(
|
||||
public readonly string $title,
|
||||
public readonly string $description,
|
||||
) {
|
||||
}
|
||||
|
||||
/** @return View */
|
||||
public function render(): View
|
||||
{
|
||||
return view('helpdesk::components.settings-section');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Helpdesk\View\Components;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
final class TeamTable extends Component
|
||||
{
|
||||
public function __construct(public readonly mixed $items) {}
|
||||
public function render(): View { return view('helpdesk::components.team-table'); }
|
||||
}
|
||||
@@ -6,4 +6,6 @@ versions:
|
||||
"1.0.1":
|
||||
changed:
|
||||
- Added Vite Support and removed webpack
|
||||
|
||||
"1.0.2":
|
||||
changed:
|
||||
- Added Trasm support and crud entries
|
||||
|
||||
Reference in New Issue
Block a user