Refactor
This commit is contained in:
parent
f4cfe21ef8
commit
20151b07a6
|
|
@ -54,7 +54,7 @@ class _ClientEditState extends State<ClientEdit>
|
|||
appBar: AppBar(
|
||||
title: Text(client.isNew
|
||||
? localization.newClient
|
||||
: viewModel.origClient.displayName), // Text(localizations.clientDetails),
|
||||
: localization.editClient),
|
||||
actions: <Widget>[
|
||||
RefreshIconButton(
|
||||
icon: Icons.cloud_upload,
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
|||
appBar: AppBar(
|
||||
title: Text(invoice.isNew
|
||||
? invoice.isQuote ? localization.newQuote : localization.newInvoice
|
||||
: '${invoice.isQuote ? localization.quote : localization.invoice} ${viewModel.origInvoice.invoiceNumber}'),
|
||||
: invoice.isQuote ? localization.editQuote: localization.editInvoice),
|
||||
actions: <Widget>[
|
||||
RefreshIconButton(
|
||||
icon: Icons.cloud_upload,
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class _PaymentEditState extends State<PaymentEdit> {
|
|||
appBar: AppBar(
|
||||
title: Text(viewModel.payment.isNew
|
||||
? localization.enterPayment
|
||||
: viewModel.payment.transactionReference),
|
||||
: localization.editPayment),
|
||||
actions: <Widget>[
|
||||
Builder(builder: (BuildContext context) {
|
||||
return RefreshIconButton(
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@ class _PaymentViewState extends State<PaymentView> {
|
|||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(payment.transactionReference),
|
||||
title: Text(payment.transactionReference.isNotEmpty
|
||||
? payment.transactionReference
|
||||
: localization.payment),
|
||||
actions: payment.isNew
|
||||
? []
|
||||
: [
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class _ProductEditState extends State<ProductEdit> {
|
|||
appBar: AppBar(
|
||||
title: Text(viewModel.product.isNew
|
||||
? localization.newProduct
|
||||
: viewModel.origProduct.productKey),
|
||||
: localization.editProduct),
|
||||
actions: <Widget>[
|
||||
Builder(builder: (BuildContext context) {
|
||||
if (!user.canEditEntity(product)) {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class _StubEditState extends State<StubEdit> {
|
|||
appBar: AppBar(
|
||||
title: Text(viewModel.stub.isNew
|
||||
? localization.newStub
|
||||
: viewModel.stub.displayName),
|
||||
: localization.editStub),
|
||||
actions: <Widget>[
|
||||
Builder(builder: (BuildContext context) {
|
||||
return SaveIconButton(
|
||||
|
|
|
|||
Loading…
Reference in New Issue