feat: Adressbuch mit Kundennummer, Update-Flow und interne Einträge

- Menüpunkt "Kunden" in "Adressbuch" umbenannt und App-Label
  "Verfügbare Jobs" zu "Auftragsliste" geändert (alle 10 Sprachen)
- Fortlaufende Kundennummer (usrId) ab 10000 über neuen
  SequenceGeneratorService und Counter-Dokument in misc-Collection
- Abholung/Lieferstation-Dialog: Änderungen an verknüpften
  Stammdaten aktualisieren den bestehenden Adressbuch-Eintrag
  statt einen neuen zu erzeugen; Checkbox-Label wechselt zu
  "Adresse im Adressbuch aktualisieren"
- Geänderte Adressen ohne Checkbox werden als interner Customer
  (internal=true) gesichert und im Adressbuch ausgeblendet
- E-Mail in AddCustomer und in Stations-Dialogen kein Pflichtfeld
  mehr; "(Login)" aus profile.email entfernt
- Manuelles Beenden eines Auftrags öffnet neue Seite
  JobManualCompleteView statt eines Dialogs
This commit is contained in:
2026-04-20 12:42:56 +02:00
parent 6e8bedd9b4
commit 704d1e7378
42 changed files with 720 additions and 196 deletions

View File

@@ -9,7 +9,7 @@ import '../widgets/offline_banner.dart';
class SignatureCaptureScreen extends StatefulWidget {
final SignatureTask task;
final void Function(String svg) onSignatureCompleted;
final void Function(String svg, String note) onSignatureCompleted;
const SignatureCaptureScreen({
super.key,
@@ -23,6 +23,7 @@ class SignatureCaptureScreen extends StatefulWidget {
class _SignatureCaptureScreenState extends State<SignatureCaptureScreen> {
late final SignatureController _controller;
final TextEditingController _noteController = TextEditingController();
bool _hasSignature = false;
bool _isMobilePlatform = false;
@@ -84,6 +85,7 @@ class _SignatureCaptureScreenState extends State<SignatureCaptureScreen> {
void dispose() {
_controller.removeListener(_onSignatureChanged);
_controller.dispose();
_noteController.dispose();
_restoreOrientation();
super.dispose();
}
@@ -155,14 +157,15 @@ class _SignatureCaptureScreenState extends State<SignatureCaptureScreen> {
// Build SVG from the captured signature points
final String svg = _buildSvgFromPoints(_controller.points);
final String note = _noteController.text.trim();
// Close this screen first to show the updated TaskView quickly
if (!mounted) return;
_restoreOrientation();
Navigator.of(context).pop();
// Then notify the caller (SVG only)
widget.onSignatureCompleted(svg);
// Then notify the caller (SVG + Bemerkung)
widget.onSignatureCompleted(svg, note);
} catch (e) {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
@@ -233,6 +236,16 @@ class _SignatureCaptureScreenState extends State<SignatureCaptureScreen> {
),
),
),
const SizedBox(height: 12),
TextField(
controller: _noteController,
decoration: InputDecoration(
labelText: AppLocalizations.of(context).completeTaskNote,
border: const OutlineInputBorder(),
),
maxLines: 2,
minLines: 1,
),
const SizedBox(height: 16),
Row(
children: [