From fd0057a33ce780210cf5cc13141f3db3b027b8da Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 3 Jun 2020 21:08:26 +0300 Subject: [PATCH] Quotes --- lib/ui/app/entities/entity_list_tile.dart | 2 +- lib/ui/invoice/view/invoice_view_overview.dart | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/ui/app/entities/entity_list_tile.dart b/lib/ui/app/entities/entity_list_tile.dart index 85e55b432..c4179abf2 100644 --- a/lib/ui/app/entities/entity_list_tile.dart +++ b/lib/ui/app/entities/entity_list_tile.dart @@ -36,7 +36,7 @@ class EntityListTile extends StatelessWidget { state.uiState.filterEntityType == entity.entityType; Widget trailingIcon = Icon(Icons.navigate_next); - if (isNotMobile(context) && !isFilter) { + if (isNotMobile(context) && isFilter != null && !isFilter) { trailingIcon = Icon(Icons.filter_list, color: isFilteredBy ? Theme.of(context).accentColor : null); } diff --git a/lib/ui/invoice/view/invoice_view_overview.dart b/lib/ui/invoice/view/invoice_view_overview.dart index 018ef7ef0..bdc306398 100644 --- a/lib/ui/invoice/view/invoice_view_overview.dart +++ b/lib/ui/invoice/view/invoice_view_overview.dart @@ -3,6 +3,7 @@ import 'package:invoiceninja_flutter/constants.dart'; import 'package:invoiceninja_flutter/data/models/entities.dart'; import 'package:invoiceninja_flutter/data/models/models.dart'; import 'package:invoiceninja_flutter/data/models/quote_model.dart'; +import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; import 'package:invoiceninja_flutter/redux/app/app_state.dart'; import 'package:invoiceninja_flutter/redux/payment/payment_selectors.dart'; import 'package:invoiceninja_flutter/ui/app/FieldGrid.dart'; @@ -114,6 +115,19 @@ class InvoiceOverview extends StatelessWidget { ), ); + if (invoice.subEntityType == EntityType.quote || + invoice.subEntityType == EntityType.credit) { + final relatedInvoice = state.invoiceState.map[invoice.invoiceId] ?? + InvoiceEntity(id: invoice.invoiceId); + if ((invoice.invoiceId ?? '').isNotEmpty) { + widgets.add(EntityListTile( + isFilter: null, + entity: relatedInvoice, + onTap: () => viewEntity(context: context, entity: relatedInvoice), + )); + } + } + if (payments.isNotEmpty) { payments.forEach((payment) { widgets.add(