feat: Auftragsdetails und Stationsabschluss für Version 0.9.24

Preisanzeige in der App entfernen und Auftragsbezeichnungen vereinheitlichen.

Stationsabschlüsse und Benachrichtigungen absichern sowie Historie um Aufgabenbeschreibungen und ausführende Nutzer erweitern.

Regressionstests ergänzen und App sowie Backend auf Version 0.9.24 anheben.
This commit is contained in:
Sven committed 2026-10-01 11:31:59 +02:00
1 parent 7325c77739
commit b642f42954
37 files changed
+1067 -223

No files matched your search

+3 -3
View File
@@ -350,12 +350,12 @@ class ChatService {
String _buildJobTitle(String? jobNumber, String? jobId) {
if (jobNumber != null && jobNumber.isNotEmpty) {
return 'Job $jobNumber';
return 'Auftrag $jobNumber';
}
if (jobId != null && jobId.length >= 6) {
return 'Job ${jobId.substring(0, 6).toUpperCase()}';
return 'Auftrag ${jobId.substring(0, 6).toUpperCase()}';
}
return 'Job-Chat';
return 'Auftrags-Chat';
}
String? _determineCounterpart(
+15 -7
View File
@@ -21,9 +21,9 @@ class NotificationService {
'Benachrichtigungen bei neuen Chat-Nachrichten';
static const String _jobChannelId = 'new_jobs';
static const String _jobChannelName = 'Neue Jobs';
static const String _jobChannelName = 'Neue Aufträge';
static const String _jobChannelDescription =
'Benachrichtigungen bei neuen Job-Zuweisungen';
'Benachrichtigungen bei neuen Auftragszuweisungen';
int _nextId = 0;
@@ -49,12 +49,15 @@ class NotificationService {
await _plugin
.resolvePlatformSpecificImplementation<
AndroidFlutterLocalNotificationsPlugin>()
AndroidFlutterLocalNotificationsPlugin
>()
?.requestNotificationsPermission();
_initialized = true;
developer.log('NotificationService initialized',
name: 'NotificationService');
developer.log(
'NotificationService initialized',
name: 'NotificationService',
);
}
Future<void> showChatNotification({
@@ -87,8 +90,13 @@ class NotificationService {
iOS: iosDetails,
);
await _plugin.show(_nextId++, title, body, details,
payload: 'chat:$conversationKey');
await _plugin.show(
_nextId++,
title,
body,
details,
payload: 'chat:$conversationKey',
);
}
Future<void> showJobNotification({
+8 -8
View File
@@ -440,11 +440,11 @@ class WebSocketService {
if (currentJobCount > 0 && jobs.length > currentJobCount) {
final newCount = jobs.length - currentJobCount;
NotificationService().showJobNotification(
title: 'Neue Jobs',
title: 'Neue Aufträge',
body:
newCount == 1
? 'Sie haben einen neuen Job erhalten.'
: 'Sie haben $newCount neue Jobs erhalten.',
? 'Sie haben einen neuen Auftrag erhalten.'
: 'Sie haben $newCount neue Aufträge erhalten.',
);
}
@@ -597,11 +597,11 @@ class WebSocketService {
// Show notification with sound for new job
NotificationService().showJobNotification(
title: 'Neuer Job',
title: 'Neuer Auftrag',
body:
jobNumber != null && jobNumber.isNotEmpty
? 'Job $jobNumber wurde Ihnen zugewiesen.'
: 'Sie haben einen neuen Job erhalten.',
? 'Auftrag $jobNumber wurde Ihnen zugewiesen.'
: 'Sie haben einen neuen Auftrag erhalten.',
);
// Publish event via DartMQ for UI to handle
@@ -642,8 +642,8 @@ class WebSocketService {
final jobNumber = message.jobNumber ?? '';
notificationTitle =
jobNumber.isNotEmpty
? 'Nachricht zu Job $jobNumber'
: 'Neue Job-Nachricht';
? 'Nachricht zu Auftrag $jobNumber'
: 'Neue Auftragsnachricht';
} else {
notificationTitle = 'Neue Nachricht';
}