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 _exportType = ExportType.clients;
|
||||||
var _exportDate = '';
|
var _exportDate = '';
|
||||||
var _exportDateRange = '';
|
var _exportDateRange = '';
|
||||||
|
var _exportStartDate = '';
|
||||||
|
var _exportEndDate = '';
|
||||||
|
|
||||||
bool _isExporting = false;
|
bool _isExporting = false;
|
||||||
|
|
||||||
|
|
@ -73,6 +75,7 @@ class _ImportExportState extends State<ImportExport> {
|
||||||
'this_quarter',
|
'this_quarter',
|
||||||
'last_quarter',
|
'last_quarter',
|
||||||
'this_year',
|
'this_year',
|
||||||
|
'custom',
|
||||||
];
|
];
|
||||||
|
|
||||||
static const DATE_FIELD_DATE = 'date';
|
static const DATE_FIELD_DATE = 'date';
|
||||||
|
|
@ -258,17 +261,24 @@ class _ImportExportState extends State<ImportExport> {
|
||||||
_exportDateRange = value;
|
_exportDateRange = value;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
items: DATE_RANGES
|
items: DATE_RANGES.map(
|
||||||
.map(
|
(dateRange) {
|
||||||
(dateRange) => DropdownMenuItem<String>(
|
var label = localization.lookup('$dateRange');
|
||||||
value: dateRange,
|
if (dateRange == 'last7') {
|
||||||
child: Text(
|
label = localization.last7Days;
|
||||||
localization.lookup('$dateRange'),
|
} else if (dateRange == 'last30') {
|
||||||
),
|
label = localization.last30Days;
|
||||||
),
|
}
|
||||||
)
|
return DropdownMenuItem<String>(
|
||||||
.toList(),
|
value: dateRange,
|
||||||
|
child: Text(label),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
).toList(),
|
||||||
),
|
),
|
||||||
|
if (_exportDateRange == 'custom') ...[
|
||||||
|
//
|
||||||
|
]
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
AppButton(
|
AppButton(
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
static final Map<String, Map<String, String>> _localizedValues = {
|
static final Map<String, Map<String, String>> _localizedValues = {
|
||||||
'en': {
|
'en': {
|
||||||
// STARTER: lang key - do not remove comment
|
// STARTER: lang key - do not remove comment
|
||||||
|
'client_contacts': 'Client Contacts',
|
||||||
'sync_from': 'Sync From',
|
'sync_from': 'Sync From',
|
||||||
'inventory_threshold': 'Inventory Threshold',
|
'inventory_threshold': 'Inventory Threshold',
|
||||||
'hour': 'Hour',
|
'hour': 'Hour',
|
||||||
|
|
@ -93979,6 +93980,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
_localizedValues[localeCode]['sync_from'] ??
|
_localizedValues[localeCode]['sync_from'] ??
|
||||||
_localizedValues['en']['sync_from'];
|
_localizedValues['en']['sync_from'];
|
||||||
|
|
||||||
|
String get clientContacts =>
|
||||||
|
_localizedValues[localeCode]['client_contacts'] ??
|
||||||
|
_localizedValues['en']['client_contacts'];
|
||||||
|
|
||||||
// STARTER: lang field - do not remove comment
|
// STARTER: lang field - do not remove comment
|
||||||
|
|
||||||
String lookup(String key) {
|
String lookup(String key) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue