Creating admin interface
This commit is contained in:
@@ -216,10 +216,67 @@ The API sends real-time updates via WebSocket for:
|
||||
- **Username:** `admin`
|
||||
- **Password:** `admin123`
|
||||
|
||||
## Journal System
|
||||
|
||||
All PPR changes are automatically logged in a journal system for audit trail purposes.
|
||||
|
||||
### Get PPR Journal Entries
|
||||
|
||||
**Endpoint:** `GET /api/v1/pprs/{ppr_id}/journal`
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"ppr_id": 3,
|
||||
"entry": "PPR created for G-ADMIN",
|
||||
"user": "admin",
|
||||
"ip": "172.23.0.1",
|
||||
"entry_dt": "2025-10-21T20:01:01"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"ppr_id": 3,
|
||||
"entry": "captain changed from 'Test Admin' to 'Updated Admin User'",
|
||||
"user": "admin",
|
||||
"ip": "172.23.0.1",
|
||||
"entry_dt": "2025-10-21T20:01:17"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Automatic Journal Logging
|
||||
|
||||
The system automatically logs:
|
||||
- PPR creation
|
||||
- All field changes with old and new values
|
||||
- Status changes
|
||||
- User and IP address for each change
|
||||
|
||||
## Web Interfaces
|
||||
|
||||
### Public Arrivals/Departures Board
|
||||
- **URL:** http://localhost:8082
|
||||
- **Features:** Real-time arrivals and departures display
|
||||
- **Authentication:** None required
|
||||
|
||||
### Admin Interface
|
||||
- **URL:** http://localhost:8082/admin.html
|
||||
- **Features:**
|
||||
- Complete PPR management (CRUD operations)
|
||||
- Advanced filtering by status, date range
|
||||
- Inline editing with modal interface
|
||||
- Journal/audit trail viewing
|
||||
- Quick status updates (Confirm, Land, Depart, Cancel)
|
||||
- New PPR entry creation
|
||||
- **Authentication:** Username/password prompt (uses API token)
|
||||
|
||||
## Development URLs
|
||||
|
||||
- API Base: http://localhost:8001/api/v1
|
||||
- Public Web Interface: http://localhost:8082
|
||||
- Admin Interface: http://localhost:8082/admin.html
|
||||
- API Documentation: http://localhost:8001/docs
|
||||
- Database: localhost:3307 (MySQL)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user