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