Expenses
This commit is contained in:
parent
4ad28040c7
commit
1fe33ed0f9
|
|
@ -15,6 +15,7 @@ import 'package:invoiceninja_flutter/ui/app/icon_message.dart';
|
|||
import 'package:invoiceninja_flutter/ui/app/invoice/invoice_item_view.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/two_value_header.dart';
|
||||
import 'package:invoiceninja_flutter/ui/invoice/view/invoice_view_vm.dart';
|
||||
import 'package:invoiceninja_flutter/utils/icons.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
|
||||
class InvoiceView extends StatefulWidget {
|
||||
|
|
@ -102,7 +103,7 @@ class _InvoiceViewState extends State<InvoiceView> {
|
|||
color: Theme.of(context).canvasColor,
|
||||
child: ListTile(
|
||||
title: Text(client?.displayName ?? ''),
|
||||
leading: Icon(FontAwesomeIcons.users, size: 18.0),
|
||||
leading: Icon(getEntityIcon(EntityType.client), size: 18.0),
|
||||
trailing: Icon(Icons.navigate_next),
|
||||
onTap: () => viewModel.onClientPressed(context),
|
||||
onLongPress: () => viewModel.onClientPressed(context, true),
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ class _PaymentViewState extends State<PaymentView> {
|
|||
title: Text(client.displayName ?? ''),
|
||||
leading: Icon(FontAwesomeIcons.users, size: 18.0),
|
||||
trailing: Icon(Icons.navigate_next),
|
||||
onTap: () => viewModel.onTapClient(context),
|
||||
onLongPress: () => viewModel.onTapClient(context, true),
|
||||
onTap: () => viewModel.onClientPressed(context),
|
||||
onLongPress: () => viewModel.onClientPressed(context, true),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
|
|
@ -116,8 +116,8 @@ class _PaymentViewState extends State<PaymentView> {
|
|||
title: Text('${localization.invoice} ${invoice.invoiceNumber}'),
|
||||
leading: Icon(FontAwesomeIcons.filePdf, size: 18.0),
|
||||
trailing: Icon(Icons.navigate_next),
|
||||
onTap: () => viewModel.onTapInvoice(context),
|
||||
onLongPress: () => viewModel.onTapInvoice(context, true),
|
||||
onTap: () => viewModel.onInvoicePressed(context),
|
||||
onLongPress: () => viewModel.onInvoicePressed(context, true),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ class PaymentViewVM {
|
|||
@required this.company,
|
||||
@required this.onActionSelected,
|
||||
@required this.onEditPressed,
|
||||
@required this.onTapClient,
|
||||
@required this.onTapInvoice,
|
||||
@required this.onClientPressed,
|
||||
@required this.onInvoicePressed,
|
||||
@required this.isSaving,
|
||||
@required this.isLoading,
|
||||
@required this.isDirty,
|
||||
|
|
@ -61,11 +61,11 @@ class PaymentViewVM {
|
|||
onEditPressed: (BuildContext context) {
|
||||
store.dispatch(EditPayment(payment: payment, context: context));
|
||||
},
|
||||
onTapClient: (context, [bool longPress = false]) => store.dispatch(
|
||||
onClientPressed: (context, [bool longPress = false]) => store.dispatch(
|
||||
longPress
|
||||
? EditClient(client: client, context: context)
|
||||
: ViewClient(clientId: client.id, context: context)),
|
||||
onTapInvoice: (context, [bool longPress = false]) => store.dispatch(
|
||||
onInvoicePressed: (context, [bool longPress = false]) => store.dispatch(
|
||||
longPress
|
||||
? EditInvoice(
|
||||
invoice: state.invoiceState.map[payment.invoiceId],
|
||||
|
|
@ -101,8 +101,8 @@ class PaymentViewVM {
|
|||
final CompanyEntity company;
|
||||
final Function(BuildContext, EntityAction) onActionSelected;
|
||||
final Function(BuildContext) onEditPressed;
|
||||
final Function(BuildContext, [bool]) onTapInvoice;
|
||||
final Function(BuildContext, [bool]) onTapClient;
|
||||
final Function(BuildContext, [bool]) onInvoicePressed;
|
||||
final Function(BuildContext, [bool]) onClientPressed;
|
||||
final bool isSaving;
|
||||
final bool isLoading;
|
||||
final bool isDirty;
|
||||
|
|
|
|||
Loading…
Reference in New Issue