added jquery and also fixed fontawsome

This commit is contained in:
Mark Gregory
2026-06-15 15:33:54 +01:00
parent 58e5f2e203
commit 0b2d7225cc
150 changed files with 8507 additions and 168 deletions
+122
View File
@@ -0,0 +1,122 @@
# 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
```
+99
View File
@@ -0,0 +1,99 @@
# 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
<livewire:helpdesk.dashboard-widget />
```
## 7. Navigation link
```blade
<flux:navlist.item icon="lifebuoy" :href="route('helpdesk.tickets.index')" :current="request()->routeIs('helpdesk.*')" wire:navigate>
Helpdesk
</flux:navlist.item>
```
## 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.
+16
View File
@@ -0,0 +1,16 @@
# WMS Support Menu Patch
Add this block to the main application sidebar inside `<nav class="wms-sidebar-nav">`, preferably after the Operations group and before Integration & Reporting.
```blade
@includeIf('helpdesk::partials.sidebar-support-menu')
```
The partial checks that the Helpdesk module is enabled through `nwidart/laravel-modules` when the Module facade exists, and also checks that the Helpdesk routes are registered before showing links.
After adding the include, run:
```bash
artisan optimize:clear
artisan octane:reload
```