bug fix on batches for zesa

This commit is contained in:
Prince
2026-06-21 00:24:36 +02:00
parent 381b5fbf08
commit b90d95bc63
11 changed files with 389 additions and 40 deletions

View File

@@ -50,6 +50,7 @@ class GroupBatchItem {
final String? groupBatchId;
final String? recipientName;
final String? recipientPhone;
final String? recipientAccount;
final double? amount;
final String? status;
final String? transactionId;
@@ -65,6 +66,7 @@ class GroupBatchItem {
this.groupBatchId,
this.recipientName,
this.recipientPhone,
this.recipientAccount,
this.amount,
this.status,
this.transactionId,
@@ -146,4 +148,4 @@ class GroupBatchUpdateRequest {
_$GroupBatchUpdateRequestFromJson(json);
Map<String, dynamic> toJson() => _$GroupBatchUpdateRequestToJson(this);
}
}

View File

@@ -49,6 +49,7 @@ GroupBatchItem _$GroupBatchItemFromJson(Map<String, dynamic> json) =>
groupBatchId: json['groupBatchId'] as String?,
recipientName: json['recipientName'] as String?,
recipientPhone: json['recipientPhone'] as String?,
recipientAccount: json['recipientAccount'] as String?,
amount: (json['amount'] as num?)?.toDouble(),
status: json['status'] as String?,
transactionId: json['transactionId'] as String?,
@@ -66,6 +67,7 @@ Map<String, dynamic> _$GroupBatchItemToJson(GroupBatchItem instance) =>
'groupBatchId': instance.groupBatchId,
'recipientName': instance.recipientName,
'recipientPhone': instance.recipientPhone,
'recipientAccount': instance.recipientAccount,
'amount': instance.amount,
'status': instance.status,
'transactionId': instance.transactionId,

View File

@@ -2388,19 +2388,13 @@ class _BatchDetailScreenState extends State<BatchDetailScreen>
),
const SizedBox(height: 2),
Text(
item.recipientPhone ?? '',
item.recipientAccount ?? '',
style: TextStyle(fontSize: 12, color: Colors.grey.shade500),
),
if (item.billName != null || item.billProductName != null)
const SizedBox(height: 4),
if (item.billName != null || item.billProductName != null)
_buildBillInfoRow(item, isDark),
if (item.providerLabel != null &&
item.providerLabel!.isNotEmpty)
const SizedBox(height: 3),
if (item.providerLabel != null &&
item.providerLabel!.isNotEmpty)
_buildProviderBadge(item, isDark),
],
),
),
@@ -2429,14 +2423,6 @@ class _BatchDetailScreenState extends State<BatchDetailScreen>
final parts = <InlineSpan>[];
if (item.billName != null && item.billName!.isNotEmpty) {
parts.addAll([
WidgetSpan(
child: Icon(
Icons.receipt_rounded,
size: 12,
color: Colors.grey.shade500,
),
),
const WidgetSpan(child: SizedBox(width: 3)),
TextSpan(
text: item.billName,
style: TextStyle(

View File

@@ -49,12 +49,13 @@ class _GroupCreateScreenState extends State<GroupCreateScreen> {
if (parts.length >= 2) {
final name = parts[0].trim();
final account = parts[1].trim();
final phone = parts[2].trim();
if (name.isNotEmpty && account.isNotEmpty) {
members.add(
Recipient(
name: name,
account: account,
phoneNumber: account,
phoneNumber: phone,
latestProviderLabel: '',
),
);