feat: Adresszusatz (Ortsteil/Etage/Hinweis) anzeigen, Land nur im Ausland
- Address.addition aus dem Backend (ERP-Freitext, praktisch Ortsteil, Etage oder Hinweis); API-Client neu generiert. - Listen (Sortieren, Beladen, Liefer-Übersicht): Adresse mit Zusatz in Klammern, z. B. „… 41472 Neuss (Holzheim)". - Lieferdetails: „Zusatz: …" unter der Anschrift von Empfänger und Besteller; Land nur außerhalb Deutschlands. - Maps-Suche weiter ohne Zusatz (sonst stört „3 Etage" die Suche). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import 'package:hl_lieferservice/domain/entity/address.dart';
|
||||
import 'package:hl_lieferservice/domain/entity/contact_source.dart';
|
||||
import 'package:hl_lieferservice/domain/entity/customer.dart';
|
||||
import 'package:hl_lieferservice/domain/entity/delivery.dart';
|
||||
@ -116,6 +117,23 @@ class _SectionHeader extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
// ─── Adresse ────────────────────────────────────────────────────────────
|
||||
|
||||
/// Zeilen unter „PLZ Ort": Land (nur Ausland) und Adresszusatz aus dem ERP
|
||||
/// (Ortsteil, Etage, Hinweis — für den Fahrer vor Ort wichtig).
|
||||
List<Widget> _addressExtras(Address address, {required double fontSize}) {
|
||||
final addition = address.addition?.trim();
|
||||
return [
|
||||
if (address.foreignCountry case final country?)
|
||||
Text(country, style: TextStyle(fontSize: fontSize)),
|
||||
if (addition != null && addition.isNotEmpty)
|
||||
Text(
|
||||
'Zusatz: $addition',
|
||||
style: TextStyle(fontSize: fontSize, fontWeight: FontWeight.w700),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
// ─── Abweichender Empfänger ─────────────────────────────────────────────
|
||||
|
||||
/// Hervorgehobene Karte, wenn Lieferadresse oder Empfänger vom Besteller
|
||||
@ -210,6 +228,7 @@ class _DifferentRecipientCard extends StatelessWidget {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
..._addressExtras(address, fontSize: 15),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -701,6 +720,7 @@ class _CustomerCard extends StatelessWidget {
|
||||
'${c.address.postalCode} ${c.address.city}',
|
||||
style: const TextStyle(fontSize: 14),
|
||||
),
|
||||
..._addressExtras(c.address, fontSize: 14),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@ -439,7 +439,7 @@ class _NextDeliveryCard extends StatelessWidget {
|
||||
const SizedBox(height: 10),
|
||||
_InfoRow(
|
||||
icon: Icons.location_on_outlined,
|
||||
text: recipient.address.oneLine,
|
||||
text: recipient.address.oneLineWithAddition,
|
||||
emphasized: true,
|
||||
),
|
||||
if (recipient.differsFromOrderer)
|
||||
@ -846,7 +846,7 @@ class _DeliveryTile extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
recipient.address.oneLine,
|
||||
recipient.address.oneLineWithAddition,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: theme.colorScheme.onSurfaceVariant,
|
||||
|
||||
Reference in New Issue
Block a user