Add export settings
This commit is contained in:
parent
43a3b178fc
commit
41cd8c8c57
|
|
@ -61,6 +61,8 @@ class _ImportExportState extends State<ImportExport> {
|
|||
var _exportType = ExportType.clients;
|
||||
var _exportDate = '';
|
||||
var _exportDateRange = '';
|
||||
var _exportStartDate = '';
|
||||
var _exportEndDate = '';
|
||||
|
||||
bool _isExporting = false;
|
||||
|
||||
|
|
@ -73,6 +75,7 @@ class _ImportExportState extends State<ImportExport> {
|
|||
'this_quarter',
|
||||
'last_quarter',
|
||||
'this_year',
|
||||
'custom',
|
||||
];
|
||||
|
||||
static const DATE_FIELD_DATE = 'date';
|
||||
|
|
@ -258,17 +261,24 @@ class _ImportExportState extends State<ImportExport> {
|
|||
_exportDateRange = value;
|
||||
});
|
||||
},
|
||||
items: DATE_RANGES
|
||||
.map(
|
||||
(dateRange) => DropdownMenuItem<String>(
|
||||
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<String>(
|
||||
value: dateRange,
|
||||
child: Text(
|
||||
localization.lookup('$dateRange'),
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
child: Text(label),
|
||||
);
|
||||
},
|
||||
).toList(),
|
||||
),
|
||||
if (_exportDateRange == 'custom') ...[
|
||||
//
|
||||
]
|
||||
],
|
||||
],
|
||||
AppButton(
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
static final Map<String, Map<String, String>> _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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue