Reports
This commit is contained in:
parent
dcb529f9f0
commit
a1cd1889ba
|
|
@ -245,6 +245,10 @@ const String kDefaultCurrencyId = '1';
|
|||
const String kDefaultDateFormat = '5';
|
||||
const String kDefaultAccentColor = '#0091EA';
|
||||
|
||||
const String kReportGroupDay = 'day';
|
||||
const String kReportGroupMonth = 'month';
|
||||
const String kReportGroupYear = 'year';
|
||||
|
||||
const String kActivityEmailInvoice = '6';
|
||||
|
||||
const int kModuleRecurringInvoice = 1;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class ReportsScreen extends StatelessWidget {
|
|||
),
|
||||
if (getReportColumnType(reportsUIState.group) ==
|
||||
ReportColumnType.dateTime)
|
||||
AppDropdownButton<ReportSubgroup>(
|
||||
AppDropdownButton<String>(
|
||||
labelText: localization.subgroup,
|
||||
value: reportsUIState.subgroup,
|
||||
blankValue: '',
|
||||
|
|
@ -144,15 +144,15 @@ class ReportsScreen extends StatelessWidget {
|
|||
items: [
|
||||
DropdownMenuItem(
|
||||
child: Text(localization.day),
|
||||
value: ReportSubgroup.day,
|
||||
value: kReportGroupDay,
|
||||
),
|
||||
DropdownMenuItem(
|
||||
child: Text(localization.month),
|
||||
value: ReportSubgroup.month,
|
||||
value: kReportGroupMonth,
|
||||
),
|
||||
DropdownMenuItem(
|
||||
child: Text(localization.year),
|
||||
value: ReportSubgroup.year,
|
||||
value: kReportGroupYear,
|
||||
),
|
||||
]),
|
||||
if (hasCustomDate) ...[
|
||||
|
|
@ -308,12 +308,6 @@ enum ReportColumnType {
|
|||
bool,
|
||||
}
|
||||
|
||||
enum ReportSubgroup {
|
||||
day,
|
||||
month,
|
||||
year,
|
||||
}
|
||||
|
||||
ReportColumnType getReportColumnType(String column) {
|
||||
if (['updated_at', 'created_at'].contains(column)) {
|
||||
return ReportColumnType.dateTime;
|
||||
|
|
|
|||
Loading…
Reference in New Issue