Commit Graph

18 Commits

Author SHA1 Message Date
4c9bc668c7 feat: Add password reset endpoints for super-admins
- POST /api/admin/users/:userId/reset-password
- POST /api/admin/reset-password-by-email
2026-03-16 18:39:12 +00:00
d4e282ec00 feat: Allow Chef/Disponent to update any assignment status
- New endpoint PUT /orders/:id/assignment/:userId
- Can set status to confirmed/declined/pending
- For managing fixed employees and handling dropouts
2026-03-13 14:56:40 +00:00
e2dfbaeffb feat: Add module visibility API endpoints
- GET /modules/visibility - get visibility settings
- PUT /modules/visibility - update visibility per role
- Chef can configure which modules are visible to disponent/mitarbeiter/subunternehmer
2026-03-13 10:44:16 +00:00
4fda22ecf0 feat: Add free/exempt subscription status for organizations
- Add 'free' subscription status (exempt from fees)
- POST /admin/organizations/:id/set-free - Set org as free
- POST /admin/organizations/:id/remove-free - Remove free status
- Free orgs get enterprise plan, no expiry
2026-03-13 06:01:29 +00:00
40adeb15ee feat: Add subscription management system
- Add subscription fields to organizations (status, plan, trial_ends_at, etc.)
- Add subscription middleware for access control
- Add /auth/me returns subscription info
- Add admin endpoints for subscription management:
  - GET/PUT /admin/organizations/:id/subscription
  - POST /admin/organizations/:id/pause
  - POST /admin/organizations/:id/activate
  - POST /admin/organizations/:id/extend-trial
  - GET /admin/subscriptions (with filters)
- New orgs get 14-day trial automatically
2026-03-13 05:58:00 +00:00
6e421efef1 fix: Add --allow-write permission for file uploads 2026-03-13 05:10:58 +00:00
2b5910cc75 feat: Add organization logo upload
- Add uploads router with logo upload/delete/serve endpoints
- Add logo_url column migration for organizations table
- Update /organizations/current to include logo_url
- Max 5MB, supports JPG/PNG/WebP/SVG
2026-03-13 05:08:57 +00:00
3ad71d3afc feat: Add all 8 remaining modules
Backend routes for:
- Shifts (Schichtplanung)
- Patrols (Wächterkontrolle)
- Incidents (Vorfallberichte)
- Vehicles (Fahrzeuge)
- Documents (Dokumente)
- Customers (CRM)
- Billing (Abrechnung)
- Objects (enhanced)

Database migration 004_all_modules.sql with all tables
2026-03-12 21:09:21 +00:00
c0c129ea37 fix: Global BigInt conversion in postgres module
- Added convertBigInt helper in db/postgres.ts
- Converts all BigInt values to Number in query results
- Simplified admin.ts routes (removed workarounds)
- All APIs now work correctly
2026-03-12 20:22:13 +00:00
bca4e18f8d fix: BigInt serialization in admin routes
- Add jsonResponse helper for BigInt conversion
- Cast all COUNT() and ID fields to text in SQL
- Convert back to Number() in response
- Fix partnerships response format
2026-03-12 20:19:54 +00:00
fb21b18959 feat: Add partnerships API routes
- Partnership management (invite, accept, decline, status)
- Rate management (hourly rates per partnership)
- Shared orders (share orders with subcontractors)
- Partnership timesheets (link timesheets to shared orders)
- Invoice generation and management
- Organization search for invitations
2026-03-12 20:02:11 +00:00
52709fb436 Add Objects API routes 2026-03-12 19:53:35 +00:00
3ebf2dd461 Add Qualifications API routes 2026-03-12 19:47:14 +00:00
b5aa228183 🤝 Subunternehmer-API: Partnerschaften, Aufträge, Stundenzettel, Abrechnung 2026-03-12 16:17:12 +00:00
0be17882d5 🔧 Fix: bcrypt statt argon2 (kompatibel) 2026-03-12 16:09:34 +00:00
256b8e20a5 🏢 Multi-Tenant SaaS: Org-Registrierung + Super-Admin Panel 2026-03-12 16:08:02 +00:00
ee19e45171 🚀 Backend komplett implementiert
Features:
- Auth mit JWT + Argon2 (Login, Register, Refresh)
- Rollen-System (Chef/Disponent/Mitarbeiter)
- User Management mit Berechtigungen
- Aufträge mit Zuweisungen
- Verfügbarkeitsplanung
- Stundenzettel mit Foto-Upload Support
- Modulares System mit Config
- Entwickler-Panel Endpoints

Tech:
- Deno + Oak
- PostgreSQL
- CORS enabled
2026-02-20 15:12:06 +00:00
a07c2ad858 Initial commit 2026-02-20 15:07:47 +00:00