Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Jan 16, 2024
2 parents 50f76f9 + cd118fa commit 54777d3
Show file tree
Hide file tree
Showing 7 changed files with 2,633 additions and 9 deletions.
1 change: 1 addition & 0 deletions lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ const List<String> kLanguages = [
'hr',
'it',
'ja',
'lo_LA',
'lt',
'lv_LV',
'mk_MK',
Expand Down
3 changes: 2 additions & 1 deletion lib/data/models/import_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ class ImportType extends EnumClass {
case ImportType.csv:
return {
EntityType.client.apiValue: 'clients',
EntityType.product.apiValue: 'products',
EntityType.invoice.apiValue: 'invoices',
EntityType.recurringInvoice.apiValue: 'recurring_invoices',
EntityType.payment.apiValue: 'payments',
EntityType.product.apiValue: 'products',
EntityType.task.apiValue: 'tasks',
EntityType.vendor.apiValue: 'vendors',
EntityType.expense.apiValue: 'expenses',
EntityType.transaction.apiValue: 'transactions',
Expand Down
2 changes: 2 additions & 0 deletions lib/data/models/transaction_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ abstract class TransactionEntity extends Object

bool get isConverted => statusId == kTransactionStatusConverted;

String get formattedDescription => description.replaceAll('\n', ' ');

@override
List<EntityAction?> getActions(
{UserCompanyEntity? userCompany,
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/reports/transaction_report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ ReportResult transactionReport(
value = transaction.date;
break;
case TransactionReportFields.description:
value = transaction.description;
value = transaction.formattedDescription;
break;
case TransactionReportFields.vendor:
value = vendorMap[transaction.vendorId]?.name ?? '';
Expand Down
5 changes: 3 additions & 2 deletions lib/ui/transaction/transaction_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ class TransactionListItem extends StatelessWidget {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(transaction.description, style: textStyle),
Text(transaction.formattedDescription,
style: textStyle),
Text(
state.bankAccountState
.get(transaction.bankAccountId)
Expand Down Expand Up @@ -193,7 +194,7 @@ class TransactionListItem extends StatelessWidget {
children: <Widget>[
Expanded(
child: Text(
transaction.description,
transaction.formattedDescription,
style: Theme.of(context).textTheme.titleMedium,
),
),
Expand Down
5 changes: 3 additions & 2 deletions lib/ui/transaction/view/transaction_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ class _TransactionViewState extends State<TransactionView> {
ListDivider(),
],
if (transaction.isConverted) ...[
if (transaction.description.isNotEmpty) ...[
IconMessage(transaction.description, copyToClipboard: true),
if (transaction.formattedDescription.isNotEmpty) ...[
IconMessage(transaction.formattedDescription,
copyToClipboard: true),
ListDivider(),
],
EntityListTile(
Expand Down
2,624 changes: 2,621 additions & 3 deletions lib/utils/i18n.dart

Large diffs are not rendered by default.

0 comments on commit 54777d3

Please sign in to comment.