feat: add weekly schedule shifts and bulk departures
Build and Push Docker Images / detect-changes (push) Successful in 11s
Build and Push Docker Images / build-auth-api (push) Successful in 1m1s
Build and Push Docker Images / build-employee-api (push) Successful in 59s
Build and Push Docker Images / build-transit-api (push) Successful in 56s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m11s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m37s
Build and Push Docker Images / deploy-test-node (push) Successful in 5s
Build and Push Docker Images / detect-changes (push) Successful in 11s
Build and Push Docker Images / build-auth-api (push) Successful in 1m1s
Build and Push Docker Images / build-employee-api (push) Successful in 59s
Build and Push Docker Images / build-transit-api (push) Successful in 56s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m11s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m37s
Build and Push Docker Images / deploy-test-node (push) Successful in 5s
This commit is contained in:
+25
-4
@@ -1,3 +1,18 @@
|
||||
## Weekly schedules and shifts
|
||||
|
||||
The schedule manager uses the weekly template model. Administrators create a
|
||||
departure for a bus line in one of three categories: weekdays, Saturday, or
|
||||
Sunday. The UI creates the corresponding `day_of_week` rows and assigns drivers
|
||||
through `transit.shifts`, rather than storing a driver on `transit.schedules`.
|
||||
|
||||
The active UI uses these transit API endpoints:
|
||||
|
||||
- `GET /admin/weekly-schedules`
|
||||
- `GET /admin/shift-drivers`
|
||||
- `POST /admin/weekly-schedules`
|
||||
- `PUT /admin/weekly-schedules/:scheduleId/shift`
|
||||
- `DELETE /admin/weekly-schedules/:scheduleId`
|
||||
|
||||
# Transit Admin Control Center
|
||||
|
||||
Modern React + Vite web application for comprehensive transit system administration.
|
||||
@@ -15,6 +30,7 @@ Modern React + Vite web application for comprehensive transit system administrat
|
||||
## Local Development
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Node.js 18+
|
||||
- npm or yarn
|
||||
|
||||
@@ -86,9 +102,9 @@ http://localhost:5174
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `VITE_AUTH_API` | Auth API URL (same-origin path recommended in Docker) | http://localhost:5000 |
|
||||
| Variable | Description | Default |
|
||||
| ------------------ | -------------------------------------------------------- | --------------------- |
|
||||
| `VITE_AUTH_API` | Auth API URL (same-origin path recommended in Docker) | http://localhost:5000 |
|
||||
| `VITE_TRANSIT_API` | Transit API URL (same-origin path recommended in Docker) | http://localhost:5001 |
|
||||
|
||||
### Runtime Configuration
|
||||
@@ -98,6 +114,7 @@ When running in Docker, environment variables are injected at runtime via `docke
|
||||
## Architecture
|
||||
|
||||
### Technology Stack
|
||||
|
||||
- **Frontend**: React 18.2 + Vite 5.0
|
||||
- **HTTP Client**: Axios 1.4
|
||||
- **Server**: Nginx (Alpine Linux)
|
||||
@@ -116,6 +133,7 @@ When running in Docker, environment variables are injected at runtime via `docke
|
||||
### API Integration
|
||||
|
||||
The app communicates with:
|
||||
|
||||
- **Auth API** (/login, /me)
|
||||
- **Transit API** (/admin/stops, /admin/bus-lines, /admin/fleet/buses)
|
||||
- **Error Log API** (/error_log)
|
||||
@@ -148,16 +166,19 @@ Users must have a `userCode` in their JWT and, for admin access, the `isAdmin` f
|
||||
## Troubleshooting
|
||||
|
||||
### Issue: "Admin UI not loading"
|
||||
|
||||
- Verify container is running: `docker ps`
|
||||
- Check logs: `docker-compose logs admin_ui`
|
||||
- Clear browser cache (Ctrl+Shift+R)
|
||||
|
||||
### Issue: "API connection refused"
|
||||
|
||||
- Ensure auth_api and transit_api are running
|
||||
- Check environment variables are set correctly
|
||||
- Verify network connectivity between containers
|
||||
|
||||
### Issue: "Permission denied" on admin operations
|
||||
|
||||
- Verify JWT token includes valid `userCode`
|
||||
- Check `ADMIN_USER_CODES` environment variable
|
||||
- Ensure database user has appropriate permissions
|
||||
@@ -180,6 +201,7 @@ See [DEPLOYMENT.md](../DEPLOYMENT.md) for comprehensive deployment guide.
|
||||
## Support
|
||||
|
||||
For issues or questions:
|
||||
|
||||
1. Check service logs: `docker-compose logs admin_ui`
|
||||
2. Verify API connectivity: Visit API URLs directly
|
||||
3. Check browser console for client-side errors
|
||||
@@ -188,4 +210,3 @@ For issues or questions:
|
||||
## License
|
||||
|
||||
Part of the XTransit project
|
||||
|
||||
|
||||
Reference in New Issue
Block a user