Enable purchase orders
This commit is contained in:
parent
12c13d3043
commit
c41d48cc24
|
|
@ -5,7 +5,6 @@ import 'dart:convert';
|
||||||
import 'package:built_collection/built_collection.dart';
|
import 'package:built_collection/built_collection.dart';
|
||||||
import 'package:built_value/built_value.dart';
|
import 'package:built_value/built_value.dart';
|
||||||
import 'package:built_value/serializer.dart';
|
import 'package:built_value/serializer.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
|
||||||
|
|
||||||
// Project imports:
|
// Project imports:
|
||||||
import 'package:invoiceninja_flutter/.env.dart';
|
import 'package:invoiceninja_flutter/.env.dart';
|
||||||
|
|
@ -17,7 +16,6 @@ import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/payment_term_model.dart';
|
import 'package:invoiceninja_flutter/data/models/payment_term_model.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/system_log_model.dart';
|
import 'package:invoiceninja_flutter/data/models/system_log_model.dart';
|
||||||
import 'package:invoiceninja_flutter/main_app.dart';
|
import 'package:invoiceninja_flutter/main_app.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
|
||||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/strings.dart';
|
import 'package:invoiceninja_flutter/utils/strings.dart';
|
||||||
|
|
@ -589,14 +587,6 @@ abstract class CompanyEntity extends Object
|
||||||
);
|
);
|
||||||
|
|
||||||
bool isModuleEnabled(EntityType entityType) {
|
bool isModuleEnabled(EntityType entityType) {
|
||||||
if (entityType == EntityType.purchaseOrder) {
|
|
||||||
// TODO remove this
|
|
||||||
final store = StoreProvider.of<AppState>(navigatorKey.currentContext);
|
|
||||||
if (store.state.isHosted && !store.state.isStaging) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((entityType == EntityType.invoice ||
|
if ((entityType == EntityType.invoice ||
|
||||||
entityType == EntityType.payment) &&
|
entityType == EntityType.payment) &&
|
||||||
enabledModules & kModuleInvoices == 0) {
|
enabledModules & kModuleInvoices == 0) {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/auth/auth_actions.dart';
|
import 'package:invoiceninja_flutter/redux/auth/auth_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/upgrade_dialog.dart';
|
|
||||||
import 'package:invoiceninja_flutter/utils/app_review.dart';
|
import 'package:invoiceninja_flutter/utils/app_review.dart';
|
||||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||||
|
|
@ -384,12 +383,11 @@ class MenuDrawer extends StatelessWidget {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (true ||
|
if (state.userCompany.isOwner &&
|
||||||
state.userCompany.isOwner &&
|
state.isHosted &&
|
||||||
state.isHosted &&
|
!isPaidAccount(context) &&
|
||||||
!isPaidAccount(context) &&
|
!isApple() &&
|
||||||
!isApple() &&
|
kReleaseMode)
|
||||||
kReleaseMode)
|
|
||||||
Material(
|
Material(
|
||||||
child: Tooltip(
|
child: Tooltip(
|
||||||
message: state.isMenuCollapsed
|
message: state.isMenuCollapsed
|
||||||
|
|
@ -421,18 +419,18 @@ class MenuDrawer extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
/*
|
||||||
showDialog<void>(
|
showDialog<void>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) =>
|
builder: (BuildContext context) =>
|
||||||
UpgradeDialog());
|
UpgradeDialog());
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
store.dispatch(ViewSettings(
|
store.dispatch(ViewSettings(
|
||||||
clearFilter: true,
|
clearFilter: true,
|
||||||
company: company,
|
company: company,
|
||||||
user: state.user,
|
user: state.user,
|
||||||
section: kSettingsAccountManagement));
|
section: kSettingsAccountManagement));
|
||||||
*/
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue