front dev update
This commit is contained in:
@@ -8,6 +8,13 @@ import 'package:pweb/pages/report/table/badge.dart';
|
||||
|
||||
class OperationRow {
|
||||
static DataRow build(OperationItem op, BuildContext context) {
|
||||
final isUnknownDate = op.date.millisecondsSinceEpoch == 0;
|
||||
final localDate = op.date.toLocal();
|
||||
final dateLabel = isUnknownDate
|
||||
? '-'
|
||||
: '${TimeOfDay.fromDateTime(localDate).format(context)}\n'
|
||||
'${localDate.toIso8601String().split("T").first}';
|
||||
|
||||
return DataRow(cells: [
|
||||
DataCell(OperationStatusBadge(status: op.status)),
|
||||
DataCell(Text(op.fileName ?? '')),
|
||||
@@ -16,10 +23,7 @@ class OperationRow {
|
||||
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(dateLabel)),
|
||||
DataCell(Text(op.comment)),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user