diff --git a/Modules/Helpdesk/Docs/GIT_WEBHOOK_TRACKING.md b/Modules/Helpdesk/Docs/GIT_WEBHOOK_TRACKING.md deleted file mode 100644 index 7e306245..00000000 --- a/Modules/Helpdesk/Docs/GIT_WEBHOOK_TRACKING.md +++ /dev/null @@ -1,122 +0,0 @@ -# Helpdesk Git Webhook Tracking - -The Helpdesk module can ingest signed Git push webhooks and automatically link commits to tickets when commit messages, branch names, or commit URLs contain a ticket reference such as `HD-2026-00012`. - -## 1. Register the repository - -Open the Helpdesk settings page: - -```text -/helpdesk/settings -``` - -In the **Git** section, create a repository with: - -| Field | Value | -| --- | --- | -| Provider | `github`, `gitlab`, or `git` | -| Remote URL | Your repository remote URL | -| Default branch | Usually `develop` or `main` | -| Webhook secret | A strong random secret, for example `openssl rand -hex 32` | - -After saving, the repository table shows the webhook endpoint: - -```text -/api/helpdesk/git/webhook/{repository_id} -``` - -## 2. Ticket reference convention - -Use the Helpdesk ticket reference in branch names and commit messages: - -```bash -git checkout -b feature/HD-2026-00012-canned-responses -git commit -m "HD-2026-00012 Add canned response macro rendering" -``` - -The parser recognises this format: - -```text -HD-YYYY-00000 -``` - -The first matching reference is linked to the stored commit when the ticket exists and matches the repository company/project scope. - -## 3. GitHub setup - -In GitHub, open the repository settings and add a webhook: - -| GitHub field | Value | -| --- | --- | -| Payload URL | `https://your-app.test/api/helpdesk/git/webhook/{repository_id}` | -| Content type | `application/json` | -| Secret | Same value stored in Helpdesk | -| Events | Push events | - -The module validates `X-Hub-Signature-256` using HMAC SHA-256 and rejects unsigned or invalid requests. - -## 4. GitLab setup - -In GitLab, open **Settings > Webhooks** and add: - -| GitLab field | Value | -| --- | --- | -| URL | `https://your-app.test/api/helpdesk/git/webhook/{repository_id}` | -| Secret token | Same value stored in Helpdesk | -| Trigger | Push events | - -The module validates `X-Gitlab-Token` and rejects invalid requests. - -## 5. Generic Git provider setup - -For a simple internal provider, send a JSON push payload to the same endpoint with: - -```http -X-Helpdesk-Token: your-secret -X-Helpdesk-Event: push -``` - -The payload should include: - -```json -{ - "ref": "refs/heads/develop", - "commits": [ - { - "id": "full-commit-hash", - "message": "HD-2026-00012 Fix ticket workflow", - "url": "https://example.test/commit/full-commit-hash", - "timestamp": "2026-06-15T10:00:00+00:00", - "author": { - "name": "Support Agent", - "email": "agent@example.com" - } - } - ] -} -``` - -## 6. Audit trail - -Every accepted, ignored, or rejected webhook delivery is recorded in: - -```text -helpdesk_git_webhook_logs -``` - -Stored data includes provider, event, delivery id, status, message, commit count, linked count, ignored count, payload, and received timestamp. - -## 7. Verification commands - -Run the focused feature test after installing the updated module: - -```bash -php artisan test Modules/Helpdesk/Tests/Feature/GitWebhookIngestionTest.php -``` - -Then run the full Helpdesk test set: - -```bash -php artisan test Modules/Helpdesk/Tests/Feature Modules/Helpdesk/Tests/Unit -php artisan dusk Modules/Helpdesk/Tests/Browser -``` diff --git a/Modules/Helpdesk/Docs/INSTALL.md b/Modules/Helpdesk/Docs/INSTALL.md deleted file mode 100644 index c799944e..00000000 --- a/Modules/Helpdesk/Docs/INSTALL.md +++ /dev/null @@ -1,99 +0,0 @@ -# Helpdesk Module Install - -## 1. Copy the module - -Copy `Modules/Helpdesk` into your Laravel 13 project. - -## 2. Register the provider - -If your module loader reads `module.json`, no manual provider entry is needed. Otherwise add this provider to `bootstrap/providers.php`: - -```php -Modules\Helpdesk\Providers\HelpdeskServiceProvider::class, -``` - -## 3. Add the helpdesk disk - -Add this to `config/filesystems.php` disks: - -```php -'helpdesk' => [ - 'driver' => 'local', - 'root' => storage_path('app/public/helpdesk'), - 'url' => env('APP_URL') . '/storage/helpdesk', - 'visibility' => 'public', -], -``` - -Then run: - -```bash -php artisan storage:link -``` - -## 4. Add relations to `App\Models\User` - -```php -use Modules\Helpdesk\Concerns\HasHelpdeskTickets; - -class User extends Authenticatable -{ - use HasHelpdeskTickets; -} -``` - -Add casts if you want strict booleans: - -```php -protected function casts(): array -{ - return [ - 'email_verified_at' => 'datetime', - 'password' => 'hashed', - 'helpdesk_agent' => 'boolean', - 'helpdesk_admin' => 'boolean', - ]; -} -``` - -## 5. Run migrations and seeders - -```bash -php artisan migrate -php artisan db:seed --class="Modules\\Helpdesk\\database\\seeders\\HelpdeskDatabaseSeeder" -``` - -## 6. Add dashboard widget - -Place this where you want it on your dashboard: - -```blade -@include('helpdesk::dashboard.card') -``` - -or directly: - -```blade - -``` - -## 7. Navigation link - -```blade - - Helpdesk - -``` - -## 8. Tests - -```bash -php artisan test Modules/Helpdesk/tests/Feature -php artisan dusk Modules/Helpdesk/tests/Browser -``` -## 9. Git webhook tracking - -The module supports signed Git push webhooks for repository commit tracking. Register repositories in `/helpdesk/settings`, copy the generated webhook endpoint from the Git table, and configure GitHub/GitLab push webhooks with the same secret stored on the repository. - -See `Docs/GIT_WEBHOOK_TRACKING.md` for provider-specific setup, ticket reference conventions, and verification commands. - diff --git a/Modules/Helpdesk/Docs/POST_INSTALL_DEFAULTS_AND_TAGS.md b/Modules/Helpdesk/Docs/POST_INSTALL_DEFAULTS_AND_TAGS.md deleted file mode 100644 index c64b104c..00000000 --- a/Modules/Helpdesk/Docs/POST_INSTALL_DEFAULTS_AND_TAGS.md +++ /dev/null @@ -1,17 +0,0 @@ -# Helpdesk defaults and tags update - -After copying this module update into the application, run: - -```bash -php artisan migrate -php artisan optimize:clear -php artisan view:clear -php artisan livewire:discover -php artisan octane:reload -``` - -If Octane is not running, skip `octane:reload`. - -The Helpdesk settings page now includes a Defaults tab for the default company. Statuses, priorities, categories, teams and projects have an `is_default` flag. Ticket creation reads those defaults in `TicketCreate::mount()` and `TicketService` reads the default status before falling back to the configured `new` status slug. - -Tickets support tags on create/edit through `tag_ids`, synced to `helpdesk_ticket_tag`. diff --git a/Modules/Helpdesk/Docs/WMS_SUPPORT_MENU_PATCH.md b/Modules/Helpdesk/Docs/WMS_SUPPORT_MENU_PATCH.md deleted file mode 100644 index 4c26b9c4..00000000 --- a/Modules/Helpdesk/Docs/WMS_SUPPORT_MENU_PATCH.md +++ /dev/null @@ -1,16 +0,0 @@ -# WMS Support Menu Patch - -Add this block to the main application sidebar inside `