feat(client): LT Wahl admin, Teamer admin, Verantwortlichen self-registration
New screens (client/app/lib/screens/): - wahl_admin_screen.dart — per KC: list/create Wahlen; per Wahl: add workshops, run the assignment (POST /wahl/:id/zuteilung/run), view the result table. - teamer_admin_screen.dart — per Gemeinde: list/create local Teamer accounts, create group-link or per-email invites (shows the token). - verantwortliche_register_screen.dart — enter a KC invite code (GET /onboarding/kc/:code), pick a Gemeinde, submit (POST /onboarding/verantwortliche); shown on the home screen to a logged-in Authentik user who has no membership yet. - ui.dart — shared toast / ErrorText / SectionHeader / promptText. KcDetailScreen now links to Wahl admin and each Gemeinde row opens Teamer admin. Backend: widen the wahl + files LT routes to AuthGuard(['authentik','team']) for consistency with the other LT controllers. Rebrand web/index.html + manifest from "kc_app" to "KC-App". Verified against local Postgres with an isLeitungsteam team token: create KC/Gemeinde/Wahl/Workshop, run Zuteilung, create Teamer + invite, resolve an invite code. flutter analyze/test/build web green; backend npm test 56. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import '../main.dart';
|
||||
import 'admin_screen.dart';
|
||||
import 'chat_screen.dart';
|
||||
import 'files_screen.dart';
|
||||
import 'verantwortliche_register_screen.dart';
|
||||
import 'wahl_screen.dart';
|
||||
|
||||
class HomeScreen extends StatelessWidget {
|
||||
@@ -16,6 +17,10 @@ class HomeScreen extends StatelessWidget {
|
||||
final id = state.identity!;
|
||||
final kcId = id.kcId;
|
||||
|
||||
final needsVerantwRegistration = id.kind == SessionKind.user &&
|
||||
!id.isLeitungsteam &&
|
||||
id.memberships.isEmpty;
|
||||
|
||||
final tiles = <Widget>[
|
||||
if (id.isLeitungsteam)
|
||||
_NavTile(
|
||||
@@ -24,6 +29,13 @@ class HomeScreen extends StatelessWidget {
|
||||
subtitle: 'KCs, Gemeinden, Onboarding-Freigaben',
|
||||
onTap: () => _open(context, const AdminScreen()),
|
||||
),
|
||||
if (needsVerantwRegistration)
|
||||
_NavTile(
|
||||
icon: Icons.how_to_reg,
|
||||
title: 'Als Verantwortliche/r registrieren',
|
||||
subtitle: 'KC-Code eingeben, Gemeinde wählen, Freigabe abwarten',
|
||||
onTap: () => _open(context, const VerantwortlicheRegisterScreen()),
|
||||
),
|
||||
if (id.kind == SessionKind.guest)
|
||||
_NavTile(
|
||||
icon: Icons.how_to_vote,
|
||||
|
||||
Reference in New Issue
Block a user