Scooter order payment screen fix

This commit is contained in:
2026-09-15 21:28:33 +03:00
parent 153a763b6f
commit 3a74b8017d
2 changed files with 2 additions and 6 deletions

View File

@@ -30,7 +30,6 @@ class ScooterOrder {
final double mileage;
final double avgSpeed;
final String payTotalPricePrint;
final double unpayTotalPrice;
final String unpayTotalPricePrint;
final String totalOrderPricePrint;
final bool hasFine;
@@ -66,7 +65,6 @@ class ScooterOrder {
required this.avgSpeed,
required this.payTotalPricePrint, // оплачено
required this.unpayTotalPricePrint, //неоплачено
required this.unpayTotalPrice, //неоплачено
required this.totalOrderPricePrint, //общая
required this.hasFine,
});
@@ -117,7 +115,6 @@ class ScooterOrder {
avgSpeed: (json['avgSpeed'] as num?)?.toDouble() ?? 0.0,
payTotalPricePrint: paymentInfo?['payTotalPricePrint'] ?? '',
unpayTotalPricePrint: paymentInfo?['unpayTotalPricePrint'] ?? '',
unpayTotalPrice: (paymentInfo?['unpayTotalPrice'] as num?)?.toDouble() ?? 0.0,
totalOrderPricePrint: paymentInfo?['totalOrderPricePrint'] ?? '',
hasFine: paymentInfo?['hasFine'] ?? false,
);

View File

@@ -115,7 +115,7 @@ class _PaymentConfirmScreenContent extends StatelessWidget {
);
}
final hasNoDebt = (order?.unpayTotalPrice ?? 0) == 0;
final hasNoDebt = order?.status == "Paid";
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -206,7 +206,6 @@ class _PaymentConfirmScreenContent extends StatelessWidget {
),
),
// 🔹 КАРТА ОПЛАТЫ (Отображается только если есть долг)
if (!hasNoDebt) ...[
const SizedBox(height: 40),
(state.useBalance || state.selectedCard != null)
@@ -342,7 +341,7 @@ class _PaymentConfirmScreenContent extends StatelessWidget {
}
},
builder: (context, state) {
final hasNoDebt = (state.order?.unpayTotalPrice ?? 0) == 0;
final hasNoDebt = state.order?.status == "Paid";
return GradientButton(
text: state.status == PaymentConfirmStatus.loading