Frontend first draft
This commit is contained in:
23
frontend/pweb/lib/pages/report/table/row.dart
Normal file
23
frontend/pweb/lib/pages/report/table/row.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
// operation_row.dart
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:pshared/models/payment/operation.dart';
|
||||
import 'package:pweb/pages/report/table/badge.dart';
|
||||
|
||||
class OperationRow {
|
||||
static DataRow build(OperationItem op, BuildContext context) {
|
||||
return DataRow(cells: [
|
||||
DataCell(OperationStatusBadge(status: op.status)),
|
||||
DataCell(Text(op.fileName ?? '')),
|
||||
DataCell(Text('${op.amount.toStringAsFixed(2)} ${op.currency}')),
|
||||
DataCell(Text('${op.toAmount.toStringAsFixed(2)} ${op.toCurrency}')),
|
||||
DataCell(Text(op.payId)),
|
||||
DataCell(Text(op.cardNumber ?? '-')),
|
||||
DataCell(Text(op.name)),
|
||||
DataCell(Text(
|
||||
'${TimeOfDay.fromDateTime(op.date).format(context)}\n'
|
||||
'${op.date.toLocal().toIso8601String().split("T").first}',
|
||||
)),
|
||||
DataCell(Text(op.comment)),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user