diff --git a/lib/ui/settings/import_export.dart b/lib/ui/settings/import_export.dart index 4e0d3c7bb..ee1a2a873 100644 --- a/lib/ui/settings/import_export.dart +++ b/lib/ui/settings/import_export.dart @@ -61,6 +61,8 @@ class _ImportExportState extends State { var _exportType = ExportType.clients; var _exportDate = ''; var _exportDateRange = ''; + var _exportStartDate = ''; + var _exportEndDate = ''; bool _isExporting = false; @@ -73,6 +75,7 @@ class _ImportExportState extends State { 'this_quarter', 'last_quarter', 'this_year', + 'custom', ]; static const DATE_FIELD_DATE = 'date'; @@ -258,17 +261,24 @@ class _ImportExportState extends State { _exportDateRange = value; }); }, - items: DATE_RANGES - .map( - (dateRange) => DropdownMenuItem( - value: dateRange, - child: Text( - localization.lookup('$dateRange'), - ), - ), - ) - .toList(), + items: DATE_RANGES.map( + (dateRange) { + var label = localization.lookup('$dateRange'); + if (dateRange == 'last7') { + label = localization.last7Days; + } else if (dateRange == 'last30') { + label = localization.last30Days; + } + return DropdownMenuItem( + value: dateRange, + child: Text(label), + ); + }, + ).toList(), ), + if (_exportDateRange == 'custom') ...[ + // + ] ], ], AppButton( diff --git a/lib/utils/i18n.dart b/lib/utils/i18n.dart index a0f703f84..cdab47f48 100644 --- a/lib/utils/i18n.dart +++ b/lib/utils/i18n.dart @@ -16,6 +16,7 @@ mixin LocalizationsProvider on LocaleCodeAware { static final Map> _localizedValues = { 'en': { // STARTER: lang key - do not remove comment + 'client_contacts': 'Client Contacts', 'sync_from': 'Sync From', 'inventory_threshold': 'Inventory Threshold', 'hour': 'Hour', @@ -93979,6 +93980,10 @@ mixin LocalizationsProvider on LocaleCodeAware { _localizedValues[localeCode]['sync_from'] ?? _localizedValues['en']['sync_from']; + String get clientContacts => + _localizedValues[localeCode]['client_contacts'] ?? + _localizedValues['en']['client_contacts']; + // STARTER: lang field - do not remove comment String lookup(String key) {