diff --git a/README.md b/README.md index 09a63b152..123037aa9 100644 --- a/README.md +++ b/README.md @@ -80,3 +80,5 @@ The architecture is based off these two projects: We gladly accept contributions! If you'd like to get involved with development please join our [Slack group](http://slack.invoiceninja.com/). +Create pull requests for v1 against the 'legacy' branch and for v2 against the 'develop' branch. + diff --git a/android/gradle.properties b/android/gradle.properties index 53ae0ae47..768bee6b2 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,4 @@ android.enableJetifier=true android.useAndroidX=true org.gradle.jvmargs=-Xmx1536M +android.enableR8=true \ No newline at end of file diff --git a/lib/constants.dart b/lib/constants.dart index 26a573e3e..b51613ed4 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -46,6 +46,18 @@ const double kMobileDialogPadding = 12; const double kTabletLayoutWidth = 1000; const double kTabletDialogPadding = 250; +const int kCardTypeVisa = 1; +const int kCardTypeMasterCard = 2; +const int kCardTypeAmEx = 4; +const int kCardTypeDiners = 8; +const int kCardTypeDiscover = 16; + +const String kPaymentTypeVisa = '6'; +const String kPaymentTypeMasterCard = '7'; +const String kPaymentTypeAmEx = '8'; +const String kPaymentTypeDiners = '9'; +const String kPaymentTypeDiscover = '10'; + const String kPlanFree = ''; const String kPlanPro = 'pro'; const String kPlanEnterprise = 'enterprise'; diff --git a/lib/data/models/company_gateway_model.dart b/lib/data/models/company_gateway_model.dart index 7269412ef..24c5fd510 100644 --- a/lib/data/models/company_gateway_model.dart +++ b/lib/data/models/company_gateway_model.dart @@ -158,14 +158,6 @@ abstract class CompanyGatewayEntity extends Object if (includeEdit && userCompany.canEditEntity(this)) { actions.add(EntityAction.edit); } - - if (userCompany.canEditEntity(this)) { - actions.add(EntityAction.settings); - } - - if (userCompany.canCreate(EntityType.client)) { - actions.add(EntityAction.newClient); - } } if (actions.isNotEmpty) { diff --git a/lib/ui/company_gateway/edit/company_gateway_edit.dart b/lib/ui/company_gateway/edit/company_gateway_edit.dart index 38c3ee112..2252beb8a 100644 --- a/lib/ui/company_gateway/edit/company_gateway_edit.dart +++ b/lib/ui/company_gateway/edit/company_gateway_edit.dart @@ -1,5 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:invoiceninja_flutter/constants.dart'; import 'package:invoiceninja_flutter/data/models/entities.dart'; import 'package:invoiceninja_flutter/redux/static/static_selectors.dart'; import 'package:invoiceninja_flutter/ui/app/entity_dropdown.dart'; @@ -168,10 +169,11 @@ class _CompanyGatewayEditState extends State FormCard( children: [ SwitchListTile( - activeColor: Theme.of(context).accentColor, - //title: Text(), - value: false, - //onChanged: (value) => viewModel.onChanged(companyGateway.rebuild((b) => b..)), + activeColor: Theme.of(context).accentColor, + title: Text(state + .staticState.paymentTypeMap[kPaymentTypeVisa]?.name ?? ''), + value: false, + //onChanged: (value) => viewModel.onChanged(companyGateway.rebuild((b) => b..)), ) ], )