fix for quote and operations addition

This commit is contained in:
Arseni
2026-03-13 16:07:22 +03:00
parent 34a7edd50c
commit 530432e3f8
13 changed files with 200 additions and 359 deletions

View File

@@ -27,11 +27,15 @@ class OperationHistoryTile extends StatelessWidget {
Widget build(BuildContext context) {
final loc = AppLocalizations.of(context)!;
final theme = Theme.of(context);
final title = resolveOperationTitle(loc, operation.code);
final operationLabel = operation.label?.trim();
final title = (operationLabel != null && operationLabel.isNotEmpty)
? operationLabel
: resolveOperationTitle(loc, operation.code);
// final operationComment = operation.comment?.trim();
final stateView = resolveStepStateView(context, operation.state);
final completedAt = formatCompletedAt(context, operation.completedAt);
final amount = formatMoneyUi(context, operation.amount);
final convertedAmount = formatMoneyUi(context, operation.convertedAmount);
final canDownload = canDownloadDocument && onDownloadDocument != null;
return Column(
@@ -52,17 +56,6 @@ class OperationHistoryTile extends StatelessWidget {
StepStateChip(view: stateView),
],
),
if (operationLabel != null &&
operationLabel.isNotEmpty &&
operationLabel != title) ...[
const SizedBox(height: 4),
Text(
operationLabel,
style: theme.textTheme.bodySmall?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
),
),
],
const SizedBox(height: 6),
Text(
'${loc.completedAtLabel}: $completedAt',
@@ -77,6 +70,24 @@ class OperationHistoryTile extends StatelessWidget {
color: theme.colorScheme.onSurfaceVariant,
),
),
if (operation.convertedAmount != null) ...[
const SizedBox(height: 4),
Text(
'${loc.toAmountColumn}: $convertedAmount',
style: theme.textTheme.bodySmall?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
),
),
],
// if (operationComment != null && operationComment.isNotEmpty) ...[
// const SizedBox(height: 4),
// Text(
// '${loc.comment}: $operationComment',
// style: theme.textTheme.bodySmall?.copyWith(
// color: theme.colorScheme.onSurfaceVariant,
// ),
// ),
// ],
if (canDownload) ...[
const SizedBox(height: 8),
TextButton.icon(

View File

@@ -58,7 +58,7 @@ class OperationRow {
DataCell(Text(op.cardNumber ?? '-')),
DataCell(Text(op.name)),
DataCell(Text(dateLabel)),
DataCell(Text(op.comment)),
// DataCell(Text(op.comment)),
],
);
}