refactor: Code cleanup and documentation updates
Bug fixes: - Fix ticket ID extraction using URLSearchParams instead of split() - Add error handling for query result in get_users.php - Make Discord webhook URLs dynamic (use HTTP_HOST) Code cleanup: - Remove debug console.log statements from dashboard.js and ticket.js - Add getTicketIdFromUrl() helper function to both JS files Documentation: - Update Claude.md: fix web server (nginx not Apache), add new notes - Update README.md: add keyboard shortcuts, update setup instructions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
21
README.md
21
README.md
@@ -88,8 +88,18 @@ Access all admin pages via the **Admin dropdown** in the dashboard header.
|
||||
| `/admin/api-keys` | Generate and manage API keys |
|
||||
|
||||
### Notifications
|
||||
- **Discord Integration**: Webhook notifications for ticket creation
|
||||
- **Discord Integration**: Webhook notifications for ticket creation and updates
|
||||
- **Rich Embeds**: Color-coded priority indicators and ticket links
|
||||
- **Dynamic URLs**: Ticket links adapt to the server hostname
|
||||
|
||||
### Keyboard Shortcuts
|
||||
| Shortcut | Action |
|
||||
|----------|--------|
|
||||
| `Ctrl/Cmd + E` | Toggle edit mode (ticket page) |
|
||||
| `Ctrl/Cmd + S` | Save changes (ticket page) |
|
||||
| `Ctrl/Cmd + K` | Focus search box (dashboard) |
|
||||
| `ESC` | Cancel edit / close modal |
|
||||
| `?` | Show keyboard shortcuts help |
|
||||
|
||||
### Security Features
|
||||
- **CSRF Protection**: Token-based protection on all forms
|
||||
@@ -150,13 +160,20 @@ Access all admin pages via the **Admin dropdown** in the dashboard header.
|
||||
|
||||
### 1. Environment Configuration
|
||||
|
||||
Create `.env` file in project root:
|
||||
Copy the example file and edit with your values:
|
||||
```bash
|
||||
cp .env.example .env
|
||||
nano .env
|
||||
```
|
||||
|
||||
Required environment variables:
|
||||
```env
|
||||
DB_HOST=10.10.10.50
|
||||
DB_USER=tinkertickets
|
||||
DB_PASS=your_password
|
||||
DB_NAME=ticketing_system
|
||||
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
|
||||
TIMEZONE=America/New_York
|
||||
```
|
||||
|
||||
### 2. Cron Jobs
|
||||
|
||||
Reference in New Issue
Block a user