chore von Jan I guess?
This commit is contained in:
1
module/sitemap
Submodule
1
module/sitemap
Submodule
Submodule module/sitemap added at 2511d8f82e
81
module/ticketcenter/CLAUDE.md
Normal file
81
module/ticketcenter/CLAUDE.md
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
This is the **Ticket Center** module — a ticket management/support system — for the AWO Hamburg intranet. It is a traditional PHP application with no build system: files are served directly.
|
||||||
|
|
||||||
|
## No Build System
|
||||||
|
|
||||||
|
There is no `package.json`, `Makefile`, or test framework. No compilation or build step is needed. CSS/JS files are served as-is with `filemtime()`-based cache busting.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
### Module Structure
|
||||||
|
|
||||||
|
This module lives inside a larger **mysyde** platform. It depends on:
|
||||||
|
- Common platform functions (e.g. `encryptId`/`decryptId`, translation registry, permission helpers)
|
||||||
|
- Shared DB connection config at `mysyde/dc.config.php` (dev) or `mysyde/dc-server.config.php` (prod)
|
||||||
|
- Environment variables via `vlucas/phpdotenv` loaded from `/config/.env` and `/vendor/autoload.php`
|
||||||
|
|
||||||
|
### Request Flow
|
||||||
|
|
||||||
|
1. URL: `/module/ticketcenter/`
|
||||||
|
2. Main controller: `views/ticketcenter/show_ticketcenter.inc.php` — handles all ticket CRUD, state transitions, file uploads, and page routing (956 lines)
|
||||||
|
3. List view: `views/ticketcenter/show_ticketcenter_listform.inc.php` — renders ticket table via Grid.js
|
||||||
|
4. Detail/edit view: `views/ticketcenter/show_ticketcenter_cardform.inc.php`
|
||||||
|
5. Create view: `views/ticketcenter/show_ticketcenter_create_cardform.inc.php`
|
||||||
|
6. JSON API: `services/ticketcenter.api.php` — POST endpoint used by Grid.js for ticket list data
|
||||||
|
7. AJAX endpoints: `views/ticketcenter/show_ticketcenter_ajax.php` (category hierarchy), `show_ticketcenter_category_desc_ajax.php`
|
||||||
|
|
||||||
|
### Admin Sub-views
|
||||||
|
|
||||||
|
- `views/category/` — hierarchical category CRUD
|
||||||
|
- `views/process/` — ticket workflow process definitions
|
||||||
|
- `views/status/` — ticket status definitions
|
||||||
|
- `views/settings/` — system settings UI
|
||||||
|
|
||||||
|
### Frontend Stack
|
||||||
|
|
||||||
|
- **Grid.js** (`js/gridjs.umd.js`) — data table with server-side pagination/filtering via the JSON API
|
||||||
|
- **Select2** — enhanced dropdowns (loaded via CDN)
|
||||||
|
- **Semantic UI** — UI components (loaded via CDN)
|
||||||
|
- **FontAwesome** — icons (CDN)
|
||||||
|
- Vanilla JS + jQuery; no bundler or transpiler
|
||||||
|
|
||||||
|
### Database Tables
|
||||||
|
|
||||||
|
| Table | Purpose |
|
||||||
|
|---|---|
|
||||||
|
| `main_tickets` | Core ticket records |
|
||||||
|
| `main_tickets_messages` | Ticket conversation/comments |
|
||||||
|
| `main_tickets_category` | Hierarchical category definitions |
|
||||||
|
| `main_tickets_status` | Status definitions |
|
||||||
|
| `main_tickets_process` | Workflow process definitions |
|
||||||
|
| `main_tickets_notification` | Notification tracking |
|
||||||
|
| `main_contact` / `main_contact_department` | User/department info |
|
||||||
|
| `main_tickets_category_{mandant,department,contact}` | Visibility/access control per category |
|
||||||
|
|
||||||
|
### Ticket Lifecycle
|
||||||
|
|
||||||
|
Tickets move through status IDs: **Draft → 2 (Open) → 3 (In Progress) → 4 (Closed)**
|
||||||
|
|
||||||
|
### List View Filters (cues)
|
||||||
|
|
||||||
|
The `cue` parameter drives 8 ticket views: created by me, assigned to me, pool, archive, all, escalated, unassigned, insurance claims.
|
||||||
|
|
||||||
|
### File Uploads
|
||||||
|
|
||||||
|
Attachments are stored at `userdata/Tickets/{ticket_id}/`.
|
||||||
|
|
||||||
|
## Language
|
||||||
|
|
||||||
|
All UI text is in **German**. Button labels, validation messages, and field names are German throughout.
|
||||||
|
|
||||||
|
## Key Conventions
|
||||||
|
|
||||||
|
- PHP templating via `include`/`require` — no MVC framework
|
||||||
|
- Both MySQLi and PDO are used in different files
|
||||||
|
- IDs are encrypted/decrypted before being exposed to the frontend (`encryptId`/`decryptId`)
|
||||||
|
- Role-based access is enforced via mandant/department/contact associations on categories
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user