Hide schedule report feature if not yet supported
This commit is contained in:
parent
16e1ff7b50
commit
a51fbf3746
|
|
@ -385,6 +385,7 @@ class ReportsScreen extends StatelessWidget {
|
||||||
viewModel.onExportPressed(context);
|
viewModel.onExportPressed(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
if (supportsLatestFeatures('5.8.0'))
|
||||||
AppTextButton(
|
AppTextButton(
|
||||||
label: localization.schedule,
|
label: localization.schedule,
|
||||||
isInHeader: true,
|
isInHeader: true,
|
||||||
|
|
@ -545,6 +546,7 @@ class ReportsScreen extends StatelessWidget {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (supportsLatestFeatures('5.8.0')) ...[
|
||||||
SizedBox(width: kGutterWidth),
|
SizedBox(width: kGutterWidth),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: AppButton(
|
child: AppButton(
|
||||||
|
|
@ -555,6 +557,7 @@ class ReportsScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ReportDataTable(
|
ReportDataTable(
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import 'package:invoiceninja_flutter/ui/schedule/edit/schedule_edit_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/completers.dart';
|
import 'package:invoiceninja_flutter/utils/completers.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/scrollable_listview.dart';
|
import 'package:invoiceninja_flutter/ui/app/scrollable_listview.dart';
|
||||||
|
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/strings.dart';
|
import 'package:invoiceninja_flutter/utils/strings.dart';
|
||||||
|
|
||||||
class ScheduleEdit extends StatefulWidget {
|
class ScheduleEdit extends StatefulWidget {
|
||||||
|
|
@ -163,6 +164,9 @@ class _ScheduleEditState extends State<ScheduleEdit> {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
items: ScheduleEntity.TEMPLATES
|
items: ScheduleEntity.TEMPLATES
|
||||||
|
.where((entry) =>
|
||||||
|
supportsLatestFeatures('5.8.0') ||
|
||||||
|
entry != ScheduleEntity.TEMPLATE_EMAIL_REPORT)
|
||||||
.map((entry) => DropdownMenuItem(
|
.map((entry) => DropdownMenuItem(
|
||||||
value: entry,
|
value: entry,
|
||||||
child: Text(localization.lookup(entry)),
|
child: Text(localization.lookup(entry)),
|
||||||
|
|
|
||||||
|
|
@ -356,6 +356,7 @@ class _ImportExportState extends State<ImportExport> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (supportsLatestFeatures('5.8.0')) ...[
|
||||||
SizedBox(width: kGutterWidth),
|
SizedBox(width: kGutterWidth),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: AppButton(
|
child: AppButton(
|
||||||
|
|
@ -371,6 +372,7 @@ class _ImportExportState extends State<ImportExport> {
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue