Fehlerkorrekturen und Erweiterungen
This commit is contained in:
1 parent
a16a8fcf28
commit
1207d9c517
12 files changed
+158
-60
No files matched your search
@@ -257,6 +257,7 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
_processTaskArrivedOrFinished(TaskInfo taskInfo) {
|
||||
Util.logInfo('Task ${taskInfo.task.sId} called');
|
||||
|
||||
if (!mounted) return;
|
||||
showTaskArrivedPopup(context, taskInfo, () async {
|
||||
DateFormat dateFormat = DateFormat("dd.MM.yyyy HH:mm");
|
||||
|
||||
@@ -268,7 +269,9 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
|
||||
_sendArrivedMessage(taskInfo);
|
||||
|
||||
setState(() {});
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
_finishTaskProcessing(taskInfo);
|
||||
});
|
||||
@@ -277,6 +280,7 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
_processCommissionNumber(TaskInfo taskInfo) {
|
||||
Util.logInfo('Task ${taskInfo.task.sId} called');
|
||||
|
||||
if (!mounted) return;
|
||||
showComissionNumberPopup(context, taskInfo, (comissionNumber) async {
|
||||
var answer = await _createAnswerHeader(taskInfo);
|
||||
answer.val = comissionNumber;
|
||||
@@ -287,7 +291,9 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
|
||||
_commisionNumber = comissionNumber;
|
||||
|
||||
setState(() {});
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
_finishTaskProcessing(taskInfo);
|
||||
});
|
||||
@@ -316,6 +322,7 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
_processTakePhotos(TaskInfo taskInfo) {
|
||||
Util.logInfo('Task ${taskInfo.task.sId} called');
|
||||
|
||||
if (!mounted) return;
|
||||
showTakePhotosPopup(context, taskInfo, (List<Uint8List>? photos) async {
|
||||
if (photos != null) {
|
||||
await MyApp.isarInstance.writeTxn(() async {
|
||||
@@ -335,7 +342,9 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
taskInfo.additionalText = "Fotos aufgenommen";
|
||||
taskInfo.completed = true;
|
||||
|
||||
setState(() {});
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
_finishTaskProcessing(taskInfo);
|
||||
}
|
||||
@@ -362,6 +371,7 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
void _processReceiptGiver(TaskInfo taskInfo) {
|
||||
Util.logInfo('Task ${taskInfo.task.sId} called');
|
||||
|
||||
if (!mounted) return;
|
||||
showReceiptGiverPopup(context, taskInfo, (receiptGiver, selectedTourEntry) async {
|
||||
var answer = await _createAnswerHeader(taskInfo);
|
||||
answer.code = selectedTourEntry.code;
|
||||
@@ -371,7 +381,9 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
taskInfo.additionalText = receiptGiver;
|
||||
taskInfo.completed = true;
|
||||
|
||||
setState(() {});
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
_finishTaskProcessing(taskInfo);
|
||||
});
|
||||
@@ -380,8 +392,10 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
void _processPickupDeliveryStatusTask(TaskInfo taskInfo) {
|
||||
Util.logInfo('Task ${taskInfo.task.sId} called');
|
||||
|
||||
final currentContext = context;
|
||||
Future.delayed(const Duration(seconds: 1), () async {
|
||||
showPickupDeliveryStatusPopup(context, taskInfo, (tourEntry, remark) async {
|
||||
if (!mounted) return;
|
||||
showPickupDeliveryStatusPopup(currentContext, taskInfo, (tourEntry, remark) async {
|
||||
var answer = await _createAnswerHeader(taskInfo);
|
||||
answer.code = tourEntry!.code;
|
||||
answer.val = remark;
|
||||
@@ -392,7 +406,9 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
|
||||
_finishTaskProcessing(taskInfo);
|
||||
|
||||
setState(() {});
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -404,8 +420,10 @@ class _TaskListPageState extends State<TaskListPage> with ProducerMixin {
|
||||
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]);
|
||||
|
||||
final currentContext = context;
|
||||
Future.delayed(const Duration(seconds: 1), () async {
|
||||
showSignaturePopup(context, taskInfo, (String? signature) async {
|
||||
if (!mounted) return;
|
||||
showSignaturePopup(currentContext, taskInfo, (String? signature) async {
|
||||
MyApp.suppressAcceptDialog = false;
|
||||
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
|
||||
Reference in new issue
Block a user