feat: erweiterte Chat-Funktionalität, UI-Verbesserungen und Lokalisierungsupdates

- Chat: Nachrichten-Status (read/unread), WebSocket-Verbesserungen
- App: Login-Optimierung, Job-Übersicht verbessert, neue Übersetzungen
- Backend: Dialog-Styling, Invoice-Generator, Job-Verwaltung erweitert
- Mehrsprachigkeit: Neue Übersetzungen für DE, EN, ES, ET, FR, LT, LV, PL, RU, TR
This commit is contained in:
2026-04-04 10:30:36 +02:00
parent d6132fabe1
commit bba5733783
55 changed files with 2708 additions and 697 deletions

View File

@@ -2,6 +2,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'l10n/app_localizations.dart';
import 'l10n/localization_helpers.dart';
import 'models/chat.dart';
import 'services/chat_service.dart';
import 'widgets/offline_banner.dart';
@@ -56,10 +57,7 @@ class _ChatsViewState extends State<ChatsView> {
backgroundColor: Colors.deepPurple[100],
),
body: Column(
children: [
const OfflineBanner(),
Expanded(child: _buildBody()),
],
children: [const OfflineBanner(), Expanded(child: _buildBody())],
),
);
}
@@ -70,15 +68,15 @@ class _ChatsViewState extends State<ChatsView> {
}
if (_chats.isEmpty) {
return const Center(
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.chat_outlined, size: 64, color: Colors.grey),
SizedBox(height: 16),
const Icon(Icons.chat_outlined, size: 64, color: Colors.grey),
const SizedBox(height: 16),
Text(
'Keine Chats verfügbar',
style: TextStyle(fontSize: 16, color: Colors.grey),
AppLocalizations.of(context).noChatsAvailable,
style: const TextStyle(fontSize: 16, color: Colors.grey),
),
],
),
@@ -98,7 +96,9 @@ class _ChatsViewState extends State<ChatsView> {
final isJobChat = chat.type == ChatType.jobSpecific;
final hasMessages = chat.messages.isNotEmpty;
final previewText =
hasMessages ? chat.lastMessagePreview : 'Noch keine Nachrichten';
hasMessages
? chat.lastMessagePreview
: AppLocalizations.of(context).noMessagesYet;
final timeLabel = hasMessages ? _formatTime(chat.lastMessageTime) : '--';
final jobId = chat.jobId?.trim();
final jobNumber = chat.jobNumber?.trim();
@@ -123,9 +123,7 @@ class _ChatsViewState extends State<ChatsView> {
return 'Job $jobId';
}
}
return chat.type == ChatType.general
? 'Allgemeine Nachrichten'
: chat.title;
return localizedChatTitle(context, chat);
}(), style: const TextStyle(fontWeight: FontWeight.w600, fontSize: 16)),
subtitle: Text(
previewText,