Skip to content

[CRITICAL] Architektur: Tenant-Create ohne Defaults + include_in_average + shift_excused_as_present #215

Description

@Lionhunt3r

Cluster: Architektur — Tenant-Create + Statistik-Bug

Findings

B1-015: Tenant-Create umgeht Repository (KRITISCH)

  • Flutter _createTenant() nutzt supabase.from('tenants').insert(...) direkt im UI-Code
  • Ionic ruft db.createInstance(tenant, mainGroupName) (zentraler getester Service)
  • Fehlende Defaults: withExcuses=true, betaProgram=true, showHolidays=false, maintainTeachers=false, timezone=Intl.DateTimeFormat().resolvedOptions().timeZone
  • DST-Bugs ohne Timezone möglich
  • Effort: 4h
  • Datei: lib/features/tenant_selection/presentation/pages/tenant_create_page.dart:425-501

B6-011: include_in_average ignoriert in Statistics (KRITISCH BUG)

  • Ionic filtert für Average-Berechnung nur AttendanceTypes mit include_in_average=true (z.B. Konzerte ausgenommen)
  • Flutter berechnet Average über ALLE Anwesenheiten → verfälscht Ergebnis
  • Effort: 1h
  • Datei: lib/core/providers/statistics_providers.dart:194-215

B8-022: tenant.shift_excused_as_present Feld fehlt komplett im Tenant-Model

  • Neue SQL-Migration add_shift_excused_as_present.sql (BOOLEAN DEFAULT false)
  • Ionic nutzt es in 6+ Pages (att-list, parents, list, stats) für Utils.getPercentage
  • Flutter tenant.dart hat das Feld gar nicht → Statistik-Berechnungen ignorieren User-Setting komplett
  • Effort: 4h

Sprint

Sprint 9 (Statistics + Export Bug-Fixes) sowie Sprint 0 (Tenant-Create) — Gesamt-Effort ~9h.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmigration-backlogItem from Ionic→Flutter migration backlogpriority: criticalCritical priority - fix immediately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions