docs format updated
This commit is contained in:
@@ -17,9 +17,9 @@ import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
|
||||
class PaymentDetailsPage extends StatelessWidget {
|
||||
final String paymentId;
|
||||
final String paymentRef;
|
||||
|
||||
const PaymentDetailsPage({super.key, required this.paymentId});
|
||||
const PaymentDetailsPage({super.key, required this.paymentRef});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -27,16 +27,18 @@ class PaymentDetailsPage extends StatelessWidget {
|
||||
PaymentsProvider,
|
||||
PaymentDetailsController
|
||||
>(
|
||||
create: (_) => PaymentDetailsController(paymentId: paymentId),
|
||||
create: (_) => PaymentDetailsController(paymentRef: paymentRef),
|
||||
update: (_, payments, controller) =>
|
||||
controller!..update(payments, paymentId),
|
||||
child: const _PaymentDetailsView(),
|
||||
controller!..update(payments, paymentRef),
|
||||
child: _PaymentDetailsView(paymentRef: paymentRef),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _PaymentDetailsView extends StatelessWidget {
|
||||
const _PaymentDetailsView();
|
||||
final String paymentRef;
|
||||
|
||||
const _PaymentDetailsView({required this.paymentRef});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -73,6 +75,7 @@ class _PaymentDetailsView extends StatelessWidget {
|
||||
context,
|
||||
gatewayService: request.gatewayService,
|
||||
operationRef: request.operationRef,
|
||||
paymentRef: paymentRef,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -13,7 +13,7 @@ import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
|
||||
class OperationRow {
|
||||
static DataRow build(OperationItem op, BuildContext context) {
|
||||
static DataRow build(String paymentRef, OperationItem op, BuildContext context) {
|
||||
final isUnknownDate = op.date.millisecondsSinceEpoch == 0;
|
||||
final localDate = op.date.toLocal();
|
||||
final loc = AppLocalizations.of(context)!;
|
||||
@@ -33,6 +33,7 @@ class OperationRow {
|
||||
context,
|
||||
gatewayService: op.gatewayService ?? '',
|
||||
operationRef: op.operationRef ?? '',
|
||||
paymentRef: paymentRef,
|
||||
),
|
||||
icon: const Icon(Icons.download),
|
||||
label: Text(loc.downloadAct),
|
||||
|
||||
@@ -6,11 +6,13 @@ import 'package:pweb/pages/report/table/row.dart';
|
||||
|
||||
|
||||
class OperationsTable extends StatelessWidget {
|
||||
final String paymentRef;
|
||||
final List<OperationItem> operations;
|
||||
final bool showFileNameColumn;
|
||||
|
||||
const OperationsTable({
|
||||
super.key,
|
||||
required this.paymentRef,
|
||||
required this.operations,
|
||||
required this.showFileNameColumn,
|
||||
});
|
||||
@@ -49,7 +51,7 @@ class OperationsTable extends StatelessWidget {
|
||||
});
|
||||
|
||||
// Use the DataRow built by OperationRow and extract its cells
|
||||
final row = OperationRow.build(op, context);
|
||||
final row = OperationRow.build(paymentRef, op, context);
|
||||
return DataRow.byIndex(
|
||||
index: index,
|
||||
color: color,
|
||||
|
||||
Reference in New Issue
Block a user