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:
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'l10n/app_localizations.dart';
|
||||
import 'l10n/localization_helpers.dart';
|
||||
import 'models/delivery_station.dart';
|
||||
import 'models/job.dart';
|
||||
import 'services/database_service.dart';
|
||||
@@ -51,6 +52,8 @@ class _CargoItemsViewState extends State<CargoItemsView> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = AppLocalizations.of(context);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(widget.job.jobNumber),
|
||||
@@ -93,7 +96,7 @@ class _CargoItemsViewState extends State<CargoItemsView> {
|
||||
Text(
|
||||
widget.job.jobNumber.isNotEmpty
|
||||
? widget.job.jobNumber
|
||||
: widget.job.title,
|
||||
: localizeKnownText(context, widget.job.title),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -164,7 +167,7 @@ class _CargoItemsViewState extends State<CargoItemsView> {
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Lieferstationen (${_deliveryStations.length})',
|
||||
l10n.deliveryStationsCount(_deliveryStations.length),
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -221,12 +224,12 @@ class _CargoItemsViewState extends State<CargoItemsView> {
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Keine Lieferstationen',
|
||||
AppLocalizations.of(context).noDeliveryStations,
|
||||
style: TextStyle(fontSize: 16, color: Colors.grey[600]),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'Dieser Job enthält aktuell keine Lieferstationen.',
|
||||
AppLocalizations.of(context).noDeliveryStationsMessage,
|
||||
style: TextStyle(fontSize: 14, color: Colors.grey[500]),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
@@ -255,6 +258,7 @@ class _CargoItemsViewState extends State<CargoItemsView> {
|
||||
station.company.isNotEmpty && station.company != title
|
||||
? station.company
|
||||
: null;
|
||||
final l10n = AppLocalizations.of(context);
|
||||
final addressLines =
|
||||
<String>[
|
||||
[
|
||||
@@ -289,7 +293,7 @@ class _CargoItemsViewState extends State<CargoItemsView> {
|
||||
stationTitle:
|
||||
station.displayName.isNotEmpty
|
||||
? station.displayName
|
||||
: 'Station ${station.stationOrder + 1}',
|
||||
: l10n.stationNumber(station.stationOrder + 1),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -313,7 +317,7 @@ class _CargoItemsViewState extends State<CargoItemsView> {
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Text(
|
||||
'Station ${station.stationOrder + 1}',
|
||||
l10n.stationNumber(station.stationOrder + 1),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -327,7 +331,9 @@ class _CargoItemsViewState extends State<CargoItemsView> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title.isNotEmpty ? title : 'Unbenannte Station',
|
||||
title.isNotEmpty
|
||||
? localizeKnownText(context, title)
|
||||
: l10n.unnamedStation,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -359,7 +365,7 @@ class _CargoItemsViewState extends State<CargoItemsView> {
|
||||
const SizedBox(height: 12),
|
||||
_buildDetailItem(
|
||||
Icons.phone_outlined,
|
||||
'Telefon',
|
||||
l10n.phone,
|
||||
station.phone,
|
||||
Colors.green,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user