kerimatilganandClaude Opus 4.7 e308c1a7b7 Add user management UI and stable UUIDs for users
Backend
- New routes/users.js (admin-only via requireAdmin) with list, create,
  update (incl. password reset) and delete endpoints.
- All user-facing API responses identify users by uuid, not the
  numeric primary key — usernames can now be renamed without breaking
  external references.
- Protection rules: cannot delete or demote the last admin; cannot
  delete or demote your own account.

Schema / data
- users table gained a uuid TEXT column (unique). Existing rows are
  backfilled with crypto.randomUUID() on startup. Setup endpoint and
  the create-user CLI both generate a UUID for new users.

Frontend
- New "Benutzer" tab in nav-tabs, marked admin-only and shown only
  after /api/auth/me reports isAdmin.
- Modal with create / edit forms (password optional on edit = leave
  unchanged). XSS-safe rendering of the user list using the existing
  escapeHtml helper and data-* attributes for action buttons.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 16:03:04 +02:00

Provisions-Tracker

Ein Tool zur Erfassung und Verwaltung von Mitarbeiter-Provisionen bei Schaltungen.

Funktionen

  • Schaltungen erfassen: Vollständige Erfassung aller relevanten Daten

    • Schaltungs-ID, Eingabe-Datum, Schaltungs-/Aktivierungsdatum
    • Kundendaten (Vorname, Nachname, optional Firma, Rufnummer)
    • Anbieter und Tarif (konfigurierbar über Admin-Bereich)
    • Hardware (15-stellige Eingabe)
    • Dokumentenupload mit Drag & Drop
  • Übersicht: Tabelle aller erfassten Schaltungen mit Filtermöglichkeiten

  • Administration:

    • Anbieter hinzufügen und verwalten
    • Tarife pro Anbieter konfigurieren

Installation

  1. Abhängigkeiten installieren:

    npm install
    
  2. Server starten:

    npm start
    

    Oder für Entwicklung mit automatischem Neustart:

    npm run dev
    
  3. Anwendung im Browser öffnen:

    http://localhost:3000
    

Technische Details

  • Backend: Node.js mit Express
  • Datenbank: SQLite (wird automatisch erstellt)
  • Frontend: Vanilla HTML/CSS/JavaScript
  • Datei-Upload: Multer mit 10MB Limit

Datenbankstruktur

  • anbieter: Telekommunikationsanbieter
  • tarife: Tarife pro Anbieter
  • schaltungen: Haupttabelle für Provisionserfassung
  • dokumente: Hochgeladene Dateien pro Schaltung

Standarddaten

Die Anwendung wird mit folgenden Testdaten initialisiert:

  • Anbieter: Telekom, Vodafone, O2, 1&1
  • Beispiel-Tarife für jeden Anbieter

Sicherheitshinweise

  • Dateien werden im uploads/ Verzeichnis gespeichert
  • Maximale Dateigröße: 10MB
  • Unterstützte Dateitypen: PDF, JPG, JPEG, PNG, DOC, DOCX
S
Description
No description provided
Readme
1.2 MiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 68.4%
HTML 31.6%