code refactor

This commit is contained in:
MaysWind
2023-07-09 20:43:08 +08:00
parent 522ed94c32
commit dc127ea6a3
4 changed files with 28 additions and 17 deletions
+20 -3
View File
@@ -47,20 +47,36 @@ const defaultChartDataType = allChartDataTypes.ExpenseByPrimaryCategory.type;
const allSortingTypes = {
Amount: {
type: 0,
name: 'Amount'
name: 'Amount',
fullName: 'Sort by Amount'
},
DisplayOrder: {
type: 1,
name: 'Display Order'
name: 'Display Order',
fullName: 'Sort by Display Order'
},
Name: {
type: 2,
name: 'Name'
name: 'Name',
fullName: 'Sort by Name'
}
};
const defaultSortingType = allSortingTypes.Amount.type;
const defaultChartColors = [
'cc4a66',
'e3564a',
'fc892c',
'ffc349',
'4dd291',
'24ceb3',
'2ab4d0',
'065786',
'713670',
'8e1d51'
];
export default {
allChartTypes: allChartTypes,
defaultChartType: defaultChartType,
@@ -69,4 +85,5 @@ export default {
defaultDataRangeType: datetime.allDateRanges.ThisMonth.type,
allSortingTypes: allSortingTypes,
defaultSortingType: defaultSortingType,
defaultChartColors: defaultChartColors,
};