From 5113568a1b963595ad4a20398cbb41290cb2c56a Mon Sep 17 00:00:00 2001 From: Stephan D Date: Fri, 27 Feb 2026 13:08:23 +0100 Subject: [PATCH] fixed processing status --- .../pweb/lib/utils/report/payment_mapper.dart | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/pweb/lib/utils/report/payment_mapper.dart b/frontend/pweb/lib/utils/report/payment_mapper.dart index eee30945..0aef8575 100644 --- a/frontend/pweb/lib/utils/report/payment_mapper.dart +++ b/frontend/pweb/lib/utils/report/payment_mapper.dart @@ -1,9 +1,9 @@ import 'package:pshared/models/payment/operation.dart'; import 'package:pshared/models/payment/payment.dart'; +import 'package:pshared/models/payment/state.dart'; import 'package:pshared/models/payment/status.dart'; import 'package:pshared/utils/money.dart'; -import 'package:pweb/models/payment/payment_state.dart'; OperationItem mapPaymentToOperation(Payment payment) { final debit = payment.lastQuote?.amounts?.sourceDebitTotal; @@ -51,15 +51,15 @@ OperationItem mapPaymentToOperation(Payment payment) { } OperationStatus statusFromPayment(Payment payment) { - final state = paymentStateFromRaw(payment.state); - switch (state) { - case PaymentState.success: - return OperationStatus.success; - case PaymentState.failed: - case PaymentState.cancelled: + switch (payment.orchestrationState) { + case PaymentOrchestrationState.failed: return OperationStatus.error; - case PaymentState.processing: - case PaymentState.unknown: + case PaymentOrchestrationState.settled: + return OperationStatus.success; + case PaymentOrchestrationState.created: + case PaymentOrchestrationState.executing: + case PaymentOrchestrationState.needsAttention: + case PaymentOrchestrationState.unspecified: return OperationStatus.processing; } } -- 2.49.1